Commit 90f1043d authored by szager's avatar szager Committed by Commit bot

Add FrameView::MarkViewportConstrainedObjectsForLayout

A minor refactoring; the method will get a couple of other callers
in subsequent patches (which I'm breaking up for digestibility).

The new condition is something that currently will never be false;
subsequent patches will cause it be false sometimes.

BUG=701575

Review-Url: https://codereview.chromium.org/2846263002
Cr-Commit-Position: refs/heads/master@{#468066}
parent 6c557240
......@@ -1711,7 +1711,13 @@ void FrameView::ViewportSizeChanged(bool width_changed, bool height_changed) {
}
}
if (!HasViewportConstrainedObjects())
if (GetFrame().GetDocument() && !IsInPerformLayout())
MarkViewportConstrainedObjectsForLayout(width_changed, height_changed);
}
void FrameView::MarkViewportConstrainedObjectsForLayout(bool width_changed,
bool height_changed) {
if (!HasViewportConstrainedObjects() || !(width_changed || height_changed))
return;
for (const auto& viewport_constrained_object :
......
......@@ -228,6 +228,8 @@ class CORE_EXPORT FrameView final
void DidUpdateElasticOverscroll();
void ViewportSizeChanged(bool width_changed, bool height_changed);
void MarkViewportConstrainedObjectsForLayout(bool width_changed,
bool height_changed);
AtomicString MediaType() const;
void SetMediaType(const AtomicString&);
......
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