Commit a02cc66c authored by Rakina Zata Amni's avatar Rakina Zata Amni Committed by Commit Bot

Remove UpdateStyleAndLayoutTreeForNode from CanContainRangeEndPoint

We would like to ban calls to UpdateStyleAndLayoutTreeForNode from
within lifecycle updates. HTMLMeterElement::CanContainRangeEndPoint
in some cases might be called within lifecycle updates.

Change-Id: I11657874be40506c3b95ac6910c93aedaf5a1d35
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1605583Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658955}
parent 97d57619
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "third_party/blink/renderer/core/dom/node_computed_style.h" #include "third_party/blink/renderer/core/dom/node_computed_style.h"
#include "third_party/blink/renderer/core/dom/shadow_root.h" #include "third_party/blink/renderer/core/dom/shadow_root.h"
#include "third_party/blink/renderer/core/editing/editing_utilities.h"
#include "third_party/blink/renderer/core/frame/use_counter.h" #include "third_party/blink/renderer/core/frame/use_counter.h"
#include "third_party/blink/renderer/core/html/html_div_element.h" #include "third_party/blink/renderer/core/html/html_div_element.h"
#include "third_party/blink/renderer/core/html/html_slot_element.h" #include "third_party/blink/renderer/core/html/html_slot_element.h"
...@@ -216,7 +217,7 @@ void HTMLMeterElement::UpdateValueAppearance(double percentage) { ...@@ -216,7 +217,7 @@ void HTMLMeterElement::UpdateValueAppearance(double percentage) {
} }
bool HTMLMeterElement::CanContainRangeEndPoint() const { bool HTMLMeterElement::CanContainRangeEndPoint() const {
GetDocument().UpdateStyleAndLayoutTreeForNode(this); DCHECK(!NeedsLayoutTreeUpdate(*this));
return GetComputedStyle() && !GetComputedStyle()->HasAppearance(); return GetComputedStyle() && !GetComputedStyle()->HasAppearance();
} }
......
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