Skip to content
Permalink
Browse files
2010-08-22 Daniel Bates <dbates@rim.com>
        Reviewed by Eric Seidel.

        Encapsulate document marker management into DocumentMarkerController
        https://bugs.webkit.org/show_bug.cgi?id=44383

        Modify call sites in the Chromium port to use DocumentMarkerController.

        No functionality was changed, so no new tests.

        * src/WebFrameImpl.cpp:
        (WebKit::WebFrameImpl::stopFinding):
        (WebKit::WebFrameImpl::addMarker):
        (WebKit::WebFrameImpl::setMarkerActive):
2010-08-22  Daniel Bates  <dbates@rim.com>

        Reviewed by Eric Seidel.

        Encapsulate document marker management into DocumentMarkerController
        https://bugs.webkit.org/show_bug.cgi?id=44383

        Modify call sites in the Apple Windows port to use DocumentMarkerController.

        No functionality was changed, so no new tests.

        * WebFrame.cpp:
        (WebFrame::unmarkAllMisspellings):
        (WebFrame::unmarkAllBadGrammar):
        * WebView.cpp:
        (WebView::rectsForTextMatches):
2010-08-22  Daniel Bates  <dbates@rim.com>

        Reviewed by Eric Seidel.

        Encapsulate document marker management into DocumentMarkerController
        https://bugs.webkit.org/show_bug.cgi?id=44383

        Modify call sites in the Apple Mac port to use DocumentMarkerController.

        No functionality was changed, so no new tests.

        * WebView/WebFrame.mm:
        (-[WebFrame _unmarkAllBadGrammar]):
        (-[WebFrame _unmarkAllMisspellings]):
        * WebView/WebHTMLView.mm:
        (-[WebHTMLView unmarkAllTextMatches]):
        (-[WebHTMLView rectsForTextMatches]):
2010-08-22  Daniel Bates  <dbates@rim.com>

        Reviewed by Eric Seidel.

        Encapsulate document marker management into DocumentMarkerController
        https://bugs.webkit.org/show_bug.cgi?id=44383

        Modify call sites in the EFL port to use DocumentMarkerController.

        No functionality was changed, so no new tests.

        * ewk/ewk_frame.cpp:
        (ewk_frame_text_matches_unmark_all):
