Commit graph

750 commits

Author SHA1 Message Date
roytam1
9175504ffc Merge remote-tracking branch 'origin/tracking' into custom 2025-07-04 22:28:17 +08:00
Andy
4cc014cb6b Unprefix -moz-read-write / -moz-read-only 2025-07-04 22:27:22 +08:00
roytam1
5cb41937fb Merge remote-tracking branch 'origin/tracking' into custom 2025-06-29 00:15:50 +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
roytam1
f4d2bf6c3d Merge remote-tracking branch 'origin/tracking' into custom 2025-06-27 23:33:55 +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
roytam1
6414271c91 Merge remote-tracking branch 'origin/tracking' into custom 2025-06-17 09:32:50 +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
roytam1
e72f8a3a81 Merge remote-tracking branch 'origin/tracking' into custom 2025-05-14 14:36:05 +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
roytam1
6792dc4b66 Merge remote-tracking branch 'origin/tracking' into custom 2025-04-30 23:06:47 +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
roytam1
b86d97747f Merge remote-tracking branch 'origin/tracking' into custom 2025-04-03 09:50:55 +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
roytam1
e43876ec84 Merge remote-tracking branch 'origin/tracking' into custom 2025-02-19 07:12:26 +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
roytam1
97534886ae import from mozilla: Bug 1591366 - Always reserve 64 bits for frame property value r=dholbert (19499821190) 2025-02-19 01:15:45 +08:00
roytam1
6073fac18f Merge remote-tracking branch 'origin/tracking' into custom 2025-02-19 01:14:59 +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
roytam1
594a360cbf Revert "Issue #2693 - Don't reflow children if they have 0 width."
This reverts commit cb233feea0.
2025-02-18 20:18:13 +08:00
roytam1
d4f1c1faed Merge remote-tracking branch 'origin/tracking' into custom 2025-02-18 19:13:36 +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
roytam1
d7396f6886 import from mozilla: Bug 1350925 part 2 - Assert that we're given clean ReflowOutput overflow areas in ReflowChild. rs=dholbert a=gchang (5763b4d39e4) 2025-02-13 21:02:55 +08:00
roytam1
7f4a92ec55 import from mozilla: Bug 1350925 part 1 - Reset the scrolled frame's ReflowOutput overflow areas before re-using it for another child reflow. r=dholbert a=gchang (8c70d11ecd1) 2025-02-13 21:02:15 +08:00
roytam1
bf90272692 Merge remote-tracking branch 'origin/tracking' into custom 2025-01-29 12:26:22 +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
roytam1
789327be17 Merge remote-tracking branch 'origin/tracking' into custom 2025-01-23 09:39:37 +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
Martok
2e3953399a Issue #1765 - Follow-Up: For parsing calc() in non-hue component of hsl/a(), explicitly expect <percentage> values 2025-01-23 09:38:03 +08:00
roytam1
904406a497 Merge remote-tracking branch 'origin/tracking' into custom 2025-01-20 21:13:46 +08:00
Moonchild
147713a6ac Issue #2681 - Expose :modal to content. 2025-01-20 21:12:53 +08:00
Moonchild
d9b107f32f Issue #2681 - unprefix :-moz-modal-dialog
Keep an alias in place like for :fullscreen
2025-01-20 21:12:36 +08:00
Moonchild
139e7a7ac6 Issue #2678 - Remove NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED
This no longer does anything at this point, except add indirection.
2025-01-20 21:12:18 +08:00
Moonchild
33a120eb9f Issue #2678 - Clean up some uses of the table-to-map segue. 2025-01-20 21:08:25 +08:00