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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 1700743002: Merge most of LayoutBox::mapLocalToAncestor() into LayoutObject. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 064d62fdaae57e81b13f532ed770c95803dd9874..53ae6f1cd7380ef4dc81125fae392c8c0dad49dd 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -2205,23 +2205,32 @@ void LayoutObject::mapLocalToAncestor(const LayoutBoxModelObject* ancestor, Tran
if (paintInvalidationState && paintInvalidationState->canMapToContainer(ancestor)) {
LayoutSize offset = paintInvalidationState->paintOffset();
+ if (const LayoutBox* layoutBox = isBox() ? toLayoutBox(this) : nullptr)
+ offset += layoutBox->locationOffset();
if (const PaintLayer* layer = style()->hasInFlowPosition() && hasLayer() ? toLayoutBoxModelObject(this)->layer() : nullptr)
offset += layer->offsetForInFlowPosition();
transformState.move(offset);
return;
}
+ if (wasFixed)
+ *wasFixed = mode & IsFixed;
+
bool containerSkipped;
const LayoutObject* o = container(ancestor, &containerSkipped);
if (!o)
return;
- if (mode & ApplyContainerFlip && o->isBox()) {
- if (o->style()->isFlippedBlocksWritingMode()) {
- IntPoint centerPoint = roundedIntPoint(transformState.mappedPoint());
- transformState.move(toLayoutBox(o)->flipForWritingMode(LayoutPoint(centerPoint)) - centerPoint);
+ if (mode & ApplyContainerFlip) {
+ if (isBox()) {
+ mode &= ~ApplyContainerFlip;
+ } else if (o->isBox()) {
+ if (o->style()->isFlippedBlocksWritingMode()) {
+ IntPoint centerPoint = roundedIntPoint(transformState.mappedPoint());
+ transformState.move(toLayoutBox(o)->flipForWritingMode(LayoutPoint(centerPoint)) - centerPoint);
+ }
+ mode &= ~ApplyContainerFlip;
}
- mode &= ~ApplyContainerFlip;
}
LayoutSize containerOffset = offsetFromContainer(o, roundedLayoutPoint(transformState.mappedPoint()));
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698