2010-08-22  Daniel Bates  <dbates@rim.com>

        Reviewed by Eric Seidel.

        Encapsulate document marker management into DocumentMarkerController
        https://bugs.webkit.org/show_bug.cgi?id=44383

        Moves the document marker management code in Document.cpp into its own
        class called DocumentMarkerController.

        No functionality was changed, so no new tests.

        * Android.mk: Added DocumentMarkerController.cpp
        * CMakeLists.txt: Ditto.
        * GNUmakefile.am: Added DocumentMarkerController.cpp and DocumentMarkerController.h.
        * WebCore.exp.in: Substituted symbols __ZN7WebCore24DocumentMarkerController13removeMarkersENS_14DocumentMarker10MarkerTypeE
        and __ZN7WebCore24DocumentMarkerController23renderedRectsForMarkersENS_14DocumentMarker10MarkerTypeE for
        __ZN7WebCore8Document13removeMarkersENS_14DocumentMarker10MarkerTypeE and
        __ZN7WebCore8Document23renderedRectsForMarkersENS_14DocumentMarker10MarkerTypeE, respectively.
        * WebCore.gypi: Added DocumentMarkerController.cpp and DocumentMarkerController.h.
        * WebCore.pro: Ditto.
        * WebCore.vcproj/WebCore.vcproj: Ditto.
        * WebCore.xcodeproj/project.pbxproj: Ditto.
        * dom/Document.cpp:
        (WebCore::Document::removedLastRef): Modified to call DocumentMarkerController::detach().
        (WebCore::Document::~Document): Removed "deleteAllValues(m_markers)" as DocumentMarkerController
        is stored in OwnPtr; so it will be destroyed automatically on Document destruction.
        (WebCore::Document::textInserted): Modified to use marker controller.
        (WebCore::Document::textRemoved): Ditto.
        * dom/Document.h:
        (WebCore::Document::markers): Added.
        * dom/DocumentMarkerController.cpp: Added.
        (WebCore::placeholderRectForMarker):
        (WebCore::DocumentMarkerController::detach):
        (WebCore::DocumentMarkerController::addMarker):
        (WebCore::DocumentMarkerController::removeMarkers):
        (WebCore::DocumentMarkerController::copyMarkers):
        (WebCore::DocumentMarkerController::markerContainingPoint):
        (WebCore::DocumentMarkerController::markersForNode):
        (WebCore::DocumentMarkerController::renderedRectsForMarkers):
        (WebCore::DocumentMarkerController::repaintMarkers):
        (WebCore::DocumentMarkerController::setRenderedRectForMarker):
        (WebCore::DocumentMarkerController::invalidateRenderedRectsForMarkersInRect):
        (WebCore::DocumentMarkerController::shiftMarkers):
        (WebCore::DocumentMarkerController::setMarkersActive):
        * dom/DocumentMarkerController.h: Added.
        (WebCore::DocumentMarkerController::~DocumentMarkerController):
        * editing/Editor.cpp:
        (WebCore::Editor::ignoreSpelling): Modified to use marker controller.
        (WebCore::findFirstMisspellingInRange): Ditto.
        (WebCore::findFirstGrammarDetailInRange): Ditto.
        (WebCore::Editor::advanceToNextMisspelling): Ditto.
        (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Ditto.
        (WebCore::Editor::changeBackToReplacedString): Ditto.
        * editing/SplitTextNodeCommand.cpp:
        (WebCore::SplitTextNodeCommand::doApply): Ditto.
        (WebCore::SplitTextNodeCommand::doUnapply): Ditto.
        * page/Frame.cpp:
        (WebCore::Frame::markAllMatchesForText): Ditto.
        (WebCore::Frame::setMarkedTextMatchesAreHighlighted): Ditto.
        (WebCore::Frame::respondToChangedSelection): Ditto.
        * page/FrameView.cpp:
        (WebCore::FrameView::getTickmarks): Ditto.
        (WebCore::FrameView::paintContents): Ditto.
        * page/Page.cpp:
        (WebCore::Page::unmarkAllTextMatches): Ditto.
        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::spellingToolTip): Ditto.
        (WebCore::HitTestResult::replacedString): Ditto.
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paintSpellingOrGrammarMarker): Ditto.
        (WebCore::InlineTextBox::paintTextMatchMarker): Ditto.
        (WebCore::InlineTextBox::computeRectForReplacementMarker): Ditto.
        (WebCore::InlineTextBox::paintDocumentMarkers): Ditto.
        * rendering/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::computeTextMatchMarkerRect): Ditto.


