2011-05-05 Ryosuke Niwa <rniwa@webkit.org>
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 May 2011 18:14:43 +0000 (18:14 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 May 2011 18:14:43 +0000 (18:14 +0000)
        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: https://svn.webkit.org/repository/webkit/trunk@85864 268f45cc-cd09-0410-ab3c-d52691b4dbfc

93 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.pro
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
Source/WebCore/bindings/objc/ExceptionHandlers.h
Source/WebCore/css/CSSStyleSelector.cpp
Source/WebCore/dom/ContainerNode.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/InputElement.cpp
Source/WebCore/editing/DeleteButtonController.cpp
Source/WebCore/editing/EditCommand.cpp
Source/WebCore/editing/EditingAllInOne.cpp
Source/WebCore/editing/EditingStyle.cpp
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/Editor.h
Source/WebCore/editing/EditorCommand.cpp
Source/WebCore/editing/FrameSelection.cpp [moved from Source/WebCore/editing/SelectionController.cpp with 89% similarity]
Source/WebCore/editing/FrameSelection.h [moved from Source/WebCore/editing/SelectionController.h with 93% similarity]
Source/WebCore/editing/ModifySelectionListLevel.cpp
Source/WebCore/editing/RemoveFormatCommand.cpp
Source/WebCore/editing/ReplaceSelectionCommand.cpp
Source/WebCore/editing/SetSelectionCommand.cpp
Source/WebCore/editing/SetSelectionCommand.h
Source/WebCore/editing/SpellingCorrectionCommand.cpp
Source/WebCore/editing/SpellingCorrectionController.cpp
Source/WebCore/editing/TypingCommand.cpp
Source/WebCore/editing/chromium/FrameSelectionChromium.cpp [moved from Source/WebCore/editing/chromium/SelectionControllerChromium.cpp with 95% similarity]
Source/WebCore/editing/gtk/FrameSelectionGtk.cpp [moved from Source/WebCore/editing/gtk/SelectionControllerGtk.cpp with 97% similarity]
Source/WebCore/editing/mac/EditorMac.mm
Source/WebCore/editing/mac/FrameSelectionMac.mm [moved from Source/WebCore/editing/mac/SelectionControllerMac.mm with 97% similarity]
Source/WebCore/editing/qt/EditorQt.cpp
Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp
Source/WebCore/page/ContextMenuController.cpp
Source/WebCore/page/DOMSelection.cpp
Source/WebCore/page/DragController.cpp
Source/WebCore/page/DragController.h
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/EventHandler.h
Source/WebCore/page/FocusController.cpp
Source/WebCore/page/Frame.cpp
Source/WebCore/page/Frame.h
Source/WebCore/page/Page.cpp
Source/WebCore/page/Page.h
Source/WebCore/page/chromium/DragControllerChromium.cpp
Source/WebCore/page/chromium/EventHandlerChromium.cpp
Source/WebCore/page/win/DragControllerWin.cpp
Source/WebCore/page/win/EventHandlerWin.cpp
Source/WebCore/rendering/HitTestResult.cpp
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderImage.cpp
Source/WebCore/rendering/RenderInline.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderListBox.cpp
Source/WebCore/rendering/RenderObjectChildList.cpp
Source/WebCore/rendering/RenderTextControl.cpp
Source/WebCore/rendering/RenderTextControlSingleLine.cpp
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/rendering/RenderTreeAsText.cpp
Source/WebCore/svg/SVGSVGElement.cpp
Source/WebCore/svg/SVGTextContentElement.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebFrameImpl.cpp
Source/WebKit/chromium/src/WebViewImpl.cpp
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/webkit/webkitwebview.cpp
Source/WebKit/haiku/ChangeLog
Source/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebFrame.mm
Source/WebKit/mac/WebView/WebFrameInternal.h
Source/WebKit/mac/WebView/WebHTMLView.mm
Source/WebKit/mac/WebView/WebTextCompletionController.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/qt/Api/qwebframe.cpp
Source/WebKit/qt/ChangeLog
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebView.cpp
Source/WebKit/wince/ChangeLog
Source/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp
Source/WebKit/wx/ChangeLog
Source/WebKit/wx/WebDOMSelection.cpp
Source/WebKit/wx/WebDOMSelection.h
Source/WebKit/wx/WebKitSupport/EditorClientWx.cpp
Source/WebKit/wx/WebView.cpp

index e1bf995..c54b2ee 100644 (file)
@@ -652,6 +652,7 @@ SET(WebCore_SOURCES
     editing/Editor.cpp
     editing/EditorCommand.cpp
     editing/FormatBlockCommand.cpp
+    editing/FrameSelection.cpp
     editing/HTMLInterchange.cpp
     editing/IndentOutdentCommand.cpp
     editing/InsertIntoTextNodeCommand.cpp
@@ -671,7 +672,6 @@ SET(WebCore_SOURCES
     editing/RemoveNodePreservingChildrenCommand.cpp
     editing/ReplaceNodeWithSpanCommand.cpp
     editing/ReplaceSelectionCommand.cpp
-    editing/SelectionController.cpp
     editing/SetNodeAttributeCommand.cpp
     editing/SmartReplace.cpp
     editing/SpellChecker.cpp
index a830ca6..dcd7d15 100644 (file)
@@ -1,3 +1,243 @@
+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):
+
 2011-05-05  Brent Fulgham  <bfulgham@webkit.org>
 
         [WinCairo] unreviewed build correction.
index e771d2e..b040f95 100644 (file)
@@ -1323,7 +1323,9 @@ webcore_sources += \
        Source/WebCore/editing/FindOptions.h \
        Source/WebCore/editing/FormatBlockCommand.cpp \
        Source/WebCore/editing/FormatBlockCommand.h \
-       Source/WebCore/editing/gtk/SelectionControllerGtk.cpp \
+       Source/WebCore/editing/FrameSelection.cpp \
+       Source/WebCore/editing/FrameSelection.h \
+       Source/WebCore/editing/gtk/FrameSelectionGtk.cpp \
        Source/WebCore/editing/htmlediting.cpp \
        Source/WebCore/editing/htmlediting.h \
        Source/WebCore/editing/HTMLInterchange.cpp \
@@ -1366,8 +1368,6 @@ webcore_sources += \
        Source/WebCore/editing/ReplaceNodeWithSpanCommand.h \
        Source/WebCore/editing/ReplaceSelectionCommand.cpp \
        Source/WebCore/editing/ReplaceSelectionCommand.h \
-       Source/WebCore/editing/SelectionController.cpp \
-       Source/WebCore/editing/SelectionController.h \
        Source/WebCore/editing/SetNodeAttributeCommand.cpp \
        Source/WebCore/editing/SetNodeAttributeCommand.h \
        Source/WebCore/editing/SmartReplace.cpp \
index dea8950..a43841d 100644 (file)
@@ -348,6 +348,15 @@ __ZN7WebCore14DocumentLoaderC1ERKNS_15ResourceRequestERKNS_14SubstituteDataE
 __ZN7WebCore14DocumentLoaderC2ERKNS_15ResourceRequestERKNS_14SubstituteDataE
 __ZN7WebCore14DocumentLoaderD2Ev
 __ZN7WebCore14DocumentWriter11setEncodingERKN3WTF6StringEb
+__ZN7WebCore14FrameSelection10setFocusedEb
+__ZN7WebCore14FrameSelection12setSelectionERKNS_16VisibleSelectionEjNS0_19CursorAlignOnScrollENS_15TextGranularityENS_20DirectionalityPolicyE
+__ZN7WebCore14FrameSelection15revealSelectionERKNS_15ScrollAlignmentEb
+__ZN7WebCore14FrameSelection16setSelectedRangeEPNS_5RangeENS_9EAffinityEb
+__ZN7WebCore14FrameSelection20setSelectionFromNoneEv
+__ZN7WebCore14FrameSelection6modifyENS0_11EAlterationENS_18SelectionDirectionENS_15TextGranularityEb
+__ZN7WebCore14FrameSelection5clearEv
+__ZN7WebCore14FrameSelection9selectAllEv
+__ZN7WebCore14FrameSelectionC1EPNS_5FrameEb
 __ZN7WebCore14ResourceHandle12releaseProxyEv
 __ZN7WebCore14ResourceHandle20forceContentSniffingEv
 __ZN7WebCore14ResourceLoader14cancelledErrorEv
@@ -520,15 +529,6 @@ __ZN7WebCore19ResourceRequestBase22defaultTimeoutIntervalEv
 __ZN7WebCore19ResourceRequestBase24s_defaultTimeoutIntervalE
 __ZN7WebCore19ResourceRequestBase25setDefaultTimeoutIntervalEd
 __ZN7WebCore19ResourceRequestBase6setURLERKNS_4KURLE
-__ZN7WebCore19SelectionController10setFocusedEb
-__ZN7WebCore19SelectionController12setSelectionERKNS_16VisibleSelectionEjNS0_19CursorAlignOnScrollENS_15TextGranularityENS_20DirectionalityPolicyE
-__ZN7WebCore19SelectionController15revealSelectionERKNS_15ScrollAlignmentEb
-__ZN7WebCore19SelectionController16setSelectedRangeEPNS_5RangeENS_9EAffinityEb
-__ZN7WebCore19SelectionController20setSelectionFromNoneEv
-__ZN7WebCore19SelectionController5clearEv
-__ZN7WebCore19SelectionController6modifyENS0_11EAlterationENS_18SelectionDirectionENS_15TextGranularityEb
-__ZN7WebCore19SelectionController9selectAllEv
-__ZN7WebCore19SelectionControllerC1EPNS_5FrameEb
 __ZN7WebCore19TextResourceDecoder5flushEv
 __ZN7WebCore19TextResourceDecoder6decodeEPKcm
 __ZN7WebCore19TextResourceDecoderC1ERKN3WTF6StringERKNS_12TextEncodingEb
@@ -1117,6 +1117,12 @@ __ZNK7WebCore14DocumentLoader19originalRequestCopyEv
 __ZNK7WebCore14DocumentLoader21isLoadingMainResourceEv
 __ZNK7WebCore14DocumentLoader28urlForHistoryReflectsFailureEv
 __ZNK7WebCore14DocumentLoader3urlEv
+__ZNK7WebCore14FrameSelection11currentFormEv
+__ZNK7WebCore14FrameSelection15copyTypingStyleEv
+__ZNK7WebCore14FrameSelection17isInPasswordFieldEv
+__ZNK7WebCore14FrameSelection18isFocusedAndActiveEv
+__ZNK7WebCore14FrameSelection31getClippedVisibleTextRectanglesERN3WTF6VectorINS_9FloatRectELm0EEE
+__ZNK7WebCore14FrameSelection6boundsEb
 __ZNK7WebCore14RenderListItem10markerTextEv
 __ZNK7WebCore14ResourceHandle10connectionEv
 __ZNK7WebCore14ResourceLoader11frameLoaderEv
@@ -1157,12 +1163,6 @@ __ZNK7WebCore19ResourceRequestBase15httpHeaderFieldEPKc
 __ZNK7WebCore19ResourceRequestBase3urlEv
 __ZNK7WebCore19ResourceRequestBase6isNullEv
 __ZNK7WebCore19ResourceRequestBase7isEmptyEv
-__ZNK7WebCore19SelectionController11currentFormEv
-__ZNK7WebCore19SelectionController15copyTypingStyleEv
-__ZNK7WebCore19SelectionController17isInPasswordFieldEv
-__ZNK7WebCore19SelectionController18isFocusedAndActiveEv
-__ZNK7WebCore19SelectionController31getClippedVisibleTextRectanglesERN3WTF6VectorINS_9FloatRectELm0EEE
-__ZNK7WebCore19SelectionController6boundsEb
 __ZNK7WebCore20HTMLTableCellElement9cellAboveEv
 __ZNK7WebCore20ResourceResponseBase14httpStatusCodeEv
 __ZNK7WebCore20ResourceResponseBase14httpStatusTextEv
index 842966a..9f2fcb6 100644 (file)
             'editing/EditorDeleteAction.h',
             'editing/EditorInsertAction.h',
             'editing/FindOptions.h',
+            'editing/FrameSelection.h',
             'editing/HTMLInterchange.h',
             'editing/MoveSelectionCommand.h',
             'editing/ReplaceSelectionCommand.h',
-            'editing/SelectionController.h',
             'editing/SmartReplace.h',
             'editing/SpellChecker.h',
             'editing/TextAffinity.h',
             'editing/EditorCommand.cpp',
             'editing/FormatBlockCommand.cpp',
             'editing/FormatBlockCommand.h',
+            'editing/FrameSelection.cpp',
             'editing/HTMLInterchange.cpp',
             'editing/IndentOutdentCommand.cpp',
             'editing/IndentOutdentCommand.h',
             'editing/ReplaceNodeWithSpanCommand.cpp',
             'editing/ReplaceNodeWithSpanCommand.h',
             'editing/ReplaceSelectionCommand.cpp',
-            'editing/SelectionController.cpp',
             'editing/SetNodeAttributeCommand.cpp',
             'editing/SetNodeAttributeCommand.h',
             'editing/SetSelectionCommand.cpp',
             'editing/android/EditorAndroid.cpp',
             'editing/brew/EditorBrew.cpp',
             'editing/chromium/EditorChromium.cpp',
-            'editing/chromium/SelectionControllerChromium.cpp',
-            'editing/gtk/SelectionControllerGtk.cpp',
+            'editing/chromium/FrameSelectionChromium.cpp',
+            'editing/gtk/FrameSelectionGtk.cpp',
             'editing/haiku/EditorHaiku.cpp',
             'editing/htmlediting.cpp',
             'editing/mac/EditorMac.mm',
-            'editing/mac/SelectionControllerMac.mm',
+            'editing/mac/FrameSelectionMac.mm',
             'editing/markup.cpp',
             'editing/qt/EditorQt.cpp',
             'editing/qt/SmartReplaceQt.cpp',
index 9b11109..8482c03 100644 (file)
@@ -572,6 +572,7 @@ SOURCES += \
     editing/Editor.cpp \
     editing/EditorCommand.cpp \
     editing/FormatBlockCommand.cpp \
+    editing/FrameSelection.cpp \
     editing/htmlediting.cpp \
     editing/HTMLInterchange.cpp \
     editing/IndentOutdentCommand.cpp \
@@ -593,7 +594,6 @@ SOURCES += \
     editing/RemoveNodePreservingChildrenCommand.cpp \
     editing/ReplaceNodeWithSpanCommand.cpp \
     editing/ReplaceSelectionCommand.cpp \
-    editing/SelectionController.cpp \
     editing/SetNodeAttributeCommand.cpp \
     editing/SmartReplaceICU.cpp \
     editing/SpellChecker.cpp \
@@ -1544,6 +1544,7 @@ HEADERS += \
     editing/Editor.h \
     editing/FindOptions.h \
     editing/FormatBlockCommand.h \
+    editing/FrameSelection.h \
     editing/htmlediting.h \
     editing/HTMLInterchange.h \
     editing/IndentOutdentCommand.h \
@@ -1564,7 +1565,6 @@ HEADERS += \
     editing/RemoveNodePreservingChildrenCommand.h \
     editing/ReplaceNodeWithSpanCommand.h \
     editing/ReplaceSelectionCommand.h \
-    editing/SelectionController.h \
     editing/SetNodeAttributeCommand.h \
     editing/SmartReplace.h \
     editing/SpellingCorrectionController.h \
index 9ab104a..e2c8f55 100755 (executable)
                                >
                        </File>
                        <File
-                               RelativePath="..\editing\htmlediting.cpp"
+                               RelativePath="..\editing\FrameSelection.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\htmlediting.h"
+                               RelativePath="..\editing\FrameSelection.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\editing\HTMLInterchange.cpp"
+                               RelativePath="..\editing\htmlediting.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\HTMLInterchange.h"
+                               RelativePath="..\editing\htmlediting.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\editing\IndentOutdentCommand.cpp"
+                               RelativePath="..\editing\HTMLInterchange.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\IndentOutdentCommand.h"
+                               RelativePath="..\editing\HTMLInterchange.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\editing\InsertIntoTextNodeCommand.cpp"
+                               RelativePath="..\editing\IndentOutdentCommand.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\InsertIntoTextNodeCommand.h"
+                               RelativePath="..\editing\IndentOutdentCommand.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\editing\InsertLineBreakCommand.cpp"
+                               RelativePath="..\editing\InsertIntoTextNodeCommand.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\InsertLineBreakCommand.h"
+                               RelativePath="..\editing\InsertIntoTextNodeCommand.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\editing\InsertListCommand.cpp"
+                               RelativePath="..\editing\InsertLineBreakCommand.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\InsertListCommand.h"
+                               RelativePath="..\editing\InsertLineBreakCommand.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\editing\InsertNodeBeforeCommand.cpp"
+                               RelativePath="..\editing\InsertListCommand.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\InsertNodeBeforeCommand.h"
+                               RelativePath="..\editing\InsertListCommand.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\editing\InsertParagraphSeparatorCommand.cpp"
+                               RelativePath="..\editing\InsertNodeBeforeCommand.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\InsertParagraphSeparatorCommand.h"
+                               RelativePath="..\editing\InsertNodeBeforeCommand.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\editing\InsertTextCommand.cpp"
+                               RelativePath="..\editing\InsertParagraphSeparatorCommand.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\InsertTextCommand.h"
+                               RelativePath="..\editing\InsertParagraphSeparatorCommand.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\editing\JoinTextNodesCommand.cpp"
+                               RelativePath="..\editing\InsertTextCommand.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\JoinTextNodesCommand.h"
+                               RelativePath="..\editing\InsertTextCommand.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\editing\markup.cpp"
+                               RelativePath="..\editing\JoinTextNodesCommand.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\markup.h"
+                               RelativePath="..\editing\JoinTextNodesCommand.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\editing\MarkupAccumulator.cpp"
+                               RelativePath="..\editing\markup.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\MarkupAccumulator.h"
+                               RelativePath="..\editing\markup.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\editing\MergeIdenticalElementsCommand.cpp"
+                               RelativePath="..\editing\MarkupAccumulator.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\MergeIdenticalElementsCommand.h"
+                               RelativePath="..\editing\MarkupAccumulator.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\editing\ModifySelectionListLevel.cpp"
+                               RelativePath="..\editing\MergeIdenticalElementsCommand.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\ModifySelectionListLevel.h"
+                               RelativePath="..\editing\MergeIdenticalElementsCommand.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\editing\MoveSelectionCommand.cpp"
+                               RelativePath="..\editing\ModifySelectionListLevel.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\MoveSelectionCommand.h"
+                               RelativePath="..\editing\ModifySelectionListLevel.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\editing\RemoveCSSPropertyCommand.cpp"
+                               RelativePath="..\editing\MoveSelectionCommand.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\RemoveCSSPropertyCommand.h"
+                               RelativePath="..\editing\MoveSelectionCommand.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\editing\RemoveFormatCommand.cpp"
+                               RelativePath="..\editing\RemoveCSSPropertyCommand.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\RemoveNodeCommand.cpp"
+                               RelativePath="..\editing\RemoveCSSPropertyCommand.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\editing\RemoveFormatCommand.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\RemoveNodeCommand.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\editing\RemoveNodePreservingChildrenCommand.cpp"
+                               RelativePath="..\editing\RemoveNodeCommand.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\RemoveNodePreservingChildrenCommand.h"
+                               RelativePath="..\editing\RemoveNodeCommand.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\editing\ReplaceNodeWithSpanCommand.cpp"
+                               RelativePath="..\editing\RemoveNodePreservingChildrenCommand.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\ReplaceNodeWithSpanCommand.h"
+                               RelativePath="..\editing\RemoveNodePreservingChildrenCommand.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\editing\ReplaceSelectionCommand.cpp"
+                               RelativePath="..\editing\ReplaceNodeWithSpanCommand.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\ReplaceSelectionCommand.h"
+                               RelativePath="..\editing\ReplaceNodeWithSpanCommand.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\editing\SelectionController.cpp"
+                               RelativePath="..\editing\ReplaceSelectionCommand.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\editing\SelectionController.h"
+                               RelativePath="..\editing\ReplaceSelectionCommand.h"
                                >
                        </File>
                        <File
index 02421b5..439e313 100644 (file)
                49FFBF4011C93EE3006A7118 /* WebGLLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 49FFBF3E11C93EE3006A7118 /* WebGLLayer.mm */; };
                4A0DA2FE129B241900AB61E1 /* FormAssociatedElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A0DA2FC129B241900AB61E1 /* FormAssociatedElement.cpp */; };
                4A0DA2FF129B241900AB61E1 /* FormAssociatedElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A0DA2FD129B241900AB61E1 /* FormAssociatedElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               4A8C96EB0BE69032004EEFF0 /* SelectionControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A8C96EA0BE69032004EEFF0 /* SelectionControllerMac.mm */; };
