Title: [219707] trunk
Revision
219707
Author
[email protected]
Date
2017-07-20 15:45:23 -0700 (Thu, 20 Jul 2017)

Log Message

Unreviewed, rolling out r219706.

Broke iOS build

Reverted changeset:

"Drop legacy XPathException type"
https://bugs.webkit.org/show_bug.cgi?id=174679
http://trac.webkit.org/changeset/219706

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (219706 => 219707)


--- trunk/LayoutTests/ChangeLog	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/LayoutTests/ChangeLog	2017-07-20 22:45:23 UTC (rev 219707)
@@ -1,5 +1,17 @@
 2017-07-20  Chris Dumez  <[email protected]>
 
+        Unreviewed, rolling out r219706.
+
+        Broke iOS build
+
+        Reverted changeset:
+
+        "Drop legacy XPathException type"
+        https://bugs.webkit.org/show_bug.cgi?id=174679
+        http://trac.webkit.org/changeset/219706
+
+2017-07-20  Chris Dumez  <[email protected]>
+
         Drop legacy XPathException type
         https://bugs.webkit.org/show_bug.cgi?id=174679
 

Modified: trunk/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.js (219706 => 219707)


--- trunk/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.js	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.js	2017-07-20 22:45:23 UTC (rev 219707)
@@ -107,7 +107,7 @@
             exp = xpEvaluator.createExpression("12a",nullNSResolver);
         }
 		catch(ex) {            
-      success = (typeof(ex.code) != 'undefined' && ex.code == DOMException.SYNTAX_ERR);
+      success = (typeof(ex.code) != 'undefined' && ex.code == 51);
 		}
 		assertTrue("throw_INVALID_EXPRESSION_ERR",success);
 	}

Modified: trunk/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.js (219706 => 219707)


--- trunk/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.js	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.js	2017-07-20 22:45:23 UTC (rev 219707)
@@ -105,7 +105,7 @@
             result = xpEvaluator.evaluate("12a",root,nullNSResolver,0,nullResult);
         }
 		catch(ex) {            
-      success = (typeof(ex.code) != 'undefined' && ex.code == DOMException.SYNTAX_ERR);
+      success = (typeof(ex.code) != 'undefined' && ex.code == 51);
 		}
 		assertTrue("throw_INVALID_EXPRESSION_ERR",success);
 	}

Modified: trunk/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.js (219706 => 219707)


--- trunk/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.js	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.js	2017-07-20 22:45:23 UTC (rev 219707)
@@ -103,7 +103,7 @@
             result = xpEvaluator.evaluate("string(/)",doc,nullNSResolver,9,nullResult);
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("throw_TYPE_ERR",success);
 	}

Modified: trunk/LayoutTests/dom/svg/level3/xpath/XPathResult_TYPE_ERR.js (219706 => 219707)


--- trunk/LayoutTests/dom/svg/level3/xpath/XPathResult_TYPE_ERR.js	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/LayoutTests/dom/svg/level3/xpath/XPathResult_TYPE_ERR.js	2017-07-20 22:45:23 UTC (rev 219707)
@@ -159,7 +159,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("number_booleanValue_TYPE_ERR",success);
 	}
@@ -171,7 +171,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("number_singleNodeValue_TYPE_ERR",success);
 	}
@@ -183,7 +183,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("number_snapshotLength_TYPE_ERR",success);
 	}
@@ -195,7 +195,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("number_stringValue_TYPE_ERR",success);
 	}
@@ -206,7 +206,7 @@
             nodeValue = outresult.iterateNext();
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("number_iterateNext_TYPE_ERR",success);
 	}
@@ -217,7 +217,7 @@
             nodeValue = outresult.snapshotItem(0);
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("number_snapshotItem_TYPE_ERR",success);
 	}
@@ -235,7 +235,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("string_booleanValue_TYPE_ERR",success);
 	}
@@ -247,7 +247,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("string_numberValue_TYPE_ERR",success);
 	}
@@ -259,7 +259,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("string_singleNodeValue_TYPE_ERR",success);
 	}
@@ -271,7 +271,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("string_snapshotLength_TYPE_ERR",success);
 	}
@@ -282,7 +282,7 @@
             nodeValue = outresult.iterateNext();
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("string_iterateNext_TYPE_ERR",success);
 	}
@@ -293,7 +293,7 @@
             nodeValue = outresult.snapshotItem(0);
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("string_snapshotItem_TYPE_ERR",success);
 	}
@@ -311,7 +311,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("boolean_numberValue_TYPE_ERR",success);
 	}
@@ -323,7 +323,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("boolean_singleNodeValue_TYPE_ERR",success);
 	}
@@ -335,7 +335,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("boolean_snapshotLength_TYPE_ERR",success);
 	}
@@ -347,7 +347,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("boolean_stringValue_TYPE_ERR",success);
 	}
@@ -358,7 +358,7 @@
             nodeValue = outresult.iterateNext();
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("boolean_iterateNext_TYPE_ERR",success);
 	}
@@ -369,7 +369,7 @@
             nodeValue = outresult.snapshotItem(0);
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("boolean_snapshotItem_TYPE_ERR",success);
 	}
@@ -387,7 +387,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("unordered_node_iterator_booleanValue_TYPE_ERR",success);
 	}
@@ -399,7 +399,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("unordered_node_iterator_numberValue_TYPE_ERR",success);
 	}
@@ -411,7 +411,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("unordered_node_iterator_singleNodeValue_TYPE_ERR",success);
 	}
@@ -423,7 +423,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("unordered_node_iterator_snapshotLength_TYPE_ERR",success);
 	}
@@ -435,7 +435,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("unordered_node_iterator_stringValue_TYPE_ERR",success);
 	}
@@ -446,7 +446,7 @@
             nodeValue = outresult.snapshotItem(0);
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("unordered_node_iterator_snapshotItem_TYPE_ERR",success);
 	}
@@ -464,7 +464,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("ordered_node_iterator_booleanValue_TYPE_ERR",success);
 	}
@@ -476,7 +476,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("ordered_node_iterator_numberValue_TYPE_ERR",success);
 	}
@@ -488,7 +488,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("ordered_node_iterator_singleNodeValue_TYPE_ERR",success);
 	}
@@ -500,7 +500,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("ordered_node_iterator_snapshotLength_TYPE_ERR",success);
 	}
@@ -512,7 +512,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("ordered_node_iterator_stringValue_TYPE_ERR",success);
 	}
@@ -523,7 +523,7 @@
             nodeValue = outresult.snapshotItem(0);
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("ordered_node_iterator_snapshotItem_TYPE_ERR",success);
 	}
