Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1353)

Unified Diff: Source/web/WebFrameImpl.cpp

Issue 181693003: Have Document::markers() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/SpellCheckerClientImpl.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebFrameImpl.cpp
diff --git a/Source/web/WebFrameImpl.cpp b/Source/web/WebFrameImpl.cpp
index 20c1c7e2a15e81ce751fb88564b963895f8959c8..9b3c6c9aa9c94eb87937b972cf8328b36208e204 100644
--- a/Source/web/WebFrameImpl.cpp
+++ b/Source/web/WebFrameImpl.cpp
@@ -1278,7 +1278,7 @@ void WebFrameImpl::replaceMisspelledRange(const WebString& text)
RefPtr<Range> caretRange = frame()->selection().toNormalizedRange();
if (!caretRange)
return;
- Vector<DocumentMarker*> markers = frame()->document()->markers()->markersInRange(caretRange.get(), DocumentMarker::MisspellingMarkers());
+ Vector<DocumentMarker*> markers = frame()->document()->markers().markersInRange(caretRange.get(), DocumentMarker::MisspellingMarkers());
if (markers.size() < 1 || markers[0]->startOffset() >= markers[0]->endOffset())
return;
RefPtr<Range> markerRange = Range::create(caretRange->ownerDocument(), caretRange->startContainer(), markers[0]->startOffset(), caretRange->endContainer(), markers[0]->endOffset());
@@ -1290,7 +1290,7 @@ void WebFrameImpl::replaceMisspelledRange(const WebString& text)
void WebFrameImpl::removeSpellingMarkers()
{
- frame()->document()->markers()->removeMarkers(DocumentMarker::MisspellingMarkers());
+ frame()->document()->markers().removeMarkers(DocumentMarker::MisspellingMarkers());
}
bool WebFrameImpl::hasSelection() const
@@ -1585,7 +1585,7 @@ void WebFrameImpl::stopFinding(bool clearSelection)
cancelPendingScopingEffort();
// Remove all markers for matches found and turn off the highlighting.
- frame()->document()->markers()->removeMarkers(DocumentMarker::TextMatch);
+ frame()->document()->markers().removeMarkers(DocumentMarker::TextMatch);
frame()->editor().setMarkedTextMatchesAreHighlighted(false);
clearFindMatchesCache();
@@ -2391,14 +2391,14 @@ void WebFrameImpl::invalidateArea(AreaToInvalidate area)
void WebFrameImpl::addMarker(Range* range, bool activeMatch)
{
- frame()->document()->markers()->addTextMatchMarker(range, activeMatch);
+ frame()->document()->markers().addTextMatchMarker(range, activeMatch);
}
void WebFrameImpl::setMarkerActive(Range* range, bool active)
{
if (!range || range->collapsed(IGNORE_EXCEPTION))
return;
- frame()->document()->markers()->setMarkersActive(range, active);
+ frame()->document()->markers().setMarkersActive(range, active);
}
int WebFrameImpl::ordinalOfFirstMatchForFrame(WebFrameImpl* frame) const
« no previous file with comments | « Source/web/SpellCheckerClientImpl.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698