Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2854213004: Update layer size from LayoutBox::UpdateAfterLayout (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 5ac9de0dd96cd20cdc1b9a0df7524ce1bf754341..bd1e992eec6e950259d3c0c6672f5bc56787de90 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -747,7 +747,7 @@ void LayoutBox::UpdateAfterLayout() {
// transform after layout.
if (HasLayer()) {
Layer()->UpdateTransformationMatrix();
- Layer()->UpdateScrollingAfterLayout();
+ Layer()->UpdateSizeAndScrollingAfterLayout();
}
}
@@ -831,18 +831,13 @@ LayoutUnit LayoutBox::ConstrainContentBoxLogicalHeightByMinMax(
void LayoutBox::SetLocationAndUpdateOverflowControlsIfNeeded(
const LayoutPoint& location) {
- if (HasOverflowClip()) {
- IntSize old_pixel_snapped_border_rect_size =
- PixelSnappedBorderBoxRect().Size();
- SetLocation(location);
- if (PixelSnappedBorderBoxRect().Size() !=
- old_pixel_snapped_border_rect_size) {
- Layer()->UpdateScrollingAfterLayout();
- }
- return;
- }
-
+ IntSize old_pixel_snapped_border_rect_size =
+ PixelSnappedBorderBoxRect().Size();
SetLocation(location);
+ if (HasLayer() && PixelSnappedBorderBoxRect().Size() !=
+ old_pixel_snapped_border_rect_size) {
+ Layer()->UpdateSizeAndScrollingAfterLayout();
+ }
}
IntRect LayoutBox::AbsoluteContentBox() const {

Powered by Google App Engine
This is Rietveld 408576698