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

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

Issue 953673002: Delete RenderLayerModelObject. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « sky/engine/core/core.gni ('k') | sky/engine/core/rendering/PaintInfo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/InlineFlowBox.cpp
diff --git a/sky/engine/core/rendering/InlineFlowBox.cpp b/sky/engine/core/rendering/InlineFlowBox.cpp
index 3790e3cb35b480aba0dcd2edf343367b05c1a579..b519ade182fc5568323abf09d6aa3d799e31233f 100644
--- a/sky/engine/core/rendering/InlineFlowBox.cpp
+++ b/sky/engine/core/rendering/InlineFlowBox.cpp
@@ -85,6 +85,14 @@ static void setHasTextDescendantsOnAncestors(InlineFlowBox* box)
}
}
+static bool hasSelfPaintingLayer(InlineBox* box)
+{
+ RenderObject& renderer = box->renderer();
+ if (renderer.isBox())
+ return toRenderBox(renderer).hasSelfPaintingLayer();
+ return false;
+}
+
void InlineFlowBox::addToLine(InlineBox* child)
{
ASSERT(!child->parent());
@@ -151,7 +159,7 @@ void InlineFlowBox::addToLine(InlineBox* child)
RenderBox& box = toRenderBox(child->renderer());
if (box.hasRenderOverflow() || box.hasSelfPaintingLayer())
child->clearKnownToHaveNoOverflow();
- } else if (child->renderer().style(isFirstLineStyle())->boxShadow() || child->boxModelObject()->hasSelfPaintingLayer()
+ } else if (child->renderer().style(isFirstLineStyle())->boxShadow() || hasSelfPaintingLayer(child)
|| child->renderer().style(isFirstLineStyle())->hasBorderImageOutsets()
|| child->renderer().style(isFirstLineStyle())->hasOutline()) {
child->clearKnownToHaveNoOverflow();
@@ -889,7 +897,7 @@ void InlineFlowBox::computeOverflow(LayoutUnit lineTop, LayoutUnit lineBottom, G
} else if (curr->renderer().isRenderInline()) {
InlineFlowBox* flow = toInlineFlowBox(curr);
flow->computeOverflow(lineTop, lineBottom, textBoxDataMap);
- if (!flow->boxModelObject()->hasSelfPaintingLayer())
+ if (!hasSelfPaintingLayer(flow))
logicalVisualOverflow.unite(flow->logicalVisualOverflowRect(lineTop, lineBottom));
LayoutRect childLayoutOverflow = flow->logicalLayoutOverflowRect(lineTop, lineBottom);
childLayoutOverflow.move(flow->boxModelObject()->relativePositionLogicalOffset());
@@ -942,7 +950,7 @@ bool InlineFlowBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& re
// We need to account for culled inline parents of the hit-tested nodes, so that they may also get included in area-based hit-tests.
RenderObject* culledParent = 0;
for (InlineBox* curr = lastChild(); curr; curr = curr->prevOnLine()) {
- if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPaintingLayer()) {
+ if (curr->renderer().isText() || !hasSelfPaintingLayer(curr)) {
RenderObject* newParent = 0;
// Culled parents are only relevant for area-based hit-tests, so ignore it in point-based ones.
if (locationInContainer.isRectBasedTest()) {
@@ -1000,7 +1008,7 @@ void InlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset,
paintBoxDecorationBackground(paintInfo, paintOffset);
for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
- if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPaintingLayer())
+ if (curr->renderer().isText() || !hasSelfPaintingLayer(curr))
curr->paint(paintInfo, paintOffset, lineTop, lineBottom, layers);
}
}
« no previous file with comments | « sky/engine/core/core.gni ('k') | sky/engine/core/rendering/PaintInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698