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

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

Issue 2786463004: Paint backgrounds of a table section/row in one display item (Closed)
Patch Set: - Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutTableBoxComponent.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableBoxComponent.h b/third_party/WebKit/Source/core/layout/LayoutTableBoxComponent.h
index d5b97199af8b343d99a162dc15fc421f3bbfb367..3f5c49dcfb86e3a8efbb65474358313507d7ac04 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableBoxComponent.h
+++ b/third_party/WebKit/Source/core/layout/LayoutTableBoxComponent.h
@@ -7,6 +7,8 @@
#include "core/CoreExport.h"
#include "core/layout/LayoutBox.h"
+#include "core/paint/PaintResult.h"
+#include "platform/graphics/paint/CullRect.h"
namespace blink {
@@ -20,8 +22,22 @@ class CORE_EXPORT LayoutTableBoxComponent : public LayoutBox {
const StyleDifference&,
const ComputedStyle& oldStyle);
+ class MutableForPainting : public LayoutObject::MutableForPainting {
+ public:
+ void updatePaintResult(PaintResult, const CullRect& paintRect);
+
+ private:
+ friend class LayoutTableBoxComponent;
+ MutableForPainting(const LayoutTableBoxComponent& box)
+ : LayoutObject::MutableForPainting(box) {}
+ };
+ MutableForPainting getMutableForPainting() const {
+ return MutableForPainting(*this);
+ }
+
protected:
- explicit LayoutTableBoxComponent(Element* element) : LayoutBox(element) {}
+ explicit LayoutTableBoxComponent(Element* element)
+ : LayoutBox(element), m_lastPaintResult(FullyPainted) {}
const LayoutObjectChildList* children() const { return &m_children; }
LayoutObjectChildList* children() { return &m_children; }
@@ -46,6 +62,10 @@ class CORE_EXPORT LayoutTableBoxComponent : public LayoutBox {
}
LayoutObjectChildList m_children;
+
+ friend class MutableForPainting;
+ PaintResult m_lastPaintResult;
+ CullRect m_lastPaintRect;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698