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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutInline.cpp

Issue 1820483002: Untangle multicol coordinate space conversion from offsetFromContainer(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address code review comment. Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 if (ancestorSkipped) { 1121 if (ancestorSkipped) {
1122 // If the paintInvalidationContainer is below o, then we need to map the rect into paintInvalidationContainer's coordinates. 1122 // If the paintInvalidationContainer is below o, then we need to map the rect into paintInvalidationContainer's coordinates.
1123 LayoutSize containerOffset = ancestor->offsetFromAncestorContainer(conta iner); 1123 LayoutSize containerOffset = ancestor->offsetFromAncestorContainer(conta iner);
1124 rect.move(-containerOffset); 1124 rect.move(-containerOffset);
1125 return; 1125 return;
1126 } 1126 }
1127 1127
1128 container->mapToVisibleRectInAncestorSpace(ancestor, rect, paintInvalidation State); 1128 container->mapToVisibleRectInAncestorSpace(ancestor, rect, paintInvalidation State);
1129 } 1129 }
1130 1130
1131 LayoutSize LayoutInline::offsetFromContainer(const LayoutObject* container, cons t LayoutPoint& point, bool* offsetDependsOnPoint) const 1131 LayoutSize LayoutInline::offsetFromContainer(const LayoutObject* container) cons t
1132 { 1132 {
1133 ASSERT(container == this->container()); 1133 ASSERT(container == this->container());
1134 1134
1135 LayoutSize offset; 1135 LayoutSize offset;
1136 if (isInFlowPositioned()) 1136 if (isInFlowPositioned())
1137 offset += offsetForInFlowPosition(); 1137 offset += offsetForInFlowPosition();
1138 1138
1139 offset += container->columnOffset(point);
1140
1141 if (container->hasOverflowClip()) 1139 if (container->hasOverflowClip())
1142 offset -= toLayoutBox(container)->scrolledContentOffset(); 1140 offset -= toLayoutBox(container)->scrolledContentOffset();
1143 1141
1144 if (offsetDependsOnPoint)
1145 *offsetDependsOnPoint = (container->isBox() && container->style()->isFli ppedBlocksWritingMode()) || container->isLayoutFlowThread();
1146
1147 return offset; 1142 return offset;
1148 } 1143 }
1149 1144
1150 PaintLayerType LayoutInline::layerTypeRequired() const 1145 PaintLayerType LayoutInline::layerTypeRequired() const
1151 { 1146 {
1152 return isInFlowPositioned() || createsGroup() || hasClipPath() || style()->s houldCompositeForCurrentAnimations() 1147 return isInFlowPositioned() || createsGroup() || hasClipPath() || style()->s houldCompositeForCurrentAnimations()
1153 || style()->hasCompositorProxy() || style()->containsPaint() ? NormalPa intLayer : NoPaintLayer; 1148 || style()->hasCompositorProxy() || style()->containsPaint() ? NormalPa intLayer : NoPaintLayer;
1154 } 1149 }
1155 1150
1156 void LayoutInline::updateDragState(bool dragOn) 1151 void LayoutInline::updateDragState(bool dragOn)
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 1379
1385 void LayoutInline::invalidateDisplayItemClients(const LayoutBoxModelObject& pain tInvalidationContainer, PaintInvalidationReason invalidationReason) const 1380 void LayoutInline::invalidateDisplayItemClients(const LayoutBoxModelObject& pain tInvalidationContainer, PaintInvalidationReason invalidationReason) const
1386 { 1381 {
1387 LayoutBoxModelObject::invalidateDisplayItemClients(paintInvalidationContaine r, invalidationReason); 1382 LayoutBoxModelObject::invalidateDisplayItemClients(paintInvalidationContaine r, invalidationReason);
1388 1383
1389 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) 1384 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox())
1390 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in validationReason); 1385 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in validationReason);
1391 } 1386 }
1392 1387
1393 } // namespace blink 1388 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutInline.h ('k') | third_party/WebKit/Source/core/layout/LayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698