Bug 120908 - Range::ownerDocument should return Document&
Summary: Range::ownerDocument should return Document&
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-06 16:22 PDT by Ryosuke Niwa
Modified: 2013-09-09 14:37 PDT (History)
5 users (show)

See Also:


Attachments
Cleanup (27.77 KB, patch)
2013-09-06 16:25 PDT, Ryosuke Niwa
kling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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”.