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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.h

Issue 2501833002: Fix bug of animated table col/section/row background (Closed)
Patch Set: - 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/core/layout/LayoutObject.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
index e92c28fd043fb0e31cfce4757ce9deaa4e8e96d0..c4bc1dcd7bdf96640eb76f6ad202c34f5e0d966b 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -1676,6 +1676,9 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
void setShouldDoFullPaintInvalidation(PaintInvalidationReason reason) {
m_layoutObject.setShouldDoFullPaintInvalidation(reason);
}
+ void setBackgroundChangedSinceLastPaintInvalidation() {
+ m_layoutObject.setBackgroundChangedSinceLastPaintInvalidation();
+ }
void ensureIsReadyForPaintInvalidation() {
m_layoutObject.ensureIsReadyForPaintInvalidation();
}
@@ -1792,6 +1795,13 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
return m_bitfields.hasPreviousBoxGeometries();
}
+ bool backgroundChangedSinceLastPaintInvalidation() const {
+ return m_bitfields.backgroundChangedSinceLastPaintInvalidation();
+ }
+ void setBackgroundChangedSinceLastPaintInvalidation() {
+ m_bitfields.setBackgroundChangedSinceLastPaintInvalidation(true);
+ }
+
protected:
enum LayoutObjectType {
LayoutObjectBr,
@@ -1925,9 +1935,10 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
m_previousVisualRect = rect;
}
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
virtual bool paintInvalidationStateIsDirty() const {
- return shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState();
+ return backgroundChangedSinceLastPaintInvalidation() ||
+ shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState();
}
#endif
@@ -2135,6 +2146,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
m_hasPreviousSelectionVisualRect(false),
m_hasPreviousBoxGeometries(false),
m_needsPaintPropertyUpdate(true),
+ m_backgroundChangedSinceLastPaintInvalidation(false),
m_positionedState(IsStaticallyPositioned),
m_selectionState(SelectionNone),
m_backgroundObscurationState(BackgroundObscurationStatusInvalid),
@@ -2307,9 +2319,12 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
// LayoutObject::needsPaintPropertyUpdate().
ADD_BOOLEAN_BITFIELD(needsPaintPropertyUpdate, NeedsPaintPropertyUpdate);
+ ADD_BOOLEAN_BITFIELD(backgroundChangedSinceLastPaintInvalidation,
+ BackgroundChangedSinceLastPaintInvalidation);
+
protected:
// Use protected to avoid warning about unused variable.
- unsigned m_unusedBits : 9;
+ unsigned m_unusedBits : 8;
private:
// This is the cached 'position' value of this object
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698