Commit 5fa61755 authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

No need for kNeedsReattachStyleChange for designMode change.

LayoutNG used kNeedsReattachStyleChange instead of kSubtreeStyleChange
on Document when changing designMode to force a re-attach. However,
Document::UpdateStyle() does not have separate behavior for the two. The
LayoutNG code triggers layout tree changes on style recalc
appropriately.

We would like to get rid of kNeedsReattachStyleChange for a full
separation of style recalc and layout tree building.

TEST=editing/ with LayoutNG enabled

Change-Id: Iac04f705e56233de6771da224fc9e8edc9a487be
Reviewed-on: https://chromium-review.googlesource.com/c/1312476Reviewed-by: default avatarChristian Biesinger <cbiesinger@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604570}
parent c364c7b4
......@@ -5898,11 +5898,9 @@ void Document::setDesignMode(const String& value) {
if (new_value == design_mode_)
return;
design_mode_ = new_value;
StyleChangeType type = RuntimeEnabledFeatures::LayoutNGEnabled()
? kNeedsReattachStyleChange
: kSubtreeStyleChange;
SetNeedsStyleRecalc(type, StyleChangeReasonForTracing::Create(
style_change_reason::kDesignMode));
SetNeedsStyleRecalc(
kSubtreeStyleChange,
StyleChangeReasonForTracing::Create(style_change_reason::kDesignMode));
}
Document* Document::ParentDocument() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment