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

Unified Diff: Source/WebCore/rendering/RenderText.cpp

Issue 10993072: Merge 129814 - REGRESSION(r129186): Pressing enter at the end of a line deletes the line (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderText.cpp
===================================================================
--- Source/WebCore/rendering/RenderText.cpp (revision 129817)
+++ Source/WebCore/rendering/RenderText.cpp (working copy)
@@ -1253,6 +1253,9 @@
void RenderText::setTextWithOffset(PassRefPtr<StringImpl> text, unsigned offset, unsigned len, bool force)
{
+ if (!force && equal(m_text.impl(), text.get()))
+ return;
+
unsigned oldLen = textLength();
unsigned newLen = text->length();
int delta = newLen - oldLen;
@@ -1324,7 +1327,7 @@
}
m_linesDirty = dirtiedLines;
- setText(text, force);
+ setText(text, force || dirtiedLines);
}
void RenderText::transformText()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698