| 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 15 matching lines...) Expand all Loading... |
| 26 #include "core/layout/HitTestResult.h" | 26 #include "core/layout/HitTestResult.h" |
| 27 #include "core/layout/LayoutBR.h" | 27 #include "core/layout/LayoutBR.h" |
| 28 #include "core/layout/LayoutRubyText.h" | 28 #include "core/layout/LayoutRubyText.h" |
| 29 #include "core/layout/api/LineLayoutBox.h" | 29 #include "core/layout/api/LineLayoutBox.h" |
| 30 #include "core/layout/api/LineLayoutRubyRun.h" | 30 #include "core/layout/api/LineLayoutRubyRun.h" |
| 31 #include "core/layout/line/AbstractInlineTextBox.h" | 31 #include "core/layout/line/AbstractInlineTextBox.h" |
| 32 #include "core/layout/line/EllipsisBox.h" | 32 #include "core/layout/line/EllipsisBox.h" |
| 33 #include "core/paint/InlineTextBoxPainter.h" | 33 #include "core/paint/InlineTextBoxPainter.h" |
| 34 #include "platform/fonts/FontCache.h" | 34 #include "platform/fonts/FontCache.h" |
| 35 #include "platform/fonts/shaping/SimpleShaper.h" | 35 #include "platform/fonts/shaping/SimpleShaper.h" |
| 36 #include "wtf/SizeAssertions.h" |
| 36 #include "wtf/Vector.h" | 37 #include "wtf/Vector.h" |
| 37 #include "wtf/text/StringBuilder.h" | 38 #include "wtf/text/StringBuilder.h" |
| 38 | 39 |
| 39 #include <algorithm> | 40 #include <algorithm> |
| 40 | 41 |
| 41 namespace blink { | 42 namespace blink { |
| 42 | 43 |
| 43 struct SameSizeAsInlineTextBox : public InlineBox { | 44 ASSERT_SIZE(InlineTextBox, sizeof(InlineBox) + 16, sizeof(InlineBox) + 24); |
| 44 unsigned variables[1]; | |
| 45 unsigned short variables2[2]; | |
| 46 void* pointers[2]; | |
| 47 }; | |
| 48 | |
| 49 static_assert(sizeof(InlineTextBox) == sizeof(SameSizeAsInlineTextBox), "InlineT
extBox should stay small"); | |
| 50 | 45 |
| 51 typedef WTF::HashMap<const InlineTextBox*, LayoutRect> InlineTextBoxOverflowMap; | 46 typedef WTF::HashMap<const InlineTextBox*, LayoutRect> InlineTextBoxOverflowMap; |
| 52 static InlineTextBoxOverflowMap* gTextBoxesWithOverflow; | 47 static InlineTextBoxOverflowMap* gTextBoxesWithOverflow; |
| 53 | 48 |
| 54 void InlineTextBox::destroy() | 49 void InlineTextBox::destroy() |
| 55 { | 50 { |
| 56 AbstractInlineTextBox::willDestroy(this); | 51 AbstractInlineTextBox::willDestroy(this); |
| 57 | 52 |
| 58 if (!knownToHaveNoOverflow() && gTextBoxesWithOverflow) | 53 if (!knownToHaveNoOverflow() && gTextBoxesWithOverflow) |
| 59 gTextBoxesWithOverflow->remove(this); | 54 gTextBoxesWithOverflow->remove(this); |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 printedCharacters = fprintf(stderr, "\t%s %p", obj.name(), obj.debugPointer(
)); | 571 printedCharacters = fprintf(stderr, "\t%s %p", obj.name(), obj.debugPointer(
)); |
| 577 const int layoutObjectCharacterOffset = 75; | 572 const int layoutObjectCharacterOffset = 75; |
| 578 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++) | 573 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++) |
| 579 fputc(' ', stderr); | 574 fputc(' ', stderr); |
| 580 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); | 575 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); |
| 581 } | 576 } |
| 582 | 577 |
| 583 #endif | 578 #endif |
| 584 | 579 |
| 585 } // namespace blink | 580 } // namespace blink |
| OLD | NEW |