diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-12-11 15:58:58 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-01-17 10:51:26 +0000 |
commit | bc644233fd28942d45e25316c0fe8cfde966e33b (patch) | |
tree | ac95ea2dabcdfc6f4660ec6b4e5cb0342f3a9878 | |
parent | cc0af7ea9b57c93044656f1fa72650918676edb8 (diff) | |
download | qtwebengine-chromium-bc644233fd28942d45e25316c0fe8cfde966e33b.tar.gz |
Move dcheck to source file
Accesses details only defined in the source file. Likely only
build for Google due to accidentently ending up in the same jumbo
file.
Change-Id: Ia6f6fc9ef973c79001a90f11e1f8e1b2958e2559
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
-rw-r--r-- | chromium/third_party/blink/renderer/core/frame/local_frame_view.cc | 28 | ||||
-rw-r--r-- | chromium/third_party/blink/renderer/core/frame/local_frame_view.h | 26 |
2 files changed, 29 insertions, 25 deletions
diff --git a/chromium/third_party/blink/renderer/core/frame/local_frame_view.cc b/chromium/third_party/blink/renderer/core/frame/local_frame_view.cc index 6a46de482da..f096064a083 100644 --- a/chromium/third_party/blink/renderer/core/frame/local_frame_view.cc +++ b/chromium/third_party/blink/renderer/core/frame/local_frame_view.cc @@ -191,6 +191,34 @@ void LogCursorSizeCounter(LocalFrame* frame, const Cursor& cursor) { } // namespace +#if DCHECK_IS_ON() + class DisallowLayoutInvalidationScope { + public: + DisallowLayoutInvalidationScope(LocalFrameView* view) + : local_frame_view_(view) { + local_frame_view_->allows_layout_invalidation_after_layout_clean_ = false; + local_frame_view_->ForAllChildLocalFrameViews( + [](LocalFrameView& frame_view) { + if (!frame_view.ShouldThrottleRendering()) + frame_view.CheckDoesNotNeedLayout(); + frame_view.allows_layout_invalidation_after_layout_clean_ = false; + }); + } + ~DisallowLayoutInvalidationScope() { + local_frame_view_->allows_layout_invalidation_after_layout_clean_ = true; + local_frame_view_->ForAllChildLocalFrameViews( + [](LocalFrameView& frame_view) { + if (!frame_view.ShouldThrottleRendering()) + frame_view.CheckDoesNotNeedLayout(); + frame_view.allows_layout_invalidation_after_layout_clean_ = true; + }); + } + + private: + UntracedMember<LocalFrameView> local_frame_view_; + }; +#endif + // Defines a UKM that is part of a hierarchical ukm, recorded in // microseconds equal to the duration of the current lexical scope after // declaration of the macro. Example usage: diff --git a/chromium/third_party/blink/renderer/core/frame/local_frame_view.h b/chromium/third_party/blink/renderer/core/frame/local_frame_view.h index 421db4044fc..0abfd4695cd 100644 --- a/chromium/third_party/blink/renderer/core/frame/local_frame_view.h +++ b/chromium/third_party/blink/renderer/core/frame/local_frame_view.h @@ -686,31 +686,7 @@ class CORE_EXPORT LocalFrameView final private: #if DCHECK_IS_ON() - class DisallowLayoutInvalidationScope { - public: - DisallowLayoutInvalidationScope(LocalFrameView* view) - : local_frame_view_(view) { - local_frame_view_->allows_layout_invalidation_after_layout_clean_ = false; - local_frame_view_->ForAllChildLocalFrameViews( - [](LocalFrameView& frame_view) { - if (!frame_view.ShouldThrottleRendering()) - frame_view.CheckDoesNotNeedLayout(); - frame_view.allows_layout_invalidation_after_layout_clean_ = false; - }); - } - ~DisallowLayoutInvalidationScope() { - local_frame_view_->allows_layout_invalidation_after_layout_clean_ = true; - local_frame_view_->ForAllChildLocalFrameViews( - [](LocalFrameView& frame_view) { - if (!frame_view.ShouldThrottleRendering()) - frame_view.CheckDoesNotNeedLayout(); - frame_view.allows_layout_invalidation_after_layout_clean_ = true; - }); - } - - private: - UntracedMember<LocalFrameView> local_frame_view_; - }; + friend class DisallowLayoutInvalidationScope; #endif explicit LocalFrameView(LocalFrame&, IntRect); |