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

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

Issue 854563005: Remove some unused paint invalidation members from RenderObject. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: add a bit more 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 | « sky/engine/core/rendering/RenderParagraph.h ('k') | sky/engine/core/rendering/line/LineLayoutState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderParagraph.cpp
diff --git a/sky/engine/core/rendering/RenderParagraph.cpp b/sky/engine/core/rendering/RenderParagraph.cpp
index f17d9abc8b970ad069f3015d13bf2aec0884bba2..a96e1c1fb0d77108ea21e2b478b22a519573b691 100644
--- a/sky/engine/core/rendering/RenderParagraph.cpp
+++ b/sky/engine/core/rendering/RenderParagraph.cpp
@@ -705,7 +705,6 @@ static void deleteLineRange(LineLayoutState& layoutState, RootInlineBox* startLi
{
RootInlineBox* boxToDelete = startLine;
while (boxToDelete && boxToDelete != stopLine) {
- layoutState.updatePaintInvalidationRangeFromBox(boxToDelete);
// Note: deleteLineRange(firstRootBox()) is not identical to deleteLineBoxTree().
// deleteLineBoxTree uses nextLineBox() instead of nextRootBox() when traversing.
RootInlineBox* next = boxToDelete->nextRootBox();
@@ -727,11 +726,8 @@ void RenderParagraph::layoutRunsAndFloats(LineLayoutState& layoutState)
if (!layoutState.isFullLayout() && startLine)
determineEndPosition(layoutState, startLine, cleanLineStart, cleanLineBidiStatus);
- if (startLine) {
- if (!layoutState.usesPaintInvalidationBounds())
- layoutState.setPaintInvalidationRange(logicalHeight());
+ if (startLine)
deleteLineRange(layoutState, startLine);
- }
layoutRunsAndFloatsInRange(layoutState, resolver, cleanLineStart, cleanLineBidiStatus);
linkToEndLineIfNeeded(layoutState);
@@ -813,11 +809,8 @@ void RenderParagraph::layoutRunsAndFloatsInRange(LineLayoutState& layoutState,
bidiRuns.deleteRuns();
resolver.markCurrentRunEmpty(); // FIXME: This can probably be replaced by an ASSERT (or just removed).
- if (lineBox) {
+ if (lineBox)
lineBox->setLineBreakInfo(endOfLine.object(), endOfLine.offset(), resolver.status());
- if (layoutState.usesPaintInvalidationBounds())
- layoutState.updatePaintInvalidationRangeFromBox(lineBox);
- }
}
for (size_t i = 0; i < lineBreaker.positionedObjects().size(); ++i)
@@ -839,10 +832,8 @@ void RenderParagraph::linkToEndLineIfNeeded(LineLayoutState& layoutState)
LayoutUnit delta = logicalHeight() - layoutState.endLineLogicalTop();
for (RootInlineBox* line = layoutState.endLine(); line; line = line->nextRootBox()) {
line->attachLine();
- if (delta) {
- layoutState.updatePaintInvalidationRangeFromBox(line, delta);
+ if (delta)
line->adjustBlockDirectionPosition(delta.toFloat());
- }
}
setLogicalHeight(lastRootBox()->lineBottomWithLeading());
} else {
@@ -1243,12 +1234,12 @@ int RenderParagraph::lastLineBoxBaseline(LineDirectionMode lineDirection) const
return -1;
}
-void RenderParagraph::layoutChildren(bool relayoutChildren, SubtreeLayoutScope& layoutScope, LayoutUnit& paintInvalidationLogicalTop, LayoutUnit& paintInvalidationLogicalBottom, LayoutUnit beforeEdge, LayoutUnit afterEdge)
+void RenderParagraph::layoutChildren(bool relayoutChildren, SubtreeLayoutScope& layoutScope, LayoutUnit beforeEdge, LayoutUnit afterEdge)
{
// Figure out if we should clear out our line boxes.
// FIXME: Handle resize eventually!
bool isFullLayout = !firstLineBox() || selfNeedsLayout() || relayoutChildren;
- LineLayoutState layoutState(isFullLayout, paintInvalidationLogicalTop, paintInvalidationLogicalBottom);
+ LineLayoutState layoutState(isFullLayout);
if (isFullLayout)
lineBoxes()->deleteLineBoxes();
« no previous file with comments | « sky/engine/core/rendering/RenderParagraph.h ('k') | sky/engine/core/rendering/line/LineLayoutState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698