Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Sync changes from mozilla-central, and update euclid #23827

Merged
merged 23 commits into from Jul 24, 2019
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c00045b
style: set CSS properties directly on '::cue'.
alastor0325 Jul 9, 2019
6cf87d2
style: Add an 'auto' value for the CSS 'quotes' property, and make it…
jfkthame Jul 9, 2019
145acbf
style: Part 2: Retire the support for 3-valued syntax for position.
BorisChiou Jul 10, 2019
e3b57ef
style: Ignore pref-controlled properties in cached scrollbar style as…
heycam Jul 10, 2019
10cb9c0
style: Don't apply property restrictions to pseudo-elements in UA sty…
emilio Jul 11, 2019
b8e3247
style: Update spec link for font-variation-settings.
emilio Jul 11, 2019
2a500ea
style: scroll-margin properties shouldn't apply to first-line / first…
emilio Jul 11, 2019
e33a799
style: Centralize property restrictions.
emilio Jul 11, 2019
65bf72f
style: Set the property restrictions flags from the centralized list.
emilio Jul 11, 2019
87231e6
style: Add percentage for opacity (i.e. <alpha-value>).
BorisChiou Jul 12, 2019
2ab9156
style: Remove dominant-baseline values that no longer exist.
longsonr Jul 13, 2019
59cf10d
style: Modify URLExtraData rust debug to include referrerInfo.
Jul 16, 2019
137044a
style: Update animations when a pseudo-element had animations but no …
emilio Jul 16, 2019
66eae2f
style: Remove the ability to build Gecko without the bindgen feature.
emilio Jul 18, 2019
239f2da
style: Update to euclid 0.20.
nical Jul 18, 2019
6bc1b97
style: renamed text-decoration-width to text-decoration-thickness.
Jul 19, 2019
243520f
style: Change dominant-baseline from reset to inherit.
longsonr Jul 19, 2019
8665d9d
Fix Servo build.
emilio Jul 22, 2019
3da8f85
style: Fix a warning in Servo builds by moving a macro to where it's …
emilio Jul 22, 2019
58d51b1
style: Remove unit tests that test non-compliant stuff.
emilio Jul 22, 2019
2ff7cb5
style: Appease tidy.
emilio Jul 22, 2019
3d57c22
Update euclid.
emilio Jul 22, 2019
9dc906a
Update WPT expectations.
emilio Jul 23, 2019
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

style: Don't apply property restrictions to pseudo-elements in UA sty…

…lesheets.

And remove some of the ::placeholder and ::cue hacks where we need to use
!important to make the property not apply for content but apply on UA sheets.

The comment about the white-space property was wrong, we don't enforce it with
!important in the UA stylesheets for <input> (we do for <textarea> though), so
I've kept the flag since it really applies.

Differential Revision: https://phabricator.services.mozilla.com/D37717
  • Loading branch information
emilio committed Jul 23, 2019
commit 10cb9c07aab93d6428707f6a13b5101e5b730363
@@ -153,7 +153,7 @@ where
// longhands are only allowed if they have our
// restriction flag set.
if let PropertyDeclarationId::Longhand(id) = declaration.id() {
if !id.flags().contains(restriction) {
if !id.flags().contains(restriction) && cascade_level.origin() != Origin::UserAgent {
return None;
}
}
@@ -9,15 +9,12 @@
inherited=False,
gecko_name="Display") %>

