After this patch, there are two remaining pieces to fix bug 1700294:
* macOS nsLookAndFeel needs to return the right colors for light / dark
appearance.
* We need to return ColorScheme::Dark for the right documents in
ColorSchemeForDocument.
Both of those should be straight-forward.
Differential Revision: https://phabricator.services.mozilla.com/D110680
When freezing objects, we use a fast path where we didn't set the
HasNonWritableOrAccessorPropExclProto flag.
With the planned shape changes, we will hopefully be able to change this so that
we use a shared code path so that this kind of issue can't happen.
Differential Revision: https://phabricator.services.mozilla.com/D110246
We also cache everywhere whether getting the int/float/color failed, for
example, and do the pref lookup on demand. Seems a bit nicer. We could insert
the pref values on the cache directly on Refresh(), that's another alternative,
but I don't think it matters much either way.
Differential Revision: https://phabricator.services.mozilla.com/D110675
No reason that code needs to be there. The findbar modal highlight stuff is not
being worked on and it was unclear to me why it needed a fission check, so I
removed that special case. The findbar code can customize the colors with
Selection.setColors anyways, which is a better fix.
Depends on D110673
Differential Revision: https://phabricator.services.mozilla.com/D110674
Bug 1646224 made font sizes floats, which caused conversion to nscoord
not happen. Style fonts should never have NaN, but in this case a
massive SVG transform matrix ends up causing a NaN font inflation
factor.
This in turn caused the scaled size to be NaN, and to get stuck on the
font variations array here:
https://searchfox.org/mozilla-central/rev/4fa18c26fa907f38d56b599571b9846af1506f3c/gfx/src/nsFont.cpp#283
That NaN in turn caused the font variations to have a NaN, and font
styles comparing unequal, which prevents the font from getting removed
from the cache, causing the issue.
This should prevent it, but I have a more in-depth patch incoming.
Differential Revision: https://phabricator.services.mozilla.com/D110518
This shouldn't change behavior, but is the biggest cross-platform part
of the change so I'd like to get it landed sooner rather than later.
The two calls like:
GetColor(ColorID::TextSelectBackground, color);
if (color == 0x000000) {
mColorTextSelectForeground = NS_RGB(0xff, 0xff, 0xff);
} else {
mColorTextSelectForeground = NS_DONT_CHANGE_COLOR;
}
that I'm removing are just broken. They were calling the version of
GetColor the function that took a default value when the color wasn't
available, not the version of the color with the outparam.
To prevent such mistakes, add two signatures, GetColor(), returning a
Maybe<nscolor> and Color(), returning a color with a fallback.
Differential Revision: https://phabricator.services.mozilla.com/D110651
I noticed we weren't doing this when looking at bug 1701910.
We remove support for auto style outlines in trees, which is unused
(checked that thunderbird and FF trees don't use outline: auto) and for
some mathml debugging code, which seems ok.
Differential Revision: https://phabricator.services.mozilla.com/D110399
The object flags are only relevant for the last property's shape. Comparing them
to the flags stored in the property's shape could result in doing unnecessary work
in certain (actually redundant) cases.
Differential Revision: https://phabricator.services.mozilla.com/D110222
Automatic update from web-platform-tests
Revert "Relax constraints on scroll snapping for snap-type both."
This reverts commit 9f51ed46d53717149e7496dbd7baf0eb372c046a.
Reason for revert:
Findit (https://goo.gl/kROfz5) identified CL at revision 868394 as the
culprit for failures in the build cycles as shown on:
https://analysis.chromium.org/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtLzlmNTFlZDQ2ZDUzNzE3MTQ5ZTc0OTZkYmQ3YmFmMGViMzcyYzA0NmEM
Original change's description:
> Relax constraints on scroll snapping for snap-type both.
>
> Our scroll snapping logic confined the snap position to be within
> the visible snapport if snapping in both the x and y direction; however,
> snaps are allowed to be outside the "snapport's search corridor" as long
> as they are not too far outside (left to the user agent to determine
> what constitutes "too far"). The relaxed rules are not applied if
> snapping in one direction only, or if scroll-snap-stop is set to
> 'always'.
>
> In addressing the issue, two other tests required tweaking since they
> had no allowance for a 2D snap outside the visible snapport either
> implicitly (nested-scrollIntoView-snaps.html) or explicitly
> (scroll_snap_data_unittest.cc).
>
> Bug: 626703
> Change-Id: I3646ccc271d88e06f3e6655009e32ff2a9e08931
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2785142
> Reviewed-by: Robert Flack <flackr@chromium.org>
> Commit-Queue: Kevin Ellis <kevers@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#868394}
Bug: 626703
Change-Id: I760ad79c204f0f3dc7d73a5fd721b1bf91a2d827
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2798148
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Noel Gordon <noel@chromium.org>
Auto-Submit: Noel Gordon <noel@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#868436}
--
wpt-commits: e935bcf851a8ddfb1eca97adba3acbb8ec7533f2
wpt-pr: 28331
Automatic update from web-platform-tests
font-stretch should use keywords for computed style when possible (#28315)
--
wpt-commits: ce48db7b9b8a858a4bc17c3b793b1dfd0e02008c
wpt-pr: 28315
Automatic update from web-platform-tests
Implement invert and negate exp.node creation and type check in CSSScale
For the current implementation, the CSS Typed OM could occur null
pointer access when building CSSMathExpressionNode.
Because in the middle of ToCalcExpressionNode() recursion, nullptr is
accessed instead of propagation.
Also, The CSSScale's constructor didn't check the type properly for
the expression. This possibly might be needed another typed om.
Therefore, implement TODOs for building CSSMathExpressionNode tree
and add condition in IsValidScaleCoord() to check resolved type is
the number for CSSMathExpressionNode tree.
Bug: 1188610
Change-Id: If6bf70b791b72c7ed67465f898130e098f68e853
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2788308
Commit-Queue: Seokho Song <0xdevssh@gmail.com>
Reviewed-by: Mason Freed <masonf@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#868415}
--
wpt-commits: 90166f709d096e77e7cf1279cc3b13a5ddf0cd87
wpt-pr: 28273
Automatic update from web-platform-tests
Relax constraints on scroll snapping for snap-type both.
Our scroll snapping logic confined the snap position to be within
the visible snapport if snapping in both the x and y direction; however,
snaps are allowed to be outside the "snapport's search corridor" as long
as they are not too far outside (left to the user agent to determine
what constitutes "too far"). The relaxed rules are not applied if
snapping in one direction only, or if scroll-snap-stop is set to
'always'.
In addressing the issue, two other tests required tweaking since they
had no allowance for a 2D snap outside the visible snapport either
implicitly (nested-scrollIntoView-snaps.html) or explicitly
(scroll_snap_data_unittest.cc).
Bug: 626703
Change-Id: I3646ccc271d88e06f3e6655009e32ff2a9e08931
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2785142
Reviewed-by: Robert Flack <flackr@chromium.org>
Commit-Queue: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#868394}
--
wpt-commits: b2265405e53c82dadf2fa56128108d9971fb7b43
wpt-pr: 28240
Automatic update from web-platform-tests
Fix typo in css/css-transforms/transform-origin-01-ref.html
This test had a typo in the reference file which resulted in it failing.
Bug: 1175179
Change-Id: Ieb529cfc91021c18df9d76775dac8bb86429919b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2797725
Auto-Submit: Philip Rogers <pdr@chromium.org>
Reviewed-by: Olga Gerchikov <gerchiko@microsoft.com>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#868327}
--
wpt-commits: 6cc4f9451df3730633c4718d964309510da4c9c3
wpt-pr: 28326