| Index: third_party/WebKit/Source/core/layout/LayoutView.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutView.cpp b/third_party/WebKit/Source/core/layout/LayoutView.cpp
|
| index f62c87aafa731a32b379d26cb4567f325c546df7..428013959c71ab8b58cab4fb3f7b476ba9f4c40f 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
|
| @@ -205,7 +205,9 @@ void LayoutView::checkLayoutState() {
|
| }
|
| #endif
|
|
|
| -void LayoutView::setShouldDoFullPaintInvalidationOnResizeIfNeeded() {
|
| +void LayoutView::setShouldDoFullPaintInvalidationOnResizeIfNeeded(
|
| + bool widthChanged,
|
| + bool heightChanged) {
|
| // When background-attachment is 'fixed', we treat the viewport (instead of
|
| // the 'root' i.e. html or body) as the background positioning area, and we
|
| // should fully invalidate on viewport resize if the background image is not
|
| @@ -214,15 +216,10 @@ void LayoutView::setShouldDoFullPaintInvalidationOnResizeIfNeeded() {
|
| if (style()->hasFixedBackgroundImage() &&
|
| (!m_compositor ||
|
| !m_compositor->needsFixedRootBackgroundLayer(layer()))) {
|
| - IncludeScrollbarsInRect includeScrollbars =
|
| - RuntimeEnabledFeatures::rootLayerScrollingEnabled() ? IncludeScrollbars
|
| - : ExcludeScrollbars;
|
| - if ((offsetWidth() != viewWidth(includeScrollbars) &&
|
| - mustInvalidateFillLayersPaintOnWidthChange(
|
| - style()->backgroundLayers())) ||
|
| - (offsetHeight() != viewHeight(includeScrollbars) &&
|
| - mustInvalidateFillLayersPaintOnHeightChange(
|
| - style()->backgroundLayers())))
|
| + if ((widthChanged && mustInvalidateFillLayersPaintOnWidthChange(
|
| + style()->backgroundLayers())) ||
|
| + (heightChanged && mustInvalidateFillLayersPaintOnHeightChange(
|
| + style()->backgroundLayers())))
|
| setShouldDoFullPaintInvalidation(PaintInvalidationBoundsChange);
|
| }
|
| }
|
| @@ -231,7 +228,12 @@ void LayoutView::layout() {
|
| if (!document().paginated())
|
| setPageLogicalHeight(LayoutUnit());
|
|
|
| - setShouldDoFullPaintInvalidationOnResizeIfNeeded();
|
| + IncludeScrollbarsInRect includeScrollbars =
|
| + RuntimeEnabledFeatures::rootLayerScrollingEnabled() ? IncludeScrollbars
|
| + : ExcludeScrollbars;
|
| + FloatSize viewSize(frameView()->visibleContentSize(includeScrollbars));
|
| + setShouldDoFullPaintInvalidationOnResizeIfNeeded(
|
| + offsetWidth() != viewSize.width(), offsetHeight() != viewSize.height());
|
|
|
| if (pageLogicalHeight() && shouldUsePrintingLayout()) {
|
| m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = logicalWidth();
|
| @@ -888,10 +890,6 @@ bool LayoutView::rootBackgroundIsEntirelyFixed() const {
|
| return style()->hasEntirelyFixedBackground();
|
| }
|
|
|
| -LayoutRect LayoutView::backgroundRect(LayoutBox* backgroundLayoutObject) const {
|
| - return LayoutRect(documentRect());
|
| -}
|
| -
|
| IntSize LayoutView::layoutSize(
|
| IncludeScrollbarsInRect scrollbarInclusion) const {
|
| if (shouldUsePrintingLayout())
|
|
|