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

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

Issue 2280243002: Don't apply overflow clips in paint invalidation. (Closed)
Patch Set: none Created 4 years, 3 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/layout/PaintInvalidationState.h" 5 #include "core/layout/PaintInvalidationState.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "core/layout/LayoutInline.h" 10 #include "core/layout/LayoutInline.h"
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 if (svgRoot.shouldApplyViewportClip()) 308 if (svgRoot.shouldApplyViewportClip())
309 addClipRectRelativeToPaintOffset(LayoutRect(LayoutPoint(), LayoutSiz e(svgRoot.pixelSnappedSize()))); 309 addClipRectRelativeToPaintOffset(LayoutRect(LayoutPoint(), LayoutSiz e(svgRoot.pixelSnappedSize())));
310 } else if (box.isTableRow()) { 310 } else if (box.isTableRow()) {
311 // Child table cell's locationOffset() includes its row's locationOffset (). 311 // Child table cell's locationOffset() includes its row's locationOffset ().
312 m_paintOffset -= box.locationOffset(); 312 m_paintOffset -= box.locationOffset();
313 } 313 }
314 314
315 if (!box.hasClipRelatedProperty()) 315 if (!box.hasClipRelatedProperty())
316 return; 316 return;
317 317
318 // Do not clip or scroll for the paint invalidation container, if it scrolls overflow, because it will always use composited 318 // Do not clip or scroll for the paint invalidation container, because the s emantics of visual rects do not include clipping or
319 // scrolling in this case. 319 // scrolling on that object.
320 if (box == m_paintInvalidationContainer && box.scrollsOverflow()) { 320 if (box == m_paintInvalidationContainer) {
321 DCHECK(!m_clipped); // The box establishes paint invalidation container, so no m_clipped inherited. 321 DCHECK(!m_clipped); // The box establishes paint invalidation container, so no m_clipped inherited.
322 } else { 322 } else {
323 // This won't work fully correctly for fixed-position elements, who shou ld receive CSS clip but for whom the current object 323 // This won't work fully correctly for fixed-position elements, who shou ld receive CSS clip but for whom the current object
324 // is not in the containing block chain. 324 // is not in the containing block chain.
325 addClipRectRelativeToPaintOffset(box.clippingRect()); 325 addClipRectRelativeToPaintOffset(box.clippingRect());
326 if (box.hasOverflowClip()) 326 if (box.hasOverflowClip())
327 m_paintOffset -= box.scrolledContentOffset(); 327 m_paintOffset -= box.scrolledContentOffset();
328 } 328 }
329 329
330 // FIXME: <http://bugs.webkit.org/show_bug.cgi?id=13443> Apply control clip if present. 330 // FIXME: <http://bugs.webkit.org/show_bug.cgi?id=13443> Apply control clip if present.
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 } 539 }
540 540
541 541
542 void PaintInvalidatorContextAdapter::mapLocalRectToPaintInvalidationBacking(cons t LayoutObject& object, LayoutRect& rect) const 542 void PaintInvalidatorContextAdapter::mapLocalRectToPaintInvalidationBacking(cons t LayoutObject& object, LayoutRect& rect) const
543 { 543 {
544 DCHECK(&object == &m_paintInvalidationState.currentObject()); 544 DCHECK(&object == &m_paintInvalidationState.currentObject());
545 m_paintInvalidationState.mapLocalRectToPaintInvalidationBacking(rect); 545 m_paintInvalidationState.mapLocalRectToPaintInvalidationBacking(rect);
546 } 546 }
547 547
548 } // namespace blink 548 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/VisualRectMappingTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698