Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(744)

Unified Diff: Source/core/dom/Text.cpp

Issue 15027005: [CSS Regions] Elements in a region should be assignable to a named flow (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698