<https://webkit.org/b/119941> Make Page::dragController return a reference

Reviewed by Andreas Kling.

Source/WebCore:

* page/Page.h:
(WebCore::Page::dragController): Return a reference instead of a pointer.

* page/DragController.cpp:
(WebCore::DragController::concludeEditDrag):
* page/EventHandler.cpp:
(WebCore::EventHandler::eventMayStartDrag):
(WebCore::EventHandler::updateDragSourceActionsAllowed):
(WebCore::EventHandler::handleDrag):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::passSubframeEventToSubframe):
Updated call sites.

Source/WebKit/gtk:

* webkit/webkitwebview.cpp:
(dragExitedCallback):
(webkit_web_view_drag_motion):
(webkit_web_view_drag_data_received):
(webkit_web_view_drag_drop):
Updated call sites.

Source/WebKit/mac:

* WebView/WebFrameView.mm:
(-[WebFrameView _setDocumentView:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView draggingSourceOperationMaskForLocal:]):
(-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
* WebView/WebView.mm:
(-[WebView _setInitiatedDrag:]):
(-[WebView draggingEntered:]):
(-[WebView draggingUpdated:]):
(-[WebView draggingExited:]):
(-[WebView performDragOperation:]):
(-[WebView moveDragCaretToPoint:]):
(-[WebView removeDragCaret]):
Updated call sites.

Source/WebKit/qt:

* WebCoreSupport/DragClientQt.cpp:
(WebCore::DragClientQt::startDrag):
* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::dragEntered):
(QWebPageAdapter::dragLeaveEvent):
(QWebPageAdapter::dragUpdated):
(QWebPageAdapter::performDrag):
Updated call sites.

Source/WebKit/win:

* WebCoreSupport/WebDragClient.cpp:
(WebDragClient::startDrag):
* WebView.cpp:
(WebView::keyStateToDragOperation):
(WebView::DragEnter):
(WebView::DragOver):
(WebView::DragLeave):
(WebView::Drop):
Updated call sites.

Source/WebKit2:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction):
(WebKit::WebPage::dragEnded):
Updated call sites.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<https://webkit.org/b/119942> Remove unnecessary uses of Element::ownerDocument

Reviewed by Andreas Kling.

The Element::document is a simpler faster alternative to Element::ownerDocument.
The only behavior difference between the two is that ownerDocument returns 0 when
called on a Document.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::supportsFocus): Call document instead of ownerDocument.
(WebCore::HTMLMediaElement::mediaPlayerOwningDocument): Removed null checking of
document and call to ownerDocument, since ownerDocument will never return non-null
if document returns null.
(WebCore::HTMLMediaElement::mediaPlayerSawUnsupportedTracks): Call document instead
of ownerDocument.

* inspector/DOMEditor.cpp:
(WebCore::DOMEditor::SetOuterHTMLAction::perform): Call document instead of ownerDocument.

* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getMatchedStylesForNode): Call document instead of ownerDocument.
(WebCore::InspectorCSSAgent::forcePseudoState): Call document instead of ownerDocument.
(WebCore::InspectorCSSAgent::resetPseudoStates): Call document instead of ownerDocument.

* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setOuterHTML): Call document instead of expression that
does the same thing in a roundabout way.
(WebCore::InspectorDOMAgent::focusNode): Call document instead of ownerDocument.
(WebCore::InspectorDOMAgent::resolveNode): Call document instead of expression that
does the same thing in a roundabout way.

* page/DragController.cpp:
(WebCore::DragController::concludeEditDrag): Call document instead of ownerDocument.

* svg/SVGElementInstance.cpp:
(WebCore::SVGElementInstance::ownerDocument): Call document instead of ownerDocument.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<https://webkit.org/b/119940> Rename Clipboard::m_dragLoc to m_dragLocation

Reviewed by Andreas Kling.

* dom/Clipboard.h: Removed unused dragLocation member function.
Renamed m_dragLoc to m_dragLocation.

* dom/Clipboard.cpp:
(WebCore::Clipboard::setDragImage):
* platform/gtk/ClipboardGtk.cpp:
(WebCore::Clipboard::createDragImage):
* platform/mac/ClipboardMac.mm:
(WebCore::Clipboard::createDragImage):
* platform/qt/ClipboardQt.cpp:
(WebCore::Clipboard::createDragImage):
* platform/win/ClipboardWin.cpp:
(WebCore::Clipboard::createDragImage):
Updated for new name.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<https://webkit.org/b/119939> Remove some unused clipboard and pasteboard code

Reviewed by Andreas Kling.

* PlatformWinCE.cmake: Removed EditorWin.cpp.
* WebCore.vcxproj/WebCore.vcxproj: Removed EditorWin.cpp.
* WebCore.vcxproj/WebCore.vcxproj.filters: Removed EditorWin.cpp.
* WebCore.xcodeproj/project.pbxproj: Removed ClipboardIOS.h and
ClipboardIOS.mm, and also let Xcode edit/reorder this file.

* editing/Editor.cpp:
(WebCore::Editor::dispatchCPPEvent): Removed some LEGACY_STYLE_ABSTRACT_CLIPBOARD
class code. Will remove the rest later.

* editing/Editor.h: Removed declaration of newGeneralClipboard.

* platform/Pasteboard.h: Removed declaration of writeClipboard. Also updated a
comment to make it clearer.

* platform/blackberry/PasteboardBlackBerry.cpp: Removed Pasteboard::writeClipboard.
* platform/efl/PasteboardEfl.cpp: Ditto.
* platform/ios/PasteboardIOS.mm: Ditto.
* platform/win/PasteboardWin.cpp: Ditto.

* platform/ios/ClipboardIOS.h: Removed. Was an empty file.
* platform/ios/ClipboardIOS.mm: Removed. Was an empty file.
* platform/win/EditorWin.cpp: Removed. Had only newGeneralClipboard in the file,
a function that is never called.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<https://webkit.org/b/119943> Clean up the Document class a bit

Reviewed by Antti Koivisto.

* dom/Document.cpp:
(WebCore::Document::~Document): Fixed typo in comment.
(WebCore::Document::suggestedMIMEType): Use ASCIILiteral for literals.
Also name local variable just loader rather than documentLoader.
(WebCore::Document::updateTitle): Call loader rather than going indirectly
through frame to get to the loader.
(WebCore::Document::setTitleElement): Fixed formatting (add braces).
(WebCore::Document::removeTitle): Iterate elements instead of nodes.
(WebCore::Document::isPageBoxVisible): Use ensureStyleResolver to call
styleForPage to avoid the need for a simple forwarding function. Also
eliminated local variable to increase clarity.
(WebCore::Document::pageSizeAndMarginsInPixels): Use ensureStyleResolver
to call styleForPage to avoid the need for a simple forwarding function.
(WebCore::Document::setIsViewSource): Renamed a local variable.

* dom/Document.h: Removed unneeded childNeedsAndNotInStyleRecalc and
styleForPage functions.

* loader/FrameLoader.cpp: Removed unnneeded setTitle function.
* loader/FrameLoader.h: Ditto.

* page/PrintContext.cpp:
(WebCore::PrintContext::pageProperty): Use ensureStyleResolver to call
styleForPage to avoid the need for a simple forwarding function.

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