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

Unified Diff: third_party/WebKit/Source/web/TextFinder.cpp

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: third_party/WebKit/Source/web/TextFinder.cpp
diff --git a/third_party/WebKit/Source/web/TextFinder.cpp b/third_party/WebKit/Source/web/TextFinder.cpp
index 27d8ab2ff72fb62eb478a1b8f20a9bb976c8402a..b0797b3766ab31a5749cf0cb898c18c9c93132f9 100644
--- a/third_party/WebKit/Source/web/TextFinder.cpp
+++ b/third_party/WebKit/Source/web/TextFinder.cpp
@@ -58,7 +58,7 @@
namespace blink {
-TextFinder::FindMatch::FindMatch(PassRefPtrWillBeRawPtr<Range> range, int ordinal)
+TextFinder::FindMatch::FindMatch(RawPtr<Range> range, int ordinal)
: m_range(range)
, m_ordinal(ordinal)
{
@@ -69,11 +69,11 @@ DEFINE_TRACE(TextFinder::FindMatch)
visitor->trace(m_range);
}
-class TextFinder::DeferredScopeStringMatches : public NoBaseWillBeGarbageCollectedFinalized<TextFinder::DeferredScopeStringMatches> {
+class TextFinder::DeferredScopeStringMatches : public GarbageCollectedFinalized<TextFinder::DeferredScopeStringMatches> {
public:
- static PassOwnPtrWillBeRawPtr<DeferredScopeStringMatches> create(TextFinder* textFinder, int identifier, const WebString& searchText, const WebFindOptions& options, bool reset)
+ static RawPtr<DeferredScopeStringMatches> create(TextFinder* textFinder, int identifier, const WebString& searchText, const WebFindOptions& options, bool reset)
{
- return adoptPtrWillBeNoop(new DeferredScopeStringMatches(textFinder, identifier, searchText, options, reset));
+ return (new DeferredScopeStringMatches(textFinder, identifier, searchText, options, reset));
}
DEFINE_INLINE_TRACE()
@@ -105,7 +105,7 @@ private:
}
Timer<DeferredScopeStringMatches> m_timer;
- RawPtrWillBeMember<TextFinder> m_textFinder;
+ Member<TextFinder> m_textFinder;
const int m_identifier;
const WebString m_searchText;
const WebFindOptions m_options;
@@ -308,7 +308,7 @@ void TextFinder::scopeStringMatchesAlgorithm(int identifier, const WebString& se
// Not found.
break;
}
- RefPtrWillBeRawPtr<Range> resultRange = Range::create(result.document(), toPositionInDOMTree(result.startPosition()), toPositionInDOMTree(result.endPosition()));
+ RawPtr<Range> resultRange = Range::create(result.document(), toPositionInDOMTree(result.startPosition()), toPositionInDOMTree(result.endPosition()));
if (resultRange->collapsed()) {
// resultRange will be collapsed if the matched text spans over multiple TreeScopes.
// FIXME: Show such matches to users.
@@ -512,7 +512,7 @@ void TextFinder::updateFindMatchRects()
// Remove any invalid matches from the cache.
if (deadMatches) {
- WillBeHeapVector<FindMatch> filteredMatches;
+ HeapVector<FindMatch> filteredMatches;
filteredMatches.reserveCapacity(m_findMatchesCache.size() - deadMatches);
for (const FindMatch& match : m_findMatchesCache) {
@@ -605,7 +605,7 @@ int TextFinder::selectFindMatch(unsigned index, WebRect* selectionRect)
{
ASSERT_WITH_SECURITY_IMPLICATION(index < m_findMatchesCache.size());
- RefPtrWillBeRawPtr<Range> range = m_findMatchesCache[index].m_range;
+ RawPtr<Range> range = m_findMatchesCache[index].m_range;
if (!range->boundaryPointsValid() || !range->startContainer()->inDocument())
return -1;
@@ -652,9 +652,9 @@ int TextFinder::selectFindMatch(unsigned index, WebRect* selectionRect)
return ordinalOfFirstMatch() + m_activeMatchIndexInCurrentFrame + 1;
}
-PassOwnPtrWillBeRawPtr<TextFinder> TextFinder::create(WebLocalFrameImpl& ownerFrame)
+RawPtr<TextFinder> TextFinder::create(WebLocalFrameImpl& ownerFrame)
{
- return adoptPtrWillBeNoop(new TextFinder(ownerFrame));
+ return (new TextFinder(ownerFrame));
}
TextFinder::TextFinder(WebLocalFrameImpl& ownerFrame)

Powered by Google App Engine
This is Rietveld 408576698