OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 18 matching lines...) Expand all Loading... |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "core/layout/line/AbstractInlineTextBox.h" | 32 #include "core/layout/line/AbstractInlineTextBox.h" |
33 | 33 |
34 #include "core/editing/iterators/TextIterator.h" | 34 #include "core/editing/iterators/TextIterator.h" |
35 #include "platform/text/TextBreakIterator.h" | 35 #include "platform/text/TextBreakIterator.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 AbstractInlineTextBox::InlineToAbstractInlineTextBoxHashMap* AbstractInlineTextB
ox::gAbstractInlineTextBoxMap = 0; | 39 AbstractInlineTextBox::InlineToAbstractInlineTextBoxHashMap* AbstractInlineTextB
ox::gAbstractInlineTextBoxMap = nullptr; |
40 | 40 |
41 PassRefPtr<AbstractInlineTextBox> AbstractInlineTextBox::getOrCreate(LayoutText*
layoutText, InlineTextBox* inlineTextBox) | 41 PassRefPtr<AbstractInlineTextBox> AbstractInlineTextBox::getOrCreate(LayoutText*
layoutText, InlineTextBox* inlineTextBox) |
42 { | 42 { |
43 if (!inlineTextBox) | 43 if (!inlineTextBox) |
44 return nullptr; | 44 return nullptr; |
45 | 45 |
46 if (!gAbstractInlineTextBoxMap) | 46 if (!gAbstractInlineTextBoxMap) |
47 gAbstractInlineTextBoxMap = new InlineToAbstractInlineTextBoxHashMap(); | 47 gAbstractInlineTextBoxMap = new InlineToAbstractInlineTextBoxHashMap(); |
48 | 48 |
49 InlineToAbstractInlineTextBoxHashMap::const_iterator it = gAbstractInlineTex
tBoxMap->find(inlineTextBox); | 49 InlineToAbstractInlineTextBoxHashMap::const_iterator it = gAbstractInlineTex
tBoxMap->find(inlineTextBox); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 return nullptr; | 191 return nullptr; |
192 | 192 |
193 InlineBox* previous = m_inlineTextBox->prevOnLine(); | 193 InlineBox* previous = m_inlineTextBox->prevOnLine(); |
194 if (previous && previous->isInlineTextBox()) | 194 if (previous && previous->isInlineTextBox()) |
195 return getOrCreate(&toInlineTextBox(previous)->layoutObject(), toInlineT
extBox(previous)); | 195 return getOrCreate(&toInlineTextBox(previous)->layoutObject(), toInlineT
extBox(previous)); |
196 | 196 |
197 return nullptr; | 197 return nullptr; |
198 } | 198 } |
199 | 199 |
200 } // namespace blink | 200 } // namespace blink |
OLD | NEW |