@@ -541,7 +541,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("unordered_node_snapshot_booleanValue_TYPE_ERR",success);
 	}
@@ -553,7 +553,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("unordered_node_snapshot_numberValue_TYPE_ERR",success);
 	}
@@ -565,7 +565,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("unordered_node_snapshot_singleNodeValue_TYPE_ERR",success);
 	}
@@ -577,7 +577,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("unordered_node_snapshot_stringValue_TYPE_ERR",success);
 	}
@@ -588,7 +588,7 @@
             nodeValue = outresult.iterateNext();
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("unordered_node_snapshot_iterateNext_TYPE_ERR",success);
 	}
@@ -606,7 +606,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("ordered_node_snapshot_booleanValue_TYPE_ERR",success);
 	}
@@ -618,7 +618,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("ordered_node_snapshot_numberValue_TYPE_ERR",success);
 	}
@@ -630,7 +630,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("ordered_node_snapshot_singleNodeValue_TYPE_ERR",success);
 	}
@@ -642,7 +642,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("ordered_node_snapshot_stringValue_TYPE_ERR",success);
 	}
@@ -653,7 +653,7 @@
             nodeValue = outresult.iterateNext();
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("ordered_node_snapshot_iterateNext_TYPE_ERR",success);
 	}
@@ -671,7 +671,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("any_unordered_node_booleanValue_TYPE_ERR",success);
 	}
@@ -683,7 +683,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("any_unordered_node_numberValue_TYPE_ERR",success);
 	}
@@ -695,7 +695,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("any_unordered_node_snapshotLength_TYPE_ERR",success);
 	}
@@ -707,7 +707,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("any_unordered_node_stringValue_TYPE_ERR",success);
 	}
@@ -718,7 +718,7 @@
             nodeValue = outresult.iterateNext();
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("any_unordered_node_iterateNext_TYPE_ERR",success);
 	}
@@ -729,7 +729,7 @@
             nodeValue = outresult.snapshotItem(0);
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("any_unordered_node_snapshotItem_TYPE_ERR",success);
 	}
@@ -747,7 +747,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("first_ordered_node_booleanValue_TYPE_ERR",success);
 	}
@@ -759,7 +759,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("first_ordered_node_numberValue_TYPE_ERR",success);
 	}
@@ -771,7 +771,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("first_ordered_node_snapshotLength_TYPE_ERR",success);
 	}
@@ -783,7 +783,7 @@
 
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("first_ordered_node_stringValue_TYPE_ERR",success);
 	}
@@ -794,7 +794,7 @@
             nodeValue = outresult.iterateNext();
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("first_ordered_node_iterateNext_TYPE_ERR",success);
 	}
@@ -805,7 +805,7 @@
             nodeValue = outresult.snapshotItem(0);
         }
 		catch(ex) {            
-      success = (ex.name == "TypeError");
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
 		}
 		assertTrue("first_ordered_node_snapshotItem_TYPE_ERR",success);
 	}

Added: trunk/LayoutTests/fast/dom/DOMException/XPathException-expected.txt (0 => 219707)


--- trunk/LayoutTests/fast/dom/DOMException/XPathException-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/DOMException/XPathException-expected.txt	2017-07-20 22:45:23 UTC (rev 219707)
@@ -0,0 +1,17 @@
+Tests the properties of the XPathException object.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS e.toString() is "TYPE_ERR (DOM XPath Exception 52): The _expression_ could not be converted to return the specified type."
+PASS Object.prototype.toString.call(e) is "[object XPathException]"
+PASS Object.prototype.toString.call(e.__proto__) is "[object XPathExceptionPrototype]"
+PASS e.constructor.toString() is "function XPathException() {\n    [native code]\n}"
+PASS e.constructor is window.XPathException
+PASS e.TYPE_ERR is e.constructor.TYPE_ERR
+PASS e.INVALID_EXPRESSION_ERR is 51
+PASS e.TYPE_ERR is 52
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Deleted: trunk/LayoutTests/fast/dom/DOMException/XPathException-obsolete-expected.txt (219706 => 219707)


--- trunk/LayoutTests/fast/dom/DOMException/XPathException-obsolete-expected.txt	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/LayoutTests/fast/dom/DOMException/XPathException-obsolete-expected.txt	2017-07-20 22:45:23 UTC (rev 219707)
@@ -1,10 +0,0 @@
-Tests that the obsolete XPathException type is not exposed.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS window.XPathException is undefined
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/fast/dom/DOMException/XPathException-obsolete.html (219706 => 219707)


--- trunk/LayoutTests/fast/dom/DOMException/XPathException-obsolete.html	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/LayoutTests/fast/dom/DOMException/XPathException-obsolete.html	2017-07-20 22:45:23 UTC (rev 219707)
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body>
-<script src=""
-<script>
-description("Tests that the obsolete XPathException type is not exposed.");
-
-shouldBe("window.XPathException", "undefined");
-</script>
-</body>
-</html>

Added: trunk/LayoutTests/fast/dom/DOMException/XPathException.html (0 => 219707)


--- trunk/LayoutTests/fast/dom/DOMException/XPathException.html	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/DOMException/XPathException.html	2017-07-20 22:45:23 UTC (rev 219707)
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<script src=""
+<script src=""
+</body>
+</html>

Added: trunk/LayoutTests/fast/dom/DOMException/resources/XPathException.js (0 => 219707)


--- trunk/LayoutTests/fast/dom/DOMException/resources/XPathException.js	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/DOMException/resources/XPathException.js	2017-07-20 22:45:23 UTC (rev 219707)
@@ -0,0 +1,21 @@
+description("Tests the properties of the XPathException object.")
+
+var e;
+try {
+    var evalulator = new XPathEvaluator;
+    var nsResolver = evalulator.createNSResolver(document);
+    var result = evalulator.evaluate("/body", document, nsResolver, 0, null);
+    var num = result.numberValue;
+   // raises a TYPE_ERR
+} catch (err) {
+    e = err;
+}
+
+shouldBeEqualToString("e.toString()", "TYPE_ERR (DOM XPath Exception 52): The _expression_ could not be converted to return the specified type.");
+shouldBeEqualToString("Object.prototype.toString.call(e)", "[object XPathException]");
+shouldBeEqualToString("Object.prototype.toString.call(e.__proto__)", "[object XPathExceptionPrototype]");
+shouldBeEqualToString("e.constructor.toString()", "function XPathException() {\n    [native code]\n}");
+shouldBe("e.constructor", "window.XPathException");
+shouldBe("e.TYPE_ERR", "e.constructor.TYPE_ERR");
+shouldBe("e.INVALID_EXPRESSION_ERR", "51");
+shouldBe("e.TYPE_ERR", "52");

