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

Side by Side Diff: sky/engine/core/rendering/RenderText.cpp

Issue 867653005: Remove outline painting on inlines. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 StringBuilder plainTextBuilder; 217 StringBuilder plainTextBuilder;
218 for (InlineTextBox* textBox = firstTextBox(); textBox; textBox = textBox->ne xtTextBox()) { 218 for (InlineTextBox* textBox = firstTextBox(); textBox; textBox = textBox->ne xtTextBox()) {
219 String text = m_text.substring(textBox->start(), textBox->len()).simplif yWhiteSpace(WTF::DoNotStripWhiteSpace); 219 String text = m_text.substring(textBox->start(), textBox->len()).simplif yWhiteSpace(WTF::DoNotStripWhiteSpace);
220 plainTextBuilder.append(text); 220 plainTextBuilder.append(text);
221 if (textBox->nextTextBox() && textBox->nextTextBox()->start() > textBox- >end() && text.length() && !text.right(1).containsOnlyWhitespace()) 221 if (textBox->nextTextBox() && textBox->nextTextBox()->start() > textBox- >end() && text.length() && !text.right(1).containsOnlyWhitespace())
222 plainTextBuilder.append(space); 222 plainTextBuilder.append(space);
223 } 223 }
224 return plainTextBuilder.toString(); 224 return plainTextBuilder.toString();
225 } 225 }
226 226
227 void RenderText::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumu latedOffset) const
228 {
229 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox())
230 rects.append(enclosingIntRect(FloatRect(accumulatedOffset + box->topLeft (), box->size())));
231 }
232
233 static FloatRect localQuadForTextBox(InlineTextBox* box, unsigned start, unsigne d end, bool useSelectionHeight) 227 static FloatRect localQuadForTextBox(InlineTextBox* box, unsigned start, unsigne d end, bool useSelectionHeight)
234 { 228 {
235 unsigned realEnd = std::min(box->end() + 1, end); 229 unsigned realEnd = std::min(box->end() + 1, end);
236 LayoutRect r = box->localSelectionRect(start, realEnd); 230 LayoutRect r = box->localSelectionRect(start, realEnd);
237 if (r.height()) { 231 if (r.height()) {
238 if (!useSelectionHeight) { 232 if (!useSelectionHeight) {
239 // Change the height and y position (or width and x for vertical tex t) 233 // Change the height and y position (or width and x for vertical tex t)
240 // because selectionRect uses selection-specific values. 234 // because selectionRect uses selection-specific values.
241 r.setHeight(box->height()); 235 r.setHeight(box->height());
242 r.setY(box->y()); 236 r.setY(box->y());
(...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after
1583 ASSERT(child->prevTextBox() == prev); 1577 ASSERT(child->prevTextBox() == prev);
1584 prev = child; 1578 prev = child;
1585 } 1579 }
1586 ASSERT(prev == m_lastTextBox); 1580 ASSERT(prev == m_lastTextBox);
1587 #endif 1581 #endif
1588 } 1582 }
1589 1583
1590 #endif 1584 #endif
1591 1585
1592 } // namespace blink 1586 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698