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

Unified Diff: Source/core/layout/LayoutBox.cpp

Issue 1158183006: Remove the old multicol implementation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase master Created 5 years, 6 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 | « Source/core/layout/LayoutBox.h ('k') | Source/core/layout/LayoutBoxModelObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutBox.cpp
diff --git a/Source/core/layout/LayoutBox.cpp b/Source/core/layout/LayoutBox.cpp
index ea880276d2887d938e1f40ae614c80b2e7e918ae..6030e27359c3110a6aba4d1a1b94e35d3a6748fb 100644
--- a/Source/core/layout/LayoutBox.cpp
+++ b/Source/core/layout/LayoutBox.cpp
@@ -1665,29 +1665,15 @@ LayoutSize LayoutBox::offsetFromContainer(const LayoutObject* o, const LayoutPoi
offset += offsetForInFlowPosition();
if (!isInline() || isReplaced()) {
- if (!style()->hasOutOfFlowPosition() && o->hasColumns()) {
- const LayoutBlock* block = toLayoutBlock(o);
- LayoutRect columnRect(frameRect());
- block->adjustStartEdgeForWritingModeIncludingColumns(columnRect);
- offset += toSize(columnRect.location());
- LayoutPoint columnPoint = block->flipForWritingModeIncludingColumns(point + offset);
- offset = toLayoutSize(block->flipForWritingModeIncludingColumns(toLayoutPoint(offset)));
- offset += o->columnOffset(columnPoint);
- offset = block->flipForWritingMode(offset);
-
+ offset += topLeftLocationOffset();
+ if (o->isLayoutFlowThread()) {
+ // So far the point has been in flow thread coordinates (i.e. as if everything in
+ // the fragmentation context lived in one tall single column). Convert it to a
+ // visual point now.
+ LayoutPoint pointInContainer = point + offset;
+ offset += o->columnOffset(pointInContainer);
if (offsetDependsOnPoint)
*offsetDependsOnPoint = true;
- } else {
- offset += topLeftLocationOffset();
- if (o->isLayoutFlowThread()) {
- // So far the point has been in flow thread coordinates (i.e. as if everything in
- // the fragmentation context lived in one tall single column). Convert it to a
- // visual point now.
- LayoutPoint pointInContainer = point + offset;
- offset += o->columnOffset(pointInContainer);
- if (offsetDependsOnPoint)
- *offsetDependsOnPoint = true;
- }
}
}
@@ -1869,13 +1855,6 @@ void LayoutBox::mapRectToPaintInvalidationBacking(const LayoutBoxModelObject* pa
topLeft += layer()->offsetForInFlowPosition();
}
- if (position != AbsolutePosition && position != FixedPosition && o->hasColumns() && o->isLayoutBlockFlow()) {
- LayoutRect paintInvalidationRect(topLeft, rect.size());
- toLayoutBlock(o)->adjustRectForColumns(paintInvalidationRect);
- topLeft = paintInvalidationRect.location();
- rect = paintInvalidationRect;
- }
-
// FIXME: We ignore the lightweight clipping rect that controls use, since if |o| is in mid-layout,
// its controlClipRect will be wrong. For overflow clip we use the values cached by the layer.
rect.setLocation(topLeft);
@@ -4556,13 +4535,6 @@ LayoutPoint LayoutBox::flipForWritingModeForChild(const LayoutBox* child, const
return LayoutPoint(point.x() + size().width() - child->size().width() - (2 * child->location().x()), point.y());
}
-LayoutPoint LayoutBox::flipForWritingModeIncludingColumns(const LayoutPoint& point) const
-{
- if (!hasColumns() || !style()->isFlippedBlocksWritingMode())
- return flipForWritingMode(point);
- return toLayoutBlock(this)->flipForWritingModeIncludingColumns(point);
-}
-
LayoutPoint LayoutBox::topLeftLocation() const
{
LayoutBlock* containerBlock = containingBlock();
« no previous file with comments | « Source/core/layout/LayoutBox.h ('k') | Source/core/layout/LayoutBoxModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698