Safari hanging while loading pages - WebCore::AccessibilityRenderObject::visiblePosit...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Jul 2019 17:40:38 +0000 (17:40 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Jul 2019 17:40:38 +0000 (17:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=199434
<rdar://problem/52475140>

Patch by Andres Gonzalez <andresg_22@apple.com> on 2019-07-03
Reviewed by Chris Fleizach.

Source/WebCore:

Tests were disabled until underlying bug is fixed.

Rolling out a workaround for CharacterIterator::advance bug because it
seems to be causing a hang in Safari.
* editing/Editing.cpp:
(WebCore::visiblePositionForIndexUsingCharacterIterator):

LayoutTests:

Disabled the tests that were passing for workaround. The workaround had
to be roll out cause it is hanging Safari.
* TestExpectations:
* platform/ios-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247093 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/platform/ios-wk2/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/editing/Editing.cpp

index 5316aa4..98225e1 100644 (file)
@@ -1,3 +1,16 @@
+2019-07-03  Andres Gonzalez  <andresg_22@apple.com>
+
+        Safari hanging while loading pages - WebCore::AccessibilityRenderObject::visiblePositionRangeForLine.
+        https://bugs.webkit.org/show_bug.cgi?id=199434
+        <rdar://problem/52475140>
+
+        Reviewed by Chris Fleizach.
+
+        Disabled the tests that were passing for workaround. The workaround had
+        to be roll out cause it is hanging Safari.
+        * TestExpectations:
+        * platform/ios-wk2/TestExpectations:
+
 2019-07-02  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         imported/blink/animations/display-inline-style-adjust.html isn't a valid ref test
index 69382a9..a407df2 100644 (file)
@@ -2204,6 +2204,7 @@ webkit.org/b/170122 http/tests/preload/single_download_preload_headers_charset.p
 ########################################
 ### START OF -disabled tests
 
+webkit.org/b/199431 accessibility/set-selected-text-range-after-newline.html [ Skip ]
 webkit.org/b/20871 js/garbage-collect-after-string-appends.html [ Skip ]
 webkit.org/b/58323 compositing/objects/composited-object-alignment.html [ Skip ]
 webkit.org/b/48454 compositing/tiling/huge-layer-resize.html [ Skip ]
index c071b80..80f9dda 100644 (file)
@@ -994,6 +994,7 @@ fast/forms/indeterminate-progress-inline-height.html [ Failure ]
 fast/forms/input-appearance-spinbutton.html [ Failure ]
 fast/replaced/border-radius-clip.html [ Failure ]
 accessibility/ios-simulator/press-fires-touch-events.html [ Skip ]
+webkit.org/b/199431 accessibility/ios-simulator/set-selected-text-range-after-newline.html [ Skip ]
 
 fast/text/combining-character-sequence-vertical.html [ ImageOnlyFailure ]
 fast/text/vertical-quotation-marks.html [ ImageOnlyFailure ]
index 8ed561c..3e86ef3 100644 (file)
@@ -1,3 +1,18 @@
+2019-07-03  Andres Gonzalez  <andresg_22@apple.com>
+
+        Safari hanging while loading pages - WebCore::AccessibilityRenderObject::visiblePositionRangeForLine.
+        https://bugs.webkit.org/show_bug.cgi?id=199434
+        <rdar://problem/52475140>
+
+        Reviewed by Chris Fleizach.
+
+        Tests were disabled until underlying bug is fixed.
+
+        Rolling out a workaround for CharacterIterator::advance bug because it
+        seems to be causing a hang in Safari.
+        * editing/Editing.cpp:
+        (WebCore::visiblePositionForIndexUsingCharacterIterator):
+
 2019-07-02  Simon Fraser  <simon.fraser@apple.com>
 
         REGRESSION (r246723): ScrollingTreeOverflowScrollProxyNode::m_overflowScrollingNodeID is uninitialized sometimes
index 83f541b..fbe5860 100644 (file)
@@ -1122,16 +1122,6 @@ VisiblePosition visiblePositionForIndexUsingCharacterIterator(Node& node, int in
     CharacterIterator it(range.get());
     it.advance(index - 1);
 
-    if (!it.atEnd() && it.text()[0] == '\n') {
-        // FIXME: workaround for collapsed range (where only start position is correct) emitted for some emitted newlines.
-        auto range = it.range();
-        if (range->startPosition() == range->endPosition()) {
-            it.advance(1);
-            if (!it.atEnd())
-                return VisiblePosition(it.range()->startPosition());
-        }
-    }
-
     return { it.atEnd() ? range->endPosition() : it.range()->endPosition(), UPSTREAM };
 }