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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 2623213002: Expand PaintLayer clip to account for hidden URL bar with document.rootScroller (Closed)
Patch Set: Rebase Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 void CompositedLayerMapping::updateScrollingLayerGeometry( 1300 void CompositedLayerMapping::updateScrollingLayerGeometry(
1301 const IntRect& localCompositingBounds) { 1301 const IntRect& localCompositingBounds) {
1302 if (!m_scrollingLayer) 1302 if (!m_scrollingLayer)
1303 return; 1303 return;
1304 1304
1305 ASSERT(m_scrollingContentsLayer); 1305 ASSERT(m_scrollingContentsLayer);
1306 LayoutBox* layoutBox = toLayoutBox(layoutObject()); 1306 LayoutBox* layoutBox = toLayoutBox(layoutObject());
1307 IntRect overflowClipRect = 1307 IntRect overflowClipRect =
1308 pixelSnappedIntRect(layoutBox->overflowClipRect(LayoutPoint())); 1308 pixelSnappedIntRect(layoutBox->overflowClipRect(LayoutPoint()));
1309 1309
1310 const TopDocumentRootScrollerController& globalRootScrollerController =
1311 layoutBox->document().frameHost()->globalRootScrollerController();
1312
1313 if (&m_owningLayer == globalRootScrollerController.rootScrollerPaintLayer()) {
1314 LayoutRect clipRect =
1315 layoutBox->document().layoutView()->overflowClipRect(LayoutPoint());
chrishtr 2017/01/21 02:06:47 Why can this now be removed?
1316 DCHECK(clipRect.size() == LayoutSize(pixelSnappedIntRect(clipRect).size()));
1317 overflowClipRect.setSize(pixelSnappedIntRect(clipRect).size());
1318 }
1319
1320 // When a m_childTransformLayer exists, local content offsets for the 1310 // When a m_childTransformLayer exists, local content offsets for the
1321 // m_scrollingLayer have already been applied. Otherwise, we apply them here. 1311 // m_scrollingLayer have already been applied. Otherwise, we apply them here.
1322 IntSize localContentOffset(0, 0); 1312 IntSize localContentOffset(0, 0);
1323 if (!m_childTransformLayer) { 1313 if (!m_childTransformLayer) {
1324 localContentOffset = roundedIntPoint(m_owningLayer.subpixelAccumulation()) - 1314 localContentOffset = roundedIntPoint(m_owningLayer.subpixelAccumulation()) -
1325 localCompositingBounds.location(); 1315 localCompositingBounds.location();
1326 } 1316 }
1327 m_scrollingLayer->setPosition( 1317 m_scrollingLayer->setPosition(
1328 FloatPoint(overflowClipRect.location() + localContentOffset)); 1318 FloatPoint(overflowClipRect.location() + localContentOffset));
1329 m_scrollingLayer->setSize(FloatSize(overflowClipRect.size())); 1319 m_scrollingLayer->setSize(FloatSize(overflowClipRect.size()));
(...skipping 2114 matching lines...) Expand 10 before | Expand all | Expand 10 after
3444 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { 3434 } else if (graphicsLayer == m_decorationOutlineLayer.get()) {
3445 name = "Decoration Layer"; 3435 name = "Decoration Layer";
3446 } else { 3436 } else {
3447 ASSERT_NOT_REACHED(); 3437 ASSERT_NOT_REACHED();
3448 } 3438 }
3449 3439
3450 return name; 3440 return name;
3451 } 3441 }
3452 3442
3453 } // namespace blink 3443 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698