2011-05-16 MORITA Hajime <morrita@google.com>
authormorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 May 2011 01:11:13 +0000 (01:11 +0000)
committermorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 May 2011 01:11:13 +0000 (01:11 +0000)
commit4b9ee41307785e627dadf974ad1466837c840f13
tree2f16ea8923eed4196f64af54968cb0b8e87729bf
parenta29869e6bf28dcfb3fa09894a3d1ca1274f6f7eb
2011-05-16  MORITA Hajime  <morrita@google.com>

        Reviewed by Tony Chang.

        [Refactoring] Member variables of DocumentMarker should be encapsulated.
        https://bugs.webkit.org/show_bug.cgi?id=56814

        - Moved DocumentMarker's member variables to private and added getters for them.
        - Added DocumentMarker setters and constructors, which contain assertions against m_type values
          because description and activeMatch are used with specific type of MarkerType.
        - Moved chromium's WebKit::WebFrameImpl::addMarker() to DocumentMarkerController because
          it accesses DocumentMarker internals.
        - Moved a version of DMC::addMarker() to private and add alternatives that hide
          internals of DocumentMarker. (The internal will be renewed by upcoming change.)

        * dom/DocumentMarker.h:
        (WebCore::DocumentMarker::type):
        (WebCore::DocumentMarker::startOffset):
        (WebCore::DocumentMarker::endOffset):
        (WebCore::DocumentMarker::description):
        (WebCore::DocumentMarker::hasDescription):
        (WebCore::DocumentMarker::activeMatch):
        (WebCore::DocumentMarker::clearDescription):
        (WebCore::DocumentMarker::setStartOffset):
        (WebCore::DocumentMarker::setEndOffset):
        (WebCore::DocumentMarker::operator==):
        (WebCore::DocumentMarker::DocumentMarker):
        (WebCore::DocumentMarker::shiftOffsets):
        (WebCore::DocumentMarker::setActiveMatch):
        * dom/DocumentMarkerController.cpp:
        (WebCore::DocumentMarkerController::addMarker):
        (WebCore::DocumentMarkerController::addTextMatchMarker):
        (WebCore::DocumentMarkerController::copyMarkers):
        (WebCore::DocumentMarkerController::removeMarkers):
        (WebCore::DocumentMarkerController::markerContainingPoint):
        (WebCore::DocumentMarkerController::markersInRange):
        (WebCore::DocumentMarkerController::renderedRectsForMarkers):
        (WebCore::DocumentMarkerController::removeMarkersFromList):
        (WebCore::DocumentMarkerController::repaintMarkers):
        (WebCore::DocumentMarkerController::shiftMarkers):
        (WebCore::DocumentMarkerController::setMarkersActive):
        (WebCore::DocumentMarkerController::hasMarkers):
        (WebCore::DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):
        (WebCore::DocumentMarkerController::showMarkers):
        * dom/DocumentMarkerController.h:
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
        * editing/Editor.cpp:
        (WebCore::Editor::selectionStartHasMarkerFor):
        * editing/SpellingCorrectionController.cpp:
        (WebCore::SpellingCorrectionController::respondToChangedSelection):
        * editing/SpellingCorrectionController.h:
        (WebCore::SpellingCorrectionController::shouldStartTimerFor):
        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::spellingToolTip):
        (WebCore::HitTestResult::replacedString):
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
        (WebCore::InlineTextBox::paintTextMatchMarker):
        (WebCore::InlineTextBox::computeRectForReplacementMarker):
        (WebCore::InlineTextBox::paintDocumentMarkers):
        * rendering/svg/SVGInlineFlowBox.cpp:
        (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
2011-05-16  MORITA Hajime  <morrita@google.com>

        Reviewed by Tony Chang.

        [Refactoring] Member variables of DocumentMarker should be encapsulated.
        https://bugs.webkit.org/show_bug.cgi?id=56814

        Moved addMarker() implementation to
        WebCore::DocumentMarkerController::addTextMatchMarker().

        * src/WebFrameImpl.cpp:
        (WebKit::WebFrameImpl::addMarker):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/DocumentMarker.h
Source/WebCore/dom/DocumentMarkerController.cpp
Source/WebCore/dom/DocumentMarkerController.h
Source/WebCore/editing/CompositeEditCommand.cpp
Source/WebCore/editing/DeleteSelectionCommand.cpp
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/SpellingCorrectionController.cpp
Source/WebCore/editing/SpellingCorrectionController.h
Source/WebCore/rendering/HitTestResult.cpp
Source/WebCore/rendering/InlineTextBox.cpp
Source/WebCore/rendering/svg/SVGInlineFlowBox.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebFrameImpl.cpp