Commit d941a839 authored by Dmitry Titov's avatar Dmitry Titov Committed by Commit Bot

Revert "Full AttachLayoutTree on a new Document not necessary."

This reverts commit 18a9ef45.

Reason for revert: Broke the accessibility test (again): https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Win10%20Tests%20x64/29232

Please note this does not look like a flake, after this landed a dozen runs failed consistently. 

Original change's description:
> Full AttachLayoutTree on a new Document not necessary.
> 
> We called AttachLayoutTree on a new Document which just got its
> LayoutView created. The new Document should not have any child nodes,
> it's not marked initially dirty, but trying to land this change the
> first time we caused flakiness for a Window accessibility test.
> 
> Instead of the AttachLayoutTree call, do the AXObjectCache update which
> would otherwise be called from Node::AttachLayoutTree.
> 
> This is a new attempt after the previous got reverted:
> 
> https://chromium-review.googlesource.com/c/chromium/src/+/1317889
> 
> Bug: 902050
> Change-Id: I4e366013549627b54f016d76b3dcbf12ea115f70
> Reviewed-on: https://chromium-review.googlesource.com/c/1319610
> Reviewed-by: Anders Ruud <andruud@chromium.org>
> Commit-Queue: Rune Lillesveen <futhark@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#605657}

TBR=futhark@chromium.org,andruud@chromium.org

Change-Id: Ied8ff9426940489ac4693abdb34001f44b13478c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 902050
Reviewed-on: https://chromium-review.googlesource.com/c/1321229Reviewed-by: default avatarDmitry Titov <dimich@chromium.org>
Commit-Queue: Dmitry Titov <dimich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605839}
parent 790b2f3e
...@@ -2744,9 +2744,12 @@ void Document::Initialize() { ...@@ -2744,9 +2744,12 @@ void Document::Initialize() {
layout_view_->Compositor()->SetNeedsCompositingUpdate( layout_view_->Compositor()->SetNeedsCompositingUpdate(
kCompositingUpdateAfterCompositingInputChange); kCompositingUpdateAfterCompositingInputChange);
DCHECK(!firstChild()); {
if (AXObjectCache* cache = ExistingAXObjectCache()) ReattachLegacyLayoutObjectList legacy_layout_objects(*this);
cache->UpdateCacheAfterNodeIsAttached(this); AttachContext context;
ContainerNode::AttachLayoutTree(context);
legacy_layout_objects.ForceLegacyLayoutIfNeeded();
}
// The TextAutosizer can't update layout view info while the Document is // The TextAutosizer can't update layout view info while the Document is
// detached, so update now in case anything changed. // detached, so update now in case anything changed.
......
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