Title: [185613] trunk
- Revision
- 185613
- Author
- jhoneyc...@apple.com
- Date
- 2015-06-16 14:39:57 -0700 (Tue, 16 Jun 2015)
Log Message
[iOS] Crash long pressing on <input type=file>
https://bugs.webkit.org/show_bug.cgi?id=146009
<rdar://problem/21234453>
Reviewed by Ryosuke Niwa.
.:
* ManualTests/ios/long-press-input-type-file-crash.html: Added.
Source/WebCore:
* dom/Position.cpp:
(WebCore::Position::atStartOfTree):
(WebCore::Position::atEndOfTree):
Null check the container node before passing it to findParent().
Modified Paths
Added Paths
Diff
Modified: trunk/ChangeLog (185612 => 185613)
--- trunk/ChangeLog 2015-06-16 21:21:20 UTC (rev 185612)
+++ trunk/ChangeLog 2015-06-16 21:39:57 UTC (rev 185613)
@@ -1,3 +1,13 @@
+2015-06-15 Jon Honeycutt <jhoneyc...@apple.com>
+
+ [iOS] Crash long pressing on <input type=file>
+ https://bugs.webkit.org/show_bug.cgi?id=146009
+ <rdar://problem/21234453>
+
+ Reviewed by Ryosuke Niwa.
+
+ * ManualTests/ios/long-press-input-type-file-crash.html: Added.
+
2015-06-16 Brent Fulgham <bfulg...@apple.com>
Rollout accidental Xcode project change.
Added: trunk/ManualTests/ios/long-press-input-type-file-crash.html (0 => 185613)
--- trunk/ManualTests/ios/long-press-input-type-file-crash.html (rev 0)
+++ trunk/ManualTests/ios/long-press-input-type-file-crash.html 2015-06-16 21:39:57 UTC (rev 185613)
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+ <body _onload_="test()">
+ <p>
+ This test checks that a long press gesture on an file input button does not crash on iOS.
+ Press and hold on the file input button below until you see the word "PASS".
+ </p>
+ <p id="result">Test not running</p>
+ <p>
+ <input type="file" id="filecontrol">
+ </p>
+ <script>
+ var timer;
+ var pass;
+ function setText(s)
+ {
+ document.getElementById("result").innerHTML = s;
+ }
+
+ function test() {
+ var input = document.getElementById("filecontrol");
+ input._onclick_ = function(e) { e.preventDefault(); }
+ input._ontouchstart_ = function() {
+ setText("Wait...");
+ passed = false;
+ timer = window.setTimeout(function() { setText("PASS"); passed = true; }, 1000);
+ }
+ input._ontouchend_ = input._ontouchmove_ = function() {
+ if (passed)
+ return;
+ setText("Try again");
+ window.clearTimeout(timer);
+ }
+ }
+ </script>
+ </body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (185612 => 185613)
--- trunk/Source/WebCore/ChangeLog 2015-06-16 21:21:20 UTC (rev 185612)
+++ trunk/Source/WebCore/ChangeLog 2015-06-16 21:39:57 UTC (rev 185613)
@@ -1,3 +1,16 @@
+2015-06-15 Jon Honeycutt <jhoneyc...@apple.com>
+
+ [iOS] Crash long pressing on <input type=file>
+ https://bugs.webkit.org/show_bug.cgi?id=146009
+ <rdar://problem/21234453>
+
+ Reviewed by Ryosuke Niwa.
+
+ * dom/Position.cpp:
+ (WebCore::Position::atStartOfTree):
+ (WebCore::Position::atEndOfTree):
+ Null check the container node before passing it to findParent().
+
2015-06-15 Chris Fleizach <cfleiz...@apple.com>
AX: iOS accessibility tests are not running because we need WKTR support
Modified: trunk/Source/WebCore/dom/Position.cpp (185612 => 185613)
--- trunk/Source/WebCore/dom/Position.cpp 2015-06-16 21:21:20 UTC (rev 185612)
+++ trunk/Source/WebCore/dom/Position.cpp 2015-06-16 21:39:57 UTC (rev 185613)
@@ -476,7 +476,9 @@
{
if (isNull())
return true;
- if (findParent(containerNode()))
+
+ Node* container = containerNode();
+ if (container && findParent(container))
return false;
switch (m_anchorType) {
@@ -499,7 +501,9 @@
{
if (isNull())
return true;
- if (findParent(containerNode()))
+
+ Node* container = containerNode();
+ if (container && findParent(container))
return false;
switch (m_anchorType) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes