Bug 120908

Summary: Range::ownerDocument should return Document&
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, commit-queue, darin, kling, koivisto
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Cleanup kling: review+

Description Ryosuke Niwa 2013-09-06 16:22:59 PDT
I'm late to the party but Range::ownerDocument() is always non-null.
Comment 1 Ryosuke Niwa 2013-09-06 16:25:54 PDT
Created attachment 210814 [details]
Cleanup
Comment 2 WebKit Commit Bot 2013-09-06 16:27:22 PDT
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 3 Andreas Kling 2013-09-06 16:28:28 PDT
Comment on attachment 210814 [details]
Cleanup

Awesome! r=me, have fun with EWS :)
Comment 4 Ryosuke Niwa 2013-09-06 19:07:18 PDT
Committed as https://trac.webkit.org/r155228.
Comment 5 Darin Adler 2013-09-08 19:02:26 PDT
Do our DOM bindings now support turning references into JavaScript objects?
Comment 6 Andreas Kling 2013-09-08 19:06:42 PDT
(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.
Comment 7 Darin Adler 2013-09-08 19:37:25 PDT
Seems like we should just name it document, then. What additional clarity is added by calling it “owner document”.