+               4A8C96EB0BE69032004EEFF0 /* FrameSelectionMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A8C96EA0BE69032004EEFF0 /* FrameSelectionMac.mm */; };
                4ACBC0BE12713CBD0094F9B2 /* ClassList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4ACBC0BC12713CBD0094F9B2 /* ClassList.cpp */; };
                4ACBC0BF12713CBD0094F9B2 /* ClassList.h in Headers */ = {isa = PBXBuildFile; fileRef = 4ACBC0BD12713CBD0094F9B2 /* ClassList.h */; };
                4ACBC0C312713CCA0094F9B2 /* DOMSettableTokenList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4ACBC0C012713CCA0094F9B2 /* DOMSettableTokenList.cpp */; };
                93309E07099E64920056E581 /* RemoveNodePreservingChildrenCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DB8099E64910056E581 /* RemoveNodePreservingChildrenCommand.h */; };
                93309E09099E64920056E581 /* ReplaceSelectionCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DBA099E64910056E581 /* ReplaceSelectionCommand.cpp */; };
                93309E0A099E64920056E581 /* ReplaceSelectionCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DBB099E64910056E581 /* ReplaceSelectionCommand.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               93309E0D099E64920056E581 /* SelectionController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DBE099E64910056E581 /* SelectionController.cpp */; };
-               93309E0E099E64920056E581 /* SelectionController.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DBF099E64910056E581 /* SelectionController.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               93309E0D099E64920056E581 /* FrameSelection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DBE099E64910056E581 /* FrameSelection.cpp */; };
+               93309E0E099E64920056E581 /* FrameSelection.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DBF099E64910056E581 /* FrameSelection.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93309E0F099E64920056E581 /* SetNodeAttributeCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DC0099E64910056E581 /* SetNodeAttributeCommand.cpp */; };
                93309E10099E64920056E581 /* SetNodeAttributeCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DC1099E64910056E581 /* SetNodeAttributeCommand.h */; };
                93309E11099E64920056E581 /* SplitElementCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DC2099E64910056E581 /* SplitElementCommand.cpp */; };
                49FFBF3E11C93EE3006A7118 /* WebGLLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebGLLayer.mm; sourceTree = "<group>"; };
                4A0DA2FC129B241900AB61E1 /* FormAssociatedElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FormAssociatedElement.cpp; sourceTree = "<group>"; };
                4A0DA2FD129B241900AB61E1 /* FormAssociatedElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FormAssociatedElement.h; sourceTree = "<group>"; };
-               4A8C96EA0BE69032004EEFF0 /* SelectionControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = SelectionControllerMac.mm; path = mac/SelectionControllerMac.mm; sourceTree = "<group>"; };
+               4A8C96EA0BE69032004EEFF0 /* FrameSelectionMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = FrameSelectionMac.mm; path = mac/FrameSelectionMac.mm; sourceTree = "<group>"; };
                4ACBC0BC12713CBD0094F9B2 /* ClassList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClassList.cpp; sourceTree = "<group>"; };
                4ACBC0BD12713CBD0094F9B2 /* ClassList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClassList.h; sourceTree = "<group>"; };
                4ACBC0C012713CCA0094F9B2 /* DOMSettableTokenList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMSettableTokenList.cpp; sourceTree = "<group>"; };
                93309DB8099E64910056E581 /* RemoveNodePreservingChildrenCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoveNodePreservingChildrenCommand.h; sourceTree = "<group>"; };
                93309DBA099E64910056E581 /* ReplaceSelectionCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReplaceSelectionCommand.cpp; sourceTree = "<group>"; };
                93309DBB099E64910056E581 /* ReplaceSelectionCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReplaceSelectionCommand.h; sourceTree = "<group>"; };
-               93309DBE099E64910056E581 /* SelectionController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SelectionController.cpp; sourceTree = "<group>"; };
-               93309DBF099E64910056E581 /* SelectionController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectionController.h; sourceTree = "<group>"; };
+               93309DBE099E64910056E581 /* FrameSelection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FrameSelection.cpp; sourceTree = "<group>"; };
+               93309DBF099E64910056E581 /* FrameSelection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FrameSelection.h; sourceTree = "<group>"; };
                93309DC0099E64910056E581 /* SetNodeAttributeCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SetNodeAttributeCommand.cpp; sourceTree = "<group>"; };
                93309DC1099E64910056E581 /* SetNodeAttributeCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SetNodeAttributeCommand.h; sourceTree = "<group>"; };
                93309DC2099E64910056E581 /* SplitElementCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SplitElementCommand.cpp; sourceTree = "<group>"; };
                                372C00D8129619F8005C9575 /* FindOptions.h */,
                                D05CED270A40BB2C00C5AF38 /* FormatBlockCommand.cpp */,
                                D05CED280A40BB2C00C5AF38 /* FormatBlockCommand.h */,
+                               93309DBE099E64910056E581 /* FrameSelection.cpp */,
+                               93309DBF099E64910056E581 /* FrameSelection.h */,
                                93309D98099E64910056E581 /* htmlediting.cpp */,
                                93309D99099E64910056E581 /* htmlediting.h */,
                                93309D96099E64910056E581 /* HTMLInterchange.cpp */,
                                A89CCC510F44E98100B5DA10 /* ReplaceNodeWithSpanCommand.h */,
                                93309DBA099E64910056E581 /* ReplaceSelectionCommand.cpp */,
                                93309DBB099E64910056E581 /* ReplaceSelectionCommand.h */,
-                               93309DBE099E64910056E581 /* SelectionController.cpp */,
-                               93309DBF099E64910056E581 /* SelectionController.h */,
                                93309DC0099E64910056E581 /* SetNodeAttributeCommand.cpp */,
                                93309DC1099E64910056E581 /* SetNodeAttributeCommand.h */,
                                B8DBDB47130B0F8A00F5CDB1 /* SetSelectionCommand.cpp */,
                        isa = PBXGroup;
                        children = (
                                ED501DC50B249F2900AE18D9 /* EditorMac.mm */,
-                               4A8C96EA0BE69032004EEFF0 /* SelectionControllerMac.mm */,
+                               4A8C96EA0BE69032004EEFF0 /* FrameSelectionMac.mm */,
                        );
                        name = mac;
                        sourceTree = "<group>";
                                93B77A380ADD792500EA4B81 /* FrameLoaderTypes.h in Headers */,
                                658436860AE01B7400E53753 /* FrameLoadRequest.h in Headers */,
                                628D214E12131EF40055DCFC /* FrameNetworkingContext.h in Headers */,
+                               93309E0E099E64920056E581 /* FrameSelection.h in Headers */,
                                65A21485097A3F5300B9050A /* FrameTree.h in Headers */,
                                65CBFEFA0974F607001DAC25 /* FrameView.h in Headers */,
                                97205AB0123928CA00B17380 /* FTPDirectoryDocument.h in Headers */,
                                371F4FFC0D25E7F300ECE0D5 /* SegmentedFontData.h in Headers */,
                                B2C3DA2F0D006C1D00EF6F26 /* SegmentedString.h in Headers */,
                                084AEBE50FB505FA0038483E /* SelectElement.h in Headers */,
-                               93309E0E099E64920056E581 /* SelectionController.h in Headers */,
                                BC7FA6810D1F167900DB22A9 /* SelectorNodeList.h in Headers */,
                                A75E497610752ACB00C9B896 /* SerializedScriptValue.h in Headers */,
                                93309E10099E64920056E581 /* SetNodeAttributeCommand.h in Headers */,
                                932E16090AF578340025F408 /* FrameLoader.cpp in Sources */,
                                D000EBA211BDAFD400C47726 /* FrameLoaderStateMachine.cpp in Sources */,
                                65BF02450974819000C43196 /* FrameMac.mm in Sources */,
+                               93309E0D099E64920056E581 /* FrameSelection.cpp in Sources */,
+                               4A8C96EB0BE69032004EEFF0 /* FrameSelectionMac.mm in Sources */,
                                65A21484097A3F5300B9050A /* FrameTree.cpp in Sources */,
                                65CBFEF90974F607001DAC25 /* FrameView.cpp in Sources */,
                                97205AAF123928CA00B17380 /* FTPDirectoryDocument.cpp in Sources */,
                                371F4FFD0D25E7F300ECE0D5 /* SegmentedFontData.cpp in Sources */,
                                B2C3DA2E0D006C1D00EF6F26 /* SegmentedString.cpp in Sources */,
                                084AEBE40FB505FA0038483E /* SelectElement.cpp in Sources */,
-                               93309E0D099E64920056E581 /* SelectionController.cpp in Sources */,
-                               4A8C96EB0BE69032004EEFF0 /* SelectionControllerMac.mm in Sources */,
                                BC7FA6820D1F167900DB22A9 /* SelectorNodeList.cpp in Sources */,
                                A75E497710752ACB00C9B896 /* SerializedScriptValue.cpp in Sources */,
                                93309E0F099E64920056E581 /* SetNodeAttributeCommand.cpp in Sources */,
index e3c4c27..5081f6a 100644 (file)
@@ -35,6 +35,7 @@
 #include "FocusController.h"
 #include "Frame.h"
 #include "FrameLoader.h"
+#include "FrameSelection.h"
 #include "LocalizedStrings.h"
 #include "NodeList.h"
 #include "NotImplemented.h"
@@ -47,7 +48,6 @@
 #include "RenderTheme.h"
 #include "RenderView.h"
 #include "RenderWidget.h"
-#include "SelectionController.h"
 #include "TextIterator.h"
 #include "htmlediting.h"
 #include "visible_units.h"
index 25078c5..fbaadec 100644 (file)
@@ -36,6 +36,7 @@
 #include "FloatRect.h"
 #include "Frame.h"
 #include "FrameLoader.h"
+#include "FrameSelection.h"
 #include "HTMLAreaElement.h"
 #include "HTMLFormElement.h"
 #include "HTMLFrameElementBase.h"
@@ -71,7 +72,6 @@
 #include "RenderView.h"
 #include "RenderWidget.h"
 #include "SelectElement.h"
-#include "SelectionController.h"
 #include "Text.h"
 #include "TextIterator.h"
 #include "htmlediting.h"
@@ -2439,9 +2439,9 @@ VisiblePositionRange AccessibilityRenderObject::visiblePositionRangeForLine(unsi
     // NOTE: ignores results of sel.modify because it returns false when
     // starting at an empty line.  The resulting selection in that case
     // will be a caret at visiblePos.
-    SelectionController selection;
+    FrameSelection selection;
     selection.setSelection(VisibleSelection(visiblePos));
-    selection.modify(SelectionController::AlterationExtend, DirectionRight, LineBoundary);
+    selection.modify(FrameSelection::AlterationExtend, DirectionRight, LineBoundary);
     
     return VisiblePositionRange(selection.selection().visibleStart(), selection.selection().visibleEnd());
 }
index 8877862..80e267c 100644 (file)
@@ -45,6 +45,7 @@
 #import "ColorMac.h"
 #import "Frame.h"
 #import "FrameLoaderClient.h"
+#import "FrameSelection.h"
 #import "HTMLAnchorElement.h"
 #import "HTMLAreaElement.h"
 #import "HTMLFrameOwnerElement.h"
@@ -56,7 +57,6 @@
 #import "RenderView.h"
 #import "RenderWidget.h"
 #import "ScrollView.h"
-#import "SelectionController.h"
 #import "SimpleFontData.h"
 #import "TextCheckerClient.h"
 #import "TextIterator.h"
