Title: [219708] trunk
Revision
219708
Author
[email protected]
Date
2017-07-20 16:02:15 -0700 (Thu, 20 Jul 2017)

Log Message

Drop legacy XPathException type
https://bugs.webkit.org/show_bug.cgi?id=174679

Reviewed by Sam Weinig.

Source/WebCore:

Drop legacy XPathException type and use DOMException instead. Both Firefox and Chrome
no longer expose XPathException.

Test: fast/dom/DOMException/XPathException-obsolete.html

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMExceptionHandling.cpp:
(WebCore::createDOMException):
* bindings/js/JSExceptionBase.cpp:
(WebCore::toExceptionBase):
* dom/DOMExceptions.in:
* xml/XPathException.cpp: Removed.
* xml/XPathException.h: Removed.
* xml/XPathException.idl: Removed.
* xml/XPathExpression.cpp:
(WebCore::XPathExpression::evaluate):
* xml/XPathParser.cpp:
(WebCore::XPath::Parser::parseStatement):
* xml/XPathResult.cpp:
(WebCore::XPathResult::convertTo):
(WebCore::XPathResult::numberValue):
(WebCore::XPathResult::stringValue):
(WebCore::XPathResult::booleanValue):
(WebCore::XPathResult::singleNodeValue):
(WebCore::XPathResult::snapshotLength):
(WebCore::XPathResult::iterateNext):
(WebCore::XPathResult::snapshotItem):

Source/WebKit:

Drop legacy XPathException type and use DOMException instead. Both Firefox and Chrome
no longer expose XPathException.

* UIProcess/Automation/atoms/FindNodes.js:
(tryToFindNode):

Source/WebKitLegacy/mac:

Drop legacy XPathException type and use DOMException instead. Both Firefox and Chrome
no longer expose XPathException.

* DOM/ExceptionHandlers.mm:
(raiseDOMErrorException):

LayoutTests:

Update existing tests to reflect behavior change.

* dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.js:
(XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR):
* dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.js:
(XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR):
* dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.js:
(XPathEvaluator_evaluate_TYPE_ERR):
* dom/svg/level3/xpath/XPathResult_TYPE_ERR.js:
(XPathResult_TYPE_ERR):
* fast/dom/DOMException/XPathException-expected.txt: Removed.
* fast/dom/DOMException/XPathException.html: Removed.
* fast/dom/DOMException/resources/XPathException.js: Removed.
* fast/dom/Window/resources/window-properties.js:
* fast/dom/Window/window-lookup-precedence-expected.txt:
* fast/xpath/4XPath/Core/test_parser-expected.txt:
* fast/xpath/invalid-functions-expected.txt:
* fast/xpath/py-dom-xpath/expressions-expected.txt:
* platform/gtk/fast/dom/Window/window-lookup-precedence-expected.txt:
* platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt:

Modified Paths

Added Paths

Removed Paths

Diff

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


--- trunk/LayoutTests/ChangeLog	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/LayoutTests/ChangeLog	2017-07-20 23:02:15 UTC (rev 219708)
@@ -1,5 +1,33 @@
 2017-07-20  Chris Dumez  <[email protected]>
 
+        Drop legacy XPathException type
+        https://bugs.webkit.org/show_bug.cgi?id=174679
+
+        Reviewed by Sam Weinig.
+
+        Update existing tests to reflect behavior change.
+
+        * dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.js:
+        (XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR):
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.js:
+        (XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR):
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.js:
+        (XPathEvaluator_evaluate_TYPE_ERR):
+        * dom/svg/level3/xpath/XPathResult_TYPE_ERR.js:
+        (XPathResult_TYPE_ERR):
+        * fast/dom/DOMException/XPathException-expected.txt: Removed.
+        * fast/dom/DOMException/XPathException.html: Removed.
+        * fast/dom/DOMException/resources/XPathException.js: Removed.
+        * fast/dom/Window/resources/window-properties.js:
+        * fast/dom/Window/window-lookup-precedence-expected.txt:
+        * fast/xpath/4XPath/Core/test_parser-expected.txt:
+        * fast/xpath/invalid-functions-expected.txt:
+        * fast/xpath/py-dom-xpath/expressions-expected.txt:
+        * platform/gtk/fast/dom/Window/window-lookup-precedence-expected.txt:
+        * platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt:
+
+2017-07-20  Chris Dumez  <[email protected]>
+
         Unreviewed, rolling out r219706.
 
         Broke iOS build

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


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

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


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

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


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

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


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

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


