Changeset 157367 in webkit
- Timestamp:
- Oct 13, 2013, 4:39:33 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r157366 r157367 1 2013-10-13 Antti Koivisto <antti@apple.com> 2 3 Rename InlineBox::remove() to removeFromParent 4 https://bugs.webkit.org/show_bug.cgi?id=122725 5 6 Reviewed by Andreas Kling. 7 8 Also make it clear from the code that all InlineTextBoxes have behavesLikeText set. 9 1 10 2013-10-13 Antti Koivisto <antti@apple.com> 2 11 -
trunk/Source/WebCore/rendering/InlineBox.cpp
r157342 r157367 65 65 #endif 66 66 67 void InlineBox::remove ()67 void InlineBox::removeFromParent() 68 68 { 69 69 if (parent()) -
trunk/Source/WebCore/rendering/InlineBox.h
r157011 r157367 155 155 bool isFirstLine() const { return m_bitfields.firstLine(); } 156 156 157 void remove ();157 void removeFromParent(); 158 158 159 159 InlineBox* nextOnLine() const { return m_next; } -
trunk/Source/WebCore/rendering/InlineTextBox.cpp
r157362 r157367 100 100 int InlineTextBox::baselinePosition(FontBaseline baselineType) const 101 101 { 102 if (! behavesLikeText() || !parent())102 if (!parent()) 103 103 return 0; 104 104 if (&parent()->renderer() == renderer().parent()) … … 109 109 LayoutUnit InlineTextBox::lineHeight() const 110 110 { 111 if (! behavesLikeText() || !renderer().parent())111 if (!renderer().parent()) 112 112 return 0; 113 113 if (&parent()->renderer() == renderer().parent()) -
trunk/Source/WebCore/rendering/InlineTextBox.h
r157362 r157367 52 52 , m_truncation(cNoTruncation) 53 53 { 54 setBehavesLikeText(true); 54 55 } 55 56 … … 161 162 // Needs to be public, so the static paintTextWithShadows() function can use it. 162 163 static FloatSize applyShadowToGraphicsContext(GraphicsContext*, const ShadowData*, const FloatRect& textRect, bool stroked, bool opaque, bool horizontal); 163 164 private:165 InlineTextBox* m_prevTextBox; // The previous box that also uses our RenderObject166 InlineTextBox* m_nextTextBox; // The next box that also uses our RenderObject167 168 int m_start;169 unsigned short m_len;170 171 unsigned short m_truncation; // Where to truncate when text overflow is applied. We use special constants to172 // denote no truncation (the whole run paints) and full truncation (nothing paints at all).173 164 174 165 protected: … … 192 183 | (expansion() && nextLeafChild() ? TextRun::AllowTrailingExpansion : TextRun::ForbidTrailingExpansion); 193 184 } 185 186 void behavesLikeText() const WTF_DELETED_FUNCTION; 187 188 InlineTextBox* m_prevTextBox; // The previous box that also uses our RenderObject 189 InlineTextBox* m_nextTextBox; // The next box that also uses our RenderObject 190 191 int m_start; 192 unsigned short m_len; 193 194 // Where to truncate when text overflow is applied. We use special constants to 195 // denote no truncation (the whole run paints) and full truncation (nothing paints at all). 196 unsigned short m_truncation; 194 197 }; 195 198 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r157330 r157367 235 235 // children will be destroyed by the time we return from this function. 236 236 if (isAnonymousBlock()) { 237 for ( InlineFlowBox*box = firstLineBox(); box; box = box->nextLineBox()) {238 while ( InlineBox*childBox = box->firstChild())239 childBox->remove ();237 for (auto box = firstLineBox(); box; box = box->nextLineBox()) { 238 while (auto childBox = box->firstChild()) 239 childBox->removeFromParent(); 240 240 } 241 241 } -
trunk/Source/WebCore/rendering/RenderBox.cpp
r157309 r157367 1969 1969 1970 1970 // Nuke the box. 1971 box->remove ();1971 box->removeFromParent(); 1972 1972 box->destroy(renderArena()); 1973 1973 } else if (isReplaced()) { … … 1985 1985 if (m_inlineBoxWrapper) { 1986 1986 if (!documentBeingDestroyed()) 1987 m_inlineBoxWrapper->remove ();1987 m_inlineBoxWrapper->removeFromParent(); 1988 1988 m_inlineBoxWrapper->destroy(renderArena()); 1989 1989 m_inlineBoxWrapper = 0; -
trunk/Source/WebCore/rendering/RenderInline.cpp
r157144 r157367 108 108 // root lines that can just be destroyed without disconnecting. 109 109 if (firstLineBox()->parent()) { 110 for ( InlineFlowBox*box = firstLineBox(); box; box = box->nextLineBox())111 box->remove ();110 for (auto box = firstLineBox(); box; box = box->nextLineBox()) 111 box->removeFromParent(); 112 112 } 113 113 } else if (parent()) -
trunk/Source/WebCore/rendering/RenderLineBreak.cpp
r156738 r157367 91 91 return; 92 92 if (!documentBeingDestroyed()) 93 m_inlineBoxWrapper->remove ();93 m_inlineBoxWrapper->removeFromParent(); 94 94 m_inlineBoxWrapper->destroy(renderArena()); 95 95 m_inlineBoxWrapper = nullptr; -
trunk/Source/WebCore/rendering/RenderText.cpp
r157366 r157367 1003 1003 if (!textBox->len()) { 1004 1004 // We want the box to be destroyed. 1005 textBox->remove ();1005 textBox->removeFromParent(); 1006 1006 m_lineBoxes.remove(*textBox); 1007 1007 textBox->destroy(renderArena()); -
trunk/Source/WebCore/rendering/RenderTextLineBoxes.cpp
r157366 r157367 52 52 m_last = textBox; 53 53 } 54 textBox->setBehavesLikeText(true);55 54 return textBox; 56 55 } … … 115 114 } 116 115 for (auto box = m_first; box; box = box->nextTextBox()) 117 box->remove ();116 box->removeFromParent(); 118 117 } 119 118
Note:
See TracChangeset
for help on using the changeset viewer.