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 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) | 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) |
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 28 matching lines...) Expand all Loading... |
39 #include "core/layout/line/EllipsisBox.h" | 39 #include "core/layout/line/EllipsisBox.h" |
40 #include "core/layout/line/GlyphOverflow.h" | 40 #include "core/layout/line/GlyphOverflow.h" |
41 #include "core/layout/line/InlineTextBox.h" | 41 #include "core/layout/line/InlineTextBox.h" |
42 #include "core/paint/DeprecatedPaintLayer.h" | 42 #include "core/paint/DeprecatedPaintLayer.h" |
43 #include "platform/fonts/Character.h" | 43 #include "platform/fonts/Character.h" |
44 #include "platform/fonts/FontCache.h" | 44 #include "platform/fonts/FontCache.h" |
45 #include "platform/geometry/FloatQuad.h" | 45 #include "platform/geometry/FloatQuad.h" |
46 #include "platform/text/BidiResolver.h" | 46 #include "platform/text/BidiResolver.h" |
47 #include "platform/text/TextBreakIterator.h" | 47 #include "platform/text/TextBreakIterator.h" |
48 #include "platform/text/TextRunIterator.h" | 48 #include "platform/text/TextRunIterator.h" |
| 49 #include "wtf/SizeAssertions.h" |
49 #include "wtf/text/CharacterNames.h" | 50 #include "wtf/text/CharacterNames.h" |
50 #include "wtf/text/StringBuffer.h" | 51 #include "wtf/text/StringBuffer.h" |
51 #include "wtf/text/StringBuilder.h" | 52 #include "wtf/text/StringBuilder.h" |
52 | 53 |
53 using namespace WTF; | 54 using namespace WTF; |
54 using namespace Unicode; | 55 using namespace Unicode; |
55 | 56 |
56 namespace blink { | 57 namespace blink { |
57 | 58 |
58 struct SameSizeAsLayoutText : public LayoutObject { | 59 ASSERT_SIZE(LayoutText, sizeof(LayoutObject) + 32, sizeof(LayoutObject) + 48); |
59 uint32_t bitfields : 16; | |
60 float widths[4]; | |
61 String text; | |
62 void* pointers[2]; | |
63 }; | |
64 | |
65 static_assert(sizeof(LayoutText) == sizeof(SameSizeAsLayoutText), "LayoutText sh
ould stay small"); | |
66 | 60 |
67 class SecureTextTimer; | 61 class SecureTextTimer; |
68 typedef HashMap<LayoutText*, SecureTextTimer*> SecureTextTimerMap; | 62 typedef HashMap<LayoutText*, SecureTextTimer*> SecureTextTimerMap; |
69 static SecureTextTimerMap* gSecureTextTimers = nullptr; | 63 static SecureTextTimerMap* gSecureTextTimers = nullptr; |
70 | 64 |
71 class SecureTextTimer final : public TimerBase { | 65 class SecureTextTimer final : public TimerBase { |
72 public: | 66 public: |
73 SecureTextTimer(LayoutText* layoutText) | 67 SecureTextTimer(LayoutText* layoutText) |
74 : m_layoutText(layoutText) | 68 : m_layoutText(layoutText) |
75 , m_lastTypedCharacterOffset(-1) | 69 , m_lastTypedCharacterOffset(-1) |
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1884 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { | 1878 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { |
1885 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box); | 1879 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box); |
1886 if (box->truncation() != cNoTruncation) { | 1880 if (box->truncation() != cNoTruncation) { |
1887 if (EllipsisBox* ellipsisBox = box->root().ellipsisBox()) | 1881 if (EllipsisBox* ellipsisBox = box->root().ellipsisBox()) |
1888 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(
*ellipsisBox); | 1882 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(
*ellipsisBox); |
1889 } | 1883 } |
1890 } | 1884 } |
1891 } | 1885 } |
1892 | 1886 |
1893 } // namespace blink | 1887 } // namespace blink |
OLD | NEW |