Commit graph

631 commits

Author SHA1 Message Date
erixreyes
c3590da576 Issue #2780: Add back the mismatch overflow handling in nsRuleNode.cpp 2025-07-08 10:01:35 +08:00
Andy
b11affbdf3 Issue #2106 - Clean-up: Un-prefix -moz-user-select in Comments 2025-07-08 10:01:21 +08:00
Andy
f1815317c3 Issue #2106 - Follow-up: Additional contain Keyword Entries 2025-07-08 10:00:47 +08:00
Andy
abb891ff26 Issue #2106 - Follow-up: Un-prefix DOM Attribute MozUserSelect 2025-07-08 10:00:32 +08:00
Andy
1a5b3dcae6 Issue #2106 - Follow-up: Additional Un-prefixing 2025-07-08 10:00:02 +08:00
MeladJM
dae72b452c Issue #2124/2662: Cleaning of code 2025-07-07 11:58:54 +08:00
erixreyes
7626c99ceb Issue #2124/2662: Optimize overflow shorthand parsing and serialization 2025-07-07 11:58:35 +08:00
erixreyes
7c52fd934f Issue #2662 - Implement axis-shorthand parsing 2025-07-07 11:58:15 +08:00
erixreyes
f4ffb1ec16 Issue #2124 - Adjust overflow parser to handle two values 2025-07-07 11:57:59 +08:00
erixreyes
9f7430f8b9 No Issue - Add detection for medium in border shorthand 2025-07-07 11:57:28 +08:00
Jerico
e6b48fcc95 Issue #2106 - Part 3: Add 'contain' as user-select value, retain 'element' 2025-07-07 11:56:37 +08:00
Francis Dominic Fajardo
5346e55655 Issue #2045 - Part 9: Include the revert keyword in the list of accepted values for CSS properties returned by inDOMUtils 2025-07-07 11:56:06 +08:00
Francis Dominic Fajardo
a47f44e93d Issue #2045 - Part 8: Remap revert keyword values to a higher cascade level 2025-07-07 11:55:40 +08:00
Francis Dominic Fajardo
166e98d2b9 Issue #2045 - Part 7: Override revert values during presentation hint cascade 2025-07-07 11:55:24 +08:00
Francis Dominic Fajardo
c4b6135c99 Issue #2045 - Part 6: Treat "revert" values as the same as "unset" when encountered in the rule node 2025-07-07 11:21:14 +08:00
Francis Dominic Fajardo
801d4a2db8 Issue #2045 - Part 5: Serialize shorthands using "revert" like those containing "unset" 2025-07-07 11:20:56 +08:00
Francis Dominic Fajardo
9105c58a30 Issue #2045 - Part 4: Parse "revert" in property values wherever "unset" is allowed 2025-07-07 11:20:42 +08:00
Francis Dominic Fajardo
b0f0972314 Issue #2045 - Part 3: Implement cascade origin tracking to CSS parser
The CSS parser already knows the cascade origin, but it is using a different enum for storing it.
2025-07-07 11:20:23 +08:00
Francis Dominic Fajardo
7f3f90eed4 Issue #2045 - Part 2: Add handling and storage for the revert unit and value 2025-07-07 11:20:09 +08:00
Francis Dominic Fajardo
dd2cf17d30 Issue #2045 - Part 1: Revert "Temporarily force hidden elements to be actually hidden."
This reverts commit 1692fa52914012b051484c51caaed8e227334558.
2025-07-07 11:19:51 +08:00
Francis Dominic Fajardo
552cb8dbcc No issue - Fix mixing of tabs with space-indented code. 2025-07-07 11:19:34 +08:00
Jerico
cc55a380f6 Issue #2106 - Part 1: Un-prefix -moz-user-select 2025-07-07 11:18:59 +08:00
Andy
4cc014cb6b Unprefix -moz-read-write / -moz-read-only 2025-07-04 22:27:22 +08:00
Francis Dominic Fajardo
e4630ce481 Issue #2765 - Follow-up: Avoid declaring RefPtr in the return statement 2025-06-29 00:15:21 +08:00
Francis Dominic Fajardo
6e358f1039 Issue #2765 - Follow-up: Fix UAF when returning the non-NAC style context from a frameless node 2025-06-29 00:15:02 +08:00
Francis Dominic Fajardo
d14972602f Issue #2764 - Fix several properties to return NeutralChange hint
This excludes the removal of the mBorderImageOutset change condition from triggering a repaint which doesn't make sense.
2025-06-27 23:33:27 +08:00
Francis Dominic Fajardo
2c704d1b8e No issue - Refactor nsStyleUIReset::CalcDifference to accumulate change hints
This was patched in m-c via an unrelated bug (bug 1370034).

Noted by dbaron in this comment: https://bugzilla.mozilla.org/show_bug.cgi?id=1370034#c69
2025-06-27 23:33:07 +08:00
Francis Dominic Fajardo
3ba0b10bb4 Issue #2765 - Part 3: Make scrollbar width checks use the originating non-NAC style context 2025-06-27 23:32:50 +08:00
Francis Dominic Fajardo
b2c435a189 Issue #2765 - Part 2: Create a helper function for resolving the non-NAC style context of a given NAC 2025-06-27 23:31:57 +08:00
Francis Dominic Fajardo
8236eec152 Issue #2765 - Part 1: Scrollbar width should be treated as a non-inherited property
Note: non-inherited properties are stored in "reset" style structs.

Previous implementation treats it as an inherited property, which
doesn't match the spec.

