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. 11 May, 2011 1 commit
    • jpu@apple.com's avatar
      2011-05-11 Jia Pu <jpu@apple.com> · fd2014cc
      jpu@apple.com authored
              Reviewed by Darin Adler.
      
              Autocorrection persists after deleting and retyping the same word at same location.
              https://bugs.webkit.org/show_bug.cgi?id=60555
              <rdar://problem/9373915>
      
              See WebCore/ChangeLog for detail.
      
              * platform/mac-leopard/Skipped:
              * platform/mac-snowleopard/Skipped:
              * platform/mac/editing/spelling/delete-autocorrected-word-2-expected.png: Added.
              * platform/mac/editing/spelling/delete-autocorrected-word-2-expected.txt: Added.
              * platform/mac/editing/spelling/delete-autocorrected-word-2.html: Added.
      2011-05-11  Jia Pu  <jpu@apple.com>
      
              Reviewed by Darin Adler.
      
              Autocorrection persists after deleting and retyping the same word at same location.
              https://bugs.webkit.org/show_bug.cgi?id=60555
              <rdar://problem/9373915>
      
              This patch intends to alleviate the issue of repetitively applying the same autocorrection
              when user delete and retype the same word at the same location. This scenario is especially
              common when autocorrection modifies the first letter of the word.
      
              This patch consists following major changes:
              1. Added a new marker type, DeletedAutocorrection. This marker is added to the whitespace that
                 precedes a deleted autocorrection. If the user later types the same original word at after
                 this whitespace, the autocorrection will not be applied again.
              2. In DeleteSelectionCommand, added code to notify SpellingCorrectionController about the
                 autocorrection that has just been deleted.
              3. In Editor and SpellingCorrectionController, added code to apply the marker and to suppress
                 autocorrection when necessary.
              4. The change in CompositeEditCommand::replaceTextInNode is necessary for preserving markers.
                 Otherwise, we will loose the DeletedAutocorrection on the whitespace, when inserting text
                 after the whitespace.
      
              Test: platform/mac/editing/spelling/delete-autocorrected-word-2.html
      
              * dom/DocumentMarker.h: Added new marker type DeletedAutocorrection.
              (WebCore::DocumentMarker::AllMarkers::AllMarkers):
              * dom/DocumentMarkerController.cpp:
              (WebCore::DocumentMarkerController::markersInRange): Support querying multiple marker types.
              * dom/DocumentMarkerController.h:
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::replaceTextInNodeAndPreserveMarkers):
              (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring):
              (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
              * editing/CompositeEditCommand.h:
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
              (WebCore::DeleteSelectionCommand::fixupWhitespace):
              (WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection): Extracting
                 the original string if we are deleting an autocorrection.
              (WebCore::DeleteSelectionCommand::doApply): Notify editor about the deleted autocorrection and its position.
              * editing/DeleteSelectionCommand.h:
              * editing/Editor.cpp:
              (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Moved all logic of determining
                 when to suppress an autocorrection into SpellingCorrectionController.
              (WebCore::Editor::deletedAutocorrectionAtPosition):
              * editing/Editor.h:
              * editing/InsertParagraphSeparatorCommand.cpp:
              (WebCore::InsertParagraphSeparatorCommand::doApply):
              * editing/SpellingCorrectionController.cpp:
              (WebCore::SpellingCorrectionController::respondToAppliedEditing):
              (WebCore::SpellingCorrectionController::deletedAutocorrectionAtPosition):
              (WebCore::SpellingCorrectionController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
              (WebCore::SpellingCorrectionController::processMarkersOnTextToBeReplacedByResult):
              * editing/SpellingCorrectionController.h:
              (WebCore::SpellingCorrectionController::UNLESS_ENABLED):
              * editing/visible_units.cpp:
              (WebCore::isStartOfWord):
              * editing/visible_units.h:
              * manual-tests/autocorrection/spell-checking-after-reversion.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fd2014cc
  3. 27 Apr, 2011 1 commit
  4. 21 Apr, 2011 1 commit
  5. 20 Apr, 2011 1 commit
    • commit-queue@webkit.org's avatar
      2011-04-20 Jia Pu <jpu@apple.com> · 8575c56e
      commit-queue@webkit.org authored
              Reviewed by Adele Peterson.
      
              [Mac] Like autocorrection, other types of substitution need to respect undo.
              https://bugs.webkit.org/show_bug.cgi?id=59009
              <rdar://problem/8601537>
      
              Similar to autocorrection, we use SpellingCorrectionCommand to carry out other types of text substitution, so that
              if user undoes the substitution, it will not be applied again. For CreateLinkCommand,  we add marker when it's undone
              so that we won't automatically add link again.
      
              * editing/CreateLinkCommand.h:
              (WebCore::CreateLinkCommand::isCreateLinkCommand):
              * editing/EditCommand.cpp:
              (WebCore::EditCommand::isCreateLinkCommand):
              * editing/EditCommand.h:
              * editing/Editor.cpp:
              (WebCore::Editor::unappliedEditing):
              (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
              * editing/SpellingCorrectionController.cpp:
              (WebCore::SpellingCorrectionController::respondToAppliedEditing):
              (WebCore::SpellingCorrectionController::respondToUnappliedEditing):
              * editing/SpellingCorrectionController.h:
              (WebCore::SpellingCorrectionController::UNLESS_ENABLED):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@84433 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8575c56e
  6. 08 Apr, 2011 2 commits
    • morrita@google.com's avatar
      2011-04-08 MORITA Hajime <morrita@google.com> · 7a16007b
      morrita@google.com authored
              Unreviewed windows build fix.
      
              * editing/SpellingCorrectionController.h:
              (WebCore::SpellingCorrectionController::UNLESS_ENABLED):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83352 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7a16007b
    • 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