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

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

Issue 23874007: Rename AttachBehavior to RecalcStyleBehavior (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix enum usage Created 7 years, 3 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
« no previous file with comments | « Source/core/dom/Text.h ('k') | Source/core/editing/DeleteFromTextNodeCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Text.cpp
diff --git a/Source/core/dom/Text.cpp b/Source/core/dom/Text.cpp
index 9d5ea46eb8aacbb67abe24172beb36fdc9e95ede..325a3def6ed501f3e5d0a1d38178d6971c1aa6e2 100644
--- a/Source/core/dom/Text.cpp
+++ b/Source/core/dom/Text.cpp
@@ -293,16 +293,16 @@ bool Text::needsWhitespaceRenderer()
return false;
}
-void Text::updateTextRenderer(unsigned offsetOfReplacedData, unsigned lengthOfReplacedData, AttachBehavior attachBehavior)
+void Text::updateTextRenderer(unsigned offsetOfReplacedData, unsigned lengthOfReplacedData, RecalcStyleBehavior recalcStyleBehavior)
{
if (!attached())
return;
RenderText* textRenderer = toRenderText(renderer());
if (!textRenderer || !textRendererIsNeeded(NodeRenderingContext(this, textRenderer->style()))) {
- if (attachBehavior == DeprecatedAttachNow)
- reattach();
- else
- lazyReattach();
+ lazyReattach();
+ // FIXME: Editing should be updated so this is not neccesary.
+ if (recalcStyleBehavior == DeprecatedRecalcStyleImmediatlelyForEditing)
+ document().updateStyleIfNeeded();
return;
}
textRenderer->setTextWithOffset(dataImpl(), offsetOfReplacedData, lengthOfReplacedData);
« no previous file with comments | « Source/core/dom/Text.h ('k') | Source/core/editing/DeleteFromTextNodeCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698