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

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

Issue 2301103004: Remove DCHEcK(!m_clipped) (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 } else if (box.isTableRow()) { 311 } else if (box.isTableRow()) {
312 // Child table cell's locationOffset() includes its row's locationOffset (). 312 // Child table cell's locationOffset() includes its row's locationOffset ().
313 m_paintOffset -= box.locationOffset(); 313 m_paintOffset -= box.locationOffset();
314 } 314 }
315 315
316 if (!box.hasClipRelatedProperty()) 316 if (!box.hasClipRelatedProperty())
317 return; 317 return;
318 318
319 // Do not clip or scroll for the paint invalidation container, because the s emantics of visual rects do not include clipping or 319 // Do not clip or scroll for the paint invalidation container, because the s emantics of visual rects do not include clipping or
320 // scrolling on that object. 320 // scrolling on that object.
321 if (box == m_paintInvalidationContainer) { 321 if (box != m_paintInvalidationContainer) {
322 DCHECK(!m_clipped); // The box establishes paint invalidation container, so no m_clipped inherited.
323 } else {
324 // This won't work fully correctly for fixed-position elements, who shou ld receive CSS clip but for whom the current object 322 // This won't work fully correctly for fixed-position elements, who shou ld receive CSS clip but for whom the current object
325 // is not in the containing block chain. 323 // is not in the containing block chain.
326 addClipRectRelativeToPaintOffset(box.clippingRect()); 324 addClipRectRelativeToPaintOffset(box.clippingRect());
327 if (box.hasOverflowClip()) 325 if (box.hasOverflowClip())
328 m_paintOffset -= box.scrolledContentOffset(); 326 m_paintOffset -= box.scrolledContentOffset();
329 } 327 }
330 328
331 // FIXME: <http://bugs.webkit.org/show_bug.cgi?id=13443> Apply control clip if present. 329 // FIXME: <http://bugs.webkit.org/show_bug.cgi?id=13443> Apply control clip if present.
332 } 330 }
333 331
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 } 538 }
541 539
542 540
543 void PaintInvalidatorContextAdapter::mapLocalRectToPaintInvalidationBacking(cons t LayoutObject& object, LayoutRect& rect) const 541 void PaintInvalidatorContextAdapter::mapLocalRectToPaintInvalidationBacking(cons t LayoutObject& object, LayoutRect& rect) const
544 { 542 {
545 DCHECK(&object == &m_paintInvalidationState.currentObject()); 543 DCHECK(&object == &m_paintInvalidationState.currentObject());
546 m_paintInvalidationState.mapLocalRectToPaintInvalidationBacking(rect); 544 m_paintInvalidationState.mapLocalRectToPaintInvalidationBacking(rect);
547 } 545 }
548 546
549 } // namespace blink 547 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698