Modified: trunk/LayoutTests/fast/dom/Window/resources/window-properties.js (219706 => 219707)


--- trunk/LayoutTests/fast/dom/Window/resources/window-properties.js	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/LayoutTests/fast/dom/Window/resources/window-properties.js	2017-07-20 22:45:23 UTC (rev 219707)
@@ -148,6 +148,7 @@
     ["XMLHttpRequest", "object"],
     ["XMLSerializer", "object"],
     ["XPathEvaluator", "object"],
+    ["XPathException", "object"],
     ["XPathResult", "object"],
     ["XSLTProcessor", "object"],
     ["onload", "object"],

Modified: trunk/LayoutTests/fast/dom/Window/window-lookup-precedence-expected.txt (219706 => 219707)


--- trunk/LayoutTests/fast/dom/Window/window-lookup-precedence-expected.txt	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/LayoutTests/fast/dom/Window/window-lookup-precedence-expected.txt	2017-07-20 22:45:23 UTC (rev 219707)
@@ -304,6 +304,8 @@
 PASS win['XMLSerializer'] == '[object XMLSerializerConstructor]' is true
 PASS win['XPathEvaluator'] == '[object XPathEvaluatorConstructor]' is true
 PASS win['XPathEvaluator'] == '[object XPathEvaluatorConstructor]' is true
+PASS win['XPathException'] == '[object XPathExceptionConstructor]' is true
+PASS win['XPathException'] == '[object XPathExceptionConstructor]' is true
 PASS win['XPathResult'] == '[object XPathResultConstructor]' is true
 PASS win['XPathResult'] == '[object XPathResultConstructor]' is true
 PASS win['XSLTProcessor'] == '[object XSLTProcessorConstructor]' is true

Modified: trunk/LayoutTests/fast/xpath/4XPath/Core/test_parser-expected.txt (219706 => 219707)


--- trunk/LayoutTests/fast/xpath/4XPath/Core/test_parser-expected.txt	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/LayoutTests/fast/xpath/4XPath/Core/test_parser-expected.txt	2017-07-20 22:45:23 UTC (rev 219707)
@@ -38,7 +38,7 @@
 PASS CHILD2/@CODE
 PASS DOM.evaluate("CHILD2/@CODE * 0", ROOT, null, XPathResult.NUMBER_TYPE, null).numberValue is 0
 PASS föø
