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

Unified Diff: Source/core/rendering/RenderBox.h

Issue 16402019: Remove clips where we can show that they are unnecessary. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: NeedsRebaseline for Mac Created 7 years, 5 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: Source/core/rendering/RenderBox.h
diff --git a/Source/core/rendering/RenderBox.h b/Source/core/rendering/RenderBox.h
index 24562dc32f82d82a9400e8d74a6ec4f6c3fdc9b2..f704c7639bf676e60317f6bbf06b469674fa11a7 100644
--- a/Source/core/rendering/RenderBox.h
+++ b/Source/core/rendering/RenderBox.h
@@ -40,6 +40,9 @@ enum OverlayScrollbarSizeRelevancy { IgnoreOverlayScrollbarSize, IncludeOverlayS
enum ShouldComputePreferred { ComputeActual, ComputePreferred };
+enum VisualOverflowClipBehavior { VisualOverflowNotClipped, VisualOverflowClippedByContentsClip };
+enum ContentsClipBehavior { ContentsClipRequired, ContentsClipAutomatic };
+
class RenderBox : public RenderBoxModelObject {
public:
explicit RenderBox(ContainerNode*);
@@ -186,8 +189,10 @@ public:
LayoutRect overflowRectForPaintRejection() const;
+ LayoutRect contentsVisualOverflowRect() const { return m_overflow ? m_overflow->contentsVisualOverflowRect() : LayoutRect(); }
+
void addLayoutOverflow(const LayoutRect&);
- void addVisualOverflow(const LayoutRect&);
+ void addVisualOverflow(const LayoutRect&, VisualOverflowClipBehavior);
Julien - ping for review 2013/08/07 00:17:08 I would rather see 2 functions instead of adding a
jbroman 2013/08/08 14:35:39 Done.
void addVisualEffectOverflow();
void addOverflowFromChild(RenderBox* child) { addOverflowFromChild(child, child->locationOffset()); }
@@ -470,7 +475,7 @@ public:
LayoutRect clipRect(const LayoutPoint& location, RenderRegion*);
virtual bool hasControlClip() const { return false; }
virtual LayoutRect controlClipRect(const LayoutPoint&) const { return LayoutRect(); }
- bool pushContentsClip(PaintInfo&, const LayoutPoint& accumulatedOffset);
+ bool pushContentsClip(PaintInfo&, const LayoutPoint& accumulatedOffset, ContentsClipBehavior = ContentsClipRequired);
void popContentsClip(PaintInfo&, PaintPhase originalPhase, const LayoutPoint& accumulatedOffset);
virtual void paintObject(PaintInfo&, const LayoutPoint&) { ASSERT_NOT_REACHED(); }

Powered by Google App Engine
This is Rietveld 408576698