aboutsummaryrefslogtreecommitdiffstats
path: root/ports
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-12-31 16:59:17 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-12-31 17:00:26 +0100
commitbab6077c1c5729447cc4625886b7f72f257aaa32 (patch)
tree4561022fe459b399cf3ad695ba1f219cb390f366 /ports
parent1970e82b0d310128eabe8466d39d42cc20e7ae4b (diff)
downloadservo-bab6077c1c5729447cc4625886b7f72f257aaa32.tar.gz
servo-bab6077c1c5729447cc4625886b7f72f257aaa32.zip
Revert #19666 since we do create NAC elements and expect them to be inline.
This reverts commit 1970e82b0d310128eabe8466d39d42cc20e7ae4b, reversing changes made to e882660ea694f9f12d9d2936012dbdf192f8aec8. The reparenting logic is still bogus, but I'll figure out how to deal with that in a bit.
Diffstat (limited to 'ports')
-rw-r--r--ports/geckolib/glue.rs16
1 files changed, 5 insertions, 11 deletions
diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs
index 7c7ac9f77a1..e12b4d1307d 100644
--- a/ports/geckolib/glue.rs
+++ b/ports/geckolib/glue.rs
@@ -2019,11 +2019,12 @@ pub extern "C" fn Servo_ComputedValues_GetForAnonymousBox(parent_style_or_null:
page_decls,
);
+ let cascade_flags = CascadeFlags::SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP;
data.stylist.precomputed_values_for_pseudo_with_rule_node(
&guards,
&pseudo,
parent_style_or_null.map(|x| &*x),
- CascadeFlags::empty(),
+ cascade_flags,
&metrics,
rule_node
).into()
@@ -3619,17 +3620,10 @@ pub extern "C" fn Servo_ReparentStyle(
let element = element.map(GeckoElement);
let mut cascade_flags = CascadeFlags::empty();
+ if style_to_reparent.is_anon_box() {
+ cascade_flags.insert(CascadeFlags::SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP);
+ }
if let Some(element) = element {
- // NOTE(emilio): This relies on element.is_some() => pseudo.is_none(),
- // which the caller guarantees, fortunately. But this doesn't handle the
- // IS_ROOT_ELEMENT flag correctly!
- //
- // I think it's not possible to wrap a root element in a first-line
- // frame (and reparenting only happens for ::first-line and its
- // descendants), so this may be fine...
- //
- // We should just get rid of all these flags which pass element / pseudo
- // state.
if element.is_link() {
cascade_flags.insert(CascadeFlags::IS_LINK);
if element.is_visited_link() && doc_data.visited_styles_enabled() {