summaryrefslogtreecommitdiff
path: root/Userland/Libraries
AgeCommit message (Collapse)Author
2021-08-18LibGL: Improve texture sampling performanceStephan Unverwerth
GL_NEAREST: Remove unnecessary modulo. UV is always in range due to wrapping. GL_LINEAR: Rewrite filter equation to save a few math operations.
2021-08-18LibGL: Return white texel when sampling uninitialized textureStephan Unverwerth
2021-08-18LibGL: Complete glGetString implementationStephan Unverwerth
GL_VERSION: The spec mandates the following format: x.y or x.y.z optionally followed by text separated by space. GL_EXTENSIONS: Return empty string. We do not support any extensions.
2021-08-18LibGL: Implement glDepthFuncStephan Unverwerth
2021-08-18LibGL: Implement glDepthRangeStephan Unverwerth
2021-08-18LibGL: Fix incorrect blend factor setupStephan Unverwerth
2021-08-18LibGL: Allow glTexImage2D to create uninitialized texturesStephan Unverwerth
When passing a nullptr as the pixel array LibGL now allocates texture memory but does not initialize the texture contents.
2021-08-18LibGL: Fix interpretation of BGRA byte orderStephan Unverwerth
This fixes byte order interpretation in several places.
2021-08-18LibGL: Fix glVertexPointer argument validationStephan Unverwerth
2021-08-18LibGL: Fix glTexCoord behaviourStephan Unverwerth
glTexCoord should behave like glColor. It only updates a gl context variable that contains the current texture coordinates. The vertex is only actually created once glVertex is called.
2021-08-18LibGL+3DFileViewer: Make glRotatef accept degrees, not radiansStephan Unverwerth
This is in accordance with the GL spec. Also adjust rotation values in 3DFileViewer to take the new units into account.
2021-08-18LibCore: Implement preserve flag for file/directory copyJean-Baptiste Boric
2021-08-18LibJS: Update some Temporal spec section numbersLinus Groh
These shifted due to the addition of the ParseTemporalRelativeToString AO in https://github.com/tc39/proposal-temporal/commit/ad06578.
2021-08-18LibAudio: Resample FLAC audio datakleines Filmröllchen
FlacLoader initialized, but never used its resampler; this is now fixed and all subframes are resampled before decorrelation occurs. FLAC files with non-44100-Hz sample rates now play properly.
2021-08-18LibAudio: Resample with integer ratios instead of floatskleines Filmröllchen
Floating-point ratios are inherently imprecise, and can lead to unpredictable or nondeterministic behavior when resampling and expecting a certain number of resulting samples. Therefore, the resampler now uses integer ratios, with almost identical but fully predictable behavior. This also introduces the reset() function that the FLAC loader will use in the future.
2021-08-18Meta+LibC: Don't allow text relocations in SerenityOS librariesDaniel Bertalan
The `-z,text` linker flag causes the linker to reject shared libraries and PIE executables that have textrels. Our code mostly did not use these except in one place in LibC, which is changed in this commit. This makes GNU ld match LLD's behavior, which has this option enabled by default. TEXTRELs pose a security risk, as performing these relocations require executable pages to be written to by the dynamic linker. This can significantly weaken W^X hardening mitigations. Note that after this change, TEXTRELs can still be used in ports, as the dynamic loader code is not changed. There are also uses of it in the kernel, removing which are outside the scope of this PR. To allow those, `-z,notext` is added.
2021-08-18LibWeb: Add fast_is<Layout::InitialContainingBlockBox>Andreas Kling
This is used by Layout::Node::containing_block() which is fairly hot.
2021-08-18LibGfx: Make FastBoxBlurFilter go fasterAndreas Kling
When entering FastBoxBlurFilter::apply_single_pass(), we VERIFY that the bitmap format is BGRA8888. This invariant allows us to use get_pixel<BGRA8888>() instead of the generic get_pixel() throughout the function. This removes a lot of branches and makes the filter significantly faster. :^)
2021-08-18LibGfx: Remove ancient unused NO_FPU macrosAndreas Kling
2021-08-18LibGUI+Browser: Add UrlBox classRob Ryan
This allows the address bar to "select all" when initially gaining focus as Firefox and Chrome do. A future improvement on this would be for the Widget class to mange and provide focus transition as part of the events instead of the UrlBox class. Currently focus is updated before the event is provided to the UrlBox class.
2021-08-18LibGUI: Allow widgets to make themselves non-auto-focusableRob Ryan
This patchs adds a way for widgets exclude themselves from being a focus candidate in Window::focus_a_widget_if_possible(). This is to allow the URL box to not get auto-focused when the browser is loaded.
2021-08-18LibC: Fix sigsetjmp and siglongjmpJean-Baptiste Boric
2021-08-18LibC: Expose sig_sysname arrayJean-Baptiste Boric
2021-08-18LibC: Move SIG_* definitions for sigprocmask into bits/sighow.hJean-Baptiste Boric
2021-08-18LibWeb: Fix check for too many 'normal' values in font declarationSam Atkins
I had the values backwards, oops!
2021-08-18LibWeb: Implement font-fallbackSam Atkins
If the font-family property is set to a StyleValueList, we now iterate through it, looking up each font in turn until one is found. StyleResolver no longer needs to handle FontFamily specifically, which is a nice bonus. Serenity's current dependence on bitmap fonts leads to some weirdness here - for example, the `if (!found_font)` path can trigger even if a generic font family like "sans-serif" is used, since our default sans-serif font might not be available in the desired size or weight. The `monospace` variable only exists for that reason. This is not a complete solution, by a long way! Serenity's font support is still quite basic, so more work needs to be done there before we can start implementing the spec's font-matching algorithm. But this is still an improvement. :^)
2021-08-18LibWeb: Handle numeric font-weightsSam Atkins
The code was assuming the font-weight would be a Length, apparently since NumericStyleValue didn't exist at the time. Now, it's always a numeric value, so treat it as such. We also replace the hardcoded numbers with references to the FontWeight enum. Also, it was always setting the weight to 900, so that has been fixed.
2021-08-18LibWeb: Calculate font-size in NodeWidthStyle::apply_style()Sam Atkins
Previously, this made the same "everything is px" assumption as in `StyleProperties::load_font()`, so I've replaced it with the calculation from there.
2021-08-18LibWeb: Handle non-px font sizesSam Atkins
The previous code assumed all font sizes were in px, but now we perform the conversion. There is an existing bug with em sizes returning 0, which seems to affect other places too - see `NodeWithStyle::apply_style()`. This also implements 'larger', 'smaller' and calc() font-sizes.
2021-08-18LibGfx: Mark Typeface::get_font() const, because it is constSam Atkins
2021-08-18Userland+LibGUI: Add shorthand versions of the Margins constructorsin-ack
This allows for typing [8] instead of [8, 8, 8, 8] to specify the same margin on all edges, for example. The constructors follow CSS' style of specifying margins. The added constructors are: - Margins(int all): Sets the same margin on all edges. - Margins(int vertical, int horizontal): Sets the first argument to top and bottom margins, and the second argument to left and right margins. - Margins(int top, int vertical, int bottom): Sets the first argument to the top margin, the second argument to the left and right margins, and the third argument to the bottom margin.
2021-08-18Userland+LibGUI: Make Margins arguments match CSS orderingsin-ack
Previously the argument order for Margins was (left, top, right, bottom). To make it more familiar and closer to how CSS does it, the argument order is now (top, right, bottom, left).
2021-08-18LibRegex: Ensure the GoBack operation decrements the code unit indexTimothy Flynn
This was missed in commit 27d555bab0d84913599cea3c4a6b0a0ed2a15b66.
2021-08-18LibRegex: In non-Unicode mode, parse \u{4} as a repetition patternTimothy Flynn
2021-08-18LibGL: Implement `glGetIntegerv`Jesse Buhagiar
2021-08-18LibGL: Implenent `glGetBooleanv`Jesse Buhagiar
2021-08-17LibJS/Tests: Add Temporal.Calendar.from() tests for more object typesLinus Groh
2021-08-17LibJS: Reflect Record wording editorial change in the Temporal specLinus Groh
See: https://github.com/tc39/proposal-temporal/commit/c8f14d0
2021-08-17LibJS: Add PlainDateTime fast path to various Calendar.prototype gettersLinus Groh
This is a recent editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/c3880a3
2021-08-17LibJS: Add and use newly introduced ToIntegerThrowOnInfinity Temporal AOLinus Groh
See: https://github.com/tc39/proposal-temporal/commit/2ed58f4
2021-08-17LibJS: Implement Temporal.Calendar.prototype.mergeFields()Linus Groh
2021-08-17Kernel+Userland: Remove global futexesAndreas Kling
We only ever use private futexes, so it doesn't make sense to carry around all the complexity required for global (cross-process) futexes.
2021-08-16LibJS: Correctly handle Unicode characters in JS source textdavidot
Also recognize additional white space characters.
2021-08-16LibJS: Disallow standalone super expressiondavidot
2021-08-16LibJS: Handle '++' and '--' more correctly within expressiondavidot
2021-08-16LibJS: Check that 'let' is followed by declaration before matching itdavidot
Since 'let' is a valid variable name (in non-strict mode) let may not be the start of a declaration but just an identifier.
2021-08-16LibJS: Add optional extra strict checks in parse_binding_patterndavidot
2021-08-16LibJS: Tighten default values in formal parameter parsingdavidot
Disallow default parameter for rest parameters. Disallow yield expressions as default values.
2021-08-16LibJS: Allow yielding a classdavidot
2021-08-16LibJS: Treat yield as an identifier in more non-generator contextsdavidot
And disallow some cases where we are in a generator context.