Title: [166968] trunk/Source/WebCore
- Revision
- 166968
- Author
- beid...@apple.com
- Date
- 2014-04-08 15:36:06 -0700 (Tue, 08 Apr 2014)
Log Message
Non-empty ranges misdetected as empty ranges, avoiding telephone number detection.
<rdar://problem/16553441> and https://bugs.webkit.org/show_bug.cgi?id=131397
Reviewed by Tim Horton.
No new tests (Only affects a currently untested Mac-only WK2 feature)
* editing/Editor.cpp:
(WebCore::Editor::scanSelectionForTelephoneNumbers): Fix detection of empty ranges so we don’t
early return erroneously.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (166967 => 166968)
--- trunk/Source/WebCore/ChangeLog 2014-04-08 22:27:37 UTC (rev 166967)
+++ trunk/Source/WebCore/ChangeLog 2014-04-08 22:36:06 UTC (rev 166968)
@@ -1,3 +1,16 @@
+2014-04-08 Brady Eidson <beid...@apple.com>
+
+ Non-empty ranges misdetected as empty ranges, avoiding telephone number detection.
+ <rdar://problem/16553441> and https://bugs.webkit.org/show_bug.cgi?id=131397
+
+ Reviewed by Tim Horton.
+
+ No new tests (Only affects a currently untested Mac-only WK2 feature)
+
+ * editing/Editor.cpp:
+ (WebCore::Editor::scanSelectionForTelephoneNumbers): Fix detection of empty ranges so we don’t
+ early return erroneously.
+
2014-04-08 Adenilson Cavalcanti <cavalcan...@gmail.com>
[SVG] Fix CSS transform handling when zoomed
Modified: trunk/Source/WebCore/editing/Editor.cpp (166967 => 166968)
--- trunk/Source/WebCore/editing/Editor.cpp 2014-04-08 22:27:37 UTC (rev 166967)
+++ trunk/Source/WebCore/editing/Editor.cpp 2014-04-08 22:36:06 UTC (rev 166968)
@@ -3348,7 +3348,7 @@
clearDataDetectedTelephoneNumbers();
RefPtr<Range> selectedRange = m_frame.selection().toNormalizedRange();
- if (!selectedRange || selectedRange->startOffset() == selectedRange->endOffset())
+ if (!selectedRange || (selectedRange->startContainer() == selectedRange->endContainer() && selectedRange->startOffset() == selectedRange->endOffset()))
return;
// FIXME: This won't work if a phone number spans multiple chunks of text from the perspective of the TextIterator
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes