Commit 573027c1 authored by Joel Einbinder's avatar Joel Einbinder Committed by Commit Bot

DevTools: Force a layout in DOM.getBoundingBox

If the style of a node was changed right before a call to
DOM.getBoundingBox, it might return stale metrics.

Change-Id: I046ecd214c964935f5912ed6f570c9cc4552ad29
Reviewed-on: https://chromium-review.googlesource.com/963302Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Reviewed-by: default avatarAndrey Lushnikov <lushnikov@chromium.org>
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543202}
parent 6bc6abaa
......@@ -453,6 +453,7 @@ std::unique_ptr<protocol::DictionaryValue> InspectorHighlight::AsProtocolValue()
bool InspectorHighlight::GetBoxModel(
Node* node,
std::unique_ptr<protocol::DOM::BoxModel>* model) {
node->GetDocument().EnsurePaintLocationDataValidForNode(node);
LayoutObject* layout_object = node->GetLayoutObject();
LocalFrameView* view = node->GetDocument().View();
if (!layout_object || !view)
......
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