--- trunk/LayoutTests/fast/dom/DOMException/XPathException-expected.txt	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/LayoutTests/fast/dom/DOMException/XPathException-expected.txt	2017-07-20 23:02:15 UTC (rev 219708)
@@ -1,17 +0,0 @@
-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
-

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


--- trunk/LayoutTests/fast/dom/DOMException/XPathException-obsolete-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/DOMException/XPathException-obsolete-expected.txt	2017-07-20 23:02:15 UTC (rev 219708)
@@ -0,0 +1,10 @@
+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
+

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


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

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


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

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


--- trunk/LayoutTests/fast/dom/Window/resources/window-properties.js	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/LayoutTests/fast/dom/Window/resources/window-properties.js	2017-07-20 23:02:15 UTC (rev 219708)
@@ -148,7 +148,6 @@
     ["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 (219707 => 219708)


--- trunk/LayoutTests/fast/dom/Window/window-lookup-precedence-expected.txt	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/LayoutTests/fast/dom/Window/window-lookup-precedence-expected.txt	2017-07-20 23:02:15 UTC (rev 219708)
@@ -304,8 +304,6 @@
 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 (219707 => 219708)


--- trunk/LayoutTests/fast/xpath/4XPath/Core/test_parser-expected.txt	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/LayoutTests/fast/xpath/4XPath/Core/test_parser-expected.txt	2017-07-20 23:02:15 UTC (rev 219708)
@@ -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 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 DOM.evaluate("\\", ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null) threw exception SyntaxError: The string did not match the expected pattern..
 PASS successfullyParsed is true
 
 TEST COMPLETE

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


--- trunk/LayoutTests/fast/xpath/invalid-functions-expected.txt	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/LayoutTests/fast/xpath/invalid-functions-expected.txt	2017-07-20 23:02:15 UTC (rev 219708)
@@ -1,12 +1,12 @@
-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 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 successfullyParsed is true
 
 TEST COMPLETE

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


--- trunk/LayoutTests/fast/xpath/py-dom-xpath/expressions-expected.txt	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/LayoutTests/fast/xpath/py-dom-xpath/expressions-expected.txt	2017-07-20 23:02:15 UTC (rev 219708)
@@ -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 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 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 string-length(100)
-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 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 //item[@id mod 2 = 0] | //item[@id mod 3 = 0]
-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 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 (1)
 PASS ((1 + 1))
 PASS 1 or 1

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


--- trunk/LayoutTests/platform/gtk/fast/dom/Window/window-lookup-precedence-expected.txt	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/LayoutTests/platform/gtk/fast/dom/Window/window-lookup-precedence-expected.txt	2017-07-20 23:02:15 UTC (rev 219708)
@@ -302,8 +302,6 @@
 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 (219707 => 219708)


--- trunk/LayoutTests/platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/LayoutTests/platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt	2017-07-20 23:02:15 UTC (rev 219708)
@@ -298,8 +298,6 @@
 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 (219707 => 219708)


--- trunk/Source/WebCore/CMakeLists.txt	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/Source/WebCore/CMakeLists.txt	2017-07-20 23:02:15 UTC (rev 219708)
@@ -700,7 +700,6 @@
     xml/XMLHttpRequestUpload.idl
     xml/XMLSerializer.idl
     xml/XPathEvaluator.idl
-    xml/XPathException.idl
     xml/XPathExpression.idl
     xml/XPathNSResolver.idl
     xml/XPathResult.idl
@@ -2982,7 +2981,6 @@
     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 (219707 => 219708)


--- trunk/Source/WebCore/ChangeLog	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/Source/WebCore/ChangeLog	2017-07-20 23:02:15 UTC (rev 219708)
@@ -1,5 +1,43 @@
 2017-07-20  Chris Dumez  <[email protected]>
 
+        Drop legacy XPathException type
+        https://bugs.webkit.org/show_bug.cgi?id=174679
+
+        Reviewed by Sam Weinig.
+
+        Drop legacy XPathException type and use DOMException instead. Both Firefox and Chrome
+        no longer expose XPathException.
+
+        Test: fast/dom/DOMException/XPathException-obsolete.html
+
+        * CMakeLists.txt:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSDOMExceptionHandling.cpp:
+        (WebCore::createDOMException):
+        * bindings/js/JSExceptionBase.cpp:
+        (WebCore::toExceptionBase):
+        * dom/DOMExceptions.in:
+        * xml/XPathException.cpp: Removed.
+        * xml/XPathException.h: Removed.
+        * xml/XPathException.idl: Removed.
+        * xml/XPathExpression.cpp:
+        (WebCore::XPathExpression::evaluate):
+        * xml/XPathParser.cpp:
+        (WebCore::XPath::Parser::parseStatement):
+        * xml/XPathResult.cpp:
+        (WebCore::XPathResult::convertTo):
+        (WebCore::XPathResult::numberValue):
+        (WebCore::XPathResult::stringValue):
+        (WebCore::XPathResult::booleanValue):
+        (WebCore::XPathResult::singleNodeValue):
+        (WebCore::XPathResult::snapshotLength):
+        (WebCore::XPathResult::iterateNext):
+        (WebCore::XPathResult::snapshotItem):
+
+2017-07-20  Chris Dumez  <[email protected]>
+
         Unreviewed, rolling out r219706.
 
         Broke iOS build

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


--- trunk/Source/WebCore/DerivedSources.cpp	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/Source/WebCore/DerivedSources.cpp	2017-07-20 23:02:15 UTC (rev 219708)
@@ -647,7 +647,6 @@
 #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 (219707 => 219708)


--- trunk/Source/WebCore/DerivedSources.make	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/Source/WebCore/DerivedSources.make	2017-07-20 23:02:15 UTC (rev 219708)
@@ -830,7 +830,6 @@
     $(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 (219707 => 219708)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-07-20 23:02:15 UTC (rev 219708)
@@ -4088,7 +4088,6 @@
 		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 */; };
@@ -5694,9 +5693,6 @@
 		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 */; };
