Skip to content

Commit

Permalink
DevTools: Force a layout in DOM.getBoundingBox
Browse files Browse the repository at this point in the history
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/963302
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543202}
  • Loading branch information
JoelEinbinder authored and Commit Bot committed Mar 14, 2018
1 parent 6bc6aba commit 573027c
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 573027c

Please sign in to comment.