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

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

Issue 16896019: Replace RenderArena with PartitionAlloc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void* pointers[2]; 59 void* pointers[2];
60 }; 60 };
61 61
62 COMPILE_ASSERT(sizeof(InlineTextBox) == sizeof(SameSizeAsInlineTextBox), InlineT extBox_should_stay_small); 62 COMPILE_ASSERT(sizeof(InlineTextBox) == sizeof(SameSizeAsInlineTextBox), InlineT extBox_should_stay_small);
63 63
64 typedef WTF::HashMap<const InlineTextBox*, LayoutRect> InlineTextBoxOverflowMap; 64 typedef WTF::HashMap<const InlineTextBox*, LayoutRect> InlineTextBoxOverflowMap;
65 static InlineTextBoxOverflowMap* gTextBoxesWithOverflow; 65 static InlineTextBoxOverflowMap* gTextBoxesWithOverflow;
66 66
67 static const int misspellingLineThickness = 3; 67 static const int misspellingLineThickness = 3;
68 68
69 void InlineTextBox::destroy(RenderArena* arena) 69 void InlineTextBox::destroy()
70 { 70 {
71 if (!knownToHaveNoOverflow() && gTextBoxesWithOverflow) 71 if (!knownToHaveNoOverflow() && gTextBoxesWithOverflow)
72 gTextBoxesWithOverflow->remove(this); 72 gTextBoxesWithOverflow->remove(this);
73 InlineBox::destroy(arena); 73 InlineBox::destroy();
74 } 74 }
75 75
76 void InlineTextBox::markDirty(bool dirty) 76 void InlineTextBox::markDirty(bool dirty)
77 { 77 {
78 if (dirty) { 78 if (dirty) {
79 m_len = 0; 79 m_len = 0;
80 m_start = 0; 80 m_start = 0;
81 } 81 }
82 InlineBox::markDirty(dirty); 82 InlineBox::markDirty(dirty);
83 } 83 }
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 else if (r.maxX() > logicalRight()) 232 else if (r.maxX() > logicalRight())
233 logicalWidth = logicalRight() - r.x(); 233 logicalWidth = logicalRight() - r.x();
234 234
235 LayoutPoint topPoint = isHorizontal() ? LayoutPoint(r.x(), selTop) : LayoutP oint(selTop, r.x()); 235 LayoutPoint topPoint = isHorizontal() ? LayoutPoint(r.x(), selTop) : LayoutP oint(selTop, r.x());
236 LayoutUnit width = isHorizontal() ? logicalWidth : selHeight; 236 LayoutUnit width = isHorizontal() ? logicalWidth : selHeight;
237 LayoutUnit height = isHorizontal() ? selHeight : logicalWidth; 237 LayoutUnit height = isHorizontal() ? selHeight : logicalWidth;
238 238
239 return LayoutRect(topPoint, LayoutSize(width, height)); 239 return LayoutRect(topPoint, LayoutSize(width, height));
240 } 240 }
241 241
242 void InlineTextBox::deleteLine(RenderArena* arena) 242 void InlineTextBox::deleteLine()
243 { 243 {
244 toRenderText(renderer())->removeTextBox(this); 244 toRenderText(renderer())->removeTextBox(this);
245 destroy(arena); 245 destroy();
246 } 246 }
247 247
248 void InlineTextBox::extractLine() 248 void InlineTextBox::extractLine()
249 { 249 {
250 if (extracted()) 250 if (extracted())
251 return; 251 return;
252 252
253 toRenderText(renderer())->extractTextBox(this); 253 toRenderText(renderer())->extractTextBox(this);
254 } 254 }
255 255
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1562 1562
1563 void InlineTextBox::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const 1563 void InlineTextBox::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
1564 { 1564 {
1565 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Rendering); 1565 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Rendering);
1566 InlineBox::reportMemoryUsage(memoryObjectInfo); 1566 InlineBox::reportMemoryUsage(memoryObjectInfo);
1567 info.addMember(m_prevTextBox, "prevTextBox"); 1567 info.addMember(m_prevTextBox, "prevTextBox");
1568 info.addMember(m_nextTextBox, "nextTextBox"); 1568 info.addMember(m_nextTextBox, "nextTextBox");
1569 } 1569 }
1570 1570
1571 } // namespace WebCore 1571 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698