Remove PassRefPtr use from "inspector", "platform/sql", and "platform/text"
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Jan 2017 22:08:28 +0000 (22:08 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Jan 2017 22:08:28 +0000 (22:08 +0000)
commit46dfd4b5637479f06988645ac9898e9b025828a8
tree0fb65320fe056f3a7005f06a6bd90e628537b4d1
parent06acc3276a9a5d35b22f5adfa1203e3409b7cd41
Remove PassRefPtr use from "inspector", "platform/sql", and "platform/text"
https://bugs.webkit.org/show_bug.cgi?id=166797

Reviewed by Alex Christensen.

Source/WebCore:

* Modules/webdatabase/Database.cpp:
(WebCore::Database::performOpenAndVerify): Pass a reference instead of a pointer.

* dom/Document.cpp:
(WebCore::canonicalizedTitle): Map backslashes to currency symbols inside the
existing loop through the characters instead of calling a function confusingly
named "displayBuffer" to do it. More straightforward, possibly more efficient,
one less function.
(WebCore::Document::displayStringModifiedByEncoding): Call replace to map
backslashes to currency symbols instead of calling a special displayString
function. There was no real benefit to using that function; the String::replace
function has all the same optimizations, and this was also the only call site.

* editing/SpellChecker.cpp:
(WebCore::SpellChecker::invokeRequest): Pass a reference instead of a pointer.

* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::overlayPage): Call createEmptyEditorClient instead
of using the class EmptyEditorClient directly.

* loader/EmptyClients.cpp: Moved most of the empty clients here from the header.
Also made lots more things private.
(WebCore::createEmptyEditorClient): Added.
(WebCore::emptyDiagnosticLoggingClient): Added.
* loader/EmptyClients.h: Updated for above changes. Made more things private.

* page/DatabaseProvider.h: Removed unneeded include.
* page/MainFrame.cpp: Ditto.

* page/Page.cpp:
(WebCore::Page::diagnosticLoggingClient): Call emptyDiagnosticLoggingClient
instead of using the class EmptyDiagnosticLoggingClient directly.

* platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::setAuthorizer): Take a reference instead of a
PassRefPtr.
* platform/sql/SQLiteDatabase.h: Updated for above.

* platform/text/BidiContext.cpp:
(WebCore::BidiContext::BidiContext): Moved this function here from the header.
(WebCore::copyContextAndRebaselineLevel): Return a Ref instead of a PassRefPtr,
and take a reference rather than a raw pointer.
(WebCore::BidiContext::copyStackRemovingUnicodeEmbeddingContexts): Return a
Ref instead of a PassRefPtr.
* platform/text/BidiContext.h: Updated for the above changes.

* platform/text/BidiResolver.h: Simplify initialization, use more references,
auto, modern for loops, refer to derived class as that rather than the non-C++
term subclass.

* platform/text/TextCheckerClient.h: Changd argument from PassRefPtr to a
reference.

* platform/text/TextEncoding.h:
(WebCore::TextEncoding::displayString): Deleted.
(WebCore::TextEncoding::displayBuffer): Deleted.

* rendering/RootInlineBox.cpp: Style tweaks and use a modern for loop.

* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged): Call createEmptyEditorClient instead
of using the class EmptyEditorClient directly.

Source/WebKit/mac:

* WebCoreSupport/WebEditorClient.h: Updated to take a reference.
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::requestCheckingOfString): Take a reference
instead of a PassRefPtr.

Source/WebKit/win:

* WebCoreSupport/WebEditorClient.h: Update argument to take a reference
instead of a PassRefPtr.

Source/WebKit2:

* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::requestCheckingOfString): Take a reference
instead of a PassRefPtr.
* WebProcess/WebCoreSupport/WebEditorClient.h: Updated for above change.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/webdatabase/Database.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/editing/SpellChecker.cpp
Source/WebCore/inspector/InspectorOverlay.cpp
Source/WebCore/loader/EmptyClients.cpp
Source/WebCore/loader/EmptyClients.h
Source/WebCore/page/DatabaseProvider.h
Source/WebCore/page/MainFrame.cpp
Source/WebCore/page/Page.cpp
Source/WebCore/platform/sql/SQLiteDatabase.cpp
Source/WebCore/platform/sql/SQLiteDatabase.h
Source/WebCore/platform/text/BidiContext.cpp
Source/WebCore/platform/text/BidiContext.h
Source/WebCore/platform/text/BidiResolver.h
Source/WebCore/platform/text/TextCheckerClient.h
Source/WebCore/platform/text/TextEncoding.h
Source/WebCore/rendering/RootInlineBox.cpp
Source/WebCore/svg/graphics/SVGImage.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebEditorClient.h
Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebEditorClient.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h