1. 13 May, 2011 1 commit
    • dcheng@chromium.org's avatar
      2011-05-13 Daniel Cheng <dcheng@chromium.org> · 0eb6dc60
      dcheng@chromium.org authored
              Reviewed by Tony Chang.
      
              Improve drag start logic
              https://bugs.webkit.org/show_bug.cgi?id=59409
      
              Add a new test to test drag start edge cases on Mac (because of a non-zero text drag delay)
              as well as rebase an existing test.
      
              * fast/css/user-drag-none.html: Text nodes are no longer draggable.
              * platform/mac/editing/pasteboard/drag-selections-to-contenteditable-expected.txt: Added.
              * platform/mac/editing/pasteboard/drag-selections-to-contenteditable.html: Added.
      2011-05-13  Daniel Cheng  <dcheng@chromium.org>
      
              Reviewed by Tony Chang.
      
              Improve drag start logic
              https://bugs.webkit.org/show_bug.cgi?id=59409
      
              Rewrite and simplify the dragging logic to better match IE, Firefox, and the behavior
              defined in the spec. Among other things:
              - draggableNode() no longer returns text nodes when dragging anchors.
              - When starting a drag over an image in a selection, prefer to drag the selection.
              - Several redundant hit tests have been removed.
              - Minor refactoring to make the logic easier to follow.
      
              Test: platform/mac/editing/pasteboard/drag-selections-to-contenteditable.html
      
              * WebCore.xcodeproj/project.pbxproj:
              * page/DragController.cpp:
              (WebCore::DragController::draggableNode):
              (WebCore::DragController::startDrag):
              * page/DragController.h:
              * page/DragState.h:
              (WebCore::DragState::shouldDispatchEvents):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::EventHandler):
              (WebCore::EventHandler::eventMayStartDrag):
              (WebCore::EventHandler::updateDragSourceActionsAllowed):
              (WebCore::EventHandler::updateDragAndDrop):
              (WebCore::EventHandler::cancelDragAndDrop):
              (WebCore::EventHandler::dragHysteresisExceeded):
              (WebCore::EventHandler::dragSourceEndedAt):
              (WebCore::ExactlyOneBitSet):
              (WebCore::EventHandler::handleDrag):
              * page/EventHandler.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0eb6dc60
  2. 09 May, 2011 1 commit
    • dcheng@chromium.org's avatar
      2011-05-09 Daniel Cheng <dcheng@chromium.org> · 252dcbe7
      dcheng@chromium.org authored
              Reviewed by Tony Chang.
      
              Refactor RenderObject::draggableNode.
              https://bugs.webkit.org/show_bug.cgi?id=60503
      
              This patch lays the ground for refactoring the drag start logic. It moves draggableNode to
              DragController to avoid the awkward plumbing of calling DragController from RenderObject and
              also moves EventHandlerDragState out from EventHandler so it can be shared between
              EventHandler and DragController where appropriate.
      
              No new tests since there should be no behavior change.
      
              * GNUmakefile.list.am:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * page/DragController.cpp:
              (WebCore::DragController::draggableNode):
              (WebCore::DragController::mayStartDragAtEventLocation):
              * page/DragController.h:
              * page/DragState.h: Added.
              (WebCore::DragState::DragState):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::dragState):
              (WebCore::EventHandler::eventMayStartDrag):
              (WebCore::EventHandler::handleDrag):
              * page/EventHandler.h:
              * rendering/RenderObject.cpp:
              * rendering/RenderObject.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      252dcbe7
  3. 08 May, 2011 1 commit
    • rniwa@webkit.org's avatar
      2011-05-08 Ryosuke Niwa <rniwa@webkit.org> · afbef274
      rniwa@webkit.org authored
              Reviewed by Darin Adler.
      
              Extract a DragCaretController from FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60273
      
              Extracted CaretBase and DragCaretController from FrameSelection. CaretBase is a base class for
              DragCaretController and FrameSelection and provides functions to paint caret.
      
              Since DragCaretController doesn't need to store selection, it only holds one VisiblePosition.
      
              * WebCore.exp.in:
              * editing/FrameSelection.cpp:
              (WebCore::CaretBase::CaretBase): Added.
              (WebCore::DragCaretController::DragCaretController): Added; Set m_caretVisible true.
              (WebCore::DragCaretController::isContentRichlyEditable): Added.
              (WebCore::FrameSelection::FrameSelection): Several member variables are move to CaretBase.
              (WebCore::DragCaretController::setCaretPosition): Extracted from FrameSelection::setSelection.
              (WebCore::FrameSelection::setSelection): Removed an early exit for DragCaretController.
              (WebCore::clearRenderViewSelection): Extracted from FrameSelection::respondToNodeModification.
              (WebCore::DragCaretController::nodeWillBeRemoved): Extracted from FrameSelection::nodeWillBeRemoved
              and respondToNodeModification. Note that the position DragCaretController holds is equivalent to
              FrameSelection's base or start so when removingNodeRemovesPosition returns true for m_position,
              we used to execute the first if clause and cleared render tree selection and DOM tree selection.
              This is exactly what new DragCaretController::nodeWillBeRemoved does.
              (WebCore::FrameSelection::nodeWillBeRemoved): Simplified early exist conditions.
              (WebCore::FrameSelection::respondToNodeModification): Calls clearRenderViewSelection.
              (WebCore::CaretBase::updateCaretRect): Takes document, caretPosition, selection type, and boolean isOrphaned.
              Note that we can't obtain the document from caretPosition because VisiblePosition can be null even if
              FrameSelection's start was not null.
              (WebCore::caretRendersInsideNode): Moved; Made static local.
              (WebCore::CaretBase::caretRenderer): Extracted from FrameSelection::caretRenderer.
              (WebCore::FrameSelection::caretRenderer): Calls CaretBase::caretRenderer.
              (WebCore::DragCaretController::caretRenderer): Ditto.
              (WebCore::FrameSelection::localCaretRect): Calls updateCaretRect with extra arguments.
              (WebCore::CaretBase::absoluteBoundsForLocalRect): Moved from FrameSelection; Takes Node*.
              (WebCore::CaretBase::caretRepaintRect): Ditto.
              (WebCore::FrameSelection::recomputeCaretRect): Calls absoluteBoundsForLocalRect, caretRepaintRect,
              and shouldRepaintCaret with extra arguments.
              (WebCore::CaretBase::shouldRepaintCaret): Takes a boolean isContentEditable.
              (WebCore::FrameSelection::invalidateCaretRect): Calls CaretBase::invalidateCaretRect.
              (WebCore::CaretBase::invalidateCaretRect): Extracted from FrameSelection::invalidateCaretRect.
              (WebCore::FrameSelection::paintCaret): Calls CaretBase::paintCaret.
              (WebCore::CaretBase::paintCaret): Extracted from FrameSelection::paintCaret.
              (WebCore::FrameSelection::updateAppearance): Removed an assertion that this function is never called for
              DragCaretController.
              (WebCore::DragCaretController::paintDragCaret): Moved from FrameSelection::paintDragCaret.
              * editing/FrameSelection.h:
              (WebCore::CaretBase::localCaretRectForPainting): Added.
              (WebCore::DragCaretController::isContentEditable): Added.
              (WebCore::DragCaretController::hasCaret): Added.
              (WebCore::DragCaretController::caretPosition): Added.
              (WebCore::DragCaretController::clear): Added.
              * page/DragController.cpp:
              (WebCore::DragController::tryDocumentDrag): Uses DragCaretController.
              (WebCore::DragController::dispatchTextInputEventFor): Ditto.
              (WebCore::DragController::concludeEditDrag): Ditto.
              (WebCore::DragController::placeDragCaret): Ditto.
              * page/Page.cpp:
              (WebCore::Page::Page): Instantiates DragCaretController instead of FrameSelection.
              * page/Page.h:
              (WebCore::Page::dragCaretController): Returns DragCaretController* instead of FrameSelection*.
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::paintCaret): Uses FrameSelection and DragCaretController.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      afbef274
  4. 05 May, 2011 1 commit
    • rniwa@webkit.org's avatar
      2011-05-05 Ryosuke Niwa <rniwa@webkit.org> · 78bbc94c
      rniwa@webkit.org authored
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * src/WebFrameImpl.cpp:
              (WebKit::WebFrameImpl::selectWordAroundCaret):
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::textInputType):
              (WebKit::WebViewImpl::caretOrSelectionBounds):
              (WebKit::WebViewImpl::caretOrSelectionRange):
              (WebKit::WebViewImpl::clearFocusedNode):
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * Api/qwebframe.cpp:
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * webkit/webkitwebview.cpp:
              (getLocationForKeyboardGeneratedContextMenu):
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * WebView.cpp:
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * WebDOMSelection.cpp:
              * WebDOMSelection.h:
              * WebKitSupport/EditorClientWx.cpp:
              * WebView.cpp:
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * WebView/WebFrame.mm:
              (-[WebFrame _rangeByAlteringCurrentSelection:FrameSelection::direction:granularity:]):
              * WebView/WebFrameInternal.h:
              * WebView/WebHTMLView.mm:
              * WebView/WebTextCompletionController.mm:
              (-[WebTextCompletionController doCompletion]):
              * WebView/WebView.mm:
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * WebCoreSupport/EditorClientHaiku.cpp:
              (WebCore::EditorClientHaiku::handleKeyboardEvent):
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * WebCoreSupport/EditorClientWinCE.cpp:
              (WebKit::EditorClientWinCE::handleEditingKeyboardEvent):
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * WebCoreSupport/EditorClientEfl.cpp:
              (WebCore::EditorClientEfl::handleEditingKeyboardEvent):
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * CMakeLists.txt:
              * GNUmakefile.list.am:
              * WebCore.exp.in:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * accessibility/AccessibilityObject.cpp:
              * accessibility/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::visiblePositionRangeForLine):
              * accessibility/mac/AccessibilityObjectWrapper.mm:
              * bindings/objc/ExceptionHandlers.h:
              * css/CSSStyleSelector.cpp:
              * dom/ContainerNode.cpp:
              (WebCore::ContainerNode::cloneChildNodes):
              * dom/Document.cpp:
              * dom/InputElement.cpp:
              * editing/DeleteButtonController.cpp:
              * editing/EditCommand.cpp:
              * editing/EditingAllInOne.cpp:
              * editing/EditingStyle.cpp:
              * editing/Editor.cpp:
              (WebCore::Editor::canCopy):
              (WebCore::Editor::canDelete):
              (WebCore::Editor::markMisspellingsAfterTypingToWord):
              (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
              (WebCore::Editor::changeSelectionAfterCommand):
              (WebCore::Editor::respondToChangedSelection):
              * editing/Editor.h:
              * editing/EditorCommand.cpp:
              (WebCore::executeDeleteToMark):
              (WebCore::executeMoveBackward):
              (WebCore::executeMoveBackwardAndModifySelection):
              (WebCore::executeMoveDown):
              (WebCore::executeMoveDownAndModifySelection):
              (WebCore::executeMoveForward):
              (WebCore::executeMoveForwardAndModifySelection):
              (WebCore::executeMoveLeft):
              (WebCore::executeMoveLeftAndModifySelection):
              (WebCore::executeMovePageDown):
              (WebCore::executeMovePageDownAndModifySelection):
              (WebCore::executeMovePageUp):
              (WebCore::executeMovePageUpAndModifySelection):
              (WebCore::executeMoveRight):
              (WebCore::executeMoveRightAndModifySelection):
              (WebCore::executeMoveToBeginningOfDocument):
              (WebCore::executeMoveToBeginningOfDocumentAndModifySelection):
              (WebCore::executeMoveToBeginningOfLine):
              (WebCore::executeMoveToBeginningOfLineAndModifySelection):
              (WebCore::executeMoveToBeginningOfParagraph):
              (WebCore::executeMoveToBeginningOfParagraphAndModifySelection):
              (WebCore::executeMoveToBeginningOfSentence):
              (WebCore::executeMoveToBeginningOfSentenceAndModifySelection):
              (WebCore::executeMoveToEndOfDocument):
              (WebCore::executeMoveToEndOfDocumentAndModifySelection):
              (WebCore::executeMoveToEndOfSentence):
              (WebCore::executeMoveToEndOfSentenceAndModifySelection):
              (WebCore::executeMoveToEndOfLine):
              (WebCore::executeMoveToEndOfLineAndModifySelection):
              (WebCore::executeMoveToEndOfParagraph):
              (WebCore::executeMoveToEndOfParagraphAndModifySelection):
              (WebCore::executeMoveParagraphBackwardAndModifySelection):
              (WebCore::executeMoveParagraphForwardAndModifySelection):
              (WebCore::executeMoveUp):
              (WebCore::executeMoveUpAndModifySelection):
              (WebCore::executeMoveWordBackward):
              (WebCore::executeMoveWordBackwardAndModifySelection):
              (WebCore::executeMoveWordForward):
              (WebCore::executeMoveWordForwardAndModifySelection):
              (WebCore::executeMoveWordLeft):
              (WebCore::executeMoveWordLeftAndModifySelection):
              (WebCore::executeMoveWordRight):
              (WebCore::executeMoveWordRightAndModifySelection):
              (WebCore::executeMoveToLeftEndOfLine):
              (WebCore::executeMoveToLeftEndOfLineAndModifySelection):
              (WebCore::executeMoveToRightEndOfLine):
              (WebCore::executeMoveToRightEndOfLineAndModifySelection):
              * editing/FrameSelection.cpp: Copied from Source/WebCore/editing/SelectionController.cpp.
              (WebCore::FrameSelection::FrameSelection):
              (WebCore::FrameSelection::moveTo):
              (WebCore::FrameSelection::setSelection):
              (WebCore::FrameSelection::nodeWillBeRemoved):
              (WebCore::FrameSelection::respondToNodeModification):
              (WebCore::FrameSelection::textWillBeReplaced):
              (WebCore::FrameSelection::setIsDirectional):
              (WebCore::FrameSelection::directionOfEnclosingBlock):
              (WebCore::FrameSelection::willBeModified):
              (WebCore::FrameSelection::positionForPlatform):
              (WebCore::FrameSelection::startForPlatform):
              (WebCore::FrameSelection::endForPlatform):
              (WebCore::FrameSelection::modifyExtendingRight):
              (WebCore::FrameSelection::modifyExtendingForward):
              (WebCore::FrameSelection::modifyMovingRight):
              (WebCore::FrameSelection::modifyMovingForward):
              (WebCore::FrameSelection::modifyExtendingLeft):
              (WebCore::FrameSelection::modifyExtendingBackward):
              (WebCore::FrameSelection::modifyMovingLeft):
              (WebCore::FrameSelection::modifyMovingBackward):
              (WebCore::FrameSelection::modify):
              (WebCore::FrameSelection::xPosForVerticalArrowNavigation):
              (WebCore::FrameSelection::clear):
              (WebCore::FrameSelection::setStart):
              (WebCore::FrameSelection::setEnd):
              (WebCore::FrameSelection::setBase):
              (WebCore::FrameSelection::setExtent):
              (WebCore::FrameSelection::setCaretRectNeedsUpdate):
              (WebCore::FrameSelection::updateCaretRect):
              (WebCore::FrameSelection::caretRenderer):
              (WebCore::FrameSelection::localCaretRect):
              (WebCore::FrameSelection::absoluteBoundsForLocalRect):
              (WebCore::FrameSelection::absoluteCaretBounds):
              (WebCore::FrameSelection::caretRepaintRect):
              (WebCore::FrameSelection::recomputeCaretRect):
              (WebCore::FrameSelection::shouldRepaintCaret):
              (WebCore::FrameSelection::invalidateCaretRect):
              (WebCore::FrameSelection::paintCaret):
              (WebCore::FrameSelection::debugRenderer):
              (WebCore::FrameSelection::contains):
              (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
              (WebCore::FrameSelection::selectAll):
              (WebCore::FrameSelection::setSelectedRange):
              (WebCore::FrameSelection::isInPasswordField):
              (WebCore::FrameSelection::caretRendersInsideNode):
              (WebCore::FrameSelection::focusedOrActiveStateChanged):
              (WebCore::FrameSelection::pageActivationChanged):
              (WebCore::FrameSelection::updateSecureKeyboardEntryIfActive):
              (WebCore::FrameSelection::setUseSecureKeyboardEntry):
              (WebCore::FrameSelection::setFocused):
              (WebCore::FrameSelection::isFocusedAndActive):
              (WebCore::FrameSelection::updateAppearance):
              (WebCore::FrameSelection::setCaretVisible):
              (WebCore::FrameSelection::clearCaretRectIfNeeded):
              (WebCore::FrameSelection::caretBlinkTimerFired):
              (WebCore::FrameSelection::notifyRendererOfSelectionChange):
              (WebCore::FrameSelection::setFocusedNodeIfNeeded):
              (WebCore::FrameSelection::paintDragCaret):
              (WebCore::FrameSelection::copyTypingStyle):
              (WebCore::FrameSelection::shouldDeleteSelection):
              (WebCore::FrameSelection::bounds):
              (WebCore::FrameSelection::getClippedVisibleTextRectangles):
              (WebCore::FrameSelection::currentForm):
              (WebCore::FrameSelection::revealSelection):
              (WebCore::FrameSelection::setSelectionFromNone):
              (WebCore::FrameSelection::shouldChangeSelection):
              (WebCore::FrameSelection::formatForDebugger):
              (WebCore::FrameSelection::showTreeForThis):
              (showTree):
              * editing/FrameSelection.h: Copied from Source/WebCore/editing/SelectionController.h.
              (WebCore::FrameSelection::typingStyle):
              (WebCore::FrameSelection::clearTypingStyle):
              (WebCore::FrameSelection::setTypingStyle):
              (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
              * editing/ModifySelectionListLevel.cpp:
              * editing/RemoveFormatCommand.cpp:
              * editing/ReplaceSelectionCommand.cpp:
              * editing/SelectionController.cpp: Removed.
              * editing/SelectionController.h: Removed.
              * editing/SetSelectionCommand.cpp:
              (WebCore::SetSelectionCommand::SetSelectionCommand):
              (WebCore::SetSelectionCommand::doApply):
              (WebCore::SetSelectionCommand::doUnapply):
              * editing/SetSelectionCommand.h:
              (WebCore::SetSelectionCommand::create):
              * editing/SpellingCorrectionCommand.cpp:
              (WebCore::SpellingCorrectionCommand::doApply):
              * editing/SpellingCorrectionController.cpp:
              (WebCore::SpellingCorrectionController::respondToUnappliedSpellCorrection):
              * editing/TypingCommand.cpp:
              (WebCore::TypingCommand::deleteKeyPressed):
              (WebCore::TypingCommand::forwardDeleteKeyPressed):
              * editing/chromium/FrameSelectionChromium.cpp: Copied from Source/WebCore/editing/chromium/SelectionControllerChromium.cpp.
              (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
              * editing/chromium/SelectionControllerChromium.cpp: Removed.
              * editing/gtk/FrameSelectionGtk.cpp: Copied from Source/WebCore/editing/gtk/SelectionControllerGtk.cpp.
              (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
              * editing/gtk/SelectionControllerGtk.cpp: Removed.
              * editing/mac/EditorMac.mm:
              (WebCore::Editor::canCopyExcludingStandaloneImages):
              * editing/mac/FrameSelectionMac.mm: Copied from Source/WebCore/editing/mac/SelectionControllerMac.mm.
              (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
              * editing/mac/SelectionControllerMac.mm: Removed.
              * editing/qt/EditorQt.cpp:
              * loader/archive/cf/LegacyWebArchive.cpp:
              * page/ContextMenuController.cpp:
              (WebCore::ContextMenuController::populate):
              * page/DOMSelection.cpp:
              (WebCore::DOMSelection::type):
              (WebCore::DOMSelection::modify):
              (WebCore::DOMSelection::addRange):
              (WebCore::DOMSelection::deleteFromDocument):
              (WebCore::DOMSelection::containsNode):
              * page/DragController.cpp:
              (WebCore::DragController::dragIsMove):
              * page/DragController.h:
              * page/EventHandler.cpp:
              (WebCore::setSelectionIfNeeded):
              (WebCore::setNonDirectionalSelectionIfNeeded):
              (WebCore::EventHandler::sendContextMenuEventForKey):
              (WebCore::EventHandler::handleKeyboardSelectionMovement):
              * page/EventHandler.h:
              * page/FocusController.cpp:
              (WebCore::clearSelectionIfNeeded):
              * page/Frame.cpp:
              (WebCore::Frame::Frame):
              * page/Frame.h:
              (WebCore::Frame::selection):
              * page/Page.cpp:
              (WebCore::Page::Page):
              * page/Page.h:
              (WebCore::Page::dragCaretController):
              * page/chromium/DragControllerChromium.cpp:
              * page/chromium/EventHandlerChromium.cpp:
              * page/win/DragControllerWin.cpp:
              * page/win/EventHandlerWin.cpp:
              * rendering/HitTestResult.cpp:
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::destroy):
              (WebCore::RenderBlock::paintCaret):
              * rendering/RenderImage.cpp:
              * rendering/RenderInline.cpp:
              (WebCore::RenderInline::destroy):
              * rendering/RenderLayer.cpp:
              * rendering/RenderListBox.cpp:
              * rendering/RenderObjectChildList.cpp:
              (WebCore::RenderObjectChildList::removeChildNode):
              * rendering/RenderTextControl.cpp:
              * rendering/RenderTextControlSingleLine.cpp:
              * rendering/RenderTheme.cpp:
              * rendering/RenderTreeAsText.cpp:
              * svg/SVGSVGElement.cpp:
              * svg/SVGTextContentElement.cpp:
              (WebCore::SVGTextContentElement::selectSubString):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@85864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      78bbc94c
  5. 02 May, 2011 1 commit
    • weinig@apple.com's avatar
      2011-05-02 Sam Weinig <sam@webkit.org> · 00a4f524
      weinig@apple.com authored
              Reviewed by Adam Barth.
      
              Prune some #includes from DOMWindow.h
              https://bugs.webkit.org/show_bug.cgi?id=59907
      
              * Plugins/WebBaseNetscapePluginView.mm:
              * WebView/WebFrame.mm:
              Add now missing SecurityOrigin.h #includes.
      2011-05-02  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Adam Barth.
      
              Prune some #includes from DOMWindow.h
              https://bugs.webkit.org/show_bug.cgi?id=59907
      
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::setSecurityOrigin):
              * page/DOMWindow.h:
              Remove #includes of SecurityOrigin and MessagePort by forward declaring
              and moving the SecurityOrigin setter to the .cpp file. Also adds EventTarget
              #include that was getting added by MessagePort.h.
      
              * bindings/js/JSCustomVoidCallback.cpp:
              * bindings/js/JSCustomXPathNSResolver.cpp:
              * bindings/js/JSDOMWindowCustom.h:
              * bindings/js/JSHistoryCustom.cpp:
              * bindings/js/ScriptController.h:
              * html/HTMLAnchorElement.cpp:
              * html/HTMLMediaElement.cpp:
              * html/parser/XSSFilter.cpp:
              * inspector/InspectorDOMStorageResource.cpp:
              * loader/MainResourceLoader.cpp:
              * page/DragController.cpp:
              * page/EventSource.cpp:
              * page/Location.cpp:
              * websockets/WebSocket.cpp:
              * xml/XSLTProcessorLibxslt.cpp:
              Add now missing SecurityOrigin.h #includes.
      2011-05-02  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Adam Barth.
      
              Prune some #includes from DOMWindow.h
              https://bugs.webkit.org/show_bug.cgi?id=59907
      
              * WebProcess/WebPage/WebFrame.cpp:
              Add now missing SecurityOrigin.h #include.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@85484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      00a4f524
  6. 25 Mar, 2011 1 commit
    • commit-queue@webkit.org's avatar
      2011-03-25 Chang Shu <cshu@webkit.org> · 595681f4
      commit-queue@webkit.org authored
              Reviewed by Ryosuke Niwa.
      
              rename Node::isContentEditable and all call sites to rendererIsEditable
              https://bugs.webkit.org/show_bug.cgi?id=54290
      
              This is part of the effort to separate JS API HTMLElement isContentEditable from
              internal Node::rendererIsEditable.
      
              Code refactoring. No new tests.
      
              * accessibility/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::isReadOnly):
              (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
              * dom/Document.cpp:
              (WebCore::acceptsEditingFocus):
              * dom/Node.cpp:
              (WebCore::Node::rendererIsEditable):
              (WebCore::Node::shouldUseInputMethod):
              (WebCore::Node::canStartSelection):
              (WebCore::Node::rootEditableElement):
              * dom/Node.h:
              (WebCore::Node::isContentEditable):
              (WebCore::Node::rendererIsEditable):
              (WebCore::Node::rendererIsRichlyEditable):
              * dom/Position.cpp:
              (WebCore::nextRenderedEditable):
              (WebCore::previousRenderedEditable):
              (WebCore::Position::atEditingBoundary):
              (WebCore::Position::parentEditingBoundary):
              (WebCore::Position::upstream):
              (WebCore::Position::downstream):
              (WebCore::Position::isCandidate):
              * dom/PositionIterator.cpp:
              (WebCore::PositionIterator::isCandidate):
              * editing/AppendNodeCommand.cpp:
              (WebCore::AppendNodeCommand::AppendNodeCommand):
              (WebCore::AppendNodeCommand::doApply):
              (WebCore::AppendNodeCommand::doUnapply):
              * editing/ApplyStyleCommand.cpp:
              (WebCore::containsNonEditableRegion):
              (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
              (WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
              (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
              * editing/DeleteButtonController.cpp:
              (WebCore::isDeletableElement):
              (WebCore::enclosingDeletableElement):
              * editing/DeleteFromTextNodeCommand.cpp:
              (WebCore::DeleteFromTextNodeCommand::doApply):
              (WebCore::DeleteFromTextNodeCommand::doUnapply):
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::removeNode):
              * editing/Editor.cpp:
              (WebCore::Editor::canDeleteRange):
              (WebCore::Editor::markMisspellingsOrBadGrammar):
              (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
              * editing/EditorCommand.cpp:
              (WebCore::verticalScrollDistance):
              * editing/FormatBlockCommand.cpp:
              (WebCore::enclosingBlockToSplitTreeTo):
              * editing/IndentOutdentCommand.cpp:
              (WebCore::IndentOutdentCommand::outdentParagraph):
              * editing/InsertIntoTextNodeCommand.cpp:
              (WebCore::InsertIntoTextNodeCommand::doApply):
              (WebCore::InsertIntoTextNodeCommand::doUnapply):
              * editing/InsertNodeBeforeCommand.cpp:
              (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
              (WebCore::InsertNodeBeforeCommand::doApply):
              (WebCore::InsertNodeBeforeCommand::doUnapply):
              * editing/JoinTextNodesCommand.cpp:
              (WebCore::JoinTextNodesCommand::doApply):
              (WebCore::JoinTextNodesCommand::doUnapply):
              * editing/MergeIdenticalElementsCommand.cpp:
              (WebCore::MergeIdenticalElementsCommand::doApply):
              (WebCore::MergeIdenticalElementsCommand::doUnapply):
              * editing/RemoveNodeCommand.cpp:
              (WebCore::RemoveNodeCommand::doApply):
              (WebCore::RemoveNodeCommand::doUnapply):
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplacementFragment::ReplacementFragment):
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::selectFrameElementInParentIfFullySelected):
              (WebCore::SelectionController::setSelectionFromNone):
              * editing/SplitElementCommand.cpp:
              (WebCore::SplitElementCommand::executeApply):
              (WebCore::SplitElementCommand::doUnapply):
              * editing/SplitTextNodeCommand.cpp:
              (WebCore::SplitTextNodeCommand::doApply):
              (WebCore::SplitTextNodeCommand::doUnapply):
              (WebCore::SplitTextNodeCommand::doReapply):
              * editing/SplitTextNodeContainingElementCommand.cpp:
              (WebCore::SplitTextNodeContainingElementCommand::doApply):
              * editing/VisiblePosition.cpp:
              (WebCore::VisiblePosition::canonicalPosition):
              * editing/WrapContentsInDummySpanCommand.cpp:
              (WebCore::WrapContentsInDummySpanCommand::doUnapply):
              (WebCore::WrapContentsInDummySpanCommand::doReapply):
              * editing/htmlediting.cpp:
              (WebCore::highestEditableRoot):
              (WebCore::lowestEditableAncestor):
              (WebCore::isEditablePosition):
              (WebCore::isRichlyEditablePosition):
              (WebCore::firstEditablePositionAfterPositionInRoot):
              (WebCore::extendRangeToWrappingNodes):
              (WebCore::enclosingNodeWithTag):
              (WebCore::enclosingNodeOfType):
              (WebCore::highestEnclosingNodeOfType):
              (WebCore::canMergeLists):
              * editing/visible_units.cpp:
              (WebCore::previousLeafWithSameEditability):
              (WebCore::previousLinePosition):
              (WebCore::nextLeafWithSameEditability):
              (WebCore::nextLinePosition):
              (WebCore::startOfParagraph):
              (WebCore::endOfParagraph):
              * html/HTMLAnchorElement.cpp:
              (WebCore::HTMLAnchorElement::supportsFocus):
              (WebCore::HTMLAnchorElement::defaultEventHandler):
              (WebCore::HTMLAnchorElement::setActive):
              (WebCore::HTMLAnchorElement::canStartSelection):
              (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType):
              * html/HTMLBodyElement.cpp:
              (WebCore::HTMLBodyElement::supportsFocus):
              * html/HTMLElement.cpp:
              (WebCore::HTMLElement::supportsFocus):
              (WebCore::HTMLElement::isContentEditable):
              (WebCore::HTMLElement::contentEditable):
              * html/HTMLElement.h:
              * page/DragController.cpp:
              (WebCore::DragController::operationForLoad):
              (WebCore::DragController::canProcessDrag):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::handleMouseReleaseEvent):
              (WebCore::EventHandler::selectCursor):
              * page/FocusController.cpp:
              (WebCore::relinquishesEditingFocus):
              * rendering/HitTestResult.cpp:
              (WebCore::HitTestResult::isContentEditable):
              * rendering/RenderBlock.cpp:
              (WebCore::positionForPointRespectingEditingBoundaries):
              (WebCore::RenderBlock::hasLineIfEmpty):
              * rendering/RenderBlockLineLayout.cpp:
              (WebCore::RenderBlock::addOverflowFromInlineChildren):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::canBeProgramaticallyScrolled):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::createVisiblePosition):
              * rendering/RootInlineBox.cpp:
              (WebCore::isEditableLeaf):
              * svg/SVGAElement.cpp:
              (WebCore::SVGAElement::supportsFocus):
      2011-03-25  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              rename Node::isContentEditable and all call sites to rendererIsEditable
              https://bugs.webkit.org/show_bug.cgi?id=54290
      
              This is part of the effort to separate JS API HTMLElement isContentEditable from
              internal Node::rendererIsEditable.
      
              * src/WebNode.cpp:
              (WebKit::WebNode::isContentEditable):
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::setFocus):
              (WebKit::WebViewImpl::setComposition):
              (WebKit::WebViewImpl::confirmComposition):
      2011-03-25  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              rename Node::isContentEditable and all call sites to rendererIsEditable
              https://bugs.webkit.org/show_bug.cgi?id=54290
      
              This is part of the effort to separate JS API HTMLElement isContentEditable from
              internal Node::rendererIsEditable.
      
              * WebCoreSupport/EditorClientHaiku.cpp:
              (WebCore::EditorClientHaiku::handleKeyboardEvent):
      2011-03-25  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              rename Node::isContentEditable and all call sites to rendererIsEditable
              https://bugs.webkit.org/show_bug.cgi?id=54290
      
              This is part of the effort to separate JS API HTMLElement isContentEditable from
              internal Node::rendererIsEditable.
      
              * WebCoreSupport/EditorClientQt.cpp:
              (WebCore::EditorClientQt::handleKeyboardEvent):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81965 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      595681f4
  7. 21 Mar, 2011 1 commit
    • commit-queue@webkit.org's avatar
      2011-03-21 Chang Shu <cshu@webkit.org> · f52c4946
      commit-queue@webkit.org authored
              Reviewed by Alexey Proskuryakov.
      
              REGRESSION (r79953): Can't type in MS Outlook 2011
              https://bugs.webkit.org/show_bug.cgi?id=56665
      
              Restore the expected result before r79953. r79953 changed behavior slightly in function
              finishedLoadingWithDataSource in file mac/WebView/WebHTMLRepresentation.mm, where
              core(webFrame)->editor()->applyEditingStyleToBodyElement() was called but not before r79953
              or after this patch.
      
              * platform/mac/editing/selection/designmode-no-caret-expected.txt:
      2011-03-21  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Alexey Proskuryakov.
      
              REGRESSION (r79953): Can't type in MS Outlook 2011
              https://bugs.webkit.org/show_bug.cgi?id=56665
      
              r79953 removed the WebView level editablity which is persistent no matter whether
              underlying document itself is changed and editability gets lost. The resolution is to
              set this WebView editable value to WebCore. This avoids the callback from WebCore to
              WebKit which was the main goal in r79953 to improve performance.
      
              * WebCore.exp.in:
              * accessibility/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::isReadOnly):
              * dom/Node.cpp:
              (WebCore::Node::isContentEditable):
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::setSelectionFromNone):
              * page/DragController.cpp:
              (WebCore::DragController::operationForLoad):
              * page/Page.cpp:
              (WebCore::Page::Page):
              * page/Page.h:
              (WebCore::Page::setEditable):
              (WebCore::Page::isEditable):
      2011-03-21  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Alexey Proskuryakov.
      
              REGRESSION (r79953): Can't type in MS Outlook 2011
              https://bugs.webkit.org/show_bug.cgi?id=56665
      
              r79953 removed the WebView level editablity which is persistent no matter whether
              underlying document itself is changed and editability gets lost. The resolution is to
              set this WebView editable value to WebCore. This avoids the callback from WebCore to
              WebKit which was the main goal in r79953 to improve performance.
      
              * webkit/webkitwebview.cpp:
              (webkit_web_view_get_editable):
              (webkit_web_view_set_editable):
      2011-03-21  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Alexey Proskuryakov.
      
              REGRESSION (r79953): Can't type in MS Outlook 2011
              https://bugs.webkit.org/show_bug.cgi?id=56665
      
              r79953 removed the WebView level editablity which is persistent no matter whether
              underlying document itself is changed and editability gets lost. The resolution is to
              set this WebView editable value to WebCore. This avoids the callback from WebCore to
              WebKit which was the main goal in r79953 to improve performance.
      
              * WebView/WebView.mm:
              (-[WebView setEditable:]):
              (-[WebView isEditable]):
      2011-03-21  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Alexey Proskuryakov.
      
              REGRESSION (r79953): Can't type in MS Outlook 2011
              https://bugs.webkit.org/show_bug.cgi?id=56665
      
              r79953 removed the WebView level editablity which is persistent no matter whether
              underlying document itself is changed and editability gets lost. The resolution is to
              set this WebView editable value to WebCore. This avoids the callback from WebCore to
              WebKit which was the main goal in r79953 to improve performance.
      
              * Api/qwebpage.cpp:
              (QWebPage::setContentEditable):
              (QWebPage::isContentEditable):
      2011-03-21  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Alexey Proskuryakov.
      
              REGRESSION (r79953): Can't type in MS Outlook 2011
              https://bugs.webkit.org/show_bug.cgi?id=56665
      
              r79953 removed the WebView level editablity which is persistent no matter whether
              underlying document itself is changed and editability gets lost. The resolution is to
              set this WebView editable value to WebCore. This avoids the callback from WebCore to
              WebKit which was the main goal in r79953 to improve performance.
      
              * WebFrame.cpp:
              (wxWebFrame::MakeEditable):
              (wxWebFrame::IsEditable):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81600 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f52c4946
  8. 14 Mar, 2011 1 commit
  9. 28 Feb, 2011 1 commit
    • commit-queue@webkit.org's avatar
      2011-02-28 Chang Shu <cshu@webkit.org> · 83c267fc
      commit-queue@webkit.org authored
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Updated expected results after the change that syncs the WebKit isEditable
              and WebCore isContentEditable.
      
              * platform/mac/editing/selection/designmode-no-caret-expected.txt:
      2011-02-28  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Frame::isContentEditable is currently based on two things: Editor::clientIsEditable and
              Document::inDesignMode. In fact, it should only rely on Document::inDesignMode. As a result,
              Editor::clientIsEditable and its client-side implementation can be removed.
      
              * WebCore.exp.in:
              * accessibility/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::isReadOnly):
              * editing/Editor.cpp:
              * editing/Editor.h:
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::setSelectionFromNone):
              * html/HTMLElement.cpp:
              (WebCore::HTMLElement::isContentEditable):
              (WebCore::HTMLElement::isContentRichlyEditable):
              * page/DragController.cpp:
              (WebCore::DragController::operationForLoad):
              * page/EditorClient.h:
              * page/Frame.cpp:
              * page/Frame.h:
      2011-02-28  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Remove the WebKit side implementation.
      
              * src/EditorClientImpl.cpp:
              * src/EditorClientImpl.h:
      2011-02-28  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Remove the WebKit side implementation.
      
              * WebCoreSupport/EditorClientEfl.cpp:
              * WebCoreSupport/EditorClientEfl.h:
      2011-02-28  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Remove the WebKit side implementation. Make WebKit support depend on Document::inDesignMode.
      
              * WebCoreSupport/EditorClientGtk.cpp:
              * WebCoreSupport/EditorClientGtk.h:
              * webkit/webkitwebview.cpp:
              (webkit_web_view_init):
              (webkit_web_view_get_editable):
              (webkit_web_view_set_editable):
              * webkit/webkitwebviewprivate.h:
      2011-02-28  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Remove the WebKit side implementation.
      
              * WebCoreSupport/EditorClientHaiku.cpp:
              * WebCoreSupport/EditorClientHaiku.h:
      2011-02-28  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Remove the WebKit side implementation. Make WebKit support depend on Document::inDesignMode.
      
              * WebCoreSupport/WebEditorClient.h:
              * WebCoreSupport/WebEditorClient.mm:
              * WebView/WebView.mm:
              (-[WebView setEditable:]):
              (-[WebView isEditable]):
              * WebView/WebViewData.h:
      2011-02-28  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Remove the WebKit side implementation. Make WebKit support depend on Document::inDesignMode.
      
              * Api/qwebpage.cpp:
              (QWebPagePrivate::QWebPagePrivate):
              (QWebPage::setContentEditable):
              (QWebPage::isContentEditable):
              * Api/qwebpage_p.h:
              * WebCoreSupport/EditorClientQt.cpp:
              * WebCoreSupport/EditorClientQt.h:
      2011-02-28  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Remove the WebKit side implementation.
      
              * WebCoreSupport/WebEditorClient.cpp:
              * WebCoreSupport/WebEditorClient.h:
      2011-02-28  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Remove the WebKit side implementation.
      
              * WebCoreSupport/EditorClientWinCE.cpp:
              * WebCoreSupport/EditorClientWinCE.h:
      2011-02-28  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Remove the WebKit side implementation. Make WebKit support depend on Document::inDesignMode.
      
              * WebFrame.cpp:
              (wxWebFrame::wxWebFrame):
              (wxWebFrame::MakeEditable):
              (wxWebFrame::IsEditable):
              * WebFrame.h:
              * WebKitSupport/EditorClientWx.cpp:
              * WebKitSupport/EditorClientWx.h:
              * WebView.cpp:
              (wxWebView::wxWebView):
              * WebView.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79953 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      83c267fc
  10. 21 Feb, 2011 1 commit
    • rniwa@webkit.org's avatar
      2011-02-17 Ryosuke Niwa <rniwa@webkit.org> · 62b16970
      rniwa@webkit.org authored
              Reviewed by Kent Tamura.
      
              Rename Position::node() to Position::deprecatedNode()
              https://bugs.webkit.org/show_bug.cgi?id=54622
      
              Done the rename. All calls to node() are replaced by calls to deprecatedNode().
      
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::setComposition): Check the nullity of startContainer() instead of startPosition()->node().
              (WebKit::WebViewImpl::confirmComposition): Ditto.
              (WebKit::WebViewImpl::textInputType):
              (WebKit::WebViewImpl::caretOrSelectionBounds):
      2011-02-17  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Kent Tamura.
      
              Rename Position::node() to Position::deprecatedNode()
              https://bugs.webkit.org/show_bug.cgi?id=54622
      
              Replaced the call to node() by a call to containerNode() because the returned node is
              used to determine whether or not the selected contents are editable and such a check
              must be done against the container node.
      
              * WebCoreSupport/EditorClientQt.cpp:
              (WebCore::EditorClientQt::handleKeyboardEvent):
      2011-02-17  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Kent Tamura.
      
              Rename Position::node() to Position::deprecatedNode()
              https://bugs.webkit.org/show_bug.cgi?id=54622
      
              Done the rename. All calls to node() are replaced by calls to deprecatedNode().
      
              * webkit/webkitwebview.cpp:
              (webkit_web_view_popup_menu_handler):
      2011-02-17  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Kent Tamura.
      
              Rename Position::node() to Position::deprecatedNode()
              https://bugs.webkit.org/show_bug.cgi?id=54622
      
              * WebView/WebFrame.mm:
              (-[WebFrame _smartDeleteRangeForProposedRange:]):
      2011-02-17  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Kent Tamura.
      
              Rename Position::node() to Position::deprecatedNode()
              https://bugs.webkit.org/show_bug.cgi?id=54622
      
              Replaced the call to node() by a call to containerNode() because the returned node is
              used to determine whether or not the selected contents are editable and such a check
              must be done against the container node.
      
              * WebCoreSupport/EditorClientHaiku.cpp:
              (WebCore::EditorClientHaiku::handleKeyboardEvent):
      2011-02-17  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Kent Tamura.
      
              Rename Position::node() to Position::deprecatedNode()
              https://bugs.webkit.org/show_bug.cgi?id=54622
      
              Done the rename. All calls to node() are replaced by calls to deprecatedNode() except when
              calls were of the form node()->document() and node()->inDocument() in which case they were
              replaced by anchorNode()->document() and anchorNode()->inDocument() respectively.
      
              * WebCore.exp.in: Added Position::containerNode.
      
              The rest abbreviated for simplicity. Please see svn log.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      62b16970
  11. 19 Feb, 2011 1 commit
  12. 15 Feb, 2011 2 commits
    • darin@apple.com's avatar
      2011-02-15 Jia Pu <jpu@apple.com> · 060d7a1a
      darin@apple.com authored
              Reviewed by Darin Adler.
      
              Autocorrection should respect undo.
              https://bugs.webkit.org/show_bug.cgi?id=52221
              <rdar://problem/8663399>
      
              Please see WebCore/ChangeLog for detailed description.
      
              * WebCoreSupport/WebEditorClient.cpp:
              (WebFrameImpl::replaceSelection): Adopted new signature of ReplaceSelectionCommand::create().
      2011-02-15  Jia Pu  <jpu@apple.com>
      
              Reviewed by Darin Adler.
      
              Autocorrection should respect undo.
              https://bugs.webkit.org/show_bug.cgi?id=52221
              <rdar://problem/8663399>
      
              Please see WebCore/ChangeLog for detailed description.
      
              * WebCoreSupport/WebEditorClient.h: Updated for the new function declared in EditorClient.
      
              * WebCoreSupport/WebEditorClient.mm:
              (WebEditorClient::recordAutocorrectionResponse): Ditto.
      
              * WebView/WebFrame.mm:
              (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
                   Adopted new signature of ReplaceSelectionCommand::create().
      2011-02-15  Jia Pu  <jpu@apple.com>
      
              Reviewed by Darin Adler.
      
              Autocorrection should respect undo.
              https://bugs.webkit.org/show_bug.cgi?id=52221
              <rdar://problem/8663399>
      
              Manual test: manual-tests/autocorrection/undo-autocorrection.html
      
              When user undoes an autocorrection, we need to do four things:
              1. Revert the change in text that has been made by correction.
              2. Revert the selection to pre-correction state so that user can immediately continue typing.
              3. Add appropriate markers to reverted text so that it won't be corrected again and/or shown
                 as misspelled.
              4. If applicable, notify spell checking service to record this reversion.
      
              To achieve these, this patch introduces following changes:
              1. Created SpellingCorrectionCommand so that correction can be undone in similar way as any
                 other editing command. SpellingCorrectionCommand is a composition of SetSelectionCommand,
                 SpellingCorrectionRecordUndoCommand and ReplaceSelectionCommand.
              2. Created SetSelectionCommand so that undo command can restore selection state.
              3. Added member function recordAutocorrectionResponse() to editor client.
      
              To improve readability, this patch also consolidates various boolean arguments in SelectionController::setSelection()
              and ReplaceSelectionCommand::ReplaceSelectionCommand(). These boolean arguments have been
              replaced by enum variable.
      
              * WebCore.exp.in: Updated for changes in Editor and ReplaceSelectionCommand.
      
              * WebCore.xcodeproj/project.pbxproj: Updated for new source files.
      
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::moveParagraphs): Adopted new signature of ReplaceSelectionCommand::create().
      
              * editing/Editor.cpp:
              (WebCore::Editor::replaceSelectionWithFragment): Ditto.
              (WebCore::Editor::unappliedEditing): Cleaned up trailing whitespace.
              (WebCore::Editor::reappliedEditing): Ditto.
              (WebCore::Editor::selectComposition): Adopted new signature of SelectionController::setSelection().
              (WebCore::Editor::confirmComposition): Ditto.
              (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Rearranged code to reduce the
                  level of deeply nested if statement. Adopted SpellingCorrectionCommand.
              (WebCore::Editor::applyCorrectionPanelInfo): Adopted SpellingCorrectionCommand.
              (WebCore::Editor::unappliedSpellCorrection): Function for adding markers to reverted text and
                  for notifiying editor client about undone correction.
              (WebCore::Editor::changeSelectionAfterCommand): Adopted new signature of SelectionController::setSelection().
              (WebCore::Editor::respondToChangedSelection): Use SelectionController::SetSelectionOptions
                  instead of boolean variables.
      
              * editing/Editor.h: Added Editor::unappliedSpellCorrection().
      
              * editing/EditorCommand.cpp:
              (WebCore::executeInsertFragment): Adopted new signature of ReplaceSelectionCommand::create().
      
              * editing/MoveSelectionCommand.cpp:
              (WebCore::MoveSelectionCommand::doApply): Ditto.
      
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand): Replaced all boolean arguments
                  with an enum value.
      
              * editing/ReplaceSelectionCommand.h:
              (WebCore::ReplaceSelectionCommand::create): Ditto.
      
              * editing/SelectionController.cpp: Adopted new signature of SelectionController::setSelection().
              (WebCore::SelectionController::moveTo):
              (WebCore::SelectionController::setSelection):
              (WebCore::SelectionController::respondToNodeModification):
              (WebCore::SelectionController::setBase):
              (WebCore::SelectionController::setExtent):
              (WebCore::SelectionController::setSelectedRange):
      
              * editing/SelectionController.h:
              (WebCore::SelectionController::setSelection): Replaced all boolean arguments with an enum value.
      
              * editing/SetSelectionCommand.cpp: Added.
              (WebCore::SetSelectionCommand::SetSelectionCommand):
              (WebCore::SetSelectionCommand::doApply):
              (WebCore::SetSelectionCommand::doUnapply):
      
              * editing/SetSelectionCommand.h: Added.
              (WebCore::SetSelectionCommand::create):
      
              * editing/mac/SpellingCorrectionCommand.cpp: Added.
              (WebCore::SpellingCorrectionRecordUndoCommand::create):
              (WebCore::SpellingCorrectionRecordUndoCommand::SpellingCorrectionRecordUndoCommand):
              (WebCore::SpellingCorrectionRecordUndoCommand::doApply):
              (WebCore::SpellingCorrectionRecordUndoCommand::doUnapply):
              (WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand):
              (WebCore::SpellingCorrectionCommand::doApply):
      
              * editing/mac/SpellingCorrectionCommand.h: Added.
              (WebCore::SpellingCorrectionCommand::create):
      
              * loader/EmptyClients.h: Updated for the new function declared in EditorClient.
              (WebCore::EmptyEditorClient::recordAutocorrectionResponse):
      
              * manual-tests/autocorrection/undo-autocorrection.html: Added.
      
              * page/ContextMenuController.cpp:
              (WebCore::ContextMenuController::contextMenuItemSelected): Adopted new signature of ReplaceSelectionCommand::create().
      
              * page/DragController.cpp:
              (WebCore::DragController::concludeEditDrag): Ditto.
      
              * page/EditorClient.h: Added EditorClient::recordAutocorrectionResponse().
      2011-02-15  Jia Pu  <jpu@apple.com>
      
              Reviewed by Darin Adler.
      
              Autocorrection should respect undo.
              https://bugs.webkit.org/show_bug.cgi?id=52221
              <rdar://problem/8663399>
      
              Please see WebCore/ChangeLog for detailed description.
      
              * WebProcess/WebCoreSupport/WebEditorClient.h: Updated for the new function declared in EditorClient.
      
              * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
              (WebKit::WebEditorClient::recordAutocorrectionResponse): Ditto.
      
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::replaceSelectionWithText): Adopted new signature of ReplaceSelectionCommand::create().
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      060d7a1a
    • andreas.kling@nokia.com's avatar
      2011-02-15 Andreas Kling <kling@webkit.org> · a0943e6e
      andreas.kling@nokia.com authored
              Reviewed by Darin Adler.
      
              Rename Color::name() to Color::nameForRenderTreeAsText()
              https://bugs.webkit.org/show_bug.cgi?id=54464
      
              Color::name() returns the color as either #RRGGBB or #RRGGBBAA.
              Since the latter is not a valid CSS color, it can't be re-parsed
              by WebKit, and should only be used in DRT dumps.
      
              * editing/ApplyStyleCommand.cpp:
              (WebCore::StyleChange::extractTextStyles):
              * page/DragController.cpp:
              (WebCore::DragController::concludeEditDrag):
              * platform/graphics/Color.cpp:
              (WebCore::Color::nameForRenderTreeAsText):
              * platform/graphics/Color.h:
              * platform/graphics/GraphicsLayer.cpp:
              (WebCore::GraphicsLayer::dumpProperties):
              * platform/graphics/filters/FEFlood.cpp:
              (WebCore::FEFlood::externalRepresentation):
              * rendering/RenderTreeAsText.cpp:
              (WebCore::RenderTreeAsText::writeRenderObject):
              * rendering/svg/SVGRenderTreeAsText.cpp:
              (WebCore::operator<<):
              (WebCore::writeRenderSVGTextBox):
              * svg/SVGAnimateElement.cpp:
              (WebCore::SVGAnimateElement::applyResultsToTarget):
              * svg/SVGColor.cpp:
              (WebCore::SVGColor::cssText):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78590 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a0943e6e
  13. 07 Feb, 2011 1 commit
    • enrica@apple.com's avatar
      Reviewed Adam Roben and Darin Adler. · 3492e98b
      enrica@apple.com authored
      Source/WebCore: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      <rdar://problem/8514409>
      
      * loader/EmptyClients.h: Removed createDragImageFromLink.
      * page/DragClient.h: Ditto.
      * page/DragController.cpp:
      (WebCore::DragController::startDrag): changed call to createDragImageFromLink.
      * platform/DragImage.h:
      * platform/mac/DragImageMac.mm:
      (WebCore::createDragImageForLink): Moved from DragClient.
      * platform/win/ClipboardUtilitiesWin.cpp: Added a series of functions
      to de-serialize the drag data from the map into an IDataObject.
      (WebCore::getWebLocData):
      (WebCore::texthtmlFormat):
      (WebCore::createGlobalData):
      (WebCore::getFullCFHTML):
      (WebCore::urlWFormat):
      (WebCore::urlFormat):
      (WebCore::filenameWFormat):
      (WebCore::filenameFormat):
      (WebCore::htmlFormat):
      (WebCore::smartPasteFormat):
      (WebCore::getURL):
      (WebCore::getPlainText):
      (WebCore::getTextHTML):
      (WebCore::ClipboardDataItem::ClipboardDataItem):
      (WebCore::getStringData):
      (WebCore::getUtf8Data):
      (WebCore::getCFData):
      (WebCore::setUCharData):
      (WebCore::setCharData):
      (WebCore::setCFData):
      (WebCore::getClipboardMap):
      (WebCore::getClipboardData):
      (WebCore::setClipboardData):
      * platform/win/ClipboardUtilitiesWin.h:
      * platform/win/DragImageWin.cpp: Moved createDragImageForLink from DragClient
      to a platform specific file in WebCore. It makes a lot more sense here, since
      the drag image is always created in WebCore for all the other content types
      except for links.
      (WebCore::dragLabelFont):
      (WebCore::createDragImageForLink):
      * platform/win/WCDataObject.cpp: Added new way to
      construct a WCDataObject from a DragDataMap.
      (WebCore::WCDataObject::createInstance):
      (WebCore::WCDataObject::clearData):
      * platform/win/WCDataObject.h:
      
      Source/WebKit/chromium: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      
      Removed createDragImageForLink from DragClient.
              
      * src/DragClientImpl.cpp:
      * src/DragClientImpl.h:
      
      Source/WebKit/efl: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      
      Removed createDragImageForLink from DragClient.
      
      * WebCoreSupport/DragClientEfl.cpp:
      * WebCoreSupport/DragClientEfl.h:
      
      Source/WebKit/gtk: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      
      Removed createDragImageForLink from DragClient.
      
      * WebCoreSupport/DragClientGtk.cpp:
      * WebCoreSupport/DragClientGtk.h:
      
      Source/WebKit/haiku: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      
      Removed createDragImageForLink from DragClient.
      
      * WebCoreSupport/DragClientHaiku.cpp:
      * WebCoreSupport/DragClientHaiku.h:
      
      Source/WebKit/mac: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      
      Removed createDragImageForLink from DragClient.
      
      * WebCoreSupport/WebDragClient.h:
      * WebCoreSupport/WebDragClient.mm:
      (WebDragClient::startDrag):
      
      Source/WebKit/qt: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      
      Removed createDragImageForLink from DragClient.
      
      * WebCoreSupport/DragClientQt.cpp:
      * WebCoreSupport/DragClientQt.h:
      
      Source/WebKit/win: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      
      Removed createDragImageForLink from DragClient.
      
      * WebCoreSupport/WebDragClient.cpp:
      (WebDragClient::startDrag):
      * WebCoreSupport/WebDragClient.h:
      
      Source/WebKit/wince: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      
      Removed createDragImageForLink from DragClient.
      
      * WebCoreSupport/DragClientWinCE.cpp:
      * WebCoreSupport/DragClientWinCE.h:
      
      Source/WebKit/wx: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      
      Removed createDragImageForLink from DragClient.
      
      * WebKitSupport/DragClientWx.cpp:
      * WebKitSupport/DragClientWx.h:
      
      Source/WebKit2: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      <rdar://problem/8514409>
              
      This patch contains the remaining work to support
      a WebKit window as drag source on Windows.
      I've added the code to generate the image for dragging a link as
      well as the steps necessary to package the HBITMAP into a SharedMemory
      object and send it over to the UI process where DoDragDrop is performed.
      
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::setDragImage):
      (WebKit::WebPageProxy::startDragDrop):
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * WebProcess/WebCoreSupport/WebDragClient.cpp:
      (WebKit::WebDragClient::startDrag): Made startDrag for
      platforms other than Windows and Mac.
      * WebProcess/WebCoreSupport/WebDragClient.h:
      * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
      (WebKit::WebDragClient::startDrag):
      * WebProcess/WebCoreSupport/win/WebDragClientWin.cpp: Added.
      (WebKit::draggingSourceOperationMaskToDragCursors):
      (WebKit::WebDragClient::startDrag):
      * WebProcess/WebCoreSupport/win/WebDragSource.cpp: Added.
      This object implements the IDropSource interface.
      (WebDragSource::createInstance):
      (WebDragSource::WebDragSource):
      (WebDragSource::QueryInterface):
      (WebDragSource::AddRef):
      (WebDragSource::Release):
      (WebDragSource::QueryContinueDrag):
      (WebDragSource::GiveFeedback):
      * WebProcess/WebCoreSupport/win/WebDragSource.h: Added.
      * win/WebKit2.vcproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3492e98b
  14. 01 Feb, 2011 1 commit
    • hyatt@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=53520 · aa0cba07
      hyatt@apple.com authored
              
      Reviewed by Oliver Hunt.
      
      Remove the physical terminology from IntRect and FloatRect.
              
      Now that we have flipped RenderBlocks for vertical-rl and horizontal-bt writing modes,
      we need to update our terminology to be more accurate.
      
      I'm borrowing a page from AppKit here (which also supports flipped NSViews) and
      renaming right() and bottom() to maxX() and maxY().  These terms remain accurate
      even for flipped rectangles.
      
      ../WebCore: 
      
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
      * accessibility/mac/AccessibilityObjectWrapper.mm:
      (-[AccessibilityObjectWrapper position]):
      * dom/ClientRect.h:
      (WebCore::ClientRect::right):
      (WebCore::ClientRect::bottom):
      * html/HTMLCanvasElement.cpp:
      (WebCore::HTMLCanvasElement::convertLogicalToDevice):
      * html/canvas/CanvasRenderingContext2D.cpp:
      (WebCore::normalizeRect):
      * inspector/InspectorAgent.cpp:
      (WebCore::InspectorAgent::drawElementTitle):
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::adjustWindowRect):
      * page/DragController.cpp:
      (WebCore::dragLocForSelectionDrag):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::sendContextMenuEventForKey):
      * page/PrintContext.cpp:
      (WebCore::PrintContext::computePageRectsWithPageSizeInternal):
      (WebCore::PrintContext::pageNumberForElement):
      * page/SpatialNavigation.cpp:
      (WebCore::end):
      (WebCore::areRectsFullyAligned):
      (WebCore::areRectsMoreThanFullScreenApart):
      (WebCore::below):
      (WebCore::rightOf):
      (WebCore::isRectInDirection):
      (WebCore::entryAndExitPointsForDirection):
      (WebCore::virtualRectForDirection):
      * page/WindowFeatures.cpp:
      (WebCore::WindowFeatures::WindowFeatures):
      * platform/ScrollView.cpp:
      (WebCore::ScrollView::wheelEvent):
      * platform/Scrollbar.cpp:
      (WebCore::Scrollbar::setFrameRect):
      * platform/ScrollbarThemeComposite.cpp:
      (WebCore::ScrollbarThemeComposite::splitTrack):
      * platform/chromium/ScrollbarThemeChromium.cpp:
      (WebCore::ScrollbarThemeChromium::paintTickmarks):
      * platform/graphics/FloatQuad.h:
      (WebCore::FloatQuad::FloatQuad):
      * platform/graphics/FloatRect.cpp:
      (WebCore::FloatRect::intersects):
      (WebCore::FloatRect::contains):
      (WebCore::FloatRect::intersect):
      (WebCore::FloatRect::unite):
      (WebCore::enclosingIntRect):
      * platform/graphics/FloatRect.h:
      (WebCore::FloatRect::maxX):
      (WebCore::FloatRect::maxY):
      (WebCore::FloatRect::contains):
      * platform/graphics/IntRect.cpp:
      (WebCore::IntRect::intersects):
      (WebCore::IntRect::contains):
      (WebCore::IntRect::intersect):
      (WebCore::IntRect::unite):
      * platform/graphics/IntRect.h:
      (WebCore::IntRect::maxX):
      (WebCore::IntRect::maxY):
      (WebCore::IntRect::shiftXEdgeTo):
      (WebCore::IntRect::shiftMaxXEdgeTo):
      (WebCore::IntRect::shiftYEdgeTo):
      (WebCore::IntRect::shiftMaxYEdgeTo):
      (WebCore::IntRect::contains):
      * platform/graphics/WidthIterator.cpp:
      (WebCore::WidthIterator::advance):
      * platform/graphics/cg/GraphicsContextCG.cpp:
      (WebCore::GraphicsContext::drawRect):
      (WebCore::GraphicsContext::fillPath):
      (WebCore::GraphicsContext::fillRect):
      * platform/graphics/cg/ImageBufferCG.cpp:
      (WebCore::getImageData):
      (WebCore::putImageData):
      * platform/graphics/cg/ImageCG.cpp:
      (WebCore::BitmapImage::draw):
      * platform/graphics/filters/FilterEffect.cpp:
      (WebCore::FilterEffect::copyImageBytes):
      * platform/graphics/mac/ComplexTextController.cpp:
      (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
      * platform/graphics/mac/SimpleFontDataMac.mm:
      (WebCore::SimpleFontData::platformBoundsForGlyph):
      * platform/graphics/transforms/AffineTransform.cpp:
      (WebCore::AffineTransform::mapRect):
      * platform/graphics/win/FontCGWin.cpp:
      (WebCore::drawGDIGlyphs):
      * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
      (WebCore::MediaPlayerPrivate::paint):
      * platform/gtk/RenderThemeGtk.cpp:
      (WebCore::centerRectVerticallyInParentInputElement):
      * platform/mac/WidgetMac.mm:
      (WebCore::Widget::paint):
      * rendering/InlineFlowBox.cpp:
      (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
      (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
      * rendering/InlineTextBox.cpp:
      (WebCore::InlineTextBox::selectionRect):
      (WebCore::InlineTextBox::paint):
      (WebCore::InlineTextBox::positionForOffset):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::addOverflowFromChildren):
      (WebCore::RenderBlock::paintChildren):
      (WebCore::RenderBlock::paintEllipsisBoxes):
      (WebCore::RenderBlock::inlineSelectionGaps):
      (WebCore::RenderBlock::adjustPointToColumnContents):
      (WebCore::RenderBlock::flipForWritingModeIncludingColumns):
      (WebCore::RenderBlock::adjustForColumns):
      * rendering/RenderBlock.h:
      (WebCore::RenderBlock::FloatingObject::right):
      (WebCore::RenderBlock::FloatingObject::bottom):
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::reflectedRect):
      (WebCore::RenderBox::localCaretRect):
      (WebCore::RenderBox::addShadowOverflow):
      (WebCore::RenderBox::addLayoutOverflow):
      (WebCore::RenderBox::visualOverflowRectForPropagation):
      (WebCore::RenderBox::layoutOverflowRectForPropagation):
      (WebCore::RenderBox::flipForWritingMode):
      * rendering/RenderFrameSet.cpp:
      (WebCore::RenderFrameSet::paintColumnBorder):
      (WebCore::RenderFrameSet::paintRowBorder):
      * rendering/RenderInline.cpp:
      (WebCore::RenderInline::paintOutlineForLine):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::getRectToExpose):
      (WebCore::cornerRect):
      (WebCore::RenderLayer::positionOverflowControls):
      (WebCore::RenderLayer::overflowBottom):
      (WebCore::RenderLayer::overflowRight):
      (WebCore::RenderLayer::paintResizer):
      * rendering/RenderLineBoxList.cpp:
      (WebCore::RenderLineBoxList::rangeIntersectsRect):
      (WebCore::RenderLineBoxList::paint):
      * rendering/RenderListItem.cpp:
      (WebCore::RenderListItem::positionListMarker):
      * rendering/RenderListMarker.cpp:
      (WebCore::RenderListMarker::paint):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
      * rendering/RenderOverflow.h:
      (WebCore::RenderOverflow::RenderOverflow):
      (WebCore::RenderOverflow::addLayoutOverflow):
      (WebCore::RenderOverflow::addVisualOverflow):
      (WebCore::RenderOverflow::setLayoutOverflow):
      (WebCore::RenderOverflow::setVisualOverflow):
      (WebCore::RenderOverflow::resetLayoutOverflow):
      * rendering/RenderReplaced.cpp:
      (WebCore::RenderReplaced::shouldPaint):
      * rendering/RenderScrollbarTheme.cpp:
      (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
      * rendering/RenderTable.cpp:
      (WebCore::RenderTable::paint):
      * rendering/RenderTableCell.cpp:
      (WebCore::RenderTableCell::paint):
      * rendering/RenderTableSection.cpp:
      (WebCore::RenderTableSection::paintObject):
      * rendering/RenderText.cpp:
      (WebCore::RenderText::absoluteQuads):
      * rendering/RenderTextControlSingleLine.cpp:
      (WebCore::RenderTextControlSingleLine::forwardEvent):
      * rendering/RenderThemeMac.mm:
      (WebCore::RenderThemeMac::paintMenuListButtonGradients):
      (WebCore::RenderThemeMac::paintMenuListButton):
      (WebCore::RenderThemeMac::paintSliderTrack):
      * rendering/RenderView.cpp:
      (WebCore::RenderView::computeRectForRepaint):
      (WebCore::RenderView::docBottom):
      (WebCore::RenderView::docRight):
      * rendering/RootInlineBox.cpp:
      (WebCore::RootInlineBox::paddedLayoutOverflowRect):
      * rendering/svg/RenderSVGInlineText.cpp:
      (WebCore::RenderSVGInlineText::localCaretRect):
      
      ../WebKit/mac: 
      
      * WebView/WebHTMLView.mm:
      (setNeedsDisplayInRect):
      
      ../WebKit2: 
      
      * Platform/Region.cpp:
      (WebKit::Region::Shape::Shape):
      * UIProcess/API/mac/WKPrintingView.mm:
      (pageDidComputePageRects):
      * UIProcess/FindIndicator.cpp:
      (WebKit::FindIndicator::draw):
      * UIProcess/TiledDrawingAreaProxy.cpp:
      (WebKit::TiledDrawingAreaProxy::invalidate):
      (WebKit::TiledDrawingAreaProxy::paint):
      (WebKit::TiledDrawingAreaProxy::createTiles):
      * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
      (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
      * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
      (WebKit::NetscapePlugin::callSetWindow):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aa0cba07
  15. 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
  16. 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
  17. 08 Jan, 2011 1 commit
  18. 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
  19. 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
  20. 03 Dec, 2010 1 commit
  21. 12 Nov, 2010 1 commit
  22. 17 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
  23. 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
  24. 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
  25. 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
  26. 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
  27. 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
  28. 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
  29. 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
  30. 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
  31. 24 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
  32. 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
  33. 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
  34. 28 Apr, 2010 2 commits
  35. 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
  36. 14 Mar, 2010 2 commits
    • 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
    • jberlin@webkit.org's avatar
      "event.ctrlKey" is always false when dragging an element with "ctrl" key down · aa8a6e34
      jberlin@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=17113
      
      Reviewed by Sam Weinig.
      
      No new tests.
      
      * page/DragController.cpp:
      (WebCore::createMouseEvent):
      Use the current state of the shift, ctrl, alt, and meta keys when creating the drag mouse event.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55974 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aa8a6e34