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

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

Issue 763043002: Remove RenderBlockLineLayout (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: review Created 6 years 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 | « sky/engine/core/core.gni ('k') | sky/engine/core/rendering/RenderBlock.h » ('j') | 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 * (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, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights 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 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 return m_start; 1224 return m_start;
1225 } 1225 }
1226 1226
1227 int InlineTextBox::caretMaxOffset() const 1227 int InlineTextBox::caretMaxOffset() const
1228 { 1228 {
1229 return m_start + m_len; 1229 return m_start + m_len;
1230 } 1230 }
1231 1231
1232 float InlineTextBox::textPos() const 1232 float InlineTextBox::textPos() const
1233 { 1233 {
1234 // When computing the width of a text run, RenderBlock::computeInlineDirecti onPositionsForLine() doesn't include the actual offset 1234 // When computing the width of a text run, RenderParagraph::computeInlineDir ectionPositionsForLine() doesn't include the actual offset
1235 // from the containing block edge in its measurement. textPos() should be co nsistent so the text are rendered in the same width. 1235 // from the containing block edge in its measurement. textPos() should be co nsistent so the text are rendered in the same width.
1236 if (logicalLeft() == 0) 1236 if (logicalLeft() == 0)
1237 return 0; 1237 return 0;
1238 return logicalLeft() - root().logicalLeft(); 1238 return logicalLeft() - root().logicalLeft();
1239 } 1239 }
1240 1240
1241 int InlineTextBox::offsetForPosition(float lineOffset, bool includePartialGlyphs ) const 1241 int InlineTextBox::offsetForPosition(float lineOffset, bool includePartialGlyphs ) const
1242 { 1242 {
1243 if (isLineBreak()) 1243 if (isLineBreak())
1244 return 0; 1244 return 0;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); 1384 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj);
1385 const int rendererCharacterOffset = 24; 1385 const int rendererCharacterOffset = 24;
1386 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) 1386 for (; printedCharacters < rendererCharacterOffset; printedCharacters++)
1387 fputc(' ', stderr); 1387 fputc(' ', stderr);
1388 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata()); 1388 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata());
1389 } 1389 }
1390 1390
1391 #endif 1391 #endif
1392 1392
1393 } // namespace blink 1393 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/core.gni ('k') | sky/engine/core/rendering/RenderBlock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698