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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/PaintChunker.cpp

Issue 2480863002: DCHECK that paint properties are never null (Closed)
Patch Set: Fix null paint properties in FrameView scrollbar painting Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/paint/PaintChunker.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintChunker.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintChunker.cpp
index 33b273b60daf80594f2ac0e0269b02351be61adc..f5e4c59d76cc3ef9ab7264840baf18c76d0c344c 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintChunker.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintChunker.cpp
@@ -26,6 +26,15 @@ void PaintChunker::updateCurrentPaintChunkProperties(
bool PaintChunker::incrementDisplayItemIndex(const DisplayItem& item) {
DCHECK(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
+ // Property nodes should never be null because they should either be set to
+ // properties created by a LayoutObject/FrameView, or be set to a non-null
+ // root node. If these DCHECKs are hit we are missing a call to update the
+ // properties. See: ScopedPaintChunkProperties.
+ DCHECK(m_currentProperties.transform);
+ DCHECK(m_currentProperties.clip);
+ DCHECK(m_currentProperties.effect);
+ DCHECK(m_currentProperties.scroll);
+
ItemBehavior behavior;
Optional<PaintChunk::Id> newChunkId;
if (DisplayItem::isForeignLayerType(item.getType())) {

Powered by Google App Engine
This is Rietveld 408576698