index 911ae2c..c1c0ba1 100644 (file)
@@ -42,7 +42,7 @@ namespace WebCore {
     
     typedef int ExceptionCode;
     
-    class SelectionController;
+    class FrameSelection;
     class Range;
 
     void raiseDOMException(ExceptionCode);
index 8411815..9b937d0 100644 (file)
@@ -56,6 +56,7 @@
 #include "FontFamilyValue.h"
 #include "FontValue.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "FrameView.h"
 #include "HTMLDocument.h"
 #include "HTMLElement.h"
@@ -83,7 +84,6 @@
 #include "RotateTransformOperation.h"
 #include "ScaleTransformOperation.h"
 #include "SecurityOrigin.h"
-#include "SelectionController.h"
 #include "Settings.h"
 #include "ShadowData.h"
 #include "ShadowValue.h"
index b6afc87..2799aef 100644 (file)
@@ -802,7 +802,7 @@ void ContainerNode::cloneChildNodes(ContainerNode *clone)
     // disable the delete button so it's elements are not serialized into the markup
     bool isEditorEnabled = false;
     if (document()->frame() && document()->frame()->editor()->canEdit()) {
-        SelectionController* selection = document()->frame()->selection();
+        FrameSelection* selection = document()->frame()->selection();
         Element* root = selection ? selection->rootEditableElement() : 0;
         isEditorEnabled = root && isDescendantOf(root);
 
index 5bcea73..ac46bd6 100644 (file)
@@ -69,6 +69,7 @@
 #include "Frame.h"
 #include "FrameLoader.h"
 #include "FrameLoaderClient.h"
+#include "FrameSelection.h"
 #include "FrameTree.h"
 #include "FrameView.h"
 #include "HashChangeEvent.h"
 #include "ScriptRunner.h"
 #include "SecurityOrigin.h"
 #include "SegmentedString.h"
-#include "SelectionController.h"
 #include "Settings.h"
 #include "ShadowRoot.h"
 #include "StaticHashSetNodeList.h"
index bbdf2f4..b7d148c 100644 (file)
@@ -38,9 +38,9 @@
 #include "Event.h"
 #include "EventNames.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "Page.h"
 #include "RenderTextControlSingleLine.h"
-#include "SelectionController.h"
 #include "TextIterator.h"
 
 namespace WebCore {
index 5e76c08..da94b5f 100644 (file)
@@ -35,6 +35,7 @@
 #include "Document.h"
 #include "Editor.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "htmlediting.h"
 #include "HTMLDivElement.h"
 #include "HTMLNames.h"
@@ -43,7 +44,6 @@
 #include "Range.h"
 #include "RemoveNodeCommand.h"
 #include "RenderBox.h"
-#include "SelectionController.h"
 
 namespace WebCore {
 
index 9f8b225..6f9737a 100644 (file)
@@ -33,8 +33,8 @@
 #include "Element.h"
 #include "EventNames.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "ScopedEventQueue.h"
-#include "SelectionController.h"
 #include "VisiblePosition.h"
 #include "htmlediting.h"
 
index f38cbe6..f518512 100644 (file)
@@ -40,6 +40,7 @@
 #include <Editor.cpp>
 #include <EditorCommand.cpp>
 #include <FormatBlockCommand.cpp>
+#include <FrameSelection.cpp>
 #include <HTMLInterchange.cpp>
 #include <IndentOutdentCommand.cpp>
 #include <InsertIntoTextNodeCommand.cpp>
@@ -59,7 +60,6 @@
 #include <RemoveNodePreservingChildrenCommand.cpp>
 #include <ReplaceNodeWithSpanCommand.cpp>
 #include <ReplaceSelectionCommand.cpp>
-#include <SelectionController.cpp>
 #include <SetNodeAttributeCommand.cpp>
 #include <SmartReplace.cpp>
 #include <SmartReplaceCF.cpp>
index 9509ead..2b50008 100644 (file)
 #include "CSSValueKeywords.h"
 #include "CSSValueList.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "HTMLFontElement.h"
 #include "HTMLNames.h"
 #include "Node.h"
 #include "Position.h"
 #include "RenderStyle.h"
-#include "SelectionController.h"
 #include "StyledElement.h"
 #include "htmlediting.h"
 
index c691378..008179c 100644 (file)
@@ -237,7 +237,7 @@ bool Editor::canCopy() const
 {
     if (imageElementFromImageDocument(m_frame->document()))
         return true;
-    SelectionController* selection = m_frame->selection();
+    FrameSelection* selection = m_frame->selection();
     return selection->isRange() && !selection->isInPasswordField();
 }
 
@@ -248,7 +248,7 @@ bool Editor::canPaste() const
 
 bool Editor::canDelete() const
 {
-    SelectionController* selection = m_frame->selection();
+    FrameSelection* selection = m_frame->selection();
     return selection->isRange() && selection->rootEditableElement();
 }
 
@@ -2032,7 +2032,7 @@ void Editor::markMisspellingsAfterTypingToWord(const VisiblePosition &wordStart,
 
         // Reset the charet one character further.
         frame()->selection()->moveTo(frame()->selection()->end());
-        frame()->selection()->modify(SelectionController::AlterationMove, DirectionForward, CharacterGranularity);
+        frame()->selection()->modify(FrameSelection::AlterationMove, DirectionForward, CharacterGranularity);
     }
 
     if (!isGrammarCheckingEnabled())
@@ -2296,11 +2296,11 @@ void Editor::markAllMisspellingsAndBadGrammarInRanges(TextCheckingOptions textCh
             RefPtr<Range> selectionRange = spellingParagraph.subrange(0, selectionOffset);
             m_frame->selection()->moveTo(selectionRange->endPosition(), DOWNSTREAM);
             if (adjustSelectionForParagraphBoundaries)
-                m_frame->selection()->modify(SelectionController::AlterationMove, DirectionForward, CharacterGranularity);
+                m_frame->selection()->modify(FrameSelection::AlterationMove, DirectionForward, CharacterGranularity);
         } else {
             // If this fails for any reason, the fallback is to go one position beyond the last replacement
             m_frame->selection()->moveTo(m_frame->selection()->end());
-            m_frame->selection()->modify(SelectionController::AlterationMove, DirectionForward, CharacterGranularity);
+            m_frame->selection()->modify(FrameSelection::AlterationMove, DirectionForward, CharacterGranularity);
         }
     }
 #else
@@ -2714,11 +2714,11 @@ void Editor::changeSelectionAfterCommand(const VisibleSelection& newSelection, b
     // See <rdar://problem/5729315> Some shouldChangeSelectedDOMRange contain Ranges for selections that are no longer valid
     bool selectionDidNotChangeDOMPosition = newSelection == m_frame->selection()->selection();
     if (selectionDidNotChangeDOMPosition || m_frame->selection()->shouldChangeSelection(newSelection)) {
-        SelectionController::SetSelectionOptions options = 0;
+        FrameSelection::SetSelectionOptions options = 0;
         if (closeTyping)
-            options |= SelectionController::CloseTyping;
+            options |= FrameSelection::CloseTyping;
         if (clearTypingStyle)
-            options |= SelectionController::ClearTypingStyle;
+            options |= FrameSelection::ClearTypingStyle;
         m_frame->selection()->setSelection(newSelection, options);
     }
 
@@ -2726,7 +2726,7 @@ void Editor::changeSelectionAfterCommand(const VisibleSelection& newSelection, b
     // For example when you press return in the following (the caret is marked by ^):
     // <div contentEditable="true"><div>^Hello</div></div>
     // WebCore inserts <div><br></div> *before* the current block, which correctly moves the paragraph down but which doesn't
-    // change the caret's DOM position (["hello", 0]).  In these situations the above SelectionController::setSelection call
+    // change the caret's DOM position (["hello", 0]). In these situations the above FrameSelection::setSelection call
     // does not call EditorClient::respondToChangedSelection(), which, on the Mac, sends selection change notifications and
     // starts a new kill ring sequence, but we want to do these things (matches AppKit).
     if (selectionDidNotChangeDOMPosition)
@@ -3134,11 +3134,11 @@ void Editor::setMarkedTextMatchesAreHighlighted(bool flag)
     m_frame->document()->markers()->repaintMarkers(DocumentMarker::TextMatch);
 }
 
-void Editor::respondToChangedSelection(const VisibleSelection& oldSelection, SelectionController::SetSelectionOptions options)
+void Editor::respondToChangedSelection(const VisibleSelection& oldSelection, FrameSelection::SetSelectionOptions options)
 {
     m_spellingCorrector->stopPendingCorrection(oldSelection);
 
-    bool closeTyping = options & SelectionController::CloseTyping;
+    bool closeTyping = options & FrameSelection::CloseTyping;
     bool isContinuousSpellCheckingEnabled = this->isContinuousSpellCheckingEnabled();
     bool isContinuousGrammarCheckingEnabled = isContinuousSpellCheckingEnabled && isGrammarCheckingEnabled();
     if (isContinuousSpellCheckingEnabled) {
@@ -3153,7 +3153,7 @@ void Editor::respondToChangedSelection(const VisibleSelection& oldSelection, Sel
         }
 
         // Don't check spelling and grammar if the change of selection is triggered by spelling correction itself.
-        bool shouldCheckSpellingAndGrammar = !(options & SelectionController::SpellCorrectionTriggered);
+        bool shouldCheckSpellingAndGrammar = !(options & FrameSelection::SpellCorrectionTriggered);
 
         // When typing we check spelling elsewhere, so don't redo it here.
         // If this is a change in selection resulting from a delete operation,
index c00526c..c02d0ac 100644 (file)
@@ -34,7 +34,7 @@
 #include "EditorDeleteAction.h"
 #include "EditorInsertAction.h"
 #include "FindOptions.h"
-#include "SelectionController.h"
+#include "FrameSelection.h"
 #include "TextChecking.h"
 #include "VisibleSelection.h"
 #include "WritingDirection.h"
@@ -355,7 +355,7 @@ public:
 
     IntRect firstRectForRange(Range*) const;
 
-    void respondToChangedSelection(const VisibleSelection& oldSelection, SelectionController::SetSelectionOptions);
+    void respondToChangedSelection(const VisibleSelection& oldSelection, FrameSelection::SetSelectionOptions);
     bool shouldChangeSelection(const VisibleSelection& oldSelection, const VisibleSelection& newSelection, EAffinity, bool stillSelecting) const;
 
     RenderStyle* styleForSelectionStart(Node*& nodeToRemove) const;
index ea90616..ab11bdb 100644 (file)
@@ -376,7 +376,7 @@ static bool executeDeleteToMark(Frame* frame, Event*, EditorCommandSource, const
 {
     RefPtr<Range> mark = frame->editor()->mark().toNormalizedRange();
     if (mark) {
-        SelectionController* selection = frame->selection();
+        FrameSelection* selection = frame->selection();
         bool selected = selection->setSelectedRange(unionDOMRanges(mark.get(), frame->editor()->selectedRange().get()).get(), DOWNSTREAM, true);
         ASSERT(selected);
         if (!selected)
@@ -606,47 +606,47 @@ static bool executeMakeTextWritingDirectionRightToLeft(Frame* frame, Event*, Edi
 
 static bool executeMoveBackward(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationMove, DirectionBackward, CharacterGranularity, true);
+    frame->selection()->modify(FrameSelection::AlterationMove, DirectionBackward, CharacterGranularity, true);
     return true;
 }
 
 static bool executeMoveBackwardAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionBackward, CharacterGranularity, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionBackward, CharacterGranularity, true);
     return true;
 }
 
 static bool executeMoveDown(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    return frame->selection()->modify(SelectionController::AlterationMove, DirectionForward, LineGranularity, true);
+    return frame->selection()->modify(FrameSelection::AlterationMove, DirectionForward, LineGranularity, true);
 }
 
 static bool executeMoveDownAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionForward, LineGranularity, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionForward, LineGranularity, true);
     return true;
 }
 
 static bool executeMoveForward(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationMove, DirectionForward, CharacterGranularity, true);
+    frame->selection()->modify(FrameSelection::AlterationMove, DirectionForward, CharacterGranularity, true);
     return true;
 }
 
 static bool executeMoveForwardAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionForward, CharacterGranularity, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionForward, CharacterGranularity, true);
     return true;
 }
 
 static bool executeMoveLeft(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    return frame->selection()->modify(SelectionController::AlterationMove, DirectionLeft, CharacterGranularity, true);
+    return frame->selection()->modify(FrameSelection::AlterationMove, DirectionLeft, CharacterGranularity, true);
 }
 
 static bool executeMoveLeftAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionLeft, CharacterGranularity, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionLeft, CharacterGranularity, true);
     return true;
 }
 
@@ -655,7 +655,7 @@ static bool executeMovePageDown(Frame* frame, Event*, EditorCommandSource, const
     int distance = verticalScrollDistance(frame);
     if (!distance)
         return false;
-    return frame->selection()->modify(SelectionController::AlterationMove, distance, true, SelectionController::AlignCursorOnScrollAlways);
+    return frame->selection()->modify(FrameSelection::AlterationMove, distance, true, FrameSelection::AlignCursorOnScrollAlways);
 }
 
 static bool executeMovePageDownAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
@@ -663,7 +663,7 @@ static bool executeMovePageDownAndModifySelection(Frame* frame, Event*, EditorCo
     int distance = verticalScrollDistance(frame);
     if (!distance)
         return false;
-    return frame->selection()->modify(SelectionController::AlterationExtend, distance, true, SelectionController::AlignCursorOnScrollAlways);
+    return frame->selection()->modify(FrameSelection::AlterationExtend, distance, true, FrameSelection::AlignCursorOnScrollAlways);
 }
 
 static bool executeMovePageUp(Frame* frame, Event*, EditorCommandSource, const String&)
@@ -671,7 +671,7 @@ static bool executeMovePageUp(Frame* frame, Event*, EditorCommandSource, const S
     int distance = verticalScrollDistance(frame);
     if (!distance)
         return false;
-    return frame->selection()->modify(SelectionController::AlterationMove, -distance, true, SelectionController::AlignCursorOnScrollAlways);
+    return frame->selection()->modify(FrameSelection::AlterationMove, -distance, true, FrameSelection::AlignCursorOnScrollAlways);
 }
 
 static bool executeMovePageUpAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
@@ -679,208 +679,208 @@ static bool executeMovePageUpAndModifySelection(Frame* frame, Event*, EditorComm
     int distance = verticalScrollDistance(frame);
     if (!distance)
         return false;
-    return frame->selection()->modify(SelectionController::AlterationExtend, -distance, true, SelectionController::AlignCursorOnScrollAlways);
+    return frame->selection()->modify(FrameSelection::AlterationExtend, -distance, true, FrameSelection::AlignCursorOnScrollAlways);
 }
 
 static bool executeMoveRight(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    return frame->selection()->modify(SelectionController::AlterationMove, DirectionRight, CharacterGranularity, true);
+    return frame->selection()->modify(FrameSelection::AlterationMove, DirectionRight, CharacterGranularity, true);
 }
 
 static bool executeMoveRightAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionRight, CharacterGranularity, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionRight, CharacterGranularity, true);
     return true;
 }
 
 static bool executeMoveToBeginningOfDocument(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationMove, DirectionBackward, DocumentBoundary, true);
+    frame->selection()->modify(FrameSelection::AlterationMove, DirectionBackward, DocumentBoundary, true);
     return true;
 }
 
 static bool executeMoveToBeginningOfDocumentAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionBackward, DocumentBoundary, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionBackward, DocumentBoundary, true);
     return true;
 }
 
 static bool executeMoveToBeginningOfLine(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationMove, DirectionBackward, LineBoundary, true);
+    frame->selection()->modify(FrameSelection::AlterationMove, DirectionBackward, LineBoundary, true);
     return true;
 }
 
 static bool executeMoveToBeginningOfLineAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionBackward, LineBoundary, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionBackward, LineBoundary, true);
     return true;
 }
 
 static bool executeMoveToBeginningOfParagraph(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationMove, DirectionBackward, ParagraphBoundary, true);
+    frame->selection()->modify(FrameSelection::AlterationMove, DirectionBackward, ParagraphBoundary, true);
     return true;
 }
 
 static bool executeMoveToBeginningOfParagraphAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionBackward, ParagraphBoundary, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionBackward, ParagraphBoundary, true);
     return true;
 }
 
 static bool executeMoveToBeginningOfSentence(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationMove, DirectionBackward, SentenceBoundary, true);
+    frame->selection()->modify(FrameSelection::AlterationMove, DirectionBackward, SentenceBoundary, true);
     return true;
 }
 
 static bool executeMoveToBeginningOfSentenceAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionBackward, SentenceBoundary, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionBackward, SentenceBoundary, true);
     return true;
 }
 
 static bool executeMoveToEndOfDocument(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationMove, DirectionForward, DocumentBoundary, true);
+    frame->selection()->modify(FrameSelection::AlterationMove, DirectionForward, DocumentBoundary, true);
     return true;
 }
 
 static bool executeMoveToEndOfDocumentAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionForward, DocumentBoundary, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionForward, DocumentBoundary, true);
     return true;
 }
 
 static bool executeMoveToEndOfSentence(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationMove, DirectionForward, SentenceBoundary, true);
+    frame->selection()->modify(FrameSelection::AlterationMove, DirectionForward, SentenceBoundary, true);
     return true;
 }
 
 static bool executeMoveToEndOfSentenceAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionForward, SentenceBoundary, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionForward, SentenceBoundary, true);
     return true;
 }
 
 static bool executeMoveToEndOfLine(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationMove, DirectionForward, LineBoundary, true);
+    frame->selection()->modify(FrameSelection::AlterationMove, DirectionForward, LineBoundary, true);
     return true;
 }
 
 static bool executeMoveToEndOfLineAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionForward, LineBoundary, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionForward, LineBoundary, true);
     return true;
 }
 
 static bool executeMoveToEndOfParagraph(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationMove, DirectionForward, ParagraphBoundary, true);
+    frame->selection()->modify(FrameSelection::AlterationMove, DirectionForward, ParagraphBoundary, true);
     return true;
 }
 
 static bool executeMoveToEndOfParagraphAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionForward, ParagraphBoundary, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionForward, ParagraphBoundary, true);
     return true;
 }
 
 static bool executeMoveParagraphBackwardAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionBackward, ParagraphGranularity, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionBackward, ParagraphGranularity, true);
     return true;
 }
 
 static bool executeMoveParagraphForwardAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionForward, ParagraphGranularity, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionForward, ParagraphGranularity, true);
     return true;
 }
 
 static bool executeMoveUp(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    return frame->selection()->modify(SelectionController::AlterationMove, DirectionBackward, LineGranularity, true);
+    return frame->selection()->modify(FrameSelection::AlterationMove, DirectionBackward, LineGranularity, true);
 }
 
 static bool executeMoveUpAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionBackward, LineGranularity, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionBackward, LineGranularity, true);
     return true;
 }
 
 static bool executeMoveWordBackward(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationMove, DirectionBackward, WordGranularity, true);
+    frame->selection()->modify(FrameSelection::AlterationMove, DirectionBackward, WordGranularity, true);
     return true;
 }
 
 static bool executeMoveWordBackwardAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionBackward, WordGranularity, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionBackward, WordGranularity, true);
     return true;
 }
 
 static bool executeMoveWordForward(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationMove, DirectionForward, WordGranularity, true);
+    frame->selection()->modify(FrameSelection::AlterationMove, DirectionForward, WordGranularity, true);
     return true;
 }
 
 static bool executeMoveWordForwardAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionForward, WordGranularity, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionForward, WordGranularity, true);
     return true;
 }
 
 static bool executeMoveWordLeft(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationMove, DirectionLeft, WordGranularity, true);
+    frame->selection()->modify(FrameSelection::AlterationMove, DirectionLeft, WordGranularity, true);
     return true;
 }
 
 static bool executeMoveWordLeftAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionLeft, WordGranularity, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionLeft, WordGranularity, true);
     return true;
 }
 
 static bool executeMoveWordRight(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationMove, DirectionRight, WordGranularity, true);
+    frame->selection()->modify(FrameSelection::AlterationMove, DirectionRight, WordGranularity, true);
     return true;
 }
 
 static bool executeMoveWordRightAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionRight, WordGranularity, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionRight, WordGranularity, true);
     return true;
 }
 
 static bool executeMoveToLeftEndOfLine(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationMove, DirectionLeft, LineBoundary, true);
+    frame->selection()->modify(FrameSelection::AlterationMove, DirectionLeft, LineBoundary, true);
     return true;
 }
 
 static bool executeMoveToLeftEndOfLineAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionLeft, LineBoundary, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionLeft, LineBoundary, true);
     return true;
 }
 
 static bool executeMoveToRightEndOfLine(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationMove, DirectionRight, LineBoundary, true);
+    frame->selection()->modify(FrameSelection::AlterationMove, DirectionRight, LineBoundary, true);
     return true;
 }
 
 static bool executeMoveToRightEndOfLineAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
 {
-    frame->selection()->modify(SelectionController::AlterationExtend, DirectionRight, LineBoundary, true);
+    frame->selection()->modify(FrameSelection::AlterationExtend, DirectionRight, LineBoundary, true);
     return true;
 }
 
similarity index 89%
rename from Source/WebCore/editing/SelectionController.cpp
rename to Source/WebCore/editing/FrameSelection.cpp
index 879cb82..288451d 100644 (file)
@@ -24,7 +24,7 @@
  */
   
 #include "config.h"
-#include "SelectionController.h"
+#include "FrameSelection.h"
 
 #include "CharacterData.h"
 #include "DeleteSelectionCommand.h"
@@ -70,11 +70,11 @@ using namespace HTMLNames;
 
 const int NoXPosForVerticalArrowNavigation = INT_MIN;
 
-SelectionController::SelectionController(Frame* frame, bool isDragCaretController)
+FrameSelection::FrameSelection(Frame* frame, bool isDragCaretController)
     : m_frame(frame)
     , m_xPosForVerticalArrowNavigation(NoXPosForVerticalArrowNavigation)
     , m_granularity(CharacterGranularity)
-    , m_caretBlinkTimer(this, &SelectionController::caretBlinkTimerFired)
+    , m_caretBlinkTimer(this, &FrameSelection::caretBlinkTimerFired)
     , m_caretRectNeedsUpdate(true)
     , m_absCaretBoundsDirty(true)
     , m_isDragCaretController(isDragCaretController)
@@ -86,7 +86,7 @@ SelectionController::SelectionController(Frame* frame, bool isDragCaretControlle
     setIsDirectional(false);
 }
 
