1. 12 May, 2011 1 commit
    • tonyg@chromium.org's avatar
      2011-05-10 Tony Gentilcore <tonyg@chromium.org> · 4b0a55f4
      tonyg@chromium.org authored
              Reviewed by Darin Adler.
      
              Perform some forward declarations suggested by include-what-you-use
              https://bugs.webkit.org/show_bug.cgi?id=60545
      
              * accessibility/AccessibilityObject.cpp:
              * accessibility/AccessibilityRenderObject.cpp:
              * accessibility/mac/AccessibilityObjectWrapper.mm:
              * dom/DocumentMarkerController.cpp:
              * dom/Position.cpp:
              * dom/PositionIterator.cpp:
              * dom/Range.cpp:
              * editing/ApplyBlockElementCommand.cpp:
              * editing/ApplyStyleCommand.cpp:
              * editing/Editor.cpp:
              * editing/EditorCommand.cpp:
              * editing/FrameSelection.cpp:
              * editing/HTMLInterchange.cpp:
              * editing/IndentOutdentCommand.cpp:
              * editing/ReplaceSelectionCommand.cpp:
              * editing/SpellChecker.h:
              * editing/SpellingCorrectionCommand.cpp:
              * editing/SpellingCorrectionController.h:
              * editing/TextCheckingHelper.cpp:
              * editing/TextIterator.h:
              * editing/htmlediting.h:
              * editing/markup.cpp:
              * editing/visible_units.cpp:
              * editing/visible_units.h:
              * fileapi/DOMFileSystem.cpp:
              * fileapi/DirectoryReaderSync.cpp:
              * fileapi/DirectoryReaderSync.h:
              * fileapi/FileEntry.h:
              * fileapi/FileWriter.h:
              * fileapi/FileWriterBase.h:
              * fileapi/FileWriterSync.h:
              * history/CachedFrame.cpp:
              * history/CachedPage.cpp:
              * history/HistoryItem.cpp:
              * history/HistoryItem.h:
              * history/PageCache.h:
              * loader/HistoryController.h:
              * loader/PingLoader.h:
              * loader/ResourceLoader.h:
              * loader/appcache/DOMApplicationCache.h:
              * loader/cache/CachedCSSStyleSheet.h:
              * loader/cache/CachedFont.cpp:
              * loader/cache/CachedFont.h:
              * loader/cache/CachedResourceRequest.cpp:
              * loader/cache/CachedResourceRequest.h:
              * loader/cache/MemoryCache.h:
              * notifications/Notification.cpp:
              * notifications/Notification.h:
              * notifications/NotificationCenter.cpp:
              * notifications/NotificationCenter.h:
              * page/Chrome.cpp:
              * page/Chrome.h:
              * page/DOMSelection.cpp:
              * page/DOMTimer.h:
              * page/DOMWindow.cpp:
              * page/EventHandler.cpp:
              * page/FocusController.h:
              * page/Geolocation.cpp:
              * page/Geolocation.h:
              * page/History.cpp:
              * rendering/RenderListBox.cpp:
              * workers/WorkerContext.cpp:
      2011-05-10  Tony Gentilcore  <tonyg@chromium.org>
      
              Reviewed by Darin Adler.
      
              Perform some forward declarations suggested by include-what-you-use
              https://bugs.webkit.org/show_bug.cgi?id=60545
      
              * src/WebHistoryItem.cpp:
              * src/WebNotification.cpp:
              * src/WebTextCheckingCompletionImpl.cpp:
              * src/mac/WebSubstringUtil.mm:
      2011-05-10  Tony Gentilcore  <tonyg@chromium.org>
      
              Reviewed by Darin Adler.
      
              Perform some forward declarations suggested by include-what-you-use
              https://bugs.webkit.org/show_bug.cgi?id=60545
      
              * Plugins/Hosted/WebHostedNetscapePluginView.mm:
              * WebView/WebFrame.mm:
      2011-05-10  Tony Gentilcore  <tonyg@chromium.org>
      
              Reviewed by Darin Adler.
      
              Perform some forward declarations suggested by include-what-you-use
              https://bugs.webkit.org/show_bug.cgi?id=60545
      
              * WebProcess/WebPage/mac/WebPageMac.mm:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4b0a55f4
  2. 05 May, 2011 1 commit
    • rniwa@webkit.org's avatar
      2011-05-05 Ryosuke Niwa <rniwa@webkit.org> · 78bbc94c
      rniwa@webkit.org authored
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * src/WebFrameImpl.cpp:
              (WebKit::WebFrameImpl::selectWordAroundCaret):
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::textInputType):
              (WebKit::WebViewImpl::caretOrSelectionBounds):
              (WebKit::WebViewImpl::caretOrSelectionRange):
              (WebKit::WebViewImpl::clearFocusedNode):
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * Api/qwebframe.cpp:
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * webkit/webkitwebview.cpp:
              (getLocationForKeyboardGeneratedContextMenu):
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * WebView.cpp:
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * WebDOMSelection.cpp:
              * WebDOMSelection.h:
              * WebKitSupport/EditorClientWx.cpp:
              * WebView.cpp:
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * WebView/WebFrame.mm:
              (-[WebFrame _rangeByAlteringCurrentSelection:FrameSelection::direction:granularity:]):
              * WebView/WebFrameInternal.h:
              * WebView/WebHTMLView.mm:
              * WebView/WebTextCompletionController.mm:
              (-[WebTextCompletionController doCompletion]):
              * WebView/WebView.mm:
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * WebCoreSupport/EditorClientHaiku.cpp:
              (WebCore::EditorClientHaiku::handleKeyboardEvent):
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * WebCoreSupport/EditorClientWinCE.cpp:
              (WebKit::EditorClientWinCE::handleEditingKeyboardEvent):
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * WebCoreSupport/EditorClientEfl.cpp:
              (WebCore::EditorClientEfl::handleEditingKeyboardEvent):
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * CMakeLists.txt:
              * GNUmakefile.list.am:
              * WebCore.exp.in:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * accessibility/AccessibilityObject.cpp:
              * accessibility/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::visiblePositionRangeForLine):
              * accessibility/mac/AccessibilityObjectWrapper.mm:
              * bindings/objc/ExceptionHandlers.h:
              * css/CSSStyleSelector.cpp:
              * dom/ContainerNode.cpp:
              (WebCore::ContainerNode::cloneChildNodes):
              * dom/Document.cpp:
              * dom/InputElement.cpp:
              * editing/DeleteButtonController.cpp:
              * editing/EditCommand.cpp:
              * editing/EditingAllInOne.cpp:
              * editing/EditingStyle.cpp:
              * editing/Editor.cpp:
              (WebCore::Editor::canCopy):
              (WebCore::Editor::canDelete):
              (WebCore::Editor::markMisspellingsAfterTypingToWord):
              (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
              (WebCore::Editor::changeSelectionAfterCommand):
              (WebCore::Editor::respondToChangedSelection):
              * editing/Editor.h:
              * editing/EditorCommand.cpp:
              (WebCore::executeDeleteToMark):
              (WebCore::executeMoveBackward):
              (WebCore::executeMoveBackwardAndModifySelection):
              (WebCore::executeMoveDown):
              (WebCore::executeMoveDownAndModifySelection):
              (WebCore::executeMoveForward):
              (WebCore::executeMoveForwardAndModifySelection):
              (WebCore::executeMoveLeft):
              (WebCore::executeMoveLeftAndModifySelection):
              (WebCore::executeMovePageDown):
              (WebCore::executeMovePageDownAndModifySelection):
              (WebCore::executeMovePageUp):
              (WebCore::executeMovePageUpAndModifySelection):
              (WebCore::executeMoveRight):
              (WebCore::executeMoveRightAndModifySelection):
              (WebCore::executeMoveToBeginningOfDocument):
              (WebCore::executeMoveToBeginningOfDocumentAndModifySelection):
              (WebCore::executeMoveToBeginningOfLine):
              (WebCore::executeMoveToBeginningOfLineAndModifySelection):
              (WebCore::executeMoveToBeginningOfParagraph):
              (WebCore::executeMoveToBeginningOfParagraphAndModifySelection):
              (WebCore::executeMoveToBeginningOfSentence):
              (WebCore::executeMoveToBeginningOfSentenceAndModifySelection):
              (WebCore::executeMoveToEndOfDocument):
              (WebCore::executeMoveToEndOfDocumentAndModifySelection):
              (WebCore::executeMoveToEndOfSentence):
              (WebCore::executeMoveToEndOfSentenceAndModifySelection):
              (WebCore::executeMoveToEndOfLine):
              (WebCore::executeMoveToEndOfLineAndModifySelection):
              (WebCore::executeMoveToEndOfParagraph):
              (WebCore::executeMoveToEndOfParagraphAndModifySelection):
              (WebCore::executeMoveParagraphBackwardAndModifySelection):
              (WebCore::executeMoveParagraphForwardAndModifySelection):
              (WebCore::executeMoveUp):
              (WebCore::executeMoveUpAndModifySelection):
              (WebCore::executeMoveWordBackward):
              (WebCore::executeMoveWordBackwardAndModifySelection):
              (WebCore::executeMoveWordForward):
              (WebCore::executeMoveWordForwardAndModifySelection):
              (WebCore::executeMoveWordLeft):
              (WebCore::executeMoveWordLeftAndModifySelection):
              (WebCore::executeMoveWordRight):
              (WebCore::executeMoveWordRightAndModifySelection):
              (WebCore::executeMoveToLeftEndOfLine):
              (WebCore::executeMoveToLeftEndOfLineAndModifySelection):
              (WebCore::executeMoveToRightEndOfLine):
              (WebCore::executeMoveToRightEndOfLineAndModifySelection):
              * editing/FrameSelection.cpp: Copied from Source/WebCore/editing/SelectionController.cpp.
              (WebCore::FrameSelection::FrameSelection):
              (WebCore::FrameSelection::moveTo):
              (WebCore::FrameSelection::setSelection):
              (WebCore::FrameSelection::nodeWillBeRemoved):
              (WebCore::FrameSelection::respondToNodeModification):
              (WebCore::FrameSelection::textWillBeReplaced):
              (WebCore::FrameSelection::setIsDirectional):
              (WebCore::FrameSelection::directionOfEnclosingBlock):
              (WebCore::FrameSelection::willBeModified):
              (WebCore::FrameSelection::positionForPlatform):
              (WebCore::FrameSelection::startForPlatform):
              (WebCore::FrameSelection::endForPlatform):
              (WebCore::FrameSelection::modifyExtendingRight):
              (WebCore::FrameSelection::modifyExtendingForward):
              (WebCore::FrameSelection::modifyMovingRight):
              (WebCore::FrameSelection::modifyMovingForward):
              (WebCore::FrameSelection::modifyExtendingLeft):
              (WebCore::FrameSelection::modifyExtendingBackward):
              (WebCore::FrameSelection::modifyMovingLeft):
              (WebCore::FrameSelection::modifyMovingBackward):
              (WebCore::FrameSelection::modify):
              (WebCore::FrameSelection::xPosForVerticalArrowNavigation):
              (WebCore::FrameSelection::clear):
              (WebCore::FrameSelection::setStart):
              (WebCore::FrameSelection::setEnd):
              (WebCore::FrameSelection::setBase):
              (WebCore::FrameSelection::setExtent):
              (WebCore::FrameSelection::setCaretRectNeedsUpdate):
              (WebCore::FrameSelection::updateCaretRect):
              (WebCore::FrameSelection::caretRenderer):
              (WebCore::FrameSelection::localCaretRect):
              (WebCore::FrameSelection::absoluteBoundsForLocalRect):
              (WebCore::FrameSelection::absoluteCaretBounds):
              (WebCore::FrameSelection::caretRepaintRect):
              (WebCore::FrameSelection::recomputeCaretRect):
              (WebCore::FrameSelection::shouldRepaintCaret):
              (WebCore::FrameSelection::invalidateCaretRect):
              (WebCore::FrameSelection::paintCaret):
              (WebCore::FrameSelection::debugRenderer):
              (WebCore::FrameSelection::contains):
              (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
              (WebCore::FrameSelection::selectAll):
              (WebCore::FrameSelection::setSelectedRange):
              (WebCore::FrameSelection::isInPasswordField):
              (WebCore::FrameSelection::caretRendersInsideNode):
              (WebCore::FrameSelection::focusedOrActiveStateChanged):
              (WebCore::FrameSelection::pageActivationChanged):
              (WebCore::FrameSelection::updateSecureKeyboardEntryIfActive):
              (WebCore::FrameSelection::setUseSecureKeyboardEntry):
              (WebCore::FrameSelection::setFocused):
              (WebCore::FrameSelection::isFocusedAndActive):
              (WebCore::FrameSelection::updateAppearance):
              (WebCore::FrameSelection::setCaretVisible):
              (WebCore::FrameSelection::clearCaretRectIfNeeded):
              (WebCore::FrameSelection::caretBlinkTimerFired):
              (WebCore::FrameSelection::notifyRendererOfSelectionChange):
              (WebCore::FrameSelection::setFocusedNodeIfNeeded):
              (WebCore::FrameSelection::paintDragCaret):
              (WebCore::FrameSelection::copyTypingStyle):
              (WebCore::FrameSelection::shouldDeleteSelection):
              (WebCore::FrameSelection::bounds):
              (WebCore::FrameSelection::getClippedVisibleTextRectangles):
              (WebCore::FrameSelection::currentForm):
              (WebCore::FrameSelection::revealSelection):
              (WebCore::FrameSelection::setSelectionFromNone):
              (WebCore::FrameSelection::shouldChangeSelection):
              (WebCore::FrameSelection::formatForDebugger):
              (WebCore::FrameSelection::showTreeForThis):
              (showTree):
              * editing/FrameSelection.h: Copied from Source/WebCore/editing/SelectionController.h.
              (WebCore::FrameSelection::typingStyle):
              (WebCore::FrameSelection::clearTypingStyle):
              (WebCore::FrameSelection::setTypingStyle):
              (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
              * editing/ModifySelectionListLevel.cpp:
              * editing/RemoveFormatCommand.cpp:
              * editing/ReplaceSelectionCommand.cpp:
              * editing/SelectionController.cpp: Removed.
              * editing/SelectionController.h: Removed.
              * editing/SetSelectionCommand.cpp:
              (WebCore::SetSelectionCommand::SetSelectionCommand):
              (WebCore::SetSelectionCommand::doApply):
              (WebCore::SetSelectionCommand::doUnapply):
              * editing/SetSelectionCommand.h:
              (WebCore::SetSelectionCommand::create):
              * editing/SpellingCorrectionCommand.cpp:
              (WebCore::SpellingCorrectionCommand::doApply):
              * editing/SpellingCorrectionController.cpp:
              (WebCore::SpellingCorrectionController::respondToUnappliedSpellCorrection):
              * editing/TypingCommand.cpp:
              (WebCore::TypingCommand::deleteKeyPressed):
              (WebCore::TypingCommand::forwardDeleteKeyPressed):
              * editing/chromium/FrameSelectionChromium.cpp: Copied from Source/WebCore/editing/chromium/SelectionControllerChromium.cpp.
              (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
              * editing/chromium/SelectionControllerChromium.cpp: Removed.
              * editing/gtk/FrameSelectionGtk.cpp: Copied from Source/WebCore/editing/gtk/SelectionControllerGtk.cpp.
              (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
              * editing/gtk/SelectionControllerGtk.cpp: Removed.
              * editing/mac/EditorMac.mm:
              (WebCore::Editor::canCopyExcludingStandaloneImages):
              * editing/mac/FrameSelectionMac.mm: Copied from Source/WebCore/editing/mac/SelectionControllerMac.mm.
              (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
              * editing/mac/SelectionControllerMac.mm: Removed.
              * editing/qt/EditorQt.cpp:
              * loader/archive/cf/LegacyWebArchive.cpp:
              * page/ContextMenuController.cpp:
              (WebCore::ContextMenuController::populate):
              * page/DOMSelection.cpp:
              (WebCore::DOMSelection::type):
              (WebCore::DOMSelection::modify):
              (WebCore::DOMSelection::addRange):
              (WebCore::DOMSelection::deleteFromDocument):
              (WebCore::DOMSelection::containsNode):
              * page/DragController.cpp:
              (WebCore::DragController::dragIsMove):
              * page/DragController.h:
              * page/EventHandler.cpp:
              (WebCore::setSelectionIfNeeded):
              (WebCore::setNonDirectionalSelectionIfNeeded):
              (WebCore::EventHandler::sendContextMenuEventForKey):
              (WebCore::EventHandler::handleKeyboardSelectionMovement):
              * page/EventHandler.h:
              * page/FocusController.cpp:
              (WebCore::clearSelectionIfNeeded):
              * page/Frame.cpp:
              (WebCore::Frame::Frame):
              * page/Frame.h:
              (WebCore::Frame::selection):
              * page/Page.cpp:
              (WebCore::Page::Page):
              * page/Page.h:
              (WebCore::Page::dragCaretController):
              * page/chromium/DragControllerChromium.cpp:
              * page/chromium/EventHandlerChromium.cpp:
              * page/win/DragControllerWin.cpp:
              * page/win/EventHandlerWin.cpp:
              * rendering/HitTestResult.cpp:
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::destroy):
              (WebCore::RenderBlock::paintCaret):
              * rendering/RenderImage.cpp:
              * rendering/RenderInline.cpp:
              (WebCore::RenderInline::destroy):
              * rendering/RenderLayer.cpp:
              * rendering/RenderListBox.cpp:
              * rendering/RenderObjectChildList.cpp:
              (WebCore::RenderObjectChildList::removeChildNode):
              * rendering/RenderTextControl.cpp:
              * rendering/RenderTextControlSingleLine.cpp:
              * rendering/RenderTheme.cpp:
              * rendering/RenderTreeAsText.cpp:
              * svg/SVGSVGElement.cpp:
              * svg/SVGTextContentElement.cpp:
              (WebCore::SVGTextContentElement::selectSubString):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@85864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      78bbc94c
  3. 08 Apr, 2011 1 commit
    • morrita@google.com's avatar
      2011-04-06 MORITA Hajime <morrita@google.com> · 4e40c8bf
      morrita@google.com authored
              Reviewed by Darin Adler.
      
              [Refactoring] Auto correction panel should be handled by its own class.
              https://bugs.webkit.org/show_bug.cgi?id=55571
      
              Extracted code inside SUPPORT_AUTOCORRECTION_PANEL into
              SpellingCorrectionController class.
              This change also remove some SUPPORT_AUTOCORRECTION_PANEL guard if
              code paths inside the never reached without autocorrection support.
              Removing guards reduces unintentional build breakage.
      
              No new tests, no behavior chagne.
      
              * CMakeLists.txt:
              * GNUmakefile.am:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * editing/CorrectionPanelInfo.h: Removed.
              * editing/EditingAllInOne.cpp:
              * editing/Editor.cpp:
              (WebCore::Editor::respondToChangedSelection):
              (WebCore::Editor::respondToChangedContents):
              (WebCore::Editor::appliedEditing):
              (WebCore::Editor::Editor):
              (WebCore::Editor::~Editor):
              (WebCore::Editor::insertTextWithoutSendingTextEvent):
              (WebCore::Editor::insertLineBreak):
              (WebCore::Editor::insertParagraphSeparator):
              (WebCore::Editor::cut):
              (WebCore::Editor::paste):
              (WebCore::Editor::pasteAsPlainText):
              (WebCore::Editor::isAutomaticSpellingCorrectionEnabled):
              (WebCore::Editor::markMisspellingsAfterTypingToWord):
              (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
              (WebCore::Editor::changeBackToReplacedString):
              (WebCore::Editor::unappliedSpellCorrection):
              (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
              (WebCore::Editor::startCorrectionPanelTimer):
              (WebCore::Editor::handleCorrectionPanelResult):
              (WebCore::Editor::dismissCorrectionPanelAsIgnored):
              * editing/Editor.h:
              * editing/SpellingCorrectionCommand.cpp:
              * editing/SpellingCorrectionController.cpp: Added.
              (WebCore::markerTypesForAutocorrection):
              (WebCore::markerTypesForReplacement):
              (WebCore::markersHaveIdenticalDescription):
              (WebCore::SpellingCorrectionController::SpellingCorrectionController):
              (WebCore::SpellingCorrectionController::~SpellingCorrectionController):
              (WebCore::SpellingCorrectionController::startCorrectionPanelTimer):
              (WebCore::SpellingCorrectionController::stopCorrectionPanelTimer):
              (WebCore::SpellingCorrectionController::stopPendingCorrection):
              (WebCore::SpellingCorrectionController::applyPendingCorrection):
              (WebCore::SpellingCorrectionController::hasPendingCorrection):
              (WebCore::SpellingCorrectionController::isSpellingMarkerAllowed):
              (WebCore::SpellingCorrectionController::show):
              (WebCore::SpellingCorrectionController::handleCancelOperation):
              (WebCore::SpellingCorrectionController::dismiss):
              (WebCore::SpellingCorrectionController::dismissSoon):
              (WebCore::SpellingCorrectionController::applyCorrectionPanelInfo):
              (WebCore::SpellingCorrectionController::applyAutocorrectionBeforeTypingIfAppropriate):
              (WebCore::SpellingCorrectionController::respondToUnappliedSpellCorrection):
              (WebCore::SpellingCorrectionController::correctionPanelTimerFired):
              (WebCore::SpellingCorrectionController::handleCorrectionPanelResult):
              (WebCore::SpellingCorrectionController::isAutomaticSpellingCorrectionEnabled):
              (WebCore::SpellingCorrectionController::windowRectForRange):
              (WebCore::SpellingCorrectionController::respondToChangedSelection):
              (WebCore::SpellingCorrectionController::respondToAppliedEditing):
              (WebCore::SpellingCorrectionController::client):
              (WebCore::SpellingCorrectionController::textChecker):
              (WebCore::SpellingCorrectionController::recordAutocorrectionResponseReversed):
              (WebCore::SpellingCorrectionController::markReversed):
              (WebCore::SpellingCorrectionController::markCorrection):
              (WebCore::SpellingCorrectionController::recordSpellcheckerResponseForModifiedCorrection):
              * editing/SpellingCorrectionController.h: Added.
              (WebCore::SpellingCorrectionController::UNLESS_ENABLED):
              (WebCore::SpellingCorrectionController::shouldStartTimeFor):
              (WebCore::SpellingCorrectionController::shouldRemoveMarkersUponEditing):
              * editing/TypingCommand.cpp:
              (WebCore::TypingCommand::insertText):
              (WebCore::TypingCommand::markMisspellingsAfterTyping):
              (WebCore::TypingCommand::deleteKeyPressed):
              (WebCore::TypingCommand::forwardDeleteKeyPressed):
              * editing/htmlediting.h:
              (WebCore::isAmbiguousBoundaryCharacter):
              * page/EditorClient.h:
              * page/Frame.cpp:
              (WebCore::Frame::setPageAndTextZoomFactors):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4e40c8bf
  4. 06 Apr, 2011 1 commit
    • commit-queue@webkit.org's avatar
      2011-04-06 Jia Pu <jpu@apple.com> · aad7ca2b
      commit-queue@webkit.org authored
              Reviewed by Darin Adler.
      
              [Mac] WebCore need to notify AppKit spell checker after user has modified autocorrected text.
              https://bugs.webkit.org/show_bug.cgi?id=57665
              <rdar://problem/7350477>
      
              We need to track how user modified an autocorrected word. If he changed it back to original
              text, we want to record AutocorrectionReverted response. And if he changed it to something
              else, we want to record AutocorrectionEdited response.
      
              To achieve this, we need to distringuish between text replacement caused by autocorrection
              from that due to other causes, such as reversion, text substitution, etc. So we added a new
              marker type "Autocorrected". We also need to be able to check for correction, even when we
              don't intend to actually carry out replacement. For this, we introduced a new TextCheckingOption
              value, "CheckForCorrection".
      
              We also added DocumentMarkerController::markersInRange() to retrieve a vector of markers in
              specified range, and of specified type.
      
              * dom/DocumentMarker.h:
              * dom/DocumentMarkerController.cpp:
              (WebCore::DocumentMarkerController::markersInRange):
              (WebCore::DocumentMarkerController::hasMarkers):
              * dom/DocumentMarkerController.h:
              * editing/Editor.cpp:
              (WebCore::markerTypesForAutocorrection):
              (WebCore::markersHaveIdenticalDescription):
              (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
              (WebCore::Editor::recordSpellcheckerResponseForModifiedCorrection):
              (WebCore::Editor::changeBackToReplacedString):
              (WebCore::Editor::markMisspellingsAndBadGrammar):
              (WebCore::Editor::applyCorrectionPanelInfo):
              (WebCore::Editor::unappliedSpellCorrection):
              (WebCore::Editor::textCheckingTypeMaskFor):
              * editing/Editor.h:
              * editing/SpellingCorrectionCommand.cpp:
              (WebCore::SpellingCorrectionCommand::doApply):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aad7ca2b
  5. 01 Mar, 2011 1 commit
    • commit-queue@webkit.org's avatar
      2011-03-01 Jia Pu <jpu@apple.com> · 5396fd99
      commit-queue@webkit.org authored
              Reviewed by Darin Adler.
      
              Remove CorrectionIndicator markers sooner.
              https://bugs.webkit.org/show_bug.cgi?id=54893
              <rdar://problem/8997524>
      
              See WebCore/ChangeLog for detail.
      
              * platform/mac-leopard/Skipped:
              * platform/mac-snowleopard/Skipped:
              * platform/mac-tiger/Skipped:
              * platform/mac-wk2/Skipped:
              * platform/mac/editing/spelling/autocorrection-simple-expected.checksum:
              * platform/mac/editing/spelling/autocorrection-simple-expected.png:
              * platform/mac/editing/spelling/autocorrection-simple-expected.txt:
              * platform/mac/editing/spelling/autocorrection-simple.html:
              * platform/mac/editing/spelling/delete-into-autocorrected-word-expected.checksum:
              * platform/mac/editing/spelling/delete-into-autocorrected-word-expected.png:
              * platform/mac/editing/spelling/removing-underline-after-accepting-autocorrection-using-punctuation-expected.checksum: Added.
              * platform/mac/editing/spelling/removing-underline-after-accepting-autocorrection-using-punctuation-expected.png: Added.
              * platform/mac/editing/spelling/removing-underline-after-accepting-autocorrection-using-punctuation-expected.txt: Copied from LayoutTests/platform/mac/editing/spelling/autocorrection-simple-expected.txt.
              * platform/mac/editing/spelling/removing-underline-after-accepting-autocorrection-using-punctuation.html: Copied from LayoutTests/platform/mac/editing/spelling/autocorrection-simple.html.
      2011-03-01  Jia Pu  <jpu@apple.com>
      
              Reviewed by Darin Adler.
      
              Remove CorrectionIndicator markers sooner.
              https://bugs.webkit.org/show_bug.cgi?id=54893
              <rdar://problem/8997524>
      
              Test: platform/mac/editing/spelling/removing-underline-after-accepting-autocorrection-using-punctuation.html
      
              This patch changes the autocorrection behavior on Mac OS X. We want to remove CorrectionIndicator
              marker after any editing command if the command:
              1. is not a SpellingCorrectionCommand itself.
              2. is not the command that triggers the autocorrection.
              This is achieved by adding shouldRetainAutocorrectionIndicator() function to EditCommand. This function returns
              false for all commands derived from EditCommand, except SpellingCorrectionCommand and TypingCommand. This function
              always returns true for SpellingCorrectionCommand. For TypingCommand, the return value is determined by member
              variable m_shouldRetainAutocorrectionIndicator, which can be modified by passing option into the TypingCommand's
              public functions.
      
              To avoid constantly searching marker list, we use variable DocumentMarkerController::m_absentMarkerTypeCache
              to cache whether there is any marker of a particular type.
      
              This patch also fixes two minor existing bugs.
      
              1. We used to show reversion panel for word with CorrectionIndicator marker. This is incorrect because
              CorrectionIndicator marker can be removed from corrected words. Since all autocorrected words have Replacement
              marker unless the whole word is deleted, the correct behavior is to show reversion panel for word with Replacement
              marker, since all autocorrected words have such marker. However, since we don't want to show the reversion panel
              if an autocorrected word has been edited, we also check to see if the Replacement marker's description is null.
      
              This works as following:
              When we apply an autocorrection, we add Replacement marker to corrected word, and store original word
              as the marker's description. If the user edited the corrected word afterward, we set description to null.
              So when we decide whether to show a reversion panel, we not only check for the existence of Replacement
              marker, but also check if description is null.
      
              2. Fixed an assertion violation in Editor::removeSpellAndCorrectionMarkersFromWordsToBeEdited(), which would
              occur when deleting the first character in an editable area.
      
              * dom/DocumentMarker.h: Added m_possiblyExistingMarkerTypes to allow quickly checking whether a marker type is
                 completely in from the document.
      
              * dom/DocumentMarkerController.cpp: Most of the functions listed here are optimized for early return by checking
                 the return value of possiblyHasMarkers() at beginning.
              (WebCore::DocumentMarkerController::possiblyHasMarkers):
              (WebCore::DocumentMarkerController::DocumentMarkerController):
              (WebCore::DocumentMarkerController::detach):
              (WebCore::DocumentMarkerController::removeMarkers):
              (WebCore::DocumentMarkerController::addMarker):
              (WebCore::DocumentMarkerController::copyMarkers):
              (WebCore::DocumentMarkerController::markerContainingPoint):
              (WebCore::DocumentMarkerController::renderedRectsForMarkers):
              (WebCore::DocumentMarkerController::removeMarkersFromMarkerMapVectorPair):
              (WebCore::DocumentMarkerController::repaintMarkers):
              (WebCore::DocumentMarkerController::shiftMarkers):
              (WebCore::DocumentMarkerController::setMarkersActive):
              (WebCore::DocumentMarkerController::hasMarkers):
              (WebCore::DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):
              * dom/DocumentMarkerController.h:
              * editing/EditCommand.cpp:
              (WebCore::EditCommand::apply):
              (WebCore::EditCommand::shouldRetainAutocorrectionIndicator):
              (WebCore::EditCommand::setShouldRetainAutocorrectionIndicator):
              * editing/EditCommand.h:
              * editing/Editor.cpp:
              (WebCore::Editor::respondToChangedSelection):
              (WebCore::Editor::appliedEditing):
              (WebCore::Editor::insertTextWithoutSendingTextEvent):
              (WebCore::Editor::insertLineBreak):
              (WebCore::Editor::insertParagraphSeparator):
              (WebCore::Editor::markMisspellingsAfterTypingToWord):
              (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
              (WebCore::Editor::removeSpellAndCorrectionMarkersFromWordsToBeEdited):
              (WebCore::Editor::applyAutocorrectionBeforeTypingIfAppropriate):
              * editing/Editor.h:
              * editing/EditorCommand.cpp:
              (WebCore::executeInsertLineBreak):
              (WebCore::executeInsertParagraph):
              (WebCore::executeInsertText):
              * editing/SpellingCorrectionCommand.cpp:
              (WebCore::SpellingCorrectionCommand::shouldRetainAutocorrectionIndicator):
              * editing/SpellingCorrectionCommand.h:
              * editing/TypingCommand.cpp:
              (WebCore::TypingCommand::TypingCommand):
              (WebCore::TypingCommand::deleteSelection):
              (WebCore::TypingCommand::deleteKeyPressed):
              (WebCore::TypingCommand::forwardDeleteKeyPressed):
              (WebCore::TypingCommand::updateSelectionIfDifferentFromCurrentSelection):
              (WebCore::TypingCommand::insertText):
              (WebCore::TypingCommand::insertLineBreak):
              (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):
              (WebCore::TypingCommand::insertParagraphSeparator):
              * editing/TypingCommand.h:
              (WebCore::TypingCommand::create):
              (WebCore::TypingCommand::shouldRetainAutocorrectionIndicator):
              (WebCore::TypingCommand::setShouldRetainAutocorrectionIndicator):
              * manual-tests/autocorrection/type-whitespace-to-dismiss-reversion.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80023 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5396fd99
  6. 15 Feb, 2011 1 commit
    • darin@apple.com's avatar
      2011-02-15 Jia Pu <jpu@apple.com> · 060d7a1a
      darin@apple.com authored
              Reviewed by Darin Adler.
      
              Autocorrection should respect undo.
              https://bugs.webkit.org/show_bug.cgi?id=52221
              <rdar://problem/8663399>
      
              Please see WebCore/ChangeLog for detailed description.
      
              * WebCoreSupport/WebEditorClient.cpp:
              (WebFrameImpl::replaceSelection): Adopted new signature of ReplaceSelectionCommand::create().
      2011-02-15  Jia Pu  <jpu@apple.com>
      
              Reviewed by Darin Adler.
      
              Autocorrection should respect undo.
              https://bugs.webkit.org/show_bug.cgi?id=52221
              <rdar://problem/8663399>
      
              Please see WebCore/ChangeLog for detailed description.
      
              * WebCoreSupport/WebEditorClient.h: Updated for the new function declared in EditorClient.
      
              * WebCoreSupport/WebEditorClient.mm:
              (WebEditorClient::recordAutocorrectionResponse): Ditto.
      
              * WebView/WebFrame.mm:
              (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
                   Adopted new signature of ReplaceSelectionCommand::create().
      2011-02-15  Jia Pu  <jpu@apple.com>
      
              Reviewed by Darin Adler.
      
              Autocorrection should respect undo.
              https://bugs.webkit.org/show_bug.cgi?id=52221
              <rdar://problem/8663399>
      
              Manual test: manual-tests/autocorrection/undo-autocorrection.html
      
              When user undoes an autocorrection, we need to do four things:
              1. Revert the change in text that has been made by correction.
              2. Revert the selection to pre-correction state so that user can immediately continue typing.
              3. Add appropriate markers to reverted text so that it won't be corrected again and/or shown
                 as misspelled.
              4. If applicable, notify spell checking service to record this reversion.
      
              To achieve these, this patch introduces following changes:
              1. Created SpellingCorrectionCommand so that correction can be undone in similar way as any
                 other editing command. SpellingCorrectionCommand is a composition of SetSelectionCommand,
                 SpellingCorrectionRecordUndoCommand and ReplaceSelectionCommand.
              2. Created SetSelectionCommand so that undo command can restore selection state.
              3. Added member function recordAutocorrectionResponse() to editor client.
      
              To improve readability, this patch also consolidates various boolean arguments in SelectionController::setSelection()
              and ReplaceSelectionCommand::ReplaceSelectionCommand(). These boolean arguments have been
              replaced by enum variable.
      
              * WebCore.exp.in: Updated for changes in Editor and ReplaceSelectionCommand.
      
              * WebCore.xcodeproj/project.pbxproj: Updated for new source files.
      
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::moveParagraphs): Adopted new signature of ReplaceSelectionCommand::create().
      
              * editing/Editor.cpp:
              (WebCore::Editor::replaceSelectionWithFragment): Ditto.
              (WebCore::Editor::unappliedEditing): Cleaned up trailing whitespace.
              (WebCore::Editor::reappliedEditing): Ditto.
              (WebCore::Editor::selectComposition): Adopted new signature of SelectionController::setSelection().
              (WebCore::Editor::confirmComposition): Ditto.
              (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Rearranged code to reduce the
                  level of deeply nested if statement. Adopted SpellingCorrectionCommand.
              (WebCore::Editor::applyCorrectionPanelInfo): Adopted SpellingCorrectionCommand.
              (WebCore::Editor::unappliedSpellCorrection): Function for adding markers to reverted text and
                  for notifiying editor client about undone correction.
              (WebCore::Editor::changeSelectionAfterCommand): Adopted new signature of SelectionController::setSelection().
              (WebCore::Editor::respondToChangedSelection): Use SelectionController::SetSelectionOptions
                  instead of boolean variables.
      
              * editing/Editor.h: Added Editor::unappliedSpellCorrection().
      
              * editing/EditorCommand.cpp:
              (WebCore::executeInsertFragment): Adopted new signature of ReplaceSelectionCommand::create().
      
              * editing/MoveSelectionCommand.cpp:
              (WebCore::MoveSelectionCommand::doApply): Ditto.
      
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand): Replaced all boolean arguments
                  with an enum value.
      
              * editing/ReplaceSelectionCommand.h:
              (WebCore::ReplaceSelectionCommand::create): Ditto.
      
              * editing/SelectionController.cpp: Adopted new signature of SelectionController::setSelection().
              (WebCore::SelectionController::moveTo):
              (WebCore::SelectionController::setSelection):
              (WebCore::SelectionController::respondToNodeModification):
              (WebCore::SelectionController::setBase):
              (WebCore::SelectionController::setExtent):
              (WebCore::SelectionController::setSelectedRange):
      
              * editing/SelectionController.h:
              (WebCore::SelectionController::setSelection): Replaced all boolean arguments with an enum value.
      
              * editing/SetSelectionCommand.cpp: Added.
              (WebCore::SetSelectionCommand::SetSelectionCommand):
              (WebCore::SetSelectionCommand::doApply):
              (WebCore::SetSelectionCommand::doUnapply):
      
              * editing/SetSelectionCommand.h: Added.
              (WebCore::SetSelectionCommand::create):
      
              * editing/mac/SpellingCorrectionCommand.cpp: Added.
              (WebCore::SpellingCorrectionRecordUndoCommand::create):
              (WebCore::SpellingCorrectionRecordUndoCommand::SpellingCorrectionRecordUndoCommand):
              (WebCore::SpellingCorrectionRecordUndoCommand::doApply):
              (WebCore::SpellingCorrectionRecordUndoCommand::doUnapply):
              (WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand):
              (WebCore::SpellingCorrectionCommand::doApply):
      
              * editing/mac/SpellingCorrectionCommand.h: Added.
              (WebCore::SpellingCorrectionCommand::create):
      
              * loader/EmptyClients.h: Updated for the new function declared in EditorClient.
              (WebCore::EmptyEditorClient::recordAutocorrectionResponse):
      
              * manual-tests/autocorrection/undo-autocorrection.html: Added.
      
              * page/ContextMenuController.cpp:
              (WebCore::ContextMenuController::contextMenuItemSelected): Adopted new signature of ReplaceSelectionCommand::create().
      
              * page/DragController.cpp:
              (WebCore::DragController::concludeEditDrag): Ditto.
      
              * page/EditorClient.h: Added EditorClient::recordAutocorrectionResponse().
      2011-02-15  Jia Pu  <jpu@apple.com>
      
              Reviewed by Darin Adler.
      
              Autocorrection should respect undo.
              https://bugs.webkit.org/show_bug.cgi?id=52221
              <rdar://problem/8663399>
      
              Please see WebCore/ChangeLog for detailed description.
      
              * WebProcess/WebCoreSupport/WebEditorClient.h: Updated for the new function declared in EditorClient.
      
              * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
              (WebKit::WebEditorClient::recordAutocorrectionResponse): Ditto.
      
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::replaceSelectionWithText): Adopted new signature of ReplaceSelectionCommand::create().
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      060d7a1a