Canonical link: https://commits.webkit.org/56566@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@65787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
dydz committed Aug 22, 2010
1 parent d4425b2 commit c6eccd6287f84f4f99f17eed9aad53bd52824e88
Showing 31 changed files with 824 additions and 562 deletions.
@@ -123,6 +123,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
dom/DeviceMotionEvent.cpp \
dom/Document.cpp \
dom/DocumentFragment.cpp \
dom/DocumentMarkerController.cpp \
dom/DocumentParser.cpp \
dom/DocumentType.cpp \
dom/DynamicNodeList.cpp \
@@ -810,6 +810,7 @@ SET(WebCore_SOURCES
dom/DeviceOrientationController.cpp
dom/DeviceOrientationEvent.cpp
dom/Document.cpp
dom/DocumentMarkerController.cpp
dom/DocumentFragment.cpp
dom/DocumentParser.cpp
dom/DocumentType.cpp
@@ -1,3 +1,80 @@
2010-08-22 Daniel Bates <dbates@rim.com>

Reviewed by Eric Seidel.

Encapsulate document marker management into DocumentMarkerController
https://bugs.webkit.org/show_bug.cgi?id=44383

Moves the document marker management code in Document.cpp into its own
class called DocumentMarkerController.

No functionality was changed, so no new tests.

* Android.mk: Added DocumentMarkerController.cpp
* CMakeLists.txt: Ditto.
* GNUmakefile.am: Added DocumentMarkerController.cpp and DocumentMarkerController.h.
* WebCore.exp.in: Substituted symbols __ZN7WebCore24DocumentMarkerController13removeMarkersENS_14DocumentMarker10MarkerTypeE
and __ZN7WebCore24DocumentMarkerController23renderedRectsForMarkersENS_14DocumentMarker10MarkerTypeE for
__ZN7WebCore8Document13removeMarkersENS_14DocumentMarker10MarkerTypeE and
__ZN7WebCore8Document23renderedRectsForMarkersENS_14DocumentMarker10MarkerTypeE, respectively.
* WebCore.gypi: Added DocumentMarkerController.cpp and DocumentMarkerController.h.
* WebCore.pro: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* dom/Document.cpp:
(WebCore::Document::removedLastRef): Modified to call DocumentMarkerController::detach().
(WebCore::Document::~Document): Removed "deleteAllValues(m_markers)" as DocumentMarkerController
is stored in OwnPtr; so it will be destroyed automatically on Document destruction.
(WebCore::Document::textInserted): Modified to use marker controller.
(WebCore::Document::textRemoved): Ditto.
* dom/Document.h:
(WebCore::Document::markers): Added.
* dom/DocumentMarkerController.cpp: Added.
(WebCore::placeholderRectForMarker):
(WebCore::DocumentMarkerController::detach):
(WebCore::DocumentMarkerController::addMarker):
(WebCore::DocumentMarkerController::removeMarkers):
(WebCore::DocumentMarkerController::copyMarkers):
(WebCore::DocumentMarkerController::markerContainingPoint):
(WebCore::DocumentMarkerController::markersForNode):
(WebCore::DocumentMarkerController::renderedRectsForMarkers):
(WebCore::DocumentMarkerController::repaintMarkers):
(WebCore::DocumentMarkerController::setRenderedRectForMarker):
(WebCore::DocumentMarkerController::invalidateRenderedRectsForMarkersInRect):
(WebCore::DocumentMarkerController::shiftMarkers):
(WebCore::DocumentMarkerController::setMarkersActive):
* dom/DocumentMarkerController.h: Added.
(WebCore::DocumentMarkerController::~DocumentMarkerController):
* editing/Editor.cpp:
(WebCore::Editor::ignoreSpelling): Modified to use marker controller.
(WebCore::findFirstMisspellingInRange): Ditto.
(WebCore::findFirstGrammarDetailInRange): Ditto.
(WebCore::Editor::advanceToNextMisspelling): Ditto.
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Ditto.
(WebCore::Editor::changeBackToReplacedString): Ditto.
* editing/SplitTextNodeCommand.cpp:
(WebCore::SplitTextNodeCommand::doApply): Ditto.
(WebCore::SplitTextNodeCommand::doUnapply): Ditto.
* page/Frame.cpp:
(WebCore::Frame::markAllMatchesForText): Ditto.
(WebCore::Frame::setMarkedTextMatchesAreHighlighted): Ditto.
(WebCore::Frame::respondToChangedSelection): Ditto.
* page/FrameView.cpp:
(WebCore::FrameView::getTickmarks): Ditto.
(WebCore::FrameView::paintContents): Ditto.
* page/Page.cpp:
(WebCore::Page::unmarkAllTextMatches): Ditto.
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::spellingToolTip): Ditto.
(WebCore::HitTestResult::replacedString): Ditto.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintSpellingOrGrammarMarker): Ditto.
(WebCore::InlineTextBox::paintTextMatchMarker): Ditto.
(WebCore::InlineTextBox::computeRectForReplacementMarker): Ditto.
(WebCore::InlineTextBox::paintDocumentMarkers): Ditto.
* rendering/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::computeTextMatchMarkerRect): Ditto.

2010-08-22 Jian Li <jianli@chromium.org>

