summaryrefslogtreecommitdiff
path: root/Userland/Libraries
AgeCommit message (Collapse)Author
2022-09-11LibGL: Define `GL_NO_ERROR` as `0`Jelle Raaijmakers
This conforms to the Khronos enum value listing and prevents a redefinition warning when compiling with SDL_opengl.
2022-09-11LibGL: Remove unused/default includes from `GLContext`Jelle Raaijmakers
2022-09-11LibGL: Implement `GL_CURRENT_COLOR` context parameterJelle Raaijmakers
2022-09-11LibSoftGPU: Convert width and height to `f32x4` just onceJelle Raaijmakers
We were passing along a `u32x4` only for it to be converted to `f32x4` as soon as we'd use it.
2022-09-11LibSoftGPU: Remove unused alias `truncate_int_range`Jelle Raaijmakers
2022-09-11LibWeb: Avoid copying viewport rect when converting length to pixelsnetworkException
See https://github.com/SerenityOS/serenity/pull/3433#discussion_r484570948
2022-09-11LibGUI: Implement rubber band selection in table viewnetworkException
This patch implements rubber band selection in table view while clamping the rubber band rect to the widget inner rect, matching the behavior of IconView and ColumnsView.
2022-09-11LibGUI: Limit column view rubber band rect to widget inner rectnetworkException
Previously when selecting a column that was partially scrolled out of view the rubber band rect would extend outside the widget inner rect. This patch rewrites the implementation to be more readable and clamps the rubber band rect to the widget inner rect to match the behavior of IconView.
2022-09-11LibGUI: Properly limit the icon view rubber band rect to the widgetnetworkException
Previously the rubber band rect of IconView was not properly constrained to the widget inner rect, leaving a one pixel gap on the bottom and right side. This patch removes the gap by inflating the constraint rect by one pixel on each axis.
2022-09-11LibGUI: Support emoji with multiple code points in EmojiInputDialogTimothy Flynn
2022-09-11LibGUI+LibVT: Notify widgets of emoji selection with a callbackTimothy Flynn
Currently, LibGUI modifies the Ctrl+Alt+Space key event to instead represent the emoji that was selected through EmojiInputDialog. This is limited to a single code point. For multiple code point emoji support, individual widgets now set a hook to be notified of the emoji selection with a UTF-8 encoded string. This replaces the previous set_accepts_emoji_input() method.
2022-09-11LibGUI: Use discovered emoji files as the EmojiInputDialog button iconsTimothy Flynn
Rather than rendering the emoji as text, use the emoji icons themselves.
2022-09-11LibGUI: Add an emoji category filter for SerenityOS custom emojisTimothy Flynn
Most of the emoji are 7x10px (or close to that). But some are larger, on the order of 128x128px. The icon used for the SerenityOS category is one such large emoji, and must be scaled down to an appropriate size for rendering.
2022-09-11LibGUI: Ensure unknown emoji have a set display orderTimothy Flynn
Currently, we use code point values as a tie break when sorting emoji by display order. When multiple code point emoji are supported, this will become a bit awkward. Rather than dealing with varying code point length while sorting, just set a maximum display order to ensure these are placed at the end.
2022-09-11LibUnicode: Parse and generate custom emoji added for SerenityOSTimothy Flynn
Parse emoji from emoji-serenity.txt to allow displaying their names and grouping them together in the EmojiInputDialog. This also adds an "Unknown" value to the EmojiGroup enum. This will be useful for emoji that aren't found in the UCD, or for when UCD downloads are disabled.
2022-09-11LibTest: Extract some useful functions from TestRunner.hdavidot
This allows other test like programs to use these without needing to link to LibTest.
2022-09-10LibGUI: Blit brightened icon when try item is hoverednetworkException
2022-09-10LibJS: Allow negative pointers in Valuedavidot
Also ensure that all a nullptr input gives null object and you don't accidentally dereference a nullptr.
2022-09-09LibC: Consume all whitespace in `scanf` if present in formatJelle Raaijmakers
We were consuming all whitespace from the format, but not the input lexer - that was left to the actual format parsing code. It so happened that we did not account for whitespace with the conversion specifier '[', causing whitespace to end up in the output variables. Fix this by always consuming all whitespace and removing the whitespace logic from the conversion code.
2022-09-09LibWeb: Set prototype for both TextDecoder and AbortSignalLuke Wilde
These were forgotten to be set during the GC heap conversion.
2022-09-09LibWeb: Resolve two document-tree child browsing context count FIXMEsnetworkException
This patch makes use of helpers implemented for window.length to resolve two FIXMEs in WindowProxy previously simply assuming no child browsing contexts :^)
2022-09-09LibWeb: Implement window.lengthnetworkException
2022-09-09Spreadsheet+LibGUI: Set EmojiInputDialog as a CaptureInput modalthankyouverycool
This has two advantages: First the picker no longer changes the active window state of its parent. Visually this is an additional hint that the dialog is "fragile" and will close on loss of focus. Second, because it contains a search box, its own input won't be preempted by global application shortcuts when typing (pending #15129). This is a problem in apps like PixelPaint which use shortcuts without modifiers.
2022-09-09LibGUI: Set EmojiInputDialog's FrameShape to "Window"thankyouverycool
2022-09-09LibGUI: Add ellipsis to Insert Emoji actionthankyouverycool
Requires further user input
2022-09-09LibGUI: Allow blocking CommandPalette/EmojiInput on a per Window basisthankyouverycool
Instead of having to negate every focusable widget or textbox, let windows override all their widgets. These two Dialogs now block themselves and each other.
2022-09-09LibWeb: Treat percentage heights as "auto" if unresolvableAndreas Kling
If the containing block has indefinite height, we can't resolve percentage heights against it. Instead of treating it as 0 by accident, let's treat it as "auto" on purpose. This brings back the cheek borders on Acid2.
2022-09-09LibWeb: Update layout in Element.client{Left,Top}Andreas Kling
We have to flush any pending layout changes before getting metrics.
2022-09-09LibWeb: Avoid layout in Element.client{Width,Height} if possibleAndreas Kling
When querying the HTML element (in strict mode) or the BODY element (in quirks mode), we return the viewport dimensions. Layout doesn't change the size of the viewport, so we can actually reorder the steps here and avoid performing layout in some cases. This removes a bunch of synchronous layouts on pages with reCAPTCHA.
2022-09-09LibWeb: Don't collapse vertical margins between floatsAndreas Kling
Just stack floats at their vertical margin edge instead of letting their border boxes rub up against each other.
2022-09-09LibWeb: Keep CSS sheets sorted in document tree orderAndreas Kling
This ensures that style is applied consistently, even if the document has external CSS resources that don't always arrive in the same order.
2022-09-09LibGUI: CommandPalette: Fix key event capture for actionsfaxe1008
This patch fixes an issue for applications that contain actions without a modifier (e.g. PixelPaint). Previously when pressing any key bound to an action while the CommandPalette was visible the action was forwarded to the parent instead of the CommandPalette.
2022-09-09LibCore: Add File::open_file_or_standard_stream()demostanis
2022-09-08LibGUI: Only react on KeyDown when escaping a Dialogthankyouverycool
Both KeyEvents aren't necessary and erroneously close two Dialogs at once.
2022-09-08LibGUI+WindowServer: Notify Windows on input preemptionthankyouverycool
Previously Menus set themselves as active input solely to make sure CaptureInput modals would close, but this is a functional half-truth. Menus don't actually use the active input role; they preempt normal Windows during event handling instead. Now the active input window is notified on preemption and Menus can remain outside the active input concept. This lets us make more granular choices about modal behavior. For now, the only thing clients care about is menu preemption on popup. Fixes windows which close on changes to active input closing on their own context menus.
2022-09-08LibGUI: Add Unicode emoji group filters to the EmojiInputDialogTimothy Flynn
This allows users to filter the list of displayed emoji by the group to which the emoji belong.
2022-09-08LibGUI: Display emoji in the EmojiInputDialog in Unicode display orderTimothy Flynn
2022-09-08LibGUI: Add placeholder text to the emoji picker search boxTimothy Flynn
Co-authored-by: electrikmilk <brandonjordan124@gmail.com>
2022-09-08LibUncode: Parse and generate emoji code point dataTimothy Flynn
According to TR #51, the "best definition of the full set [of emojis] is in the emoji-test.txt file". This defines not only the emoji themselves, but the order in which they should be displayed, and what "group" of emojis they belong to.
2022-09-08Base+LibGUI: Add insert emoji common actionelectrikmilk
This adds a common action to invoke the emoji picker.
2022-09-08LibSoftGPU: Use approximation for maximum depth slopeJelle Raaijmakers
OpenGL allows GPUs to approximate a triangle's maximum depth slope which prevents a number computationally expensive instructions. On my machine, this gives me +6% FPS in Quake III. We are able to reuse `render_bounds` here since it is the containing rect of the (X, Y) window coordinates of the triangle, thus its width and height are the maximum delta X and delta Y, respectively.
2022-09-08LibGL: Set correct color material mode for `GL_AMBIENT_AND_DIFFUSE`Jelle Raaijmakers
This was a silly mistake :^)
2022-09-08LibWeb: Rename confusing parameter to layout_block_level_box()Andreas Kling
It wasn't the content height, but rather the the bottom edge of the lowest margin box.
2022-09-08LibWeb: Use correct box edge when looking for space between floatsAndreas Kling
2022-09-08LibWeb: Make default CSS font settings match other browsers betterAndreas Kling
Let's make 16px the default font size instead of 10px. This makes our layout results match those of other engines in many more cases. Also make the h1-h6 element styles use relative (em) font sizes, also matching other browsers.
2022-09-08LibGfx: Add API for loading more directories into Gfx::FontDatabaseAndreas Kling
Also make the font discovery algorithm search subdirectories as well. This will be used by Ladybird to discover more fonts on non-Serenity systems. :^)
2022-09-08LibWeb+WebContent: Add abstraction layer for generic font familiesAndreas Kling
Instead of hard-coding the names of system fonts to use for the CSS generic fonts (like "sans-serif", "monospace", etc.) we now call out to a Platform::FontPlugin and ask for the generic names.
2022-09-08LibWeb: Make anonymous wrapper blocks actually have "display: block"Andreas Kling
We didn't set their display at all before, and since CSS display is not inherited, anonymous block wrappers were actually "display: inline", but it kinda worked anyway because we positioned blocks based on their C++ class (BlockContainer) rather than their CSS display value. Now that we position based on CSS display value, this broke positioning of anonymous wrapper blocks, and this fixes that.
2022-09-08Browser+LibGUI+WindowServer: Open Button menus uniformlythankyouverycool
Instead of letting buttons determine the relative position of their menus, a workaround only used by Statusbar segments, open them all uniformly for a nice, consistent UI. Passing a rect to popup() now routes to open_button_menu(), an analog to open_menubar_menu(), which adjusts the menu's popup position in the same way. Fixes button menus obscuring the buttons which spawn them and jutting out at odd corners depending on screen position.
2022-09-08LibGUI: Simulate a click on arrow key events for AbstractButtonsthankyouverycool
in exclusive, checkable groups. Instead of merely setting the button checked, call click() so buttons with registered actions can activate. Fixes ActionGroups like FileManager's view type checkables not activating when cycled with the keyboard.