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

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

Issue 1826853007: LayoutBox::mapContentsRectToVisibleRectInBorderBoxSpace() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pi
Patch Set: Enable comparison, DO NOT CQ 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 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 LayoutPoint topLeft = rect.location(); 1091 LayoutPoint topLeft = rect.location();
1092 1092
1093 if (style()->hasInFlowPosition() && layer()) { 1093 if (style()->hasInFlowPosition() && layer()) {
1094 // Apply the in-flow position offset when invalidating a rectangle. The layer 1094 // Apply the in-flow position offset when invalidating a rectangle. The layer
1095 // is translated, but the layout box isn't, so we need to do this to get the 1095 // is translated, but the layout box isn't, so we need to do this to get the
1096 // right dirty rect. Since this is called from LayoutObject::setStyle, t he relative position 1096 // right dirty rect. Since this is called from LayoutObject::setStyle, t he relative position
1097 // flag on the LayoutObject has been cleared, so use the one on the styl e(). 1097 // flag on the LayoutObject has been cleared, so use the one on the styl e().
1098 topLeft += layer()->offsetForInFlowPosition(); 1098 topLeft += layer()->offsetForInFlowPosition();
1099 } 1099 }
1100 1100
1101 // FIXME: We ignore the lightweight clipping rect that controls use, since i f |o| is in mid-layout,
1102 // its controlClipRect will be wrong. For overflow clip we use the values ca ched by the layer.
1103 rect.setLocation(topLeft); 1101 rect.setLocation(topLeft);
1104 if (container->hasOverflowClip()) { 1102
1103 if (container->isBox()) {
1105 LayoutBox* containerBox = toLayoutBox(container); 1104 LayoutBox* containerBox = toLayoutBox(container);
1106 containerBox->mapScrollingContentsRectToBoxSpace(rect); 1105 if (!containerBox->mapContentsRectToVisibleRectInBorderBoxSpace(rect, vi sibleRectFlags))
1107 if (container != ancestor && !containerBox->applyOverflowClip(rect, visi bleRectFlags))
1108 return false; 1106 return false;
1107
1108 if (containerBox == ancestor || containerBox->isWritingModeRoot())
1109 containerBox->flipForWritingMode(rect);
1109 } 1110 }
1110 1111
1111 if (ancestorSkipped) { 1112 if (ancestorSkipped) {
1112 // If the paintInvalidationContainer is below o, then we need to map the rect into paintInvalidationContainer's coordinates. 1113 // If the paintInvalidationContainer is below o, then we need to map the rect into paintInvalidationContainer's coordinates.
1113 LayoutSize containerOffset = ancestor->offsetFromAncestorContainer(conta iner); 1114 LayoutSize containerOffset = ancestor->offsetFromAncestorContainer(conta iner);
1114 rect.move(-containerOffset); 1115 rect.move(-containerOffset);
1115 return true; 1116 return true;
1116 } 1117 }
1117 1118
1118 return container->mapToVisibleRectInAncestorSpace(ancestor, rect, visibleRec tFlags); 1119 return container->mapToVisibleRectInAncestorSpace(ancestor, rect, visibleRec tFlags);
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 1370
1370 void LayoutInline::invalidateDisplayItemClients(const LayoutBoxModelObject& pain tInvalidationContainer, PaintInvalidationReason invalidationReason) const 1371 void LayoutInline::invalidateDisplayItemClients(const LayoutBoxModelObject& pain tInvalidationContainer, PaintInvalidationReason invalidationReason) const
1371 { 1372 {
1372 LayoutBoxModelObject::invalidateDisplayItemClients(paintInvalidationContaine r, invalidationReason); 1373 LayoutBoxModelObject::invalidateDisplayItemClients(paintInvalidationContaine r, invalidationReason);
1373 1374
1374 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) 1375 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox())
1375 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in validationReason); 1376 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in validationReason);
1376 } 1377 }
1377 1378
1378 } // namespace blink 1379 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698