Bug 1123179 - Bypass touchcaret visibility checking inside scrollable frame when touchcaret drag state is active, r=roc
authorPeter Chang <pchang@mozilla.com>
Wed, 28 Jan 2015 01:32:00 +0100
changeset 226717 8d3180c7e7cd43a608868c9c9a88ebc41867b4d5
parent 226716 672cdff6ba49c293d4fbedc915af21b45d359cb4
child 226718 e51f02d321f98580e1d708854fc722069afc4e6b
push id54905
push usercbook@mozilla.com
push dateFri, 30 Jan 2015 12:38:59 +0000
treeherdermozilla-inbound@8d3180c7e7cd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1123179
milestone38.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 1123179 - Bypass touchcaret visibility checking inside scrollable frame when touchcaret drag state is active, r=roc
layout/base/TouchCaret.cpp
--- a/layout/base/TouchCaret.cpp
+++ b/layout/base/TouchCaret.cpp
@@ -453,17 +453,18 @@ TouchCaret::IsDisplayable()
   }
 
   if (!nsContentUtils::HasNonEmptyTextContent(
          editingHost, nsContentUtils::eRecurseIntoChildren)) {
     TOUCHCARET_LOG("The content is empty!");
     return false;
   }
 
-  if (!nsLayoutUtils::IsRectVisibleInScrollFrames(focusFrame, focusRect)) {
+  if (mState != TOUCHCARET_TOUCHDRAG_ACTIVE &&
+        !nsLayoutUtils::IsRectVisibleInScrollFrames(focusFrame, focusRect)) {
     TOUCHCARET_LOG("Caret does not show in the scrollable frame!");
     return false;
   }
 
   TOUCHCARET_LOG("Touch caret is displayable!");
   return true;
 }