| Index: Source/core/rendering/InlineTextBox.cpp
|
| diff --git a/Source/core/rendering/InlineTextBox.cpp b/Source/core/rendering/InlineTextBox.cpp
|
| index 24b24c55749c3ca464c6740252b51483da5dfaaf..d595b8cd16b4345f0dac98da47928e714be96d8c 100644
|
| --- a/Source/core/rendering/InlineTextBox.cpp
|
| +++ b/Source/core/rendering/InlineTextBox.cpp
|
| @@ -74,6 +74,12 @@ static InlineTextBoxOverflowMap* gTextBoxesWithOverflow;
|
| typedef WTF::HashMap<const InlineTextBox*, TextBlobPtr> InlineTextBoxBlobCacheMap;
|
| static InlineTextBoxBlobCacheMap* gTextBlobCache;
|
|
|
| +static void removeFromTextBlobCache(InlineTextBox* textBox)
|
| +{
|
| + if (gTextBlobCache)
|
| + gTextBlobCache->remove(textBox);
|
| +}
|
| +
|
| static const int misspellingLineThickness = 3;
|
|
|
| void InlineTextBox::destroy()
|
| @@ -82,16 +88,21 @@ void InlineTextBox::destroy()
|
|
|
| if (!knownToHaveNoOverflow() && gTextBoxesWithOverflow)
|
| gTextBoxesWithOverflow->remove(this);
|
| - if (gTextBlobCache)
|
| - gTextBlobCache->remove(this);
|
| + removeFromTextBlobCache(this);
|
| InlineBox::destroy();
|
| }
|
|
|
| +void InlineTextBox::offsetRun(int delta)
|
| +{
|
| + ASSERT(!isDirty());
|
| + removeFromTextBlobCache(this);
|
| + m_start += delta;
|
| +}
|
| +
|
| void InlineTextBox::markDirty()
|
| {
|
| // FIXME: Is it actually possible to try and paint a dirty InlineTextBox?
|
| - if (gTextBlobCache)
|
| - gTextBlobCache->remove(this);
|
| + removeFromTextBlobCache(this);
|
|
|
| m_len = 0;
|
| m_start = 0;
|
|
|