-void SelectionController::moveTo(const VisiblePosition &pos, bool userTriggered, CursorAlignOnScroll align)
+void FrameSelection::moveTo(const VisiblePosition &pos, bool userTriggered, CursorAlignOnScroll align)
 {
     SetSelectionOptions options = CloseTyping | ClearTypingStyle;
     if (userTriggered)
@@ -94,7 +94,7 @@ void SelectionController::moveTo(const VisiblePosition &pos, bool userTriggered,
     setSelection(VisibleSelection(pos.deepEquivalent(), pos.deepEquivalent(), pos.affinity()), options, align);
 }
 
-void SelectionController::moveTo(const VisiblePosition &base, const VisiblePosition &extent, bool userTriggered)
+void FrameSelection::moveTo(const VisiblePosition &base, const VisiblePosition &extent, bool userTriggered)
 {
     SetSelectionOptions options = CloseTyping | ClearTypingStyle;
     if (userTriggered)
@@ -102,7 +102,7 @@ void SelectionController::moveTo(const VisiblePosition &base, const VisiblePosit
     setSelection(VisibleSelection(base.deepEquivalent(), extent.deepEquivalent(), base.affinity()), options);
 }
 
-void SelectionController::moveTo(const Position &pos, EAffinity affinity, bool userTriggered)
+void FrameSelection::moveTo(const Position &pos, EAffinity affinity, bool userTriggered)
 {
     SetSelectionOptions options = CloseTyping | ClearTypingStyle;
     if (userTriggered)
@@ -110,7 +110,7 @@ void SelectionController::moveTo(const Position &pos, EAffinity affinity, bool u
     setSelection(VisibleSelection(pos, affinity), options);
 }
 
-void SelectionController::moveTo(const Range *r, EAffinity affinity, bool userTriggered)
+void FrameSelection::moveTo(const Range *r, EAffinity affinity, bool userTriggered)
 {
     SetSelectionOptions options = CloseTyping | ClearTypingStyle;
     if (userTriggered)
@@ -119,7 +119,7 @@ void SelectionController::moveTo(const Range *r, EAffinity affinity, bool userTr
     setSelection(selection, options);
 }
 
-void SelectionController::moveTo(const Position &base, const Position &extent, EAffinity affinity, bool userTriggered)
+void FrameSelection::moveTo(const Position &base, const Position &extent, EAffinity affinity, bool userTriggered)
 {
     SetSelectionOptions options = CloseTyping | ClearTypingStyle;
     if (userTriggered)
@@ -127,7 +127,7 @@ void SelectionController::moveTo(const Position &base, const Position &extent, E
     setSelection(VisibleSelection(base, extent, affinity), options);
 }
 
-void SelectionController::setSelection(const VisibleSelection& s, SetSelectionOptions options, CursorAlignOnScroll align, TextGranularity granularity, DirectionalityPolicy directionalityPolicy)
+void FrameSelection::setSelection(const VisibleSelection& s, SetSelectionOptions options, CursorAlignOnScroll align, TextGranularity granularity, DirectionalityPolicy directionalityPolicy)
 {
     m_granularity = granularity;
 
@@ -150,7 +150,7 @@ void SelectionController::setSelection(const VisibleSelection& s, SetSelectionOp
         return;
     }
 
-    // <http://bugs.webkit.org/show_bug.cgi?id=23464>: Infinite recursion at SelectionController::setSelection
+    // <http://bugs.webkit.org/show_bug.cgi?id=23464>: Infinite recursion at FrameSelection::setSelection
     // if document->frame() == m_frame we can get into an infinite loop
     if (s.base().anchorNode()) {
         Document* document = s.base().anchorNode()->document();
@@ -219,7 +219,7 @@ static bool removingNodeRemovesPosition(Node* node, const Position& position)
     return element->contains(position.anchorNode()) || element->contains(position.anchorNode()->shadowAncestorNode());
 }
 
-void SelectionController::nodeWillBeRemoved(Node *node)
+void FrameSelection::nodeWillBeRemoved(Node *node)
 {
     if (isNone())
         return;
@@ -233,7 +233,7 @@ void SelectionController::nodeWillBeRemoved(Node *node)
         removingNodeRemovesPosition(node, m_selection.start()), removingNodeRemovesPosition(node, m_selection.end()));
 }
 
-void SelectionController::respondToNodeModification(Node* node, bool baseRemoved, bool extentRemoved, bool startRemoved, bool endRemoved)
+void FrameSelection::respondToNodeModification(Node* node, bool baseRemoved, bool extentRemoved, bool startRemoved, bool endRemoved)
 {
     bool clearRenderTreeSelection = false;
     bool clearDOMTreeSelection = false;
@@ -295,7 +295,7 @@ static bool shouldRemovePositionAfterAdoptingTextReplacement(Position& position,
     return false;
 }
 
-void SelectionController::textWillBeReplaced(CharacterData* node, unsigned offset, unsigned oldLength, unsigned newLength)
+void FrameSelection::textWillBeReplaced(CharacterData* node, unsigned offset, unsigned oldLength, unsigned newLength)
 {
     // The fragment check is a performance optimization. See http://trac.webkit.org/changeset/30062.
     if (isNone() || !node || highestAncestor(node)->nodeType() == Node::DOCUMENT_FRAGMENT_NODE)
@@ -329,17 +329,17 @@ void SelectionController::textWillBeReplaced(CharacterData* node, unsigned offse
     respondToNodeModification(node, shouldRemoveBase, shouldRemoveExtent, shouldRemoveStart, shouldRemoveEnd);
 }
 
-void SelectionController::setIsDirectional(bool isDirectional)
+void FrameSelection::setIsDirectional(bool isDirectional)
 {
     m_isDirectional = !m_frame || m_frame->editor()->behavior().shouldConsiderSelectionAsDirectional() || isDirectional;
 }
 
-TextDirection SelectionController::directionOfEnclosingBlock()
+TextDirection FrameSelection::directionOfEnclosingBlock()
 {
     return WebCore::directionOfEnclosingBlock(m_selection.extent());
 }
 
-void SelectionController::willBeModified(EAlteration alter, SelectionDirection direction)
+void FrameSelection::willBeModified(EAlteration alter, SelectionDirection direction)
 {
     if (alter != AlterationExtend)
         return;
@@ -388,7 +388,7 @@ void SelectionController::willBeModified(EAlteration alter, SelectionDirection d
     }
 }
 
-VisiblePosition SelectionController::positionForPlatform(bool isGetStart) const
+VisiblePosition FrameSelection::positionForPlatform(bool isGetStart) const
 {
     Settings* settings = m_frame ? m_frame->settings() : 0;
     if (settings && settings->editingBehaviorType() == EditingMacBehavior)
@@ -401,17 +401,17 @@ VisiblePosition SelectionController::positionForPlatform(bool isGetStart) const
     return m_selection.isBaseFirst() ? m_selection.visibleEnd() : m_selection.visibleStart();
 }
 
-VisiblePosition SelectionController::startForPlatform() const
+VisiblePosition FrameSelection::startForPlatform() const
 {
     return positionForPlatform(true);
 }
 
-VisiblePosition SelectionController::endForPlatform() const
+VisiblePosition FrameSelection::endForPlatform() const
 {
     return positionForPlatform(false);
 }
 
-VisiblePosition SelectionController::modifyExtendingRight(TextGranularity granularity)
+VisiblePosition FrameSelection::modifyExtendingRight(TextGranularity granularity)
 {
     VisiblePosition pos(m_selection.extent(), m_selection.affinity());
 
@@ -454,7 +454,7 @@ VisiblePosition SelectionController::modifyExtendingRight(TextGranularity granul
     return pos;
 }
 
-VisiblePosition SelectionController::modifyExtendingForward(TextGranularity granularity)
+VisiblePosition FrameSelection::modifyExtendingForward(TextGranularity granularity)
 {
     VisiblePosition pos(m_selection.extent(), m_selection.affinity());
     switch (granularity) {
@@ -496,7 +496,7 @@ VisiblePosition SelectionController::modifyExtendingForward(TextGranularity gran
     return pos;
 }
 
-VisiblePosition SelectionController::modifyMovingRight(TextGranularity granularity)
+VisiblePosition FrameSelection::modifyMovingRight(TextGranularity granularity)
 {
     VisiblePosition pos;
     switch (granularity) {
@@ -529,7 +529,7 @@ VisiblePosition SelectionController::modifyMovingRight(TextGranularity granulari
     return pos;
 }
 
-VisiblePosition SelectionController::modifyMovingForward(TextGranularity granularity)
+VisiblePosition FrameSelection::modifyMovingForward(TextGranularity granularity)
 {
     VisiblePosition pos;
     // FIXME: Stay in editable content for the less common granularities.
@@ -579,7 +579,7 @@ VisiblePosition SelectionController::modifyMovingForward(TextGranularity granula
     return pos;
 }
 
-VisiblePosition SelectionController::modifyExtendingLeft(TextGranularity granularity)
+VisiblePosition FrameSelection::modifyExtendingLeft(TextGranularity granularity)
 {
     VisiblePosition pos(m_selection.extent(), m_selection.affinity());
 
@@ -621,7 +621,7 @@ VisiblePosition SelectionController::modifyExtendingLeft(TextGranularity granula
     return pos;
 }
        
-VisiblePosition SelectionController::modifyExtendingBackward(TextGranularity granularity)
+VisiblePosition FrameSelection::modifyExtendingBackward(TextGranularity granularity)
 {
     VisiblePosition pos(m_selection.extent(), m_selection.affinity());
 
@@ -667,7 +667,7 @@ VisiblePosition SelectionController::modifyExtendingBackward(TextGranularity gra
     return pos;
 }
 
-VisiblePosition SelectionController::modifyMovingLeft(TextGranularity granularity)
+VisiblePosition FrameSelection::modifyMovingLeft(TextGranularity granularity)
 {
     VisiblePosition pos;
     switch (granularity) {
@@ -700,7 +700,7 @@ VisiblePosition SelectionController::modifyMovingLeft(TextGranularity granularit
     return pos;
 }
 
-VisiblePosition SelectionController::modifyMovingBackward(TextGranularity granularity)
+VisiblePosition FrameSelection::modifyMovingBackward(TextGranularity granularity)
 {
     VisiblePosition pos;
     switch (granularity) {
@@ -749,15 +749,15 @@ static bool isBoundary(TextGranularity granularity)
     return granularity == LineBoundary || granularity == ParagraphBoundary || granularity == DocumentBoundary;
 }    
 
-bool SelectionController::modify(EAlteration alter, SelectionDirection direction, TextGranularity granularity, bool userTriggered)
+bool FrameSelection::modify(EAlteration alter, SelectionDirection direction, TextGranularity granularity, bool userTriggered)
 {
     if (userTriggered) {
-        SelectionController trialSelectionController;
-        trialSelectionController.setSelection(m_selection);
-        trialSelectionController.setIsDirectional(m_isDirectional);
-        trialSelectionController.modify(alter, direction, granularity, false);
+        FrameSelection trialFrameSelection;
+        trialFrameSelection.setSelection(m_selection);
+        trialFrameSelection.setIsDirectional(m_isDirectional);
+        trialFrameSelection.modify(alter, direction, granularity, false);
 
-        bool change = shouldChangeSelection(trialSelectionController.selection());
+        bool change = shouldChangeSelection(trialFrameSelection.selection());
         if (!change)
             return false;
     }
@@ -850,18 +850,18 @@ static bool absoluteCaretY(const VisiblePosition &c, int &y)
     return true;
 }
 
-bool SelectionController::modify(EAlteration alter, int verticalDistance, bool userTriggered, CursorAlignOnScroll align)
+bool FrameSelection::modify(EAlteration alter, int verticalDistance, bool userTriggered, CursorAlignOnScroll align)
 {
     if (!verticalDistance)
         return false;
 
     if (userTriggered) {
-        SelectionController trialSelectionController;
-        trialSelectionController.setSelection(m_selection);
-        trialSelectionController.setIsDirectional(m_isDirectional);
-        trialSelectionController.modify(alter, verticalDistance, false);
+        FrameSelection trialFrameSelection;
+        trialFrameSelection.setSelection(m_selection);
+        trialFrameSelection.setIsDirectional(m_isDirectional);
+        trialFrameSelection.modify(alter, verticalDistance, false);
 
-        bool change = shouldChangeSelection(trialSelectionController.selection());
+        bool change = shouldChangeSelection(trialFrameSelection.selection());
         if (!change)
             return false;
     }
@@ -933,7 +933,7 @@ bool SelectionController::modify(EAlteration alter, int verticalDistance, bool u
     return true;
 }
 
-int SelectionController::xPosForVerticalArrowNavigation(EPositionType type)
+int FrameSelection::xPosForVerticalArrowNavigation(EPositionType type)
 {
     int x = 0;
 
@@ -972,13 +972,13 @@ int SelectionController::xPosForVerticalArrowNavigation(EPositionType type)
     return x;
 }
 
-void SelectionController::clear()
+void FrameSelection::clear()
 {
     m_granularity = CharacterGranularity;
     setSelection(VisibleSelection());
 }
 
-void SelectionController::setStart(const VisiblePosition &pos, bool userTriggered)
+void FrameSelection::setStart(const VisiblePosition &pos, bool userTriggered)
 {
     if (m_selection.isBaseFirst())
         setBase(pos, userTriggered);
@@ -986,7 +986,7 @@ void SelectionController::setStart(const VisiblePosition &pos, bool userTriggere
         setExtent(pos, userTriggered);
 }
 
-void SelectionController::setEnd(const VisiblePosition &pos, bool userTriggered)
+void FrameSelection::setEnd(const VisiblePosition &pos, bool userTriggered)
 {
     if (m_selection.isBaseFirst())
         setExtent(pos, userTriggered);
@@ -994,7 +994,7 @@ void SelectionController::setEnd(const VisiblePosition &pos, bool userTriggered)
         setBase(pos, userTriggered);
 }
 
-void SelectionController::setBase(const VisiblePosition &pos, bool userTriggered)
+void FrameSelection::setBase(const VisiblePosition &pos, bool userTriggered)
 {
     SetSelectionOptions options = CloseTyping | ClearTypingStyle;
     if (userTriggered)
@@ -1002,7 +1002,7 @@ void SelectionController::setBase(const VisiblePosition &pos, bool userTriggered
     setSelection(VisibleSelection(pos.deepEquivalent(), m_selection.extent(), pos.affinity()), options);
 }
 
-void SelectionController::setExtent(const VisiblePosition &pos, bool userTriggered)
+void FrameSelection::setExtent(const VisiblePosition &pos, bool userTriggered)
 {
     SetSelectionOptions options = CloseTyping | ClearTypingStyle;
     if (userTriggered)
@@ -1010,7 +1010,7 @@ void SelectionController::setExtent(const VisiblePosition &pos, bool userTrigger
     setSelection(VisibleSelection(m_selection.base(), pos.deepEquivalent(), pos.affinity()), options);
 }
 
-void SelectionController::setBase(const Position &pos, EAffinity affinity, bool userTriggered)
+void FrameSelection::setBase(const Position &pos, EAffinity affinity, bool userTriggered)
 {
     SetSelectionOptions options = CloseTyping | ClearTypingStyle;
     if (userTriggered)
@@ -1018,7 +1018,7 @@ void SelectionController::setBase(const Position &pos, EAffinity affinity, bool
     setSelection(VisibleSelection(pos, m_selection.extent(), affinity), options);
 }
 
-void SelectionController::setExtent(const Position &pos, EAffinity affinity, bool userTriggered)
+void FrameSelection::setExtent(const Position &pos, EAffinity affinity, bool userTriggered)
 {
     SetSelectionOptions options = CloseTyping | ClearTypingStyle;
     if (userTriggered)
@@ -1026,12 +1026,12 @@ void SelectionController::setExtent(const Position &pos, EAffinity affinity, boo
     setSelection(VisibleSelection(m_selection.base(), pos, affinity), options);
 }
 
-void SelectionController::setCaretRectNeedsUpdate(bool flag)
+void FrameSelection::setCaretRectNeedsUpdate(bool flag)
 {
     m_caretRectNeedsUpdate = flag;
 }
 
-void SelectionController::updateCaretRect()
+void FrameSelection::updateCaretRect()
 {
     if (isNone() || !m_selection.start().anchorNode()->inDocument() || !m_selection.end().anchorNode()->inDocument()) {
         m_caretRect = IntRect();
@@ -1077,7 +1077,7 @@ void SelectionController::updateCaretRect()
     m_caretRectNeedsUpdate = false;
 }
 
-RenderObject* SelectionController::caretRenderer() const
+RenderObject* FrameSelection::caretRenderer() const
 {
     Node* node = m_selection.start().deprecatedNode();
     if (!node)
@@ -1092,7 +1092,7 @@ RenderObject* SelectionController::caretRenderer() const
     return paintedByBlock ? renderer : renderer->containingBlock();
 }
 
-IntRect SelectionController::localCaretRect()
+IntRect FrameSelection::localCaretRect()
 {
     if (m_caretRectNeedsUpdate)
         updateCaretRect();
@@ -1100,7 +1100,7 @@ IntRect SelectionController::localCaretRect()
     return m_caretRect;
 }
 
-IntRect SelectionController::absoluteBoundsForLocalRect(const IntRect& rect) const
+IntRect FrameSelection::absoluteBoundsForLocalRect(const IntRect& rect) const
 {
     RenderObject* caretPainter = caretRenderer();
     if (!caretPainter)
@@ -1112,7 +1112,7 @@ IntRect SelectionController::absoluteBoundsForLocalRect(const IntRect& rect) con
     return caretPainter->localToAbsoluteQuad(FloatRect(localRect)).enclosingBoundingBox();
 }
 
-IntRect SelectionController::absoluteCaretBounds()
+IntRect FrameSelection::absoluteCaretBounds()
 {
     recomputeCaretRect();
     return m_absCaretBounds;
@@ -1128,12 +1128,12 @@ static IntRect repaintRectForCaret(IntRect caret)
     return caret;
 }
 
-IntRect SelectionController::caretRepaintRect() const
+IntRect FrameSelection::caretRepaintRect() const
 {
     return absoluteBoundsForLocalRect(repaintRectForCaret(localCaretRectForPainting()));
 }
 
-bool SelectionController::recomputeCaretRect()
+bool FrameSelection::recomputeCaretRect()
 {
     if (!m_caretRectNeedsUpdate)
         return false;
@@ -1173,7 +1173,7 @@ bool SelectionController::recomputeCaretRect()
     return true;
 }
 
-bool SelectionController::shouldRepaintCaret(const RenderView* view) const
+bool FrameSelection::shouldRepaintCaret(const RenderView* view) const
 {
     ASSERT(view);
     Frame* frame = view->frameView() ? view->frameView()->frame() : 0; // The frame where the selection started.
@@ -1181,7 +1181,7 @@ bool SelectionController::shouldRepaintCaret(const RenderView* view) const
     return (caretBrowsing || isContentEditable());
 }
 
-void SelectionController::invalidateCaretRect()
+void FrameSelection::invalidateCaretRect()
 {
     if (!isCaret())
         return;
@@ -1212,7 +1212,7 @@ void SelectionController::invalidateCaretRect()
     }
 }
 
-void SelectionController::paintCaret(GraphicsContext* context, int tx, int ty, const IntRect& clipRect)
+void FrameSelection::paintCaret(GraphicsContext* context, int tx, int ty, const IntRect& clipRect)
 {
 #if ENABLE(TEXT_CARET)
     if (!m_caretVisible)
@@ -1247,7 +1247,7 @@ void SelectionController::paintCaret(GraphicsContext* context, int tx, int ty, c
 #endif
 }
 
-void SelectionController::debugRenderer(RenderObject *r, bool selected) const
+void FrameSelection::debugRenderer(RenderObject *r, bool selected) const
 {
     if (r->node()->isElementNode()) {
         Element* element = static_cast<Element *>(r->node());
@@ -1312,7 +1312,7 @@ void SelectionController::debugRenderer(RenderObject *r, bool selected) const
     }
 }
 
-bool SelectionController::contains(const IntPoint& point)
+bool FrameSelection::contains(const IntPoint& point)
 {
     Document* document = m_frame->document();
     
@@ -1349,7 +1349,7 @@ bool SelectionController::contains(const IntPoint& point)
 // Can't do this implicitly as part of every setSelection call because in some contexts it might not be good
 // for the focus to move to another frame. So instead we call it from places where we are selecting with the
 // mouse or the keyboard after setting the selection.
-void SelectionController::selectFrameElementInParentIfFullySelected()
+void FrameSelection::selectFrameElementInParentIfFullySelected()
 {
     // Find the parent frame; if there is none, then we have nothing to do.
     Frame* parent = m_frame->tree()->parent();
@@ -1392,7 +1392,7 @@ void SelectionController::selectFrameElementInParentIfFullySelected()
     }
 }
 
-void SelectionController::selectAll()
+void FrameSelection::selectAll()
 {
     Document* document = m_frame->document();
     
@@ -1418,7 +1418,7 @@ void SelectionController::selectAll()
     notifyRendererOfSelectionChange(true);
 }
 
-bool SelectionController::setSelectedRange(Range* range, EAffinity affinity, bool closeTyping)
+bool FrameSelection::setSelectedRange(Range* range, EAffinity affinity, bool closeTyping)
 {
     if (!range)
         return false;
@@ -1462,7 +1462,7 @@ bool SelectionController::setSelectedRange(Range* range, EAffinity affinity, boo
     return true;
 }
 
-bool SelectionController::isInPasswordField() const
+bool FrameSelection::isInPasswordField() const
 {
     ASSERT(start().isNull() || start().anchorType() == Position::PositionIsOffsetInAnchor
            || start().containerNode() || !start().anchorNode()->shadowAncestorNode());
@@ -1480,14 +1480,14 @@ bool SelectionController::isInPasswordField() const
     return static_cast<HTMLInputElement*>(startNode)->isPasswordField();
 }
 
-bool SelectionController::caretRendersInsideNode(Node* node) const
+bool FrameSelection::caretRendersInsideNode(Node* node) const
 {
     if (!node)
         return false;
     return !isTableElement(node) && !editingIgnoresContent(node);
 }
 
-void SelectionController::focusedOrActiveStateChanged()
+void FrameSelection::focusedOrActiveStateChanged()
 {
     bool activeAndFocused = isFocusedAndActive();
 
@@ -1520,18 +1520,18 @@ void SelectionController::focusedOrActiveStateChanged()
         setUseSecureKeyboardEntry(activeAndFocused);
 }
 
-void SelectionController::pageActivationChanged()
+void FrameSelection::pageActivationChanged()
 {
     focusedOrActiveStateChanged();
 }
 
-void SelectionController::updateSecureKeyboardEntryIfActive()
+void FrameSelection::updateSecureKeyboardEntryIfActive()
 {
     if (m_frame->document() && isFocusedAndActive())
         setUseSecureKeyboardEntry(m_frame->document()->useSecureKeyboardEntryWhenActive());
 }
 
-void SelectionController::setUseSecureKeyboardEntry(bool enable)
+void FrameSelection::setUseSecureKeyboardEntry(bool enable)
 {
     if (enable)
         enableSecureTextInput();
@@ -1539,7 +1539,7 @@ void SelectionController::setUseSecureKeyboardEntry(bool enable)
         disableSecureTextInput();
 }
 
-void SelectionController::setFocused(bool flag)
+void FrameSelection::setFocused(bool flag)
 {
     if (m_focused == flag)
         return;
@@ -1548,12 +1548,12 @@ void SelectionController::setFocused(bool flag)
     focusedOrActiveStateChanged();
 }
 
-bool SelectionController::isFocusedAndActive() const
+bool FrameSelection::isFocusedAndActive() const
 {
     return m_focused && m_frame->page() && m_frame->page()->focusController()->isActive();
 }
 
-void SelectionController::updateAppearance()
+void FrameSelection::updateAppearance()
 {
     ASSERT(!m_isDragCaretController);
 
@@ -1610,7 +1610,7 @@ void SelectionController::updateAppearance()
         endPos = candidate;
 
     // We can get into a state where the selection endpoints map to the same VisiblePosition when a selection is deleted
-    // because we don't yet notify the SelectionController of text removal.
+    // because we don't yet notify the FrameSelection of text removal.
     if (startPos.isNotNull() && endPos.isNotNull() && selection.visibleStart() != selection.visibleEnd()) {
         RenderObject* startRenderer = startPos.deprecatedNode()->renderer();
         RenderObject* endRenderer = endPos.deprecatedNode()->renderer();
@@ -1618,7 +1618,7 @@ void SelectionController::updateAppearance()
     }
 }
 
-void SelectionController::setCaretVisible(bool flag)
+void FrameSelection::setCaretVisible(bool flag)
 {
     if (m_caretVisible == flag)
         return;
@@ -1627,7 +1627,7 @@ void SelectionController::setCaretVisible(bool flag)
     updateAppearance();
 }
 
-void SelectionController::clearCaretRectIfNeeded()
+void FrameSelection::clearCaretRectIfNeeded()
 {
 #if ENABLE(TEXT_CARET)
     if (!m_caretPaint)
@@ -1637,7 +1637,7 @@ void SelectionController::clearCaretRectIfNeeded()
 #endif
 }
 
-void SelectionController::caretBlinkTimerFired(Timer<SelectionController>*)
+void FrameSelection::caretBlinkTimerFired(Timer<FrameSelection>*)
 {
 #if ENABLE(TEXT_CARET)
     ASSERT(m_caretVisible);
@@ -1650,7 +1650,7 @@ void SelectionController::caretBlinkTimerFired(Timer<SelectionController>*)
 #endif
 }
 
-void SelectionController::notifyRendererOfSelectionChange(bool userTriggered)
+void FrameSelection::notifyRendererOfSelectionChange(bool userTriggered)
 {
     m_frame->document()->updateStyleIfNeeded();
 
@@ -1677,7 +1677,7 @@ static bool isFrameElement(const Node* n)
     return widget && widget->isFrameView();
 }
 
-void SelectionController::setFocusedNodeIfNeeded()
+void FrameSelection::setFocusedNodeIfNeeded()
 {
     if (isNone() || !isFocused())
         return;
@@ -1709,10 +1709,10 @@ void SelectionController::setFocusedNodeIfNeeded()
         m_frame->page()->focusController()->setFocusedNode(0, m_frame);
 }
 
-void SelectionController::paintDragCaret(GraphicsContext* p, int tx, int ty, const IntRect& clipRect) const
+void FrameSelection::paintDragCaret(GraphicsContext* p, int tx, int ty, const IntRect& clipRect) const
 {
 #if ENABLE(TEXT_CARET)
-    SelectionController* dragCaretController = m_frame->page()->dragCaretController();
+    FrameSelection* dragCaretController = m_frame->page()->dragCaretController();
     ASSERT(dragCaretController->selection().isCaret());
     if (dragCaretController->selection().start().anchorNode()->document()->frame() == m_frame)
         dragCaretController->paintCaret(p, tx, ty, clipRect);
@@ -1724,19 +1724,19 @@ void SelectionController::paintDragCaret(GraphicsContext* p, int tx, int ty, con
 #endif
 }
 
-PassRefPtr<CSSMutableStyleDeclaration> SelectionController::copyTypingStyle() const
+PassRefPtr<CSSMutableStyleDeclaration> FrameSelection::copyTypingStyle() const
 {
     if (!m_typingStyle || !m_typingStyle->style())
         return 0;
     return m_typingStyle->style()->copy();
 }
 
-bool SelectionController::shouldDeleteSelection(const VisibleSelection& selection) const
+bool FrameSelection::shouldDeleteSelection(const VisibleSelection& selection) const
 {
     return m_frame->editor()->client()->shouldDeleteRange(selection.toNormalizedRange().get());
 }
 
-FloatRect SelectionController::bounds(bool clipToVisibleContent) const
+FloatRect FrameSelection::bounds(bool clipToVisibleContent) const
 {
     RenderView* root = m_frame->contentRenderer();
     FrameView* view = m_frame->view();
@@ -1747,7 +1747,7 @@ FloatRect SelectionController::bounds(bool clipToVisibleContent) const
     return clipToVisibleContent ? intersection(selectionRect, view->visibleContentRect()) : selectionRect;
 }
 
-void SelectionController::getClippedVisibleTextRectangles(Vector<FloatRect>& rectangles) const
+void FrameSelection::getClippedVisibleTextRectangles(Vector<FloatRect>& rectangles) const
 {
     RenderView* root = m_frame->contentRenderer();
     if (!root)
@@ -1783,7 +1783,7 @@ static HTMLFormElement* scanForForm(Node* start)
 }
 
 // We look for either the form containing the current focus, or for one immediately after it
-HTMLFormElement* SelectionController::currentForm() const
+HTMLFormElement* FrameSelection::currentForm() const
 {
     // Start looking either at the active (first responder) node, or where the selection is.
     Node* start = m_frame->document()->focusedNode();
@@ -1803,7 +1803,7 @@ HTMLFormElement* SelectionController::currentForm() const
     return scanForForm(start);
 }
 
-void SelectionController::revealSelection(const ScrollAlignment& alignment, bool revealExtent)
+void FrameSelection::revealSelection(const ScrollAlignment& alignment, bool revealExtent)
 {
     IntRect rect;
 
@@ -1831,7 +1831,7 @@ void SelectionController::revealSelection(const ScrollAlignment& alignment, bool
     }
 }
 
-void SelectionController::setSelectionFromNone()
+void FrameSelection::setSelectionFromNone()
 {
     // Put a caret inside the body if the entire frame is editable (either the
     // entire WebView is editable or designMode is on for this document).
@@ -1848,19 +1848,19 @@ void SelectionController::setSelectionFromNone()
         setSelection(VisibleSelection(firstPositionInOrBeforeNode(node), DOWNSTREAM));
 }
 
-bool SelectionController::shouldChangeSelection(const VisibleSelection& newSelection) const
+bool FrameSelection::shouldChangeSelection(const VisibleSelection& newSelection) const
 {
     return m_frame->editor()->shouldChangeSelection(selection(), newSelection, newSelection.affinity(), false);
 }
 
 #ifndef NDEBUG
 
-void SelectionController::formatForDebugger(char* buffer, unsigned length) const
+void FrameSelection::formatForDebugger(char* buffer, unsigned length) const
 {
     m_selection.formatForDebugger(buffer, length);
 }
 
-void SelectionController::showTreeForThis() const
+void FrameSelection::showTreeForThis() const
 {
     m_selection.showTreeForThis();
 }
@@ -1871,12 +1871,12 @@ void SelectionController::showTreeForThis() const
 
 #ifndef NDEBUG
 
-void showTree(const WebCore::SelectionController& sel)
+void showTree(const WebCore::FrameSelection& sel)
 {
     sel.showTreeForThis();
 }
 
-void showTree(const WebCore::SelectionController* sel)
+void showTree(const WebCore::FrameSelection* sel)
 {
     if (sel)
         sel->showTreeForThis();
similarity index 93%
rename from Source/WebCore/editing/SelectionController.h
rename to Source/WebCore/editing/FrameSelection.h
index 2e3a6cd..bfb0f99 100644 (file)
@@ -23,8 +23,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef SelectionController_h
-#define SelectionController_h
+#ifndef FrameSelection_h
+#define FrameSelection_h
 
 #include "EditingStyle.h"
 #include "IntRect.h"
@@ -48,8 +48,9 @@ class VisiblePosition;
 
 enum DirectionalityPolicy { MakeNonDirectionalSelection, MakeDirectionalSelection };
 
-class SelectionController {
-    WTF_MAKE_NONCOPYABLE(SelectionController); WTF_MAKE_FAST_ALLOCATED;
+class FrameSelection {
+    WTF_MAKE_NONCOPYABLE(FrameSelection);
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     enum EAlteration { AlterationMove, AlterationExtend };
     enum CursorAlignOnScroll { AlignCursorOnScrollIfNeeded,
@@ -62,7 +63,7 @@ public:
     };
     typedef unsigned SetSelectionOptions;
 
-    SelectionController(Frame* = 0, bool isDragCaretController = false);
+    FrameSelection(Frame* = 0, bool isDragCaretController = false);
 
     Element* rootEditableElement() const { return m_selection.rootEditableElement(); }
     bool isContentEditable() const { return m_selection.isContentEditable(); }
@@ -215,7 +216,7 @@ private:
     
     IntRect absoluteBoundsForLocalRect(const IntRect&) const;
 
-    void caretBlinkTimerFired(Timer<SelectionController>*);
+    void caretBlinkTimerFired(Timer<FrameSelection>*);
 
     void setUseSecureKeyboardEntry(bool);
 
@@ -228,7 +229,7 @@ private:
 
     RefPtr<EditingStyle> m_typingStyle;
 
-    Timer<SelectionController> m_caretBlinkTimer;
+    Timer<FrameSelection> m_caretBlinkTimer;
 
     IntRect m_caretRect; // caret rect in coords local to the renderer responsible for painting the caret
     IntRect m_absCaretBounds; // absolute bounding rect for the caret
@@ -244,23 +245,23 @@ private:
     bool m_caretPaint;
 };
 
-inline EditingStyle* SelectionController::typingStyle() const
+inline EditingStyle* FrameSelection::typingStyle() const
 {
     return m_typingStyle.get();
 }
 
-inline void SelectionController::clearTypingStyle()
+inline void FrameSelection::clearTypingStyle()
 {
     m_typingStyle.clear();
 }
 
-inline void SelectionController::setTypingStyle(PassRefPtr<EditingStyle> style)
+inline void FrameSelection::setTypingStyle(PassRefPtr<EditingStyle> style)
 {
     m_typingStyle = style;
 }
 
 #if !(PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(CHROMIUM))
-inline void SelectionController::notifyAccessibilityForSelectionChange()
+inline void FrameSelection::notifyAccessibilityForSelectionChange()
 {
 }
 #endif
@@ -269,9 +270,9 @@ inline void SelectionController::notifyAccessibilityForSelectionChange()
 
 #ifndef NDEBUG
 // Outside the WebCore namespace for ease of invocation from gdb.
-void showTree(const WebCore::SelectionController&);
-void showTree(const WebCore::SelectionController*);
+void showTree(const WebCore::FrameSelection&);
+void showTree(const WebCore::FrameSelection*);
 #endif
 
-#endif // SelectionController_h
+#endif // FrameSelection_h
 
index cbcd488..596c048 100644 (file)
@@ -28,9 +28,9 @@
 
 #include "Document.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "HTMLElement.h"
 #include "RenderObject.h"
-#include "SelectionController.h"
 #include "htmlediting.h"
 
 namespace WebCore {
index 0445b60..6b95cf3 100644 (file)
@@ -31,8 +31,8 @@
 #include "EditingStyle.h"
 #include "Element.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "HTMLNames.h"
-#include "SelectionController.h"
 
 namespace WebCore {
 
index 132f3d5..ce0ab30 100644 (file)
 #include "Element.h"
 #include "EventNames.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "HTMLElement.h"
 #include "HTMLInputElement.h"
 #include "HTMLInterchange.h"
 #include "HTMLNames.h"
 #include "NodeList.h"
-#include "SelectionController.h"
 #include "SmartReplace.h"
 #include "TextIterator.h"
 #include "htmlediting.h"
index a96e0ad..f0c5d44 100644 (file)
@@ -30,7 +30,7 @@
 
 namespace WebCore {
 
-SetSelectionCommand::SetSelectionCommand(const VisibleSelection& selection, SelectionController::SetSelectionOptions options)
+SetSelectionCommand::SetSelectionCommand(const VisibleSelection& selection, FrameSelection::SetSelectionOptions options)
     : SimpleEditCommand(selection.base().anchorNode()->document())
     , m_options(options)
     , m_selectionToSet(selection)
@@ -39,22 +39,22 @@ SetSelectionCommand::SetSelectionCommand(const VisibleSelection& selection, Sele
 
 void SetSelectionCommand::doApply()
 {
-    SelectionController* selectionController = document()->frame()->selection();
-    ASSERT(selectionController);
+    FrameSelection* selection = document()->frame()->selection();
+    ASSERT(selection);
 
-    if (selectionController->shouldChangeSelection(m_selectionToSet) && m_selectionToSet.isNonOrphanedCaretOrRange()) {
-        selectionController->setSelection(m_selectionToSet, m_options);
+    if (selection->shouldChangeSelection(m_selectionToSet) && m_selectionToSet.isNonOrphanedCaretOrRange()) {
+        selection->setSelection(m_selectionToSet, m_options);
         setEndingSelection(m_selectionToSet);
     }
 }
 
 void SetSelectionCommand::doUnapply()
 {
-    SelectionController* selectionController = document()->frame()->selection();
-    ASSERT(selectionController);
+    FrameSelection* selection = document()->frame()->selection();
+    ASSERT(selection);
 
-    if (selectionController->shouldChangeSelection(startingSelection()) && startingSelection().isNonOrphanedCaretOrRange())
-        selectionController->setSelection(startingSelection(), m_options);
+    if (selection->shouldChangeSelection(startingSelection()) && startingSelection().isNonOrphanedCaretOrRange())
+        selection->setSelection(startingSelection(), m_options);
 }
 
 } // namespace WebCore
index 3d6609c..348ab2e 100644 (file)
 #define SetSelectionCommand_h
 
 #include "EditCommand.h"
-#include "SelectionController.h"
+#include "FrameSelection.h"
 
 namespace WebCore {
 
 class SetSelectionCommand : public SimpleEditCommand {
 public:
-    static PassRefPtr<SetSelectionCommand> create(const VisibleSelection& selection, SelectionController::SetSelectionOptions options)
+    static PassRefPtr<SetSelectionCommand> create(const VisibleSelection& selection, FrameSelection::SetSelectionOptions options)
     {
         return adoptRef(new SetSelectionCommand(selection, options));
     }
 
 private:
-    SetSelectionCommand(const VisibleSelection&, SelectionController::SetSelectionOptions);
+    SetSelectionCommand(const VisibleSelection&, FrameSelection::SetSelectionOptions);
     virtual void doApply();
     virtual void doUnapply();
 
-    SelectionController::SetSelectionOptions m_options;
+    FrameSelection::SetSelectionOptions m_options;
     VisibleSelection m_selectionToSet;
 };
 
index f0297c1..0b6786b 100644 (file)
@@ -94,7 +94,7 @@ void SpellingCorrectionCommand::doApply()
     if (!fragment)
         return;
 
-    applyCommandToComposite(SetSelectionCommand::create(m_selectionToBeCorrected, SelectionController::SpellCorrectionTriggered | SelectionController::CloseTyping | SelectionController::ClearTypingStyle));
+    applyCommandToComposite(SetSelectionCommand::create(m_selectionToBeCorrected, FrameSelection::SpellCorrectionTriggered | FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle));
 #if SUPPORT_AUTOCORRECTION_PANEL
     applyCommandToComposite(SpellingCorrectionRecordUndoCommand::create(document(), m_corrected, m_correction));
 #endif
index 8467f88..29300da 100644 (file)
@@ -270,7 +270,7 @@ void SpellingCorrectionController::respondToUnappliedSpellCorrection(const Visib
 {
     client()->recordAutocorrectionResponse(EditorClient::AutocorrectionReverted, corrected, correction);
     m_frame->document()->updateLayout();
-    m_frame->selection()->setSelection(selectionOfCorrected, SelectionController::CloseTyping | SelectionController::ClearTypingStyle | SelectionController::SpellCorrectionTriggered);
+    m_frame->selection()->setSelection(selectionOfCorrected, FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle | FrameSelection::SpellCorrectionTriggered);
     RefPtr<Range> range = Range::create(m_frame->document(), m_frame->selection()->selection().start(), m_frame->selection()->selection().end());
 
     DocumentMarkerController* markers = m_frame->document()->markers();
index 4d48e6c..6f567ab 100644 (file)
 #include "Editor.h"
 #include "Element.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "HTMLNames.h"
 #include "InsertLineBreakCommand.h"
 #include "InsertParagraphSeparatorCommand.h"
 #include "InsertTextCommand.h"
 #include "RenderObject.h"
-#include "SelectionController.h"
 #include "TextIterator.h"
 #include "VisiblePosition.h"
 #include "htmlediting.h"
@@ -161,7 +161,7 @@ void TypingCommand::insertText(Document* document, const String& text, Options o
     insertText(document, text, frame->selection()->selection(), options, composition);
 }
 
-// FIXME: We shouldn't need to take selectionForInsertion. It should be identical to SelectionController's current selection.
+// FIXME: We shouldn't need to take selectionForInsertion. It should be identical to FrameSelection's current selection.
 void TypingCommand::insertText(Document* document, const String& text, const VisibleSelection& selectionForInsertion, Options options, TextCompositionType compositionType)
 {
     ASSERT(document);
@@ -485,11 +485,11 @@ void TypingCommand::deleteKeyPressed(TextGranularity granularity, bool killRing)
 
         m_smartDelete = false;
 
-        SelectionController selection;
+        FrameSelection selection;
         selection.setSelection(endingSelection());
-        selection.modify(SelectionController::AlterationExtend, DirectionBackward, granularity);
+        selection.modify(FrameSelection::AlterationExtend, DirectionBackward, granularity);
         if (killRing && selection.isCaret() && granularity != CharacterGranularity)
-            selection.modify(SelectionController::AlterationExtend, DirectionBackward, CharacterGranularity);
+            selection.modify(FrameSelection::AlterationExtend, DirectionBackward, CharacterGranularity);
 
         if (endingSelection().visibleStart().previous(CannotCrossEditingBoundary).isNull()) {
             // When the caret is at the start of the editable area in an empty list item, break out of the list item.
@@ -515,7 +515,7 @@ void TypingCommand::deleteKeyPressed(TextGranularity granularity, bool killRing)
             if (isLastPositionBeforeTable(visibleStart))
                 return;
             // Extend the selection backward into the last cell, then deletion will handle the move.
-            selection.modify(SelectionController::AlterationExtend, DirectionBackward, granularity);
+            selection.modify(FrameSelection::AlterationExtend, DirectionBackward, granularity);
         // If the caret is just after a table, select the table and don't delete anything.
         } else if (Node* table = isFirstPositionAfterTable(visibleStart)) {
             setEndingSelection(VisibleSelection(positionBeforeNode(table), endingSelection().start(), DOWNSTREAM));
@@ -582,11 +582,11 @@ void TypingCommand::forwardDeleteKeyPressed(TextGranularity granularity, bool ki
         // Handle delete at beginning-of-block case.
         // Do nothing in the case that the caret is at the start of a
         // root editable element or at the start of a document.
-        SelectionController selection;
+        FrameSelection selection;
         selection.setSelection(endingSelection());
-        selection.modify(SelectionController::AlterationExtend, DirectionForward, granularity);
+        selection.modify(FrameSelection::AlterationExtend, DirectionForward, granularity);
         if (killRing && selection.isCaret() && granularity != CharacterGranularity)
-            selection.modify(SelectionController::AlterationExtend, DirectionForward, CharacterGranularity);
+            selection.modify(FrameSelection::AlterationExtend, DirectionForward, CharacterGranularity);
 
         Position downstreamEnd = endingSelection().end().downstream();
         VisiblePosition visibleEnd = endingSelection().visibleEnd();
@@ -602,7 +602,7 @@ void TypingCommand::forwardDeleteKeyPressed(TextGranularity granularity, bool ki
 
         // deleting to end of paragraph when at end of paragraph needs to merge the next paragraph (if any)
         if (granularity == ParagraphBoundary && selection.selection().isCaret() && isEndOfParagraph(selection.selection().visibleEnd()))
-            selection.modify(SelectionController::AlterationExtend, DirectionForward, CharacterGranularity);
+            selection.modify(FrameSelection::AlterationExtend, DirectionForward, CharacterGranularity);
 
         selectionToDelete = selection.selection();
         if (!startingSelection().isRange() || selectionToDelete.base() != startingSelection().start())
@@ -29,7 +29,7 @@
  */
 
 #include "config.h"
-#include "SelectionController.h"
+#include "FrameSelection.h"
 
 #include "AXObjectCache.h"
 #include "Document.h"
@@ -37,7 +37,7 @@
 
 namespace WebCore {
 
-void SelectionController::notifyAccessibilityForSelectionChange()
+void FrameSelection::notifyAccessibilityForSelectionChange()
 {
     // FIXME: Support editable text in chromium.
     if (AXObjectCache::accessibilityEnabled() && m_selection.start().isNotNull() && m_selection.end().isNotNull()) {
@@ -18,7 +18,7 @@
  */
  
 #include "config.h"
-#include "SelectionController.h"
+#include "FrameSelection.h"
 
 #include "AccessibilityObjectWrapperAtk.h"
 #include "AXObjectCache.h"
@@ -75,7 +75,7 @@ static void maybeEmitTextFocusChange(PassRefPtr<AccessibilityObject> prpObject)
 }
 
 
-void SelectionController::notifyAccessibilityForSelectionChange()
+void FrameSelection::notifyAccessibilityForSelectionChange()
 {
     if (!AXObjectCache::accessibilityEnabled())
         return;
index 3833bca..adef2fe 100644 (file)
@@ -190,7 +190,7 @@ NSWritingDirection Editor::baseWritingDirectionForSelectionStart() const
 
 bool Editor::canCopyExcludingStandaloneImages()
 {
-    SelectionController* selection = m_frame->selection();
+    FrameSelection* selection = m_frame->selection();
     return selection->isRange() && !selection->isInPasswordField();
 }
 
@@ -24,7 +24,7 @@
  */
  
 #import "config.h"
-#import "SelectionController.h"
+#import "FrameSelection.h"
 
 #import "AXObjectCache.h"
 #import "Frame.h"
@@ -46,7 +46,7 @@ static CGRect accessibilityConvertScreenRect(CGRect bounds)
 }
     
     
-void SelectionController::notifyAccessibilityForSelectionChange()
+void FrameSelection::notifyAccessibilityForSelectionChange()
 {
     Document* document = m_frame->document();
 
index 68f2c59..4d72d39 100644 (file)
 #include "ClipboardAccessPolicy.h"
 #include "ClipboardQt.h"
 #include "Document.h"
-#include "Element.h"
-#include "SelectionController.h"
-#include "TextIterator.h"
-#include "VisibleSelection.h"
-#include "htmlediting.h"
-#include "visible_units.h"
 
 namespace WebCore {
 
index 6e0a1eb..83416dd 100644 (file)
@@ -34,6 +34,7 @@
 #include "DocumentLoader.h"
 #include "Frame.h"
 #include "FrameLoader.h"
+#include "FrameSelection.h"
 #include "FrameTree.h"
 #include "HTMLFrameOwnerElement.h"
 #include "HTMLNames.h"
@@ -44,7 +45,6 @@
 #include "markup.h"
 #include "Node.h"
 #include "Range.h"
-#include "SelectionController.h"
 #include "SharedBuffer.h"
 #include <wtf/text/CString.h>
 #include <wtf/text/StringConcatenate.h>
index 923d2ce..d710f08 100644 (file)
@@ -47,6 +47,7 @@
 #include "Frame.h"
 #include "FrameLoadRequest.h"
 #include "FrameLoader.h"
+#include "FrameSelection.h"
 #include "HTMLFormElement.h"
 #include "HitTestRequest.h"
 #include "HitTestResult.h"
@@ -60,7 +61,6 @@
 #include "RenderObject.h"
 #include "ReplaceSelectionCommand.h"
 #include "ResourceRequest.h"
-#include "SelectionController.h"
 #include "Settings.h"
 #include "TextIterator.h"
 #include "UserTypingGestureIndicator.h"
@@ -803,7 +803,7 @@ void ContextMenuController::populate()
             }
         }
     } else { // Make an editing context menu
-        SelectionController* selection = frame->selection();
+        FrameSelection* selection = frame->selection();
         bool inPasswordField = selection->isInPasswordField();
         bool spellCheckingEnabled = frame->editor()->isSpellCheckingEnabledFor(node);
 
index 2e4e09c..87486e2 100644 (file)
 
 #include "ExceptionCode.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "Node.h"
 #include "PlatformString.h"
 #include "Range.h"
-#include "SelectionController.h"
 #include "TextIterator.h"
 #include "htmlediting.h"
 
@@ -179,7 +179,7 @@ String DOMSelection::type() const
     if (!m_frame)
         return String();
 
-    SelectionController* selection = m_frame->selection();
+    FrameSelection* selection = m_frame->selection();
 
     // This is a WebKit DOM extension, incompatible with an IE extension
     // IE has this same attribute, but returns "none", "text" and "control"
@@ -293,11 +293,11 @@ void DOMSelection::modify(const String& alterString, const String& directionStri
     if (!m_frame)
         return;
 
-    SelectionController::EAlteration alter;
+    FrameSelection::EAlteration alter;
     if (equalIgnoringCase(alterString, "extend"))
-        alter = SelectionController::AlterationExtend;
+        alter = FrameSelection::AlterationExtend;
     else if (equalIgnoringCase(alterString, "move"))
-        alter = SelectionController::AlterationMove;
+        alter = FrameSelection::AlterationMove;
     else
         return;
 
@@ -399,7 +399,7 @@ void DOMSelection::addRange(Range* r)
     if (!r)
         return;
 
-    SelectionController* selection = m_frame->selection();
+    FrameSelection* selection = m_frame->selection();
 
     if (selection->isNone()) {
         selection->setSelection(VisibleSelection(r));
@@ -436,13 +436,13 @@ void DOMSelection::deleteFromDocument()
     if (!m_frame)
         return;
 
-    SelectionController* selection = m_frame->selection();
+    FrameSelection* selection = m_frame->selection();
 
     if (selection->isNone())
         return;
 
     if (isCollapsed())
-        selection->modify(SelectionController::AlterationExtend, DirectionBackward, CharacterGranularity);
+        selection->modify(FrameSelection::AlterationExtend, DirectionBackward, CharacterGranularity);
 
     RefPtr<Range> selectedRange = selection->selection().toNormalizedRange();
     if (!selectedRange)
@@ -461,7 +461,7 @@ bool DOMSelection::containsNode(const Node* n, bool allowPartial) const
     if (!m_frame)
         return false;
 
-    SelectionController* selection = m_frame->selection();
+    FrameSelection* selection = m_frame->selection();
 
     if (!n || m_frame->document() != n->document() || selection->isNone())
         return false;
index e7e08f7..4981224 100644 (file)
@@ -43,6 +43,7 @@
 #include "FloatRect.h"
 #include "Frame.h"
 #include "FrameLoader.h"
+#include "FrameSelection.h"
 #include "FrameView.h"
 #include "HTMLAnchorElement.h"
 #include "HTMLInputElement.h"
@@ -61,7 +62,6 @@
 #include "ReplaceSelectionCommand.h"
 #include "ResourceRequest.h"
 #include "SecurityOrigin.h"
-#include "SelectionController.h"
 #include "Settings.h"
 #include "Text.h"
 #include "TextEvent.h"
@@ -142,7 +142,7 @@ static PassRefPtr<DocumentFragment> documentFragmentFromDragData(DragData* dragD
     return 0;
 }
 
-bool DragController::dragIsMove(SelectionController* selection, DragData* dragData)
+bool DragController::dragIsMove(FrameSelection* selection, DragData* dragData)
 {
     return m_documentUnderMouse == m_dragInitiator && selection->isContentEditable() && !isCopyKeyDown(dragData);
 }
index 693189a..be1e456 100644 (file)
@@ -39,13 +39,13 @@ namespace WebCore {
     class DragData;
     class Element;
     class Frame;
+    class FrameSelection;
     class Image;
     class IntRect;
     class Node;
     class Page;
     class PlatformMouseEvent;
     class Range;
-    class SelectionController;
     
     class DragController {
         WTF_MAKE_NONCOPYABLE(DragController); WTF_MAKE_FAST_ALLOCATED;
@@ -99,7 +99,7 @@ namespace WebCore {
         bool tryDHTMLDrag(DragData*, DragOperation&);
         DragOperation dragOperation(DragData*);
         void cancelDrag();
-        bool dragIsMove(SelectionController*, DragData*);
+        bool dragIsMove(FrameSelection*, DragData*);
         bool isCopyKeyDown(DragData*);
 
         void mouseMovedIntoDocument(Document*);
index 18e93b3..5db2a04 100644 (file)
@@ -43,6 +43,7 @@
 #include "FocusController.h"
 #include "Frame.h"
 #include "FrameLoader.h"
+#include "FrameSelection.h"
 #include "FrameTree.h"
 #include "FrameView.h"
 #include "htmlediting.h"
@@ -68,7 +69,6 @@
 #include "RenderWidget.h"
 #include "ScrollAnimator.h"
 #include "Scrollbar.h"
-#include "SelectionController.h"
 #include "Settings.h"
 #include "StyleCachedImage.h"
 #include "TextEvent.h"
@@ -256,14 +256,14 @@ void EventHandler::clear()
 #endif
 }
 
-static void setSelectionIfNeeded(SelectionController* selection, const VisibleSelection& newSelection)
+static void setSelectionIfNeeded(FrameSelection* selection, const VisibleSelection& newSelection)
 {
     ASSERT(selection);
     if (selection->selection() != newSelection && selection->shouldChangeSelection(newSelection))
         selection->setSelection(newSelection);
 }
 
-static void setNonDirectionalSelectionIfNeeded(SelectionController* selection, const VisibleSelection& newSelection, TextGranularity granularity)
+static void setNonDirectionalSelectionIfNeeded(FrameSelection* selection, const VisibleSelection& newSelection, TextGranularity granularity)
 {
     ASSERT(selection);
     if (selection->selection() != newSelection && selection->shouldChangeSelection(newSelection))
@@ -2223,12 +2223,12 @@ bool EventHandler::sendContextMenuEventForKey()
     IntPoint location;
 
     Node* focusedNode = doc->focusedNode();
-    SelectionController* selectionController = m_frame->selection();
-    Position start = selectionController->selection().start();
+    FrameSelection* selection = m_frame->selection();
+    Position start = selection->selection().start();
 
-    if (start.deprecatedNode() && (selectionController->rootEditableElement() || selectionController->isRange())) {
-        RefPtr<Range> selection = selectionController->toNormalizedRange();
-        IntRect firstRect = m_frame->editor()->firstRectForRange(selection.get());
+    if (start.deprecatedNode() && (selection->rootEditableElement() || selection->isRange())) {
+        RefPtr<Range> selectionRange = selection->toNormalizedRange();
+        IntRect firstRect = m_frame->editor()->firstRectForRange(selectionRange.get());
 
         int x = rightAligned ? firstRect.maxX() : firstRect.x();
         location = IntPoint(x, firstRect.maxY());
@@ -2543,16 +2543,16 @@ void EventHandler::handleKeyboardSelectionMovement(KeyboardEvent* event)
     bool isCommanded = event->getModifierState("Meta");
     
     if (key == "Up") {
-        m_frame->selection()->modify((isShifted) ? SelectionController::AlterationExtend : SelectionController::AlterationMove, DirectionBackward, (isCommanded) ? DocumentBoundary : LineGranularity, true);
+        m_frame->selection()->modify((isShifted) ? FrameSelection::AlterationExtend : FrameSelection::AlterationMove, DirectionBackward, (isCommanded) ? DocumentBoundary : LineGranularity, true);
         event->setDefaultHandled();
     } else if (key == "Down") {
-        m_frame->selection()->modify((isShifted) ? SelectionController::AlterationExtend : SelectionController::AlterationMove, DirectionForward, (isCommanded) ? DocumentBoundary : LineGranularity, true);
+        m_frame->selection()->modify((isShifted) ? FrameSelection::AlterationExtend : FrameSelection::AlterationMove, DirectionForward, (isCommanded) ? DocumentBoundary : LineGranularity, true);
         event->setDefaultHandled();
     } else if (key == "Left") {
-        m_frame->selection()->modify((isShifted) ? SelectionController::AlterationExtend : SelectionController::AlterationMove, DirectionLeft, (isCommanded) ? LineBoundary : (isOptioned) ? WordGranularity : CharacterGranularity, true);
+        m_frame->selection()->modify((isShifted) ? FrameSelection::AlterationExtend : FrameSelection::AlterationMove, DirectionLeft, (isCommanded) ? LineBoundary : (isOptioned) ? WordGranularity : CharacterGranularity, true);
         event->setDefaultHandled();
     } else if (key == "Right") {
-        m_frame->selection()->modify((isShifted) ? SelectionController::AlterationExtend : SelectionController::AlterationMove, DirectionRight, (isCommanded) ? LineBoundary : (isOptioned) ? WordGranularity : CharacterGranularity, true);
+        m_frame->selection()->modify((isShifted) ? FrameSelection::AlterationExtend : FrameSelection::AlterationMove, DirectionRight, (isCommanded) ? LineBoundary : (isOptioned) ? WordGranularity : CharacterGranularity, true);
         event->setDefaultHandled();
     }    
 }
index b53b38d..2befaf3 100644 (file)
@@ -191,7 +191,7 @@ public:
 
     void focusDocumentView();
 
-    void capsLockStateMayHaveChanged(); // Only called by SelectionController
+    void capsLockStateMayHaveChanged(); // Only called by FrameSelection
     
     void sendResizeEvent(); // Only called in FrameView
     void sendScrollEvent(); // Ditto
index 5b91eeb..e7b3783 100644 (file)
@@ -38,6 +38,7 @@
 #include "EventNames.h"
 #include "ExceptionCode.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "FrameTree.h"
 #include "FrameView.h"
 #include "HTMLAreaElement.h"
@@ -51,7 +52,6 @@
 #include "RenderObject.h"
 #include "RenderWidget.h"
 #include "ScrollAnimator.h"
-#include "SelectionController.h"
 #include "Settings.h"
 #include "SpatialNavigation.h"
 #include "Widget.h"
@@ -327,7 +327,7 @@ static void clearSelectionIfNeeded(Frame* oldFocusedFrame, Frame* newFocusedFram
     if (oldFocusedFrame->document() != newFocusedFrame->document())
         return;
     
-    SelectionController* s = oldFocusedFrame->selection();
+    FrameSelection* s = oldFocusedFrame->selection();
     if (s->isNone())
         return;
 
index e835948..af440dc 100644 (file)
@@ -152,7 +152,7 @@ inline Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoader
     , m_ownerElement(ownerElement)
     , m_script(this)
     , m_editor(this)
-    , m_selectionController(this)
+    , m_selection(this)
     , m_eventHandler(this)
     , m_animationController(this)
     , m_lifeSupportTimer(this, &Frame::lifeSupportTimerFired)
index 2d76aee..bed3411 100644 (file)
@@ -33,9 +33,9 @@
 #include "Editor.h"
 #include "EventHandler.h"
 #include "FrameLoader.h"
+#include "FrameSelection.h"
 #include "FrameTree.h"
 #include "NavigationScheduler.h"
-#include "SelectionController.h"
 #include "ScriptController.h"
 #include "UserScriptTypes.h"
 
@@ -109,7 +109,7 @@ namespace WebCore {
         EventHandler* eventHandler() const;
         FrameLoader* loader() const;
         NavigationScheduler* navigationScheduler() const;
-        SelectionController* selection() const;
+        FrameSelection* selection() const;
         FrameTree* tree() const;
         AnimationController* animation() const;
         ScriptController* script();
@@ -232,7 +232,7 @@ namespace WebCore {
         ScriptController m_script;
 
         mutable Editor m_editor;
-        mutable SelectionController m_selectionController;
+        mutable FrameSelection m_selection;
         mutable EventHandler m_eventHandler;
         mutable AnimationController m_animationController;
 
@@ -305,9 +305,9 @@ namespace WebCore {
         return m_doc.get();
     }
 
-    inline SelectionController* Frame::selection() const
+    inline FrameSelection* Frame::selection() const
     {
-        return &m_selectionController;
+        return &m_selection;
     }
 
     inline Editor* Frame::editor() const
index 76642f8..f8ddeec 100644 (file)
@@ -42,6 +42,7 @@
 #include "Frame.h"
 #include "FrameLoader.h"
 #include "FrameLoaderClient.h"
+#include "FrameSelection.h"
 #include "FrameTree.h"
 #include "FrameView.h"
 #include "HTMLElement.h"
@@ -63,7 +64,6 @@
 #include "RenderTheme.h"
 #include "RenderWidget.h"
 #include "RuntimeEnabledFeatures.h"
-#include "SelectionController.h"
 #include "Settings.h"
 #include "SharedBuffer.h"
 #include "SpeechInput.h"
@@ -115,7 +115,7 @@ static void networkStateChanged()
 
 Page::Page(const PageClients& pageClients)
     : m_chrome(adoptPtr(new Chrome(this, pageClients.chromeClient)))
-    , m_dragCaretController(adoptPtr(new SelectionController(0, true)))
+    , m_dragCaretController(adoptPtr(new FrameSelection(0, true)))
 #if ENABLE(DRAG_SUPPORT)
     , m_dragController(adoptPtr(new DragController(this, pageClients.dragClient)))
 #endif
index 60193fb..584cc7e 100644 (file)
@@ -59,6 +59,7 @@ namespace WebCore {
     class EditorClient;
     class FocusController;
     class Frame;
+    class FrameSelection;
     class GeolocationClient;
     class GeolocationController;
     class HaltablePlugin;
@@ -77,7 +78,6 @@ namespace WebCore {
     class RenderTheme;
     class VisibleSelection;
     class ScrollableArea;
-    class SelectionController;
     class Settings;
     class SharedGraphicsContext3D;
     class SpeechInput;
@@ -165,7 +165,7 @@ namespace WebCore {
         int frameCount() const { checkFrameCountConsistency(); return m_frameCount; }
 
         Chrome* chrome() const { return m_chrome.get(); }
-        SelectionController* dragCaretController() const { return m_dragCaretController.get(); }
+        FrameSelection* dragCaretController() const { return m_dragCaretController.get(); }
 #if ENABLE(DRAG_SUPPORT)
         DragController* dragController() const { return m_dragController.get(); }
 #endif
@@ -315,7 +315,7 @@ namespace WebCore {
         double minimumTimerInterval() const;
 
         OwnPtr<Chrome> m_chrome;
-        OwnPtr<SelectionController> m_dragCaretController;
+        OwnPtr<FrameSelection> m_dragCaretController;
 
 #if ENABLE(ACCELERATED_2D_CANVAS)
         RefPtr<SharedGraphicsContext3D> m_sharedGraphicsContext3D;
index e17972d..704480c 100644 (file)
@@ -28,7 +28,7 @@
 #include "DragController.h"
 
 #include "DragData.h"
-#include "SelectionController.h"
+#include "FrameSelection.h"
 #include <wtf/RefPtr.h>
 
 #if OS(WINDOWS)
index c5df835..40a71ab 100644 (file)
@@ -32,8 +32,9 @@
 #include "Cursor.h"
 #include "FloatPoint.h"
 #include "FocusController.h"
-#include "FrameView.h"
 #include "Frame.h"
+#include "FrameSelection.h"
+#include "FrameView.h"
 #include "HitTestRequest.h"
 #include "HitTestResult.h"
 #include "MouseEventWithHitTestResults.h"
@@ -42,7 +43,6 @@
 #include "PlatformKeyboardEvent.h"
 #include "PlatformWheelEvent.h"
 #include "RenderWidget.h"
-#include "SelectionController.h"
 
 namespace WebCore {
 
index 6b1cd3e..a7be6d8 100644 (file)
@@ -27,8 +27,8 @@
 #include "DragController.h"
 
 #include "DragData.h"
-#include "windows.h" 
-#include "SelectionController.h"
+#include "FrameSelection.h"
+#include "windows.h"
 #include <wtf/RefPtr.h>
 
 namespace WebCore {
index 39a91de..721e350 100644 (file)
@@ -32,6 +32,7 @@
 #include "FocusController.h"
 #include "FrameView.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "HitTestRequest.h"
 #include "HitTestResult.h"
 #include "MouseEventWithHitTestResults.h"
@@ -39,7 +40,6 @@
 #include "PlatformKeyboardEvent.h"
 #include "PlatformWheelEvent.h"
 #include "Scrollbar.h"
-#include "SelectionController.h"
 #include "WCDataObject.h"
 #include "NotImplemented.h"
 
index 8c358fd..71dfead 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "DocumentMarkerController.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "FrameTree.h"
 #include "HTMLAnchorElement.h"
 #include "HTMLVideoElement.h"
@@ -34,7 +35,6 @@
 #include "RenderImage.h"
 #include "RenderInline.h"
 #include "Scrollbar.h"
-#include "SelectionController.h"
 
 #if ENABLE(SVG)
 #include "SVGNames.h"
index 965036b..077c4c1 100644 (file)
@@ -29,6 +29,7 @@
 #include "Element.h"
 #include "FloatQuad.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "FrameView.h"
 #include "GraphicsContext.h"
 #include "HTMLFormElement.h"
@@ -48,7 +49,6 @@
 #include "RenderTextFragment.h"
 #include "RenderTheme.h"
 #include "RenderView.h"
-#include "SelectionController.h"
 #include "Settings.h"
 #include "TextRun.h"
 #include "TransformState.h"
@@ -168,7 +168,7 @@ void RenderBlock::destroy()
         if (firstLineBox()) {
             // We can't wait for RenderBox::destroy to clear the selection,
             // because by then we will have nuked the line boxes.
-            // FIXME: The SelectionController should be responsible for this when it
+            // FIXME: The FrameSelection should be responsible for this when it
             // is notified of DOM mutations.
             if (isSelectionBorder())
                 view()->clearSelection();
@@ -2417,14 +2417,14 @@ void RenderBlock::paintChildren(PaintInfo& paintInfo, int tx, int ty)
 
 void RenderBlock::paintCaret(PaintInfo& paintInfo, int tx, int ty, CaretType type)
 {
-    SelectionController* selection = type == CursorCaret ? frame()->selection() : frame()->page()->dragCaretController();
+    FrameSelection* selection = type == CursorCaret ? frame()->selection() : frame()->page()->dragCaretController();
 
-    // Paint the caret if the SelectionController says so or if caret browsing is enabled
+    // Paint the caret if the FrameSelection says so or if caret browsing is enabled
     bool caretBrowsing = frame()->settings() && frame()->settings()->caretBrowsingEnabled();
     RenderObject* caretPainter = selection->caretRenderer();
     if (caretPainter == this && (selection->isContentEditable() || caretBrowsing)) {
         // Convert the painting offset into the local coordinate system of this renderer,
-        // to match the localCaretRect computed by the SelectionController
+        // to match the localCaretRect computed by the FrameSelection
         offsetForContents(tx, ty);
 
         if (type == CursorCaret)
index da9c353..33521ed 100644 (file)
@@ -28,6 +28,7 @@
 #include "RenderImage.h"
 
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "GraphicsContext.h"
 #include "HTMLAreaElement.h"
 #include "HTMLImageElement.h"
@@ -38,7 +39,6 @@
 #include "Page.h"
 #include "RenderLayer.h"
 #include "RenderView.h"
-#include "SelectionController.h"
 #include "TextRun.h"
 #include <wtf/UnusedParam.h>
 
index 13cadfa..d7561dc 100644 (file)
@@ -85,7 +85,7 @@ void RenderInline::destroy()
         if (firstLineBox()) {
             // We can't wait for RenderBoxModelObject::destroy to clear the selection,
             // because by then we will have nuked the line boxes.
-            // FIXME: The SelectionController should be responsible for this when it
+            // FIXME: The FrameSelection should be responsible for this when it
             // is notified of DOM mutations.
             if (isSelectionBorder())
                 view()->clearSelection();
index 823ad0d..1364890 100644 (file)
@@ -56,6 +56,7 @@
 #include "FloatRect.h"
 #include "FocusController.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "FrameTree.h"
 #include "FrameView.h"
 #include "Gradient.h"
@@ -80,7 +81,6 @@
 #include "ScaleTransformOperation.h"
 #include "Scrollbar.h"
 #include "ScrollbarTheme.h"
-#include "SelectionController.h"
 #include "TextStream.h"
 #include "TransformState.h"
 #include "TransformationMatrix.h"
index 211bd2b..337903d 100644 (file)
@@ -37,6 +37,7 @@
 #include "EventQueue.h"
 #include "FocusController.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "FrameView.h"
 #include "GraphicsContext.h"
 #include "HTMLNames.h"
@@ -53,7 +54,6 @@
 #include "Scrollbar.h"
 #include "ScrollbarTheme.h"
 #include "SelectElement.h"
-#include "SelectionController.h"
 #include "TextRun.h"
 #include <math.h>
 
index e26f221..359505d 100644 (file)
@@ -109,7 +109,7 @@ RenderObject* RenderObjectChildList::removeChildNode(RenderObject* owner, Render
     
     // If oldChild is the start or end of the selection, then clear the selection to
     // avoid problems of invalid pointers.
-    // FIXME: The SelectionController should be responsible for this when it
+    // FIXME: The FrameSelection should be responsible for this when it
     // is notified of DOM mutations.
     if (!owner->documentBeingDestroyed() && oldChild->isSelectionBorder())
         owner->view()->clearSelection();
index 2db396f..44519a6 100644 (file)
@@ -27,6 +27,7 @@
 #include "Event.h"
 #include "EventNames.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "HTMLBRElement.h"
 #include "HTMLFormControlElement.h"
 #include "HTMLInputElement.h"
@@ -36,7 +37,6 @@
 #include "RenderLayer.h"
 #include "RenderText.h"
 #include "ScrollbarTheme.h"
-#include "SelectionController.h"
 #include "Text.h"
 #include "TextControlInnerElements.h"
 #include "TextIterator.h"
index 30bd961..2adb82a 100644 (file)
@@ -29,6 +29,7 @@
 #include "Event.h"
 #include "EventNames.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "FrameView.h"
 #include "HTMLInputElement.h"
 #include "HTMLNames.h"
@@ -40,7 +41,6 @@
 #include "RenderLayer.h"
 #include "RenderScrollbar.h"
 #include "RenderTheme.h"
-#include "SelectionController.h"
 #include "Settings.h"
 #include "SimpleFontData.h"
 #include "TextControlInnerElements.h"
index fcd2688..c2c09ed 100644 (file)
@@ -28,6 +28,7 @@
 #include "FocusController.h"
 #include "FontSelector.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "GraphicsContext.h"
 #include "HTMLInputElement.h"
 #include "HTMLNames.h"
@@ -36,7 +37,6 @@
 #include "PaintInfo.h"
 #include "RenderStyle.h"
 #include "RenderView.h"
-#include "SelectionController.h"
 #include "Settings.h"
 #include "TextControlInnerElements.h"
 
index 9709838..943e848 100644 (file)
@@ -29,6 +29,7 @@
 #include "CSSMutableStyleDeclaration.h"
 #include "Document.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "FrameView.h"
 #include "HTMLElement.h"
 #include "HTMLNames.h"
@@ -45,7 +46,6 @@
 #include "RenderTableCell.h"
 #include "RenderView.h"
 #include "RenderWidget.h"
-#include "SelectionController.h"
 #include <wtf/HexNumber.h>
 #include <wtf/UnusedParam.h>
 #include <wtf/Vector.h>
index d449af2..48e8543 100644 (file)
@@ -33,6 +33,7 @@
 #include "EventNames.h"
 #include "FloatConversion.h"
 #include "FloatRect.h"
+#include "FrameSelection.h"
 #include "FrameView.h"
 #include "HTMLNames.h"
 #include "RenderSVGResource.h"
@@ -48,7 +49,6 @@
 #include "SVGViewSpec.h"
 #include "SVGZoomEvent.h"
 #include "ScriptEventListener.h"
-#include "SelectionController.h"
 #include <wtf/StdLibExtras.h>
 
 namespace WebCore {
index 4021b4f..9191cec 100644 (file)
 #include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "RenderObject.h"
 #include "RenderSVGResource.h"
 #include "SVGDocumentExtensions.h"
 #include "SVGNames.h"
 #include "SVGTextQuery.h"
-#include "SelectionController.h"
 #include "XMLNames.h"
 
 namespace WebCore {
@@ -162,8 +162,8 @@ void SVGTextContentElement::selectSubString(unsigned charnum, unsigned nchars, E
     ASSERT(document());
     ASSERT(document()->frame());
 
-    SelectionController* controller = document()->frame()->selection();
-    if (!controller)
+    FrameSelection* selection = document()->frame()->selection();
+    if (!selection)
         return;
 
     // Find selection start
@@ -176,7 +176,7 @@ void SVGTextContentElement::selectSubString(unsigned charnum, unsigned nchars, E
     for (unsigned i = 0; i < nchars; ++i)
         end = end.next();
 
-    controller->setSelection(VisibleSelection(start, end));
+    selection->setSelection(VisibleSelection(start, end));
 }
 
 void SVGTextContentElement::parseMappedAttribute(Attribute* attr)
index 3c1cc52..43f491d 100644 (file)
@@ -1,3 +1,18 @@
+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
+
+        * src/WebFrameImpl.cpp:
+        (WebKit::WebFrameImpl::selectWordAroundCaret):
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::textInputType):
+        (WebKit::WebViewImpl::caretOrSelectionBounds):
+        (WebKit::WebViewImpl::caretOrSelectionRange):
+        (WebKit::WebViewImpl::clearFocusedNode):
+
 2011-05-03  Hans Wennborg  <hans@chromium.org>
 
         Reviewed by Steve Block.
index 71c5a50..245158d 100644 (file)
@@ -89,6 +89,7 @@
 #include "FormState.h"
 #include "FrameLoadRequest.h"
 #include "FrameLoader.h"
+#include "FrameSelection.h"
 #include "FrameTree.h"
 #include "FrameView.h"
 #include "HTMLCollection.h"
 #include "ScriptValue.h"
 #include "ScrollTypes.h"
 #include "ScrollbarTheme.h"
-#include "SelectionController.h"
 #include "Settings.h"
 #include "SkiaUtils.h"
 #include "SubstituteData.h"
@@ -1345,11 +1345,11 @@ void WebFrameImpl::selectWordAroundPosition(Frame* frame, VisiblePosition pos)
 
 bool WebFrameImpl::selectWordAroundCaret()
 {
-    SelectionController* controller = frame()->selection();
-    ASSERT(!controller->isNone());
-    if (controller->isNone() || controller->isRange())
+    FrameSelection* selection = frame()->selection();
+    ASSERT(!selection->isNone());
+    if (selection->isNone() || selection->isRange())
         return false;
-    selectWordAroundPosition(frame(), controller->selection().visibleStart());
+    selectWordAroundPosition(frame(), selection->selection().visibleStart());
     return true;
 }
 
index b2a7aed..66e9209 100644 (file)
@@ -56,6 +56,7 @@
 #include "FocusController.h"
 #include "FontDescription.h"
 #include "FrameLoader.h"
+#include "FrameSelection.h"
 #include "FrameTree.h"
 #include "FrameView.h"
 #include "GeolocationClientProxy.h"
@@ -88,7 +89,6 @@
 #include "RenderView.h"
 #include "ResourceHandle.h"
 #include "SecurityOrigin.h"
-#include "SelectionController.h"
 #include "Settings.h"
 #include "SpeechInputClientImpl.h"
 #include "TextIterator.h"
@@ -1436,17 +1436,17 @@ WebTextInputType WebViewImpl::textInputType()
     if (!editor || !editor->canEdit())
         return type;
 
-    SelectionController* controller = focused->selection();
-    if (!controller)
+    FrameSelection* selection = focused->selection();
+    if (!selection)
         return type;
 
-    const Node* node = controller->start().deprecatedNode();
+    const Node* node = selection->start().deprecatedNode();
     if (!node)
         return type;
 
     // FIXME: Support more text input types when necessary, eg. Number,
     // Date, Email, URL, etc.
-    if (controller->isInPasswordField())
+    if (selection->isInPasswordField())
         type = WebTextInputTypePassword;
     else if (node->shouldUseInputMethod())
         type = WebTextInputTypeText;
@@ -1461,23 +1461,23 @@ WebRect WebViewImpl::caretOrSelectionBounds()
     if (!focused)
         return rect;
 
-    SelectionController* controller = focused->selection();
-    if (!controller)
+    FrameSelection* selection = focused->selection();
+    if (!selection)
         return rect;
 
     const FrameView* view = focused->view();
     if (!view)
         return rect;
 
-    const Node* node = controller->base().containerNode();
+    const Node* node = selection->base().containerNode();
     if (!node || !node->renderer())
         return rect;
 
-    if (controller->isCaret())
-        rect = view->contentsToWindow(controller->absoluteCaretBounds());
-    else if (controller->isRange()) {
-        node = controller->extent().containerNode();
-        RefPtr<Range> range = controller->toNormalizedRange();
+    if (selection->isCaret())
+        rect = view->contentsToWindow(selection->absoluteCaretBounds());
+    else if (selection->isRange()) {
+        node = selection->extent().containerNode();
+        RefPtr<Range> range = selection->toNormalizedRange();
         if (!node || !node->renderer() || !range)
             return rect;
         rect = view->contentsToWindow(focused->editor()->firstRectForRange(range.get()));
@@ -1522,11 +1522,11 @@ bool WebViewImpl::caretOrSelectionRange(size_t* location, size_t* length)
     if (!focused)
         return false;
 
-    SelectionController* controller = focused->selection();
-    if (!controller)
+    FrameSelection* selection = focused->selection();
+    if (!selection)
         return false;
 
-    RefPtr<Range> range = controller->selection().firstRange();
+    RefPtr<Range> range = selection->selection().firstRange();
     if (!range.get())
         return false;
 
@@ -1712,9 +1712,7 @@ void WebViewImpl::clearFocusedNode()
     if (oldFocusedNode->hasTagName(HTMLNames::textareaTag)
         || (oldFocusedNode->hasTagName(HTMLNames::inputTag)
             && static_cast<HTMLInputElement*>(oldFocusedNode.get())->isTextField())) {
-        // Clear the selection.
-        SelectionController* selection = frame->selection();
-        selection->clear();
+        frame->selection()->clear();
     }
 }
 
index 3fd7d31..ac6b7f3 100755 (executable)
@@ -1,3 +1,13 @@
+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-04  Cris Neckar  <cdn@chromium.org>
 
         Reviewed by Adam Barth.
index b6c2fa2..4f105ea 100644 (file)
@@ -346,25 +346,25 @@ bool EditorClientEfl::handleEditingKeyboardEvent(KeyboardEvent* event)
     if (caretBrowsing) {
         switch (keyEvent->windowsVirtualKeyCode()) {
         case VK_LEFT:
-            frame->selection()->modify(keyEvent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
+            frame->selection()->modify(keyEvent->shiftKey() ? FrameSelection::AlterationExtend : FrameSelection::AlterationMove,
                     DirectionLeft,
                     keyEvent->ctrlKey() ? WordGranularity : CharacterGranularity,
                     true);
             return true;
         case VK_RIGHT:
-            frame->selection()->modify(keyEvent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
+            frame->selection()->modify(keyEvent->shiftKey() ? FrameSelection::AlterationExtend : FrameSelection::AlterationMove,
                     DirectionRight,
                     keyEvent->ctrlKey() ? WordGranularity : CharacterGranularity,
                     true);
             return true;
         case VK_UP:
-            frame->selection()->modify(keyEvent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
+            frame->selection()->modify(keyEvent->shiftKey() ? FrameSelection::AlterationExtend : FrameSelection::AlterationMove,
                     DirectionBackward,
                     keyEvent->ctrlKey() ? ParagraphGranularity : LineGranularity,
                     true);
             return true;
         case VK_DOWN:
-            frame->selection()->modify(keyEvent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
+            frame->selection()->modify(keyEvent->shiftKey() ? FrameSelection::AlterationExtend : FrameSelection::AlterationMove,
                     DirectionForward,
                     keyEvent->ctrlKey() ? ParagraphGranularity : LineGranularity,
                     true);
index 7e54bee..9ac0e64 100644 (file)
@@ -1,3 +1,13 @@
+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-04  Ryosuke Niwa  <rniwa@webkit.org>
 
         GTK build fix attempt after r85823
index ed0d3f9..ffd28f3 100644 (file)
@@ -384,7 +384,7 @@ static gboolean webkit_web_view_forward_context_menu_event(WebKitWebView* webVie
 static const int gContextMenuMargin = 1;
 static IntPoint getLocationForKeyboardGeneratedContextMenu(Frame* frame)
 {
-    SelectionController* selection = frame->selection();
+    FrameSelection* selection = frame->selection();
     if (!selection->selection().isNonOrphanedCaretOrRange()
          || (selection->selection().isCaret() && !selection->selection().isContentEditable())) {
         if (Node* focusedNode = getFocusedNode(frame))
index 821dae2..ae890be 100644 (file)
@@ -1,3 +1,13 @@
+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-04  Cris Neckar  <cdn@chromium.org>
 
         Reviewed by Adam Barth.
index 38b2899..82fbfa7 100644 (file)
@@ -267,25 +267,25 @@ void EditorClientHaiku::handleKeyboardEvent(KeyboardEvent* event)
                                                  false, true);
             break;
         case VK_LEFT:
-            frame->selection()->modify(kevent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
+            frame->selection()->modify(kevent->shiftKey() ? FrameSelection::AlterationExtend : FrameSelection::AlterationMove,
                                        DirectionLeft,
                                        kevent->ctrlKey() ? WordGranularity : CharacterGranularity,
                                        true);
             break;
         case VK_RIGHT:
-            frame->selection()->modify(kevent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
+            frame->selection()->modify(kevent->shiftKey() ? FrameSelection::AlterationExtend : FrameSelection::AlterationMove,
                                        DirectionRight,
                                        kevent->ctrlKey() ? WordGranularity : CharacterGranularity,
                                        true);
             break;
         case VK_UP:
-            frame->selection()->modify(kevent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
+            frame->selection()->modify(kevent->shiftKey() ? FrameSelection::AlterationExtend : FrameSelection::AlterationMove,
                                        DirectionBackward,
                                        kevent->ctrlKey() ? ParagraphGranularity : LineGranularity,
                                        true);
             break;
         case VK_DOWN:
-            frame->selection()->modify(kevent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
+            frame->selection()->modify(kevent->shiftKey() ? FrameSelection::AlterationExtend : FrameSelection::AlterationMove,
                                        DirectionForward,
                                        kevent->ctrlKey() ? ParagraphGranularity : LineGranularity,
                                        true);
index cc040a2..1b213f2 100644 (file)
@@ -1,3 +1,18 @@
+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-04  Cris Neckar  <cdn@chromium.org>
 
         Reviewed by Adam Barth.
index 9869c28..2c07dee 100644 (file)
@@ -651,12 +651,12 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
     return _private->coreFrame->view() ? _private->coreFrame->view()->needsLayout() : false;
 }
 
-- (DOMRange *)_rangeByAlteringCurrentSelection:(SelectionController::EAlteration)alteration direction:(SelectionDirection)direction granularity:(TextGranularity)granularity
+- (DOMRange *)_rangeByAlteringCurrentSelection:(FrameSelection::EAlteration)alteration direction:(SelectionDirection)direction granularity:(TextGranularity)granularity
 {
     if (_private->coreFrame->selection()->isNone())
         return nil;
 
-    SelectionController selection;
+    FrameSelection selection;
     selection.setSelection(_private->coreFrame->selection()->selection());
     selection.modify(alteration, direction, granularity);
     return kit(selection.toNormalizedRange().get());
index b34aea9..7b0e292 100644 (file)
@@ -32,8 +32,8 @@
 #import "WebPreferencesPrivate.h"
 #import <WebCore/EditAction.h>
 #import <WebCore/FrameLoaderTypes.h>
+#import <WebCore/FrameSelection.h>
 #import <WebCore/Position.h>
-#import <WebCore/SelectionController.h>
 #import <WebCore/Settings.h>
 
 @class DOMCSSStyleDeclaration;
@@ -136,7 +136,7 @@ WebView *getWebView(WebFrame *webFrame);
 - (NSRect)_firstRectForDOMRange:(DOMRange *)range;
 - (void)_scrollDOMRangeToVisible:(DOMRange *)range;
 
-- (DOMRange *)_rangeByAlteringCurrentSelection:(WebCore::SelectionController::EAlteration)alteration direction:(WebCore::SelectionDirection)direction granularity:(WebCore::TextGranularity)granularity;
+- (DOMRange *)_rangeByAlteringCurrentSelection:(WebCore::FrameSelection::EAlteration)alteration direction:(WebCore::SelectionDirection)direction granularity:(WebCore::TextGranularity)granularity;
 - (NSRange)_convertToNSRange:(WebCore::Range*)range;
 - (DOMRange *)_convertNSRangeToDOMRange:(NSRange)range;
 - (NSRange)_convertDOMRangeToNSRange:(DOMRange *)range;
index d0c9ce9..a4b3aa6 100644 (file)
@@ -93,6 +93,7 @@
 #import <WebCore/FocusController.h>
 #import <WebCore/Frame.h>
 #import <WebCore/FrameLoader.h>
+#import <WebCore/FrameSelection.h>
 #import <WebCore/FrameView.h>
 #import <WebCore/HTMLConverter.h>
 #import <WebCore/HTMLNames.h>
 #import <WebCore/RenderWidget.h>
 #import <WebCore/RenderView.h>
 #import <WebCore/RuntimeApplicationChecks.h>
-#import <WebCore/SelectionController.h>
 #import <WebCore/SharedBuffer.h>
 #import <WebCore/SimpleFontData.h>
 #import <WebCore/Text.h>
index 536f652..f8f1cd3 100644 (file)
@@ -174,7 +174,7 @@ using namespace std;
         // Get preceeding word stem
         WebFrame *frame = [_htmlView _frame];
         DOMRange *selection = kit(core(frame)->selection()->toNormalizedRange().get());
-        DOMRange *wholeWord = [frame _rangeByAlteringCurrentSelection:SelectionController::AlterationExtend
+        DOMRange *wholeWord = [frame _rangeByAlteringCurrentSelection:FrameSelection::AlterationExtend
             direction:DirectionBackward granularity:WordGranularity];
         DOMRange *prefix = [wholeWord cloneRange];
         [prefix setEnd:[selection startContainer] offset:[selection startOffset]];
index 4d0844c..a872a7e 100644 (file)
 #import <WebCore/FocusController.h>
 #import <WebCore/Frame.h>
 #import <WebCore/FrameLoader.h>
+#import <WebCore/FrameSelection.h>
 #import <WebCore/FrameTree.h>
 #import <WebCore/FrameView.h>
 #import <WebCore/GCController.h>
 #import <WebCore/ScriptController.h>
 #import <WebCore/ScriptValue.h>
 #import <WebCore/SecurityOrigin.h>
-#import <WebCore/SelectionController.h>
 #import <WebCore/Settings.h>
 #import <WebCore/TextResourceDecoder.h>
 #import <WebCore/ThreadCheck.h>
index 026a7df..857ca63 100644 (file)
@@ -34,6 +34,7 @@
 #include "FocusController.h"
 #include "Frame.h"
 #include "FrameLoaderClientQt.h"
+#include "FrameSelection.h"
 #include "FrameTree.h"
 #include "FrameView.h"
 #if USE(JSC)
@@ -74,7 +75,6 @@
 #include "ScriptValue.h"
 #include "Scrollbar.h"
 #include "Settings.h"
-#include "SelectionController.h"
 #include "SubstituteData.h"
 #include "SVGSMILElement.h"
 #include "TiledBackingStore.h"
index 57314cf..c50417f 100644 (file)
@@ -1,3 +1,12 @@
+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  Alexis Menard  <alexis.menard@openbossa.org>
 
         Reviewed by Andreas Kling.
index f4e3695..2cb79de 100644 (file)
@@ -1,3 +1,12 @@
+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-04  Ryosuke Niwa  <rniwa@webkit.org>
 
         Windows build fix attempt after r85823
index 8c8a5ef..89815f9 100644 (file)
@@ -87,6 +87,7 @@
 #include <WebCore/FloatQuad.h>
 #include <WebCore/FocusController.h>
 #include <WebCore/FrameLoader.h>
+#include <WebCore/FrameSelection.h>
 #include <WebCore/FrameTree.h>
 #include <WebCore/FrameView.h>
 #include <WebCore/FrameWin.h>
 #include <WebCore/Scrollbar.h>
 #include <WebCore/ScrollbarTheme.h>
 #include <WebCore/SecurityOrigin.h>
-#include <WebCore/SelectionController.h>
 #include <WebCore/Settings.h>
 #include <WebCore/SimpleFontData.h>
 #include <WebCore/SystemInfo.h>
index d7d8bf3..383389a 100644 (file)
@@ -1,3 +1,13 @@
+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-04  Cris Neckar  <cdn@chromium.org>
 
         Reviewed by Adam Barth.
index 9c8989b..095f974 100644 (file)
@@ -356,25 +356,25 @@ bool EditorClientWinCE::handleEditingKeyboardEvent(KeyboardEvent* event)
     if (caretBrowsing) {
         switch (keyEvent->windowsVirtualKeyCode()) {
         case VK_LEFT:
-            frame->selection()->modify(keyEvent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
+            frame->selection()->modify(keyEvent->shiftKey() ? FrameSelection::AlterationExtend : FrameSelection::AlterationMove,
                     DirectionLeft,
                     keyEvent->ctrlKey() ? WordGranularity : CharacterGranularity,
                     true);
             return true;
         case VK_RIGHT:
-            frame->selection()->modify(keyEvent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
+            frame->selection()->modify(keyEvent->shiftKey() ? FrameSelection::AlterationExtend : FrameSelection::AlterationMove,
                     DirectionRight,
                     keyEvent->ctrlKey() ? WordGranularity : CharacterGranularity,
                     true);
             return true;
         case VK_UP:
-            frame->selection()->modify(keyEvent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
+            frame->selection()->modify(keyEvent->shiftKey() ? FrameSelection::AlterationExtend : FrameSelection::AlterationMove,
                     DirectionBackward,
                     keyEvent->ctrlKey() ? ParagraphGranularity : LineGranularity,
                     true);
             return true;
         case VK_DOWN:
-            frame->selection()->modify(keyEvent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
+            frame->selection()->modify(keyEvent->shiftKey() ? FrameSelection::AlterationExtend : FrameSelection::AlterationMove,
                     DirectionForward,
                     keyEvent->ctrlKey() ? ParagraphGranularity : LineGranularity,
                     true);
index 96b03a3..2f737d5 100644 (file)
@@ -1,3 +1,15 @@
+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-04  Cris Neckar  <cdn@chromium.org>
 
         Reviewed by Adam Barth.
index ce35ea4..a271e2a 100644 (file)
@@ -29,7 +29,7 @@
 #include "WebDOMSelection.h"
 
 #include "Element.h"
-#include "SelectionController.h"
+#include "FrameSelection.h"
 #include "WebDOMElement.h"
 #include "WebDOMRange.h"
 
index f9a2aa5..c285a2d 100644 (file)
@@ -40,7 +40,7 @@ class WebDOMRange;
 
 namespace WebCore {
 
-class SelectionController;
+class FrameSelection;
 
 }
 
@@ -51,7 +51,7 @@ DECLARE_DYNAMIC_CLASS(wxWebKitDOMSelection)
 
 public:
     wxWebKitSelection() {}
-    wxWebKitSelection(WebCore::SelectionController* selection)
+    wxWebKitSelection(WebCore::FrameSelection* selection)
         : m_selection(selection) 
         { }
         
@@ -62,7 +62,7 @@ public:
     WebDOMRange* GetAsRange();
 
 private:
-    WebCore::SelectionController* m_selection;
+    WebCore::FrameSelection* m_selection;
 
 };
 
index 131b90a..5812dfe 100644 (file)
@@ -31,6 +31,7 @@
 #include "Editor.h"
 #include "FocusController.h"
 #include "Frame.h"
+#include "FrameSelection.h"
 #include "FrameView.h"
 #include "HostWindow.h"
 #include "KeyboardEvent.h"
@@ -38,7 +39,6 @@
 #include "Page.h"
 #include "PlatformKeyboardEvent.h"
 #include "PlatformString.h"
-#include "SelectionController.h"
 #include "WebFrame.h"
 #include "WebFramePrivate.h"
 #include "WebView.h"
index f548fee..f1210e7 100644 (file)
@@ -38,6 +38,7 @@
 #include "FocusController.h"
 #include "Frame.h"
 #include "FrameLoader.h"
+#include "FrameSelection.h"
 #include "FrameView.h"
 #include "GraphicsContext.h"
 #include "HTMLFormElement.h"
@@ -53,7 +54,6 @@
 #include "RenderView.h"
 #include "ResourceHandleManager.h"
 #include "Scrollbar.h"
-#include "SelectionController.h"
 #include "Settings.h"
 #include "SubstituteData.h"
 #include "Threading.h"