@@ -12262,7 +12258,6 @@
 		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>"; };
@@ -14158,10 +14153,6 @@
 		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>"; };
@@ -21910,8 +21901,6 @@
 			children = (
 				1A762C6B0A074F2600989F5B /* JSXPathEvaluator.cpp */,
 				1A762C6C0A074F2600989F5B /* JSXPathEvaluator.h */,
-				BC60DB470D2A3D1E00B9918F /* JSXPathException.cpp */,
-				BC60DB480D2A3D1E00B9918F /* JSXPathException.h */,
 				1A762C6D0A074F2600989F5B /* JSXPathExpression.cpp */,
 				1A762C6E0A074F2600989F5B /* JSXPathExpression.h */,
 				1A762C6F0A074F2600989F5B /* JSXPathNSResolver.cpp */,
@@ -24656,9 +24645,6 @@
 				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 */,
@@ -28469,7 +28455,6 @@
 				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 */,
@@ -30203,7 +30188,6 @@
 				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 */,
@@ -32501,7 +32485,6 @@
 				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 */,
@@ -33890,7 +33873,6 @@
 				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 (219707 => 219708)


--- trunk/Source/WebCore/bindings/js/JSDOMExceptionHandling.cpp	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/Source/WebCore/bindings/js/JSDOMExceptionHandling.cpp	2017-07-20 23:02:15 UTC (rev 219708)
@@ -177,9 +177,6 @@
     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 (219707 => 219708)


--- trunk/Source/WebCore/bindings/js/JSExceptionBase.cpp	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/Source/WebCore/bindings/js/JSExceptionBase.cpp	2017-07-20 23:02:15 UTC (rev 219708)
@@ -28,7 +28,6 @@
 
 #include "JSDOMCoreException.h"
 #include "JSSVGException.h"
-#include "JSXPathException.h"
 
 namespace WebCore {
 
@@ -38,8 +37,6 @@
         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 (219707 => 219708)


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

Deleted: trunk/Source/WebCore/xml/XPathException.cpp (219707 => 219708)


--- trunk/Source/WebCore/xml/XPathException.cpp	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/Source/WebCore/xml/XPathException.cpp	2017-07-20 23:02:15 UTC (rev 219708)
@@ -1,62 +0,0 @@
-/*
- * 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

Deleted: trunk/Source/WebCore/xml/XPathException.h (219707 => 219708)


--- trunk/Source/WebCore/xml/XPathException.h	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/Source/WebCore/xml/XPathException.h	2017-07-20 23:02:15 UTC (rev 219708)
@@ -1,59 +0,0 @@
-/*
- * 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

Deleted: trunk/Source/WebCore/xml/XPathException.idl (219707 => 219708)


--- trunk/Source/WebCore/xml/XPathException.idl	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/Source/WebCore/xml/XPathException.idl	2017-07-20 23:02:15 UTC (rev 219708)
@@ -1,43 +0,0 @@
-/*
- * 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 (219707 => 219708)


--- trunk/Source/WebCore/xml/XPathExpression.cpp	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/Source/WebCore/xml/XPathExpression.cpp	2017-07-20 23:02:15 UTC (rev 219708)
@@ -29,7 +29,6 @@
 
 #include "Document.h"
 #include "ExceptionCode.h"
-#include "XPathException.h"
 #include "XPathNSResolver.h"
 #include "XPathParser.h"
 #include "XPathResult.h"
@@ -71,11 +70,8 @@
     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) {
-        // 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 (evaluationContext.hadTypeConversionError)
+        return Exception { SYNTAX_ERR };
 
     if (type != XPathResult::ANY_TYPE) {
         auto convertToResult = result->convertTo(type);

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


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

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


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

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


--- trunk/Source/WebKit/ChangeLog	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/Source/WebKit/ChangeLog	2017-07-20 23:02:15 UTC (rev 219708)
@@ -1,5 +1,18 @@
 2017-07-20  Chris Dumez  <[email protected]>
 
+        Drop legacy XPathException type
+        https://bugs.webkit.org/show_bug.cgi?id=174679
+
+        Reviewed by Sam Weinig.
+
+        Drop legacy XPathException type and use DOMException instead. Both Firefox and Chrome
+        no longer expose XPathException.
+
+        * UIProcess/Automation/atoms/FindNodes.js:
+        (tryToFindNode):
+
+2017-07-20  Chris Dumez  <[email protected]>
+
         Unreviewed, rolling out r219706.
 
         Broke iOS build

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


--- trunk/Source/WebKit/UIProcess/Automation/atoms/FindNodes.js	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/Source/WebKit/UIProcess/Automation/atoms/FindNodes.js	2017-07-20 23:02:15 UTC (rev 219708)
@@ -100,7 +100,7 @@
                 return arrayResult;
             }
         } catch (error) {
-            // §12. Element Retrieval. Step 6: If a DOMException, SyntaxError, XPathException, or other error occurs during
+            // §12. Element Retrieval. Step 6: If a DOMException, SyntaxError, 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 (219707 => 219708)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2017-07-20 23:02:15 UTC (rev 219708)
@@ -1,5 +1,18 @@
 2017-07-20  Chris Dumez  <[email protected]>
 
+        Drop legacy XPathException type
+        https://bugs.webkit.org/show_bug.cgi?id=174679
+
+        Reviewed by Sam Weinig.
+
+        Drop legacy XPathException type and use DOMException instead. Both Firefox and Chrome
+        no longer expose XPathException.
+
+        * DOM/ExceptionHandlers.mm:
+        (raiseDOMErrorException):
+
+2017-07-20  Chris Dumez  <[email protected]>
+
         Unreviewed, rolling out r219706.
 
         Broke iOS build

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


--- trunk/Source/WebKitLegacy/mac/DOM/ExceptionHandlers.mm	2017-07-20 22:45:23 UTC (rev 219707)
+++ trunk/Source/WebKitLegacy/mac/DOM/ExceptionHandlers.mm	2017-07-20 23:02:15 UTC (rev 219708)
@@ -49,8 +49,6 @@
         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;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to