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

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

Issue 2150143002: Don't over-flip when mapping visual rects for Ruby text. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rework tests to use Ahem. 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
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/ruby-text-flipped-blocks-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 } 1089 }
1090 1090
1091 // FIXME: We ignore the lightweight clipping rect that controls use, since i f |o| is in mid-layout, 1091 // FIXME: We ignore the lightweight clipping rect that controls use, since i f |o| is in mid-layout,
1092 // its controlClipRect will be wrong. For overflow clip we use the values ca ched by the layer. 1092 // its controlClipRect will be wrong. For overflow clip we use the values ca ched by the layer.
1093 rect.setLocation(topLeft); 1093 rect.setLocation(topLeft);
1094 1094
1095 LayoutBox* containerBox = container->isBox() ? toLayoutBox(container) : null ptr; 1095 LayoutBox* containerBox = container->isBox() ? toLayoutBox(container) : null ptr;
1096 if (containerBox && !containerBox->mapScrollingContentsRectToBoxSpace(rect, container == ancestor ? ApplyNonScrollOverflowClip : ApplyOverflowClip, visualRe ctFlags)) 1096 if (containerBox && !containerBox->mapScrollingContentsRectToBoxSpace(rect, container == ancestor ? ApplyNonScrollOverflowClip : ApplyOverflowClip, visualRe ctFlags))
1097 return false; 1097 return false;
1098 1098
1099 if (containerBox) 1099 // Ruby text is implemented as an inline block containing the text and
1100 // annotations (if any). The rect will already be flipped as necessary by
1101 // the containing LayoutRuby{Text,Base} boxes, so we need to make sure we do
1102 // not flip again for the LayoutRuby container. See also
1103 // https://www.w3.org/TR/css-ruby-1/#ruby-container
1104 if (containerBox && !isRuby())
1100 containerBox->flipForWritingMode(rect); 1105 containerBox->flipForWritingMode(rect);
1101 return container->mapToVisualRectInAncestorSpace(ancestor, rect, visualRectF lags); 1106 return container->mapToVisualRectInAncestorSpace(ancestor, rect, visualRectF lags);
1102 } 1107 }
1103 1108
1104 LayoutSize LayoutInline::offsetFromContainer(const LayoutObject* container) cons t 1109 LayoutSize LayoutInline::offsetFromContainer(const LayoutObject* container) cons t
1105 { 1110 {
1106 ASSERT(container == this->container()); 1111 ASSERT(container == this->container());
1107 1112
1108 LayoutSize offset; 1113 LayoutSize offset;
1109 if (isInFlowPositioned()) 1114 if (isInFlowPositioned())
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 1357
1353 void LayoutInline::invalidateDisplayItemClients(PaintInvalidationReason invalida tionReason) const 1358 void LayoutInline::invalidateDisplayItemClients(PaintInvalidationReason invalida tionReason) const
1354 { 1359 {
1355 LayoutBoxModelObject::invalidateDisplayItemClients(invalidationReason); 1360 LayoutBoxModelObject::invalidateDisplayItemClients(invalidationReason);
1356 1361
1357 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) 1362 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox())
1358 invalidateDisplayItemClient(*box, invalidationReason); 1363 invalidateDisplayItemClient(*box, invalidationReason);
1359 } 1364 }
1360 1365
1361 } // namespace blink 1366 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/ruby-text-flipped-blocks-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698