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

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

Issue 2816873002: Update PaintLayer size during layout, not after.
Patch Set: Speculatively remove call to UpdateScrollbars() Created 3 years, 8 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 6f2ceee06cd38b7eebf8828ca9cde565f9b1a570..60772149a7ee7577921665ae176fd08680166df2 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -746,11 +746,13 @@ FloatRect LayoutBox::LocalBoundingBoxRectForAccessibility() const {
frame_rect_.Height().ToFloat());
}
-void LayoutBox::UpdateLayerTransformAfterLayout() {
+void LayoutBox::UpdateAfterLayout() {
// Transform-origin depends on box size, so we need to update the layer
// transform after layout.
- if (HasLayer())
+ if (HasLayer()) {
Layer()->UpdateTransformationMatrix();
+ Layer()->UpdateSizeAndScrollingAfterLayout();
+ }
}
LayoutUnit LayoutBox::LogicalHeightWithVisibleOverflow() const {
@@ -838,8 +840,9 @@ void LayoutBox::SetLocationAndUpdateOverflowControlsIfNeeded(
PixelSnappedBorderBoxRect().Size();
SetLocation(location);
if (PixelSnappedBorderBoxRect().Size() !=
- old_pixel_snapped_border_rect_size)
- GetScrollableArea()->UpdateAfterLayout();
+ old_pixel_snapped_border_rect_size) {
+ Layer()->UpdateSizeAndScrollingAfterLayout();
+ }
return;
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.h ('k') | third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698