Bug 1217275 Fix missing \n in IMMHandler::HandleDocumentFeed(), it was replaced to empty string accidentally r=m_kato
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 23 Oct 2015 10:12:15 +0900
changeset 304308 4d1821f242547fc64ff9417de0406bd1f36c0734
parent 304307 2dc357be10ec49cf7453cd9048a4ffd3d956a821
child 304309 9a1e89df904b953006be78880dbe99ad262c5d6a
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersm_kato
bugs1217275
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1217275 Fix missing \n in IMMHandler::HandleDocumentFeed(), it was replaced to empty string accidentally r=m_kato
widget/windows/IMMHandler.cpp
--- a/widget/windows/IMMHandler.cpp
+++ b/widget/windows/IMMHandler.cpp
@@ -1740,17 +1740,17 @@ IMMHandler::HandleDocumentFeed(nsWindow*
   if (targetOffset > int32_t(str.Length())) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
       ("IMM: HandleDocumentFeed, FAILED, due to the caret offset is invalid"));
     return false;
   }
 
   // Get the focused paragraph, we decide that it starts from the previous CRLF
   // (or start of the editor) to the next one (or the end of the editor).
-  int32_t paragraphStart = str.RFind("", false, targetOffset, -1) + 1;
+  int32_t paragraphStart = str.RFind("\n", false, targetOffset, -1) + 1;
   int32_t paragraphEnd =
     str.Find("\r", false, targetOffset + targetLength, -1);
   if (paragraphEnd < 0) {
     paragraphEnd = str.Length();
   }
   nsDependentSubstring paragraph(str, paragraphStart,
                                  paragraphEnd - paragraphStart);