// We allow "display" to apply to placeholders because we need to make the
// placeholder pseudo-element an inline-block in the UA stylesheet in Gecko.
${helpers.predefined_type(
"display",
"Display",
"computed::Display::inline()",
initial_specified_value="specified::Display::inline()",
animation_value_type="discrete",
flags="APPLIES_TO_PLACEHOLDER",
spec="https://drafts.csswg.org/css-display/#propdef-display",
servo_restyle_damage="rebuild_and_reflow",
needs_context=product == "gecko"
@@ -103,17 +100,13 @@ ${helpers.single_keyword("-servo-overflow-clip-box", "padding-box content-box",
products="gecko",
enabled_in="ua",
needs_context=False,
flags="APPLIES_TO_PLACEHOLDER",
gecko_pref="layout.css.overflow-clip-box.enabled",
animation_value_type="discrete",
spec="Internal, may be standardized in the future: \
https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-clip-box",
)}
% endfor

// FIXME(pcwalton, #2742): Implement scrolling for `scroll` and `auto`.
//
// We allow it to apply to placeholders for UA sheets, which set it !important.
% for (axis, logical) in ALL_AXES:
<% full_name = "overflow-{}".format(axis) %>
${helpers.predefined_type(
@@ -123,7 +116,6 @@ ${helpers.single_keyword("-servo-overflow-clip-box", "padding-box content-box",
logical_group="overflow",
logical=logical,
animation_value_type="discrete",
flags="APPLIES_TO_PLACEHOLDER",
spec="https://drafts.csswg.org/css-overflow-3/#propdef-{}".format(full_name),
needs_context=False,
servo_restyle_damage = "reflow",
@@ -477,10 +469,6 @@ ${helpers.predefined_type(

// CSS Basic User Interface Module Level 3
// http://dev.w3.org/csswg/css-ui
//
// This is APPLIES_TO_PLACEHOLDER so we can override, in the UA sheet, the
// 'resize' property we'd inherit from textarea otherwise. Basically, just
// makes the UA rules easier to write.
${helpers.predefined_type(
"resize",
"Resize",
@@ -489,7 +477,6 @@ ${helpers.predefined_type(
animation_value_type="discrete",
needs_context=False,
gecko_ffi_name="mResize",
flags="APPLIES_TO_PLACEHOLDER",
spec="https://drafts.csswg.org/css-ui/#propdef-resize",
)}

@@ -29,7 +29,6 @@ ${helpers.single_keyword(
servo_pref="layout.writing-mode.enabled",
animation_value_type="none",
spec="https://drafts.csswg.org/css-writing-modes/#propdef-writing-mode",
flags="APPLIES_TO_CUE",
servo_restyle_damage="rebuild_and_reflow",
)}

@@ -78,7 +78,6 @@ ${helpers.predefined_type(
"computed::OverflowWrap::Normal",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text/#propdef-overflow-wrap",
flags="APPLIES_TO_CUE",
alias="word-wrap",
needs_context=False,
servo_restyle_damage="rebuild_and_reflow",
@@ -182,7 +181,6 @@ ${helpers.predefined_type(
gecko_enum_prefix="StyleWhiteSpace"
needs_conversion="True"
animation_value_type="discrete"
// Only allowed for UA sheets, which set it !important.
flags="APPLIES_TO_CUE APPLIES_TO_PLACEHOLDER"
spec="https://drafts.csswg.org/css-text/#propdef-white-space"
servo_restyle_damage="rebuild_and_reflow"
@@ -23,7 +23,6 @@ ${helpers.single_keyword(
"auto none",
animation_value_type="discrete",
extra_gecko_values="visiblepainted visiblefill visiblestroke visible painted fill stroke all",
flags="APPLIES_TO_PLACEHOLDER",
spec="https://www.w3.org/TR/SVG11/interact.html#PointerEventsProperty",
)}

@@ -6,8 +6,6 @@
<% from data import ALL_SIDES, maybe_moz_logical_alias %>
<% data.new_style_struct("Padding", inherited=False) %>

// APPLIES_TO_PLACEHOLDER so we can set it in UA stylesheets. But we use a
// !important value there, so pages can't set it.
% for side in ALL_SIDES:
<%
spec = "https://drafts.csswg.org/css-box/#propdef-padding-%s" % side[0]
@@ -23,7 +21,7 @@
logical=side[1],
logical_group="padding",
spec=spec,
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_PLACEHOLDER GETCS_NEEDS_LAYOUT_FLUSH",
flags="APPLIES_TO_FIRST_LETTER GETCS_NEEDS_LAYOUT_FLUSH",
allow_quirks="No" if side[1] else "Yes",
servo_restyle_damage="reflow rebuild_and_reflow_inline"
)}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.