mirror of
https://github.com/servo/servo.git
synced 2025-08-16 02:45:36 +01:00
Revert #19666 since we do create NAC elements and expect them to be inline.
This reverts commit1970e82b0d
, reversing changes made toe882660ea6
. The reparenting logic is still bogus, but I'll figure out how to deal with that in a bit.
This commit is contained in:
parent
1970e82b0d
commit
bab6077c1c
7 changed files with 49 additions and 29 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue