I'm late to the party but Range::ownerDocument() is always non-null.
Created attachment 210814 [details] Cleanup
Attachment 210814 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/bindings/objc/DOM.mm', u'Source/WebCore/dom/Range.cpp', u'Source/WebCore/dom/Range.h', u'Source/WebCore/editing/AlternativeTextController.cpp', u'Source/WebCore/editing/Editor.cpp', u'Source/WebCore/editing/EditorCommand.cpp', u'Source/WebCore/editing/TextCheckingHelper.cpp', u'Source/WebCore/editing/TextIterator.cpp', u'Source/WebCore/editing/htmlediting.cpp', u'Source/WebCore/editing/markup.cpp', u'Source/WebCore/page/DragController.cpp', u'Source/WebCore/page/Page.cpp', u'Source/WebCore/rendering/RenderObject.cpp', u'Source/WebCore/testing/Internals.cpp', u'Source/WebKit/blackberry/ChangeLog', u'Source/WebKit/blackberry/WebKitSupport/InPageSearchManager.cpp', u'Source/WebKit/mac/ChangeLog', u'Source/WebKit/mac/WebView/WebPDFView.mm', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMRange.mm']" exit_code: 1 Source/WebCore/page/DragController.cpp:126: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Total errors found: 1 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 210814 [details] Cleanup Awesome! r=me, have fun with EWS :)
Committed as https://trac.webkit.org/r155228.
Do our DOM bindings now support turning references into JavaScript objects?
(In reply to comment #5) > Do our DOM bindings now support turning references into JavaScript objects? Not yet. Range::ownerDocument is not exposed to the web.
Seems like we should just name it document, then. What additional clarity is added by calling it “owner document”.