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

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

Issue 734813004: Get rid of continuations. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/RenderBlock.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 a64a13a3696ef7eb04859c8794ae032a1084dcdc..229dc58de0807838e70c4c4183b86fd52795ea2b 100644
--- a/sky/engine/core/rendering/InlineFlowBox.cpp
+++ b/sky/engine/core/rendering/InlineFlowBox.cpp
@@ -300,9 +300,9 @@ void InlineFlowBox::determineSpacingForFlowBoxes(bool lastLine, bool isLogically
bool ltr = renderer().style()->isLeftToRightDirection();
// Check to see if all initial lines are unconstructed. If so, then
- // we know the inline began on this line (unless we are a continuation).
+ // we know the inline began on this line.
RenderLineBoxList* lineBoxList = rendererLineBoxes();
- if (!lineBoxList->firstLineBox()->isConstructed() && !renderer().isInlineElementContinuation()) {
+ if (!lineBoxList->firstLineBox()->isConstructed()) {
if (renderer().style()->boxDecorationBreak() == DCLONE)
includeLeftEdge = includeRightEdge = true;
else if (ltr && lineBoxList->firstLineBox() == this)
@@ -312,7 +312,6 @@ void InlineFlowBox::determineSpacingForFlowBoxes(bool lastLine, bool isLogically
}
if (!lineBoxList->lastLineBox()->isConstructed()) {
- RenderInline& inlineFlow = toRenderInline(renderer());
bool isLastObjectOnLine = !isAnsectorAndWithinBlock(&renderer(), logicallyLastRunRenderer) || (isLastChildForRenderer(&renderer(), logicallyLastRunRenderer) && !isLogicallyLastRunWrapped);
// We include the border under these conditions:
@@ -324,11 +323,11 @@ void InlineFlowBox::determineSpacingForFlowBoxes(bool lastLine, bool isLogically
includeLeftEdge = includeRightEdge = true;
else if (ltr) {
if (!nextLineBox()
- && ((lastLine || isLastObjectOnLine) && !inlineFlow.continuation()))
+ && (lastLine || isLastObjectOnLine))
includeRightEdge = true;
} else {
if ((!prevLineBox() || prevLineBox()->isConstructed())
- && ((lastLine || isLastObjectOnLine) && !inlineFlow.continuation()))
+ && (lastLine || isLastObjectOnLine))
includeLeftEdge = true;
}
}
@@ -998,40 +997,10 @@ void InlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset,
if (!paintInfo.rect.intersects(pixelSnappedIntRect(overflowRect)))
return;
- if (paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline) {
- // Add ourselves to the paint info struct's list of inlines that need to paint their
- // outlines.
- if (renderer().style()->hasOutline() && !isRootInlineBox()) {
- RenderInline& inlineFlow = toRenderInline(renderer());
-
- RenderBlock* cb = 0;
- bool containingBlockPaintsContinuationOutline = inlineFlow.continuation() || inlineFlow.isInlineElementContinuation();
- if (containingBlockPaintsContinuationOutline) {
- // FIXME: See https://bugs.webkit.org/show_bug.cgi?id=54690. We currently don't reconnect inline continuations
- // after a child removal. As a result, those merged inlines do not get seperated and hence not get enclosed by
- // anonymous blocks. In this case, it is better to bail out and paint it ourself.
- RenderBlock* enclosingAnonymousBlock = renderer().containingBlock();
- if (!enclosingAnonymousBlock->isAnonymousBlock()) {
- containingBlockPaintsContinuationOutline = false;
- } else {
- cb = enclosingAnonymousBlock->containingBlock();
- for (RenderBoxModelObject* box = boxModelObject(); box != cb; box = box->parent()->enclosingBoxModelObject()) {
- if (box->hasSelfPaintingLayer()) {
- containingBlockPaintsContinuationOutline = false;
- break;
- }
- }
- }
- }
-
- if (containingBlockPaintsContinuationOutline) {
- // Add ourselves to the containing block of the entire continuation so that it can
- // paint us atomically.
- cb->addContinuationWithOutline(toRenderInline(renderer().node()->renderer()));
- } else if (!inlineFlow.isInlineElementContinuation()) {
- paintInfo.outlineObjects()->add(&inlineFlow);
- }
- }
+ if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline)
+ && renderer().style()->hasOutline() && !isRootInlineBox()) {
+ RenderInline& inlineFlow = toRenderInline(renderer());
+ paintInfo.outlineObjects()->add(&inlineFlow);
} else if (paintInfo.phase == PaintPhaseMask) {
paintMask(paintInfo, paintOffset);
return;
« no previous file with comments | « no previous file | sky/engine/core/rendering/RenderBlock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698