Commit graph

36004 commits

Author SHA1 Message Date
Brian Gianforcaro
16bee0ba79 Everywhere: Move js/web/wasm tests under /home/anon/Tests 2022-03-20 22:20:59 +01:00
Brian Gianforcaro
67fc81a65a Everywhere: Move cpp-tests under /home/anon/Tests 2022-03-20 22:20:59 +01:00
Andreas Kling
d7492927e9 LibWeb: Avoid some layouts in getComputedStyle() property getter
For CSS properties that are known to not affect layout, we can avoid
doing a layout before returning their current resolved value.

It should be enough to only update style for the target element here,
but we don't currently have a mechanism for that.
2022-03-20 22:07:59 +01:00
Brian Gianforcaro
0998074230 LIbVT: Fix copy paste regression I introduced in #13102
I accidentally inverted this behavior in commit 2042d909972

Previously it read:
```cpp
constexpr bool is_untouched() const { return !(flags & Touched); }
```
2022-03-20 21:50:58 +01:00
thankyouverycool
b8cc18896f LibGUI+FontEditor: Add context menu for editor actions
GlyphMapWidget now reports context menu requests when secondary
clicking the map. This also adds a new Select All action and updates
the Copy Character action to work on multi-glyph selections. Glyph
navigation actions have been moved to a separate Go menu, as is
common in other apps.
2022-03-20 20:00:25 +01:00
thankyouverycool
42284a1550 FontEditor: Change flip action shortcuts to Ctrl+Shift+{Q,W}
To not interfere with the command palette.
2022-03-20 20:00:25 +01:00
thankyouverycool
cdd1bc64f6 FontEditor: Set width on copy only if source glyph is present
Fixes empty glyphs copying as present in fixed-width fonts.
2022-03-20 20:00:25 +01:00
thankyouverycool
212817ea20 FontEditor: Restore selections on undo/redo actions
This makes navigating undo history a lot easier to follow.
Individual glyph alterations now reset selection size if necessary
to save space.
2022-03-20 20:00:25 +01:00
thankyouverycool
df443863bd LibGUI: Add set_selection() convenience helper to GlyphMapWidget 2022-03-20 20:00:25 +01:00
thankyouverycool
5c6326ae23 LibGUI: Add automatic scrolling to GlyphMapWidget
Similar to TextEditor, GlyphMapWidget now automatically scrolls
when dragging a selection outside its boundaries.
2022-03-20 20:00:25 +01:00
thankyouverycool
a26e71a137 LibGUI: Use system theme when painting GlyphMapWidget focus outline 2022-03-20 20:00:25 +01:00
thankyouverycool
cf13cf7225 LibGUI: Reset GlyphMapWidget only if clicking a new active glyph
Fixes an edge case in which mousing down on the active glyph within
a larger selection would reset the selection but fail to update the
glyph map. Now we can grow or shrink the selection by dragging the
active glyph even after an initial selection is made.
2022-03-20 20:00:25 +01:00
thankyouverycool
4f7b37de9c LibGUI: Use nicer API for contrained positions in GlyphMapWidget
Forgot about this little guy. Functionally the same here, but more
robust if scrollbars change.
2022-03-20 20:00:25 +01:00
thankyouverycool
54634fc2df LibGUI: Remove unnecessary MouseEvent calls in GlyphMapWidget
And pass KeyEvents directly to the relevant predecessor.
2022-03-20 20:00:25 +01:00
Simon Wanner
dc8ac83f77 Browser: Size the content box in "Box Model" based on its text 2022-03-20 19:57:09 +01:00
Simon Wanner
69fc7009bf LibWeb: Grey out invisible nodes in the DOM inspector
This makes it easier to navigate large DOM trees where
some nodes have display: none
2022-03-20 19:57:09 +01:00
Tim Schumacher
a128d4931d Base: Install symlinks instead of aliasing rgrep and egrep 2022-03-20 11:50:47 -07:00
Tim Schumacher
4a5d1db7f6 grep: Recognize mode based on the program name 2022-03-20 11:50:47 -07:00
circl
0865a06ef5 Ports: Add The Powder Toy port 2022-03-20 18:20:01 +00:00
circl
adcd39d928 Ports: Add FFTW port 2022-03-20 18:20:01 +00:00
circl
ce5f34f153 Ports: Add luajit port 2022-03-20 18:20:01 +00:00
Andreas Kling
8cc757b92b LibWeb: Always call Layout::Box::did_set_rect()
Since paintables have a default content size of 0x0, we were neglecting
to notify the corresponding layout node about size changes, if the used
content size came out to 0x0.

