Chromium Code Reviews| Index: Source/core/dom/Text.cpp |
| diff --git a/Source/core/dom/Text.cpp b/Source/core/dom/Text.cpp |
| index c4a70b07f04d1c892f89d037a42bbf9946291986..6cd4750ded49d3ff2ffd224ad89de27ece96d13f 100644 |
| --- a/Source/core/dom/Text.cpp |
| +++ b/Source/core/dom/Text.cpp |
| @@ -202,7 +202,7 @@ PassRefPtr<Node> Text::cloneNode(bool /*deep*/) |
| return cloneWithData(data()); |
| } |
| -bool Text::textRendererIsNeeded(const NodeRenderingContext& context) |
|
Julien - ping for review
2013/05/09 15:30:18
Again, losing const-ness makes me sad.
Mihai Maerean
2013/05/09 16:25:55
Me too, but there's no other way to make the compi
|
| +bool Text::textRendererIsNeeded(NodeRenderingContext& context) |
| { |
| if (isEditingText()) |
| return true; |
| @@ -307,7 +307,12 @@ void Text::updateTextRenderer(unsigned offsetOfReplacedData, unsigned lengthOfRe |
| if (!attached()) |
| return; |
| RenderText* textRenderer = toRenderText(renderer()); |
| - if (!textRenderer || !textRendererIsNeeded(NodeRenderingContext(this, textRenderer->style()))) { |
| + if (!textRenderer) { |
| + reattach(); |
| + return; |
| + } |
| + NodeRenderingContext renderingContext(this, textRenderer->style()); |
| + if (!textRendererIsNeeded(renderingContext)) { |
| reattach(); |
| return; |
| } |