Reviewed by Darin Fisher.
@@ -1042,11 +1042,13 @@ webcore_sources += \
WebCore/dom/DeviceOrientationEvent.cpp \
WebCore/dom/DeviceOrientationEvent.h \
WebCore/dom/Document.cpp \
WebCore/dom/DocumentParser.cpp \
WebCore/dom/Document.h \
WebCore/dom/DocumentFragment.cpp \
WebCore/dom/DocumentFragment.h \
WebCore/dom/DocumentMarker.h \
WebCore/dom/DocumentMarkerController.cpp \
WebCore/dom/DocumentMarkerController.h \
WebCore/dom/DocumentParser.cpp \
WebCore/dom/DocumentType.cpp \
WebCore/dom/DocumentType.h \
WebCore/dom/DynamicNodeList.cpp \
@@ -465,6 +465,8 @@ __ZN7WebCore24contextMenuItemTagItalicEv
__ZN7WebCore24contextMenuItemTagStylesEv
__ZN7WebCore24createFragmentFromMarkupEPNS_8DocumentERKN3WTF6StringES5_NS_27FragmentScriptingPermissionE
__ZN7WebCore24decodeURLEscapeSequencesERKN3WTF6StringE
__ZN7WebCore24DocumentMarkerController13removeMarkersENS_14DocumentMarker10MarkerTypeE
__ZN7WebCore24DocumentMarkerController23renderedRectsForMarkersENS_14DocumentMarker10MarkerTypeE
__ZN7WebCore24notifyHistoryItemChangedE
__ZN7WebCore24rangeCompliantEquivalentERKNS_8PositionE
__ZN7WebCore25HistoryPropertyListWriter11releaseDataEv
@@ -660,15 +662,13 @@ __ZN7WebCore7IntSizeC1ERK7_NSSize
__ZN7WebCore7cookiesEPKNS_8DocumentERKNS_4KURLE
__ZN7WebCore7nsColorERKNS_5ColorE
__ZN7WebCore8Document11createRangeEv
__ZN7WebCore8Document13removeMarkersENS_14DocumentMarker10MarkerTypeE
__ZN7WebCore8Document13svgExtensionsEv
__ZN7WebCore8Document14setFocusedNodeEN3WTF10PassRefPtrINS_4NodeEEE
__ZN7WebCore8Document16isPageBoxVisibleEi
__ZN7WebCore8Document17getFocusableNodesERN3WTF6VectorINS1_6RefPtrINS_4NodeEEELm0EEE
__ZN7WebCore8Document18createWrapperCacheEPNS_15DOMWrapperWorldE
__ZN7WebCore8Document19accessSVGExtensionsEv
__ZN7WebCore8Document22createDocumentFragmentEv
__ZN7WebCore8Document23renderedRectsForMarkersENS_14DocumentMarker10MarkerTypeE
__ZN7WebCore8Document24addMediaCanStartListenerEPNS_21MediaCanStartListenerE
__ZN7WebCore8Document24setShouldCreateRenderersEb
__ZN7WebCore8Document26pageSizeAndMarginsInPixelsEiRNS_7IntSizeERiS3_S3_S3_
@@ -1151,6 +1151,8 @@
'dom/DocumentFragment.cpp',
'dom/DocumentFragment.h',
'dom/DocumentMarker.h',
'dom/DocumentMarkerController.cpp',
'dom/DocumentMarkerController.h',
'dom/DocumentParser.cpp',
'dom/DocumentParser.h',
'dom/DocumentType.cpp',
@@ -495,6 +495,7 @@ SOURCES += \
dom/DeviceOrientationEvent.cpp \
dom/Document.cpp \
dom/DocumentFragment.cpp \
dom/DocumentMarkerController.cpp \
dom/DocumentParser.cpp \
dom/DocumentType.cpp \
dom/DOMImplementation.cpp \
@@ -1266,15 +1267,17 @@ HEADERS += \
dom/CustomEvent.h \
dom/default/PlatformMessagePortChannel.h \
dom/DeviceMotionClient.h \
dom/DeviceMotionData.h \
dom/DeviceMotionController.h \
dom/DeviceMotionData.h \
dom/DeviceMotionEvent.h \
dom/DeviceOrientation.h \
dom/DeviceOrientationClient.h \
dom/DeviceOrientationController.h \
dom/DeviceOrientationEvent.h \
dom/DocumentFragment.h \
dom/Document.h \
dom/DocumentFragment.h \
dom/DocumentMarker.h \
dom/DocumentMarkerController.h \
dom/DocumentType.h \
dom/DOMImplementation.h \
dom/DOMStringList.h \
@@ -33572,6 +33572,14 @@
RelativePath="..\dom\DocumentMarker.h"
>
</File>
<File
RelativePath="..\dom\DocumentMarkerController.cpp"
>
</File>
<File
RelativePath="..\dom\DocumentMarkerController.h"
>
</File>
<File
RelativePath="..\dom\DocumentParser.cpp"
>
@@ -5103,6 +5103,8 @@
C6D74AD509AA282E000B0A52 /* ModifySelectionListLevel.h in Headers */ = {isa = PBXBuildFile; fileRef = C6D74AD309AA282E000B0A52 /* ModifySelectionListLevel.h */; };
C6D74AE409AA290A000B0A52 /* ModifySelectionListLevel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6D74AE309AA290A000B0A52 /* ModifySelectionListLevel.cpp */; };
CE02F0C411E83ADD00C6684A /* ScriptControllerBase.h in Headers */ = {isa = PBXBuildFile; fileRef = CE02F0C311E83ADD00C6684A /* ScriptControllerBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
CE057FA51220731100A476D5 /* DocumentMarkerController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE057FA31220731100A476D5 /* DocumentMarkerController.cpp */; };
CE057FA61220731100A476D5 /* DocumentMarkerController.h in Headers */ = {isa = PBXBuildFile; fileRef = CE057FA41220731100A476D5 /* DocumentMarkerController.h */; settings = {ATTRIBUTES = (Private, ); }; };
CE172E011136E8CE0062A533 /* ZoomMode.h in Headers */ = {isa = PBXBuildFile; fileRef = CE172E001136E8CE0062A533 /* ZoomMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
CE4C00E410F6F7BA00CA38F5 /* HTMLNoScriptElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE4C00E310F6F7BA00CA38F5 /* HTMLNoScriptElement.cpp */; };
CE4C00E610F6F7C100CA38F5 /* HTMLNoScriptElement.h in Headers */ = {isa = PBXBuildFile; fileRef = CE4C00E510F6F7C100CA38F5 /* HTMLNoScriptElement.h */; };
@@ -10919,6 +10921,8 @@
C6D74AD309AA282E000B0A52 /* ModifySelectionListLevel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModifySelectionListLevel.h; sourceTree = "<group>"; };
C6D74AE309AA290A000B0A52 /* ModifySelectionListLevel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ModifySelectionListLevel.cpp; sourceTree = "<group>"; };
CE02F0C311E83ADD00C6684A /* ScriptControllerBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptControllerBase.h; sourceTree = "<group>"; };
CE057FA31220731100A476D5 /* DocumentMarkerController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentMarkerController.cpp; sourceTree = "<group>"; };
CE057FA41220731100A476D5 /* DocumentMarkerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentMarkerController.h; sourceTree = "<group>"; };
CE172E001136E8CE0062A533 /* ZoomMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZoomMode.h; sourceTree = "<group>"; };
CE4C00E310F6F7BA00CA38F5 /* HTMLNoScriptElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLNoScriptElement.cpp; sourceTree = "<group>"; };
CE4C00E510F6F7C100CA38F5 /* HTMLNoScriptElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLNoScriptElement.h; sourceTree = "<group>"; };
@@ -17373,6 +17377,8 @@
A8185F3509765765005826D9 /* DocumentFragment.h */,
1A494ED50A123F1A00FDAFC1 /* DocumentFragment.idl */,
ED2BA83B09A24B91006C0AC4 /* DocumentMarker.h */,
CE057FA31220731100A476D5 /* DocumentMarkerController.cpp */,
CE057FA41220731100A476D5 /* DocumentMarkerController.h */,
A8C2280D11D4A59700D5A7D3 /* DocumentParser.cpp */,
BCCFBAE70B5152ED0001F1D7 /* DocumentParser.h */,
A8185F3209765765005826D9 /* DocumentType.cpp */,
@@ -20340,6 +20346,7 @@
2EF1BFF7121CB0BD00C27627 /* AsyncFileStream.h in Headers */,
2EF1BFF9121CB0CE00C27627 /* FileStreamClient.h in Headers */,
89C0DD7B121F0C69009E17CA /* FileSystemCallbacks.h in Headers */,
CE057FA61220731100A476D5 /* DocumentMarkerController.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -22792,6 +22799,7 @@
2EF1BFEA121C9F4200C27627 /* FileStream.cpp in Sources */,
46A26905121B6B4300C41F3A /* FileWriter.cpp in Sources */,
89C0DD7A121F0C69009E17CA /* FileSystemCallbacks.cpp in Sources */,
CE057FA51220731100A476D5 /* DocumentMarkerController.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

0 comments on commit c6eccd6

Please sign in to comment.