Range::ownerDocument should return Document&
https://bugs.webkit.org/show_bug.cgi?id=120908

Reviewed by Andreas Kling.

Source/WebCore: 

Return Document& in Range::ownerDocument(). Also make setDocument take Document& so that this invariant is self-evident.

* bindings/objc/DOM.mm:
(-[DOMRange boundingBox]):
(-[DOMRange renderedImageForcingBlackText:]):
(-[DOMRange textRects]):
* dom/Range.cpp:
(WebCore::Range::setDocument):
(WebCore::Range::setStart):
(WebCore::Range::setEnd):
(WebCore::Range::selectNode):
(WebCore::Range::selectNodeContents):
* dom/Range.h:
(WebCore::Range::ownerDocument):
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::handleAlternativeTextUIResult):
* editing/Editor.cpp:
(WebCore::Editor::avoidIntersectionWithDeleteButtonController):
(WebCore::isFrameInRange):
(WebCore::Editor::countMatchesForText):
* editing/EditorCommand.cpp:
(WebCore::unionDOMRanges):
* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingHelper::unifiedTextCheckerEnabled):
* editing/TextIterator.cpp:
(WebCore::plainText):
(WebCore::findPlainText):
* editing/htmlediting.cpp:
(WebCore::extendRangeToWrappingNodes):
* editing/markup.cpp:
(WebCore::createMarkup):
(WebCore::createFragmentFromText):
* page/DragController.cpp:
(WebCore::documentFragmentFromDragData):
(WebCore::DragController::concludeEditDrag):
* page/Page.cpp:
(WebCore::Page::rangeOfString):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::absoluteBoundingBoxRectForRange):
* testing/Internals.cpp:
(WebCore::Internals::addTextMatchMarker):

Source/WebKit/blackberry: 

* WebKitSupport/InPageSearchManager.cpp:
(BlackBerry::WebKit::InPageSearchManager::findNextString):
(BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
(BlackBerry::WebKit::InPageSearchManager::clearTextMatches):
(BlackBerry::WebKit::InPageSearchManager::setActiveMatchAndMarker):
(BlackBerry::WebKit::InPageSearchManager::frameUnloaded):
(BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):

Source/WebKit/mac: 

* WebView/WebPDFView.mm:
(isFrameInRange):

Source/WebKit2: 

* WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
(-[WKDOMRange textRects]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't include Document.h from JSDOMBinding.h
<https://webkit.org/b/120909>

Reviewed by Anders Carlsson.

Move DOMConstructorWithDocument out of JSDOMBinding.h to its own header.
This was the only part of JSDOMBinding.h that needed Document's definition.

This reduces the include dependency graph of many bindings files.

* WebCore.xcodeproj/project.pbxproj:
* bindings/js/DOMConstructorWithDocument.h:
* bindings/js/JSDOMBinding.cpp:
* bindings/js/JSDOMBinding.h:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/CodeGeneratorGObject.pm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rebaseline bindings tests after Swedish breakage.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155230 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused RefPtr(PlacementNewAdopt) constructor.
<https://webkit.org/b/120914>

Reviewed by Anders Carlsson.

* wtf/RefPtr.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove old workaround for Nokia's Harmattan GCC on Qt/ARM.
<https://webkit.org/b/37253>

Reviewed by Anders Carlsson.

Apparently this was a workaround for GCC getting stuck in an infinite loop
when building for ARM in a Nokia SDK over 2 years ago.

I think it's safe to remove this now, but if I'm wrong, and you're reading
this ChangeLog wondering why I did this to you, feel free to put it back in.

* wtf/PassRefPtr.h:
(WTF::refIfNotNull):
(WTF::derefIfNotNull):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make Obj-C bindings generator less #include-happy.
<https://webkit.org/b/120913>

Reviewed by Anders Carlsson.

Knock out an old FIXME in CodeGeneratorObjC.pm and avoid including unrelated
interface declarations from implementation files where they are not needed.

* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):

    Only include DOMFooInternal.h relevant to the current interface.

* bindings/scripts/test/ObjC/*

    Rebaseline Obj-C bindings tests now that they include fewer things.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155233 268f45cc-cd09-0410-ab3c-d52691b4dbfc