This also fixes the incorrect behavior when using the `unset` value
for this property by specifying SETVAL_UNSET_INITIAL in the mask.
2025-06-27 23:31:38 +08:00
Moonchild
5e12078904 [Layout] Hold stronger references to FontFaces. 2025-06-27 23:30:45 +08:00
Francis Dominic Fajardo
c91730dc7b Issue #2488 - Follow-up: Ensure container is initialized for cloned declaration blocks 2025-06-27 23:29:32 +08:00
Moonchild
321b75a391 Issue #2751 - Use rounded interpolation value when interpolating the Integer type and Font stretch type, per spec.
Resolves #2751
2025-06-17 09:26:23 +08:00
Moonchild
c3f1c0cdba Issue #2721 - Remove nsILinkHandler.
This interface inly has a single implementation behind it, which is also
only used in 2 places after the previous commit. That's a lot of
additional complexity and compiler indirection for no good reason.
This change removes the interface and uses direct nsDocShell::Cast calls
instead of going through the interface in the few places left now that
we no longer build on a presentation context for links.
2025-06-17 09:25:00 +08:00
Moonchild
37de431ac0 Issue #2721 - Create special case exception for <A>.Click() outside of DOM
This removes the requirement for there to be a non-null PresShell to
dispatch `Click()` events on `<A>` elements (only), since the exception
to the rule has propagated to the spec.

With these changes it should now be possible do create an anchor and
`Click()` on it from JS without actually first attaching it to the DOM
of the presented document, as abused by scripted downloads in pages
(instead of using the A attribute to custom-name downloads).
2025-06-17 09:24:44 +08:00
Moonchild
60ad5b2ffd Issue #2736 - Part 12: Re-work style <link> href attribute.
Use subject principal as triggering principal in style <link> "href"
attribute.
2025-05-14 14:33:26 +08:00
Moonchild
9ad680cfc4 Issue #2736 - Part 1: Provide more consistent principals to CSP.
We're currently fairly vague and inconsistent about the values we provide to
content policy implementations for requestOrigin and requestPrincipal. In some
cases they're the triggering principal, sometimes the loading principal,
sometimes the channel principal.

Our existing content policy implementations which require or expect a
loading principal currently retrieve it from the context node.
Since no current callers require the principal to be the loading
principal, and some already expect it to be the triggering principal
(which there's currently no other way to retrieve), a choice was made
to pass the triggering principal whenever possible, but use the loading
principal to determine the origin URL.
2025-05-14 14:21:46 +08:00
Moonchild
fd4a224d1d Issue #2737 - Part 1: Base implementation of SVGGeometryElement.
Mostly mechanical changes to generalize path geometry for all SVG draw
elements. No user-exposed changes.
2025-04-30 23:02:16 +08:00
Moonchild
8ae2b45691 Issue #2732 - Part 3: Explicitly search for <area> only.
Relying on the implicit conversion by `::FromContent` doesn't work for
us because we inherit that from `nsGenericHTMLElement` and isn't specific
to `HTMLAreaElement`, so it would accept other elements.

This also updates the Attribute changed event handler to exclude `<a>`
elements and cleans up an unused variable from the old code.
2025-04-30 23:00:35 +08:00
Moonchild
8a21d95ea3 No issue - restore nullptr-check 2025-04-30 23:00:04 +08:00
Moonchild
8db40dbbb5 No Issue - Modernize nsImageFrame/nsImageMap
Primarily flow control improvements, and removing unused `nsresults`.
2025-04-30 22:59:45 +08:00
Moonchild
9f64d0f4b0 Issue #2732 - Part 2: Stop accepting <a> as a valid image map <area>
This was part of the HTML4 standard but only ever implemented by Mozilla
and removed again in HTML5 due to lack of adoption. Retaining this could
cause web compat issues and unspecified behavior in the layout engine.
2025-04-30 22:59:26 +08:00
Moonchild
2ef82632d4 Issue #2732 - Part 1: Rename mContainsBlockContents to mConsiderWholeSubtree
It is more descriptive of what it actually does.
2025-04-30 22:59:06 +08:00
Moonchild
80b30a8177 Issue #2720 - Implement two-location color stop logic.
This allows for two-location color stops (`color x% y%`) which is shorthand
for `color x%, color y%` where both colors are equal. (pct/length accepted)
See code comment for the reason it's implemented the way it is.

Resolves #2720
2025-04-03 09:44:51 +08:00
Moonchild
cc8e336172 [layout] Always reserve 64 bits for frame property value
This ensures frame property values can always be stored even in edge cases
on 32-bit machines (where a void ptr is half the width).
2025-02-19 07:10:18 +08:00
Moonchild
25570dc572 Issue #2694 - Improve nested grid layout performance by caching.
This improves performance by caching the grid items' block axis
measurement, avoiding potentially exponential calculations and reflows.
Resolves #2694
2025-02-19 00:34:42 +08:00
Moonchild
2da039daac Revert "Issue #2693 - Don't reflow children if they have 0 width."
This reverts commit 61a19f00f72598510ca8991a0831c82a09faa7be.
2025-02-19 00:34:27 +08:00
Moonchild
cb233feea0 Issue #2693 - Don't reflow children if they have 0 width.
This seems to be the main reason for the reflow storm.
2025-02-18 19:11:56 +08:00
Moonchild
0849deeacf Issue #2688 - Don't apply auto min-sizing when flex max-sizing.
A grid item spanning multiple grid rows/columns which include a flexible
track should not participate in the auto min-sizing calculation.

Resolves #2688
2025-01-29 12:24:07 +08:00
Martok
77728935ef Issue #2078 - Follow-up: Don't try to resolve ancestor link elements when matching for Has*DependentStyle 2025-01-23 09:38:58 +08:00