-PASS DOM.evaluate("\\", ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null) threw exception SyntaxError: The string did not match the expected pattern..
+PASS DOM.evaluate("\\", ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The _expression_ had a syntax error or otherwise is not a legal _expression_ according to the rules of the specific XPathEvaluator..
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/xpath/invalid-functions-expected.txt (219706 => 219707)


--- trunk/LayoutTests/fast/xpath/invalid-functions-expected.txt	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/LayoutTests/fast/xpath/invalid-functions-expected.txt	2017-07-20 22:45:23 UTC (rev 219707)
@@ -1,12 +1,12 @@
-PASS document.createExpression("foobar()", null) threw exception SyntaxError: The string did not match the expected pattern..
-PASS document.evaluate("foobar()", document, null, XPathResult.ANY_TYPE, null) threw exception SyntaxError: The string did not match the expected pattern..
-PASS document.createExpression("position(//div)", null) threw exception SyntaxError: The string did not match the expected pattern..
-PASS document.evaluate("position(//div)", document, null, XPathResult.ANY_TYPE, null) threw exception SyntaxError: The string did not match the expected pattern..
-PASS document.createExpression("ceiling(1,2)", null) threw exception SyntaxError: The string did not match the expected pattern..
-PASS document.evaluate("ceiling(1,2)", document, null, XPathResult.ANY_TYPE, null) threw exception SyntaxError: The string did not match the expected pattern..
-PASS document.createExpression("ceiling(1,2)", null).evaluate(document, XPathResult.ANY_TYPE, null) threw exception SyntaxError: The string did not match the expected pattern..
-PASS document.createExpression("boolean()", null) threw exception SyntaxError: The string did not match the expected pattern..
-PASS document.evaluate("boolean()", document, null, XPathResult.ANY_TYPE, null) threw exception SyntaxError: The string did not match the expected pattern..
+PASS document.createExpression("foobar()", null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The _expression_ had a syntax error or otherwise is not a legal _expression_ according to the rules of the specific XPathEvaluator..
+PASS document.evaluate("foobar()", document, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The _expression_ had a syntax error or otherwise is not a legal _expression_ according to the rules of the specific XPathEvaluator..
+PASS document.createExpression("position(//div)", null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The _expression_ had a syntax error or otherwise is not a legal _expression_ according to the rules of the specific XPathEvaluator..
+PASS document.evaluate("position(//div)", document, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The _expression_ had a syntax error or otherwise is not a legal _expression_ according to the rules of the specific XPathEvaluator..
+PASS document.createExpression("ceiling(1,2)", null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The _expression_ had a syntax error or otherwise is not a legal _expression_ according to the rules of the specific XPathEvaluator..
+PASS document.evaluate("ceiling(1,2)", document, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The _expression_ had a syntax error or otherwise is not a legal _expression_ according to the rules of the specific XPathEvaluator..
+PASS document.createExpression("ceiling(1,2)", null).evaluate(document, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The _expression_ had a syntax error or otherwise is not a legal _expression_ according to the rules of the specific XPathEvaluator..
+PASS document.createExpression("boolean()", null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The _expression_ had a syntax error or otherwise is not a legal _expression_ according to the rules of the specific XPathEvaluator..
+PASS document.evaluate("boolean()", document, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The _expression_ had a syntax error or otherwise is not a legal _expression_ according to the rules of the specific XPathEvaluator..
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/xpath/py-dom-xpath/expressions-expected.txt (219706 => 219707)


--- trunk/LayoutTests/fast/xpath/py-dom-xpath/expressions-expected.txt	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/LayoutTests/fast/xpath/py-dom-xpath/expressions-expected.txt	2017-07-20 22:45:23 UTC (rev 219707)
@@ -1,16 +1,16 @@
 PASS //item[@id >= 2 and @id <= "4"]
 PASS //item[@id >= 2 and @id <= 3]
-PASS doc.evaluate("position(1)", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception SyntaxError: The string did not match the expected pattern..
-PASS doc.evaluate("not()", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception SyntaxError: The string did not match the expected pattern..
+PASS doc.evaluate("position(1)", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The _expression_ had a syntax error or otherwise is not a legal _expression_ according to the rules of the specific XPathEvaluator..
+PASS doc.evaluate("not()", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The _expression_ had a syntax error or otherwise is not a legal _expression_ according to the rules of the specific XPathEvaluator..
 PASS string-length(100)
-PASS doc.evaluate("count(100)", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception SyntaxError: The string did not match the expected pattern..
-PASS doc.evaluate("adumbrate()", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception SyntaxError: The string did not match the expected pattern..
+PASS doc.evaluate("count(100)", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The _expression_ had a syntax error or otherwise is not a legal _expression_ according to the rules of the specific XPathEvaluator..
+PASS doc.evaluate("adumbrate()", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The _expression_ had a syntax error or otherwise is not a legal _expression_ according to the rules of the specific XPathEvaluator..
 PASS //item[@id mod 2 = 0] | //item[@id mod 3 = 0]
-PASS doc.evaluate("//item | 42", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception SyntaxError: The string did not match the expected pattern..
-PASS doc.evaluate("/doc/(item[@id = 2] | item[@id = 6])/@id", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception SyntaxError: The string did not match the expected pattern..
-PASS doc.evaluate('"monty"/anaconda', doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception SyntaxError: The string did not match the expected pattern..
-PASS doc.evaluate('/doc/string(item[@id = 2])/@id', doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception SyntaxError: The string did not match the expected pattern..
-PASS doc.evaluate('(1)[1]', doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception SyntaxError: The string did not match the expected pattern..
+PASS doc.evaluate("//item | 42", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The _expression_ had a syntax error or otherwise is not a legal _expression_ according to the rules of the specific XPathEvaluator..
+PASS doc.evaluate("/doc/(item[@id = 2] | item[@id = 6])/@id", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The _expression_ had a syntax error or otherwise is not a legal _expression_ according to the rules of the specific XPathEvaluator..
+PASS doc.evaluate('"monty"/anaconda', doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The _expression_ had a syntax error or otherwise is not a legal _expression_ according to the rules of the specific XPathEvaluator..
+PASS doc.evaluate('/doc/string(item[@id = 2])/@id', doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The _expression_ had a syntax error or otherwise is not a legal _expression_ according to the rules of the specific XPathEvaluator..
+PASS doc.evaluate('(1)[1]', doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The _expression_ had a syntax error or otherwise is not a legal _expression_ according to the rules of the specific XPathEvaluator..
 PASS (1)
 PASS ((1 + 1))
 PASS 1 or 1

Modified: trunk/LayoutTests/platform/gtk/fast/dom/Window/window-lookup-precedence-expected.txt (219706 => 219707)


--- trunk/LayoutTests/platform/gtk/fast/dom/Window/window-lookup-precedence-expected.txt	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/LayoutTests/platform/gtk/fast/dom/Window/window-lookup-precedence-expected.txt	2017-07-20 22:45:23 UTC (rev 219707)
@@ -302,6 +302,8 @@
 PASS win['XMLSerializer'] == '[object XMLSerializerConstructor]' is true
 PASS win['XPathEvaluator'] == '[object XPathEvaluatorConstructor]' is true
 PASS win['XPathEvaluator'] == '[object XPathEvaluatorConstructor]' is true
+PASS win['XPathException'] == '[object XPathExceptionConstructor]' is true
+PASS win['XPathException'] == '[object XPathExceptionConstructor]' is true
 PASS win['XPathResult'] == '[object XPathResultConstructor]' is true
 PASS win['XPathResult'] == '[object XPathResultConstructor]' is true
 PASS win['XSLTProcessor'] == '[object XSLTProcessorConstructor]' is true

Modified: trunk/LayoutTests/platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt (219706 => 219707)


--- trunk/LayoutTests/platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/LayoutTests/platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt	2017-07-20 22:45:23 UTC (rev 219707)
@@ -298,6 +298,8 @@
 PASS 'function XMLSerializer() {    [native code]}' is 'function XMLSerializer() {    [native code]}'
 PASS 'function XPathEvaluator() {    [native code]}' is 'function XPathEvaluator() {    [native code]}'
 PASS 'function XPathEvaluator() {    [native code]}' is 'function XPathEvaluator() {    [native code]}'
+PASS 'function XPathException() {    [native code]}' is 'function XPathException() {    [native code]}'
+PASS 'function XPathException() {    [native code]}' is 'function XPathException() {    [native code]}'
 PASS 'function XPathResult() {    [native code]}' is 'function XPathResult() {    [native code]}'
 PASS 'function XPathResult() {    [native code]}' is 'function XPathResult() {    [native code]}'
 PASS 'function XSLTProcessor() {    [native code]}' is 'function XSLTProcessor() {    [native code]}'

Modified: trunk/Source/WebCore/CMakeLists.txt (219706 => 219707)


--- trunk/Source/WebCore/CMakeLists.txt	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/Source/WebCore/CMakeLists.txt	2017-07-20 22:45:23 UTC (rev 219707)
@@ -700,6 +700,7 @@
     xml/XMLHttpRequestUpload.idl
     xml/XMLSerializer.idl
     xml/XPathEvaluator.idl
+    xml/XPathException.idl
     xml/XPathExpression.idl
     xml/XPathNSResolver.idl
     xml/XPathResult.idl
@@ -2981,6 +2982,7 @@
     xml/XMLSerializer.cpp
     xml/XMLTreeViewer.cpp
     xml/XPathEvaluator.cpp
+    xml/XPathException.cpp
     xml/XPathExpression.cpp
     xml/XPathExpressionNode.cpp
     xml/XPathFunctions.cpp

Modified: trunk/Source/WebCore/ChangeLog (219706 => 219707)


--- trunk/Source/WebCore/ChangeLog	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/Source/WebCore/ChangeLog	2017-07-20 22:45:23 UTC (rev 219707)
@@ -1,5 +1,17 @@
 2017-07-20  Chris Dumez  <[email protected]>
 
+        Unreviewed, rolling out r219706.
+
+        Broke iOS build
+
+        Reverted changeset:
+
+        "Drop legacy XPathException type"
+        https://bugs.webkit.org/show_bug.cgi?id=174679
+        http://trac.webkit.org/changeset/219706
+
+2017-07-20  Chris Dumez  <[email protected]>
+
         Drop legacy XPathException type
         https://bugs.webkit.org/show_bug.cgi?id=174679
 

Modified: trunk/Source/WebCore/DerivedSources.cpp (219706 => 219707)


--- trunk/Source/WebCore/DerivedSources.cpp	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/Source/WebCore/DerivedSources.cpp	2017-07-20 22:45:23 UTC (rev 219707)
@@ -647,6 +647,7 @@
 #include "JSXMLHttpRequestUpload.cpp"
 #include "JSXMLSerializer.cpp"
 #include "JSXPathEvaluator.cpp"
+#include "JSXPathException.cpp"
 #include "JSXPathExpression.cpp"
 #include "JSXPathNSResolver.cpp"
 #include "JSXPathResult.cpp"

Modified: trunk/Source/WebCore/DerivedSources.make (219706 => 219707)


--- trunk/Source/WebCore/DerivedSources.make	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/Source/WebCore/DerivedSources.make	2017-07-20 22:45:23 UTC (rev 219707)
@@ -830,6 +830,7 @@
     $(WebCore)/xml/XMLHttpRequestUpload.idl \
     $(WebCore)/xml/XMLSerializer.idl \
     $(WebCore)/xml/XPathEvaluator.idl \
+    $(WebCore)/xml/XPathException.idl \
     $(WebCore)/xml/XPathExpression.idl \
     $(WebCore)/xml/XPathNSResolver.idl \
     $(WebCore)/xml/XPathResult.idl \

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (219706 => 219707)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-07-20 22:45:23 UTC (rev 219707)
@@ -4088,6 +4088,7 @@
 		978AD67514130A8D00C7CAE3 /* HTMLSpanElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 978AD67214130A8D00C7CAE3 /* HTMLSpanElement.h */; };
 		978D07BE145A0F6C0096908D /* DOMCoreException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 978D07BD145A0F6C0096908D /* DOMCoreException.cpp */; };
 		978D07CA145A10160096908D /* SVGException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 978D07C9145A10160096908D /* SVGException.cpp */; };
+		978D07CC145A102E0096908D /* XPathException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 978D07CB145A102E0096908D /* XPathException.cpp */; };
 		979F43D31075E44A0000F83B /* NavigationScheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 979F43D11075E44A0000F83B /* NavigationScheduler.cpp */; };
 		979F43D41075E44A0000F83B /* NavigationScheduler.h in Headers */ = {isa = PBXBuildFile; fileRef = 979F43D21075E44A0000F83B /* NavigationScheduler.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		97AA3CA5145237CC003E1DA6 /* EventTargetHeaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 97AA3CA3145237CC003E1DA6 /* EventTargetHeaders.h */; };
@@ -5693,6 +5694,9 @@
 		BC60D7C10D29A46300B9918F /* JSDOMCoreException.h in Headers */ = {isa = PBXBuildFile; fileRef = BC60D7BF0D29A46300B9918F /* JSDOMCoreException.h */; };
 		BC60D8F20D2A11E000B9918F /* ExceptionBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC60D8F00D2A11E000B9918F /* ExceptionBase.cpp */; };
 		BC60D8F30D2A11E000B9918F /* ExceptionBase.h in Headers */ = {isa = PBXBuildFile; fileRef = BC60D8F10D2A11E000B9918F /* ExceptionBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		BC60DA5B0D2A31F700B9918F /* XPathException.h in Headers */ = {isa = PBXBuildFile; fileRef = BC60DA590D2A31F700B9918F /* XPathException.h */; };
+		BC60DB490D2A3D1E00B9918F /* JSXPathException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC60DB470D2A3D1E00B9918F /* JSXPathException.cpp */; };
+		BC60DB4A0D2A3D1E00B9918F /* JSXPathException.h in Headers */ = {isa = PBXBuildFile; fileRef = BC60DB480D2A3D1E00B9918F /* JSXPathException.h */; };
 		BC64640A11D7F304006455B0 /* DOMStringMap.h in Headers */ = {isa = PBXBuildFile; fileRef = BC64640811D7F304006455B0 /* DOMStringMap.h */; };
 		BC64641C11D7F416006455B0 /* DatasetDOMStringMap.h in Headers */ = {isa = PBXBuildFile; fileRef = BC64641A11D7F416006455B0 /* DatasetDOMStringMap.h */; };
 		BC64641D11D7F416006455B0 /* DatasetDOMStringMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC64641B11D7F416006455B0 /* DatasetDOMStringMap.cpp */; };
@@ -12258,6 +12262,7 @@
 		978AD67314130A8D00C7CAE3 /* HTMLSpanElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLSpanElement.idl; sourceTree = "<group>"; };
 		978D07BD145A0F6C0096908D /* DOMCoreException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMCoreException.cpp; sourceTree = "<group>"; };
 		978D07C9145A10160096908D /* SVGException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGException.cpp; sourceTree = "<group>"; };
+		978D07CB145A102E0096908D /* XPathException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XPathException.cpp; sourceTree = "<group>"; };
 		979F43D11075E44A0000F83B /* NavigationScheduler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NavigationScheduler.cpp; sourceTree = "<group>"; };
 		979F43D21075E44A0000F83B /* NavigationScheduler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigationScheduler.h; sourceTree = "<group>"; };
 		97AA3CA3145237CC003E1DA6 /* EventTargetHeaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventTargetHeaders.h; sourceTree = "<group>"; };
@@ -14153,6 +14158,10 @@
 		BC60D7BF0D29A46300B9918F /* JSDOMCoreException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMCoreException.h; sourceTree = "<group>"; };
 		BC60D8F00D2A11E000B9918F /* ExceptionBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExceptionBase.cpp; sourceTree = "<group>"; };
 		BC60D8F10D2A11E000B9918F /* ExceptionBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExceptionBase.h; sourceTree = "<group>"; };
+		BC60DA590D2A31F700B9918F /* XPathException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPathException.h; sourceTree = "<group>"; };
+		BC60DA5A0D2A31F700B9918F /* XPathException.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = XPathException.idl; sourceTree = "<group>"; };
+		BC60DB470D2A3D1E00B9918F /* JSXPathException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSXPathException.cpp; sourceTree = "<group>"; };
+		BC60DB480D2A3D1E00B9918F /* JSXPathException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSXPathException.h; sourceTree = "<group>"; };
 		BC64640811D7F304006455B0 /* DOMStringMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMStringMap.h; sourceTree = "<group>"; };
 		BC64641A11D7F416006455B0 /* DatasetDOMStringMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatasetDOMStringMap.h; sourceTree = "<group>"; };
 		BC64641B11D7F416006455B0 /* DatasetDOMStringMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DatasetDOMStringMap.cpp; sourceTree = "<group>"; };
@@ -21901,6 +21910,8 @@
 			children = (
 				1A762C6B0A074F2600989F5B /* JSXPathEvaluator.cpp */,
 				1A762C6C0A074F2600989F5B /* JSXPathEvaluator.h */,
+				BC60DB470D2A3D1E00B9918F /* JSXPathException.cpp */,
+				BC60DB480D2A3D1E00B9918F /* JSXPathException.h */,
 				1A762C6D0A074F2600989F5B /* JSXPathExpression.cpp */,
 				1A762C6E0A074F2600989F5B /* JSXPathExpression.h */,
 				1A762C6F0A074F2600989F5B /* JSXPathNSResolver.cpp */,
@@ -24645,6 +24656,9 @@
 				1AB7FC470A8B92EC00D9D37B /* XPathEvaluator.cpp */,
 				1AB7FC480A8B92EC00D9D37B /* XPathEvaluator.h */,
 				1AB7FC490A8B92EC00D9D37B /* XPathEvaluator.idl */,
+				978D07CB145A102E0096908D /* XPathException.cpp */,
+				BC60DA590D2A31F700B9918F /* XPathException.h */,
+				BC60DA5A0D2A31F700B9918F /* XPathException.idl */,
 				1AB7FC4A0A8B92EC00D9D37B /* XPathExpression.cpp */,
 				1AB7FC4B0A8B92EC00D9D37B /* XPathExpression.h */,
 				1AB7FC4C0A8B92EC00D9D37B /* XPathExpression.idl */,
@@ -28455,6 +28469,7 @@
 				BCDFD4960E30592F009D10AD /* JSXMLHttpRequestUpload.h in Headers */,
 				1ACE53F70A8D19470022947D /* JSXMLSerializer.h in Headers */,
 				1A762C740A074F2600989F5B /* JSXPathEvaluator.h in Headers */,
+				BC60DB4A0D2A3D1E00B9918F /* JSXPathException.h in Headers */,
 				1A762C760A074F2600989F5B /* JSXPathExpression.h in Headers */,
 				1A762C780A074F2600989F5B /* JSXPathNSResolver.h in Headers */,
 				1A762C7A0A074F2600989F5B /* JSXPathResult.h in Headers */,
@@ -30188,6 +30203,7 @@
 				1ACE53EB0A8D18E70022947D /* XMLSerializer.h in Headers */,
 				5905ADC01302F3CE00F116DF /* XMLTreeViewer.h in Headers */,
 				1AB7FC690A8B92EC00D9D37B /* XPathEvaluator.h in Headers */,
+				BC60DA5B0D2A31F700B9918F /* XPathException.h in Headers */,
 				1AB7FC6C0A8B92EC00D9D37B /* XPathExpression.h in Headers */,
 				1AB7FC6F0A8B92EC00D9D37B /* XPathExpressionNode.h in Headers */,
 				1AB7FC710A8B92EC00D9D37B /* XPathFunctions.h in Headers */,
@@ -32485,6 +32501,7 @@
 				BCDFD4950E30592F009D10AD /* JSXMLHttpRequestUpload.cpp in Sources */,
 				1ACE53F60A8D19470022947D /* JSXMLSerializer.cpp in Sources */,
 				1A762C730A074F2600989F5B /* JSXPathEvaluator.cpp in Sources */,
+				BC60DB490D2A3D1E00B9918F /* JSXPathException.cpp in Sources */,
 				1A762C750A074F2600989F5B /* JSXPathExpression.cpp in Sources */,
 				1A762C770A074F2600989F5B /* JSXPathNSResolver.cpp in Sources */,
 				836C14431CDEAFD80073493F /* JSXPathNSResolverCustom.cpp in Sources */,
@@ -33873,6 +33890,7 @@
 				1ACE53EA0A8D18E70022947D /* XMLSerializer.cpp in Sources */,
 				5905ADBF1302F3CE00F116DF /* XMLTreeViewer.cpp in Sources */,
 				1AB7FC680A8B92EC00D9D37B /* XPathEvaluator.cpp in Sources */,
+				978D07CC145A102E0096908D /* XPathException.cpp in Sources */,
 				1AB7FC6B0A8B92EC00D9D37B /* XPathExpression.cpp in Sources */,
 				1AB7FC6E0A8B92EC00D9D37B /* XPathExpressionNode.cpp in Sources */,
 				1AB7FC700A8B92EC00D9D37B /* XPathFunctions.cpp in Sources */,

Modified: trunk/Source/WebCore/bindings/js/JSDOMExceptionHandling.cpp (219706 => 219707)


--- trunk/Source/WebCore/bindings/js/JSDOMExceptionHandling.cpp	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/Source/WebCore/bindings/js/JSDOMExceptionHandling.cpp	2017-07-20 22:45:23 UTC (rev 219707)
@@ -177,6 +177,9 @@
     case SVGExceptionType:
         errorObject = toJS(exec, globalObject, SVGException::create(description));
         break;
+    case XPathExceptionType:
+        errorObject = toJS(exec, globalObject, XPathException::create(description));
+        break;
     }
     
     ASSERT(errorObject);

Modified: trunk/Source/WebCore/bindings/js/JSExceptionBase.cpp (219706 => 219707)


--- trunk/Source/WebCore/bindings/js/JSExceptionBase.cpp	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/Source/WebCore/bindings/js/JSExceptionBase.cpp	2017-07-20 22:45:23 UTC (rev 219707)
@@ -28,6 +28,7 @@
 
 #include "JSDOMCoreException.h"
 #include "JSSVGException.h"
+#include "JSXPathException.h"
 
 namespace WebCore {
 
@@ -37,6 +38,8 @@
         return reinterpret_cast<ExceptionBase*>(domException);
     if (SVGException* svgException = JSSVGException::toWrapped(vm, value))
         return reinterpret_cast<ExceptionBase*>(svgException);
+    if (XPathException* pathException = JSXPathException::toWrapped(vm, value))
+        return reinterpret_cast<ExceptionBase*>(pathException);
 
     return nullptr;
 }

Modified: trunk/Source/WebCore/dom/DOMExceptions.in (219706 => 219707)


--- trunk/Source/WebCore/dom/DOMExceptions.in	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/Source/WebCore/dom/DOMExceptions.in	2017-07-20 22:45:23 UTC (rev 219707)
@@ -2,4 +2,5 @@
 
 DOMCoreException
 SVGException
+XPathException
 

Added: trunk/Source/WebCore/xml/XPathException.cpp (0 => 219707)


--- trunk/Source/WebCore/xml/XPathException.cpp	                        (rev 0)
+++ trunk/Source/WebCore/xml/XPathException.cpp	2017-07-20 22:45:23 UTC (rev 219707)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY GOOGLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "XPathException.h"
+
+#include "ExceptionCodeDescription.h"
+
+namespace WebCore {
+
+static struct XPathExceptionNameDescription {
+    const char* const name;
+    const char* const description;
+} xPathExceptions[] = {
+    { "INVALID_EXPRESSION_ERR", "The _expression_ had a syntax error or otherwise is not a legal _expression_ according to the rules of the specific XPathEvaluator." },
+    { "TYPE_ERR", "The _expression_ could not be converted to return the specified type." }
+};
+
+bool XPathException::initializeDescription(ExceptionCode ec, ExceptionCodeDescription* description)
+{
+    if (ec < XPathExceptionOffset || ec > XPathExceptionMax)
+        return false;
+
+    description->typeName = "DOM XPath";
+    description->code = ec - XPathExceptionOffset;
+    description->type = XPathExceptionType;
+
+    size_t tableSize = WTF_ARRAY_LENGTH(xPathExceptions);
+    size_t tableIndex = ec - INVALID_EXPRESSION_ERR;
+
+    description->name = tableIndex < tableSize ? xPathExceptions[tableIndex].name : 0;
+    description->description = tableIndex < tableSize ? xPathExceptions[tableIndex].description : 0;
+
+    return true;
+}
+
+} // namespace WebCore

Added: trunk/Source/WebCore/xml/XPathException.h (0 => 219707)


--- trunk/Source/WebCore/xml/XPathException.h	                        (rev 0)
+++ trunk/Source/WebCore/xml/XPathException.h	2017-07-20 22:45:23 UTC (rev 219707)
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "ExceptionBase.h"
+
+namespace WebCore {
+
+class XPathException : public ExceptionBase {
+public:
+    static Ref<XPathException> create(const ExceptionCodeDescription& description)
+    {
+        return adoptRef(*new XPathException(description));
+    }
+
+    static const int XPathExceptionOffset = 400;
+    static const int XPathExceptionMax = 499;
+
+    enum XPathExceptionCode {
+        INVALID_EXPRESSION_ERR = XPathExceptionOffset + 51,
+        TYPE_ERR
+    };
+
+    static bool initializeDescription(ExceptionCode, ExceptionCodeDescription*);
+
+private:
+    explicit XPathException(const ExceptionCodeDescription& description)
+        : ExceptionBase(description)
+    {
+    }
+};
+
+} // namespace WebCore

Added: trunk/Source/WebCore/xml/XPathException.idl (0 => 219707)


--- trunk/Source/WebCore/xml/XPathException.idl	                        (rev 0)
+++ trunk/Source/WebCore/xml/XPathException.idl	2017-07-20 22:45:23 UTC (rev 219707)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    DoNotCheckConstants,
+    ImplementationLacksVTable,
+] exception XPathException {
+    readonly attribute unsigned short code;
+    readonly attribute DOMString name;
+    readonly attribute DOMString message;
+
+    [NotEnumerable] DOMString toString();
+
+    // XPathExceptionCode
+    const unsigned short INVALID_EXPRESSION_ERR = 51;
+    const unsigned short TYPE_ERR = 52;
+};
+

Modified: trunk/Source/WebCore/xml/XPathExpression.cpp (219706 => 219707)


--- trunk/Source/WebCore/xml/XPathExpression.cpp	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/Source/WebCore/xml/XPathExpression.cpp	2017-07-20 22:45:23 UTC (rev 219707)
@@ -29,6 +29,7 @@
 
 #include "Document.h"
 #include "ExceptionCode.h"
+#include "XPathException.h"
 #include "XPathNSResolver.h"
 #include "XPathParser.h"
 #include "XPathResult.h"
@@ -70,8 +71,11 @@
     auto result = XPathResult::create(contextNode->document(), m_topExpression->evaluate());
     evaluationContext.node = nullptr; // Do not hold a reference to the context node, as this may prevent the whole document from being destroyed in time.
 
-    if (evaluationContext.hadTypeConversionError)
-        return Exception { SYNTAX_ERR };
+    if (evaluationContext.hadTypeConversionError) {
+        // It is not specified what to do if type conversion fails while evaluating an _expression_, and INVALID_EXPRESSION_ERR is not exactly right
+        // when the failure happens in an otherwise valid _expression_ because of a variable. But XPathEvaluator does not support variables, so it's close enough.
+        return Exception { XPathException::INVALID_EXPRESSION_ERR };
+    }
 
     if (type != XPathResult::ANY_TYPE) {
         auto convertToResult = result->convertTo(type);

Modified: trunk/Source/WebCore/xml/XPathParser.cpp (219706 => 219707)


--- trunk/Source/WebCore/xml/XPathParser.cpp	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/Source/WebCore/xml/XPathParser.cpp	2017-07-20 22:45:23 UTC (rev 219707)
@@ -30,6 +30,7 @@
 
 #include "ExceptionCode.h"
 #include "XPathEvaluator.h"
+#include "XPathException.h"
 #include "XPathNSResolver.h"
 #include "XPathPath.h"
 #include "XPathStep.h"
@@ -461,7 +462,7 @@
         return Exception { NAMESPACE_ERR };
 
     if (parseError)
-        return Exception { SYNTAX_ERR };
+        return Exception { XPathException::INVALID_EXPRESSION_ERR };
 
     return WTFMove(parser.m_result);
 }

Modified: trunk/Source/WebCore/xml/XPathResult.cpp (219706 => 219707)


--- trunk/Source/WebCore/xml/XPathResult.cpp	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/Source/WebCore/xml/XPathResult.cpp	2017-07-20 22:45:23 UTC (rev 219707)
@@ -30,6 +30,7 @@
 #include "Document.h"
 #include "ExceptionCode.h"
 #include "XPathEvaluator.h"
+#include "XPathException.h"
 
 namespace WebCore {
 
@@ -85,18 +86,18 @@
     case ANY_UNORDERED_NODE_TYPE:
     case FIRST_ORDERED_NODE_TYPE: // This is correct - singleNodeValue() will take care of ordering.
         if (!m_value.isNodeSet())
-            return Exception { TypeError };
+            return Exception { XPathException::TYPE_ERR };
         m_resultType = type;
         break;
     case ORDERED_NODE_ITERATOR_TYPE:
         if (!m_value.isNodeSet())
-            return Exception { TypeError };
+            return Exception { XPathException::TYPE_ERR };
         m_nodeSet.sort();
         m_resultType = type;
         break;
     case ORDERED_NODE_SNAPSHOT_TYPE:
         if (!m_value.isNodeSet())
-            return Exception { TypeError };
+            return Exception { XPathException::TYPE_ERR };
         m_value.toNodeSet().sort();
         m_resultType = type;
         break;
@@ -112,7 +113,7 @@
 ExceptionOr<double> XPathResult::numberValue() const
 {
     if (resultType() != NUMBER_TYPE)
-        return Exception { TypeError };
+        return Exception { XPathException::TYPE_ERR };
     return m_value.toNumber();
 }
 
@@ -119,7 +120,7 @@
 ExceptionOr<String> XPathResult::stringValue() const
 {
     if (resultType() != STRING_TYPE)
-        return Exception { TypeError };
+        return Exception { XPathException::TYPE_ERR };
     return m_value.toString();
 }
 
@@ -126,7 +127,7 @@
 ExceptionOr<bool> XPathResult::booleanValue() const
 {
     if (resultType() != BOOLEAN_TYPE)
-        return Exception { TypeError };
+        return Exception { XPathException::TYPE_ERR };
     return m_value.toBoolean();
 }
 
@@ -133,7 +134,7 @@
 ExceptionOr<Node*> XPathResult::singleNodeValue() const
 {
     if (resultType() != ANY_UNORDERED_NODE_TYPE && resultType() != FIRST_ORDERED_NODE_TYPE)
-        return Exception { TypeError };
+        return Exception { XPathException::TYPE_ERR };
 
     auto& nodes = m_value.toNodeSet();
     if (resultType() == FIRST_ORDERED_NODE_TYPE)
@@ -154,7 +155,7 @@
 ExceptionOr<unsigned> XPathResult::snapshotLength() const
 {
     if (resultType() != UNORDERED_NODE_SNAPSHOT_TYPE && resultType() != ORDERED_NODE_SNAPSHOT_TYPE)
-        return Exception { TypeError };
+        return Exception { XPathException::TYPE_ERR };
 
     return m_value.toNodeSet().size();
 }
@@ -162,7 +163,7 @@
 ExceptionOr<Node*> XPathResult::iterateNext()
 {
     if (resultType() != UNORDERED_NODE_ITERATOR_TYPE && resultType() != ORDERED_NODE_ITERATOR_TYPE)
-        return Exception { TypeError };
+        return Exception { XPathException::TYPE_ERR };
 
     if (invalidIteratorState())
         return Exception { INVALID_STATE_ERR };
@@ -176,7 +177,7 @@
 ExceptionOr<Node*> XPathResult::snapshotItem(unsigned index)
 {
     if (resultType() != UNORDERED_NODE_SNAPSHOT_TYPE && resultType() != ORDERED_NODE_SNAPSHOT_TYPE)
-        return Exception { TypeError };
+        return Exception { XPathException::TYPE_ERR };
 
     auto& nodes = m_value.toNodeSet();
     if (index >= nodes.size())

Modified: trunk/Source/WebKit/ChangeLog (219706 => 219707)


--- trunk/Source/WebKit/ChangeLog	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/Source/WebKit/ChangeLog	2017-07-20 22:45:23 UTC (rev 219707)
@@ -1,5 +1,17 @@
 2017-07-20  Chris Dumez  <[email protected]>
 
+        Unreviewed, rolling out r219706.
+
+        Broke iOS build
+
+        Reverted changeset:
+
+        "Drop legacy XPathException type"
+        https://bugs.webkit.org/show_bug.cgi?id=174679
+        http://trac.webkit.org/changeset/219706
+
+2017-07-20  Chris Dumez  <[email protected]>
+
         Drop legacy XPathException type
         https://bugs.webkit.org/show_bug.cgi?id=174679
 

Modified: trunk/Source/WebKit/UIProcess/Automation/atoms/FindNodes.js (219706 => 219707)


--- trunk/Source/WebKit/UIProcess/Automation/atoms/FindNodes.js	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/Source/WebKit/UIProcess/Automation/atoms/FindNodes.js	2017-07-20 22:45:23 UTC (rev 219707)
@@ -100,7 +100,7 @@
                 return arrayResult;
             }
         } catch (error) {
-            // §12. Element Retrieval. Step 6: If a DOMException, SyntaxError, or other error occurs during
+            // §12. Element Retrieval. Step 6: If a DOMException, SyntaxError, XPathException, or other error occurs during
             // the execution of the element location strategy, return error invalid selector.
             // https://www.w3.org/TR/webdriver/#dfn-find
             throw { name: "InvalidSelector", message: error.message };

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (219706 => 219707)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2017-07-20 22:45:23 UTC (rev 219707)
@@ -1,5 +1,17 @@
 2017-07-20  Chris Dumez  <[email protected]>
 
+        Unreviewed, rolling out r219706.
+
+        Broke iOS build
+
+        Reverted changeset:
+
+        "Drop legacy XPathException type"
+        https://bugs.webkit.org/show_bug.cgi?id=174679
+        http://trac.webkit.org/changeset/219706
+
+2017-07-20  Chris Dumez  <[email protected]>
+
         Drop legacy XPathException type
         https://bugs.webkit.org/show_bug.cgi?id=174679
 

Modified: trunk/Source/WebKitLegacy/mac/DOM/ExceptionHandlers.mm (219706 => 219707)


--- trunk/Source/WebKitLegacy/mac/DOM/ExceptionHandlers.mm	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/Source/WebKitLegacy/mac/DOM/ExceptionHandlers.mm	2017-07-20 22:45:23 UTC (rev 219707)
@@ -28,6 +28,7 @@
 #import "DOMEventException.h"
 #import "DOMException.h"
 #import "DOMRangeException.h"
+#import "DOMXPathException.h"
 #import <WebCore/ExceptionCode.h>
 #import <WebCore/ExceptionCodeDescription.h>
 
@@ -34,6 +35,7 @@
 NSString * const DOMException = @"DOMException";
 NSString * const DOMRangeException = @"DOMRangeException";
 NSString * const DOMEventException = @"DOMEventException";
+NSString * const DOMXPathException = @"DOMXPathException";
 
 static NO_RETURN void raiseDOMErrorException(WebCore::ExceptionCode ec)
 {
@@ -47,6 +49,8 @@
         exceptionName = DOMRangeException;
     else if (strcmp(description.typeName, "DOM Events") == 0)
         exceptionName = DOMEventException;
+    else if (strcmp(description.typeName, "DOM XPath") == 0)
+        exceptionName = DOMXPathException;
     else
         exceptionName = DOMException;
 

Modified: trunk/Source/WebKitLegacy/mac/WebKit.exp (219706 => 219707)


--- trunk/Source/WebKitLegacy/mac/WebKit.exp	2017-07-20 22:03:45 UTC (rev 219706)
+++ trunk/Source/WebKitLegacy/mac/WebKit.exp	2017-07-20 22:45:23 UTC (rev 219707)
@@ -153,6 +153,7 @@
 _DOMException
 _DOMRangeException
 _DOMEventException
+_DOMXPathException
 _WebActionButtonKey
 _WebActionElementKey
 _WebActionFormKey
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to