summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2022-02-24LibGUI: Prefer to pop-up Tray Button menus from the top rightthankyouverycool
Fixes menus obscuring SegmentWidgets in status bars.
2022-02-24TextEditor: Update status bar to use clickable Segmentsthankyouverycool
Adds two new Segments to TextEditor's status bar to quickly change and display syntax highlighting and line and column info.
2022-02-24LibGUI+LibSyntax: Stringify Highlighter::Languagethankyouverycool
This patch adds a Highlighter::Language -> string helper and a callback for Highlighter changes.
2022-02-24LibGUI+Apps: Convert Statusbar Labels to Segmentsthankyouverycool
Segments inherit from Button and let us add clickable widgets to status bars. This patch also adds proportional, fixed and autosized modes for segments and lets the status bar consume all non-clickable segments for override text.
2022-02-24LibGfx: Return early when painting FrameShape::NoFramesthankyouverycool
2022-02-24LibWeb: Append only one line feed character in Document.writelnTimothy Flynn
There were a couple issues here: 1. The line feed should only be appended once, rather than one per string. 2. The new_strings list of strings was unused (we were creating the new list, then passing the old list to Document.write).
2022-02-24LibGUI+LibGfx: Defer to fonts when setting Editor line heightthankyouverycool
Fonts now provide their preferred line height based on maximum height and requested line gap. TTFs provide a preferred line gap from table metrics while BitmapFonts are hardcoded at the previous default for now.
2022-02-24LibGUI: Ensure ruler grows properly when using proportional fontsthankyouverycool
Ruler needs to take into account spacing between glyphs for proportional fonts as line count increases. This also replaces the less accurate 'x' width estimate for widest character with a '4'
2022-02-24UserspaceEmulator: Fix syntax of generated profilesBrian Gianforcaro
While trying out `ue --profile` today, I received an invalid json profile. After poking around at the file it looks like we never close the `events: [..` array that we generate, and thus end up with an invalid document. The fix is straight forward, always emit the closing brace.
2022-02-24ClipboardHistory: Add Time columnNícolas F. R. A. Prado
Add a Time column to ClipboardHistory that shows the time when each item in the list was copied.
2022-02-24LibWeb: Actually query the orientationSam Atkins
I made a typo and was checking for "hover" twice.
2022-02-24LibWeb: Implement `@media(overflow-inline)`Sam Atkins
I guess I got confused by this before, but it's actually the same as overflow-block.
2022-02-24LibWeb: Implement `<resolution>` as a media feature typeSam Atkins
This is the only dimension type besides `<length>` that is used in any media queries in levels 4 or 5 right now. Others can be included if/when they're needed.
2022-02-24LibWeb: Parse Angle/Frequency/Resolution/Time typesSam Atkins
2022-02-24LibWeb: Move length-unit-from-string code into LengthSam Atkins
This means the units are defined in a single place instead of two. Also removed the verify that we didn't produce a bogus % dimension token in the Tokenizer, since this has never happened and the parser is not a tokenizer test suite. :^)
2022-02-24LibWeb: Implement CSS Time classSam Atkins
This corresponds to `<time>` in the grammar.
2022-02-24LibWeb: Implement CSS Resolution classSam Atkins
This corresponds to `<resolution>` in the grammar.
2022-02-24LibWeb: Implement CSS Frequency classSam Atkins
This corresponds to `<frequency>` in the grammar.
2022-02-24LibWeb: Implement CSS Angle classSam Atkins
This corresponds to `<angle>` in the grammar.
2022-02-24LibWeb: Account for `Calculated` in Length methodsSam Atkins
We were ignoring this in a couple of places.
2022-02-24LibWeb: Alphabetize LibWeb CMakeLists.txtSam Atkins
2022-02-23Shell: Use an opaque color for SyntaxErrorkperdlich
Use an opaque color for SyntaxError in Syntax Highlighter to avoid transparent errors.
2022-02-23LibGUI/EmojiInputDialog: Skip multi code point emojis for nowLinus Groh
These will require some tweaking here and elsewhere in LibGUI, to handle both rendering of the emojis as single glyphs consistently, and faking key events with multiple code points after selecting one.
2022-02-23LibGUI/EmojiInputDialog: Automatically calculate the dialog sizeLinus Groh
This was getting way too crowded again. Let's just fix the FIXME. :^)
2022-02-23LibGfx: Add basic variation selector and regional indicator support :^)Linus Groh
I'm sure there's a spec for this somewhere, but this is a first working approximation. Closes #3315.
2022-02-23LibGfx+LibGUI: Support multi code point emojis in text painting :^)Linus Groh
This necessitates switching from passing a single code point to the callback to passing a non-const Utf8CodePointIterator instead. Note that the text selection mechanisms in LibGUI and LibWeb don't handle this properly yet; they still assume that each code point renders as one glyph. Similarly, width calculations for text widths don't either, so a single such an emoji will require space for more than one glyph. It also doesn't work in LibVT's TerminalWidget, where each code point is handled and rendered separately, so LibGfx never gets a chance to check if subsequent code points could result in a combined emoji.
2022-02-23LibGfx: Add Emoji::emoji_for_code_point_iterator(Utf8CodePointIterator&)Linus Groh
In the common case of text rendering rather than getting the emoji bitmap for a fixed number of code points, we don't know how many code points make one emoji. As far as I can tell, the longest ones are up to ten code points, so we try to consume all of them and do a lookup during each iteration, and return the emoji for the longest chain of code points. Quite basic and definitely room for improvement, but it works!
2022-02-23LibGfx: Add Emoji::emoji_for_code_points(Span<u32> const&)Linus Groh
Not all emojis are just one code point, so the existing API is not sufficient: Emoji::emoji_for_code_point(u32). The file name for such emojis is simply each U+XXXX separated by an underscore.
2022-02-23LibGUI+Apps: Adjust Splitter spacingsthankyouverycool
Different thread highlights between widgets lead to different visual weights between splitters, even when they have the same width or height. This means some splitters look best at odd sizes while others even. This sets the default spacing to the most commonly used, depending on orientation, and adjusts spacing for a few apps based on the new paint rect. The most consistent look across apps requires some manual tweaking occassionally. Knurlheads, use your discretion!
2022-02-23LibGUI+Apps: Prevent Splitter children from being unresizablethankyouverycool
Splitters could be resized in such an order that all their remaining children were fixed size, leading to unfillable gaps on resize events. HackStudio and TextEditor already had logic to handle this edge case, so this patch factors it into a general solution for all Splitters. At least one widget is now guaranteed to be resizeable after a child is removed.
2022-02-23LibGUI+Apps: Let Splitters select which resizee to set fixedthankyouverycool
This gives Splitters more versatility when the right resizee is intended to remain fixed or be toggled on and off.
2022-02-23LibGUI: Adjust grabbable rect between Splitter widgetsthankyouverycool
Previously, the rect began on the edge of the first widget instead of immediately after, causing an overpaint visible on hover.
2022-02-23LibTLS: Add signature verification for DHE and ECDHE key exchangeMichiel Visser
This will verify that the signature of the ephemeral key used in the DHE and ECDHE key exchanges is actually generated by the server. This verification is done using the first certificate provided by the server, however the validity of this certificate is not checked here. Instead this code expects the validity to be checked earlier by `TLSv12::handle_certificate`.
2022-02-23LibCrypto: Add EMSA-PKCS1-V1_5 encoder and verificationMichiel Visser
This add an implementation for the EMSA-PKCS1-V1_5-ENCODE function from RFC8017 section 9.2. The verification of this encoding is implemented by simply encoding the message to be verified, and then comparing the two encoded string. The digest info for the different hash function is from RFC8017 section 9.2 notes 1. These byte sequences are actually ASN.1 encoded data, however these are always constant for a specific hash function and can be treated as opaque byte sequences.
2022-02-23LibTLS: ECDHE switch from FeatureNotSupported to NotUnderstood errorMichiel Visser
NotUnderstood will generate a TLS alert with an InternalError instead of crashing the RequestServer.
2022-02-23LibTLS: Add OutOfMemory error that will send an InternalError alertMichiel Visser
2022-02-23Libraries/LibCpp: Add parser test for out-of-line function definitionsItamar
2022-02-23LanguageServers/Cpp: Fix "complete_includes" language server testItamar
Previously the target result was only a partial completion.
2022-02-23LibCpp: Allow qualified names in AST Declaration nodesItamar
Previously, the names of declarations where stored as a simple StringView. Because of that, we couldn't parse out-of-line function definitions, which have qualified names. For example, we couldn't parse the following snippet: ``` void MyClass::foo(){} ``` To fix this, we now store the name of a declaration with a ASTNode::Name node, which represents a qualified named.
2022-02-22LibGL: Set correct matrices in `glFrustum` and `glOrtho`Jelle Raaijmakers
We were erroneously setting the projection matrix when `GL_MODELVIEW` was supplied.
2022-02-22LibGL: Improve `glFrustum` precision and error handlingJelle Raaijmakers
Do not convert to float too early. Additionally, handle some error cases for the input parameters.
2022-02-22LibGL: Clamp color in `glClearColor` to 0..1Jelle Raaijmakers
2022-02-22LibGL: Implement `glClearDepthf` and store as floatJelle Raaijmakers
Our API still specifies it as a double, but internally we communicate a float to the rasterizer. Additionally, clamp the value to 0..1 as described in the spec.
2022-02-22LibGL: Ignore stack on projection and model view matrix retrievalJelle Raaijmakers
Our implementation keeps the top-most item on the matrix stacks in a member variable, so we can always use that instead of considering the actual stack. Additionally, the current matrix mode should not influence retrieving the projection or model view matrix.
2022-02-22LibSoftGPU: Clean up some conditionals in `Device`Jelle Raaijmakers
No functional changes.
2022-02-22LibSoftGPU: Round rasterization position to nearest integerJelle Raaijmakers
This fixes the issue where e.g. `299.97` would be cast to an integer value of `299`, whereas the pixel's center would lie at `299.5` and would then erroneously be excluded.
2022-02-22LibSoftGPU: Apply regular cartesian coordinate systemJelle Raaijmakers
Currently, LibSoftGPU is still OpenGL-minded in that it uses a coordinate system with the origin of `(0, 0)` at the lower-left of textures, buffers and window coordinates. Because we are blitting to a `Gfx::Bitmap` that has the origin at the top-left, we need to flip the Y-coordinates somewhere in the rasterization logic. We used to do this during conversion of NDC-coordinates to window coordinates. This resulted in some incorrect behavior when rasterization did not pass through the vertex transformation logic, e.g. when calling `glDrawPixels`. This changes the coordinate system to OpenGL's throughout, only to blit the final color buffer upside down to the target bitmap. This fixes drawing to the depth buffer directly resulting in upside down images.
2022-02-22LibGL: East-const two methods in `Texture2D`Jelle Raaijmakers
No functional changes.
2022-02-22LibGL+LibSoftGPU: Use more expressive `is_power_of_two`Jelle Raaijmakers
2022-02-22LibSoftGPU: Rename `rgba` to `bgra` to reflect actual valueJelle Raaijmakers