| OLD | NEW |
| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 void* pointers[2]; | 58 void* pointers[2]; |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 COMPILE_ASSERT(sizeof(InlineTextBox) == sizeof(SameSizeAsInlineTextBox), InlineT
extBox_should_stay_small); | 61 COMPILE_ASSERT(sizeof(InlineTextBox) == sizeof(SameSizeAsInlineTextBox), InlineT
extBox_should_stay_small); |
| 62 | 62 |
| 63 typedef WTF::HashMap<const InlineTextBox*, LayoutRect> InlineTextBoxOverflowMap; | 63 typedef WTF::HashMap<const InlineTextBox*, LayoutRect> InlineTextBoxOverflowMap; |
| 64 static InlineTextBoxOverflowMap* gTextBoxesWithOverflow; | 64 static InlineTextBoxOverflowMap* gTextBoxesWithOverflow; |
| 65 | 65 |
| 66 static const int misspellingLineThickness = 3; | 66 static const int misspellingLineThickness = 3; |
| 67 | 67 |
| 68 void InlineTextBox::destroy(RenderArena* arena) | 68 void InlineTextBox::destroy() |
| 69 { | 69 { |
| 70 if (!knownToHaveNoOverflow() && gTextBoxesWithOverflow) | 70 if (!knownToHaveNoOverflow() && gTextBoxesWithOverflow) |
| 71 gTextBoxesWithOverflow->remove(this); | 71 gTextBoxesWithOverflow->remove(this); |
| 72 InlineBox::destroy(arena); | 72 InlineBox::destroy(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void InlineTextBox::markDirty(bool dirty) | 75 void InlineTextBox::markDirty(bool dirty) |
| 76 { | 76 { |
| 77 if (dirty) { | 77 if (dirty) { |
| 78 m_len = 0; | 78 m_len = 0; |
| 79 m_start = 0; | 79 m_start = 0; |
| 80 } | 80 } |
| 81 InlineBox::markDirty(dirty); | 81 InlineBox::markDirty(dirty); |
| 82 } | 82 } |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 else if (r.maxX() > logicalRight()) | 231 else if (r.maxX() > logicalRight()) |
| 232 logicalWidth = logicalRight() - r.x(); | 232 logicalWidth = logicalRight() - r.x(); |
| 233 | 233 |
| 234 LayoutPoint topPoint = isHorizontal() ? LayoutPoint(r.x(), selTop) : LayoutP
oint(selTop, r.x()); | 234 LayoutPoint topPoint = isHorizontal() ? LayoutPoint(r.x(), selTop) : LayoutP
oint(selTop, r.x()); |
| 235 LayoutUnit width = isHorizontal() ? logicalWidth : selHeight; | 235 LayoutUnit width = isHorizontal() ? logicalWidth : selHeight; |
| 236 LayoutUnit height = isHorizontal() ? selHeight : logicalWidth; | 236 LayoutUnit height = isHorizontal() ? selHeight : logicalWidth; |
| 237 | 237 |
| 238 return LayoutRect(topPoint, LayoutSize(width, height)); | 238 return LayoutRect(topPoint, LayoutSize(width, height)); |
| 239 } | 239 } |
| 240 | 240 |
| 241 void InlineTextBox::deleteLine(RenderArena* arena) | 241 void InlineTextBox::deleteLine() |
| 242 { | 242 { |
| 243 toRenderText(renderer())->removeTextBox(this); | 243 toRenderText(renderer())->removeTextBox(this); |
| 244 destroy(arena); | 244 destroy(); |
| 245 } | 245 } |
| 246 | 246 |
| 247 void InlineTextBox::extractLine() | 247 void InlineTextBox::extractLine() |
| 248 { | 248 { |
| 249 if (extracted()) | 249 if (extracted()) |
| 250 return; | 250 return; |
| 251 | 251 |
| 252 toRenderText(renderer())->extractTextBox(this); | 252 toRenderText(renderer())->extractTextBox(this); |
| 253 } | 253 } |
| 254 | 254 |
| (...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1559 printedCharacters = fprintf(stderr, "\t%s %p", obj->renderName(), obj); | 1559 printedCharacters = fprintf(stderr, "\t%s %p", obj->renderName(), obj); |
| 1560 const int rendererCharacterOffset = 24; | 1560 const int rendererCharacterOffset = 24; |
| 1561 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) | 1561 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) |
| 1562 fputc(' ', stderr); | 1562 fputc(' ', stderr); |
| 1563 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); | 1563 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); |
| 1564 } | 1564 } |
| 1565 | 1565 |
| 1566 #endif | 1566 #endif |
| 1567 | 1567 |
| 1568 } // namespace WebCore | 1568 } // namespace WebCore |
| OLD | NEW |