This fixes an issue where resizing an iframe to 0x0 didn't take effect.
2022-03-20 19:03:43 +01:00
Andreas Kling
07a4d590dd LibWeb: Layout browsing context parent before its children
When updating layout inside a nested browsing context, try first to
perform layout in the parent document (the nested browsing context's
container's document).

This ensures that nested browsing contexts have the right viewport
dimensions in case the parent layout changes them somehow.
2022-03-20 19:03:43 +01:00
Andreas Kling
6ac3bf2982 LibWeb: Don't crash in BrowsingContextContainer::content_document()
Instead of choking on the VERIFY(document), let's just return null if
there's no active document for now. This is incorrect, but sidesteps
a frequent crash that happens on content with iframes.

I've left a FIXME about removing the hack once it's no longer needed.
2022-03-20 19:03:43 +01:00
Andreas Kling
d03680a9e7 LibWeb: Always defer callbacks in ResourceClient::set_resource()
Previously, we'd invoke the load/fail callbacks synchronously for
resources that were already loaded and cached.

This patch uses deferred_invoke() in the already-loaded case to ensure
that we always invoke these callbacks in a consistent manner.

This isn't to fix a specific issue, but rather because I kept seeing
these callbacks being invoked synchronously on top of an already-tall
call stack, and it was hard to reason about what was going on.
2022-03-20 19:03:43 +01:00
Sam Atkins
d60b3be29a LibWeb: Implement the :focus-within selector
This matches if it has focus, or any nodes inside it do.
2022-03-20 17:35:31 +00:00
Sam Atkins
4827092554 Base: Add a :focus/:focus-within test page 2022-03-20 17:35:31 +00:00
Andreas Kling
02497888a6 LibWeb: Ignore linked stylesheets with MIME types other than text/css
This makes the "Acid3" text on ACID3 not show up in red. :^)
2022-03-20 17:20:59 +01:00
Andreas Kling
2b7775118d LibWeb: Clear element.style when the "style" attribute is removed
We were hanging on to element inline style, even after the style
attribute was removed. This made inline style sticky and impossible to
remove. This patch fixes that. :^)
2022-03-20 16:31:40 +01:00
Andreas Kling
485ef276bd LibWeb: Invalidate style & layout inside iframes when they change size 2022-03-20 16:25:54 +01:00
Andreas Kling
618b857457 LibWeb: Evaluate @media CSS rules when updating style
In case we have new @media rules, we need to make sure we've evaluated
them before actually recomputing styles for the document.
2022-03-20 16:19:47 +01:00
Andreas Kling
80ed2ab557 LibWeb: Implement HTMLOptionElement.selected 2022-03-20 16:19:47 +01:00
Andreas Kling
a606345576 LibWeb: Implement HTMLSelectElement.selectedIndex 2022-03-20 16:19:47 +01:00
Ali Mohammad Pur
5dc0855489 Spreadsheet: Use the correct top-center alignment when set to Top+Center 2022-03-20 13:20:33 +00:00
Ali Mohammad Pur
292e459901 Spreadsheet: Allow the user to format Identity cells via JS expressions
Also add some hints as to what the format field expects as it would be
very confusing otherwise.
2022-03-20 13:20:33 +00:00
Ali Mohammad Pur
8919e4b2b6 Spreadsheet: Only update the selection on primary mousedown
Otherwise we'd end up clearing the selected rect before doing anything
with it if the user right-clicks on it.
2022-03-20 13:20:33 +00:00
Ali Mohammad Pur
0d302516d5 Spreadsheet: Skip over "invalid" saved cell values
These can be generated by saving something that's not serialisable (e.g.
functions), skip over them and let the load logic reevaluate them when
needed.
2022-03-20 13:20:33 +00:00
safarp
b0b8d14a2c LibC: Automatically append null terminator in vswprintf 2022-03-20 08:40:36 -04:00
Andreas Kling
96db8d64f6 LibWeb: Include entire border box when painting stacking context layer
For stacking contexts that have opacity between 0 and 1, and also
contexts with a 2D transform, we first paint them into a temporary layer
buffer. Then we blend that buffer with the contents in one go.

