mirror of
https://github.com/servo/servo.git
synced 2025-07-06 06:53:38 +01:00
style: Back out bug 1481866.
The behavior the WG proposed is way more subtle than what that bug implements, including: * Implementing two logical overflow longhands. * Expanding the overflow shorthand to different longhands depending on the syntax of that. Meanwhile, Blink hasn't done the swap and will ship the same behavior that we shipped in Firefox 61 (bug 1453148), that is, overflow-x, then overflow-y. So I think lacking a clear way forward we should revert this change and preserve our shipped behavior. Differential Revision: https://phabricator.services.mozilla.com/D6317
This commit is contained in:
parent
0bcffa7094
commit
3c6be59d22
1 changed files with 6 additions and 6 deletions
|
@ -7,7 +7,7 @@
|
||||||
<%helpers:shorthand
|
<%helpers:shorthand
|
||||||
name="overflow"
|
name="overflow"
|
||||||
flags="SHORTHAND_IN_GETCS"
|
flags="SHORTHAND_IN_GETCS"
|
||||||
sub_properties="overflow-y overflow-x"
|
sub_properties="overflow-x overflow-y"
|
||||||
spec="https://drafts.csswg.org/css-overflow/#propdef-overflow"
|
spec="https://drafts.csswg.org/css-overflow/#propdef-overflow"
|
||||||
>
|
>
|
||||||
use properties::longhands::overflow_x::parse as parse_overflow;
|
use properties::longhands::overflow_x::parse as parse_overflow;
|
||||||
|
@ -52,9 +52,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
% endif
|
% endif
|
||||||
let overflow_y = parse_overflow(context, input)?;
|
let overflow_x = parse_overflow(context, input)?;
|
||||||
let overflow_x =
|
let overflow_y =
|
||||||
input.try(|i| parse_overflow(context, i)).unwrap_or(overflow_y);
|
input.try(|i| parse_overflow(context, i)).unwrap_or(overflow_x);
|
||||||
Ok(expanded! {
|
Ok(expanded! {
|
||||||
overflow_x: overflow_x,
|
overflow_x: overflow_x,
|
||||||
overflow_y: overflow_y,
|
overflow_y: overflow_y,
|
||||||
|
@ -63,10 +63,10 @@
|
||||||
|
|
||||||
impl<'a> ToCss for LonghandsToSerialize<'a> {
|
impl<'a> ToCss for LonghandsToSerialize<'a> {
|
||||||
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
|
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
|
||||||
self.overflow_y.to_css(dest)?;
|
self.overflow_x.to_css(dest)?;
|
||||||
if self.overflow_x != self.overflow_y {
|
if self.overflow_x != self.overflow_y {
|
||||||
dest.write_char(' ')?;
|
dest.write_char(' ')?;
|
||||||
self.overflow_x.to_css(dest)?;
|
self.overflow_y.to_css(dest)?;
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue