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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 } | 60 } |
61 | 61 |
62 void AbstractInlineTextBox::willDestroy(InlineTextBox* inlineTextBox) { | 62 void AbstractInlineTextBox::willDestroy(InlineTextBox* inlineTextBox) { |
63 if (!gAbstractInlineTextBoxMap) | 63 if (!gAbstractInlineTextBoxMap) |
64 return; | 64 return; |
65 | 65 |
66 InlineToAbstractInlineTextBoxHashMap::const_iterator it = | 66 InlineToAbstractInlineTextBoxHashMap::const_iterator it = |
67 gAbstractInlineTextBoxMap->find(inlineTextBox); | 67 gAbstractInlineTextBoxMap->find(inlineTextBox); |
68 if (it != gAbstractInlineTextBoxMap->end()) { | 68 if (it != gAbstractInlineTextBoxMap->end()) { |
69 it->value->detach(); | 69 it->value->detach(); |
70 gAbstractInlineTextBoxMap->remove(inlineTextBox); | 70 gAbstractInlineTextBoxMap->erase(inlineTextBox); |
71 } | 71 } |
72 } | 72 } |
73 | 73 |
74 AbstractInlineTextBox::~AbstractInlineTextBox() { | 74 AbstractInlineTextBox::~AbstractInlineTextBox() { |
75 ASSERT(!m_lineLayoutItem); | 75 ASSERT(!m_lineLayoutItem); |
76 ASSERT(!m_inlineTextBox); | 76 ASSERT(!m_inlineTextBox); |
77 } | 77 } |
78 | 78 |
79 void AbstractInlineTextBox::detach() { | 79 void AbstractInlineTextBox::detach() { |
80 if (Node* node = m_lineLayoutItem.node()) { | 80 if (Node* node = m_lineLayoutItem.node()) { |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 | 214 |
215 InlineBox* previous = m_inlineTextBox->prevOnLine(); | 215 InlineBox* previous = m_inlineTextBox->prevOnLine(); |
216 if (previous && previous->isInlineTextBox()) | 216 if (previous && previous->isInlineTextBox()) |
217 return getOrCreate(toInlineTextBox(previous)->getLineLayoutItem(), | 217 return getOrCreate(toInlineTextBox(previous)->getLineLayoutItem(), |
218 toInlineTextBox(previous)); | 218 toInlineTextBox(previous)); |
219 | 219 |
220 return nullptr; | 220 return nullptr; |
221 } | 221 } |
222 | 222 |
223 } // namespace blink | 223 } // namespace blink |
OLD | NEW |