Skip to content
Permalink
Browse files
2011-05-17 Andrew Wilson <atwilson@chromium.org>
        Unreviewed, rolling out r86647.
        http://trac.webkit.org/changeset/86647
        https://bugs.webkit.org/show_bug.cgi?id=56814

        Broke tests downstream in Chromium

        * dom/DocumentMarker.h:
        (WebCore::DocumentMarker::operator==):
        (WebCore::DocumentMarker::operator!=):
        * dom/DocumentMarkerController.cpp:
        (WebCore::DocumentMarkerController::addMarker):
        (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-17  Andrew Wilson  <atwilson@chromium.org>

        Unreviewed, rolling out r86647.
        http://trac.webkit.org/changeset/86647
        https://bugs.webkit.org/show_bug.cgi?id=56814

        Broke tests downstream in Chromium

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

Canonical link: https://commits.webkit.org/76350@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Drew Wilson committed May 17, 2011
1 parent 5a88ded commit fa24d51231499806485b08c721e769df867e562f
@@ -1,3 +1,50 @@
2011-05-17 Andrew Wilson <atwilson@chromium.org>

Unreviewed, rolling out r86647.
http://trac.webkit.org/changeset/86647
https://bugs.webkit.org/show_bug.cgi?id=56814

Broke tests downstream in Chromium

* dom/DocumentMarker.h:
(WebCore::DocumentMarker::operator==):
(WebCore::DocumentMarker::operator!=):
* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::addMarker):
(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-17 Andrew Wilson <atwilson@chromium.org>

Unreviewed, rolling out r86656.
@@ -84,80 +84,24 @@ struct DocumentMarker {
{
}
};


DocumentMarker();
DocumentMarker(MarkerType, unsigned startOffset, unsigned endOffset);
DocumentMarker(MarkerType, unsigned startOffset, unsigned endOffset, const String& description);
DocumentMarker(unsigned startOffset, unsigned endOffset, bool activeMatch);

MarkerType type() const { return m_type; }
unsigned startOffset() const { return m_startOffset; }
unsigned endOffset() const { return m_endOffset; }
const String& description() const { return m_description; }
bool hasDescription() const { return !m_description.isEmpty(); }
bool activeMatch() const { return m_activeMatch; }

void setActiveMatch(bool);
void clearDescription() { m_description = String(); }

// Offset modifications are done by DocumentMarkerController.
// Other classes should not call following setters.
void setStartOffset(unsigned offset) { m_startOffset = offset; }
void setEndOffset(unsigned offset) { m_endOffset = offset; }
void shiftOffsets(int delta);

MarkerType type;
unsigned startOffset;
unsigned endOffset;
String description;
bool activeMatch;

bool operator==(const DocumentMarker& o) const
{
return type() == o.type() && startOffset() == o.startOffset() && endOffset() == o.endOffset();
return type == o.type && startOffset == o.startOffset && endOffset == o.endOffset;
}

bool operator!=(const DocumentMarker& o) const
{
return !(*this == o);
}

private:
MarkerType m_type;
unsigned m_startOffset;
unsigned m_endOffset;
String m_description;
bool m_activeMatch;
};

inline DocumentMarker::DocumentMarker()
: m_type(Spelling), m_startOffset(0), m_endOffset(0), m_activeMatch(false)
{
}

inline DocumentMarker::DocumentMarker(MarkerType type, unsigned startOffset, unsigned endOffset)
: m_type(type), m_startOffset(startOffset), m_endOffset(endOffset), m_activeMatch(false)
{
}

inline DocumentMarker::DocumentMarker(MarkerType type, unsigned startOffset, unsigned endOffset, const String& description)
: m_type(type), m_startOffset(startOffset), m_endOffset(endOffset), m_description(description), m_activeMatch(false)
{
ASSERT(type == DocumentMarker::Grammar || DocumentMarker::Autocorrected);
}

inline DocumentMarker::DocumentMarker(unsigned startOffset, unsigned endOffset, bool activeMatch)
: m_type(DocumentMarker::TextMatch), m_startOffset(startOffset), m_endOffset(endOffset), m_activeMatch(activeMatch)
{
}

inline void DocumentMarker::shiftOffsets(int delta)
{
m_startOffset += delta;
m_endOffset += delta;
}

inline void DocumentMarker::setActiveMatch(bool active)
{
ASSERT(m_type == DocumentMarker::TextMatch);
m_activeMatch = active;
}

} // namespace WebCore

#endif // DocumentMarker_h

0 comments on commit fa24d51

Please sign in to comment.