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

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

Issue 1835843002: WIP: Fix foreignObject cullrect Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 newPaintInvalidationState.setForceSubtreeInvalidationWithinContainer(); 383 newPaintInvalidationState.setForceSubtreeInvalidationWithinContainer();
384 384
385 // TODO(wangxianzhu): This is a workaround for crbug.com/490725. We don't ha ve enough saved information to do accurate check 385 // TODO(wangxianzhu): This is a workaround for crbug.com/490725. We don't ha ve enough saved information to do accurate check
386 // of clipping change. Will remove when we remove rect-based paint invalidat ion. 386 // of clipping change. Will remove when we remove rect-based paint invalidat ion.
387 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() 387 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()
388 && previousPaintInvalidationRect != this->previousPaintInvalidationRect( ) 388 && previousPaintInvalidationRect != this->previousPaintInvalidationRect( )
389 && !usesCompositedScrolling() 389 && !usesCompositedScrolling()
390 && hasOverflowClip()) 390 && hasOverflowClip())
391 newPaintInvalidationState.setForceSubtreeInvalidationRectUpdateWithinCon tainer(); 391 newPaintInvalidationState.setForceSubtreeInvalidationRectUpdateWithinCon tainer();
392 392
393 // SVGForeignObject clips descendants and needs to over-invalidate to ensure
394 // newly exposed content repaints.
395 // TODO(pdr): SVGForeignObject supports overflow clipping using a different
396 // approach than LayoutBlock (see LayoutSVGBlock::allowsOverflowClip). This
397 // over-invalidation should be removed when overflow is unified.
398 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()
399 && isSVGForeignObject()
400 && !styleRef().isOverflowVisible()
401 && previousPaintInvalidationRect != this->previousPaintInvalidationRect( )) {
402 newPaintInvalidationState.setForceSubtreeInvalidationWithinContainer();
403 }
404
393 newPaintInvalidationState.updatePaintOffsetAndClipForChildren(); 405 newPaintInvalidationState.updatePaintOffsetAndClipForChildren();
394 invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState); 406 invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState);
395 } 407 }
396 408
397 void LayoutBoxModelObject::setBackingNeedsPaintInvalidationInRect(const LayoutRe ct& r, PaintInvalidationReason invalidationReason) const 409 void LayoutBoxModelObject::setBackingNeedsPaintInvalidationInRect(const LayoutRe ct& r, PaintInvalidationReason invalidationReason) const
398 { 410 {
399 // TODO(wangxianzhu): Enable the following assert after paint invalidation f or spv2 is ready. 411 // TODO(wangxianzhu): Enable the following assert after paint invalidation f or spv2 is ready.
400 // ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled()); 412 // ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled());
401 413
402 // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here, 414 // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here,
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 if (rootElementStyle->hasBackground()) 977 if (rootElementStyle->hasBackground())
966 return false; 978 return false;
967 979
968 if (node() != document().firstBodyElement()) 980 if (node() != document().firstBodyElement())
969 return false; 981 return false;
970 982
971 return true; 983 return true;
972 } 984 }
973 985
974 } // namespace blink 986 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutScrollbar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698