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

Unified Diff: sky/engine/core/rendering/RenderBlock.cpp

Issue 883583003: Remove dead control clip code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | sky/engine/core/rendering/RenderBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBlock.cpp
diff --git a/sky/engine/core/rendering/RenderBlock.cpp b/sky/engine/core/rendering/RenderBlock.cpp
index 2314f3b0b79704f69283e4e2d508f3816d9b436c..f318b67d373ae58b4da2df3ebd7f0d757cdbdd7f 100644
--- a/sky/engine/core/rendering/RenderBlock.cpp
+++ b/sky/engine/core/rendering/RenderBlock.cpp
@@ -306,14 +306,8 @@ void RenderBlock::updateScrollInfoAfterLayout()
void RenderBlock::layout()
{
- // Table cells call layoutBlock directly, so don't add any logic here. Put code into
- // layoutBlock().
+ // FIXME(sky): Inline layoutBlock here and get rid of it.
layoutBlock(false);
-
- // It's safe to check for control clip here, since controls can never be table cells.
- // If we have a lightweight clip, there can never be any overflow from children.
- if (hasControlClip() && m_overflow)
- clearLayoutOverflow();
}
bool RenderBlock::widthAvailableToChildrenHasChanged()
@@ -532,7 +526,7 @@ void RenderBlock::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
// There are some cases where not all clipped visual overflow is accounted for.
// FIXME: reduce the number of such cases.
ContentsClipBehavior contentsClipBehavior = ForceContentsClip;
- if (hasOverflowClip() && !hasControlClip() && !(shouldPaintSelectionGaps() && phase == PaintPhaseForeground) && !hasCaret())
+ if (hasOverflowClip() && !(shouldPaintSelectionGaps() && phase == PaintPhaseForeground) && !hasCaret())
contentsClipBehavior = SkipContentsClipIfPossible;
bool pushedClip = pushContentsClip(paintInfo, adjustedPaintOffset, contentsClipBehavior);
@@ -1194,18 +1188,13 @@ bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu
// If we have clipping, then we can't have any spillout.
bool useOverflowClip = hasOverflowClip() && !hasSelfPaintingLayer();
- bool useClip = (hasControlClip() || useOverflowClip);
- bool checkChildren = !useClip;
+ bool checkChildren = !useOverflowClip;
if (!checkChildren) {
- if (hasControlClip()) {
- checkChildren = locationInContainer.intersects(controlClipRect(adjustedLocation));
- } else {
- LayoutRect clipRect = overflowClipRect(adjustedLocation);
- if (style()->hasBorderRadius())
- checkChildren = locationInContainer.intersects(style()->getRoundedBorderFor(clipRect));
- else
- checkChildren = locationInContainer.intersects(clipRect);
- }
+ LayoutRect clipRect = overflowClipRect(adjustedLocation);
+ if (style()->hasBorderRadius())
+ checkChildren = locationInContainer.intersects(style()->getRoundedBorderFor(clipRect));
+ else
+ checkChildren = locationInContainer.intersects(clipRect);
}
if (checkChildren) {
// Hit test descendants first.
@@ -1764,7 +1753,7 @@ void RenderBlock::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& a
if (width() && height())
rects.append(pixelSnappedIntRect(additionalOffset, size()));
- if (!hasOverflowClip() && !hasControlClip()) {
+ if (!hasOverflowClip()) {
for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox()) {
LayoutUnit top = std::max<LayoutUnit>(curr->lineTop(), curr->top());
LayoutUnit bottom = std::min<LayoutUnit>(curr->lineBottom(), curr->top() + curr->height());
« no previous file with comments | « no previous file | sky/engine/core/rendering/RenderBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698