Title: [160067] trunk/Source/WebCore
Revision
160067
Author
[email protected]
Date
2013-12-03 21:20:48 -0800 (Tue, 03 Dec 2013)

Log Message

Remove nodeIsDetachedFromDocument and visualWordMovementEnabled in FrameSelection
https://bugs.webkit.org/show_bug.cgi?id=125210

Reviewed by Antti Koivisto.

Inspired by https://chromium.googlesource.com/chromium/blink/+/92409870f0ff8fafe31217830db0838a9e1ffb98

Removed some unused code.

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::textWasReplaced):
* editing/FrameSelection.h:
* page/Settings.in:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (160066 => 160067)


--- trunk/Source/WebCore/ChangeLog	2013-12-04 05:05:29 UTC (rev 160066)
+++ trunk/Source/WebCore/ChangeLog	2013-12-04 05:20:48 UTC (rev 160067)
@@ -1,5 +1,21 @@
 2013-12-03  Ryosuke Niwa  <[email protected]>
 
+        Remove nodeIsDetachedFromDocument and visualWordMovementEnabled in FrameSelection
+        https://bugs.webkit.org/show_bug.cgi?id=125210
+
+        Reviewed by Antti Koivisto.
+
+        Inspired by https://chromium.googlesource.com/chromium/blink/+/92409870f0ff8fafe31217830db0838a9e1ffb98
+
+        Removed some unused code.
+
+        * editing/FrameSelection.cpp:
+        (WebCore::FrameSelection::textWasReplaced):
+        * editing/FrameSelection.h:
+        * page/Settings.in:
+
+2013-12-03  Ryosuke Niwa  <[email protected]>
+
         Potential crash in RenderView::selectionBounds and RenderView::repaintSelection
         https://bugs.webkit.org/show_bug.cgi?id=125207
 

Modified: trunk/Source/WebCore/editing/FrameSelection.cpp (160066 => 160067)


--- trunk/Source/WebCore/editing/FrameSelection.cpp	2013-12-04 05:05:29 UTC (rev 160066)
+++ trunk/Source/WebCore/editing/FrameSelection.cpp	2013-12-04 05:20:48 UTC (rev 160067)
@@ -434,17 +434,10 @@
     ASSERT(static_cast<unsigned>(position.offsetInContainerNode()) <= node->length());
 }
 
-static inline bool nodeIsDetachedFromDocument(Node* node)
-{
-    ASSERT(node);
-    Node* highest = highestAncestor(node);
-    return highest->nodeType() == Node::DOCUMENT_FRAGMENT_NODE && !highest->isShadowRoot();
-}
-
 void FrameSelection::textWasReplaced(CharacterData* node, unsigned offset, unsigned oldLength, unsigned newLength)
 {
     // The fragment check is a performance optimization. See http://trac.webkit.org/changeset/30062.
-    if (isNone() || !node || nodeIsDetachedFromDocument(node))
+    if (isNone() || !node || !node->inDocument())
         return;
 
     Position base = m_selection.base();
@@ -2055,13 +2048,6 @@
     return selectStartTarget->dispatchEvent(Event::create(eventNames().selectstartEvent, true, true));
 }
 
-inline bool FrameSelection::visualWordMovementEnabled() const
-{
-    if (!m_frame)
-        return false;
-    return m_frame->settings().visualWordMovementEnabled();
-}
-
 void FrameSelection::setShouldShowBlockCursor(bool shouldShowBlockCursor)
 {
     m_shouldShowBlockCursor = shouldShowBlockCursor;

Modified: trunk/Source/WebCore/editing/FrameSelection.h (160066 => 160067)


--- trunk/Source/WebCore/editing/FrameSelection.h	2013-12-04 05:05:29 UTC (rev 160066)
+++ trunk/Source/WebCore/editing/FrameSelection.h	2013-12-04 05:20:48 UTC (rev 160067)
@@ -288,8 +288,6 @@
     void setCaretVisibility(CaretVisibility);
 
     bool dispatchSelectStart();
-  
-    bool visualWordMovementEnabled() const;
 
     Frame* m_frame;
 

Modified: trunk/Source/WebCore/html/HTMLElement.idl (160066 => 160067)


--- trunk/Source/WebCore/html/HTMLElement.idl	2013-12-04 05:05:29 UTC (rev 160066)
+++ trunk/Source/WebCore/html/HTMLElement.idl	2013-12-04 05:20:48 UTC (rev 160067)
@@ -46,7 +46,7 @@
     [RaisesException] Element insertAdjacentElement([Default=Undefined] optional DOMString where,
                                   [Default=Undefined] optional Element element);
     [RaisesException] void insertAdjacentHTML([Default=Undefined] optional DOMString where,
-                            [Default=Undefined] optional DOMString html);
+                  x          [Default=Undefined] optional DOMString html);
     [RaisesException] void insertAdjacentText([Default=Undefined] optional DOMString where,
                             [Default=Undefined] optional DOMString text);
 

Modified: trunk/Source/WebCore/page/Settings.in (160066 => 160067)


--- trunk/Source/WebCore/page/Settings.in	2013-12-04 05:05:29 UTC (rev 160066)
+++ trunk/Source/WebCore/page/Settings.in	2013-12-04 05:20:48 UTC (rev 160067)
@@ -136,7 +136,6 @@
 suppressesIncrementalRendering initial=false
 incrementalRenderingSuppressionTimeoutInSeconds type=double, initial=defaultIncrementalRenderingSuppressionTimeoutInSeconds
 backspaceKeyNavigationEnabled initial=true
-visualWordMovementEnabled initial=false
 shouldDisplaySubtitles initial=false, conditional=VIDEO_TRACK
 shouldDisplayCaptions initial=false, conditional=VIDEO_TRACK
 shouldDisplayTextDescriptions initial=false, conditional=VIDEO_TRACK
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to