Commit ad6ce1b6 authored by Stefan Zager's avatar Stefan Zager Committed by Commit Bot

Don't check occlusion state for hit testing if lifecycle update failed

The first attempt at a fix was reverted, because we can't
CHECK(!NeedsLayout()) at the end of a lifecycle update:

https://chromium-review.googlesource.com/c/chromium/src/+/1972230

BUG=1035029
R=chrishtr@chromium.org

Change-Id: I976c46b13c5a6789ca8df1142269c635cdaa1bb3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1986911Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: Stefan Zager <szager@chromium.org>
Cr-Commit-Position: refs/heads/master@{#728359}
parent 1906aa6e
...@@ -2027,9 +2027,9 @@ void LocalFrameView::UpdateGeometriesIfNeeded() { ...@@ -2027,9 +2027,9 @@ void LocalFrameView::UpdateGeometriesIfNeeded() {
views.clear(); views.clear();
} }
void LocalFrameView::UpdateAllLifecyclePhases( bool LocalFrameView::UpdateAllLifecyclePhases(
DocumentLifecycle::LifecycleUpdateReason reason) { DocumentLifecycle::LifecycleUpdateReason reason) {
GetFrame().LocalFrameRoot().View()->UpdateLifecyclePhases( return GetFrame().LocalFrameRoot().View()->UpdateLifecyclePhases(
DocumentLifecycle::kPaintClean, reason); DocumentLifecycle::kPaintClean, reason);
} }
......
...@@ -329,7 +329,8 @@ class CORE_EXPORT LocalFrameView final ...@@ -329,7 +329,8 @@ class CORE_EXPORT LocalFrameView final
// lifecycle update (e.g., based on visibility) and will not end up being // lifecycle update (e.g., based on visibility) and will not end up being
// PaintClean. Set |reason| to indicate the reason for this update, // PaintClean. Set |reason| to indicate the reason for this update,
// for metrics purposes. // for metrics purposes.
void UpdateAllLifecyclePhases( // Returns whether the lifecycle was successfully updated to PaintClean.
bool UpdateAllLifecyclePhases(
DocumentLifecycle::LifecycleUpdateReason reason); DocumentLifecycle::LifecycleUpdateReason reason);
// Computes the style, layout, compositing and pre-paint lifecycle stages // Computes the style, layout, compositing and pre-paint lifecycle stages
......
...@@ -138,8 +138,8 @@ void PageAnimator::UpdateAllLifecyclePhases( ...@@ -138,8 +138,8 @@ void PageAnimator::UpdateAllLifecyclePhases(
LocalFrameView* view = root_frame.View(); LocalFrameView* view = root_frame.View();
base::AutoReset<bool> servicing(&updating_layout_and_style_for_painting_, base::AutoReset<bool> servicing(&updating_layout_and_style_for_painting_,
true); true);
view->UpdateAllLifecyclePhases(reason); if (view->UpdateAllLifecyclePhases(reason))
UpdateHitTestOcclusionData(root_frame); UpdateHitTestOcclusionData(root_frame);
} }
void PageAnimator::UpdateAllLifecyclePhasesExceptPaint(LocalFrame& root_frame) { void PageAnimator::UpdateAllLifecyclePhasesExceptPaint(LocalFrame& root_frame) {
......
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