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

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

Issue 2073563002: Rework mapToVisualRectInAncestorSpace to handle flipped blocks correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to head. Created 4 years, 5 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 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 // is translated, but the layout box isn't, so we need to do this to get the 1091 // is translated, but the layout box isn't, so we need to do this to get the
1092 // right dirty rect. Since this is called from LayoutObject::setStyle, t he relative position 1092 // right dirty rect. Since this is called from LayoutObject::setStyle, t he relative position
1093 // flag on the LayoutObject has been cleared, so use the one on the styl e(). 1093 // flag on the LayoutObject has been cleared, so use the one on the styl e().
1094 topLeft += layer()->offsetForInFlowPosition(); 1094 topLeft += layer()->offsetForInFlowPosition();
1095 } 1095 }
1096 1096
1097 // FIXME: We ignore the lightweight clipping rect that controls use, since i f |o| is in mid-layout, 1097 // FIXME: We ignore the lightweight clipping rect that controls use, since i f |o| is in mid-layout,
1098 // its controlClipRect will be wrong. For overflow clip we use the values ca ched by the layer. 1098 // its controlClipRect will be wrong. For overflow clip we use the values ca ched by the layer.
1099 rect.setLocation(topLeft); 1099 rect.setLocation(topLeft);
1100 1100
1101 if (container->isBox() && !toLayoutBox(container)->mapScrollingContentsRectT oBoxSpace(rect, container == ancestor ? ApplyNonScrollOverflowClip : ApplyOverfl owClip, visualRectFlags)) 1101 LayoutBox* containerBox = container->isBox() ? toLayoutBox(container) : null ptr;
1102 if (containerBox && !containerBox->mapScrollingContentsRectToBoxSpace(rect, container == ancestor ? ApplyNonScrollOverflowClip : ApplyOverflowClip, visualRe ctFlags))
1102 return false; 1103 return false;
1103 1104
1105 if (containerBox)
1106 containerBox->flipForWritingMode(rect);
1104 return container->mapToVisualRectInAncestorSpace(ancestor, rect, visualRectF lags); 1107 return container->mapToVisualRectInAncestorSpace(ancestor, rect, visualRectF lags);
1105 } 1108 }
1106 1109
1107 LayoutSize LayoutInline::offsetFromContainer(const LayoutObject* container) cons t 1110 LayoutSize LayoutInline::offsetFromContainer(const LayoutObject* container) cons t
1108 { 1111 {
1109 ASSERT(container == this->container()); 1112 ASSERT(container == this->container());
1110 1113
1111 LayoutSize offset; 1114 LayoutSize offset;
1112 if (isInFlowPositioned()) 1115 if (isInFlowPositioned())
1113 offset += offsetForInFlowPosition(); 1116 offset += offsetForInFlowPosition();
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1355 1358
1356 void LayoutInline::invalidateDisplayItemClients(PaintInvalidationReason invalida tionReason) const 1359 void LayoutInline::invalidateDisplayItemClients(PaintInvalidationReason invalida tionReason) const
1357 { 1360 {
1358 LayoutBoxModelObject::invalidateDisplayItemClients(invalidationReason); 1361 LayoutBoxModelObject::invalidateDisplayItemClients(invalidationReason);
1359 1362
1360 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) 1363 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox())
1361 invalidateDisplayItemClient(*box, invalidationReason); 1364 invalidateDisplayItemClient(*box, invalidationReason);
1362 } 1365 }
1363 1366
1364 } // namespace blink 1367 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFlowThread.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698