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

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

Issue 2854213004: Update layer size from LayoutBox::UpdateAfterLayout (Closed)
Patch Set: Fix placement of inline comment 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 097fec971dac558f6d294e287ee84ef1491c2e7a..2b0b0e62a1434e9ae26052216e0fc6d575313954 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