1. 13 Jan, 2011 1 commit
    • enrica@apple.com's avatar
      Source/WebCore: WebKit2: Add support for drag and drop · 9d9813d0
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52343
      <rdar://problem/7660558>
                     
      Reviewed by Darin Adler.
      
      This patch contains the changes required to support dropping content
      in WebKit on the Mac. The DragData class has been extended to provide
      additional context from the application (keyboard state, modal windows, etc.)
      as well as information of the drag pasteboard being used.
      The support for WebKit as drag source will be added with a separate patch.
      
      * WebCore.exp.in:
      * page/DragController.cpp:
      (WebCore::DragController::dragIsMove): Added DragData parameter.
      (WebCore::DragController::tryDocumentDrag): Modified call to dragIsMove.
      (WebCore::DragController::concludeEditDrag): Same as above.
      * page/DragController.h: Added parameter to isCopyKeyDown.
      * page/mac/DragControllerMac.mm:
      The following methods have been modified to use the information stored
      in the DragData class.
      (WebCore::DragController::isCopyKeyDown):
      (WebCore::DragController::dragOperation):
      * platform/DragData.h:
      (WebCore::DragData::flags):
      * platform/DragData.cpp: Added default flags parameter to the constructor.
      * platform/mac/DragDataMac.mm:
      (WebCore::DragData::DragData): Added constructor that receives the name of the pasteboard to use.
      (WebCore::DragData::canSmartReplace):
      (WebCore::DragData::containsColor):
      (WebCore::DragData::containsFiles):
      (WebCore::DragData::asFilenames):
      (WebCore::DragData::containsPlainText):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      All the following files have been modified to add the DragData
      parameter to isCopyKeyDown. I plan to improve this in the future
      and make isCopyKeyDown not platform specific.
      * page/android/DragControllerAndroid.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/brew/DragControllerBrew.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/chromium/DragControllerChromium.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/efl/DragControllerEfl.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/gtk/DragControllerGtk.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/haiku/DragControllerHaiku.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/mac/DragControllerMac.mm:
      (WebCore::DragController::isCopyKeyDown):
      (WebCore::DragController::dragOperation):
      * page/qt/DragControllerQt.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/win/DragControllerWin.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/wx/DragControllerWx.cpp:
      (WebCore::DragController::isCopyKeyDown):
      
      WebKit/mac: WebKit2: Add support for drag and drop
      https://bugs.webkit.org/show_bug.cgi?id=52343
      <rdar://problem/7660558>
              
      Reviewed by Darin Adler.
      
      The DragData class has been extended to provide
      additional context from the application (keyboard state, modal windows, etc.)
      as well as information of the drag pasteboard being used.
      These are the changes to align the behavior for WebKit.
      
      * WebView/WebView.mm:
      (-[WebView applicationFlags:]): Added.
      (-[WebView draggingEntered:]): Added parameter to the DragData constructor.
      (-[WebView draggingUpdated:]): Added parameter to the DragData constructor.
      (-[WebView draggingExited:]): Added parameter to the DragData constructor.
      (-[WebView performDragOperation:]): Added parameter to the DragData constructor.
      
      WebKit2: WebKit2: Add support for drag and drop
      https://bugs.webkit.org/show_bug.cgi?id=52343
      <rdar://problem/7660558>
                     
      Reviewed by Darin Adler.
      
      This patch contains the changes required to support dropping content
      in WebKit on the Mac. The DragData class has been extended to provide
      additional context from the application (keyboard state, modal windows, etc.)
      as well as information of the drag pasteboard being used.
      The support for WebKit as drag source will be added with a separate patch.
      
      * Shared/DragControllerAction.h: Added.
      * UIProcess/API/mac/WKView.mm:
      Added implemention of the methods required to add suport for a drop target.
      To maintain asynchronous communication with the WebProcess, we always return
      the previous calculated value for the drag operation.
      (-[WKView _registerDraggedTypes]):
      (-[WKView initWithFrame:contextRef:pageGroupRef:]):
      (-[WKView applicationFlags:]):
      (-[WKView draggingEntered:]):
      (-[WKView draggingUpdated:]):
      (-[WKView draggingExited:]):
      (-[WKView prepareForDragOperation:]):
      (-[WKView performDragOperation:]):
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::WebPageProxy):
      (WebKit::WebPageProxy::performDragControllerAction):
      (WebKit::WebPageProxy::didPerformDragControllerAction):
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::dragOperation):
      (WebKit::WebPageProxy::resetDragOperation):
      * UIProcess/WebPageProxy.messages.in:
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/WebCoreSupport/WebDragClient.cpp:
      (WebKit::WebDragClient::willPerformDragDestinationAction):
      (WebKit::WebDragClient::willPerformDragSourceAction):
      (WebKit::WebDragClient::actionMaskForDrag):
      (WebKit::WebDragClient::dragSourceActionMaskForPoint):
      (WebKit::WebDragClient::startDrag):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::performDragControllerAction):
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9d9813d0
  2. 11 Jan, 2011 1 commit
    • enrica@apple.com's avatar
      Source/WebCore: Paste and drag and drop use different code paths to interact with the pasteboard. · 964ea218
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52093
      The change consists in a refactoring of the code to have only one class that
      deals with the pasteboard on Mac.
      
      Reviewed by Alexey Proskuryakov.
      
      No new tests. A test is already available for this
      (editing/pasteboard/drag-image-to-contenteditable-in-iframe.html) but had incorrect results.
      
      * WebCore.exp.in:
      * loader/EmptyClients.h: Added two Mac only methods to call into WebKit to use functionality
      that is in NSURLExtras.
      (WebCore::EmptyEditorClient::canonicalizeURL):
      (WebCore::EmptyEditorClient::canonicalizeURLString):
      * page/DragController.cpp:
      The following methods have been changed to pass a pointer to the Frame object
      to the DragData class.
      (WebCore::documentFragmentFromDragData):
      (WebCore::DragController::performDrag):
      (WebCore::DragController::dispatchTextInputEventFor):
      (WebCore::DragController::concludeEditDrag):
      * page/EditorClient.h: Added two Mac only methods to call into WebKit to use functionality
      that is in NSURLExtras.
      The following files have been modified to pass the Frame object to the DragData method calls.
      * page/chromium/DragControllerChromium.cpp:
      (WebCore::DragController::dragOperation):
      * page/gtk/DragControllerGtk.cpp:
      (WebCore::DragController::dragOperation):
      * page/mac/DragControllerMac.mm:
      (WebCore::DragController::dragOperation):
      * page/qt/DragControllerQt.cpp:
      (WebCore::DragController::dragOperation):
      * page/win/DragControllerWin.cpp:
      (WebCore::DragController::dragOperation):
      * platform/DragData.h: Removed Mac specific constructor and reference to PasteboardHelper class.
      * platform/Pasteboard.h: Added public constructor to create a Pasteboard object from an NSPasteboard.
      The following files were all modified to match the new parameters of the methods listed.
      * platform/android/DragDataAndroid.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/chromium/DragDataChromium.cpp:
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::asFragment):
      * platform/gtk/DragDataGtk.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/haiku/DragDataHaiku.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/mac/DragDataMac.mm:
      (WebCore::DragData::DragData):
      (WebCore::DragData::asPlainText):
      (WebCore::insertablePasteboardTypes):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/mac/PasteboardMac.mm:
      (WebCore::Pasteboard::getBestURL):
      (WebCore::Pasteboard::asURL):
      * platform/qt/DragDataQt.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/win/DragDataWin.cpp:
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::asFragment):
      * platform/wince/DragDataWinCE.cpp:
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::asFragment):
      * platform/wx/DragDataWx.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      
      WebKit: Paste and drag and drop use different code paths to interact with the pasteboard.
      https://bugs.webkit.org/show_bug.cgi?id=52093
      The change consists in a refactoring of the code to have only one class that
      deals with the pasteboard on Mac.
      
      Reviewed by Alexey Proskuryakov.
      
      * WebKit.xcodeproj/project.pbxproj: Removed WebPasteboardHelper.mm and WebPasteboardHelper.h.
      
      WebKit/mac: Paste and drag and drop use different code paths to interact with the pasteboard.
      https://bugs.webkit.org/show_bug.cgi?id=52093
      The change consists in a refactoring of the code to have only one class that
      deals with the pasteboard on Mac.
      
      Reviewed by Alexey Proskuryakov.
      
      * WebCoreSupport/WebEditorClient.h:
      * WebCoreSupport/WebEditorClient.mm: Added two methods to provide to WebCore functionality
      exposed by NSURLExtras.
      (WebEditorClient::canonicalizeURL):
      (WebEditorClient::canonicalizeURLString):
      * WebCoreSupport/WebPasteboardHelper.h: Removed.
      * WebCoreSupport/WebPasteboardHelper.mm: Removed.
      * WebView/WebHTMLView.mm: Removed comment.
      * WebView/WebView.mm: The following methods have been changed to use the new DragData
      constructor that doesn't use the WebPasteboardHelper reference.
      (-[WebView draggingEntered:]):
      (-[WebView draggingUpdated:]):
      (-[WebView draggingExited:]):
      (-[WebView performDragOperation:]):
      
      WebKit2: Paste and drag and drop use different code paths to interact with the pasteboard.
      https://bugs.webkit.org/show_bug.cgi?id=52093
      The change consists in a refactoring of the code to have only one class that
      deals with the pasteboard on Mac.
      
      Reviewed by Alexey Proskuryakov.
      
      * WebProcess/WebCoreSupport/WebEditorClient.h:
      * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: Added two methods to provide to WebCore functionality
      exposed by NSURLExtras.
      (WebKit::WebEditorClient::canonicalizeURL):
      (WebKit::WebEditorClient::canonicalizeURLString):
      
      LayoutTests: Paste and drag and drop use different code paths to interact with the pasteboard.
      https://bugs.webkit.org/show_bug.cgi?id=52093
      
      Reviewed by Alexey Proskuryakov.
      
      New test results added to match the correct behavior.
              
      * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.checksum:
      * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.png:
      * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      964ea218
  3. 08 Jan, 2011 1 commit
  4. 07 Jan, 2011 1 commit
    • commit-queue@webkit.org's avatar
      2011-01-07 Rafael Weinstein <rafaelw@chromium.org> · 54439938
      commit-queue@webkit.org authored
              Reviewed by Eric Seidel.
      
              Cleanup: Fold shadowParentNode into shadowHost
              https://bugs.webkit.org/show_bug.cgi?id=51059
      
              Replaces all uses of shadowParentNode.
      
              No new tests because no behavior has changed.
      
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::initForStyleResolve):
              * dom/Node.cpp:
              (WebCore::Node::shadowHost):
              (WebCore::Node::shadowAncestorNode):
              (WebCore::eventTargetRespectingSVGTargetRules):
              (WebCore::Node::getEventAncestors):
              * dom/Node.h:
              * editing/Editor.cpp:
              (WebCore::Editor::findString):
              * page/DragController.cpp:
              (WebCore::asFileInput):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::handleMousePressEvent):
              (WebCore::instanceAssociatedWithShadowTreeElement):
              (WebCore::EventHandler::dispatchMouseEvent):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::hasLineIfEmpty):
              * rendering/RenderSVGShadowTreeRootContainer.cpp:
              (WebCore::RenderSVGShadowTreeRootContainer::updateFromElement):
              * svg/SVGStyledElement.cpp:
              (WebCore::SVGStyledElement::title):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      54439938
  5. 21 Dec, 2010 1 commit
    • commit-queue@webkit.org's avatar
      2010-12-21 Dominic Cooney <dominicc@google.com> · 3fa5e11c
      commit-queue@webkit.org authored
              Reviewed by Adam Barth.
      
              Rename Node::isShadowNode to isShadowRoot
              https://bugs.webkit.org/show_bug.cgi?id=51060
      
              The method gets whether the node is the root of a shadow tree;
              renamed to reflect intent.
      
              A simple rename--no new tests needed.
      
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::initForStyleResolve):
              (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
              * dom/Node.cpp:
              (WebCore::Node::shadowTreeRootNode):
              (WebCore::Node::isInShadowTree):
              (WebCore::eventTargetRespectingSVGTargetRules):
              (WebCore::Node::getEventAncestors):
              * dom/Node.h:
              (WebCore::Node::isShadowRoot):
              * dom/Range.cpp:
              (WebCore::Range::checkNodeBA):
              * page/DragController.cpp:
              (WebCore::asFileInput):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::handleMousePressEvent):
              (WebCore::EventHandler::dispatchMouseEvent):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::hasLineIfEmpty):
              * rendering/TextControlInnerElements.cpp:
              (WebCore::TextControlInnerElement::attachInnerElement):
              * svg/SVGStyledElement.cpp:
              (WebCore::SVGStyledElement::title):
              * svg/SVGUseElement.cpp:
              (WebCore::ShadowTreeUpdateBlocker::while):
              * svg/animation/SVGSMILElement.cpp:
              (WebCore::SVGSMILElement::insertedIntoDocument):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3fa5e11c
  6. 03 Dec, 2010 1 commit
  7. 12 Nov, 2010 1 commit
  8. 18 Sep, 2010 1 commit
    • darin@apple.com's avatar
      2010-09-17 Darin Adler <darin@apple.com> · 0f442a78
      darin@apple.com authored
              Reviewed by Sam Weinig.
      
              REGRESSION (r60104): Zoom level is unexpectedly reset on page reload
              https://bugs.webkit.org/show_bug.cgi?id=42863
      
              * src/FrameLoaderClientImpl.cpp:
              (WebKit::FrameLoaderClientImpl::createPlugin):
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::setZoomLevel):
              Call functions on Frame instead of FrameView.
      2010-09-17  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam Weinig.
      
              REGRESSION (r60104): Zoom level is unexpectedly reset on page reload
              https://bugs.webkit.org/show_bug.cgi?id=42863
      
              * Api/qwebframe.cpp:
              (QWebFrame::setTextSizeMultiplier):
              (QWebFrame::textSizeMultiplier):
              (QWebFrame::setZoomFactor):
              (QWebFrame::zoomFactor):
              Call functions on Frame instead of FrameView.
      2010-09-17  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam Weinig.
      
              REGRESSION (r60104): Zoom level is unexpectedly reset on page reload
              https://bugs.webkit.org/show_bug.cgi?id=42863
      
              * webkit/webkitwebview.cpp:
              (webkit_web_view_get_zoom_level):
              (webkit_web_view_apply_zoom_level):
              (webkit_web_view_set_full_content_zoom):
              Call functions on Frame instead of FrameView.
      2010-09-17  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam Weinig.
      
              REGRESSION (r60104): Zoom level is unexpectedly reset on page reload
              https://bugs.webkit.org/show_bug.cgi?id=42863
      
              * WebView.cpp:
              (WebView::setZoomMultiplier):
              Call functions on Frame instead of FrameView.
      2010-09-17  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam Weinig.
      
              REGRESSION (r60104): Zoom level is unexpectedly reset on page reload
              https://bugs.webkit.org/show_bug.cgi?id=42863
      
              * WebFrame.cpp:
              (wxWebFrame::IncreaseTextSize):
              (wxWebFrame::DecreaseTextSize):
              (wxWebFrame::ResetTextSize):
              Call functions on Frame instead of FrameView.
      2010-09-17  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam Weinig.
      
              REGRESSION (r60104): Zoom level is unexpectedly reset on page reload
              https://bugs.webkit.org/show_bug.cgi?id=42863
      
              * WebView/WebView.mm:
              (-[WebView _setZoomMultiplier:isTextOnly:]):
              Call functions on Frame instead of FrameView.
      2010-09-17  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam Weinig.
      
              REGRESSION (r60104): Zoom level is unexpectedly reset on page reload
              https://bugs.webkit.org/show_bug.cgi?id=42863
      
              * ewk/ewk_frame.cpp:
              (ewk_frame_zoom_get):
              (ewk_frame_zoom_set):
              (ewk_frame_zoom_text_only_set):
              Call functions on Frame instead of FrameView.
      2010-09-17  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam Weinig.
      
              REGRESSION (r60104): Zoom level is unexpectedly reset on page reload
              https://bugs.webkit.org/show_bug.cgi?id=42863
      
              Moved zoom level back from FrameView to Frame.
              I had forgotten that FrameView's lifetime is much shorter than
              Frame's, and until that is fixed it's best to leave this on Frame.
      
              * WebCore.exp.in: Updated.
      
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::styleForDocument):
              (WebCore::CSSStyleSelector::applyProperty):
              (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
              * dom/Document.cpp:
              (WebCore::Document::nodesFromRect):
              (WebCore::Document::elementFromPoint):
              (WebCore::Document::caretRangeFromPoint):
              * dom/MouseRelatedEvent.cpp:
              (WebCore::contentsX):
              (WebCore::contentsY):
              (WebCore::pageZoomFactor):
              * dom/Node.cpp:
              (WebCore::Node::dispatchMouseEvent):
              (WebCore::Node::dispatchWheelEvent):
              * html/HTMLBodyElement.cpp:
              (WebCore::adjustForZoom):
              (WebCore::HTMLBodyElement::scrollLeft):
              (WebCore::HTMLBodyElement::setScrollLeft):
              (WebCore::HTMLBodyElement::scrollTop):
              (WebCore::HTMLBodyElement::setScrollTop):
              (WebCore::HTMLBodyElement::scrollHeight):
              (WebCore::HTMLBodyElement::scrollWidth):
              * html/ImageDocument.cpp:
              (WebCore::pageZoomFactor):
              (WebCore::ImageDocument::scale):
              (WebCore::ImageDocument::imageFitsInWindow):
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::innerHeight):
              (WebCore::DOMWindow::innerWidth):
              (WebCore::DOMWindow::scrollX):
              (WebCore::DOMWindow::scrollY):
              (WebCore::DOMWindow::scrollTo):
              * page/DragController.cpp:
              (WebCore::elementUnderMouse):
              * rendering/RenderView.cpp:
              (WebCore::RenderView::zoomFactor):
              * svg/SVGSVGElement.cpp:
              (WebCore::SVGSVGElement::currentScale):
              (WebCore::SVGSVGElement::setCurrentScale):
              Get zoom factor from Frame rather than FrameView.
      
              * page/Frame.cpp:
              (WebCore::parentPageZoomFactor): Moved back here from FrameView.
              (WebCore::parentTextZoomFactor): Ditto.
              (WebCore::Frame::Frame): Ditto.
              (WebCore::Frame::setPageZoomFactor): Ditto.
              (WebCore::Frame::setTextZoomFactor): Ditto.
              (WebCore::Frame::setPageAndTextZoomFactors): Ditto.
      
              * page/Frame.h: Moved functions and data for zooming back here
              from FrameView.
      
              * page/FrameView.cpp:
              (WebCore::FrameView::FrameView):
              * page/FrameView.h:
              Removed code from here.
      2010-09-17  Daniel Bates  <dbates@rim.com>
      
              Reviewed by Darin Adler.
      
              REGRESSION (r60104): Zoom level is unexpectedly reset on page reload
              https://bugs.webkit.org/show_bug.cgi?id=42863
      
              * fast/css/preserve-user-specified-zoom-level-on-reload.html: Added.
              * platform/mac/fast/css/preserve-user-specified-zoom-level-on-reload-expected.checksum: Added.
              * platform/mac/fast/css/preserve-user-specified-zoom-level-on-reload-expected.png: Added.
              * platform/mac/fast/css/preserve-user-specified-zoom-level-on-reload-expected.txt: Added.
      2010-09-17  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam Weinig.
      
              REGRESSION (r60104): Zoom level is unexpectedly reset on page reload
              https://bugs.webkit.org/show_bug.cgi?id=42863
      
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::textZoomFactor):
              (WebKit::WebPage::setTextZoomFactor):
              (WebKit::WebPage::pageZoomFactor):
              (WebKit::WebPage::setPageZoomFactor):
              (WebKit::WebPage::setPageAndTextZoomFactors):
              Call functions on Frame instead of FrameView.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0f442a78
  9. 16 Sep, 2010 1 commit
    • darin@apple.com's avatar
      2010-09-16 Darin Adler <darin@apple.com> · a6cb255b
      darin@apple.com authored
              Reviewed by Andreas Kling.
      
              Reduce use of HTMLInputElement::inputType so we can remove it later
              https://bugs.webkit.org/show_bug.cgi?id=45903
      
              * src/DOMUtilitiesPrivate.cpp:
              (WebKit::elementHasLegalLinkAttribute): Use isImageButton.
              * src/WebPasswordFormUtils.cpp:
              (WebKit::findPasswordFormFields): Use isPasswordField.
              * src/WebSearchableFormData.cpp:
              (WebCore::IsInDefaultState): Use isCheckbox and isRadioButton.
              (WebCore::HasSuitableTextElement): Use isFileUpload and isPasswordField.
      2010-09-16  Darin Adler  <darin@apple.com>
      
              Reviewed by Andreas Kling.
      
              Reduce use of HTMLInputElement::inputType so we can remove it later
              https://bugs.webkit.org/show_bug.cgi?id=45903
      
              * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
              (DumpRenderTreeSupportQt::elementDoesAutoCompleteForElementWithId):
              Use isPasswordField.
      2010-09-16  Darin Adler  <darin@apple.com>
      
              Reviewed by Andreas Kling.
      
              Reduce use of HTMLInputElement::inputType so we can remove it later
              https://bugs.webkit.org/show_bug.cgi?id=45903
      
              * WebFrame.cpp:
              (WebFrame::elementDoesAutoComplete): Use isPasswordField.
              (WebFrame::elementIsPassword): Use isPasswordField.
      2010-09-16  Darin Adler  <darin@apple.com>
      
              Reviewed by Andreas Kling.
      
              Reduce use of HTMLInputElement::inputType so we can remove it later
              https://bugs.webkit.org/show_bug.cgi?id=45903
      
              * WebView/WebHTMLRepresentation.mm:
              (-[WebHTMLRepresentation elementDoesAutoComplete:]): Use isPasswordField.
              (-[WebHTMLRepresentation elementIsPassword:]): Use isPasswordField.
      2010-09-16  Darin Adler  <darin@apple.com>
      
              Reviewed by Andreas Kling.
      
              Reduce use of HTMLInputElement::inputType so we can remove it later
              https://bugs.webkit.org/show_bug.cgi?id=45903
      
              * accessibility/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::isFileUploadButton): Use isFileUpload.
              (WebCore::AccessibilityRenderObject::isInputImage): Use isImageButton.
              (WebCore::AccessibilityRenderObject::determineAccessibilityRole): Use
              isCheckbox and isRadioButton.
      
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::adjustRenderStyle): Use isImageButton.
      
              * editing/Editor.cpp:
              (WebCore::Editor::setBaseWritingDirection): Use isTextField.
      
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplaceSelectionCommand::doApply): Use isPasswordField.
      
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::isInPasswordField): Use isPasswordField.
      
              * html/HTMLInputElement.h: Added isFileUpload, isImageButton, and isSubmitButton.
      
              * page/Chrome.cpp:
              (WebCore::Chrome::setToolTip): Use isSubmitButton and isFileUpload.
      
              * page/DragController.cpp:
              (WebCore::asFileInput): Use isFileUpload.
      
              * page/EventHandler.cpp:
              (WebCore::isSubmitImage): Use isImageButton.
      
              * rendering/RenderFileUploadControl.cpp:
              (WebCore::RenderFileUploadControl::updateFromElement): Use isFileUpload.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a6cb255b
  10. 10 Sep, 2010 1 commit
    • darin@apple.com's avatar
      2010-09-09 Darin Adler <darin@apple.com> · b17ec2f7
      darin@apple.com authored
              Reviewed by Adam Barth.
      
              Move functions from Frame to SelectionController as planned
              https://bugs.webkit.org/show_bug.cgi?id=45508
      
              * src/WebFrameImpl.cpp:
              (WebKit::WebFrameImpl::selectionBoundsRect):
              Call functions on selection().
      2010-09-09  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Move functions from Frame to SelectionController as planned
              https://bugs.webkit.org/show_bug.cgi?id=45508
      
              * WebView.cpp:
              (WebView::selectionRect):
              (WebView::centerSelectionInVisibleArea):
              Call functions on selection().
      2010-09-09  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Move functions from Frame to SelectionController as planned
              https://bugs.webkit.org/show_bug.cgi?id=45508
      
              * WebView/WebFrame.mm:
              (-[WebFrame _selectionGranularity]):
              (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
              (-[WebFrame _typingStyle]):
              (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
              * WebView/WebHTMLRepresentation.mm:
              (-[WebHTMLRepresentation currentForm]):
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView jumpToSelection:]):
              (-[WebHTMLView centerSelectionInVisibleArea:]):
              (-[WebHTMLView _canSmartCopyOrDelete]):
              (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
              (-[WebHTMLView selectionRect]):
              (-[WebHTMLView selectionTextRects]):
              (-[WebHTMLView selectionImageRect]):
              * WebView/WebView.mm:
              (-[WebView setEditable:]):
              Call functions on selection().
      2010-09-09  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Move functions from Frame to SelectionController as planned
              https://bugs.webkit.org/show_bug.cgi?id=45508
      
              Also removed Frame::dragCaretController since it just called Page::dragCaretController.
      
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::setSelection):
              (WebCore::SelectionController::modify):
              (WebCore::SelectionController::selectFrameElementInParentIfFullySelected):
              (WebCore::SelectionController::selectAll):
              (WebCore::SelectionController::focusedOrActiveStateChanged):
              (WebCore::SelectionController::notifyRendererOfSelectionChange):
              (WebCore::isFrameElement):
              (WebCore::SelectionController::setFocusedNodeIfNeeded):
              (WebCore::SelectionController::paintDragCaret):
              (WebCore::SelectionController::shouldDeleteSelection):
              (WebCore::SelectionController::selectionBounds):
              (WebCore::SelectionController::selectionTextRects):
              (WebCore::scanForForm):
              (WebCore::SelectionController::currentForm):
              (WebCore::SelectionController::revealSelection):
              (WebCore::SelectionController::setSelectionFromNone):
              (WebCore::SelectionController::shouldChangeSelection):
              * editing/SelectionController.h:
              Moved functions here from Frame.
      
              * page/Frame.cpp:
              * page/Frame.h:
              Moved functions to SelectionController.
              Reorganized header to be easier to read and a bit more logical.
      
              * WebCore.exp.in: Updated.
      
              * dom/Document.cpp:
              (WebCore::Document::nodeChildrenWillBeRemoved):
              (WebCore::Document::nodeWillBeRemoved):
              Call Page::dragCaretController directly.
      
              * dom/Element.cpp:
              (WebCore::Element::updateFocusAppearance):
              * dom/InputElement.cpp:
              (WebCore::InputElement::updateFocusAppearance):
              * editing/ApplyStyleCommand.cpp:
              (WebCore::ApplyStyleCommand::editingStyleAtPosition):
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
              * editing/Editor.cpp:
              (WebCore::Editor::canSmartCopyOrDelete):
              (WebCore::Editor::textDirectionForSelection):
              (WebCore::Editor::appliedEditing):
              (WebCore::Editor::insertTextWithoutSendingTextEvent):
              (WebCore::Editor::advanceToNextMisspelling):
              (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
              (WebCore::Editor::revealSelectionAfterEditingOperation):
              (WebCore::Editor::transpose):
              (WebCore::Editor::changeSelectionAfterCommand):
              (WebCore::Editor::computeAndSetTypingStyle):
              (WebCore::Editor::selectionComputedStyle):
              (WebCore::Editor::styleForSelectionStart):
              (WebCore::Editor::findString):
              * editing/EditorCommand.cpp:
              (WebCore::executeDelete):
              * editing/InsertLineBreakCommand.cpp:
              (WebCore::InsertLineBreakCommand::doApply):
              * editing/InsertTextCommand.cpp:
              (WebCore::InsertTextCommand::input):
              * editing/RemoveFormatCommand.cpp:
              (WebCore::RemoveFormatCommand::doApply):
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplaceSelectionCommand::doApply):
              * editing/TypingCommand.cpp:
              (WebCore::TypingCommand::insertTextRunWithoutNewlines):
              (WebCore::TypingCommand::deleteKeyPressed):
              (WebCore::TypingCommand::forwardDeleteKeyPressed):
              * html/HTMLTextAreaElement.cpp:
              (WebCore::HTMLTextAreaElement::updateFocusAppearance):
              * page/ContextMenuController.cpp:
              (WebCore::ContextMenuController::contextMenuItemSelected):
              * page/DragController.cpp:
              (WebCore::DragController::concludeEditDrag):
              (WebCore::dragLocForSelectionDrag):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::selectClosestWordFromMouseEvent):
              (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
              (WebCore::EventHandler::handleMousePressEventTripleClick):
              (WebCore::EventHandler::handleMousePressEventSingleClick):
              (WebCore::EventHandler::updateSelectionForMouseDrag):
              (WebCore::EventHandler::handleMouseReleaseEvent):
              * page/FocusController.cpp:
              (WebCore::FocusController::advanceFocusInDocumentOrder):
              * page/chromium/EventHandlerChromium.cpp:
              (WebCore::EventHandler::passMousePressEventToSubframe):
              * page/chromium/FrameChromium.cpp:
              (WebCore::Frame::dragImageForSelection):
              * page/mac/FrameMac.mm:
              (WebCore::Frame::selectionImage):
              * platform/mac/ClipboardMac.mm:
              (WebCore::ClipboardMac::writeRange):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::paintCaret):
              Call functions on selection().
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b17ec2f7
  11. 09 Sep, 2010 1 commit
    • darin@apple.com's avatar
      2010-09-08 Darin Adler <darin@apple.com> · becacd8e
      darin@apple.com authored
              Reviewed by Adam Barth.
      
              Move functions from Frame to Editor as planned
              https://bugs.webkit.org/show_bug.cgi?id=45218
      
              * src/ContextMenuClientImpl.cpp:
              (WebKit::selectMisspelledWord):
              (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
              * src/WebFrameImpl.cpp:
              (WebKit::WebFrameImpl::find):
              (WebKit::WebFrameImpl::stopFinding):
              (WebKit::WebFrameImpl::scopeStringMatches):
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::caretOrSelectionBounds):
              Changed call sites to use editor().
      2010-09-08  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Move functions from Frame to Editor as planned
              https://bugs.webkit.org/show_bug.cgi?id=45218
      
              * Api/qwebpage.cpp:
              (QWebPage::selectedText):
              (QWebPage::setContentEditable):
              * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
              (DumpRenderTreeSupportQt::firstRectForCharacterRange):
              Changed call sites to use editor().
      2010-09-08  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Move functions from Frame to Editor as planned
              https://bugs.webkit.org/show_bug.cgi?id=45218
      
              * webkit/webkitwebview.cpp:
              (webkit_web_view_set_highlight_text_matches):
              (webkit_web_view_get_selected_text):
              (webkit_web_view_set_editable):
              Changed call sites to use editor().
      2010-09-08  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Move functions from Frame to Editor as planned
              https://bugs.webkit.org/show_bug.cgi?id=45218
      
              * WebCoreSupport/WebContextMenuClient.cpp:
              (WebContextMenuClient::searchWithGoogle):
              * WebFrame.cpp:
              (WebFrame::selectedString):
              * WebView.cpp:
              (WebView::selectedText):
              (WebView::prepareCandidateWindow):
              (WebView::onIMERequestCharPosition):
              Changed call sites to use editor().
      2010-09-08  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Move functions from Frame to Editor as planned
              https://bugs.webkit.org/show_bug.cgi?id=45218
      
              * WebFrame.cpp:
              (wxWebFrame::FindString):
              Changed call sites to use editor().
      2010-09-08  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Move functions from Frame to Editor as planned
              https://bugs.webkit.org/show_bug.cgi?id=45218
      
              * WebView/WebFrame.mm:
              (-[WebFrame _selectedString]):
              (-[WebFrame _firstRectForDOMRange:]):
              (-[WebFrame _markDOMRange]):
              (-[WebFrame _setTypingStyle:withUndoAction:]):
              * WebView/WebHTMLRepresentation.mm:
              (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView _selectionStartFontAttributesAsRTF]):
              (-[WebHTMLView toggleBaseWritingDirection:]):
              (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]):
              (-[WebHTMLView countMatchesForText:caseSensitive:limit:markMatches:]):
              (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]):
              (-[WebHTMLView markedTextMatchesAreHighlighted]):
              * WebView/WebView.mm:
              (-[WebView setEditable:]):
              Changed call sites to use editor().
      2010-09-08  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Move functions from Frame to Editor as planned
              https://bugs.webkit.org/show_bug.cgi?id=45218
      
              * ewk/ewk_frame.cpp:
              (ewk_frame_editable_set):
              (ewk_frame_selection_get):
              (ewk_frame_text_search):
              (ewk_frame_text_matches_mark):
              (ewk_frame_text_matches_highlight_set):
              (ewk_frame_text_matches_highlight_get):
              * ewk/ewk_view.cpp:
              (ewk_view_selection_get):
              Changed call sites to use editor().
      2010-09-08  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Move functions from Frame to Editor as planned
              https://bugs.webkit.org/show_bug.cgi?id=45218
      
              Just executing the plan that has long been described in Frame.h
              to move a bunch of functions to Editor.
      
              * WebCore.exp.in: Updated.
      
              * editing/Editor.cpp:
              (WebCore::Editor::fontForSelection):
              (WebCore::Editor::textDirectionForSelection):
              (WebCore::Editor::applyStyle):
              (WebCore::Editor::selectionStartHasStyle):
              (WebCore::Editor::selectionHasStyle):
              (WebCore::Editor::selectionStartCSSPropertyValue):
              (WebCore::Editor::Editor):
              (WebCore::Editor::cut):
              (WebCore::Editor::copy):
              (WebCore::Editor::ignoreSpelling):
              (WebCore::Editor::learnSpelling):
              (WebCore::Editor::isSelectionMisspelled):
              (WebCore::Editor::guessesForMisspelledSelection):
              (WebCore::Editor::selectedText):
              (WebCore::Editor::firstRectForRange):
              (WebCore::Editor::shouldChangeSelection):
              (WebCore::Editor::computeAndSetTypingStyle):
              (WebCore::Editor::selectionComputedStyle):
              (WebCore::Editor::textFieldDidBeginEditing):
              (WebCore::Editor::textFieldDidEndEditing):
              (WebCore::Editor::textDidChangeInTextField):
              (WebCore::Editor::doTextFieldCommandFromEvent):
              (WebCore::Editor::textWillBeDeletedInTextField):
              (WebCore::Editor::textDidChangeInTextArea):
              (WebCore::Editor::applyEditingStyleToBodyElement):
              (WebCore::Editor::applyEditingStyleToElement):
              (WebCore::Editor::styleForSelectionStart):
              (WebCore::Editor::findString):
              (WebCore::Editor::countMatchesForText):
              (WebCore::Editor::setMarkedTextMatchesAreHighlighted):
              (WebCore::Editor::respondToChangedSelection):
              * editing/Editor.h:
              * editing/mac/EditorMac.mm:
              (WebCore::Editor::fontAttributesForSelectionStart):
              (WebCore::Editor::baseWritingDirectionForSelectionStart):
              Moved functions here.
      
              * page/Frame.cpp:
              (WebCore::Frame::Frame):
              (WebCore::Frame::shouldChangeSelection):
              * page/Frame.h:
              * page/mac/FrameMac.mm:
              Moved functions out of here.
      
              * dom/InputElement.cpp:
              (WebCore::InputElement::dispatchBlurEvent):
              (WebCore::InputElement::aboutToUnload):
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::doApply):
              * editing/EditorCommand.cpp:
              (WebCore::executeToggleStyleInList):
              (WebCore::executeDeleteToMark):
              (WebCore::executeFindString):
              (WebCore::executeSelectToMark):
              (WebCore::executeSetMark):
              (WebCore::executeSwapWithMark):
              (WebCore::enabledVisibleSelectionAndMark):
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::setSelection):
              * html/HTMLInputElement.cpp:
              (WebCore::HTMLInputElement::defaultEventHandler):
              * page/ContextMenuController.cpp:
              (WebCore::ContextMenuController::contextMenuItemSelected):
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::find):
              * page/DragController.cpp:
              (WebCore::DragController::startDrag):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::sendContextMenuEventForKey):
              * page/Page.cpp:
              (WebCore::Page::findString):
              (WebCore::Page::markAllMatchesForText):
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::paintTextMatchMarker):
              * rendering/RenderTextControlMultiLine.cpp:
              (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
              * rendering/RenderTextControlSingleLine.cpp:
              (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
              Changed call sites to use editor().
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      becacd8e
  12. 08 Sep, 2010 1 commit
    • abarth@webkit.org's avatar
      2010-09-08 Adam Barth <abarth@webkit.org> · 17d66c6d
      abarth@webkit.org authored
              Rubber-stamped by Eric Seidel.
      
              Rename DocLoader to CachedResourceLoader because that's what it does.
      
              * WebDataSource.cpp:
      2010-09-08  Adam Barth  <abarth@webkit.org>
      
              Rubber-stamped by Eric Seidel.
      
              Rename DocLoader to CachedResourceLoader because that's what it does.
      
              * WebView/WebFrame.mm:
      2010-09-08  Adam Barth  <abarth@webkit.org>
      
              Rubber-stamped by Eric Seidel.
      
              Rename DocLoader to CachedResourceLoader because that's what it does.
      
              * Android.mk:
              * CMakeLists.txt:
              * GNUmakefile.am:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * css/CSSCursorImageValue.cpp:
              (WebCore::CSSCursorImageValue::cachedImage):
              * css/CSSCursorImageValue.h:
              * css/CSSFontFaceSource.cpp:
              (WebCore::CSSFontFaceSource::getFontData):
              * css/CSSFontSelector.cpp:
              (WebCore::CSSFontSelector::cachedResourceLoader):
              (WebCore::CSSFontSelector::addFontFaceRule):
              * css/CSSFontSelector.h:
              * css/CSSImageValue.cpp:
              (WebCore::CSSImageValue::cachedImage):
              * css/CSSImageValue.h:
              * css/CSSImportRule.cpp:
              (WebCore::CSSImportRule::insertedIntoParent):
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::loadPendingImages):
              * css/CSSStyleSheet.h:
              * dom/Document.cpp:
              (WebCore::Document::Document):
              (WebCore::Document::~Document):
              (WebCore::Document::implicitClose):
              * dom/Document.h:
              (WebCore::Document::cachedResourceLoader):
              * dom/ProcessingInstruction.cpp:
              (WebCore::ProcessingInstruction::checkStyleSheet):
              * dom/ScriptElement.cpp:
              (WebCore::ScriptElementData::requestScript):
              * dom/XMLDocumentParser.cpp:
              * dom/XMLDocumentParser.h:
              * dom/XMLDocumentParserLibxml2.cpp:
              (WebCore::matchFunc):
              (WebCore::shouldAllowExternalLoad):
              (WebCore::openFunc):
              (WebCore::XMLDocumentParser::doWrite):
              (WebCore::XMLDocumentParser::endElementNs):
              (WebCore::XMLDocumentParser::initializeParserContext):
              (WebCore::XMLDocumentParser::doEnd):
              (WebCore::xmlDocPtrForString):
              * dom/XMLDocumentParserQt.cpp:
              (WebCore::XMLDocumentParser::parseEndElement):
              * dom/XMLDocumentParserScope.cpp:
              (WebCore::XMLDocumentParserScope::XMLDocumentParserScope):
              (WebCore::XMLDocumentParserScope::~XMLDocumentParserScope):
              * dom/XMLDocumentParserScope.h:
              * editing/Editor.cpp:
              (WebCore::Editor::paste):
              * editing/mac/EditorMac.mm:
              (WebCore::Editor::paste):
              * html/HTMLLinkElement.cpp:
              (WebCore::HTMLLinkElement::process):
              * html/parser/CSSPreloadScanner.cpp:
              (WebCore::CSSPreloadScanner::emitRule):
              * html/parser/HTMLPreloadScanner.cpp:
              (WebCore::HTMLNames::PreloadTask::preload):
              * html/parser/HTMLScriptRunner.cpp:
              (WebCore::HTMLScriptRunner::requestPendingScript):
              * inspector/InspectorResource.cpp:
              (WebCore::InspectorResource::cachedResource):
              * loader/Cache.cpp:
              (WebCore::Cache::requestResource):
              (WebCore::Cache::requestUserCSSStyleSheet):
              (WebCore::Cache::revalidateResource):
              (WebCore::Cache::addCachedResourceLoader):
              (WebCore::Cache::removeCachedResourceLoader):
              * loader/Cache.h:
              * loader/CachedCSSStyleSheet.h:
              * loader/CachedFont.cpp:
              (WebCore::CachedFont::load):
              (WebCore::CachedFont::beginLoadIfNeeded):
              * loader/CachedFont.h:
              * loader/CachedImage.cpp:
              (WebCore::CachedImage::load):
              (WebCore::CachedImage::maximumDecodedImageSize):
              * loader/CachedImage.h:
              * loader/CachedResource.cpp:
              (WebCore::CachedResource::CachedResource):
              (WebCore::CachedResource::~CachedResource):
              (WebCore::CachedResource::load):
              * loader/CachedResource.h:
              (WebCore::CachedResource::load):
              (WebCore::CachedResource::setCachedResourceLoader):
              * loader/CachedResourceLoader.cpp: Copied from WebCore/loader/DocLoader.cpp.
              (WebCore::CachedResourceLoader::CachedResourceLoader):
              (WebCore::CachedResourceLoader::~CachedResourceLoader):
              (WebCore::CachedResourceLoader::frame):
              (WebCore::CachedResourceLoader::checkForReload):
              (WebCore::CachedResourceLoader::requestImage):
              (WebCore::CachedResourceLoader::requestFont):
              (WebCore::CachedResourceLoader::requestCSSStyleSheet):
              (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
              (WebCore::CachedResourceLoader::requestScript):
              (WebCore::CachedResourceLoader::requestXSLStyleSheet):
              (WebCore::CachedResourceLoader::requestLinkPrefetch):
              (WebCore::CachedResourceLoader::canRequest):
              (WebCore::CachedResourceLoader::requestResource):
              (WebCore::CachedResourceLoader::printAccessDeniedMessage):
              (WebCore::CachedResourceLoader::setAutoLoadImages):
              (WebCore::CachedResourceLoader::cachePolicy):
              (WebCore::CachedResourceLoader::removeCachedResource):
              (WebCore::CachedResourceLoader::setLoadInProgress):
              (WebCore::CachedResourceLoader::checkCacheObjectStatus):
              (WebCore::CachedResourceLoader::incrementRequestCount):
              (WebCore::CachedResourceLoader::decrementRequestCount):
              (WebCore::CachedResourceLoader::requestCount):
              (WebCore::CachedResourceLoader::preload):
              (WebCore::CachedResourceLoader::checkForPendingPreloads):
              (WebCore::CachedResourceLoader::requestPreload):
              (WebCore::CachedResourceLoader::clearPreloads):
              (WebCore::CachedResourceLoader::clearPendingPreloads):
              (WebCore::CachedResourceLoader::printPreloadStats):
              * loader/CachedResourceLoader.h: Copied from WebCore/loader/DocLoader.h.
              * loader/CachedScript.h:
              * loader/CachedXSLStyleSheet.h:
              * loader/DocLoader.cpp: Removed.
              * loader/DocLoader.h: Removed.
              * loader/DocumentLoader.cpp:
              (WebCore::DocumentLoader::isLoadingInAPISense):
              (WebCore::DocumentLoader::subresource):
              (WebCore::DocumentLoader::getSubresources):
              * loader/FrameLoader.cpp:
              (WebCore::numRequests):
              (WebCore::FrameLoader::stopLoading):
              (WebCore::FrameLoader::didBeginDocument):
              * loader/HistoryController.cpp:
              (WebCore::HistoryController::createItem):
              * loader/ImageLoader.cpp:
              (WebCore::ImageLoader::updateFromElement):
              * loader/Request.cpp:
              (WebCore::Request::Request):
              * loader/Request.h:
              (WebCore::Request::cachedResourceLoader):
              * loader/loader.cpp:
              (WebCore::Loader::load):
              (WebCore::Loader::cancelRequests):
              (WebCore::Loader::Host::servePendingRequests):
              (WebCore::Loader::Host::didFinishLoading):
              (WebCore::Loader::Host::didFail):
              (WebCore::Loader::Host::didReceiveResponse):
              (WebCore::Loader::Host::cancelPendingRequests):
              (WebCore::Loader::Host::cancelRequests):
              * loader/loader.h:
              * page/DragController.cpp:
              (WebCore::DragController::concludeEditDrag):
              * page/Frame.cpp:
              * page/FrameView.cpp:
              (WebCore::FrameView::checkStopDelayingDeferredRepaints):
              (WebCore::FrameView::updateDeferredRepaintDelay):
              * page/Settings.cpp:
              (WebCore::setLoadsImagesAutomaticallyInAllFrames):
              * platform/android/TemporaryLinkStubs.cpp:
              (WebCore::CheckCacheObjectStatus):
              * platform/network/android/ResourceHandleAndroid.cpp:
              (WebCore::ResourceHandle::start):
              * platform/network/cf/ResourceHandleCFNet.cpp:
              * platform/network/curl/ResourceHandleCurl.cpp:
              * platform/network/mac/ResourceHandleMac.mm:
              * platform/network/qt/ResourceHandleQt.cpp:
              * platform/network/soup/ResourceHandleSoup.cpp:
              * platform/network/win/ResourceHandleWin.cpp:
              * svg/SVGFEImageElement.cpp:
              (WebCore::SVGFEImageElement::requestImageResource):
              * svg/SVGFontFaceUriElement.cpp:
              (WebCore::SVGFontFaceUriElement::loadFont):
              * workers/Worker.cpp:
              * xml/XSLImportRule.cpp:
              (WebCore::XSLImportRule::loadSheet):
              * xml/XSLStyleSheet.h:
              * xml/XSLStyleSheetLibxslt.cpp:
              (WebCore::XSLStyleSheet::cachedResourceLoader):
              (WebCore::XSLStyleSheet::parseString):
              * xml/XSLStyleSheetQt.cpp:
              (WebCore::XSLStyleSheet::cachedResourceLoader):
              * xml/XSLTProcessor.cpp:
              * xml/XSLTProcessorLibxslt.cpp:
              (WebCore::docLoaderFunc):
              (WebCore::setXSLTLoadCallBack):
              (WebCore::xmlDocPtrFromNode):
              (WebCore::XSLTProcessor::transformToString):
      2010-09-08  Adam Barth  <abarth@webkit.org>
      
              Rubber-stamped by Eric Seidel.
      
              Rename DocLoader to CachedResourceLoader because that's what it does.
      
              * Scripts/do-webcore-rename:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      17d66c6d
  13. 16 Aug, 2010 1 commit
    • morrita@google.com's avatar
      2010-08-13 MORITA Hajime <morrita@google.com> · 222ce095
      morrita@google.com authored
              Reviewed by Tony Chang.
      
              https://bugs.webkit.org/show_bug.cgi?id=43778
              Dropping should fire textInput event.
      
              * editing/pasteboard/drop-text-events-expected.txt: Added.
              * editing/pasteboard/drop-text-events-sideeffect-expected.txt: Added.
              * editing/pasteboard/drop-text-events-sideeffect.html: Added.
              * editing/pasteboard/drop-text-events.html: Added.
              * editing/pasteboard/script-tests/drop-text-events-sideeffect.js: Added.
              * editing/pasteboard/script-tests/drop-text-events.js: Added.
      2010-08-13  MORITA Hajime  <morrita@google.com>
      
              Reviewed by Tony Chang.
      
              https://bugs.webkit.org/show_bug.cgi?id=43778
              Dropping should fire textInput event
      
              This change:
              - added TextEvent::m_isDrop to distinguish drop-initiated events.
              - added to dispatch TextEvent from DragController before making a side effect
                and cancel the side effect if the event prevents default
      
              Tests: editing/pasteboard/drop-text-events-sideeffect.html
                     editing/pasteboard/drop-text-events.html
      
              * dom/TextEvent.cpp:
              (WebCore::TextEvent::createForDrop): Added.
              (WebCore::TextEvent::TextEvent):
              * dom/TextEvent.h:
              (WebCore::TextEvent::isDrop): Added.
              * editing/Editor.cpp:
              (WebCore::Editor::handleTextEvent):
              (WebCore::Editor::findEventTargetFrom): Extracted from findEventTargetFromSelection().
              (WebCore::Editor::findEventTargetFromSelection):
              * editing/Editor.h:
              * page/DragController.cpp:
              (WebCore::DragController::dispatchTextInputEventFor): Added.
              (WebCore::DragController::concludeEditDrag): Added an event dispatch path.
              * page/DragController.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65395 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      222ce095
  14. 27 Jul, 2010 1 commit
    • jianli@chromium.org's avatar
      Add ScriptExecutionContext argument to File/Blob constructors. · 37d8a583
      jianli@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=40587
      
      Reviewed by David Levin.
      
      Remove DragData::createClipboard and add Clipboard::create for it to be
      called directly in DragController. This is because we need to pass
      Frame pointer to Clipboard class and use it to get ScriptExecutionContext
      in order to construct File objects in Clipboard::files().
      
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::DeserializingTreeWalker::convertIfTerminal):
      * bindings/v8/SerializedScriptValue.cpp:
      (WebCore::ZigZag::Reader::readBlob):
      (WebCore::ZigZag::Reader::readFile):
      (WebCore::ZigZag::Reader::readFileList):
      * dom/Clipboard.h:
      * editing/Editor.cpp:
      (WebCore::Editor::dispatchCPPEvent):
      * editing/Editor.h:
      * editing/android/EditorAndroid.cpp:
      (WebCore::Editor::newGeneralClipboard):
      * editing/brew/EditorBrew.cpp:
      (WebCore::Editor::newGeneralClipboard):
      * editing/chromium/EditorChromium.cpp:
      (WebCore::Editor::newGeneralClipboard):
      * editing/haiku/EditorHaiku.cpp:
      (WebCore::Editor::newGeneralClipboard):
      * editing/mac/EditorMac.mm:
      (WebCore::Editor::newGeneralClipboard):
      * editing/qt/EditorQt.cpp:
      (WebCore::Editor::newGeneralClipboard):
      * editing/wx/EditorWx.cpp:
      (WebCore::Editor::newGeneralClipboard):
      * html/Blob.cpp:
      (WebCore::Blob::Blob):
      (WebCore::Blob::slice):
      * html/Blob.h:
      (WebCore::Blob::create):
      * html/Blob.idl:
      * html/BlobBuilder.cpp:
      (WebCore::BlobBuilder::getBlob):
      * html/BlobBuilder.h:
      * html/BlobBuilder.idl:
      * html/File.cpp:
      (WebCore::File::File):
      * html/File.h:
      (WebCore::File::create):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::appendFormData):
      (WebCore::HTMLInputElement::setFileListFromRenderer):
      * page/DragController.cpp:
      (WebCore::DragController::dragExited):
      (WebCore::DragController::performDrag):
      (WebCore::DragController::tryDHTMLDrag):
      * page/chromium/EventHandlerChromium.cpp:
      (WebCore::EventHandler::createDraggingClipboard):
      * page/gtk/EventHandlerGtk.cpp:
      (WebCore::EventHandler::createDraggingClipboard):
      * page/win/EventHandlerWin.cpp:
      (WebCore::EventHandler::createDraggingClipboard):
      * platform/DragData.h:
      * platform/android/ClipboardAndroid.cpp:
      (WebCore::Clipboard::create):
      * platform/android/DragDataAndroid.cpp:
      * platform/brew/ClipboardBrew.cpp:
      (WebCore::Clipboard::create):
      * platform/brew/DragDataBrew.cpp:
      * platform/chromium/ClipboardChromium.cpp:
      (WebCore::Clipboard::create):
      (WebCore::ClipboardChromium::ClipboardChromium):
      (WebCore::ClipboardChromium::create):
      (WebCore::ClipboardChromium::files):
      * platform/chromium/ClipboardChromium.h:
      * platform/chromium/DragDataChromium.cpp:
      * platform/efl/ClipboardEfl.cpp:
      (WebCore::Editor::newGeneralClipboard):
      (WebCore::Clipboard::create):
      * platform/efl/DragDataEfl.cpp:
      * platform/gtk/ClipboardGtk.cpp:
      (WebCore::Editor::newGeneralClipboard):
      (WebCore::Clipboard::create):
      (WebCore::ClipboardGtk::ClipboardGtk):
      (WebCore::ClipboardGtk::files):
      * platform/gtk/ClipboardGtk.h:
      (WebCore::ClipboardGtk::create):
      * platform/gtk/DragDataGtk.cpp:
      * platform/haiku/ClipboardHaiku.cpp:
      (WebCore::Clipboard::create):
      * platform/haiku/DragDataHaiku.cpp:
      * platform/mac/ClipboardMac.mm:
      (WebCore::Clipboard::create):
      (WebCore::ClipboardMac::files):
      * platform/mac/DragDataMac.mm:
      * platform/qt/ClipboardQt.cpp:
      (WebCore::Clipboard::create):
      * platform/qt/DragDataQt.cpp:
      * platform/win/ClipboardWin.cpp:
      (WebCore::Clipboard::create):
      (WebCore::ClipboardWin::ClipboardWin):
      (WebCore::ClipboardWin::files):
      * platform/win/ClipboardWin.h:
      (WebCore::ClipboardWin::create):
      * platform/win/DragDataWin.cpp:
      * platform/win/EditorWin.cpp:
      (WebCore::Editor::newGeneralClipboard):
      * platform/wince/DragDataWince.cpp:
      * platform/wince/EditorWince.cpp:
      (WebCore::Editor::newGeneralClipboard):
      * platform/wx/ClipboardWx.cpp:
      (WebCore::Clipboard::create):
      * platform/wx/DragDataWx.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64152 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      37d8a583
  15. 10 Jun, 2010 2 commits
    • eric@webkit.org's avatar
      2010-06-10 Daniel Cheng <dcheng@chromium.org> · ccf61be1
      eric@webkit.org authored
              Reviewed by Jian Li.
      
              Don't convert filenames to URLs in edit drags.
              https://bugs.webkit.org/show_bug.cgi?id=38826
      
              For security reasons, we don't want to expose file system paths to web
              content, so we filter them out of edit drags.
      
              * editing/pasteboard/file-drag-to-editable-expected.txt: Added.
              * editing/pasteboard/file-drag-to-editable.html: Added.
              * editing/pasteboard/script-tests/file-drag-to-editable.js: Added.
              * platform/gtk/Skipped:
              * platform/mac/Skipped:
              * platform/qt/Skipped:
              * platform/win/Skipped:
      2010-06-10  Daniel Cheng  <dcheng@chromium.org>
      
              Reviewed by Jian Li.
      
              Don't convert filenames to URLs in edit drags.
              https://bugs.webkit.org/show_bug.cgi?id=38826
      
              For security reasons, we don't want to expose file system paths to web
              content, so we filter them out of edit drags.
      
              Test: editing/pasteboard/file-drag-to-editable.html
      
              * page/DragController.cpp:
              (WebCore::documentFragmentFromDragData):
              * platform/DragData.h:
              (WebCore::DragData::):
              * platform/android/DragDataAndroid.cpp:
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              * platform/chromium/DragDataChromium.cpp:
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              * platform/efl/DragDataEfl.cpp:
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              * platform/gtk/DragDataGtk.cpp:
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              * platform/haiku/DragDataHaiku.cpp:
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              * platform/mac/DragDataMac.mm:
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              * platform/qt/DragDataQt.cpp:
              (WebCore::DragData::asPlainText):
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              * platform/win/ClipboardUtilitiesWin.cpp:
              (WebCore::getURL):
              (WebCore::getPlainText):
              * platform/win/ClipboardUtilitiesWin.h:
              * platform/win/ClipboardWin.cpp:
              (WebCore::ClipboardWin::getData):
              * platform/win/DragDataWin.cpp:
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              * platform/wince/DragDataWince.cpp:
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              * platform/wx/DragDataWx.cpp:
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ccf61be1
    • eric@webkit.org's avatar
      2010-06-10 Eric Seidel <eric@webkit.org> · b35848ab
      eric@webkit.org authored
              Reviewed by Adam Barth.
      
              Reduce FrameView.h includes to speed up build times
              https://bugs.webkit.org/show_bug.cgi?id=40408
      
              Cleaned up FrameView.h includes and then propagated the
              cascade of includes to the necessary .cpp files.
              This should reduce the set of files rebuilt every
              time FrameView.h changes, and should also reduce the size
              of some .o files.
      
              No functional changes, thus no tests.
      
              * accessibility/AccessibilityRenderObject.cpp:
              * dom/ContainerNode.cpp:
              * dom/Document.cpp:
              * dom/Element.cpp:
              * dom/EventTarget.h:
              * dom/Node.cpp:
              * editing/EditorCommand.cpp:
              * editing/SelectionController.cpp:
              * html/HTML5Tokenizer.cpp:
              (WebCore::HTML5Tokenizer::script):
               - No need for this to be inline.  Being inline required
                 Frame.h in the header, which causes huge include cascade.
              * html/HTML5Tokenizer.h:
              * page/DragController.cpp:
              * page/EventHandler.cpp:
              * page/Frame.h:
              * page/FrameView.h:
              * page/PrintContext.cpp:
              * page/SpatialNavigation.cpp:
              * rendering/RenderBlock.cpp:
              * rendering/RenderBlockLineLayout.cpp:
              * rendering/RenderImage.cpp:
              * rendering/RenderInline.cpp:
              * rendering/RenderObject.h:
              * rendering/RenderTextControlSingleLine.cpp:
              * rendering/RenderWidget.cpp:
              * rendering/SVGRenderSupport.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b35848ab
  16. 30 May, 2010 1 commit
    • darin@apple.com's avatar
      2010-05-30 Darin Adler <darin@apple.com> · 1f643c79
      darin@apple.com authored
              Reviewed by Sam Weinig.
      
              Make more HTML DOM members private, especially constructors, third and final batch
              https://bugs.webkit.org/show_bug.cgi?id=39916
      
              * WebView/WebHTMLRepresentation.mm:
              (-[WebHTMLRepresentation elementWithName:inForm:]): Use the new HTMLFormElement
              function, associatedElements, rather than getting directly at a data member
              named formElements.
              (-[WebHTMLRepresentation controlsInForm:]): Ditto.
      2010-05-30  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam Weinig.
      
              Make more HTML DOM members private, especially constructors, third and final batch
              https://bugs.webkit.org/show_bug.cgi?id=39916
      
              * dom/Document.cpp:
              (WebCore::Document::implicitClose):
              * editing/DeleteButtonController.cpp:
              (WebCore::DeleteButtonController::createDeletionUI):
              * editing/EditorCommand.cpp:
              (WebCore::executeInsertHorizontalRule):
              (WebCore::executeInsertImage):
              * editing/htmlediting.cpp:
              (WebCore::createDefaultParagraphElement):
              (WebCore::createListItemElement):
              * html/HTMLParser.cpp:
              (WebCore::HTMLParser::handleError):
              (WebCore::HTMLParser::headCreateErrorCheck):
              (WebCore::HTMLParser::formCreateErrorCheck):
              (WebCore::HTMLParser::createHead):
              (WebCore::HTMLParser::handleIsindex):
              (WebCore::HTMLParser::finished):
              * html/HTMLViewSourceDocument.cpp:
              (WebCore::HTMLViewSourceDocument::createContainingTable):
              * rendering/RenderTextControl.cpp:
              (WebCore::RenderTextControl::createSubtreeIfNeeded):
              * rendering/RenderTextControlSingleLine.cpp:
              (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
              Use create instead of new to create HTML elements.
      
              * html/HTMLFormCollection.cpp:
              (WebCore::HTMLFormCollection::formCollectionInfo):
              (WebCore::HTMLFormCollection::item):
              (WebCore::HTMLFormCollection::getNamedFormItem):
              (WebCore::HTMLFormCollection::updateNameCache):
              * html/HTMLFormControlElement.h:
              Updated for name and privacy changes in HTMLFormElement.
      
              * html/HTMLFormElement.cpp:
              (WebCore::HTMLFormElement::HTMLFormElement):
              (WebCore::HTMLFormElement::create):
              (WebCore::HTMLFormElement::~HTMLFormElement):
              (WebCore::HTMLFormElement::length):
              (WebCore::HTMLFormElement::submitImplicitly):
              (WebCore::HTMLFormElement::createFormData):
              (WebCore::HTMLFormElement::submit):
              (WebCore::HTMLFormElement::reset):
              (WebCore::HTMLFormElement::formElementIndex):
              (WebCore::HTMLFormElement::registerFormElement):
              (WebCore::HTMLFormElement::removeFormElement):
              (WebCore::HTMLFormElement::registerImgElement):
              (WebCore::HTMLFormElement::removeImgElement):
              (WebCore::HTMLFormElement::defaultButton):
              (WebCore::HTMLFormElement::collectUnhandledInvalidControls):
              (WebCore::HTMLFormElement::addElementAlias):
              (WebCore::HTMLFormElement::documentDidBecomeActive):
              * html/HTMLFormElement.h:
              Added create functions. Made constructors and other members private.
              Used an OwnPtr for m_elementAliases. Renamed collectionInfo to
              m_collectionCache and used an OwnPtr for it. Renamed formElements to
              m_associatedElements (since its contents are what HTML5 calls
              "form-associated element", not form elements). Renamed imgElements to
              m_imageElements.
      
              * html/HTMLFrameSetElement.cpp:
              (WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
              (WebCore::HTMLFrameSetElement::create):
              (WebCore::HTMLFrameSetElement::parseMappedAttribute):
              * html/HTMLFrameSetElement.h:
              Added create functions. Made constructors and other members private.
              Renamed m_rows and m_cols to m_rowLengths and m_colLengths and used
              OwnArrayPtr for both.
      
              * html/HTMLLabelElement.cpp:
              (WebCore::nodeAsLabelableFormControl): Made this cast to Element instead
              of HTMLElement, since isFormControlElement is available on Element.
              (WebCore::HTMLLabelElement::HTMLLabelElement):
              (WebCore::HTMLLabelElement::create):
              * html/HTMLLabelElement.h:
              Added create functions. Made constructors and other members private.
      
              * html/HTMLLegendElement.cpp:
              (WebCore::HTMLLegendElement::HTMLLegendElement):
              (WebCore::HTMLLegendElement::create):
              (WebCore::HTMLLegendElement::associatedControl):
              (WebCore::HTMLLegendElement::focus):
              (WebCore::HTMLLegendElement::accessKeyAction):
              * html/HTMLLegendElement.h:
              Added create functions. Made constructors and other members private.
              Renamed formElement to associatedControl since hte control associated
              with this legend is not a "form element".
      
              * editing/DeleteButton.cpp:
              (WebCore::DeleteButton::DeleteButton):
              (WebCore::DeleteButton::create):
              * editing/DeleteButton.h:
              * html/HTMLDivElement.cpp:
              (WebCore::HTMLDivElement::HTMLDivElement):
              (WebCore::HTMLDivElement::create):
              * html/HTMLDivElement.h:
              * html/HTMLFontElement.cpp:
              (WebCore::HTMLFontElement::create):
              * html/HTMLFontElement.h:
              * html/HTMLHRElement.cpp:
              (WebCore::HTMLHRElement::HTMLHRElement):
              (WebCore::HTMLHRElement::create):
              * html/HTMLHRElement.h:
              * html/HTMLHeadElement.cpp:
              (WebCore::HTMLHeadElement::HTMLHeadElement):
              (WebCore::HTMLHeadElement::create):
              * html/HTMLHeadElement.h:
              * html/HTMLHeadingElement.cpp:
              (WebCore::HTMLHeadingElement::HTMLHeadingElement):
              (WebCore::HTMLHeadingElement::create):
              * html/HTMLHeadingElement.h:
              * html/HTMLHtmlElement.cpp:
              (WebCore::HTMLHtmlElement::HTMLHtmlElement):
              (WebCore::HTMLHtmlElement::create):
              * html/HTMLHtmlElement.h:
              * html/HTMLImageElement.cpp:
              (WebCore::HTMLImageElement::HTMLImageElement):
              (WebCore::HTMLImageElement::create):
              * html/HTMLImageElement.h:
              * html/HTMLInputElement.cpp:
              (WebCore::HTMLInputElement::HTMLInputElement):
              (WebCore::HTMLInputElement::create):
              (WebCore::HTMLInputElement::createTemporaryFormForIsIndex):
              * html/HTMLInputElement.h:
              * html/HTMLIsIndexElement.cpp:
              (WebCore::HTMLIsIndexElement::HTMLIsIndexElement):
              (WebCore::HTMLIsIndexElement::create):
              * html/HTMLIsIndexElement.h:
              * html/HTMLLIElement.cpp:
              (WebCore::HTMLLIElement::HTMLLIElement):
              (WebCore::HTMLLIElement::create):
              * html/HTMLLIElement.h:
              * html/HTMLLinkElement.cpp:
              (WebCore::HTMLLinkElement::HTMLLinkElement):
              (WebCore::HTMLLinkElement::create):
              * html/HTMLLinkElement.h:
              Added create functions. Made constructors and other members private.
      
              * html/HTMLTagNames.in: Removed the createWithNew flag from all the
              tags that were still using it: div, font, form, frameset, h1, h2, h3,
              h4, h5, h6, head, hr, html, image, img, input, ins, isindex, label,
              legend, li, and link.
      
              * html/HTMLTextAreaElement.h: Removed unneeded definition of the readOnly
              function, since the one in HTMLFormElement does the same thing.
      
              * loader/ImageDocument.cpp:
              (WebCore::ImageDocumentElement::ImageDocumentElement):
              (WebCore::ImageDocumentElement::create):
              (WebCore::ImageDocument::createDocumentStructure):
              Added create functions. Made constructors and other members private.
      
              * page/DragController.cpp:
              (WebCore::DragController::concludeEditDrag): Use the non-virtual disabled
              function instead of the virtual isEnabledFormControl function, which just
              turns around and calls the disabled function.
      
              * rendering/MediaControlElements.cpp:
              (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement):
              (WebCore::MediaControlShadowRootElement::create):
              (WebCore::MediaControlElement::MediaControlElement):
              (WebCore::MediaControlElement::create):
              (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement):
              (WebCore::MediaControlTimelineContainerElement::create):
              (WebCore::MediaControlTimelineContainerElement::rendererIsNeeded):
              (WebCore::MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement):
              (WebCore::MediaControlVolumeSliderContainerElement::create):
              (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement):
              (WebCore::MediaControlStatusDisplayElement::create):
              (WebCore::MediaControlStatusDisplayElement::update):
              (WebCore::MediaControlStatusDisplayElement::rendererIsNeeded):
              (WebCore::MediaControlInputElement::MediaControlInputElement):
              (WebCore::MediaControlInputElement::styleForElement):
              (WebCore::MediaControlInputElement::rendererIsNeeded):
              (WebCore::MediaControlInputElement::attach):
              (WebCore::MediaControlInputElement::updateStyle):
              (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement):
              (WebCore::MediaControlMuteButtonElement::create):
              (WebCore::MediaControlMuteButtonElement::defaultEventHandler):
              (WebCore::MediaControlMuteButtonElement::updateDisplayType):
              (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement):
              (WebCore::MediaControlPlayButtonElement::create):
              (WebCore::MediaControlPlayButtonElement::defaultEventHandler):
              (WebCore::MediaControlPlayButtonElement::updateDisplayType):
              (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement):
              (WebCore::MediaControlSeekButtonElement::create):
              (WebCore::MediaControlSeekButtonElement::isForwardButton):
              (WebCore::MediaControlSeekButtonElement::defaultEventHandler):
              (WebCore::MediaControlSeekButtonElement::seekTimerFired):
              (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement):
              (WebCore::MediaControlRewindButtonElement::create):
              (WebCore::MediaControlRewindButtonElement::defaultEventHandler):
              (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement):
              (WebCore::MediaControlReturnToRealtimeButtonElement::create):
              (WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler):
              (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
              (WebCore::MediaControlToggleClosedCaptionsButtonElement::create):
              (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
              (WebCore::MediaControlToggleClosedCaptionsButtonElement::updateDisplayType):
              (WebCore::MediaControlTimelineElement::MediaControlTimelineElement):
              (WebCore::MediaControlTimelineElement::create):
              (WebCore::MediaControlTimelineElement::defaultEventHandler):
              (WebCore::MediaControlTimelineElement::update):
              (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement):
              (WebCore::MediaControlVolumeSliderElement::create):
              (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
              (WebCore::MediaControlVolumeSliderElement::update):
              (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement):
              (WebCore::MediaControlFullscreenButtonElement::create):
              (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
              (WebCore::MediaControlTimeDisplayElement::MediaControlTimeDisplayElement):
              (WebCore::MediaControlTimeDisplayElement::create):
              * rendering/MediaControlElements.h:
              Added create functions. Made constructors and other members private.
      
              * rendering/RenderFileUploadControl.cpp:
              (WebCore::ShadowInputElement::ShadowInputElement):
              (WebCore::ShadowInputElement::create):
              (WebCore::RenderFileUploadControl::updateFromElement):
              Added create functions. Made constructors and other members private.
      
              * rendering/RenderMedia.cpp:
              (WebCore::RenderMedia::createControlsShadowRoot):
              (WebCore::RenderMedia::createPanel):
              (WebCore::RenderMedia::createMuteButton):
              (WebCore::RenderMedia::createPlayButton):
              (WebCore::RenderMedia::createSeekBackButton):
              (WebCore::RenderMedia::createSeekForwardButton):
              (WebCore::RenderMedia::createRewindButton):
              (WebCore::RenderMedia::createReturnToRealtimeButton):
              (WebCore::RenderMedia::createToggleClosedCaptionsButton):
              (WebCore::RenderMedia::createStatusDisplay):
              (WebCore::RenderMedia::createTimelineContainer):
              (WebCore::RenderMedia::createTimeline):
              (WebCore::RenderMedia::createVolumeSliderContainer):
              (WebCore::RenderMedia::createVolumeSlider):
              (WebCore::RenderMedia::createCurrentTimeDisplay):
              (WebCore::RenderMedia::createTimeRemainingDisplay):
              (WebCore::RenderMedia::createFullscreenButton):
              Use create instead of new.
      
              * rendering/RenderProgress.cpp:
              (WebCore::ProgressValueElement::ProgressValueElement):
              (WebCore::ProgressValueElement::create):
              (WebCore::RenderProgress::updateValuePartState):
              * rendering/RenderSlider.cpp:
              (WebCore::SliderThumbElement::SliderThumbElement):
              (WebCore::SliderThumbElement::create):
              (WebCore::RenderSlider::updateFromElement):
              Added create functions. Made constructors and other members private.
      
              * rendering/TextControlInnerElements.cpp:
              (WebCore::TextControlInnerElement::TextControlInnerElement):
              (WebCore::TextControlInnerElement::create):
              (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
              (WebCore::TextControlInnerTextElement::create):
              (WebCore::TextControlInnerTextElement::defaultEventHandler):
              (WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):
              (WebCore::SearchFieldResultsButtonElement::create):
              (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
              (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
              (WebCore::SearchFieldCancelButtonElement::create):
              (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
              (WebCore::SpinButtonElement::SpinButtonElement):
              (WebCore::SpinButtonElement::create):
              (WebCore::SpinButtonElement::defaultEventHandler):
              * rendering/TextControlInnerElements.h:
              Added create functions. Made constructors and other members private.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60418 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1f643c79
  17. 25 May, 2010 1 commit
    • darin@apple.com's avatar
      2010-05-24 Darin Adler <darin@apple.com> · 06c001a9
      darin@apple.com authored
              Reviewed by Eric Seidel.
      
              Move view-related functions from Frame to FrameView
              https://bugs.webkit.org/show_bug.cgi?id=39366
      
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::setZoomLevel): Call setZoomLevel on FrameView.
      2010-05-24  Darin Adler  <darin@apple.com>
      
              Reviewed by Eric Seidel.
      
              Move view-related functions from Frame to FrameView
              https://bugs.webkit.org/show_bug.cgi?id=39366
      
              * Api/qwebframe.cpp:
              (QWebFrame::setTextSizeMultiplier): Call functions on FrameView.
              (QWebFrame::textSizeMultiplier): Ditto.
              (QWebFrame::setZoomFactor): Ditto.
              (QWebFrame::zoomFactor): Ditto.
              * Api/qwebpage.cpp:
              (QWebPage::setContentEditable): Removed call to empty function,
              removeEditingStyleFromBodyElement.
      2010-05-24  Darin Adler  <darin@apple.com>
      
              Reviewed by Eric Seidel.
      
              Move view-related functions from Frame to FrameView
              https://bugs.webkit.org/show_bug.cgi?id=39366
      
              * webkit/webkitwebview.cpp:
              (webkit_web_view_set_editable): Remove call to empty function
              removeEditngStyleFromBodyElement.
              (webkit_web_view_get_zoom_level): Call functions on FrameView.
              (webkit_web_view_apply_zoom_level): Ditto.
      2010-05-24  Darin Adler  <darin@apple.com>
      
              Reviewed by Eric Seidel.
      
              Move view-related functions from Frame to FrameView
              https://bugs.webkit.org/show_bug.cgi?id=39366
      
              * efl/ewk/ewk_frame.cpp:
              (ewk_frame_editable_set): Removed call to empty function,
              removeEditingStyleFromBodyElement.
              (ewk_frame_zoom_get): Call function on FrameView.
              (ewk_frame_zoom_set): Ditto.
              (ewk_frame_zoom_text_only_set): Ditto.
      2010-05-24  Darin Adler  <darin@apple.com>
      
              Reviewed by Eric Seidel.
      
              Move view-related functions from Frame to FrameView
              https://bugs.webkit.org/show_bug.cgi?id=39366
      
              * WebFrame.cpp:
              (WebFrame::setTextSizeMultiplier): Call function on FrameView.
              * WebView.cpp:
              (WebView::setZoomMultiplier): Ditto.
      2010-05-24  Darin Adler  <darin@apple.com>
      
              Reviewed by Eric Seidel.
      
              Move view-related functions from Frame to FrameView
              https://bugs.webkit.org/show_bug.cgi?id=39366
      
              * WebFrame.cpp:
              (wxWebFrame::CanIncreaseTextSize): Check FrameView is not null.
              (wxWebFrame::IncreaseTextSize): Call function on FrameView.
              (wxWebFrame::CanDecreaseTextSize): Ditto.
              (wxWebFrame::DecreaseTextSize): Ditto.
              (wxWebFrame::ResetTextSize): Ditto.
      2010-05-24  Darin Adler  <darin@apple.com>
      
              Reviewed by Eric Seidel.
      
              Move view-related functions from Frame to FrameView
              https://bugs.webkit.org/show_bug.cgi?id=39366
      
              * WebView/WebView.mm:
              (-[WebView _setZoomMultiplier:isTextOnly:]): Call function on FrameView.
              (-[WebView setEditable:]): Get rid of call to empty function,
              removeEditingStyleFromBodyElement.
      2010-05-24  Darin Adler  <darin@apple.com>
      
              Reviewed by Eric Seidel.
      
              Move view-related functions from Frame to FrameView
              https://bugs.webkit.org/show_bug.cgi?id=39366
      
              Refactoring only so adds no new tests.
      
              * WebCore.base.exp: Updated.
      
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::styleForDocument): Call zoom factor function
              on FrameView.
              (WebCore::CSSStyleSelector::applyProperty): Ditto.
              (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize): Ditto.
              * dom/Document.cpp:
              (WebCore::Document::elementFromPoint): Ditto.
              (WebCore::Document::caretRangeFromPoint): Ditto.
              * dom/MouseRelatedEvent.cpp:
              (WebCore::contentsX): Ditto.
              (WebCore::contentsY): Ditto.
              (WebCore::pageZoomFactor): Added helper function.
              (WebCore::MouseRelatedEvent::computePageLocation): Use helper.
              (WebCore::MouseRelatedEvent::receivedTarget): Ditto.
              * dom/Node.cpp:
              (WebCore::Node::dispatchMouseEvent): Call zoom factor function on FrameView.
              (WebCore::Node::dispatchWheelEvent): Ditto.
              * dom/Touch.cpp:
              (WebCore::contentsX): Call zoom factor function on FrameView.
              (WebCore::contentsY): Ditto.
              * html/HTMLBodyElement.cpp:
              (WebCore::adjustForZoom): Ditto.
              (WebCore::HTMLBodyElement::setScrollLeft): Ditto.
              (WebCore::HTMLBodyElement::setScrollTop): Ditto.
              * html/HTMLImageElement.cpp:
              (WebCore::HTMLImageElement::width): Ditto.
              (WebCore::HTMLImageElement::height): Ditto.
              * loader/ImageDocument.cpp:
              (WebCore::pageZoomFactor): Added helper function.
              (WebCore::ImageTokenizer::finish): Use helper function
              (WebCore::ImageDocument::scale): Ditto.
              (WebCore::ImageDocument::resizeImageToFit): Ditto.
              (WebCore::ImageDocument::imageChanged): Ditto.
              (WebCore::ImageDocument::restoreImageSize): Ditto.
              (WebCore::ImageDocument::imageFitsInWindow): Ditto.
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::innerHeight): Ditto.
              (WebCore::DOMWindow::innerWidth): Ditto.
              (WebCore::DOMWindow::scrollX): Ditto.
              (WebCore::DOMWindow::scrollY): Ditto.
              (WebCore::DOMWindow::scrollTo): Ditto.
              * page/DragController.cpp:
              (WebCore::elementUnderMouse): Ditto.
      
              * page/Frame.cpp:
              (WebCore::Frame::Frame): Removed code to initialize m_zoomFactor.
              * page/Frame.h: Moved functions to FrameView. Moved all #if to the left
              margin to make the style consistent. Removed empty function
              removeEditingStyleFromBodyElement.
      
              * page/FrameView.cpp:
              (WebCore::parentZoomFactor): Added helper function for constructor.
              (WebCore::FrameView::FrameView): Added initialization of m_zoomFactor.
              (WebCore::FrameView::shouldApplyTextZoom): Moved this here from Frame.
              (WebCore::FrameView::shouldApplyPageZoom): Ditto.
              (WebCore::FrameView::setZoomFactor): Ditto.
      
              * page/FrameView.h: Added members moved here from Frame.
      
              * rendering/RenderView.cpp:
              (WebCore::RenderView::zoomFactor): Call FrameView instead of Frame.
              * svg/SVGSVGElement.cpp:
              (WebCore::SVGSVGElement::currentScale): Ditto.
              (WebCore::SVGSVGElement::setCurrentScale): Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      06c001a9
  18. 04 May, 2010 1 commit
    • levin@chromium.org's avatar
      REGRESSION(r54368): Text drag-and-drop from input/textarea doesn't work · a14b4e15
      levin@chromium.org authored
      if the text is like a URL
      https://bugs.webkit.org/show_bug.cgi?id=38374
      
      Patch by Kent Tamura <tkent@chromium.org> on 2010-05-04
      Reviewed by David Levin (and unofficially by Enrica Casucci).
      
      WebCore:
      
      Since r54368, documentFragmentFromDragData() creates an <a> element
      with no anchor text for URL-like text dragged from input/textarea
      element. If such text is dropped to input/textarea element, the text
      is not inserted.
      To fix this problem, use the original text or the URL as an anchor
      text.
      
      Test: editing/pasteboard/drag-drop-url-text.html
      
      * page/DragController.cpp:
      (WebCore::documentFragmentFromDragData):
      
      LayoutTests:
      
      * editing/pasteboard/drag-drop-url-text-expected.txt: Added.
      * editing/pasteboard/drag-drop-url-text.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a14b4e15
  19. 30 Apr, 2010 1 commit
    • ddkilzer@apple.com's avatar
      WebCore: Convert m_documentUnderMouse, m_dragInitiator to RefPtr. · 35884699
      ddkilzer@apple.com authored
      Eliminated unused m_dragInitiator accessor to prevent dereferencing.
      https://bugs.webkit.org/show_bug.cgi?id=37618
      
      Patch by Abhishek Arya <inferno@chromium.org> on 2010-04-30
      Reviewed by David Kilzer.
      
      Test: editing/pasteboard/drag-drop-iframe-refresh-crash.html
      
      * page/DragController.cpp:
      (WebCore::DragController::tryDocumentDrag):
      (WebCore::DragController::concludeEditDrag):
      * page/DragController.h:
      (WebCore::DragController::draggingImageURL):
      (WebCore::DragController::documentUnderMouse):
      
      LayoutTests: Tests for a crash when an image drag-drop operation happens inside a continuously refreshing iframe.
      https://bugs.webkit.org/show_bug.cgi?id=37618
      
      Patch by Abhishek Arya <inferno@chromium.org> on 2010-04-30
      Reviewed by David Kilzer.
      
      * editing/pasteboard/drag-drop-iframe-refresh-crash-expected.txt: Added.
      * editing/pasteboard/drag-drop-iframe-refresh-crash.html: Added.
      * editing/resources/drag-drop.html: Added.
      * platform/qt/Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58616 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      35884699
  20. 29 Apr, 2010 1 commit
  21. 28 Apr, 2010 1 commit
    • eric@webkit.org's avatar
      2010-04-28 Abhishek Arya <inferno@chromium.org> · 76ab29f0
      eric@webkit.org authored
              Reviewed by Eric Seidel.
      
              Tests for a crash when an image drag-drop operation happens inside a continuously refreshing iframe.
              https://bugs.webkit.org/show_bug.cgi?id=37618
      
              * editing/pasteboard/drag-drop-iframe-refresh-crash-expected.txt: Added.
              * editing/pasteboard/drag-drop-iframe-refresh-crash.html: Added.
              * editing/resources/drag-drop.html: Added.
      2010-04-28  Abhishek Arya  <inferno@chromium.org>
      
              Reviewed by Eric Seidel.
      
              Convert m_documentUnderMouse, m_dragInitiator to RefPtr.
              Eliminated unused m_dragInitiator accessor to prevent dereferencing.
              https://bugs.webkit.org/show_bug.cgi?id=37618
      
              Test: editing/pasteboard/drag-drop-iframe-refresh-crash.html
      
              * page/DragController.cpp:
              (WebCore::DragController::tryDocumentDrag):
              (WebCore::DragController::concludeEditDrag):
              * page/DragController.h:
              (WebCore::DragController::draggingImageURL):
              (WebCore::DragController::documentUnderMouse):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76ab29f0
  22. 18 Mar, 2010 1 commit
    • ojan@chromium.org's avatar
      2010-03-12 Ojan Vafai <ojan@chromium.org> · 406daf8b
      ojan@chromium.org authored
              Reviewed by David Levin.
      
              smartdelete should only occur after double-click
              https://bugs.webkit.org/show_bug.cgi?id=35314
      
              * editing/deleting/non-smart-delete.html:
              * editing/pasteboard/drag-drop-modifies-page.html:
              * editing/pasteboard/page-zoom-expected.txt:
              Space is removed because we used to incorrectly smartpaste here.
              New behavior matches NSTextView.
              * editing/style/apply-through-end-of-document-expected.txt:
              The change here is that selectall + smartpaste doesn't put a BR,
              but selectall + normal-paste does. Not sure if that's a bug or not,
              but it's not a side effect of this change.
              * editing/style/style-boundary-005.html:
              * platform/mac/editing/deleting/non-smart-delete-expected.checksum:
              * platform/mac/editing/deleting/non-smart-delete-expected.png:
              * platform/mac/editing/deleting/non-smart-delete-expected.txt:
              * platform/mac/editing/execCommand/paste-1-expected.txt:
              * platform/mac/editing/execCommand/paste-2-expected.txt:
              * platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.checksum:
              * platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.png:
              * platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.txt:
      
              * platform/mac/editing/selection/expanding-selections-expected.txt:
              * platform/mac/editing/selection/expanding-selections2-expected.txt:
              * platform/mac/editing/selection/triple-click-in-pre-expected.txt:
              The above three results change because granularity is no longer part of the seleciton,
              so changes in granularity don't fire selection change notifications.
      
              * platform/mac/editing/style/style-boundary-005-expected.checksum:
              * platform/mac/editing/style/style-boundary-005-expected.png:
              * platform/mac/editing/style/style-boundary-005-expected.txt:
      2010-03-12  Ojan Vafai  <ojan@chromium.org>
      
              Reviewed by David Levin.
      
              smartdelete should only occur after double-click
              https://bugs.webkit.org/show_bug.cgi?id=35314
      
              1. Consolidate all notions of selection-granularity into SelectionController.
              2. Now only mouse-based selections store a selection-granularity. This matches NSTextView.
      
              New tests were added in http://trac.webkit.org/changeset/55913.
      
              * WebCore.base.exp:
              * editing/MoveSelectionCommand.cpp:
              (WebCore::MoveSelectionCommand::MoveSelectionCommand):
              (WebCore::MoveSelectionCommand::doApply):
              * editing/MoveSelectionCommand.h:
              (WebCore::MoveSelectionCommand::create):
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::SelectionController):
              (WebCore::SelectionController::setSelection):
              (WebCore::SelectionController::modify):
              (WebCore::SelectionController::clear):
              * editing/SelectionController.h:
              (WebCore::SelectionController::setSelection):
              (WebCore::SelectionController::granularity):
              * editing/VisibleSelection.cpp:
              (WebCore::VisibleSelection::VisibleSelection):
              (WebCore::VisibleSelection::expandUsingGranularity):
              (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
              (WebCore::VisibleSelection::validate):
              * editing/VisibleSelection.h:
              (WebCore::operator==):
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::clear):
              * page/DOMSelection.cpp:
              (WebCore::DOMSelection::extend):
              * page/DragController.cpp:
              (WebCore::DragController::concludeEditDrag):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::selectClosestWordFromMouseEvent):
              (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
              (WebCore::EventHandler::handleMousePressEventTripleClick):
              (WebCore::EventHandler::handleMousePressEventSingleClick):
              (WebCore::EventHandler::updateSelectionForMouseDrag):
              * page/Frame.cpp:
              (WebCore::Frame::Frame):
              (WebCore::Frame::selectionGranularity):
              * page/Frame.h:
              * rendering/RenderTextControl.cpp:
              (WebCore::RenderTextControl::setSelectionRange):
      2010-03-12  Ojan Vafai  <ojan@chromium.org>
      
              Reviewed by David Levin.
      
              smartdelete should only occur after double-click
              https://bugs.webkit.org/show_bug.cgi?id=35314
      
              * src/WebFrameImpl.cpp:
              (WebKit::WebFrameImpl::selectWordAroundPosition):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      406daf8b
  23. 15 Mar, 2010 1 commit
    • oliver@apple.com's avatar
      2010-03-14 Oliver Hunt <oliver@apple.com> · 6183bf93
      oliver@apple.com authored
              Reviewed by Darin Adler.
      
              REGRESSION(r53287): drop event is not fired if dataTransfer.dropEffect is not explicitly set
              https://bugs.webkit.org/show_bug.cgi?id=36095
      
              Correct this test to cover the somewhat bizarre "correct" handling
              of undefined dropEffect
      
              * fast/events/drag-and-drop-expected.txt:
              * fast/events/drag-and-drop.html:
      2010-03-14  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Darin Adler.
      
              REGRESSION(r53287): drop event is not fired if dataTransfer.dropEffect is not explicitly set
              https://bugs.webkit.org/show_bug.cgi?id=36095
      
              The issue here is that while dropEffect is meant to be initialized
              to "none", the behaviour of the drag is differs between dragEffect
              not being set and dragEffect being explicitly set to "none"
      
              This patch corrects this behaviour by making Clipboard distinguish
              between the initial "none" value of dropEffect and an explicit "none".
              This alone is insufficient for correct behaviour, we also need to
              resurrect the removed defaultOperationForDrag function, but we now
              use the function only when dragEffect is uninitialized.  There are a
              few tweaks to the behaviour of the defaultOperationForDrag as well
              to ensure exactly the same set of outcomes for all cases that we
              may hit it.
      
              * dom/Clipboard.cpp:
              (WebCore::Clipboard::Clipboard):
              (WebCore::dragOpFromIEOp):
              (WebCore::Clipboard::destinationOperation):
              * dom/Clipboard.h:
              (WebCore::Clipboard::dropEffect):
              (WebCore::Clipboard::dropEffectIsUninitialized):
              * page/DragController.cpp:
              (WebCore::defaultOperationForDrag):
              (WebCore::DragController::tryDHTMLDrag):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6183bf93
  24. 14 Mar, 2010 1 commit
  25. 27 Feb, 2010 1 commit
    • mitz@apple.com's avatar
      <rdar://problem/7696607> Links do not respect -webkit-user-drag: none · 29bb5006
      mitz@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=35475
      
      Reviewed by Maciej Stachowiak.
      
      WebCore: 
      
      Test: fast/css/user-drag-none.html
      
      * page/DragController.cpp:
      (WebCore::DragController::mayStartDragAtEventLocation): Added a node
      parameter. The image drag check is done against the node, rather than
      than against the hit test result. This prevents a non-draggable image
      with an auto-draggable ancestor from being dragged alone. The link drag
      check now ignores links that are -webkit-user-drag: none.
      * page/DragController.h:
      * page/EventHandler.cpp:
      (WebCore::EventHandler::shouldDragAutoNode): Pass the current node
      to mayStartDragAtEventLocation().
      
      LayoutTests: 
      
      * fast/css/user-drag-none-expected.txt: Added.
      * fast/css/user-drag-none.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      29bb5006
  26. 19 Feb, 2010 1 commit
    • pkasting@chromium.org's avatar
      WebCore: Make Pasteboard::writeImage() safe against NULL cachedImages, and clean · 2cadd7b2
      pkasting@chromium.org authored
      up some code.
      https://bugs.webkit.org/show_bug.cgi?id=35136
      
      Reviewed by Darin Fisher.
      
      * loader/ImageLoader.cpp:
      (WebCore::ImageLoader::updateRenderer): Shorten some code.
      * page/DragController.cpp:
      (WebCore::getImage): Shorten some code.
      * platform/chromium/PasteboardChromium.cpp:
      (WebCore::Pasteboard::writeImage): NULL-check cachedImage().
      * platform/gtk/PasteboardGtk.cpp:
      (WebCore::Pasteboard::writeImage): NULL-check cachedImage().
      * platform/mac/PasteboardMac.mm:
      (WebCore::Pasteboard::writeImage): NULL-check cachedImage().
      * platform/qt/PasteboardQt.cpp:
      (WebCore::Pasteboard::writeImage): NULL-check cachedImage().
      * platform/win/PasteboardWin.cpp:
      (WebCore::Pasteboard::writeImage): NULL-check cachedImage().
      
      WebKit/chromium: Add an isImageBlocked bool to the WebContextMenuData struct.
      https://bugs.webkit.org/show_bug.cgi?id=35136
              
      Reviewed by Darin Fisher.
      
      This lets us properly enable/disable the "Copy Image" context menu entry
      (and, in the future, maybe add a "Load Image" function).
      
      * public/WebContextMenuData.h:
      * src/ContextMenuClientImpl.cpp:
      (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2cadd7b2
  27. 04 Feb, 2010 1 commit
    • enrica@apple.com's avatar
      REGRESSION: Dragging plain text into a styled text region does not acquire the correct style info. · 5b42a264
      enrica@apple.com authored
      <rdar://problem/7595685>
      https://bugs.webkit.org/show_bug.cgi?id=34609
      
      Reviewed by Oliver Hunt.
      
      WebCore: 
      
      Test: editing/pasteboard/drop-inputtext-acquires-style.html
      
      The dragging code did not distinguish the case of dragging the content of an input control
      as a special case. The markup placed in the pasteboard included the style information.
      I've modified the Clipboard class interface adding a new method writePlainText to match the
      behavior of the copy and cut commands and modified the drag code to detect the special case.
      I've modified all the platform specific implementations of the Clipboard class.
              
      * dom/Clipboard.h: Added writePlainText pure virtual function.
      * editing/Editor.cpp:
      (WebCore::Editor::cut): Renamed nodeIsTextFormControl to isNodeInTextFormControl.
      (WebCore::Editor::copy): Renamed nodeIsTextFormControl to isNodeInTextFormControl.
      * editing/htmlediting.cpp:
      (WebCore::isNodeInTextFormControl): Added, after removing the implementation with the old name
      in Editor.cpp
      * editing/htmlediting.h:
      * page/DragController.cpp:
      (WebCore::DragController::startDrag):
      * platform/Pasteboard.h:
      * platform/android/ClipboardAndroid.cpp:
      (WebCore::ClipboardAndroid::writePlainText): Added.
      * platform/android/ClipboardAndroid.h:
      * platform/chromium/ClipboardChromium.cpp:
      (WebCore::ClipboardChromium::writePlainText): Added.
      * platform/chromium/ClipboardChromium.h:
      * platform/gtk/ClipboardGtk.cpp:
      (WebCore::ClipboardGtk::writePlainText): Added.
      * platform/gtk/ClipboardGtk.h:
      * platform/haiku/ClipboardHaiku.cpp:
      (WebCore::ClipboardHaiku::writePlainText): Added.
      * platform/haiku/ClipboardHaiku.h:
      * platform/mac/ClipboardMac.h:
      * platform/mac/ClipboardMac.mm:
      (WebCore::ClipboardMac::writePlainText): Added.
      * platform/mac/PasteboardMac.mm:
      (WebCore::Pasteboard::writePlainText): Added helper function.
      * platform/qt/ClipboardQt.cpp:
      (WebCore::ClipboardQt::writePlainText): Added.
      * platform/qt/ClipboardQt.h:
      * platform/win/ClipboardWin.cpp:
      (WebCore::ClipboardWin::writePlainText): Added.
      * platform/win/ClipboardWin.h:
      
      LayoutTests: 
      
      * editing/pasteboard/drop-inputtext-acquires-style-expected.txt: Added.
      * editing/pasteboard/drop-inputtext-acquires-style.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54368 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5b42a264
  28. 15 Jan, 2010 1 commit
    • bweinstein@apple.com's avatar
      Drag and Drop source/destination code needs cleanup. · 057730b0
      bweinstein@apple.com authored
      <https://bugs.webkit.org/show_bug.cgi?id=33691>.
              
      Reviewed by Adam Roben.
      
      WebCore: 
      
      Cleaned up some Drag and Drop code that deals with getting
      source and destination operations, and added some ASSERTS to make
      sure we don't get in bad states.
      
      * dom/Clipboard.cpp:
      (WebCore::Clipboard::sourceOperation): Make this return the operation itself.
      (WebCore::Clipboard::destinationOperation): Ditto.
      (WebCore::Clipboard::setSourceOperation): Add an assert to make sure we're valud.
      (WebCore::Clipboard::setDestinationOperation): Ditto.
      * dom/Clipboard.h:
      * page/DragController.cpp:
      (WebCore::DragController::tryDHTMLDrag):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::handleDrag):
      
      WebKit/chromium: 
      
      Update to new way of calling sourceOperation.
      
      * src/DragClientImpl.cpp:
      (WebKit::DragClientImpl::startDrag):
      
      WebKit/qt: 
      
      Update to new way of calling sourceOperation.
      
      * WebCoreSupport/DragClientQt.cpp:
      (WebCore::DragClientQt::startDrag):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53296 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      057730b0
  29. 08 Oct, 2009 1 commit
  30. 18 Sep, 2009 2 commits
  31. 16 Sep, 2009 1 commit
    • bolsinga@apple.com's avatar
      Add ENABLE(DRAG_SUPPORT) · 5db11076
      bolsinga@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=29233
      
      Reviewed by David Kilzer.
      
      JavaScriptCore:
      
      * wtf/Platform.h:
      
      WebCore:
      
      No new tests. (No change in default behavior.)
      
      * DerivedSources.make: Use new WebCore.DragSupport.exp file if ENABLE_DRAG_SUPPORT.
      * WebCore.base.exp: Move Drag Support only exports to WebCore.DragSupport.exp.
      * WebCore.xcodeproj/project.pbxproj: Add WebCore.DragSupport.exp.
      * dom/Clipboard.h: Use ENABLE(DRAG_SUPPORT) where applicable.
      * loader/EmptyClients.h: Ditto.
      * page/DragController.cpp: Wrap entire file in ENABLE(DRAG_SUPPORT).
      * page/EventHandler.cpp: Use ENABLE(DRAG_SUPPORT) where applicable.
      (WebCore::EventHandler::EventHandler):
      (WebCore::EventHandler::clear):
      (WebCore::EventHandler::handleMousePressEvent):
      (WebCore::EventHandler::handleMouseReleaseEvent):
      (WebCore::EventHandler::handleMouseMoveEvent):
      * page/EventHandler.h: Ditto.
      * page/Page.cpp: Ditto.
      (WebCore::Page::Page):
      * page/Page.h: Ditto.
      * page/mac/DragControllerMac.mm: Wrap entire file in ENABLE(DRAG_SUPPORT).
      * page/mac/EventHandlerMac.mm: Use ENABLE(DRAG_SUPPORT) where applicable.
      (WebCore::EventHandler::passSubframeEventToSubframe):
      * platform/DragData.cpp: Wrap entire file in ENABLE(DRAG_SUPPORT).
      * platform/DragImage.cpp: Wrap entire file in ENABLE(DRAG_SUPPORT).
      * platform/mac/ClipboardMac.h: Use ENABLE(DRAG_SUPPORT) where applicable.
      * platform/mac/ClipboardMac.mm: Ditto.
      * platform/mac/DragDataMac.mm: Wrap entire file in ENABLE(DRAG_SUPPORT).
      * platform/mac/DragImageMac.mm: Wrap entire file in ENABLE(DRAG_SUPPORT).
      * rendering/RenderLayer.cpp: Use ENABLE(DRAG_SUPPORT) where applicable.
      (WebCore::RenderLayer::autoscroll):
      * rendering/RenderObject.cpp: Ditto.
      * rendering/RenderObject.h: Ditto.
      * svg/graphics/SVGImage.cpp: Ditto.
      (WebCore::SVGImage::dataChanged):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48426 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5db11076
  32. 11 Sep, 2009 1 commit
    • eric@webkit.org's avatar
      2009-09-11 Eric Seidel <eric@webkit.org> · 58165d43
      eric@webkit.org authored
              No review, rolling out r48229.
              http://trac.webkit.org/changeset/48229
      
              * fast/events/drag-dropeffect-expected.txt: Removed.
              * fast/events/drag-dropeffect.html: Removed.
      2009-09-11  Eric Seidel  <eric@webkit.org>
      
              No review, rolling out r48229.
              http://trac.webkit.org/changeset/48229
      
              * WebCore.base.exp:
              * dom/Clipboard.cpp:
              (WebCore::Clipboard::Clipboard):
              (WebCore::Clipboard::sourceOperation):
              * page/DragController.cpp:
              (WebCore::DragController::DragController):
              (WebCore::DragController::dragExited):
              (WebCore::DragController::performDrag):
              (WebCore::DragController::dragEnteredOrUpdated):
              (WebCore::DragController::tryDHTMLDrag):
              (WebCore::DragController::startDrag):
              * page/DragController.h:
              * page/EventHandler.cpp:
              (WebCore::EventHandler::updateDragAndDrop):
              (WebCore::EventHandler::dragSourceMovedTo):
              (WebCore::EventHandler::handleDrag):
              * page/EventHandler.h:
      2009-09-11  Eric Seidel  <eric@webkit.org>
      
              No review, rolling out r48229.
              http://trac.webkit.org/changeset/48229
      
              * WebView/WebFrame.mm:
              (-[WebFrame _dragSourceMovedTo:]):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      58165d43
  33. 09 Sep, 2009 1 commit
    • eric@webkit.org's avatar
      2009-09-09 Jens Alfke <snej@chromium.org> · 99e6cded
      eric@webkit.org authored
              Reviewed by Eric Seidel.
      
              Initialize DataTransfer's effectAllowed and dropEffect properties correctly
              according to HTML5 spec (sec. 7.9.2-7.9.3).
              https://bugs.webkit.org/show_bug.cgi?id=26700
      
              * fast/events/drag-dropeffect-expected.txt: Added.
              * fast/events/drag-dropeffect.html: Added.
      2009-09-09  Jens Alfke  <snej@chromium.org>
      
              Reviewed by Eric Seidel.
      
              Initialize DataTransfer's effectAllowed and dropEffect properties correctly
              according to HTML5 spec (sec. 7.9.2-7.9.3).
              https://bugs.webkit.org/show_bug.cgi?id=26700
              - At the start of a drag operation, the value of effectAllowed should be
                the string "uninitialized".
              - At end of dragstart handler, if effectAllowed hasn't been set yet, it
                should be set to "copy".
              - on dragenter and dragover event, dropEffect should be initialized to a
                default value based on the value of effectAllowed.
              - at end of dragenter and dragover the dropEffect should be set to "none"
                if the value set by the handler doesn't match the effectAllowed.
              - on dragleave event, dropEffect should be "none".
              - on drop event, dropEffect should be the previously negotiated value.
      
              Test: fast/events/drag-dropeffect.html
      
              * WebCore.base.exp:
                  Added a parameter to EventHandler::dragSourceMovedTo.
              * dom/Clipboard.cpp:
              (WebCore::Clipboard::Clipboard):
                  Initialize m_effectAllowed to "uninitialized".
              (WebCore::Clipboard::sourceOperation):
                  Treat "uninitialized" as meaning no value has been set.
              * page/DragController.cpp:
              (WebCore::DragController::DragController):
                  Initialize new member m_destinationDragOperation.
              (WebCore::DragController::dragExited):
                  Set m_destinationDragOperation to none on dragExit.
              (WebCore::DragController::performDrag):
                  Set m_destinationDragOperation to current dropEffect.
              (WebCore::DragController::dragEnteredOrUpdated):
                  Make sure to clear the operation if drag source doesn't allow it.
              (WebCore::DragController::tryDHTMLDrag):
                  Set a default value for the dst drag op before sending dragEnter/Over.
              (WebCore::DragController::startDrag):
                  Clear m_destinationDragOperation at start of drag.
              * page/DragController.h:
              (WebCore::DragController::destinationDragOperation):
                  Added new member m_destinationDragOperation, and its public getter.
              * page/EventHandler.cpp:
              (WebCore::EventHandler::updateDragAndDrop):
                  dropEffect should be 'none' during dropleave handler, per spec.
              (WebCore::EventHandler::dragSourceMovedTo):
                  Added DragOperation parameter, so the handler sees the current dropEffect.
              (WebCore::EventHandler::handleDrag):
                  Assume DragOperationEvery for non-DHTML drags.
              * page/EventHandler.h:
                  Added DragOperation parameter to dragSourceMovedTo().
      2009-09-09  Jens Alfke  <snej@chromium.org>
      
              Reviewed by Eric Seidel.
      
              Initialize DataTransfer's effectAllowed and dropEffect properties correctly
              according to HTML5 spec (sec. 7.9.2-7.9.3).
              https://bugs.webkit.org/show_bug.cgi?id=26700
      
              * WebView/WebFrame.mm:
              (-[WebFrame _dragSourceMovedTo:]):
                  Pass current drag operation (if known) to EventHandler::dragSourceMovedTo().
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      99e6cded
  34. 23 Aug, 2009 1 commit
    • darin@apple.com's avatar
      Make DOM classes start with a reference count of 1, like all other RefCounted · cf9dd0fa
      darin@apple.com authored
              
      Patch by Darin Adler <darin@apple.com> on 2009-08-22
      Reviewed by Oliver Hunt.
      
      Next step: Element, HTMLElement, HTMLAnchorElement, HTMLAppletElement,
      HTMLAreaElement, HTMLEmbedElement, HTMLFrameElement, HTMLIFrameElement,
      HTMLObjectElement, HTMLPlugInElement, HTMLPlugInImageElement.
      
      * DerivedSources.make: Fix error seen every time we build by escaping the $
      in the build rule, since you have to use $$ for that in make.
      
      * WebCore.base.exp: Updated.
      
      * bindings/objc/DOM.mm:
      Added now-needed include of SVGNames.h.
      
      * dom/Document.cpp: Added now-needed include of SVGNames.h.
      (WebCore::Document::createElement): Use create instead of new.
      
      * dom/Element.cpp:
      (WebCore::Element::Element): Added ConstructionType argument so the caller
      can determine whether this starts with a reference count of either 0 or 1.
      Later we will remove this again once they are all 1.
      (WebCore::Element::create): Added.
      
      * dom/Element.h: Added create and made constructor protected.
      
      * dom/StyledElement.cpp:
      (WebCore::StyledElement::StyledElement): Added ConstructionType argument.
      * dom/StyledElement.h: Made many functions protected or private, including
      the constructor.
      
      * dom/make_names.pl: Use create to create the base elements HTMLElement,
      SVGElement, and WMLElement.
      
      * editing/CreateLinkCommand.cpp:
      (WebCore::CreateLinkCommand::doApply): Use create instead of new.
      * editing/UnlinkCommand.cpp:
      (WebCore::UnlinkCommand::doApply): Ditto.
      
      * html/HTMLAnchorElement.cpp:
      (WebCore::HTMLAnchorElement::create): Added.
      * html/HTMLAnchorElement.h: Made constructor protected and added create.
      Also made m_rootEditableElementForSelectionOnMouseDown a RefPtr.
      
      * html/HTMLAppletElement.cpp:
      (WebCore::HTMLAppletElement::create): Added.
      * html/HTMLAppletElement.h: Made constructor private and added create.
      
      * html/HTMLAreaElement.cpp:
      (WebCore::HTMLAreaElement::create): Added.
      * html/HTMLAreaElement.h: Made constructor private and added create.
      
      * html/HTMLElement.cpp:
      (WebCore::HTMLElement::create): Added.
      * html/HTMLElement.h: Made constructor protected and added create.
      Made other functions protected and private. Also added inline
      definition of constructor.
      
      * html/HTMLEmbedElement.cpp:
      (WebCore::HTMLEmbedElement::create): Added.
      * html/HTMLEmbedElement.h: Made constructor private and added create.
      Made other functions private.
      
      * html/HTMLFrameElement.cpp:
      (WebCore::HTMLFrameElement::create): Added.
      (WebCore::HTMLFrameElement::parseMappedAttribute):
      * html/HTMLFrameElement.h: Made constructor private and added create.
      Made other functions private.
      
      * html/HTMLFrameElementBase.h: Made functions protected and private.
      
      * html/HTMLFrameOwnerElement.cpp:
      (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement): Pass
      CreateElement so reference count starts at 1.
      
      * html/HTMLFrameOwnerElement.h: Made functions protected and private.
      
      * html/HTMLIFrameElement.cpp:
      (WebCore::HTMLIFrameElement::create): Added.
      * html/HTMLIFrameElement.h: Made constructor private and added create.
      Made other functions private.
      
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::create): Added.
      (WebCore::HTMLObjectElement::containsJavaApplet): Changed while loop
      into a for loop and tweaked formatting.
      
      * html/HTMLObjectElement.h: Made constructor private and added create.
      Made other functions private.
      
      * html/HTMLPlugInElement.h: Made constructor protected.
      Made other functions protected and private.
      
      * html/HTMLPlugInImageElement.h: Made constructor and another function
      protected.
      
      * html/HTMLTagNames.in: Removed createWithNew from all classes that
      now have create functions. Moved conditional noscript to a separate
      paragraph.
      
      * html/HTMLViewSourceDocument.cpp:
      (WebCore::HTMLViewSourceDocument::addSpanWithClassName): Use create.
      (WebCore::HTMLViewSourceDocument::addLink): Ditto.
      * page/DragController.cpp:
      (WebCore::documentFragmentFromDragData): Ditto.
      
      * svg/SVGElement.cpp:
      (WebCore::SVGElement::SVGElement): Pass CreateElementZeroRefCount
      so reference count still starts at 0. Will change this class later.
      (WebCore::SVGElement::create): Added.
      * svg/SVGElement.h: Added create, made constructor protected, and
      made other functions protected and private. Removed unneeded
      SVGNames.h include.
      
      * svg/SVGExternalResourcesRequired.h: Added now-needed SVGNames.h
      include.
      
      * svg/SVGStopElement.h: Added now-needed SVGNames.h include.
      Made functions private.
      
      * wml/WMLElement.cpp:
      (WebCore::WMLElement::WMLElement): Pass CreateElementZeroRefCount
      so reference count still starts at 0. Will change this class later.
      (WebCore::WMLElement::create): Added.
      * wml/WMLElement.h: Added create and made constructor protected.
      
      * wml/WMLTagNames.in: Removed createWithNew from WMLElement.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cf9dd0fa
  35. 05 Aug, 2009 2 commits
    • darin@apple.com's avatar
      2009-08-05 Darin Adler <darin@apple.com> · b6cb2561
      darin@apple.com authored
              Reviewed by David Levin.
      
              Use checked casts for render tree
              https://bugs.webkit.org/show_bug.cgi?id=23522
      
              Last patch. Makes all the casts of RenderObject use checked
              casts instead of using static_cast directly.
      
              * accessibility/AccessibilityListBox.cpp:
              (WebCore::AccessibilityListBox::visibleChildren):
              (WebCore::AccessibilityListBox::doAccessibilityHitTest):
              * accessibility/AccessibilityListBoxOption.cpp:
              (WebCore::AccessibilityListBoxOption::elementRect):
              * accessibility/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::textUnderElement):
              (WebCore::AccessibilityRenderObject::stringValue):
              (WebCore::AccessibilityRenderObject::titleUIElement):
              (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
              * accessibility/AccessibilitySlider.cpp:
              (WebCore::AccessibilitySliderThumb::elementRect):
              * dom/InputElement.cpp:
              (WebCore::InputElement::updatePlaceholderVisibility):
              * dom/SelectElement.cpp:
              (WebCore::SelectElement::scrollToSelection):
              (WebCore::SelectElement::recalcStyle):
              (WebCore::SelectElement::setRecalcListItems):
              (WebCore::SelectElement::menuListDefaultEventHandler):
              (WebCore::SelectElement::listBoxDefaultEventHandler):
              * editing/BreakBlockquoteCommand.cpp:
              (WebCore::BreakBlockquoteCommand::doApply):
              * html/HTMLAppletElement.cpp:
              (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
              * html/HTMLCanvasElement.cpp:
              (WebCore::HTMLCanvasElement::reset):
              * html/HTMLEmbedElement.cpp:
              (WebCore::HTMLEmbedElement::updateWidget):
              * html/HTMLFrameElementBase.cpp:
              (WebCore::HTMLFrameElementBase::attach):
              * html/HTMLFrameSetElement.cpp:
              (WebCore::HTMLFrameSetElement::defaultEventHandler):
              * html/HTMLIFrameElement.cpp:
              (WebCore::HTMLIFrameElement::attach):
              * html/HTMLInputElement.cpp:
              (WebCore::HTMLInputElement::defaultEventHandler):
              (WebCore::HTMLInputElement::addSearchResult):
              (WebCore::HTMLInputElement::onSearch):
              * html/HTMLLIElement.cpp:
              (WebCore::HTMLLIElement::parseMappedAttribute):
              (WebCore::HTMLLIElement::attach):
              * html/HTMLMediaElement.cpp:
              (WebCore::HTMLMediaElement::setReadyState):
              (WebCore::HTMLMediaElement::mediaPlayerDurationChanged):
              (WebCore::HTMLMediaElement::mediaPlayerSizeChanged):
              (WebCore::HTMLMediaElement::mediaPlayerRenderingCanBeAccelerated):
              (WebCore::HTMLMediaElement::mediaPlayerGraphicsLayer):
              (WebCore::HTMLMediaElement::defaultEventHandler):
              (WebCore::HTMLMediaElement::finishParsingChildren):
              * html/HTMLOListElement.cpp:
              (WebCore::HTMLOListElement::parseMappedAttribute):
              * html/HTMLObjectElement.cpp:
              (WebCore::HTMLObjectElement::updateWidget):
              * html/HTMLTextAreaElement.cpp:
              (WebCore::HTMLTextAreaElement::defaultEventHandler):
              * page/DragController.cpp:
              (WebCore::DragController::concludeEditDrag):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::selectCursor):
              (WebCore::EventHandler::capsLockStateMayHaveChanged):
              * page/Frame.cpp:
              (WebCore::Frame::ownerRenderer):
              * page/FrameView.cpp:
              (WebCore::FrameView::detachCustomScrollbars):
              * page/wince/FrameWince.cpp:
              (WebCore::computePageRectsForFrame):
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::placeBoxesHorizontally):
              * rendering/MediaControlElements.cpp:
              (WebCore::MediaControlTimelineElement::defaultEventHandler):
              * rendering/RenderBlockLineLayout.cpp:
              (WebCore::RenderBlock::findNextLineBreak):
              * rendering/RenderCounter.cpp:
              (WebCore::planCounter):
              * rendering/RenderFrameSet.cpp:
              (WebCore::RenderFrameSet::computeEdgeInfo):
              (WebCore::RenderFrameSet::setIsResizing):
              * rendering/RenderLayerBacking.cpp:
              (WebCore::RenderLayerBacking::contentsBox):
              * rendering/RenderLayerCompositor.cpp:
              (WebCore::RenderLayerCompositor::updateBacking):
              (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
              * rendering/RenderListItem.cpp:
              (WebCore::previousListItem):
              (WebCore::RenderListItem::explicitValueChanged):
              * rendering/RenderObject.cpp:
              (WebCore::updateListMarkerNumbers):
              * rendering/RenderObjectChildList.cpp:
              (WebCore::updateListMarkerNumbers):
              (WebCore::invalidateCountersInContainer):
              * rendering/RenderScrollbarTheme.cpp:
              (WebCore::RenderScrollbarTheme::minimumThumbLength):
              (WebCore::RenderScrollbarTheme::backButtonRect):
              (WebCore::RenderScrollbarTheme::forwardButtonRect):
              (WebCore::RenderScrollbarTheme::trackRect):
              (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
              (WebCore::RenderScrollbarTheme::paintScrollbarBackground):
              (WebCore::RenderScrollbarTheme::paintTrackBackground):
              (WebCore::RenderScrollbarTheme::paintTrackPiece):
              (WebCore::RenderScrollbarTheme::paintButton):
              (WebCore::RenderScrollbarTheme::paintThumb):
              * rendering/RenderSlider.cpp:
              (WebCore::SliderThumbElement::defaultEventHandler):
              * rendering/RenderThemeChromiumMac.mm:
              (WebCore::RenderThemeChromiumMac::paintSliderThumb):
              (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
              * rendering/RenderThemeChromiumWin.cpp:
              (WebCore::RenderThemeChromiumWin::determineSliderThumbState):
              * rendering/RenderThemeMac.mm:
              (WebCore::RenderThemeMac::paintSliderThumb):
              * rendering/RenderThemeSafari.cpp:
              (WebCore::RenderThemeSafari::paintSliderThumb):
              * rendering/RenderThemeWin.cpp:
              (WebCore::RenderThemeWin::determineSliderThumbState):
              * rendering/SVGCharacterLayoutInfo.cpp:
              (WebCore::SVGCharacterLayoutInfo::addLayoutInformation):
              * rendering/SVGRootInlineBox.cpp:
              (WebCore::findSVGRootObject):
              * rendering/TextControlInnerElements.cpp:
              (WebCore::RenderTextControlInnerBlock::nodeAtPoint):
              (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
              * svg/SVGImageElement.cpp:
              (WebCore::SVGImageElement::attach):
              * svg/SVGMarkerElement.cpp:
              (WebCore::SVGMarkerElement::canvasResource):
              * svg/SVGTextContentElement.cpp:
              (WebCore::rootInlineBoxForTextContentElement):
              * wml/WMLInputElement.cpp:
              (WebCore::WMLInputElement::defaultEventHandler):
              Use checked casts.
      
              * rendering/RenderApplet.h:
              * rendering/RenderCounter.h:
              * rendering/RenderFieldset.h:
              * rendering/RenderFileUploadControl.h:
              * rendering/RenderFrame.h:
              * rendering/RenderFrameSet.h:
              * rendering/RenderHTMLCanvas.h:
              * rendering/RenderListBox.h:
              * rendering/RenderListItem.h:
              * rendering/RenderListMarker.h:
              * rendering/RenderMedia.h:
              * rendering/RenderMenuList.h:
              * rendering/RenderPart.h:
              * rendering/RenderPartObject.h:
              * rendering/RenderPath.h:
              * rendering/RenderSVGContainer.h:
              * rendering/RenderSVGRoot.h:
              * rendering/RenderSVGTextPath.h:
              * rendering/RenderSVGViewportContainer.h:
              * rendering/RenderScrollbar.h:
              * rendering/RenderSlider.h:
              * rendering/RenderTextControlMultiLine.h:
              * rendering/RenderTextControlSingleLine.h:
              * rendering/RenderVideo.h:
              Added a checked cast. Also made most members protected or private.
      
              * rendering/RenderBlock.h:
              * rendering/RenderInline.h:
              * rendering/RenderReplaced.h:
              * rendering/RenderSVGBlock.h:
              * rendering/RenderSVGImage.h:
              * rendering/RenderSVGInlineText.h:
              * rendering/RenderSVGText.h:
              * rendering/RenderTextControl.h:
              Made most members protected or private.
      
              * rendering/RenderInline.cpp:
              * rendering/RenderSVGContainer.cpp:
              * rendering/RenderSVGHiddenContainer.cpp:
              * rendering/RenderSVGImage.cpp:
              * rendering/RenderSVGRoot.cpp:
              Removed unneeded destructor.
      
              * rendering/RenderSVGHiddenContainer.h:
              Removed unneeded virtual function overrides that did the same as
              the default and base class.
      
              * rendering/RenderSVGViewportContainer.cpp:
              (WebCore::RenderSVGViewportContainer::paint): Updated to use m_viewport
              directly instead of using a function call.
              (WebCore::RenderSVGViewportContainer::applyViewportClip): Ditto.
              (WebCore::RenderSVGViewportContainer::viewportTransform): Ditto.
              (WebCore::RenderSVGViewportContainer::localToParentTransform): Ditto.
              (WebCore::RenderSVGViewportContainer::pointIsInsideViewportClip): Ditto.
      
              * rendering/RenderScrollbar.cpp:
              (WebCore::pseudoForScrollbarPart): Changed switch statement to use cases for
              all values instead of using a default case.
      
              * rendering/RenderTreeAsText.cpp:
              (WebCore::operator<<): Removed dependency on casting to types that don't
              have any public members we need to get at. Instead, use function names to
              identify the type rather than doing so much overloading. Changed to use
              checked casts.
              (WebCore::write): Ditto.
      
              * rendering/SVGRenderSupport.cpp:
              (WebCore::renderSubtreeToImage): Changed to use a checked cast and also
              added a comment about the fact that the code does not do sufficient type
              checking before doing the cast.
      
              * rendering/SVGRenderTreeAsText.cpp:
              (WebCore::writeRenderSVGTextBox): Renamed this from operator<<.
              (WebCore::writeSVGInlineTextBoxes): Renamed this from writeSVGInlineText.
              (WebCore::writeSVGText): Renamed this from write.
              (WebCore::writeSVGInlineText): Ditto.
              (WebCore::writeSVGImage): Ditto.
              * rendering/SVGRenderTreeAsText.h: Updated for name changes. Removed
              unneeded default arguments.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46815 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b6cb2561
    • eric@webkit.org's avatar
      2009-08-04 Eric Seidel <eric@webkit.org> · 6fd7b362
      eric@webkit.org authored
              Reviewed by Simon Fraser.
      
              REGRESSION (r45064): Drop caret remains in text control after the mouse exits
              https://bugs.webkit.org/show_bug.cgi?id=26787
      
              Fix some bogus comments noticed during testing.
      
              * fast/forms/drag-into-textarea.html:
              * fast/forms/drag-out-of-textarea.html:
      
      2009-08-04  Eric Seidel  <eric@webkit.org>
      
              Reviewed by Simon Fraser.
      
              REGRESSION (r45064): Drop caret remains in text control after the mouse exits
              https://bugs.webkit.org/show_bug.cgi?id=26787
      
              Add back missing dragController()->clear() call.
      
              * manual-tests/drag-caret.html: Added.
              * page/DragController.cpp:
              (WebCore::DragController::tryDocumentDrag):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6fd7b362
  36. 24 Jul, 2009 1 commit
    • abarth@webkit.org's avatar
      2009-07-24 Mike Fenton <mike.fenton@torchmobile.com> · 2def5eb9
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              Update WebCore/page/DOMTimer.cpp/h to conform to WebKit
              Style Guidelines as identified by cpplint.py.
              https://bugs.webkit.org/show_bug.cgi?id=27624
      
              * page/DragController.cpp:
              (WebCore::DragController::~DragController):
              (WebCore::documentFragmentFromDragData):
              (WebCore::DragController::dragEnded):
              (WebCore::DragController::dragEntered):
              (WebCore::DragController::dragExited):
              (WebCore::DragController::dragUpdated):
              (WebCore::DragController::performDrag):
              (WebCore::asFileInput):
              (WebCore::DragController::tryDocumentDrag):
              (WebCore::DragController::delegateDragSourceAction):
              (WebCore::DragController::concludeEditDrag):
              (WebCore::DragController::canProcessDrag):
              (WebCore::DragController::tryDHTMLDrag):
              (WebCore::DragController::mayStartDragAtEventLocation):
              (WebCore::getCachedImage):
              (WebCore::getImage):
              (WebCore::prepareClipboardForImageDrag):
              (WebCore::dragLocForDHTMLDrag):
              (WebCore::DragController::startDrag):
              (WebCore::DragController::doImageDrag):
              (WebCore::DragController::doSystemDrag):
              (WebCore::DragController::placeDragCaret):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2def5eb9
  37. 24 Jun, 2009 1 commit