summaryrefslogtreecommitdiff
path: root/Userland/Libraries
AgeCommit message (Collapse)Author
2022-03-03LibSoftGPU: Add mipmap selection to sampler classStephan Unverwerth
2022-03-03LibSoftGPU: Add log2_approximate()Stephan Unverwerth
2022-03-03LibSoftGPU: Add ddx() and ddy() to calculate partial derivativesStephan Unverwerth
2022-03-03LibGL: Fix interpretation of mipmap filtering modesStephan Unverwerth
GL_LINEAR_MIPMAP_NEAREST means choose nearest mipmap level, interpolate texels linearly. GL_NEAREST_MIPMAP_LINEAR means choose the two closest mipmap levels, sample the texels unfiltered and linearly interpolate based on the fractional value of the mipmap level. Previously we had this backwards.
2022-03-03LibWeb: Update element style when focus state changesAndreas Kling
To ensure that :focus rules get included (or excluded), we have to update style whenever focus moves.
2022-03-03LibWeb: Remove bogus line box width adjustmentAndreas Kling
This basically reverts 95715f0c8f066b2bb43b9dbb4dec993bb627fd9f, as it was totally wrong for text-align:center and text-align:right.
2022-03-03LibWeb: Align actual baselines, not just bottomsAndreas Kling
Until now, we've been treating the bottom of every line box fragment as its baseline, and just aligning all the bottoms to the bottom of the line box. That gave decent results in many cases, but was not correct. This patch starts moving towards actual baseline calculations as specified by CSS2. Note that once layout is finished with a line box, we also store the baseline of the line box in LineBox::m_baseline. This allows us to align the real baseline of display:inline-block elements with other inline content on the same line.
2022-03-03LibWeb: Consider all children when doing height:auto for normal blocksAndreas Kling
Only measuring from the top to the last in-flow block was not giving us enough height in many cases.
2022-03-03LibWeb: Small improvements to layout tree dumpsAndreas Kling
- Say "content-size" instead of just "size" to clarify which size it is - Show box model metrics by default
2022-03-02LibGfx: Don't paint the window frame larger for the border-radiusMacDue
Previously with a border radius you would get a "ghost" window frame which was not really there, and would not respond to clicks/attempts to resize.
2022-03-02LibWeb: Send Origin on WebSocket connectionMichiel Visser
Some services using WebSockets require that the request contains the Origin header, otherwise these services will return a 403 Forbidden response. WebSocketServer already supports sending the Origin header, however LibWeb did not send the origin with the IPC request.
2022-03-02LibGUI: Support hierarchical matches in FilterProxyModelthankyouverycool
Fixes crash when searching in Help. Patch by @eggpi
2022-03-02LibJS: Implement and test ArrayBuffer.prototype.resizeForLoveOfCats
2022-03-02LibJS: Implement and test getters added by resizable ArrayBufferForLoveOfCats
2022-03-02LibJS: Construct ArrayBuffer with max byte length when providedForLoveOfCats
2022-03-02LibJS: Accept ArrayBuffer constructor options argumentForLoveOfCats
Test262 seems to test the changes in the "Resizable ArrayBuffer and growable SharedArrayBuffer" proposal. Begin implementing this proposal by accepting the new options object argument to the ArrayBuffer constructor. https://tc39.es/proposal-resizablearraybuffer https://github.com/tc39/test262/blob/main/test/built-ins/ArrayBuffer/options-maxbytelength-diminuitive.js
2022-03-02LibCore: Add wrapper for posix_openpt(), grantpt() and unlockpt()Lucas CHOLLET
2022-03-02LibCore+LibC: Add wrapper for setenvLucas CHOLLET
I also added a common interface with StringView compatible parameters: int serenity_setenv(const char*, ssize_t, const char*, ssize_t, int) This function is called by both C and C++ API for setenv().
2022-03-02LibCore: Add tcsetpgrp(int, pid_t) wrapperLucas CHOLLET
2022-03-02LibCore: Add killpg() wrapperLucas CHOLLET
2022-03-02LibWeb: Streamline Node::enclosing_link_element() somewhatAndreas Kling
No need to verify_cast repeatedly once we've confirmed the type.
2022-03-02LibWeb: Add fast_is<T> for HTML::HTMLAnchorElementAndreas Kling
We were spending 20% of style computation time on the HTML spec on deciding whether DOM nodes were HTML anchor (a) tags or not.
2022-03-02LibWeb: Don't skip position:relative elements in inline-level layoutAndreas Kling
InlineLevelIterator was wrongly skipping over all positioned elements, instead of just the absolutely positioned ones.
2022-03-02LibWeb: Correct handling of negative step values in nth-foo() selectorsSam Atkins
This should be 1% on Acid3. :^) Added the `-5n+3` case to all `nth-of-whatever()` selector test pages, so we can easily check that it works.
2022-03-02LibWeb: Fix issue where double-quoted doctype system ID was not capturedAndreas Kling
We were storing double-quoted system ID's in the public ID field. 1% progression on ACID3. :^)
2022-03-02LibC: Increase alignment for malloc() BigAllocationBlocks to 16 bytesPeter Ross
commit 5f3773b7150cbf113b5a0aabfe2b2670dc758d38 increased alignment for ChunckedBlocks, but not for BigAllocationBlocks. This is required to make SSE instructions work.
2022-03-02LibC: Replace [[gnu::aligned(16)]] with C++ standard alignas(16)Peter Ross
2022-03-02LibC: Set PRI[xX]8/PRI[xX]16 macros to `x` and `X`Peter Ross
Described in: <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/ inttypes.h.html> The macros were first added in a7a456002e91d9f13793e23aab4c24519c4e87c7, but it is not clear why the PRIx16/32 macros were defined as 'b' & 'w'. PrintfImplementation was never able to parse these values.
2022-03-02LibC: Add TCP_MAXSEG to tcp.hPeter Ross
This is an unimplemented setsockopt. Defining it is sufficient to build FFmpeg with networking.
2022-03-02LibC: Add IN_MULTICAST to in.hPeter Ross
2022-03-02LibWeb: Support (and validate) prefixes in Document.createElementNS()Andreas Kling
1% progression on ACID3. :^)
2022-03-02LibWeb: Fix logic error in Document::validate_qualified_name()Andreas Kling
We were mixing up the "name character" and "name start character" validation checks. Also, we were not checking the first character after a colon against the "name start character" set.
2022-03-02LibWeb: Fix bogus result from "validate and extract" DOM operationAndreas Kling
We were returning a QualifiedName with the localName and namespace fields swapped.
2022-03-02LibWeb: Support DOMImplementation.createDocument() doctype parameterAndreas Kling
1% progression on ACID3. :^)
2022-03-02LibJS: Fix rounding issues in Number.toFixedBen Abraham
toFixed was not rounding properly when trimming a number. ie: (0.00006).toFixed(4) should be "0.00001" but was returning "0.0000"
2022-03-01LibWeb: Handle height:auto separately for BFC root vs other block boxesAndreas Kling
I was wrong in 56df05ae446cd238af7234d004417ad72368b300, there are situations where floating children should not affect the auto height of their parent. It turns out we were using the "height:auto for BFC roots" algorithm for all height:auto blocks. This patch fixes that by splitting it into two separate functions, and implementing most of the two different variants. Note that we don't support vertical margin collapsing here yet. Thanks to Tim for noticing the error! :^)
2022-03-01LibWeb: Implement <button>'s activation behaviourLuke Wilde
This allows us to submit forms from <button> elements and not just <input type="submit"> This allows Discord to progress past the username registration :^)
2022-03-01LibWeb: Associate form elements with a form in parsing and dynamicallyLuke Wilde
This makes it available for all form associated elements and not just select and input elements. It also makes it more spec compliant, especially around the form attribute. The main thing missing is re-associating form elements with a form attribute when the form attribute changes or an element with an ID is inserted/removed or has its ID changed.
2022-03-01LibWeb: Implement HTMLButtonElement.typeLuke Wilde
2022-03-01LibWeb: Add form associated element categoriesLuke Wilde
2022-03-01LibWeb: Move enabled() to FormAssociatedElement and follow the specLuke Wilde
2022-03-01LibWeb: Fix incorrect check in BrowsingContext::is_top_levelLuke Wilde
A top level browsing context is a browsing context with no parent browsing context. However, we considered a top level browsing context to be a browsing context with no associated browsing context container.
2022-03-01LibWeb: Always include floats when computing height:auto for blocksAndreas Kling
I'm not sure why we had two modes for this, but floats should always be included in the auto height AFAICT.
2022-03-01LibWeb: Fix wrong height:auto computation for block with floating childAndreas Kling
If an element with height:auto has any floating descendants whose bottom margin edge is below the element's bottom content edge, then the height is increased to include those edges. Before this patch, we were stopping at the bottom *content* edge of floating descendants.
2022-03-01LibWeb: Add origin property to window objectAlex M
2022-02-28LibC: Define offsetof in stddef.h instead of sys/cdefs.hAndrew Kaster
Just like Dr. POSIX ordered. Move the macro where it belongs, but make sure it's visible to Userland files compiled with -DKERNEL. Parts of LibEDID that are compiled into the Kernel use offsetof to parse the EDID information given to us by hardware.
2022-02-28LibC: Don't export ALWAYS_INLINE from sys/cdefs.hAndrew Kaster
POSIX doesn't tell us to export a macro like this, and it's largely going to never be defined when compiling a serenity-native C++ file, since AK defines it already. This does raise a strange issue where some futex-related helpers in serenity.h are declared with ALWAYS_INLINE. Whether these helpers belong in a C-visible header as file-static methods is questionable, but let's work around the issue but adding some preprocessor magic to make sure these declarations get the behavior they used to have without leaking macros.
2022-02-28LibJS: Spin the event loop until await has completeddavidot
Before this the event loop was spun until the state of the promise was not pending, however it is possible that a promise has already been fulfilled/rejected when awaiting it. This could then lead to a crash below as it would not pump the event loop in such cases. Although this change is in LibJS, it really only impacts any usage of LibJS within a EventLoop environment such as LibWeb. Instead of checking the state of the promise we know check that success has a value which can only happen if either the fulfilled or rejected closure set up by await are called.
2022-02-28LibWeb: Also apply default button styles to <button>, not just <input>Linus Groh
2022-02-28LibC: Add a wrapper for the getrusage syscallLucas CHOLLET