Index: third_party/WebKit/Source/core/layout/LayoutTableBoxComponent.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableBoxComponent.cpp b/third_party/WebKit/Source/core/layout/LayoutTableBoxComponent.cpp |
index 3a4bf18879baaedeb302bda9eb6014d0ed1337bb..b0edfa4585c08bb99dc2db504f1b30f7ffb21d81 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutTableBoxComponent.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutTableBoxComponent.cpp |
@@ -5,6 +5,7 @@ |
#include "core/layout/LayoutTableBoxComponent.h" |
#include "core/layout/LayoutTable.h" |
+#include "core/paint/ObjectPaintInvalidator.h" |
#include "core/style/ComputedStyle.h" |
namespace blink { |
@@ -25,4 +26,23 @@ bool LayoutTableBoxComponent::doCellsHaveDirtyWidth( |
!oldStyle.border().sizeEquals(tablePart.style()->border()); |
} |
+void LayoutTableBoxComponent::MutableForPainting::updatePaintResult( |
chrishtr
2017/04/03 17:10:51
This method is new in this CL, right? I'm not sure
Xianzhu
2017/04/03 17:23:05
Previously for any display item, we either paint i
|
+ PaintResult paintResult, |
+ const CullRect& paintRect) { |
+ // A table row or section may paint large background display item which |
+ // contains paint operations of the background in each contained cell. |
+ // The display item can be clipped by the paint rect to avoid painting |
+ // on areas not interested. If we didn't fully paint and paint rect changes, |
+ // we need to invalidate the display item. |
+ auto& box = static_cast<LayoutTableBoxComponent&>(m_layoutObject); |
chrishtr
2017/04/03 17:53:25
I think you need a setNeedsRepaint also on the pai
|
+ if (box.m_lastPaintResult != FullyPainted && |
+ box.m_lastPaintRect != paintRect) { |
+ ObjectPaintInvalidator(m_layoutObject) |
+ .invalidateDisplayItemClient(m_layoutObject, PaintInvalidationFull); |
+ } |
+ |
+ box.m_lastPaintResult = paintResult; |
+ box.m_lastPaintRect = paintRect; |
+} |
+ |
} // namespace blink |