Index: core/xml/XSLTProcessor.idl |
diff --git a/core/xml/XSLTProcessor.idl b/core/xml/XSLTProcessor.idl |
index f8d3b1d9f5027b759cd3734e5b7d08ab31f7fea6..221628f55cf27fc645795d4eaab6a42e30697869 100644 |
--- a/core/xml/XSLTProcessor.idl |
+++ b/core/xml/XSLTProcessor.idl |
@@ -26,28 +26,32 @@ |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-// Eventually we should implement XSLTException: |
-// http://lxr.mozilla.org/seamonkey/source/content/xsl/public/nsIXSLTException.idl |
-// http://bugs.webkit.org/show_bug.cgi?id=5446 |
+// There is no spec for XSLTProcessor. It was first implemented in Gecko and |
+// their interface definition remains the closest thing to a spec: |
+// https://hg.mozilla.org/mozilla-central/file/012853bd80b7/dom/webidl/XSLTProcessor.webidl |
[ |
- WillBeGarbageCollected, |
+ GarbageCollected, |
Constructor, |
ConstructorCallWith=Document, |
RuntimeEnabled=XSLT, |
- MeasureAs=XSLTProcessor |
+ MeasureAs=XSLTProcessor, |
+ TypeChecking=Interface, |
] interface XSLTProcessor { |
- void importStylesheet([Default=Undefined] optional Node stylesheet); |
- [CustomElementCallbacks] DocumentFragment transformToFragment([Default=Undefined] optional Node source, [Default=Undefined] optional Document docVal); |
- [CustomElementCallbacks] Document transformToDocument([Default=Undefined] optional Node source); |
+ void importStylesheet(Node style); |
+ // TODO(philipj): In Gecko, the transformTo*() methods throw an exception in |
+ // case of error instead of returning null. |
+ [CustomElementCallbacks] DocumentFragment? transformToFragment(Node source, Document output); |
+ [CustomElementCallbacks] Document? transformToDocument(Node source); |
- [Custom] void setParameter(DOMString namespaceURI, DOMString localName, DOMString value); |
- [Custom, TreatReturnedNullStringAs=Undefined] DOMString getParameter(DOMString namespaceURI, DOMString localName); |
- [Custom] void removeParameter(DOMString namespaceURI, DOMString localName); |
+ // TODO(philipj): In Gecko, it's possible to set and get back any parameter |
+ // value, not just DOMString. |
+ void setParameter(DOMString? namespaceURI, DOMString localName, DOMString value); |
+ DOMString? getParameter(DOMString? namespaceURI, DOMString localName); |
+ void removeParameter(DOMString? namespaceURI, DOMString localName); |
void clearParameters(); |
void reset(); |
}; |
- |