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

Side by Side Diff: Source/core/rendering/InlineTextBox.cpp

Issue 622253002: Pass start/length at InlineTextBox construction time. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/InlineTextBox.h ('k') | Source/core/rendering/RenderBlockLineLayout.cpp » ('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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 void InlineTextBox::destroy() 74 void InlineTextBox::destroy()
75 { 75 {
76 AbstractInlineTextBox::willDestroy(this); 76 AbstractInlineTextBox::willDestroy(this);
77 77
78 if (!knownToHaveNoOverflow() && gTextBoxesWithOverflow) 78 if (!knownToHaveNoOverflow() && gTextBoxesWithOverflow)
79 gTextBoxesWithOverflow->remove(this); 79 gTextBoxesWithOverflow->remove(this);
80 InlineTextBoxPainter::removeFromTextBlobCache(*this); 80 InlineTextBoxPainter::removeFromTextBlobCache(*this);
81 InlineBox::destroy(); 81 InlineBox::destroy();
82 } 82 }
83 83
84 void InlineTextBox::offsetRun(int delta)
85 {
86 ASSERT(!isDirty());
87 InlineTextBoxPainter::removeFromTextBlobCache(*this);
88 m_start += delta;
89 }
90
84 void InlineTextBox::markDirty() 91 void InlineTextBox::markDirty()
85 { 92 {
86 // FIXME: Is it actually possible to try and paint a dirty InlineTextBox? 93 // FIXME: Is it actually possible to try and paint a dirty InlineTextBox?
87 InlineTextBoxPainter::removeFromTextBlobCache(*this); 94 InlineTextBoxPainter::removeFromTextBlobCache(*this);
88 95
89 m_len = 0; 96 m_len = 0;
90 m_start = 0; 97 m_start = 0;
91 InlineBox::markDirty(); 98 InlineBox::markDirty();
92 } 99 }
93 100
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); 561 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj);
555 const int rendererCharacterOffset = 24; 562 const int rendererCharacterOffset = 24;
556 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) 563 for (; printedCharacters < rendererCharacterOffset; printedCharacters++)
557 fputc(' ', stderr); 564 fputc(' ', stderr);
558 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata()); 565 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata());
559 } 566 }
560 567
561 #endif 568 #endif
562 569
563 } // namespace blink 570 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/InlineTextBox.h ('k') | Source/core/rendering/RenderBlockLineLayout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698