summaryrefslogtreecommitdiff
path: root/Userland/Libraries
AgeCommit message (Collapse)Author
2022-11-19LibC: Make getpwent_r() behave more like glibcAndreas Kling
Two things: - We now fail with ENOENT when we reach the end of the database. - Errors are returned directly instead of via errno.
2022-11-19LibPDF: Use Gfx::PathRasterizer for Adobe Type 1 font renderingJulian Offenhäuser
This gives much better visual results than painting the path directly. It also has the nice side effect that Type 1 fonts will now look much more similar to TrueType fonts, which use the same class :^) In addition, we can now cache glyph bitmaps for repeated use.
2022-11-19LibGfx: Move TTF::Rasterizer to its own filesJulian Offenhäuser
The custom TTF path rasterizer is actually generic enough for it to be used for other fonts. To make this more clear, it now lives on its own in the "Font" directory.
2022-11-19LibGUI: Add CommonMenusthankyouverycool
Right now only the accessibility menu is shared across apps but it's a good bit of boilerplate that can be consolidated and will make adding ColorBlindnessFilters to other widgets trivial.
2022-11-19LibGUI: Add fallible try_create_checkable() Actionthankyouverycool
2022-11-19LibGUI: Add ColorFilterer classthankyouverycool
Widgets will inherit from ColorFilterer in order to create the accessibility CommonMenu
2022-11-19LibGUI: Allow adding previously constructed menus to Menubarthankyouverycool
2022-11-19LibGUI: Accept() mouse wheel events in {Spin,Combo}Boxesthankyouverycool
Prevents ScrollableContainerWidgets from moving when changing values in embedded widgets with the mouse wheel.
2022-11-19LibGUI: Display shortcut text for Alt Graph modifierthankyouverycool
Fixes Accessibility menus in ThemeEditor and Magnifier not showing their complete shortcut combinations
2022-11-18LibJS: Validate TypedArray when calling TypedArray.prototype.valuesJamie Mansfield
2022-11-18LibJS: Add spec comments to %TypedArray%.prototype.valuesJamie Mansfield
2022-11-18LibWeb: Implement most of WebDriver capability matchingTimothy Flynn
We don't completely implement version matching, and currently ignore the "proxy" capability.
2022-11-18LibWeb: Extract out the User-Agent browser name and versionTimothy Flynn
This way we can re-use these elsewhere, and if they ever change again, those other uses will get updated automatically.
2022-11-18LibWeb+WebDriver: Begin processing and matching WebDriver capabilitiesTimothy Flynn
Still some TODOs here: * We don't handle all capabilities (e.g. proxy) * We don't match the capabilities against the running browser But this will parse the capabilities JSON object received from the WebDriver client.
2022-11-18LibWeb: Do not reject valid WebDriver script timeoutsTimothy Flynn
The spec's text is pretty awkward here, but the way we've currently transcribed it to C++ means we reject valid script timeouts. This meant the following would fail: TimeoutsConfiguration config {}; // Default values. auto json = timeouts_object(config); config = TRY(json_deserialize_as_a_timeouts_configuration(json));
2022-11-18LibWeb: Fix clicking on linksMacDue
Since ff2f31b LibWeb has segfaulted when clicking on links, as the browsing context (a GCPtr) in the lambda was captured by reference and was out of scope by the time the callback fired.
2022-11-17LibRegex: Use spans<4> to avoid allocating small vectorsAli Mohammad Pur
This path is hit a lot, and alloc/free of this vector was showing up on profiles, so get rid of it.
2022-11-17LibRegex: Use a copy-on-write vector for fork stateAli Mohammad Pur
2022-11-17LibRegex: Don't copy forked results twiceAli Mohammad Pur
2022-11-17LibRegex: Avoid copying MatchInput when getting argument descriptionsAli Mohammad Pur
2022-11-17LibJS: Give the undeclared private identifier error more precedencedavidot
Before this could give the `must be followed by in` error before the undeclared private identifier error. Fixing the `in` error would not have resolved the other error so this order makes the errors more actionable.
2022-11-17LibJS: Make sure private identifier is valid in optional chaindavidot
If we don't check that a private identifier is valid this can break the assumption that we have a private environment when evaluation the private identifier. Also an unknown private identifier this should be a SyntaxError.
2022-11-17LibJS: Add space in output of toEval in test-common.jsdavidot
2022-11-17LibJS: Initialize functions in spec orderdavidot
This is only visible with something like `Object.getOwnPropertyNames` on the global object. All other declaration instantiations put the functions on an environment making the order invisible. Note that spec order is not quite tree order as in non-strict mode functions which get hoisted out of blocks appear before top level functions. Co-authored-by: Hendiadyoin1 <leon.a@serenityos.org>
2022-11-17LibJS: No longer hoist if parent scope has a function with the same namedavidot
2022-11-17LibJS: Reuse as_i32 in as_double in JS::Valuedavidot
Since this might be complicated with NaN boxing keeping it as one implementation makes this easier to check and change.
2022-11-17LibTest: Fail if the top-level result of running a JS file is an errordavidot
Before putting `throw 1;` in a test file did not fail the file, and it ignored the rest of the file. Now we check the resulting completion from run and fail if that is an error.
2022-11-16LibWeb+LibWebView+WebContent+WebDriver: Implement Send Alert TextTimothy Flynn
2022-11-16LibWeb+WebContent+WebDriver: Implement Get Alert TextTimothy Flynn
2022-11-16LibWeb+WebContent+WebDriver: Implement Accept AlertTimothy Flynn
2022-11-16LibWeb+WebContent+WebDriver: Implement Dismiss AlertTimothy Flynn
2022-11-16LibWeb: Fix typo in WebDriver section commentTimothy Flynn
2022-11-16LibWebView+WebContent: Begin handling open user dialogs for WebDriverTimothy Flynn
The way in which dialogs should be handled is configurable by the driver capabilities object, which we don't support yet. So this implements just the default mode to dismiss the dialog and return an error if there is one open. In the OOPWV, this means we need to refer to the dialog after it has been open, so we now hold a pointer to whatever dialog is open.
2022-11-16LibGUI: Allow more programmatic control over GUI::InputBoxTimothy Flynn
This will be needed for WebDriver, which will require constructing and controlling dialogs manually. Currently, InputBox will only set its text value when the OK button is pressed. This changes InputBox to update its text when done(ExecResult::OK) is invoked in any way. This also makes the text_value() method public, allows for setting the text value, and allows for moving-in the initial text value.
2022-11-16LibGUI: Add GUI::Dialog to the LibGUI forwarding headerTimothy Flynn
2022-11-16LibWebView+WebContent: Wait for dialog responses without blocking IPCTimothy Flynn
Currently, the WebContent process is completely blocked while waiting for a response to a dialog request. This patch allows the IPC event loop to continue executing while only blocking the HTML event loop. This will allow other processes like WebDriver to continue to operate on the WebContent process while a dialog is open.
2022-11-16LibWeb: Add a flag to pause an HTML event loop's executionTimothy Flynn
This will be used to unblock the WebContent IPC event loop while waiting for a dialog response.
2022-11-16LibWeb: Add naive layout for SVG foreign objectsAndreas Kling
We now layout foreign objects as if they form a nested block formatting context. This probably isn't the most correct way to do this, but it's a start.
2022-11-16LibWeb: Sketch out basic support for SVG <foreignObject> elementsAndreas Kling
This patch adds basic DOM construction and IDL bindings for foreign objects in SVG trees.
2022-11-16LibWeb: Adjust `foreignobject` to `foreignObject` in HTML parserAndreas Kling
This conversion was missing from the table we copied from the spec for whatever reason.
2022-11-16LibWeb: Solve width for absolute positioned elemenent according to specAliaksandr Kalenik
https://www.w3.org/TR/css-position-3/#abs-non-replaced-width If left and width are auto and right is not auto, then the width is shrink-to-fit. Then solve for left.
2022-11-16LibWeb: Make auto-fit compatible with grid-gapmartinfalisse
This fixes an error when using auto-fit with grid-gap, as previously were not taking into account the fact that more columns had been added to the grid yet the occupation grid had not grown.
2022-11-16LibWeb: Use fixed-size tracks for grid gapmartinfalisse
Previously were incorrectly initializing the grid gap tracks as were using the GridSize float constructor, which creates a flexible length. What is actually wanted is a fixed-size track of a certain size, indicated in pixels.
2022-11-15LibGfx: Optimize anti-aliased line drawing and strokingTorstennator
This patch optimizes the drawing of aa-lines by rotating the drawn rectangle to the direction where the line points. That enables us to draw non-straight lines with the proper width. If a aa-line is drawn that is infact a straigt line we now dont plot those lines with multipe rectangles across the line - insted we draw straight lines in one go with just one rectangle of proper size. Stroking of lines has been enhanced to take care of the edges between two lines with drawing the stroke till the intersections of two connected lines.
2022-11-15LibWeb: Change SVGContext initial fill_color to transparentTorstennator
This patch changes the initialization of the fill_color of an SVGContext to transparent instead of black to not draw a black filling if the elements fill_color is defined as "none".
2022-11-15LubWeb: Call before_children_paint for positioned descendantsAliaksandr Kalenik
Add before_children_paint and after_children_paint calls for positioned descendants with z-index: auto during painting
2022-11-15LibWeb: Clip hidden overflow by absolute rect of containing blockAliaksandr Kalenik
Since handling overflow: hidden in PaintableBox::before_children_paint while following paint traversal order can't result in correctly computed clip rectangle for elements that create their own stacking context (because before_children_paint is called only for parent but overflow: hidden can be set somewhere deeper but not in direct ancestor), here introduced new function PaintableBox::clip_rect() that computes clip rectangle by looking into containing block. should_clip_overflow flag that disables clip for absolutely positioned elements in before_children_paint and after_children_paint is removed because after changing clip rectangle to be computed from not parent but containing block it is not needed anymore (absolutely positioned item is clipped if it's containing block has hidden overflow)
2022-11-15LibWeb: Join out-of-flow block nodes in last parent child if possibleAliaksandr Kalenik
Join out-of-flow block nodes into last child of parent node if last child has inline children.
2022-11-15LibWeb: Implement document.open(string, string, string)Idan Horowitz
2022-11-15LibWeb: Implement window.openIdan Horowitz
This implementation is some-what complete, with the most common missing /broken feature being opening pages in new tabs using the "_blank" target. This is currently broken due to 2 reasons: - We currently always claim the Window does not have transient activation, as we do not track the transient activation timestamp yet. This means that all such window.open calls are detected as pop-ups, and as such they are blocked. This can be easily bypassed by unchecking the 'Block Pop-ups' checkbox in the debug menu. - There is currently no mechanism for the WebContent process to request a new tab to be created by the Browser process, and as such the call to BrowsingContext::choose_a_browsing_context does not actually open another tab.