Skip to content
  • psolanki@apple.com's avatar
    <https://webkit.org/b/120029> Document::markers() should return a reference · 469f39e9
    psolanki@apple.com authored
    Reviewed by Andreas Kling.
    
    Document::m_markers is never NULL so return a reference from Document::markers(). Also mark
    m_markers as const and initialize it in member initialization.
    
    Source/WebCore:
    
    * dom/Document.cpp:
    (WebCore::Document::Document):
    * dom/Document.h:
    (WebCore::Document::markers):
    * editing/AlternativeTextController.cpp:
    (WebCore::AlternativeTextController::isSpellingMarkerAllowed):
    (WebCore::AlternativeTextController::applyAlternativeTextToRange):
    (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
    (WebCore::AlternativeTextController::handleAlternativeTextUIResult):
    (WebCore::AlternativeTextController::respondToChangedSelection):
    (WebCore::AlternativeTextController::respondToAppliedEditing):
    (WebCore::AlternativeTextController::respondToUnappliedEditing):
    (WebCore::AlternativeTextController::markReversed):
    (WebCore::AlternativeTextController::markCorrection):
    (WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
    (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
    (WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
    (WebCore::AlternativeTextController::applyDictationAlternative):
    * editing/CompositeEditCommand.cpp:
    (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
    * editing/DeleteSelectionCommand.cpp:
    (WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
    * editing/DictationCommand.cpp:
    (WebCore::DictationMarkerSupplier::addMarkersToTextNode):
    * editing/Editor.cpp:
    (WebCore::Editor::ignoreSpelling):
    (WebCore::Editor::learnSpelling):
    (WebCore::Editor::advanceToNextMisspelling):
    (WebCore::Editor::clearMisspellingsAndBadGrammar):
    (WebCore::Editor::markAndReplaceFor):
    (WebCore::Editor::changeBackToReplacedString):
    (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
    (WebCore::Editor::countMatchesForText):
    (WebCore::Editor::setMarkedTextMatchesAreHighlighted):
    (WebCore::Editor::respondToChangedSelection):
    (WebCore::Editor::selectionStartHasMarkerFor):
    * editing/SpellChecker.cpp:
    (WebCore::SpellChecker::didCheckSucceed):
    * editing/SplitTextNodeCommand.cpp:
    (WebCore::SplitTextNodeCommand::doApply):
    (WebCore::SplitTextNodeCommand::doUnapply):
    * editing/TextCheckingHelper.cpp:
    (WebCore::TextCheckingHelper::findFirstMisspelling):
    (WebCore::TextCheckingHelper::findFirstGrammarDetail):
    * page/FrameView.cpp:
    (WebCore::FrameView::getTickmarks):
    (WebCore::FrameView::paintContents):
    * page/Page.cpp:
    (WebCore::Page::unmarkAllTextMatches):
    * rendering/HitTestResult.cpp:
    (WebCore::HitTestResult::spellingToolTip):
    (WebCore::HitTestResult::replacedString):
    (WebCore::HitTestResult::dictationAlternatives):
    * rendering/InlineTextBox.cpp:
    (WebCore::InlineTextBox::paintDocumentMarkers):
    * rendering/svg/SVGInlineFlowBox.cpp:
    (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
    * testing/Internals.cpp:
    (WebCore::Internals::markerCountForNode):
    (WebCore::Internals::markerAt):
    (WebCore::Internals::addTextMatchMarker):
    
    Source/WebKit/blackberry:
    
    * WebKitSupport/InPageSearchManager.cpp:
    (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
    (BlackBerry::WebKit::InPageSearchManager::setActiveMatchAndMarker):
    (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
    * WebKitSupport/InputHandler.cpp:
    (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint):
    (BlackBerry::WebKit::InputHandler::addAttributedTextMarker):
    (BlackBerry::WebKit::InputHandler::removeAttributedTextMarker):
    
    Source/WebKit/efl:
    
    * ewk/ewk_frame.cpp:
    (ewk_frame_text_matches_unmark_all):
    (ewk_frame_text_matches_nth_pos_get):
    
    Source/WebKit/mac:
    
    * WebView/WebFrame.mm:
    (-[WebFrame _unmarkAllBadGrammar]):
    (-[WebFrame _unmarkAllMisspellings]):
    * WebView/WebHTMLView.mm:
    (-[WebHTMLView unmarkAllTextMatches]):
    (-[WebHTMLView rectsForTextMatches]):
    
    Source/WebKit/win:
    
    * WebFrame.cpp:
    (WebFrame::unmarkAllMisspellings):
    (WebFrame::unmarkAllBadGrammar):
    * WebView.cpp:
    (WebView::rectsForTextMatches):
    
    Source/WebKit2:
    
    * WebProcess/WebPage/FindController.cpp:
    (WebKit::FindController::rectsForTextMatches):
    * WebProcess/WebPage/WebPage.cpp:
    (WebKit::WebPage::unmarkAllMisspellings):
    (WebKit::WebPage::unmarkAllBadGrammar):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    469f39e9