Before this patch, we were only drawing the content box of the stacking
context into this layer buffer, which led to padding and borders missing
from elements painted this way.
2022-03-20 13:36:45 +01:00
Andreas Kling
159d4d772a LibWeb: Assign the used top/bottom border widths to inline-block boxes
We were forgetting to update these values, which led to missing top and
bottom borders for elements with display:inline-block.
2022-03-20 13:36:45 +01:00
Andreas Kling
bdd42c9b0e LibWeb: Add basic support for :lang() CSS selector
This doesn't have parsing support for multiple languages in the same
selector. Support for language subcodes is not great either. But it
does do the basics.
2022-03-20 13:36:45 +01:00
Andreas Kling
5d672717aa LibWeb: Add a barebones SVGTextContentElement with getNumberOfChars() 2022-03-20 13:36:45 +01:00
sin-ack
e212514bbf LookupServer: Return with failure result when lookup fails
This was missed in 4ca0669d1e and the
error condition would still fall through to an ErrorOr unwrapping which
caused a crash.
2022-03-20 12:09:31 +03:30
Ali Mohammad Pur
82a515a748 LibWasm: Increase the arbitrary local value count per type limit
It was arbitrary, it's still arbitrary, but now it's funny too :^)
2022-03-20 10:44:32 +03:30
Ali Mohammad Pur
a6c4b6848b LibWasm: Use some template magic to greatly simplify stack validation
This also auto-fixes a few bugs that were present before as we were
manually checking the stack.
2022-03-20 10:44:32 +03:30
Ali Mohammad Pur
18c5b0f1cc LibWasm: Allow Limits max value to be equal to 2^k-1
That value fits in k bits, so we should allow it.
2022-03-20 10:44:32 +03:30
Ali Mohammad Pur
612d5f201a Meta: Skip wasm tests whose modules cannot be loaded
Also add support for a few more assertion types to go along with it.
2022-03-20 10:44:32 +03:30
Ali Mohammad Pur
a5958b5f45 LibJS: Allow 'expect().fail("some random string")' in test-js
Previously fail() wanted the fail object to be a callable, allow it to
be a string also.
2022-03-20 10:44:32 +03:30
Simon Wanner
1d95745901 LibWeb: Implement the rest of the Adoption Agency Algorithm
This gets us 2 points on html5test.com :^)
- Before: https://html5te.st/4cf57659bc08272e (208)
- After: https://html5te.st/fb8a9259bda1c115 (210)
2022-03-20 02:52:37 +01:00
Florent Castelli
e165ae5b60 LibHTTP+LibTLS: Better HTTPS Socket EOF detection
When the server doesn't signal the Content-Length or use a chunked mode,
it may just terminate the connection after sending the data.
The TLS sockets would then get stuck in a state with no data to read and
not reach the disconnected state, making some requests hang.

We know double check the EOF status of HTTP jobs after reading the
payload to resolve requests properly and also mark the TLS sockets as
EOF after processing all the data and the underlying TCP socket reaches
EOF.

Fixes #12866.
2022-03-20 01:01:40 +01:00