aboutsummaryrefslogtreecommitdiffstats
path: root/components
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | style: Remove TextForeground/Background system colorsEmilio Cobos Álvarez2023-05-311-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Same thing, there's nor reason these should be different from other CSS-exposed colors. Differential Revision: https://phabricator.services.mozilla.com/D129991
| * | | style: Remove WindowBackground/Foreground system colorsEmilio Cobos Álvarez2023-05-311-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no reason for these to be different to the CSS-exposed Window/WindowText. Differential Revision: https://phabricator.services.mozilla.com/D129990
| * | | style: Serialize text-decoration using ServoEmilio Cobos Álvarez2023-05-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code introduced in the preceding patch deals with currentColor correctly, so we should be able to do this now. This uncovers a bug in the existing serialization code when a non-auto text-decoration-thickness was used, caught by css/css-text-decor/parsing/text-decoration-computed.html. Differential Revision: https://phabricator.services.mozilla.com/D130018
| * | | Further changes required by ServoOriol Brufau2023-05-311-1/+1
| | | |
| * | | style: Generalize resolved style code to deal with all shorthandsEmilio Cobos Álvarez2023-05-311-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the various assumptions that the animation code does. Code size might be a concern, we can optimize if it is a problem, but let's do the obvious thing for now. Differential Revision: https://phabricator.services.mozilla.com/D130017
| * | | style: Treat empty root margin as zero as per specEmilio Cobos Álvarez2023-05-311-0/+5
| | | | | | | | | | | | | | | | Differential Revision: https://phabricator.services.mozilla.com/D130131
| * | | style: Make autofill background configurable via system color prefsEmilio Cobos Álvarez2023-05-311-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And remove the autofill.background pref for 95 (or 96, depending on when this lands) assuming nothing terrible causes us to turn it off on 94. Differential Revision: https://phabricator.services.mozilla.com/D129988
| * | | Further changes required by ServoOriol Brufau2023-05-311-3/+3
| | | |
| * | | style: Make Canvas/CanvasText and Link colors color-scheme-awareEmilio Cobos Álvarez2023-05-313-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For that, add `.dark` version of the browser.display* prefs that control the light version of these colors. The default for background/foreground colors are taken from the GenericDarkColors used in LookAndFeel. The defaults for links are based on this discussion: https://github.com/whatwg/html/issues/5426#issuecomment-904021675 (So they effectively match Chrome). Whether the dark colors should be exposed in about:preferences (like the light colors are) is TBD. With this patch, we pass all the tests in: /html/semantics/document-metadata/the-meta-element/color-scheme/ Use the colors to paint the default canvas background and the default colors. There are three "regressions", though they are really progressions: we now render the reference as the test expects (before we rendered a light canvas background even for the reference). Apart of these iframe tests (which we should look into, I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1738380), there are three remaining test failures. Two of them are due to `color: initial` not changing based on the color-scheme. Safari also fails these tests, and the thing they're really testing is whether system colors are preserved at computed-value time: https://github.com/w3c/csswg-drafts/issues/3847 Regarding that change, I'm not so sure the trade-offs there are worth it, as that not only complicates interpolation (we wouldn't be able to use system colors in color-mix among others, see https://github.com/w3c/csswg-drafts/issues/5780) plus it changes inheritance behavior in sorta unexpected ways, see: https://github.com/w3c/csswg-drafts/issues/6773 Which I just filed because apparently no browser implements this correctly. So for now will punt on those (keep matching Safari). There's an svg-as-image test: https://searchfox.org/mozilla-central/rev/f8576fec48d866c5f988baaf1fa8d2f8cce2a82f/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/svg-as-image.html Which isn't using the feature at all and I'm not sure why is it supposed to pass (why prefers-color-scheme: dark is supposed to match that SVG image). This test fails in all browsers apparently: https://wpt.fyi/results/css/css-color-adjust/rendering/dark-color-scheme/svg-as-image.html?label=master&label=experimental&aligned I sent https://github.com/web-platform-tests/wpt/pull/31407 to remove it and hopefully get it reviewed by some Chromium folks. Differential Revision: https://phabricator.services.mozilla.com/D129746
| * | | style: Move Canvas/Link color computation to C++-landEmilio Cobos Álvarez2023-05-311-22/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't change behavior but will allow us to deduplicate some logic given we compute the effective color-scheme in C++. Differential Revision: https://phabricator.services.mozilla.com/D129744
| * | | style: Implement <meta name=color-scheme>Emilio Cobos Álvarez2023-05-311-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are still tests failing because https://bugzilla.mozilla.org/show_bug.cgi?id=1736034 hasn't been synced yet. Once that lands, they will still fail because we don't change Canvas/CanvasText based on color-scheme, but that I'm attaching patches for after this one. Differential Revision: https://phabricator.services.mozilla.com/D129743
| * | | Further changes required by ServoOriol Brufau2023-05-311-2/+10
| | | |
| * | | style: Fix broken 'list-style' serializationMats Palmgren2023-05-311-1/+31
| | | | | | | | | | | | | | | | Differential Revision: https://phabricator.services.mozilla.com/D129847
| * | | Further changes required by ServoOriol Brufau2023-05-312-0/+7
| | | |
| * | | style: Use GTK menu radius on native context menus and panelsEmilio Cobos Álvarez2023-05-312-1/+13
| | | | | | | | | | | | | | | | Differential Revision: https://phabricator.services.mozilla.com/D129439
| * | | style: Allow parsing layer statements inside nested rulesEmilio Cobos Álvarez2023-05-311-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes https://wpt.live/css/css-cascade/layer-media-query.html once it syncs. Differential Revision: https://phabricator.services.mozilla.com/D129424
| * | | style: Update layer ordering to follow the specEmilio Cobos Álvarez2023-05-316-164/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bitfield approach worked when the layer order was in pre-order, but the spec was changed to make it work like post-order and I don't think there's a way to keep it working like that, so keep the layer order in a separate data structure that we look up when going from Rule to ApplicableDeclarationBlock. This is just a vector index operation so hopefully shouldn't be too bad. This patch intentionally regresses @keyframe handling to some extent, since we need a bit more complicated approach and it seemed worth implementing in a separate patch. Depends on D129380 Differential Revision: https://phabricator.services.mozilla.com/D129381
| * | | style: Store a LayerOrder in ApplicableDeclarationBlockEmilio Cobos Álvarez2023-05-312-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | This shouldn't change behavior jut yet. Differential Revision: https://phabricator.services.mozilla.com/D129380
| * | | style: Make browser.tabs.drawInTitlebar a tri-stateEmilio Cobos Álvarez2023-05-311-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To more properly support Linux having a different default at runtime. Expose the resolved value in appinfo for convenience, and use it in the front-end as needed. Differential Revision: https://phabricator.services.mozilla.com/D129004
| * | | style: [Linux] Export titlebar radius as int from LookAndFeelstransky2023-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Titlebar radius is exported as integer from Gtk so there's no need to use floats here. Differential Revision: https://phabricator.services.mozilla.com/D128993
| * | | style: Don't use nsContentUtils::sNamespaceManager in servoEmilio Cobos Álvarez2023-05-311-1/+1
| | | | | | | | | | | | | | | | Differential Revision: https://phabricator.services.mozilla.com/D129030
| * | | style: Remove unused import_rule::PendingSheetMike Hommey2023-05-311-17/+5
| | | | | | | | | | | | | | | | Differential Revision: https://phabricator.services.mozilla.com/D128823
| * | | style: Fix rebase mistakeEmilio Cobos Álvarez2023-05-311-1/+1
| | | | | | | | | | | | | | | | MANUAL PUSH: Bustage fix CLOSED TREE
| * | | style: Remove -moz-gtk-csd-transparent-backgroundEmilio Cobos Álvarez2023-05-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We always use alpha visual for WebRender, and appearance: none is unnecessary (root element has no intrinsic appearance). Differential Revision: https://phabricator.services.mozilla.com/D128682
| * | | Further changes required by ServoOriol Brufau2023-05-312-0/+7
| | | |
| * | | style: Expose titlebar radius as a chrome-only CSS environment variableEmilio Cobos Álvarez2023-05-312-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | Mostly plumbing. Differential Revision: https://phabricator.services.mozilla.com/D128680
| * | | Further changes required by ServoOriol Brufau2023-05-311-0/+6
| | | |
| * | | style: Add support for chrome-only environment variablesEmilio Cobos Álvarez2023-05-312-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bit is taken straight from D73454 (I reviewed it but I guess another pair of eyes is ok, it's really straight-forward). Co-authored-by: Nicklas Boman <smurfd@gmail.com> Differential Revision: https://phabricator.services.mozilla.com/D128679
| * | | style: Remove -moz-toolbar-prefers-color-schemeEmilio Cobos Álvarez2023-05-311-46/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | By making prefers-color-scheme return the ColorSchemeForChrome(), which accounts for the Firefox theme. Differential Revision: https://phabricator.services.mozilla.com/D128611
| * | | style: Make anonymous scrollbar caching work on mac by default, and unify ↵Emilio Cobos Álvarez2023-05-311-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scrollbars.css across platforms We make it work on macOS by setting pointer-events: none + opacity: 0 rather than visibility: hidden, and tweaking the caching setup to be Android-like. Now that the scrollbars sheet is the same across platforms, move it to where the rest of the UA sheets are. This way we guarantee that the RDM vs. Android difference is less (just the ifdef at the top of the sheet). Depends on D128084 Differential Revision: https://phabricator.services.mozilla.com/D128085
| * | | style: Clean up GTK titlebar colorsEmilio Cobos Álvarez2023-05-311-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently ActiveCaption/CaptionText/InactiveCaption/InactiveCaptionText are supposed to be used for titlebars, so implement them properly and remove the GTK-specific colors. Differential Revision: https://phabricator.services.mozilla.com/D128028
| * | | style: Tweak the serialization of rotate propertyBoris Chiou2023-05-311-14/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The serialization of rotate should be updated to match the current spec. 1. If a rotation about the z axis (that is, in 2D) is specified, the property must serialize as just an <angle>. 2. If any other rotation is specified, the property must serialize with an axis specified. If the axis is parallel with the x or y axes, it must serialize as the appropriate keyword. Also, we need to handle the zero length vector separately because it is parallel to every other vector but different from x axis, y axis, or z axis. Differential Revision: https://phabricator.services.mozilla.com/D127747
| * | | style: Make inert not modify the computed styleEmilio Cobos Álvarez2023-05-311-58/+0
| | | | | | | | | | | | | | | | Differential Revision: https://phabricator.services.mozilla.com/D127422
| * | | style: Remove support for -moz-system-color() as chrome code no longer uses ↵Emilio Cobos Álvarez2023-05-311-55/+7
| | | | | | | | | | | | | | | | | | | | | | | | it (in favor of color-scheme) Differential Revision: https://phabricator.services.mozilla.com/D127802
| * | | style: Add basic support for dark form controls to nsNativeBasicThemeEmilio Cobos Álvarez2023-05-311-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For that: * Tweak the standin system colors to match the non-native theme. * Use those system colors for button and field backgrounds. * Rename the "should use system colors" bit to "is high contrast", which is what it really is (specially now that we use system colors also in non-high-contrast). Border colors and other colors like the <input type=range> and such might need some extra tweaking perhaps, but this is a decent start and looks good in https://crisal.io/tmp/form-controls.html afaict (dark mode toggle needs the color-scheme pref enabled of course). Differential Revision: https://phabricator.services.mozilla.com/D127533
| * | | style: Part 1 - Enable color-scheme CSS property in chrome sheetsEmilio Cobos Álvarez2023-05-311-0/+1
| | | | | | | | | | | | | | | | Differential Revision: https://phabricator.services.mozilla.com/D127300
| * | | style: Ensure to copy over the viewport/font units invalidation bits when ↵Emilio Cobos Álvarez2023-05-311-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | reusing reset properties Differential Revision: https://phabricator.services.mozilla.com/D127262
| * | | style: Clean up button active system colorsEmilio Cobos Álvarez2023-05-311-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does three things: * Unifies mac and gtk's buttonactivetext system colors (unships mac's from content, but it was never meant to be exposed). * Simplifies the forms.css rules, since <input type=color>'s color property value doesn't affect its rendering in any meaningful way. * Adds a buttonactiveface color, which we'll use to provide dark backgrounds for buttons in Windows dark mode (and is good practice, since generally every text system color should have a corresponding background). So as-is it shouldn't change content-exposed behavior (except we stop exposing the -moz-mac-buttonactivetext to content), but it's a worthy cleanup. Depends on D127246 Differential Revision: https://phabricator.services.mozilla.com/D127259
| * | | style: Remove NS_AUTHOR_SPECIFIED_PADDINGEmilio Cobos Álvarez2023-05-313-26/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's only one meaningful usage of it, which is to disable native appearance of the <input type=range> (the windows native theme is no longer exposed to content). <input type=range> is inconsistent with every other native widget, which only disables native appearance if the author specifies backgrounds or borders. So make it match literally all other widgets and simplify a bit the code. We had no tests for this special behavior, let me know if you think it's worth adding one (but I don't feel very strongly about it). Differential Revision: https://phabricator.services.mozilla.com/D127082
| * | | Further changes required by ServoOriol Brufau2023-05-312-2/+11
| | | |
| * | | style: Part 2: Add animation-timeline into animation shorthandBoris Chiou2023-05-302-4/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We use the same rule as blink: serialize the animation-timeline if it is not the default value. Differential Revision: https://phabricator.services.mozilla.com/D126451
| * | | style: Part 1: Add animation-timeline longhand property in style systemBoris Chiou2023-05-309-14/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the animation-timeline longhand property. For shorthand, we will do that in the next patch. This patch includes the aut-generated code in devtools/shared/css/generated/properties-db.js, by `./mach devtools-css-db`. Note: 1. we will use this property in Bug 1676791. For now, only make sure we parse it and serialize it correctly. 2. The syntax of animation-timeline may be updated, based on the spec issue: https://github.com/w3c/csswg-drafts/issues/6674. However, it's not a big problem to update it later, so we still can prototype this property based on the current version of spec. Differential Revision: https://phabricator.services.mozilla.com/D126450
| * | | Further changes required by ServoOriol Brufau2023-05-301-0/+3
| | | |
| * | | style: Order keyframe rules by layerEmilio Cobos Álvarez2023-05-302-15/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | @counter-style/@font-face/@scroll-timeline need similar fixes, but tests for those haven't been synced yet so waiting for that before writing them. Differential Revision: https://phabricator.services.mozilla.com/D126616
| * | | style: Unprefix -moz-fit-contentEmilio Cobos Álvarez2023-05-303-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm not aware of any reason we shouldn't do this, as it is interoperable with other browsers, and it causes compat issues from sites that forget to use the prefixed version. Note this removes some #[parse(aliases)]. These only affect devtools autocomplete behavior, and we avoid autocompleting -moz-prefixed keywords when possible, so even though it's a slight behavior change, it's worth it. Differential Revision: https://phabricator.services.mozilla.com/D126718
| * | | style: Place window control buttons on the right side on macOS when using an ↵Stephen A Pohl2023-05-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | RTL system locale, regardless of the Firefox locale Differential Revision: https://phabricator.services.mozilla.com/D116921
| * | | style: Print lock address on assertEmilio Cobos Álvarez2023-05-301-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that the crash reason is sanitized so we're not exposing anything sensitive. I think my patch just changed the signature of the stack, as it didn't change anything related to guards or what not. But without knowing why is failing or a repro it's hard to know what's going on. Printing the address at list would give us some indication of what might be going wrong (perhaps we're using a static lock when we don't expect one or such?). Differential Revision: https://phabricator.services.mozilla.com/D125948
| * | | style: Get rid of nsStackFrameEmilio Cobos Álvarez2023-05-301-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | There are no legacy-stack uses anymore. Differential Revision: https://phabricator.services.mozilla.com/D126077
| * | | Further changes required by ServoOriol Brufau2023-05-301-0/+1
| | | |
| * | | style: Part 5: Drop the unused effective_xxx_rulesBoris Chiou2023-05-301-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems only effective_style_rules() and effective_viewport_rules() are used. Let's drop the unused ones. Differential Revision: https://phabricator.services.mozilla.com/D125905