<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[210492] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/210492">210492</a></dd>
<dt>Author</dt> <dd>darin@apple.com</dd>
<dt>Date</dt> <dd>2017-01-07 14:08:28 -0800 (Sat, 07 Jan 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>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.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseDatabasecpp">trunk/Source/WebCore/Modules/webdatabase/Database.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingSpellCheckercpp">trunk/Source/WebCore/editing/SpellChecker.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorOverlaycpp">trunk/Source/WebCore/inspector/InspectorOverlay.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderEmptyClientscpp">trunk/Source/WebCore/loader/EmptyClients.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderEmptyClientsh">trunk/Source/WebCore/loader/EmptyClients.h</a></li>
<li><a href="#trunkSourceWebCorepageDatabaseProviderh">trunk/Source/WebCore/page/DatabaseProvider.h</a></li>
<li><a href="#trunkSourceWebCorepageMainFramecpp">trunk/Source/WebCore/page/MainFrame.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePagecpp">trunk/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformsqlSQLiteDatabasecpp">trunk/Source/WebCore/platform/sql/SQLiteDatabase.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformsqlSQLiteDatabaseh">trunk/Source/WebCore/platform/sql/SQLiteDatabase.h</a></li>
<li><a href="#trunkSourceWebCoreplatformtextBidiContextcpp">trunk/Source/WebCore/platform/text/BidiContext.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformtextBidiContexth">trunk/Source/WebCore/platform/text/BidiContext.h</a></li>
<li><a href="#trunkSourceWebCoreplatformtextBidiResolverh">trunk/Source/WebCore/platform/text/BidiResolver.h</a></li>
<li><a href="#trunkSourceWebCoreplatformtextTextCheckerClienth">trunk/Source/WebCore/platform/text/TextCheckerClient.h</a></li>
<li><a href="#trunkSourceWebCoreplatformtextTextEncodingh">trunk/Source/WebCore/platform/text/TextEncoding.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRootInlineBoxcpp">trunk/Source/WebCore/rendering/RootInlineBox.cpp</a></li>
<li><a href="#trunkSourceWebCoresvggraphicsSVGImagecpp">trunk/Source/WebCore/svg/graphics/SVGImage.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebEditorClienth">trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebEditorClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportWebEditorClienth">trunk/Source/WebKit/win/WebCoreSupport/WebEditorClient.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebEditorClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebEditorClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebCore/ChangeLog        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -1,3 +1,73 @@
</span><ins>+2017-01-06 Darin Adler <darin@apple.com>
+
+ Remove PassRefPtr use from "inspector", "platform/sql", and "platform/text"
+ https://bugs.webkit.org/show_bug.cgi?id=166797
+
+ Reviewed by Alex Christensen.
+
+ * 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.
+
</ins><span class="cx"> 2017-01-07 Andy Estes <aestes@apple.com>
</span><span class="cx">
</span><span class="cx"> [QuickLook] Update quicklook test expectations
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/Database.cpp (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/Database.cpp        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebCore/Modules/webdatabase/Database.cpp        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -422,7 +422,7 @@
</span><span class="cx"> return Exception { INVALID_STATE_ERR, "unable to open database, version mismatch, '" + m_expectedVersion + "' does not match the currentVersion of '" + currentVersion + "'" };
</span><span class="cx"> }
</span><span class="cx">
</span><del>- m_sqliteDatabase.setAuthorizer(m_databaseAuthorizer.ptr());
</del><ins>+ m_sqliteDatabase.setAuthorizer(m_databaseAuthorizer.get());
</ins><span class="cx">
</span><span class="cx"> DatabaseTracker::singleton().addOpenDatabase(*this);
</span><span class="cx"> m_opened = true;
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebCore/dom/Document.cpp        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> * (C) 1999 Antti Koivisto (koivisto@kde.org)
</span><span class="cx"> * (C) 2001 Dirk Mueller (mueller@kde.org)
</span><span class="cx"> * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
</span><del>- * Copyright (C) 2004-2016 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2004-2017 Apple Inc. All rights reserved.
</ins><span class="cx"> * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
</span><span class="cx"> * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
</span><span class="cx"> * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
</span><span class="lines">@@ -1452,7 +1452,7 @@
</span><span class="cx">
</span><span class="cx"> template<typename CharacterType> static inline String canonicalizedTitle(Document& document, const String& title)
</span><span class="cx"> {
</span><del>- // FIXME: Compiling a separate copy of this for each character type is likely unnecessary.
</del><ins>+ // FIXME: Compiling a separate copy of this for LChar and UChar is likely unnecessary.
</ins><span class="cx"> // FIXME: Missing an optimized case for when title is fine as-is. This unnecessarily allocates
</span><span class="cx"> // and keeps around a new copy, and it's even the less optimal type of StringImpl with a separate buffer.
</span><span class="cx"> // Could probably just use StringBuilder instead.
</span><span class="lines">@@ -1463,7 +1463,12 @@
</span><span class="cx"> StringBuffer<CharacterType> buffer { length };
</span><span class="cx"> unsigned bufferLength = 0;
</span><span class="cx">
</span><del>- // Collapse runs of HTML spaces into single space characters; strip leading and trailing spaces.
</del><ins>+ auto* decoder = document.decoder();
+ auto backslashAsCurrencySymbol = decoder ? decoder->encoding().backslashAsCurrencySymbol() : '\\';
+
+ // Collapse runs of HTML spaces into single space characters.
+ // Strip leading and trailing spaces.
+ // Replace backslashes with currency symbols.
</ins><span class="cx"> bool previousCharacterWasHTMLSpace = false;
</span><span class="cx"> for (unsigned i = 0; i < length; ++i) {
</span><span class="cx"> auto character = characters[i];
</span><span class="lines">@@ -1470,6 +1475,8 @@
</span><span class="cx"> if (isHTMLSpace(character))
</span><span class="cx"> previousCharacterWasHTMLSpace = true;
</span><span class="cx"> else {
</span><ins>+ if (character == '\\')
+ character = backslashAsCurrencySymbol;
</ins><span class="cx"> if (previousCharacterWasHTMLSpace && bufferLength)
</span><span class="cx"> buffer[bufferLength++] = ' ';
</span><span class="cx"> buffer[bufferLength++] = character;
</span><span class="lines">@@ -1478,12 +1485,8 @@
</span><span class="cx"> }
</span><span class="cx"> if (!bufferLength)
</span><span class="cx"> return { };
</span><ins>+
</ins><span class="cx"> buffer.shrink(bufferLength);
</span><del>-
- // Replace backslashes with currency symbols if the encoding requires it.
- if (auto* decoder = document.decoder())
- decoder->encoding().displayBuffer(buffer.characters(), bufferLength);
-
</del><span class="cx"> return String::adopt(WTFMove(buffer));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -5460,8 +5463,6 @@
</span><span class="cx">
</span><span class="cx"> void Document::windowScreenDidChange(PlatformDisplayID displayID)
</span><span class="cx"> {
</span><del>- UNUSED_PARAM(displayID);
-
</del><span class="cx"> #if ENABLE(REQUEST_ANIMATION_FRAME)
</span><span class="cx"> if (m_scriptedAnimationController)
</span><span class="cx"> m_scriptedAnimationController->windowScreenDidChange(displayID);
</span><span class="lines">@@ -5473,11 +5474,11 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String Document::displayStringModifiedByEncoding(const String& str) const
</del><ins>+String Document::displayStringModifiedByEncoding(const String& string) const
</ins><span class="cx"> {
</span><del>- if (m_decoder)
- return m_decoder->encoding().displayString(str.impl()).get();
- return str;
</del><ins>+ if (!m_decoder)
+ return string;
+ return String { string }.replace('\\', m_decoder->encoding().backslashAsCurrencySymbol());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Document::enqueuePageshowEvent(PageshowEventPersistence persisted)
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingSpellCheckercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/SpellChecker.cpp (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/SpellChecker.cpp        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebCore/editing/SpellChecker.cpp        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -182,7 +182,7 @@
</span><span class="cx"> if (!client())
</span><span class="cx"> return;
</span><span class="cx"> m_processingRequest = request;
</span><del>- client()->requestCheckingOfString(m_processingRequest, m_frame.selection().selection());
</del><ins>+ client()->requestCheckingOfString(*m_processingRequest, m_frame.selection().selection());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void SpellChecker::enqueueRequest(PassRefPtr<SpellCheckRequest> request)
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorOverlaycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include "InspectorOverlay.h"
</span><span class="cx">
</span><span class="cx"> #include "DocumentLoader.h"
</span><ins>+#include "EditorClient.h"
</ins><span class="cx"> #include "Element.h"
</span><span class="cx"> #include "EmptyClients.h"
</span><span class="cx"> #include "FrameView.h"
</span><span class="lines">@@ -54,6 +55,7 @@
</span><span class="cx"> #include "ScriptController.h"
</span><span class="cx"> #include "ScriptSourceCode.h"
</span><span class="cx"> #include "Settings.h"
</span><ins>+#include "SocketProvider.h"
</ins><span class="cx"> #include "StyledElement.h"
</span><span class="cx"> #include <inspector/InspectorProtocolObjects.h>
</span><span class="cx"> #include <inspector/InspectorValues.h>
</span><span class="lines">@@ -857,7 +859,7 @@
</span><span class="cx"> if (m_overlayPage)
</span><span class="cx"> return m_overlayPage.get();
</span><span class="cx">
</span><del>- PageConfiguration pageConfiguration(makeUniqueRef<EmptyEditorClient>(), SocketProvider::create());
</del><ins>+ PageConfiguration pageConfiguration(createEmptyEditorClient(), SocketProvider::create());
</ins><span class="cx"> fillWithEmptyClients(pageConfiguration);
</span><span class="cx"> m_overlayPage = std::make_unique<Page>(WTFMove(pageConfiguration));
</span><span class="cx"> m_overlayPage->setDeviceScaleFactor(m_page.deviceScaleFactor());
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderEmptyClientscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/EmptyClients.cpp (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/EmptyClients.cpp        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebCore/loader/EmptyClients.cpp        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2006 Eric Seidel <eric@webkit.org>
</span><del>- * Copyright (C) 2008, 2009, 2012 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2008-2017 Apple Inc. All rights reserved.
</ins><span class="cx"> * Copyright (C) Research In Motion Limited 2011. All rights reserved.
</span><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -31,52 +31,80 @@
</span><span class="cx"> #include "ApplicationCacheStorage.h"
</span><span class="cx"> #include "BackForwardClient.h"
</span><span class="cx"> #include "ColorChooser.h"
</span><del>-#include "DOMWrapperWorld.h"
</del><ins>+#include "ContextMenuClient.h"
</ins><span class="cx"> #include "DatabaseProvider.h"
</span><ins>+#include "DiagnosticLoggingClient.h"
+#include "DocumentFragment.h"
</ins><span class="cx"> #include "DocumentLoader.h"
</span><ins>+#include "DragClient.h"
+#include "EditorClient.h"
</ins><span class="cx"> #include "FileChooser.h"
</span><span class="cx"> #include "FormState.h"
</span><span class="cx"> #include "Frame.h"
</span><ins>+#include "FrameLoaderClient.h"
</ins><span class="cx"> #include "FrameNetworkingContext.h"
</span><span class="cx"> #include "HTMLFormElement.h"
</span><span class="cx"> #include "InProcessIDBServer.h"
</span><ins>+#include "InspectorClient.h"
</ins><span class="cx"> #include "Page.h"
</span><span class="cx"> #include "PageConfiguration.h"
</span><span class="cx"> #include "PaymentCoordinatorClient.h"
</span><span class="cx"> #include "PluginInfoProvider.h"
</span><ins>+#include "ProgressTrackerClient.h"
</ins><span class="cx"> #include "SecurityOriginData.h"
</span><span class="cx"> #include "StorageArea.h"
</span><span class="cx"> #include "StorageNamespace.h"
</span><span class="cx"> #include "StorageNamespaceProvider.h"
</span><ins>+#include "TextCheckerClient.h"
</ins><span class="cx"> #include "ThreadableWebSocketChannel.h"
</span><span class="cx"> #include "UserContentProvider.h"
</span><ins>+#include "VisitedLinkStore.h"
</ins><span class="cx"> #include <heap/HeapInlines.h>
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="cx">
</span><ins>+#if ENABLE(CONTENT_EXTENSIONS)
+#include "CompiledContentExtension.h"
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-#if ENABLE(APPLE_PAY)
-class EmptyPaymentCoordinatorClient final : public PaymentCoordinatorClient {
- bool supportsVersion(unsigned) override { return false; }
- bool canMakePayments() override { return false; }
- void canMakePaymentsWithActiveCard(const String&, const String&, std::function<void (bool)> completionHandler) override { callOnMainThread([completionHandler] { completionHandler(false); }); }
- void openPaymentSetup(const String&, const String&, std::function<void (bool)> completionHandler) override { callOnMainThread([completionHandler] { completionHandler(false); }); }
</del><ins>+class UserMessageHandlerDescriptor;
</ins><span class="cx">
</span><del>- bool showPaymentUI(const URL&, const Vector<URL>&, const PaymentRequest&) override { return false; }
- void completeMerchantValidation(const PaymentMerchantSession&) override { }
</del><ins>+class EmptyBackForwardClient final : public BackForwardClient {
+ void addItem(Ref<HistoryItem>&&) final { }
+ void goToItem(HistoryItem*) final { }
+ HistoryItem* itemAtIndex(int) final { return nullptr; }
+ int backListCount() final { return 0; }
+ int forwardListCount() final { return 0; }
+ void close() final { }
+};
</ins><span class="cx">
</span><del>- void completeShippingMethodSelection(PaymentAuthorizationStatus, std::optional<PaymentRequest::TotalAndLineItems>) override { }
- void completeShippingContactSelection(PaymentAuthorizationStatus, const Vector<PaymentRequest::ShippingMethod>&, std::optional<PaymentRequest::TotalAndLineItems>) override { }
- void completePaymentMethodSelection(std::optional<WebCore::PaymentRequest::TotalAndLineItems>) override { }
- void completePaymentSession(PaymentAuthorizationStatus) override { }
- void abortPaymentSession() override { }
- void paymentCoordinatorDestroyed() override { }
-};
</del><ins>+#if ENABLE(CONTEXT_MENUS)
+
+class EmptyContextMenuClient final : public ContextMenuClient {
+ void contextMenuDestroyed() final { }
+
+ void downloadURL(const URL&) final { }
+ void searchWithGoogle(const Frame*) final { }
+ void lookUpInDictionary(Frame*) final { }
+ bool isSpeaking() final { return false; }
+ void speak(const String&) final { }
+ void stopSpeaking() final { }
+
+#if PLATFORM(COCOA)
+ void searchWithSpotlight() final { }
</ins><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if USE(ACCESSIBILITY_CONTEXT_MENUS)
+ void showContextMenu() final { }
+#endif
+};
+
+#endif // ENABLE(CONTEXT_MENUS)
+
</ins><span class="cx"> class EmptyDatabaseProvider final : public DatabaseProvider {
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><del>- virtual IDBClient::IDBConnectionToServer& idbConnectionToServerForSession(const SessionID&)
</del><ins>+ IDBClient::IDBConnectionToServer& idbConnectionToServerForSession(const SessionID&) final
</ins><span class="cx"> {
</span><span class="cx"> static NeverDestroyed<Ref<InProcessIDBServer>> sharedConnection(InProcessIDBServer::create());
</span><span class="cx"> return sharedConnection.get()->connectionToServer();
</span><span class="lines">@@ -84,147 +112,461 @@
</span><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx">
</span><del>-class EmptyPluginInfoProvider final : public PluginInfoProvider {
- void refreshPlugins() override { };
- void getPluginInfo(Page&, Vector<PluginInfo>&) override { }
- void getWebVisiblePluginInfo(Page&, Vector<PluginInfo>&) override { }
</del><ins>+class EmptyDiagnosticLoggingClient final : public DiagnosticLoggingClient {
+ void logDiagnosticMessage(const String&, const String&, ShouldSample) final { }
+ void logDiagnosticMessageWithResult(const String&, const String&, DiagnosticLoggingResultType, ShouldSample) final { }
+ void logDiagnosticMessageWithValue(const String&, const String&, const String&, ShouldSample) final { }
</ins><span class="cx"> };
</span><span class="cx">
</span><del>-class EmptyStorageNamespaceProvider final : public StorageNamespaceProvider {
- struct EmptyStorageArea : public StorageArea {
- unsigned length() override { return 0; }
- String key(unsigned) override { return String(); }
- String item(const String&) override { return String(); }
- void setItem(Frame*, const String&, const String&, bool&) override { }
- void removeItem(Frame*, const String&) override { }
- void clear(Frame*) override { }
- bool contains(const String&) override { return false; }
- bool canAccessStorage(Frame*) override { return false; }
- StorageType storageType() const override { return LocalStorage; }
- size_t memoryBytesUsedByCache() override { return 0; }
- SecurityOriginData securityOrigin() const override { return { }; }
- };
</del><ins>+#if ENABLE(DRAG_SUPPORT)
</ins><span class="cx">
</span><del>- struct EmptyStorageNamespace final : public StorageNamespace {
- RefPtr<StorageArea> storageArea(const SecurityOriginData&) override { return adoptRef(new EmptyStorageArea); }
- RefPtr<StorageNamespace> copy(Page*) override { return adoptRef(new EmptyStorageNamespace); }
- };
</del><ins>+class EmptyDragClient final : public DragClient {
+ void willPerformDragDestinationAction(DragDestinationAction, const DragData&) final { }
+ void willPerformDragSourceAction(DragSourceAction, const IntPoint&, DataTransfer&) final { }
+ DragDestinationAction actionMaskForDrag(const DragData&) final { return DragDestinationActionNone; }
+ DragSourceAction dragSourceActionMaskForPoint(const IntPoint&) final { return DragSourceActionNone; }
+ void startDrag(DragImageRef, const IntPoint&, const IntPoint&, DataTransfer&, Frame&, bool) final { }
+ void dragControllerDestroyed() final { }
+};
</ins><span class="cx">
</span><del>- RefPtr<StorageNamespace> createSessionStorageNamespace(Page&, unsigned) override
- {
- return adoptRef(new EmptyStorageNamespace);
- }
</del><ins>+#endif // ENABLE(DRAG_SUPPORT)
</ins><span class="cx">
</span><del>- RefPtr<StorageNamespace> createLocalStorageNamespace(unsigned) override
- {
- return adoptRef(new EmptyStorageNamespace);
- }
</del><ins>+class EmptyEditorClient final : public EditorClient {
+ WTF_MAKE_FAST_ALLOCATED;
</ins><span class="cx">
</span><del>- RefPtr<StorageNamespace> createTransientLocalStorageNamespace(SecurityOrigin&, unsigned) override
- {
- return adoptRef(new EmptyStorageNamespace);
- }
-};
</del><ins>+public:
+ EmptyEditorClient() = default;
</ins><span class="cx">
</span><del>-class EmptyUserContentProvider final : public UserContentProvider {
- void forEachUserScript(const std::function<void(DOMWrapperWorld&, const UserScript&)>&) const override { }
- void forEachUserStyleSheet(const std::function<void(const UserStyleSheet&)>&) const override { }
-#if ENABLE(USER_MESSAGE_HANDLERS)
- void forEachUserMessageHandler(const std::function<void(const UserMessageHandlerDescriptor&)>&) const override { }
</del><ins>+private:
+ bool shouldDeleteRange(Range*) final { return false; }
+ bool smartInsertDeleteEnabled() final { return false; }
+ bool isSelectTrailingWhitespaceEnabled() final { return false; }
+ bool isContinuousSpellCheckingEnabled() final { return false; }
+ void toggleContinuousSpellChecking() final { }
+ bool isGrammarCheckingEnabled() final { return false; }
+ void toggleGrammarChecking() final { }
+ int spellCheckerDocumentTag() final { return -1; }
+
+ bool shouldBeginEditing(Range*) final { return false; }
+ bool shouldEndEditing(Range*) final { return false; }
+ bool shouldInsertNode(Node*, Range*, EditorInsertAction) final { return false; }
+ bool shouldInsertText(const String&, Range*, EditorInsertAction) final { return false; }
+ bool shouldChangeSelectedRange(Range*, Range*, EAffinity, bool) final { return false; }
+
+ bool shouldApplyStyle(StyleProperties*, Range*) final { return false; }
+ void didApplyStyle() final { }
+ bool shouldMoveRangeAfterDelete(Range*, Range*) final { return false; }
+
+ void didBeginEditing() final { }
+ void respondToChangedContents() final { }
+ void respondToChangedSelection(Frame*) final { }
+ void didChangeSelectionAndUpdateLayout() final { }
+ void updateEditorStateAfterLayoutIfEditabilityChanged() final { }
+ void discardedComposition(Frame*) final { }
+ void canceledComposition() final { }
+ void didEndEditing() final { }
+ void willWriteSelectionToPasteboard(Range*) final { }
+ void didWriteSelectionToPasteboard() final { }
+ void getClientPasteboardDataForRange(Range*, Vector<String>&, Vector<RefPtr<SharedBuffer>>&) final { }
+ void requestCandidatesForSelection(const VisibleSelection&) final { }
+ void handleAcceptedCandidateWithSoftSpaces(TextCheckingResult) final { }
+
+ void registerUndoStep(PassRefPtr<UndoStep>) final;
+ void registerRedoStep(PassRefPtr<UndoStep>) final;
+ void clearUndoRedoOperations() final { }
+
+ bool canCopyCut(Frame*, bool defaultValue) const final { return defaultValue; }
+ bool canPaste(Frame*, bool defaultValue) const final { return defaultValue; }
+ bool canUndo() const final { return false; }
+ bool canRedo() const final { return false; }
+
+ void undo() final { }
+ void redo() final { }
+
+ void handleKeyboardEvent(KeyboardEvent*) final { }
+ void handleInputMethodKeydown(KeyboardEvent*) final { }
+
+ void textFieldDidBeginEditing(Element*) final { }
+ void textFieldDidEndEditing(Element*) final { }
+ void textDidChangeInTextField(Element*) final { }
+ bool doTextFieldCommandFromEvent(Element*, KeyboardEvent*) final { return false; }
+ void textWillBeDeletedInTextField(Element*) final { }
+ void textDidChangeInTextArea(Element*) final { }
+ void overflowScrollPositionChanged() final { }
+
+#if PLATFORM(IOS)
+ void startDelayingAndCoalescingContentChangeNotifications() final { }
+ void stopDelayingAndCoalescingContentChangeNotifications() final { }
+ void writeDataToPasteboard(NSDictionary*) final { }
+ NSArray* supportedPasteboardTypesForCurrentSelection() final { return nullptr; }
+ NSArray* readDataFromPasteboard(NSString*, int) final { return nullptr; }
+ bool hasRichlyEditableSelection() final { return false; }
+ int getPasteboardItemsCount() final { return 0; }
+ RefPtr<DocumentFragment> documentFragmentFromDelegate(int) final { return nullptr; }
+ bool performsTwoStepPaste(DocumentFragment*) final { return false; }
+ int pasteboardChangeCount() final { return 0; }
</ins><span class="cx"> #endif
</span><del>-#if ENABLE(CONTENT_EXTENSIONS)
- ContentExtensions::ContentExtensionsBackend& userContentExtensionBackend() override { static NeverDestroyed<ContentExtensions::ContentExtensionsBackend> backend; return backend.get(); };
</del><ins>+
+#if PLATFORM(COCOA)
+ NSString *userVisibleString(NSURL *) final { return nullptr; }
+ void setInsertionPasteboard(const String&) final { };
+ NSURL *canonicalizeURL(NSURL *) final { return nullptr; }
+ NSURL *canonicalizeURLString(NSString *) final { return nullptr; }
</ins><span class="cx"> #endif
</span><del>-};
</del><span class="cx">
</span><del>-class EmptyVisitedLinkStore final : public VisitedLinkStore {
- bool isLinkVisited(Page&, LinkHash, const URL&, const AtomicString&) override { return false; }
- void addVisitedLink(Page&, LinkHash) override { }
-};
</del><ins>+#if USE(APPKIT)
+ void uppercaseWord() final { }
+ void lowercaseWord() final { }
+ void capitalizeWord() final { }
+#endif
</ins><span class="cx">
</span><del>-class EmptyBackForwardClient final : public BackForwardClient {
- void addItem(Ref<HistoryItem>&&) override { }
- void goToItem(HistoryItem*) override { }
- HistoryItem* itemAtIndex(int) override { return nullptr; }
- int backListCount() override { return 0; }
- int forwardListCount() override { return 0; }
- void close() override { }
</del><ins>+#if USE(AUTOMATIC_TEXT_REPLACEMENT)
+ void showSubstitutionsPanel(bool) final { }
+ bool substitutionsPanelIsShowing() final { return false; }
+ void toggleSmartInsertDelete() final { }
+ bool isAutomaticQuoteSubstitutionEnabled() final { return false; }
+ void toggleAutomaticQuoteSubstitution() final { }
+ bool isAutomaticLinkDetectionEnabled() final { return false; }
+ void toggleAutomaticLinkDetection() final { }
+ bool isAutomaticDashSubstitutionEnabled() final { return false; }
+ void toggleAutomaticDashSubstitution() final { }
+ bool isAutomaticTextReplacementEnabled() final { return false; }
+ void toggleAutomaticTextReplacement() final { }
+ bool isAutomaticSpellingCorrectionEnabled() final { return false; }
+ void toggleAutomaticSpellingCorrection() final { }
+#endif
+
+#if PLATFORM(GTK)
+ bool shouldShowUnicodeMenu() final { return false; }
+#endif
+
+ TextCheckerClient* textChecker() final { return &m_textCheckerClient; }
+
+ void updateSpellingUIWithGrammarString(const String&, const GrammarDetail&) final { }
+ void updateSpellingUIWithMisspelledWord(const String&) final { }
+ void showSpellingUI(bool) final { }
+ bool spellingUIIsShowing() final { return false; }
+
+ void willSetInputMethodState() final { }
+ void setInputMethodState(bool) final { }
+
+ class EmptyTextCheckerClient final : public TextCheckerClient {
+ bool shouldEraseMarkersAfterChangeSelection(TextCheckingType) const final { return true; }
+ void ignoreWordInSpellDocument(const String&) final { }
+ void learnWord(const String&) final { }
+ void checkSpellingOfString(StringView, int*, int*) final { }
+ String getAutoCorrectSuggestionForMisspelledWord(const String&) final { return { }; }
+ void checkGrammarOfString(StringView, Vector<GrammarDetail>&, int*, int*) final { }
+
+#if USE(UNIFIED_TEXT_CHECKING)
+ Vector<TextCheckingResult> checkTextOfParagraph(StringView, TextCheckingTypeMask, const VisibleSelection&) final { return Vector<TextCheckingResult>(); }
+#endif
+
+ void getGuessesForWord(const String&, const String&, const VisibleSelection&, Vector<String>&) final { }
+ void requestCheckingOfString(TextCheckingRequest&, const VisibleSelection&) final;
+ };
+
+ EmptyTextCheckerClient m_textCheckerClient;
</ins><span class="cx"> };
</span><span class="cx">
</span><del>-void fillWithEmptyClients(PageConfiguration& pageConfiguration)
-{
- static NeverDestroyed<EmptyChromeClient> dummyChromeClient;
- pageConfiguration.chromeClient = &dummyChromeClient.get();
</del><ins>+class EmptyFrameLoaderClient final : public FrameLoaderClient {
+ void frameLoaderDestroyed() final { }
</ins><span class="cx">
</span><del>-#if ENABLE(APPLE_PAY)
- static NeverDestroyed<EmptyPaymentCoordinatorClient> dummyPaymentCoordinatorClient;
- pageConfiguration.paymentCoordinatorClient = &dummyPaymentCoordinatorClient.get();
</del><ins>+ bool hasWebView() const final { return true; } // mainly for assertions
+
+ void makeRepresentation(DocumentLoader*) final { }
+#if PLATFORM(IOS)
+ bool forceLayoutOnRestoreFromPageCache() final { return false; }
</ins><span class="cx"> #endif
</span><ins>+ void forceLayoutForNonHTML() final { }
</ins><span class="cx">
</span><del>-#if ENABLE(CONTEXT_MENUS)
- static NeverDestroyed<EmptyContextMenuClient> dummyContextMenuClient;
- pageConfiguration.contextMenuClient = &dummyContextMenuClient.get();
</del><ins>+ void setCopiesOnScroll() final { }
+
+ void detachedFromParent2() final { }
+ void detachedFromParent3() final { }
+
+ void convertMainResourceLoadToDownload(DocumentLoader*, SessionID, const ResourceRequest&, const ResourceResponse&) final { }
+
+ void assignIdentifierToInitialRequest(unsigned long, DocumentLoader*, const ResourceRequest&) final { }
+ bool shouldUseCredentialStorage(DocumentLoader*, unsigned long) final { return false; }
+ void dispatchWillSendRequest(DocumentLoader*, unsigned long, ResourceRequest&, const ResourceResponse&) final { }
+ void dispatchDidReceiveAuthenticationChallenge(DocumentLoader*, unsigned long, const AuthenticationChallenge&) final { }
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+ bool canAuthenticateAgainstProtectionSpace(DocumentLoader*, unsigned long, const ProtectionSpace&) final { return false; }
</ins><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if ENABLE(DRAG_SUPPORT)
- static NeverDestroyed<EmptyDragClient> dummyDragClient;
- pageConfiguration.dragClient = &dummyDragClient.get();
</del><ins>+#if PLATFORM(IOS)
+ RetainPtr<CFDictionaryRef> connectionProperties(DocumentLoader*, unsigned long) final { return nullptr; }
</ins><span class="cx"> #endif
</span><span class="cx">
</span><del>- static NeverDestroyed<EmptyInspectorClient> dummyInspectorClient;
- pageConfiguration.inspectorClient = &dummyInspectorClient.get();
</del><ins>+ void dispatchDidReceiveResponse(DocumentLoader*, unsigned long, const ResourceResponse&) final { }
+ void dispatchDidReceiveContentLength(DocumentLoader*, unsigned long, int) final { }
+ void dispatchDidFinishLoading(DocumentLoader*, unsigned long) final { }
+#if ENABLE(DATA_DETECTION)
+ void dispatchDidFinishDataDetection(NSArray *) final { }
+#endif
+ void dispatchDidFailLoading(DocumentLoader*, unsigned long, const ResourceError&) final { }
+ bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int) final { return false; }
</ins><span class="cx">
</span><del>- static NeverDestroyed<EmptyFrameLoaderClient> dummyFrameLoaderClient;
- pageConfiguration.loaderClientForMainFrame = &dummyFrameLoaderClient.get();
</del><ins>+ void dispatchDidDispatchOnloadEvents() final { }
+ void dispatchDidReceiveServerRedirectForProvisionalLoad() final { }
+ void dispatchDidCancelClientRedirect() final { }
+ void dispatchWillPerformClientRedirect(const URL&, double, double) final { }
+ void dispatchDidChangeLocationWithinPage() final { }
+ void dispatchDidPushStateWithinPage() final { }
+ void dispatchDidReplaceStateWithinPage() final { }
+ void dispatchDidPopStateWithinPage() final { }
+ void dispatchWillClose() final { }
+ void dispatchDidReceiveIcon() final { }
+ void dispatchDidStartProvisionalLoad() final { }
+ void dispatchDidReceiveTitle(const StringWithDirection&) final { }
+ void dispatchDidCommitLoad(std::optional<HasInsecureContent>) final { }
+ void dispatchDidFailProvisionalLoad(const ResourceError&) final { }
+ void dispatchDidFailLoad(const ResourceError&) final { }
+ void dispatchDidFinishDocumentLoad() final { }
+ void dispatchDidFinishLoad() final { }
+ void dispatchDidReachLayoutMilestone(LayoutMilestones) final { }
</ins><span class="cx">
</span><del>- static NeverDestroyed<EmptyProgressTrackerClient> dummyProgressTrackerClient;
- pageConfiguration.progressTrackerClient = &dummyProgressTrackerClient.get();
</del><ins>+ Frame* dispatchCreatePage(const NavigationAction&) final { return nullptr; }
+ void dispatchShow() final { }
</ins><span class="cx">
</span><del>- pageConfiguration.backForwardClient = adoptRef(new EmptyBackForwardClient);
- pageConfiguration.diagnosticLoggingClient = std::make_unique<EmptyDiagnosticLoggingClient>();
</del><ins>+ void dispatchDecidePolicyForResponse(const ResourceResponse&, const ResourceRequest&, FramePolicyFunction) final { }
+ void dispatchDecidePolicyForNewWindowAction(const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>, const String&, FramePolicyFunction) final;
+ void dispatchDecidePolicyForNavigationAction(const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>, FramePolicyFunction) final;
+ void cancelPolicyCheck() final { }
</ins><span class="cx">
</span><del>- pageConfiguration.applicationCacheStorage = ApplicationCacheStorage::create(String(), String());
- pageConfiguration.databaseProvider = adoptRef(new EmptyDatabaseProvider);
- pageConfiguration.pluginInfoProvider = adoptRef(new EmptyPluginInfoProvider);
- pageConfiguration.storageNamespaceProvider = adoptRef(new EmptyStorageNamespaceProvider);
- pageConfiguration.userContentProvider = adoptRef(new EmptyUserContentProvider);
- pageConfiguration.visitedLinkStore = adoptRef(new EmptyVisitedLinkStore);
-}
</del><ins>+ void dispatchUnableToImplementPolicy(const ResourceError&) final { }
</ins><span class="cx">
</span><ins>+ void dispatchWillSendSubmitEvent(PassRefPtr<FormState>) final;
+ void dispatchWillSubmitForm(PassRefPtr<FormState>, FramePolicyFunction) final;
+
+ void revertToProvisionalState(DocumentLoader*) final { }
+ void setMainDocumentError(DocumentLoader*, const ResourceError&) final { }
+
+ void setMainFrameDocumentReady(bool) final { }
+
+ void startDownload(const ResourceRequest&, const String&) final { }
+
+ void willChangeTitle(DocumentLoader*) final { }
+ void didChangeTitle(DocumentLoader*) final { }
+
+ void willReplaceMultipartContent() final { }
+ void didReplaceMultipartContent() final { }
+
+ void committedLoad(DocumentLoader*, const char*, int) final { }
+ void finishedLoading(DocumentLoader*) final { }
+
+ ResourceError cancelledError(const ResourceRequest&) final { return { ResourceError::Type::Cancellation }; }
+ ResourceError blockedError(const ResourceRequest&) final { return { }; }
+ ResourceError blockedByContentBlockerError(const ResourceRequest&) final { return { }; }
+ ResourceError cannotShowURLError(const ResourceRequest&) final { return { }; }
+ ResourceError interruptedForPolicyChangeError(const ResourceRequest&) final { return { }; }
+#if ENABLE(CONTENT_FILTERING)
+ ResourceError blockedByContentFilterError(const ResourceRequest&) final { return { }; }
+#endif
+
+ ResourceError cannotShowMIMETypeError(const ResourceResponse&) final { return { }; }
+ ResourceError fileDoesNotExistError(const ResourceResponse&) final { return { }; }
+ ResourceError pluginWillHandleLoadError(const ResourceResponse&) final { return { }; }
+
+ bool shouldFallBack(const ResourceError&) final { return false; }
+
+ bool canHandleRequest(const ResourceRequest&) const final { return false; }
+ bool canShowMIMEType(const String&) const final { return false; }
+ bool canShowMIMETypeAsHTML(const String&) const final { return false; }
+ bool representationExistsForURLScheme(const String&) const final { return false; }
+ String generatedMIMETypeForURLScheme(const String&) const final { return emptyString(); }
+
+ void frameLoadCompleted() final { }
+ void restoreViewState() final { }
+ void provisionalLoadStarted() final { }
+ void didFinishLoad() final { }
+ void prepareForDataSourceReplacement() final { }
+
+ Ref<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&) final;
+ void updateCachedDocumentLoader(DocumentLoader&) final { }
+ void setTitle(const StringWithDirection&, const URL&) final { }
+
+ String userAgent(const URL&) final { return emptyString(); }
+
+ void savePlatformDataToCachedFrame(CachedFrame*) final { }
+ void transitionToCommittedFromCachedFrame(CachedFrame*) final { }
+#if PLATFORM(IOS)
+ void didRestoreFrameHierarchyForCachedFrame() final { }
+#endif
+ void transitionToCommittedForNewPage() final { }
+
+ void didSaveToPageCache() final { }
+ void didRestoreFromPageCache() final { }
+
+ void dispatchDidBecomeFrameset(bool) final { }
+
+ void updateGlobalHistory() final { }
+ void updateGlobalHistoryRedirectLinks() final { }
+ bool shouldGoToHistoryItem(HistoryItem*) const final { return false; }
+ void updateGlobalHistoryItemForPage() final { }
+ void saveViewStateToItem(HistoryItem&) final { }
+ bool canCachePage() const final { return false; }
+ void didDisplayInsecureContent() final { }
+ void didRunInsecureContent(SecurityOrigin*, const URL&) final { }
+ void didDetectXSS(const URL&, bool) final { }
+ RefPtr<Frame> createFrame(const URL&, const String&, HTMLFrameOwnerElement*, const String&, bool, int, int) final;
+ RefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const URL&, const Vector<String>&, const Vector<String>&, const String&, bool) final;
+ void recreatePlugin(Widget*) final;
+ PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const URL&, const Vector<String>&, const Vector<String>&) final;
+
+ ObjectContentType objectContentType(const URL&, const String&) final { return ObjectContentType::None; }
+ String overrideMediaType() const final { return { }; }
+
+ void redirectDataToPlugin(Widget*) final { }
+ void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld&) final { }
+
+ void registerForIconNotification(bool) final { }
+
+#if PLATFORM(COCOA)
+ RemoteAXObjectRef accessibilityRemoteObject() final { return nullptr; }
+ NSCachedURLResponse *willCacheResponse(DocumentLoader*, unsigned long, NSCachedURLResponse *response) const final { return response; }
+#endif
+
+#if PLATFORM(WIN) && USE(CFURLCONNECTION)
+ bool shouldCacheResponse(DocumentLoader*, unsigned long, const ResourceResponse&, const unsigned char*, unsigned long long) final { return true; }
+#endif
+
+ PassRefPtr<FrameNetworkingContext> createNetworkingContext() final;
+
+#if ENABLE(REQUEST_AUTOCOMPLETE)
+ void didRequestAutocomplete(PassRefPtr<FormState>) final { }
+#endif
+
+ bool isEmptyFrameLoaderClient() final { return true; }
+ void prefetchDNS(const String&) final { }
+};
+
+class EmptyInspectorClient final : public InspectorClient {
+ void inspectedPageDestroyed() final { }
+ Inspector::FrontendChannel* openLocalFrontend(InspectorController*) final { return nullptr; }
+ void bringFrontendToFront() final { }
+ void highlight() final { }
+ void hideHighlight() final { }
+};
+
+#if ENABLE(APPLE_PAY)
+
+class EmptyPaymentCoordinatorClient final : public PaymentCoordinatorClient {
+ bool supportsVersion(unsigned) final { return false; }
+ bool canMakePayments() final { return false; }
+ void canMakePaymentsWithActiveCard(const String&, const String&, std::function<void(bool)> completionHandler) final { callOnMainThread([completionHandler] { completionHandler(false); }); }
+ void openPaymentSetup(const String&, const String&, std::function<void(bool)> completionHandler) final { callOnMainThread([completionHandler] { completionHandler(false); }); }
+ bool showPaymentUI(const URL&, const Vector<URL>&, const PaymentRequest&) final { return false; }
+ void completeMerchantValidation(const PaymentMerchantSession&) final { }
+ void completeShippingMethodSelection(PaymentAuthorizationStatus, std::optional<PaymentRequest::TotalAndLineItems>) final { }
+ void completeShippingContactSelection(PaymentAuthorizationStatus, const Vector<PaymentRequest::ShippingMethod>&, std::optional<PaymentRequest::TotalAndLineItems>) final { }
+ void completePaymentMethodSelection(std::optional<WebCore::PaymentRequest::TotalAndLineItems>) final { }
+ void completePaymentSession(PaymentAuthorizationStatus) final { }
+ void abortPaymentSession() final { }
+ void paymentCoordinatorDestroyed() final { }
+};
+
+#endif
+
+class EmptyPluginInfoProvider final : public PluginInfoProvider {
+ void refreshPlugins() final { };
+ void getPluginInfo(Page&, Vector<PluginInfo>&) final { }
+ void getWebVisiblePluginInfo(Page&, Vector<PluginInfo>&) final { }
+};
+
</ins><span class="cx"> class EmptyPopupMenu : public PopupMenu {
</span><span class="cx"> public:
</span><del>- void show(const IntRect&, FrameView*, int) override { }
- void hide() override { }
- void updateFromElement() override { }
- void disconnectClient() override { }
</del><ins>+ EmptyPopupMenu() = default;
+private:
+ void show(const IntRect&, FrameView*, int) final { }
+ void hide() final { }
+ void updateFromElement() final { }
+ void disconnectClient() final { }
</ins><span class="cx"> };
</span><span class="cx">
</span><ins>+class EmptyProgressTrackerClient final : public ProgressTrackerClient {
+ void willChangeEstimatedProgress() final { }
+ void didChangeEstimatedProgress() final { }
+ void progressStarted(Frame&) final { }
+ void progressEstimateChanged(Frame&) final { }
+ void progressFinished(Frame&) final { }
+};
+
</ins><span class="cx"> class EmptySearchPopupMenu : public SearchPopupMenu {
</span><span class="cx"> public:
</span><del>- PopupMenu* popupMenu() override { return m_popup.get(); }
- void saveRecentSearches(const AtomicString&, const Vector<RecentSearch>&) override { }
- void loadRecentSearches(const AtomicString&, Vector<RecentSearch>&) override { }
- bool enabled() override { return false; }
</del><ins>+ EmptySearchPopupMenu()
+ : m_popup(adoptRef(*new EmptyPopupMenu))
+ {
+ }
</ins><span class="cx">
</span><span class="cx"> private:
</span><del>- RefPtr<EmptyPopupMenu> m_popup;
</del><ins>+ PopupMenu* popupMenu() final { return m_popup.ptr(); }
+ void saveRecentSearches(const AtomicString&, const Vector<RecentSearch>&) final { }
+ void loadRecentSearches(const AtomicString&, Vector<RecentSearch>&) final { }
+ bool enabled() final { return false; }
+
+ Ref<EmptyPopupMenu> m_popup;
</ins><span class="cx"> };
</span><span class="cx">
</span><ins>+class EmptyStorageNamespaceProvider final : public StorageNamespaceProvider {
+ struct EmptyStorageArea : public StorageArea {
+ unsigned length() final { return 0; }
+ String key(unsigned) final { return { }; }
+ String item(const String&) final { return { }; }
+ void setItem(Frame*, const String&, const String&, bool&) final { }
+ void removeItem(Frame*, const String&) final { }
+ void clear(Frame*) final { }
+ bool contains(const String&) final { return false; }
+ bool canAccessStorage(Frame*) final { return false; }
+ StorageType storageType() const final { return LocalStorage; }
+ size_t memoryBytesUsedByCache() final { return 0; }
+ SecurityOriginData securityOrigin() const final { return { }; }
+ };
+
+ struct EmptyStorageNamespace final : public StorageNamespace {
+ RefPtr<StorageArea> storageArea(const SecurityOriginData&) final { return adoptRef(*new EmptyStorageArea); }
+ RefPtr<StorageNamespace> copy(Page*) final { return adoptRef(*new EmptyStorageNamespace); }
+ };
+
+ RefPtr<StorageNamespace> createSessionStorageNamespace(Page&, unsigned) final;
+ RefPtr<StorageNamespace> createLocalStorageNamespace(unsigned) final;
+ RefPtr<StorageNamespace> createTransientLocalStorageNamespace(SecurityOrigin&, unsigned) final;
+};
+
+class EmptyUserContentProvider final : public UserContentProvider {
+ void forEachUserScript(const std::function<void(DOMWrapperWorld&, const UserScript&)>&) const final { }
+ void forEachUserStyleSheet(const std::function<void(const UserStyleSheet&)>&) const final { }
+#if ENABLE(USER_MESSAGE_HANDLERS)
+ void forEachUserMessageHandler(const std::function<void(const UserMessageHandlerDescriptor&)>&) const final { }
+#endif
+#if ENABLE(CONTENT_EXTENSIONS)
+ ContentExtensions::ContentExtensionsBackend& userContentExtensionBackend() final { static NeverDestroyed<ContentExtensions::ContentExtensionsBackend> backend; return backend.get(); };
+#endif
+};
+
+class EmptyVisitedLinkStore final : public VisitedLinkStore {
+ bool isLinkVisited(Page&, LinkHash, const URL&, const AtomicString&) final { return false; }
+ void addVisitedLink(Page&, LinkHash) final { }
+};
+
</ins><span class="cx"> RefPtr<PopupMenu> EmptyChromeClient::createPopupMenu(PopupMenuClient*) const
</span><span class="cx"> {
</span><del>- return adoptRef(new EmptyPopupMenu());
</del><ins>+ return adoptRef(*new EmptyPopupMenu);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<SearchPopupMenu> EmptyChromeClient::createSearchPopupMenu(PopupMenuClient*) const
</span><span class="cx"> {
</span><del>- return adoptRef(new EmptySearchPopupMenu());
</del><ins>+ return adoptRef(*new EmptySearchPopupMenu);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(INPUT_TYPE_COLOR)
</span><ins>+
</ins><span class="cx"> std::unique_ptr<ColorChooser> EmptyChromeClient::createColorChooser(ColorChooserClient*, const Color&)
</span><span class="cx"> {
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> void EmptyChromeClient::runOpenPanel(Frame*, PassRefPtr<FileChooser>)
</span><span class="lines">@@ -276,7 +618,7 @@
</span><span class="cx"> return PassRefPtr<FrameNetworkingContext>();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void EmptyTextCheckerClient::requestCheckingOfString(PassRefPtr<TextCheckingRequest>, const VisibleSelection&)
</del><ins>+void EmptyEditorClient::EmptyTextCheckerClient::requestCheckingOfString(TextCheckingRequest&, const VisibleSelection&)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -288,4 +630,70 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+RefPtr<StorageNamespace> EmptyStorageNamespaceProvider::createSessionStorageNamespace(Page&, unsigned)
+{
+ return adoptRef(*new EmptyStorageNamespace);
</ins><span class="cx"> }
</span><ins>+
+RefPtr<StorageNamespace> EmptyStorageNamespaceProvider::createLocalStorageNamespace(unsigned)
+{
+ return adoptRef(*new EmptyStorageNamespace);
+}
+
+RefPtr<StorageNamespace> EmptyStorageNamespaceProvider::createTransientLocalStorageNamespace(SecurityOrigin&, unsigned)
+{
+ return adoptRef(*new EmptyStorageNamespace);
+}
+
+void fillWithEmptyClients(PageConfiguration& pageConfiguration)
+{
+ static NeverDestroyed<EmptyChromeClient> dummyChromeClient;
+ pageConfiguration.chromeClient = &dummyChromeClient.get();
+
+#if ENABLE(APPLE_PAY)
+ static NeverDestroyed<EmptyPaymentCoordinatorClient> dummyPaymentCoordinatorClient;
+ pageConfiguration.paymentCoordinatorClient = &dummyPaymentCoordinatorClient.get();
+#endif
+
+#if ENABLE(CONTEXT_MENUS)
+ static NeverDestroyed<EmptyContextMenuClient> dummyContextMenuClient;
+ pageConfiguration.contextMenuClient = &dummyContextMenuClient.get();
+#endif
+
+#if ENABLE(DRAG_SUPPORT)
+ static NeverDestroyed<EmptyDragClient> dummyDragClient;
+ pageConfiguration.dragClient = &dummyDragClient.get();
+#endif
+
+ static NeverDestroyed<EmptyInspectorClient> dummyInspectorClient;
+ pageConfiguration.inspectorClient = &dummyInspectorClient.get();
+
+ static NeverDestroyed<EmptyFrameLoaderClient> dummyFrameLoaderClient;
+ pageConfiguration.loaderClientForMainFrame = &dummyFrameLoaderClient.get();
+
+ static NeverDestroyed<EmptyProgressTrackerClient> dummyProgressTrackerClient;
+ pageConfiguration.progressTrackerClient = &dummyProgressTrackerClient.get();
+
+ pageConfiguration.backForwardClient = adoptRef(*new EmptyBackForwardClient);
+ pageConfiguration.diagnosticLoggingClient = std::make_unique<EmptyDiagnosticLoggingClient>();
+
+ pageConfiguration.applicationCacheStorage = ApplicationCacheStorage::create({ }, { });
+ pageConfiguration.databaseProvider = adoptRef(*new EmptyDatabaseProvider);
+ pageConfiguration.pluginInfoProvider = adoptRef(*new EmptyPluginInfoProvider);
+ pageConfiguration.storageNamespaceProvider = adoptRef(*new EmptyStorageNamespaceProvider);
+ pageConfiguration.userContentProvider = adoptRef(*new EmptyUserContentProvider);
+ pageConfiguration.visitedLinkStore = adoptRef(*new EmptyVisitedLinkStore);
+}
+
+UniqueRef<EditorClient> createEmptyEditorClient()
+{
+ return makeUniqueRef<EmptyEditorClient>();
+}
+
+DiagnosticLoggingClient& emptyDiagnosticLoggingClient()
+{
+ static NeverDestroyed<EmptyDiagnosticLoggingClient> client;
+ return client;
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreloaderEmptyClientsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/EmptyClients.h (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/EmptyClients.h        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebCore/loader/EmptyClients.h        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -29,620 +29,180 @@
</span><span class="cx"> #pragma once
</span><span class="cx">
</span><span class="cx"> #include "ChromeClient.h"
</span><del>-#include "ContextMenuClient.h"
-#include "DeviceMotionClient.h"
-#include "DeviceOrientationClient.h"
-#include "DiagnosticLoggingClient.h"
-#include "DocumentFragment.h"
-#include "DragClient.h"
-#include "EditorClient.h"
-#include "FloatRect.h"
-#include "FocusDirection.h"
-#include "FrameLoaderClient.h"
-#include "InspectorClient.h"
-#include "ProgressTrackerClient.h"
-#include "ResourceError.h"
-#include "SessionID.h"
-#include "SocketProvider.h"
-#include "TextCheckerClient.h"
-#include "VisitedLinkStore.h"
-#include <wtf/text/StringView.h>
</del><ins>+#include <wtf/UniqueRef.h>
</ins><span class="cx">
</span><del>-#if ENABLE(USER_MESSAGE_HANDLERS)
-#include "UserMessageHandlerDescriptor.h"
-#endif
</del><ins>+// Empty client classes for use by WebCore.
+//
+// First created for SVGImage as it had no way to access the current Page (nor should it, since Images are not tied to a page).
+// See http://bugs.webkit.org/show_bug.cgi?id=5971 for the original discussion about this file.
</ins><span class="cx">
</span><del>-#if ENABLE(CONTENT_EXTENSIONS)
-#include "CompiledContentExtension.h"
-#endif
-
-/*
- This file holds empty Client stubs for use by WebCore.
- Viewless element needs to create a dummy Page->Frame->FrameView tree for use in parsing or executing JavaScript.
- This tree depends heavily on Clients (usually provided by WebKit classes).
-
- This file was first created for SVGImage as it had no way to access the current Page (nor should it,
- since Images are not tied to a page).
- See http://bugs.webkit.org/show_bug.cgi?id=5971 for the original discussion about this file.
-
- Ideally, whenever you change a Client class, you should add a stub here.
- Brittle, yes. Unfortunate, yes. Hopefully temporary.
-*/
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class Page;
</del><ins>+class DiagnosticLoggingClient;
+class EditorClient;
</ins><span class="cx"> class PageConfiguration;
</span><span class="cx">
</span><span class="cx"> class EmptyChromeClient : public ChromeClient {
</span><span class="cx"> WTF_MAKE_FAST_ALLOCATED;
</span><del>-public:
- virtual ~EmptyChromeClient() { }
</del><ins>+
</ins><span class="cx"> void chromeDestroyed() override { }
</span><span class="cx">
</span><del>- void setWindowRect(const FloatRect&) override { }
- FloatRect windowRect() override { return FloatRect(); }
</del><ins>+ void setWindowRect(const FloatRect&) final { }
+ FloatRect windowRect() final { return FloatRect(); }
</ins><span class="cx">
</span><del>- FloatRect pageRect() override { return FloatRect(); }
</del><ins>+ FloatRect pageRect() final { return FloatRect(); }
</ins><span class="cx">
</span><del>- void focus() override { }
- void unfocus() override { }
</del><ins>+ void focus() final { }
+ void unfocus() final { }
</ins><span class="cx">
</span><del>- bool canTakeFocus(FocusDirection) override { return false; }
- void takeFocus(FocusDirection) override { }
</del><ins>+ bool canTakeFocus(FocusDirection) final { return false; }
+ void takeFocus(FocusDirection) final { }
</ins><span class="cx">
</span><del>- void focusedElementChanged(Element*) override { }
- void focusedFrameChanged(Frame*) override { }
</del><ins>+ void focusedElementChanged(Element*) final { }
+ void focusedFrameChanged(Frame*) final { }
</ins><span class="cx">
</span><del>- Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&) override { return nullptr; }
- void show() override { }
</del><ins>+ Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&) final { return nullptr; }
+ void show() final { }
</ins><span class="cx">
</span><del>- bool canRunModal() override { return false; }
- void runModal() override { }
</del><ins>+ bool canRunModal() final { return false; }
+ void runModal() final { }
</ins><span class="cx">
</span><del>- void setToolbarsVisible(bool) override { }
- bool toolbarsVisible() override { return false; }
</del><ins>+ void setToolbarsVisible(bool) final { }
+ bool toolbarsVisible() final { return false; }
</ins><span class="cx">
</span><del>- void setStatusbarVisible(bool) override { }
- bool statusbarVisible() override { return false; }
</del><ins>+ void setStatusbarVisible(bool) final { }
+ bool statusbarVisible() final { return false; }
</ins><span class="cx">
</span><del>- void setScrollbarsVisible(bool) override { }
- bool scrollbarsVisible() override { return false; }
</del><ins>+ void setScrollbarsVisible(bool) final { }
+ bool scrollbarsVisible() final { return false; }
</ins><span class="cx">
</span><del>- void setMenubarVisible(bool) override { }
- bool menubarVisible() override { return false; }
</del><ins>+ void setMenubarVisible(bool) final { }
+ bool menubarVisible() final { return false; }
</ins><span class="cx">
</span><del>- void setResizable(bool) override { }
</del><ins>+ void setResizable(bool) final { }
</ins><span class="cx">
</span><del>- void addMessageToConsole(MessageSource, MessageLevel, const String&, unsigned, unsigned, const String&) override { }
</del><ins>+ void addMessageToConsole(MessageSource, MessageLevel, const String&, unsigned, unsigned, const String&) final { }
</ins><span class="cx">
</span><del>- bool canRunBeforeUnloadConfirmPanel() override { return false; }
- bool runBeforeUnloadConfirmPanel(const String&, Frame*) override { return true; }
</del><ins>+ bool canRunBeforeUnloadConfirmPanel() final { return false; }
+ bool runBeforeUnloadConfirmPanel(const String&, Frame*) final { return true; }
</ins><span class="cx">
</span><del>- void closeWindowSoon() override { }
</del><ins>+ void closeWindowSoon() final { }
</ins><span class="cx">
</span><del>- void runJavaScriptAlert(Frame*, const String&) override { }
- bool runJavaScriptConfirm(Frame*, const String&) override { return false; }
- bool runJavaScriptPrompt(Frame*, const String&, const String&, String&) override { return false; }
</del><ins>+ void runJavaScriptAlert(Frame*, const String&) final { }
+ bool runJavaScriptConfirm(Frame*, const String&) final { return false; }
+ bool runJavaScriptPrompt(Frame*, const String&, const String&, String&) final { return false; }
</ins><span class="cx">
</span><del>- bool selectItemWritingDirectionIsNatural() override { return false; }
- bool selectItemAlignmentFollowsMenuWritingDirection() override { return false; }
- bool hasOpenedPopup() const override { return false; }
- RefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const override;
- RefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const override;
</del><ins>+ bool selectItemWritingDirectionIsNatural() final { return false; }
+ bool selectItemAlignmentFollowsMenuWritingDirection() final { return false; }
+ bool hasOpenedPopup() const final { return false; }
+ RefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const final;
+ RefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const final;
</ins><span class="cx">
</span><del>- void setStatusbarText(const String&) override { }
</del><ins>+ void setStatusbarText(const String&) final { }
</ins><span class="cx">
</span><del>- KeyboardUIMode keyboardUIMode() override { return KeyboardAccessDefault; }
</del><ins>+ KeyboardUIMode keyboardUIMode() final { return KeyboardAccessDefault; }
</ins><span class="cx">
</span><del>- void invalidateRootView(const IntRect&) override { }
</del><ins>+ void invalidateRootView(const IntRect&) final { }
</ins><span class="cx"> void invalidateContentsAndRootView(const IntRect&) override { }
</span><del>- void invalidateContentsForSlowScroll(const IntRect&) override { }
- void scroll(const IntSize&, const IntRect&, const IntRect&) override { }
</del><ins>+ void invalidateContentsForSlowScroll(const IntRect&) final { }
+ void scroll(const IntSize&, const IntRect&, const IntRect&) final { }
</ins><span class="cx"> #if USE(COORDINATED_GRAPHICS)
</span><del>- void delegatedScrollRequested(const IntPoint&) override { }
</del><ins>+ void delegatedScrollRequested(const IntPoint&) final { }
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(REQUEST_ANIMATION_FRAME) && !USE(REQUEST_ANIMATION_FRAME_TIMER)
</span><del>- void scheduleAnimation() override { }
</del><ins>+ void scheduleAnimation() final { }
</ins><span class="cx"> #endif
</span><span class="cx">
</span><del>- IntPoint screenToRootView(const IntPoint& p) const override { return p; }
- IntRect rootViewToScreen(const IntRect& r) const override { return r; }
</del><ins>+ IntPoint screenToRootView(const IntPoint& p) const final { return p; }
+ IntRect rootViewToScreen(const IntRect& r) const final { return r; }
</ins><span class="cx"> #if PLATFORM(IOS)
</span><del>- IntPoint accessibilityScreenToRootView(const IntPoint& p) const override { return p; };
- IntRect rootViewToAccessibilityScreen(const IntRect& r) const override { return r; };
</del><ins>+ IntPoint accessibilityScreenToRootView(const IntPoint& p) const final { return p; };
+ IntRect rootViewToAccessibilityScreen(const IntRect& r) const final { return r; };
</ins><span class="cx"> #endif
</span><del>- PlatformPageClient platformPageClient() const override { return 0; }
- void contentsSizeChanged(Frame*, const IntSize&) const override { }
</del><ins>+ PlatformPageClient platformPageClient() const final { return 0; }
+ void contentsSizeChanged(Frame*, const IntSize&) const final { }
</ins><span class="cx">
</span><del>- void scrollbarsModeDidChange() const override { }
- void mouseDidMoveOverElement(const HitTestResult&, unsigned) override { }
</del><ins>+ void scrollbarsModeDidChange() const final { }
+ void mouseDidMoveOverElement(const HitTestResult&, unsigned) final { }
</ins><span class="cx">
</span><del>- void setToolTip(const String&, TextDirection) override { }
</del><ins>+ void setToolTip(const String&, TextDirection) final { }
</ins><span class="cx">
</span><del>- void print(Frame*) override { }
</del><ins>+ void print(Frame*) final { }
</ins><span class="cx">
</span><del>- void exceededDatabaseQuota(Frame*, const String&, DatabaseDetails) override { }
</del><ins>+ void exceededDatabaseQuota(Frame*, const String&, DatabaseDetails) final { }
</ins><span class="cx">
</span><del>- void reachedMaxAppCacheSize(int64_t) override { }
- void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t) override { }
</del><ins>+ void reachedMaxAppCacheSize(int64_t) final { }
+ void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t) final { }
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(INPUT_TYPE_COLOR)
</span><del>- std::unique_ptr<ColorChooser> createColorChooser(ColorChooserClient*, const Color&) override;
</del><ins>+ std::unique_ptr<ColorChooser> createColorChooser(ColorChooserClient*, const Color&) final;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><del>- void runOpenPanel(Frame*, PassRefPtr<FileChooser>) override;
- void loadIconForFiles(const Vector<String>&, FileIconLoader&) override { }
</del><ins>+ void runOpenPanel(Frame*, PassRefPtr<FileChooser>) final;
+ void loadIconForFiles(const Vector<String>&, FileIconLoader&) final { }
</ins><span class="cx">
</span><del>- void elementDidFocus(const Node*) override { }
- void elementDidBlur(const Node*) override { }
</del><ins>+ void elementDidFocus(const Node*) final { }
+ void elementDidBlur(const Node*) final { }
</ins><span class="cx">
</span><span class="cx"> #if !PLATFORM(IOS)
</span><del>- void setCursor(const Cursor&) override { }
- void setCursorHiddenUntilMouseMoves(bool) override { }
</del><ins>+ void setCursor(const Cursor&) final { }
+ void setCursorHiddenUntilMouseMoves(bool) final { }
</ins><span class="cx"> #endif
</span><span class="cx">
</span><del>- void scrollRectIntoView(const IntRect&) const override { }
</del><ins>+ void scrollRectIntoView(const IntRect&) const final { }
</ins><span class="cx">
</span><del>- void attachRootGraphicsLayer(Frame*, GraphicsLayer*) override { }
- void attachViewOverlayGraphicsLayer(Frame*, GraphicsLayer*) override { }
- void setNeedsOneShotDrawingSynchronization() override { }
- void scheduleCompositingLayerFlush() override { }
</del><ins>+ void attachRootGraphicsLayer(Frame*, GraphicsLayer*) final { }
+ void attachViewOverlayGraphicsLayer(Frame*, GraphicsLayer*) final { }
+ void setNeedsOneShotDrawingSynchronization() final { }
+ void scheduleCompositingLayerFlush() final { }
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(WIN)
</span><del>- void setLastSetCursorToCurrentCursor() override { }
- void AXStartFrameLoad() override { }
- void AXFinishFrameLoad() override { }
</del><ins>+ void setLastSetCursorToCurrentCursor() final { }
+ void AXStartFrameLoad() final { }
+ void AXFinishFrameLoad() final { }
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> #if ENABLE(IOS_TOUCH_EVENTS)
</span><del>- void didPreventDefaultForEvent() override { }
</del><ins>+ void didPreventDefaultForEvent() final { }
</ins><span class="cx"> #endif
</span><del>- void didReceiveMobileDocType(bool) override { }
- void setNeedsScrollNotifications(Frame*, bool) override { }
- void observedContentChange(Frame*) override { }
- void clearContentChangeObservers(Frame*) override { }
- void notifyRevealedSelectionByScrollingFrame(Frame*) override { }
- void didLayout(LayoutType) override { }
- void didStartOverflowScroll() override { }
- void didEndOverflowScroll() override { }
</del><ins>+ void didReceiveMobileDocType(bool) final { }
+ void setNeedsScrollNotifications(Frame*, bool) final { }
+ void observedContentChange(Frame*) final { }
+ void clearContentChangeObservers(Frame*) final { }
+ void notifyRevealedSelectionByScrollingFrame(Frame*) final { }
+ void didLayout(LayoutType) final { }
+ void didStartOverflowScroll() final { }
+ void didEndOverflowScroll() final { }
</ins><span class="cx">
</span><del>- void suppressFormNotifications() override { }
- void restoreFormNotifications() override { }
</del><ins>+ void suppressFormNotifications() final { }
+ void restoreFormNotifications() final { }
</ins><span class="cx">
</span><del>- void addOrUpdateScrollingLayer(Node*, PlatformLayer*, PlatformLayer*, const IntSize&, bool, bool) override { }
- void removeScrollingLayer(Node*, PlatformLayer*, PlatformLayer*) override { }
</del><ins>+ void addOrUpdateScrollingLayer(Node*, PlatformLayer*, PlatformLayer*, const IntSize&, bool, bool) final { }
+ void removeScrollingLayer(Node*, PlatformLayer*, PlatformLayer*) final { }
</ins><span class="cx">
</span><del>- void webAppOrientationsUpdated() override { };
- void showPlaybackTargetPicker(bool) override { };
</del><ins>+ void webAppOrientationsUpdated() final { };
+ void showPlaybackTargetPicker(bool) final { };
</ins><span class="cx"> #endif // PLATFORM(IOS)
</span><span class="cx">
</span><span class="cx"> #if ENABLE(ORIENTATION_EVENTS)
</span><del>- int deviceOrientation() const override { return 0; }
</del><ins>+ int deviceOrientation() const final { return 0; }
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>- bool isStopping() override { return false; }
</del><ins>+ bool isStopping() final { return false; }
</ins><span class="cx"> #endif
</span><span class="cx">
</span><del>- void wheelEventHandlersChanged(bool) override { }
</del><ins>+ void wheelEventHandlersChanged(bool) final { }
</ins><span class="cx">
</span><del>- bool isEmptyChromeClient() const override { return true; }
</del><ins>+ bool isEmptyChromeClient() const final { return true; }
</ins><span class="cx">
</span><del>- void didAssociateFormControls(const Vector<RefPtr<Element>>&) override { }
- bool shouldNotifyOnFormChanges() override { return false; }
</del><ins>+ void didAssociateFormControls(const Vector<RefPtr<Element>>&) final { }
+ bool shouldNotifyOnFormChanges() final { return false; }
</ins><span class="cx"> };
</span><span class="cx">
</span><del>-// FIXME (bug 116233): Get rid of EmptyFrameLoaderClient. It is a travesty.
-
-class EmptyFrameLoaderClient : public FrameLoaderClient {
- WTF_MAKE_NONCOPYABLE(EmptyFrameLoaderClient); WTF_MAKE_FAST_ALLOCATED;
-public:
- EmptyFrameLoaderClient() { }
- virtual ~EmptyFrameLoaderClient() { }
- void frameLoaderDestroyed() override { }
-
- bool hasWebView() const override { return true; } // mainly for assertions
-
- void makeRepresentation(DocumentLoader*) override { }
-#if PLATFORM(IOS)
- bool forceLayoutOnRestoreFromPageCache() override { return false; }
-#endif
- void forceLayoutForNonHTML() override { }
-
- void setCopiesOnScroll() override { }
-
- void detachedFromParent2() override { }
- void detachedFromParent3() override { }
-
- void convertMainResourceLoadToDownload(DocumentLoader*, SessionID, const ResourceRequest&, const ResourceResponse&) override { }
-
- void assignIdentifierToInitialRequest(unsigned long, DocumentLoader*, const ResourceRequest&) override { }
- bool shouldUseCredentialStorage(DocumentLoader*, unsigned long) override { return false; }
- void dispatchWillSendRequest(DocumentLoader*, unsigned long, ResourceRequest&, const ResourceResponse&) override { }
- void dispatchDidReceiveAuthenticationChallenge(DocumentLoader*, unsigned long, const AuthenticationChallenge&) override { }
-#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
- bool canAuthenticateAgainstProtectionSpace(DocumentLoader*, unsigned long, const ProtectionSpace&) override { return false; }
-#endif
-
-#if PLATFORM(IOS)
- RetainPtr<CFDictionaryRef> connectionProperties(DocumentLoader*, unsigned long) override { return nullptr; }
-#endif
-
- void dispatchDidReceiveResponse(DocumentLoader*, unsigned long, const ResourceResponse&) override { }
- void dispatchDidReceiveContentLength(DocumentLoader*, unsigned long, int) override { }
- void dispatchDidFinishLoading(DocumentLoader*, unsigned long) override { }
-#if ENABLE(DATA_DETECTION)
- void dispatchDidFinishDataDetection(NSArray *) override { }
-#endif
- void dispatchDidFailLoading(DocumentLoader*, unsigned long, const ResourceError&) override { }
- bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int) override { return false; }
-
- void dispatchDidDispatchOnloadEvents() override { }
- void dispatchDidReceiveServerRedirectForProvisionalLoad() override { }
- void dispatchDidCancelClientRedirect() override { }
- void dispatchWillPerformClientRedirect(const URL&, double, double) override { }
- void dispatchDidChangeLocationWithinPage() override { }
- void dispatchDidPushStateWithinPage() override { }
- void dispatchDidReplaceStateWithinPage() override { }
- void dispatchDidPopStateWithinPage() override { }
- void dispatchWillClose() override { }
- void dispatchDidReceiveIcon() override { }
- void dispatchDidStartProvisionalLoad() override { }
- void dispatchDidReceiveTitle(const StringWithDirection&) override { }
- void dispatchDidCommitLoad(std::optional<HasInsecureContent>) override { }
- void dispatchDidFailProvisionalLoad(const ResourceError&) override { }
- void dispatchDidFailLoad(const ResourceError&) override { }
- void dispatchDidFinishDocumentLoad() override { }
- void dispatchDidFinishLoad() override { }
- void dispatchDidReachLayoutMilestone(LayoutMilestones) override { }
-
- Frame* dispatchCreatePage(const NavigationAction&) override { return nullptr; }
- void dispatchShow() override { }
-
- void dispatchDecidePolicyForResponse(const ResourceResponse&, const ResourceRequest&, FramePolicyFunction) override { }
- void dispatchDecidePolicyForNewWindowAction(const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>, const String&, FramePolicyFunction) override;
- void dispatchDecidePolicyForNavigationAction(const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>, FramePolicyFunction) override;
- void cancelPolicyCheck() override { }
-
- void dispatchUnableToImplementPolicy(const ResourceError&) override { }
-
- void dispatchWillSendSubmitEvent(PassRefPtr<FormState>) override;
- void dispatchWillSubmitForm(PassRefPtr<FormState>, FramePolicyFunction) override;
-
- void revertToProvisionalState(DocumentLoader*) override { }
- void setMainDocumentError(DocumentLoader*, const ResourceError&) override { }
-
- void setMainFrameDocumentReady(bool) override { }
-
- void startDownload(const ResourceRequest&, const String& suggestedName = String()) override { UNUSED_PARAM(suggestedName); }
-
- void willChangeTitle(DocumentLoader*) override { }
- void didChangeTitle(DocumentLoader*) override { }
-
- void willReplaceMultipartContent() override { }
- void didReplaceMultipartContent() override { }
-
- void committedLoad(DocumentLoader*, const char*, int) override { }
- void finishedLoading(DocumentLoader*) override { }
-
- ResourceError cancelledError(const ResourceRequest&) override { return ResourceError(ResourceError::Type::Cancellation); }
- ResourceError blockedError(const ResourceRequest&) override { return { }; }
- ResourceError blockedByContentBlockerError(const ResourceRequest&) override { return { }; }
- ResourceError cannotShowURLError(const ResourceRequest&) override { return { }; }
- ResourceError interruptedForPolicyChangeError(const ResourceRequest&) override { return { }; }
-#if ENABLE(CONTENT_FILTERING)
- ResourceError blockedByContentFilterError(const ResourceRequest&) override { return { }; }
-#endif
-
- ResourceError cannotShowMIMETypeError(const ResourceResponse&) override { return { }; }
- ResourceError fileDoesNotExistError(const ResourceResponse&) override { return { }; }
- ResourceError pluginWillHandleLoadError(const ResourceResponse&) override { return { }; }
-
- bool shouldFallBack(const ResourceError&) override { return false; }
-
- bool canHandleRequest(const ResourceRequest&) const override { return false; }
- bool canShowMIMEType(const String&) const override { return false; }
- bool canShowMIMETypeAsHTML(const String&) const override { return false; }
- bool representationExistsForURLScheme(const String&) const override { return false; }
- String generatedMIMETypeForURLScheme(const String&) const override { return emptyString(); }
-
- void frameLoadCompleted() override { }
- void restoreViewState() override { }
- void provisionalLoadStarted() override { }
- void didFinishLoad() override { }
- void prepareForDataSourceReplacement() override { }
-
- Ref<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&) override;
- void updateCachedDocumentLoader(DocumentLoader&) override { }
- void setTitle(const StringWithDirection&, const URL&) override { }
-
- String userAgent(const URL&) override { return emptyString(); }
-
- void savePlatformDataToCachedFrame(CachedFrame*) override { }
- void transitionToCommittedFromCachedFrame(CachedFrame*) override { }
-#if PLATFORM(IOS)
- void didRestoreFrameHierarchyForCachedFrame() override { }
-#endif
- void transitionToCommittedForNewPage() override { }
-
- void didSaveToPageCache() override { }
- void didRestoreFromPageCache() override { }
-
- void dispatchDidBecomeFrameset(bool) override { }
-
- void updateGlobalHistory() override { }
- void updateGlobalHistoryRedirectLinks() override { }
- bool shouldGoToHistoryItem(HistoryItem*) const override { return false; }
- void updateGlobalHistoryItemForPage() override { }
- void saveViewStateToItem(HistoryItem&) override { }
- bool canCachePage() const override { return false; }
- void didDisplayInsecureContent() override { }
- void didRunInsecureContent(SecurityOrigin*, const URL&) override { }
- void didDetectXSS(const URL&, bool) override { }
- RefPtr<Frame> createFrame(const URL&, const String&, HTMLFrameOwnerElement*, const String&, bool, int, int) override;
- RefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const URL&, const Vector<String>&, const Vector<String>&, const String&, bool) override;
- void recreatePlugin(Widget*) override;
- PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const URL&, const Vector<String>&, const Vector<String>&) override;
-
- ObjectContentType objectContentType(const URL&, const String&) override { return ObjectContentType::None; }
- String overrideMediaType() const override { return String(); }
-
- void redirectDataToPlugin(Widget*) override { }
- void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld&) override { }
-
- void registerForIconNotification(bool) override { }
-
-#if PLATFORM(COCOA)
- RemoteAXObjectRef accessibilityRemoteObject() override { return nullptr; }
- NSCachedURLResponse* willCacheResponse(DocumentLoader*, unsigned long, NSCachedURLResponse* response) const override { return response; }
-#endif
-#if PLATFORM(WIN) && USE(CFURLCONNECTION)
- // FIXME: Windows should use willCacheResponse - <https://bugs.webkit.org/show_bug.cgi?id=57257>.
- bool shouldCacheResponse(DocumentLoader*, unsigned long, const ResourceResponse&, const unsigned char*, unsigned long long) override { return true; }
-#endif
-
- PassRefPtr<FrameNetworkingContext> createNetworkingContext() override;
-
-#if ENABLE(REQUEST_AUTOCOMPLETE)
- void didRequestAutocomplete(PassRefPtr<FormState>) override { }
-#endif
-
- bool isEmptyFrameLoaderClient() override { return true; }
-
- void prefetchDNS(const String&) override { }
-};
-
-class EmptyTextCheckerClient : public TextCheckerClient {
-public:
- bool shouldEraseMarkersAfterChangeSelection(TextCheckingType) const override { return true; }
- void ignoreWordInSpellDocument(const String&) override { }
- void learnWord(const String&) override { }
- void checkSpellingOfString(StringView, int*, int*) override { }
- String getAutoCorrectSuggestionForMisspelledWord(const String&) override { return String(); }
- void checkGrammarOfString(StringView, Vector<GrammarDetail>&, int*, int*) override { }
-
-#if USE(UNIFIED_TEXT_CHECKING)
- Vector<TextCheckingResult> checkTextOfParagraph(StringView, TextCheckingTypeMask, const VisibleSelection&) override { return Vector<TextCheckingResult>(); }
-#endif
-
- void getGuessesForWord(const String&, const String&, const VisibleSelection&, Vector<String>&) override { }
- void requestCheckingOfString(PassRefPtr<TextCheckingRequest>, const VisibleSelection&) override;
-};
-
-class EmptyEditorClient : public EditorClient {
- WTF_MAKE_NONCOPYABLE(EmptyEditorClient); WTF_MAKE_FAST_ALLOCATED;
-public:
- EmptyEditorClient() { }
- virtual ~EmptyEditorClient() { }
-
- bool shouldDeleteRange(Range*) override { return false; }
- bool smartInsertDeleteEnabled() override { return false; }
- bool isSelectTrailingWhitespaceEnabled() override { return false; }
- bool isContinuousSpellCheckingEnabled() override { return false; }
- void toggleContinuousSpellChecking() override { }
- bool isGrammarCheckingEnabled() override { return false; }
- void toggleGrammarChecking() override { }
- int spellCheckerDocumentTag() override { return -1; }
-
-
- bool shouldBeginEditing(Range*) override { return false; }
- bool shouldEndEditing(Range*) override { return false; }
- bool shouldInsertNode(Node*, Range*, EditorInsertAction) override { return false; }
- bool shouldInsertText(const String&, Range*, EditorInsertAction) override { return false; }
- bool shouldChangeSelectedRange(Range*, Range*, EAffinity, bool) override { return false; }
-
- bool shouldApplyStyle(StyleProperties*, Range*) override { return false; }
- void didApplyStyle() override { }
- bool shouldMoveRangeAfterDelete(Range*, Range*) override { return false; }
-
- void didBeginEditing() override { }
- void respondToChangedContents() override { }
- void respondToChangedSelection(Frame*) override { }
- void didChangeSelectionAndUpdateLayout() override { }
- void updateEditorStateAfterLayoutIfEditabilityChanged() override { }
- void discardedComposition(Frame*) override { }
- void canceledComposition() override { }
- void didEndEditing() override { }
- void willWriteSelectionToPasteboard(Range*) override { }
- void didWriteSelectionToPasteboard() override { }
- void getClientPasteboardDataForRange(Range*, Vector<String>&, Vector<RefPtr<SharedBuffer>>&) override { }
- void requestCandidatesForSelection(const VisibleSelection&) override { }
- void handleAcceptedCandidateWithSoftSpaces(TextCheckingResult) override { }
-
- void registerUndoStep(PassRefPtr<UndoStep>) override;
- void registerRedoStep(PassRefPtr<UndoStep>) override;
- void clearUndoRedoOperations() override { }
-
- bool canCopyCut(Frame*, bool defaultValue) const override { return defaultValue; }
- bool canPaste(Frame*, bool defaultValue) const override { return defaultValue; }
- bool canUndo() const override { return false; }
- bool canRedo() const override { return false; }
-
- void undo() override { }
- void redo() override { }
-
- void handleKeyboardEvent(KeyboardEvent*) override { }
- void handleInputMethodKeydown(KeyboardEvent*) override { }
-
- void textFieldDidBeginEditing(Element*) override { }
- void textFieldDidEndEditing(Element*) override { }
- void textDidChangeInTextField(Element*) override { }
- bool doTextFieldCommandFromEvent(Element*, KeyboardEvent*) override { return false; }
- void textWillBeDeletedInTextField(Element*) override { }
- void textDidChangeInTextArea(Element*) override { }
- void overflowScrollPositionChanged() override { }
-
-#if PLATFORM(IOS)
- void startDelayingAndCoalescingContentChangeNotifications() override { }
- void stopDelayingAndCoalescingContentChangeNotifications() override { }
- void writeDataToPasteboard(NSDictionary*) override { }
- NSArray* supportedPasteboardTypesForCurrentSelection() override { return nullptr; }
- NSArray* readDataFromPasteboard(NSString*, int) override { return nullptr; }
- bool hasRichlyEditableSelection() override { return false; }
- int getPasteboardItemsCount() override { return 0; }
- RefPtr<DocumentFragment> documentFragmentFromDelegate(int) override { return nullptr; }
- bool performsTwoStepPaste(DocumentFragment*) override { return false; }
- int pasteboardChangeCount() override { return 0; }
-#endif
-
-#if PLATFORM(COCOA)
- NSString *userVisibleString(NSURL *) override { return nullptr; }
- void setInsertionPasteboard(const String&) override { };
- NSURL *canonicalizeURL(NSURL *) override { return nullptr; }
- NSURL *canonicalizeURLString(NSString *) override { return nullptr; }
-#endif
-
-#if USE(APPKIT)
- void uppercaseWord() override { }
- void lowercaseWord() override { }
- void capitalizeWord() override { }
-#endif
-
-#if USE(AUTOMATIC_TEXT_REPLACEMENT)
- void showSubstitutionsPanel(bool) override { }
- bool substitutionsPanelIsShowing() override { return false; }
- void toggleSmartInsertDelete() override { }
- bool isAutomaticQuoteSubstitutionEnabled() override { return false; }
- void toggleAutomaticQuoteSubstitution() override { }
- bool isAutomaticLinkDetectionEnabled() override { return false; }
- void toggleAutomaticLinkDetection() override { }
- bool isAutomaticDashSubstitutionEnabled() override { return false; }
- void toggleAutomaticDashSubstitution() override { }
- bool isAutomaticTextReplacementEnabled() override { return false; }
- void toggleAutomaticTextReplacement() override { }
- bool isAutomaticSpellingCorrectionEnabled() override { return false; }
- void toggleAutomaticSpellingCorrection() override { }
-#endif
-
-#if PLATFORM(GTK)
- bool shouldShowUnicodeMenu() override { return false; }
-#endif
- TextCheckerClient* textChecker() override { return &m_textCheckerClient; }
-
- void updateSpellingUIWithGrammarString(const String&, const GrammarDetail&) override { }
- void updateSpellingUIWithMisspelledWord(const String&) override { }
- void showSpellingUI(bool) override { }
- bool spellingUIIsShowing() override { return false; }
-
- void willSetInputMethodState() override { }
- void setInputMethodState(bool) override { }
-
-private:
- EmptyTextCheckerClient m_textCheckerClient;
-};
-
-#if ENABLE(CONTEXT_MENUS)
-class EmptyContextMenuClient : public ContextMenuClient {
- WTF_MAKE_NONCOPYABLE(EmptyContextMenuClient); WTF_MAKE_FAST_ALLOCATED;
-public:
- EmptyContextMenuClient() { }
- virtual ~EmptyContextMenuClient() { }
- void contextMenuDestroyed() override { }
-
- void downloadURL(const URL&) override { }
- void searchWithGoogle(const Frame*) override { }
- void lookUpInDictionary(Frame*) override { }
- bool isSpeaking() override { return false; }
- void speak(const String&) override { }
- void stopSpeaking() override { }
-
-#if PLATFORM(COCOA)
- void searchWithSpotlight() override { }
-#endif
-
-#if USE(ACCESSIBILITY_CONTEXT_MENUS)
- void showContextMenu() override { }
-#endif
-};
-#endif // ENABLE(CONTEXT_MENUS)
-
-#if ENABLE(DRAG_SUPPORT)
-class EmptyDragClient : public DragClient {
- WTF_MAKE_NONCOPYABLE(EmptyDragClient); WTF_MAKE_FAST_ALLOCATED;
-public:
- EmptyDragClient() { }
- virtual ~EmptyDragClient() {}
- void willPerformDragDestinationAction(DragDestinationAction, const DragData&) override { }
- void willPerformDragSourceAction(DragSourceAction, const IntPoint&, DataTransfer&) override { }
- DragDestinationAction actionMaskForDrag(const DragData&) override { return DragDestinationActionNone; }
- DragSourceAction dragSourceActionMaskForPoint(const IntPoint&) override { return DragSourceActionNone; }
- void startDrag(DragImageRef, const IntPoint&, const IntPoint&, DataTransfer&, Frame&, bool) override { }
- void dragControllerDestroyed() override { }
-};
-#endif // ENABLE(DRAG_SUPPORT)
-
-class EmptyInspectorClient : public InspectorClient {
- WTF_MAKE_NONCOPYABLE(EmptyInspectorClient); WTF_MAKE_FAST_ALLOCATED;
-public:
- EmptyInspectorClient() { }
- virtual ~EmptyInspectorClient() { }
-
- void inspectedPageDestroyed() override { }
-
- Inspector::FrontendChannel* openLocalFrontend(InspectorController*) override { return nullptr; }
- void bringFrontendToFront() override { }
-
- void highlight() override { }
- void hideHighlight() override { }
-};
-
-class EmptyDeviceClient : public DeviceClient {
-public:
- void startUpdating() override { }
- void stopUpdating() override { }
-};
-
-class EmptyDeviceMotionClient : public DeviceMotionClient {
-public:
- void setController(DeviceMotionController*) override { }
- DeviceMotionData* lastMotion() const override { return nullptr; }
- void deviceMotionControllerDestroyed() override { }
-};
-
-class EmptyDeviceOrientationClient : public DeviceOrientationClient {
-public:
- void setController(DeviceOrientationController*) override { }
- DeviceOrientationData* lastOrientation() const override { return nullptr; }
- void deviceOrientationControllerDestroyed() override { }
-};
-
-class EmptyProgressTrackerClient : public ProgressTrackerClient {
- void willChangeEstimatedProgress() override { }
- void didChangeEstimatedProgress() override { }
-
- void progressStarted(Frame&) override { }
- void progressEstimateChanged(Frame&) override { }
- void progressFinished(Frame&) override { }
-};
-
-class EmptyDiagnosticLoggingClient final : public DiagnosticLoggingClient {
- void logDiagnosticMessage(const String&, const String&, ShouldSample) override { }
- void logDiagnosticMessageWithResult(const String&, const String&, DiagnosticLoggingResultType, ShouldSample) override { }
- void logDiagnosticMessageWithValue(const String&, const String&, const String&, ShouldSample) override { }
-};
-
</del><span class="cx"> void fillWithEmptyClients(PageConfiguration&);
</span><ins>+UniqueRef<EditorClient> createEmptyEditorClient();
+DiagnosticLoggingClient& emptyDiagnosticLoggingClient();
</ins><span class="cx">
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepageDatabaseProviderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DatabaseProvider.h (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DatabaseProvider.h        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebCore/page/DatabaseProvider.h        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -26,7 +26,6 @@
</span><span class="cx"> #pragma once
</span><span class="cx">
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><del>-#include <wtf/RefPtr.h>
</del><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageMainFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/MainFrame.cpp (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/MainFrame.cpp        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebCore/page/MainFrame.cpp        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -27,7 +27,6 @@
</span><span class="cx"> #include "MainFrame.h"
</span><span class="cx">
</span><span class="cx"> #include "Element.h"
</span><del>-#include "EmptyClients.h"
</del><span class="cx"> #include "PageConfiguration.h"
</span><span class="cx"> #include "PageOverlayController.h"
</span><span class="cx"> #include "PaymentCoordinator.h"
</span></span></pre></div>
<a id="trunkSourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.cpp (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.cpp        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebCore/page/Page.cpp        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -83,6 +83,7 @@
</span><span class="cx"> #include "ScrollingCoordinator.h"
</span><span class="cx"> #include "Settings.h"
</span><span class="cx"> #include "SharedBuffer.h"
</span><ins>+#include "SocketProvider.h"
</ins><span class="cx"> #include "StorageArea.h"
</span><span class="cx"> #include "StorageNamespace.h"
</span><span class="cx"> #include "StorageNamespaceProvider.h"
</span><span class="lines">@@ -774,10 +775,8 @@
</span><span class="cx">
</span><span class="cx"> DiagnosticLoggingClient& Page::diagnosticLoggingClient() const
</span><span class="cx"> {
</span><del>- static NeverDestroyed<EmptyDiagnosticLoggingClient> dummyClient;
</del><span class="cx"> if (!settings().diagnosticLoggingEnabled() || !m_diagnosticLoggingClient)
</span><del>- return dummyClient;
-
</del><ins>+ return emptyDiagnosticLoggingClient();
</ins><span class="cx"> return *m_diagnosticLoggingClient;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformsqlSQLiteDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/sql/SQLiteDatabase.cpp (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/sql/SQLiteDatabase.cpp        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebCore/platform/sql/SQLiteDatabase.cpp        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -454,7 +454,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SQLiteDatabase::setAuthorizer(PassRefPtr<DatabaseAuthorizer> auth)
</del><ins>+void SQLiteDatabase::setAuthorizer(DatabaseAuthorizer& authorizer)
</ins><span class="cx"> {
</span><span class="cx"> if (!m_db) {
</span><span class="cx"> LOG_ERROR("Attempt to set an authorizer on a non-open SQL database");
</span><span class="lines">@@ -464,7 +464,7 @@
</span><span class="cx">
</span><span class="cx"> LockHolder locker(m_authorizerLock);
</span><span class="cx">
</span><del>- m_authorizer = auth;
</del><ins>+ m_authorizer = &authorizer;
</ins><span class="cx">
</span><span class="cx"> enableAuthorizer(true);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformsqlSQLiteDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/sql/SQLiteDatabase.h (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/sql/SQLiteDatabase.h        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebCore/platform/sql/SQLiteDatabase.h        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -24,8 +24,7 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#ifndef SQLiteDatabase_h
-#define SQLiteDatabase_h
</del><ins>+#pragma once
</ins><span class="cx">
</span><span class="cx"> #include <functional>
</span><span class="cx"> #include <sqlite3.h>
</span><span class="lines">@@ -101,7 +100,8 @@
</span><span class="cx"> WEBCORE_EXPORT int lastError();
</span><span class="cx"> WEBCORE_EXPORT const char* lastErrorMsg();
</span><span class="cx">
</span><del>- sqlite3* sqlite3Handle() const {
</del><ins>+ sqlite3* sqlite3Handle() const
+ {
</ins><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> ASSERT(m_sharable || currentThread() == m_openingThread || !m_db);
</span><span class="cx"> #endif
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx"> return m_db;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- void setAuthorizer(PassRefPtr<DatabaseAuthorizer>);
</del><ins>+ void setAuthorizer(DatabaseAuthorizer&);
</ins><span class="cx">
</span><span class="cx"> Lock& databaseMutex() { return m_lockingMutex; }
</span><span class="cx"> bool isAutoCommitOn() const;
</span><span class="lines">@@ -166,5 +166,3 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><del>-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformtextBidiContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/text/BidiContext.cpp (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/text/BidiContext.cpp        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebCore/platform/text/BidiContext.cpp        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
</span><del>- * Copyright (C) 2003, 2004, 2006, 2007, 2009, 2010 Apple Inc. All right reserved.
</del><ins>+ * Copyright (C) 2003-2017 Apple Inc. All right reserved.
</ins><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -21,6 +21,7 @@
</span><span class="cx">
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "BidiContext.h"
</span><ins>+
</ins><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -32,6 +33,15 @@
</span><span class="cx">
</span><span class="cx"> COMPILE_ASSERT(sizeof(BidiContext) == sizeof(SameSizeAsBidiContext), BidiContext_should_stay_small);
</span><span class="cx">
</span><ins>+inline BidiContext::BidiContext(unsigned char level, UCharDirection direction, bool override, BidiEmbeddingSource source, BidiContext* parent)
+ : m_level(level)
+ , m_direction(direction)
+ , m_override(override)
+ , m_source(source)
+ , m_parent(parent)
+{
+}
+
</ins><span class="cx"> inline Ref<BidiContext> BidiContext::createUncached(unsigned char level, UCharDirection direction, bool override, BidiEmbeddingSource source, BidiContext* parent)
</span><span class="cx"> {
</span><span class="cx"> return adoptRef(*new BidiContext(level, direction, override, source, parent));
</span><span class="lines">@@ -64,35 +74,31 @@
</span><span class="cx"> return rtlOverrideContext;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline PassRefPtr<BidiContext> copyContextAndRebaselineLevel(BidiContext* context, BidiContext* parent)
</del><ins>+static inline Ref<BidiContext> copyContextAndRebaselineLevel(BidiContext& context, BidiContext* parent)
</ins><span class="cx"> {
</span><del>- ASSERT(context);
- unsigned char newLevel = parent ? parent->level() : 0;
- if (context->dir() == U_RIGHT_TO_LEFT)
</del><ins>+ auto newLevel = parent ? parent->level() : 0;
+ if (context.dir() == U_RIGHT_TO_LEFT)
</ins><span class="cx"> newLevel = nextGreaterOddLevel(newLevel);
</span><span class="cx"> else if (parent)
</span><span class="cx"> newLevel = nextGreaterEvenLevel(newLevel);
</span><del>-
- return BidiContext::create(newLevel, context->dir(), context->override(), context->source(), parent);
</del><ins>+ return BidiContext::create(newLevel, context.dir(), context.override(), context.source(), parent);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // The BidiContext stack must be immutable -- they're re-used for re-layout after
</span><del>-// DOM modification/editing -- so we copy all the non-unicode contexts, and
</del><ins>+// DOM modification/editing -- so we copy all the non-Unicode contexts, and
</ins><span class="cx"> // recalculate their levels.
</span><del>-PassRefPtr<BidiContext> BidiContext::copyStackRemovingUnicodeEmbeddingContexts()
</del><ins>+Ref<BidiContext> BidiContext::copyStackRemovingUnicodeEmbeddingContexts()
</ins><span class="cx"> {
</span><span class="cx"> Vector<BidiContext*, 64> contexts;
</span><del>- for (BidiContext* iter = this; iter; iter = iter->parent()) {
- if (iter->source() != FromUnicode)
- contexts.append(iter);
</del><ins>+ for (auto* ancestor = this; ancestor; ancestor = ancestor->parent()) {
+ if (ancestor->source() != FromUnicode)
+ contexts.append(ancestor);
</ins><span class="cx"> }
</span><span class="cx"> ASSERT(contexts.size());
</span><del>-
- RefPtr<BidiContext> topContext = copyContextAndRebaselineLevel(contexts.last(), 0);
- for (int i = contexts.size() - 1; i > 0; --i)
- topContext = copyContextAndRebaselineLevel(contexts[i - 1], topContext.get());
-
- return WTFMove(topContext);
</del><ins>+ auto topContext = copyContextAndRebaselineLevel(*contexts.last(), nullptr);
+ for (unsigned i = contexts.size() - 1; i; --i)
+ topContext = copyContextAndRebaselineLevel(*contexts[i - 1], topContext.ptr());
+ return topContext;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool operator==(const BidiContext& c1, const BidiContext& c2)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformtextBidiContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/text/BidiContext.h (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/text/BidiContext.h        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebCore/platform/text/BidiContext.h        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
</span><del>- * Copyright (C) 2003, 2004, 2006, 2007, 2009, 2010 Apple Inc. All right reserved.
</del><ins>+ * Copyright (C) 2003-2017 Apple Inc. All right reserved.
</ins><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -19,26 +19,20 @@
</span><span class="cx"> *
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#ifndef BidiContext_h
-#define BidiContext_h
</del><ins>+#pragma once
</ins><span class="cx">
</span><span class="cx"> #include <unicode/uchar.h>
</span><del>-#include <wtf/Assertions.h>
-#include <wtf/PassRefPtr.h>
</del><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-enum BidiEmbeddingSource {
- FromStyleOrDOM,
- FromUnicode
-};
</del><ins>+enum BidiEmbeddingSource { FromStyleOrDOM, FromUnicode };
</ins><span class="cx">
</span><span class="cx"> // Used to keep track of explicit embeddings.
</span><span class="cx"> class BidiContext : public RefCounted<BidiContext> {
</span><span class="cx"> public:
</span><del>- WEBCORE_EXPORT static Ref<BidiContext> create(unsigned char level, UCharDirection, bool override = false, BidiEmbeddingSource = FromStyleOrDOM, BidiContext* parent = 0);
</del><ins>+ WEBCORE_EXPORT static Ref<BidiContext> create(unsigned char level, UCharDirection, bool override = false, BidiEmbeddingSource = FromStyleOrDOM, BidiContext* parent = nullptr);
</ins><span class="cx">
</span><span class="cx"> BidiContext* parent() const { return m_parent.get(); }
</span><span class="cx"> unsigned char level() const { return m_level; }
</span><span class="lines">@@ -46,16 +40,10 @@
</span><span class="cx"> bool override() const { return m_override; }
</span><span class="cx"> BidiEmbeddingSource source() const { return static_cast<BidiEmbeddingSource>(m_source); }
</span><span class="cx">
</span><del>- WEBCORE_EXPORT PassRefPtr<BidiContext> copyStackRemovingUnicodeEmbeddingContexts();
</del><ins>+ WEBCORE_EXPORT Ref<BidiContext> copyStackRemovingUnicodeEmbeddingContexts();
+
</ins><span class="cx"> private:
</span><del>- BidiContext(unsigned char level, UCharDirection direction, bool override, BidiEmbeddingSource source, BidiContext* parent)
- : m_level(level)
- , m_direction(direction)
- , m_override(override)
- , m_source(source)
- , m_parent(parent)
- {
- }
</del><ins>+ BidiContext(unsigned char level, UCharDirection, bool override, BidiEmbeddingSource, BidiContext* parent);
</ins><span class="cx">
</span><span class="cx"> static Ref<BidiContext> createUncached(unsigned char level, UCharDirection, bool override, BidiEmbeddingSource, BidiContext* parent);
</span><span class="cx">
</span><span class="lines">@@ -79,5 +67,3 @@
</span><span class="cx"> bool operator==(const BidiContext&, const BidiContext&);
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><del>-
-#endif // BidiContext_h
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformtextBidiResolverh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/text/BidiResolver.h (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/text/BidiResolver.h        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebCore/platform/text/BidiResolver.h        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
</span><del>- * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2016 Apple Inc. All right reserved.
</del><ins>+ * Copyright (C) 2003-2017 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -19,8 +19,7 @@
</span><span class="cx"> *
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#ifndef BidiResolver_h
-#define BidiResolver_h
</del><ins>+#pragma once
</ins><span class="cx">
</span><span class="cx"> #include "BidiContext.h"
</span><span class="cx"> #include "BidiRunList.h"
</span><span class="lines">@@ -27,7 +26,6 @@
</span><span class="cx"> #include "WritingMode.h"
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/Noncopyable.h>
</span><del>-#include <wtf/PassRefPtr.h>
</del><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -34,7 +32,7 @@
</span><span class="cx">
</span><span class="cx"> class RenderObject;
</span><span class="cx">
</span><del>-template <class Iterator> class WhitespaceCollapsingState {
</del><ins>+template<typename Iterator> class WhitespaceCollapsingState {
</ins><span class="cx"> public:
</span><span class="cx"> void reset()
</span><span class="cx"> {
</span><span class="lines">@@ -83,49 +81,41 @@
</span><span class="cx"> // The BidiStatus at a given position (typically the end of a line) can
</span><span class="cx"> // be cached and then used to restart bidi resolution at that position.
</span><span class="cx"> struct BidiStatus {
</span><del>- BidiStatus()
- : eor(U_OTHER_NEUTRAL)
- , lastStrong(U_OTHER_NEUTRAL)
- , last(U_OTHER_NEUTRAL)
- {
- }
</del><ins>+ BidiStatus() = default;
</ins><span class="cx">
</span><span class="cx"> // Creates a BidiStatus representing a new paragraph root with a default direction.
</span><span class="cx"> // Uses TextDirection as it only has two possibilities instead of UCharDirection which has at least 19.
</span><del>- BidiStatus(TextDirection textDirection, bool isOverride)
</del><ins>+ BidiStatus(TextDirection direction, bool isOverride)
+ : eor(direction == LTR ? U_LEFT_TO_RIGHT : U_RIGHT_TO_LEFT)
+ , lastStrong(eor)
+ , last(eor)
+ , context(BidiContext::create(direction == LTR ? 0 : 1, eor, isOverride))
</ins><span class="cx"> {
</span><del>- UCharDirection direction = textDirection == LTR ? U_LEFT_TO_RIGHT : U_RIGHT_TO_LEFT;
- eor = lastStrong = last = direction;
- context = BidiContext::create(textDirection == LTR ? 0 : 1, direction, isOverride);
</del><span class="cx"> }
</span><span class="cx">
</span><del>- BidiStatus(UCharDirection eorDir, UCharDirection lastStrongDir, UCharDirection lastDir, PassRefPtr<BidiContext> bidiContext)
- : eor(eorDir)
- , lastStrong(lastStrongDir)
- , last(lastDir)
- , context(bidiContext)
</del><ins>+ BidiStatus(UCharDirection eor, UCharDirection lastStrong, UCharDirection last, RefPtr<BidiContext>&& context)
+ : eor(eor)
+ , lastStrong(lastStrong)
+ , last(last)
+ , context(WTFMove(context))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>- UCharDirection eor;
- UCharDirection lastStrong;
- UCharDirection last;
</del><ins>+ UCharDirection eor { U_OTHER_NEUTRAL };
+ UCharDirection lastStrong { U_OTHER_NEUTRAL };
+ UCharDirection last { U_OTHER_NEUTRAL };
</ins><span class="cx"> RefPtr<BidiContext> context;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-class BidiEmbedding {
-public:
</del><ins>+struct BidiEmbedding {
</ins><span class="cx"> BidiEmbedding(UCharDirection direction, BidiEmbeddingSource source)
</span><del>- : m_direction(direction)
- , m_source(source)
</del><ins>+ : direction(direction)
+ , source(source)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>- UCharDirection direction() const { return m_direction; }
- BidiEmbeddingSource source() const { return m_source; }
-private:
- UCharDirection m_direction;
- BidiEmbeddingSource m_source;
</del><ins>+ UCharDirection direction;
+ BidiEmbeddingSource source;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> inline bool operator==(const BidiStatus& status1, const BidiStatus& status2)
</span><span class="lines">@@ -200,17 +190,9 @@
</span><span class="cx">
</span><span class="cx"> // BidiResolver is WebKit's implementation of the Unicode Bidi Algorithm
</span><span class="cx"> // http://unicode.org/reports/tr9
</span><del>-template <class Iterator, class Run, class Subclass> class BidiResolverBase {
</del><ins>+template<typename Iterator, typename Run, typename DerivedClass> class BidiResolverBase {
</ins><span class="cx"> WTF_MAKE_NONCOPYABLE(BidiResolverBase);
</span><span class="cx"> public:
</span><del>- BidiResolverBase()
- : m_direction(U_OTHER_NEUTRAL)
- , m_reachedEndOfLine(false)
- , m_emptyRun(true)
- , m_nestedIsolateCount(0)
- {
- }
-
</del><span class="cx"> const Iterator& position() const { return m_current; }
</span><span class="cx"> void setPositionIgnoringNestedIsolates(const Iterator& position) { m_current = position; }
</span><span class="cx"> void setPosition(const Iterator& position, unsigned nestedIsolatedCount)
</span><span class="lines">@@ -219,10 +201,10 @@
</span><span class="cx"> m_nestedIsolateCount = nestedIsolatedCount;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- void increment() { static_cast<Subclass*>(this)->incrementInternal(); }
</del><ins>+ void increment() { static_cast<DerivedClass&>(*this).incrementInternal(); }
</ins><span class="cx">
</span><span class="cx"> BidiContext* context() const { return m_status.context.get(); }
</span><del>- void setContext(PassRefPtr<BidiContext> c) { m_status.context = c; }
</del><ins>+ void setContext(RefPtr<BidiContext>&& context) { m_status.context = WTFMove(context); }
</ins><span class="cx">
</span><span class="cx"> void setLastDir(UCharDirection lastDir) { m_status.last = lastDir; }
</span><span class="cx"> void setLastStrongDir(UCharDirection lastStrongDir) { m_status.lastStrong = lastStrongDir; }
</span><span class="lines">@@ -229,10 +211,10 @@
</span><span class="cx"> void setEorDir(UCharDirection eorDir) { m_status.eor = eorDir; }
</span><span class="cx">
</span><span class="cx"> UCharDirection dir() const { return m_direction; }
</span><del>- void setDir(UCharDirection d) { m_direction = d; }
</del><ins>+ void setDir(UCharDirection direction) { m_direction = direction; }
</ins><span class="cx">
</span><span class="cx"> const BidiStatus& status() const { return m_status; }
</span><del>- void setStatus(const BidiStatus s) { m_status = s; }
</del><ins>+ void setStatus(BidiStatus status) { m_status = status; }
</ins><span class="cx">
</span><span class="cx"> WhitespaceCollapsingState<Iterator>& whitespaceCollapsingState() { return m_whitespaceCollapsingState; }
</span><span class="cx">
</span><span class="lines">@@ -258,9 +240,11 @@
</span><span class="cx"> unsigned whitespaceCollapsingTransitionForIsolatedRun(Run&);
</span><span class="cx">
</span><span class="cx"> protected:
</span><ins>+ BidiResolverBase() = default;
+
</ins><span class="cx"> // FIXME: Instead of InlineBidiResolvers subclassing this method, we should
</span><span class="cx"> // pass in some sort of Traits object which knows how to create runs for appending.
</span><del>- void appendRun() { static_cast<Subclass*>(this)->appendRunInternal(); }
</del><ins>+ void appendRun() { static_cast<DerivedClass&>(*this).appendRunInternal(); }
</ins><span class="cx">
</span><span class="cx"> Iterator m_current;
</span><span class="cx"> // sor and eor are "start of run" and "end of run" respectively and correpond
</span><span class="lines">@@ -269,11 +253,11 @@
</span><span class="cx"> Iterator m_eor; // Points to the last character in the current run.
</span><span class="cx"> Iterator m_last;
</span><span class="cx"> BidiStatus m_status;
</span><del>- UCharDirection m_direction;
</del><ins>+ UCharDirection m_direction { U_OTHER_NEUTRAL };
</ins><span class="cx"> Iterator endOfLine;
</span><del>- bool m_reachedEndOfLine;
</del><ins>+ bool m_reachedEndOfLine { false };
</ins><span class="cx"> Iterator m_lastBeforeET; // Before a U_EUROPEAN_NUMBER_TERMINATOR
</span><del>- bool m_emptyRun;
</del><ins>+ bool m_emptyRun { true };
</ins><span class="cx">
</span><span class="cx"> // FIXME: This should not belong to the resolver, but rather be passed
</span><span class="cx"> // into createBidiRunsForLine by the caller.
</span><span class="lines">@@ -281,7 +265,7 @@
</span><span class="cx">
</span><span class="cx"> WhitespaceCollapsingState<Iterator> m_whitespaceCollapsingState;
</span><span class="cx">
</span><del>- unsigned m_nestedIsolateCount;
</del><ins>+ unsigned m_nestedIsolateCount { 0 };
</ins><span class="cx"> HashMap<Run*, unsigned> m_whitespaceCollapsingTransitionForIsolatedRun;
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="lines">@@ -297,16 +281,14 @@
</span><span class="cx"> Vector<BidiEmbedding, 8> m_currentExplicitEmbeddingSequence;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-template <class Iterator, class Run>
</del><ins>+template<typename Iterator, typename Run>
</ins><span class="cx"> class BidiResolver : public BidiResolverBase<Iterator, Run, BidiResolver<Iterator, Run>> {
</span><span class="cx"> };
</span><span class="cx">
</span><del>-template <class Iterator, class Run, class IsolateRun>
</del><ins>+template<typename Iterator, typename Run, typename IsolateRun>
</ins><span class="cx"> class BidiResolverWithIsolate : public BidiResolverBase<Iterator, Run, BidiResolverWithIsolate<Iterator, Run, IsolateRun>> {
</span><span class="cx"> public:
</span><del>-#ifndef NDEBUG
</del><span class="cx"> ~BidiResolverWithIsolate();
</span><del>-#endif
</del><span class="cx">
</span><span class="cx"> void incrementInternal();
</span><span class="cx"> void appendRunInternal();
</span><span class="lines">@@ -316,17 +298,15 @@
</span><span class="cx"> Vector<IsolateRun> m_isolatedRuns;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-#ifndef NDEBUG
-template <class Iterator, class Run, class IsolateRun>
-BidiResolverWithIsolate<Iterator, Run, IsolateRun>::~BidiResolverWithIsolate()
</del><ins>+template<typename Iterator, typename Run, typename IsolateRun>
+inline BidiResolverWithIsolate<Iterator, Run, IsolateRun>::~BidiResolverWithIsolate()
</ins><span class="cx"> {
</span><span class="cx"> // The owner of this resolver should have handled the isolated runs.
</span><span class="cx"> ASSERT(m_isolatedRuns.isEmpty());
</span><span class="cx"> }
</span><del>-#endif
</del><span class="cx">
</span><del>-template <class Iterator, class Run, class Subclass>
-void BidiResolverBase<Iterator, Run, Subclass>::appendRunInternal()
</del><ins>+template<typename Iterator, typename Run, typename DerivedClass>
+void BidiResolverBase<Iterator, Run, DerivedClass>::appendRunInternal()
</ins><span class="cx"> {
</span><span class="cx"> if (!m_emptyRun && !m_eor.atEnd()) {
</span><span class="cx"> unsigned startOffset = m_sor.offset();
</span><span class="lines">@@ -348,8 +328,8 @@
</span><span class="cx"> m_status.eor = U_OTHER_NEUTRAL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-template <class Iterator, class Run, class Subclass>
-void BidiResolverBase<Iterator, Run, Subclass>::embed(UCharDirection dir, BidiEmbeddingSource source)
</del><ins>+template<typename Iterator, typename Run, typename DerivedClass>
+void BidiResolverBase<Iterator, Run, DerivedClass>::embed(UCharDirection dir, BidiEmbeddingSource source)
</ins><span class="cx"> {
</span><span class="cx"> // Isolated spans compute base directionality during their own UBA run.
</span><span class="cx"> // Do not insert fake embed characters once we enter an isolated span.
</span><span class="lines">@@ -359,8 +339,8 @@
</span><span class="cx"> m_currentExplicitEmbeddingSequence.append(BidiEmbedding(dir, source));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-template <class Iterator, class Run, class Subclass>
-void BidiResolverBase<Iterator, Run, Subclass>::checkDirectionInLowerRaiseEmbeddingLevel()
</del><ins>+template<typename Iterator, typename Run, typename DerivedClass>
+void BidiResolverBase<Iterator, Run, DerivedClass>::checkDirectionInLowerRaiseEmbeddingLevel()
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(m_status.eor != U_OTHER_NEUTRAL || m_eor.atEnd());
</span><span class="cx"> ASSERT(m_status.last != U_DIR_NON_SPACING_MARK
</span><span class="lines">@@ -374,8 +354,8 @@
</span><span class="cx"> m_direction = m_status.lastStrong == U_LEFT_TO_RIGHT ? U_LEFT_TO_RIGHT : U_RIGHT_TO_LEFT;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-template <class Iterator, class Run, class Subclass>
-void BidiResolverBase<Iterator, Run, Subclass>::lowerExplicitEmbeddingLevel(UCharDirection from)
</del><ins>+template<typename Iterator, typename Run, typename DerivedClass>
+void BidiResolverBase<Iterator, Run, DerivedClass>::lowerExplicitEmbeddingLevel(UCharDirection from)
</ins><span class="cx"> {
</span><span class="cx"> if (!m_emptyRun && m_eor != m_last) {
</span><span class="cx"> checkDirectionInLowerRaiseEmbeddingLevel();
</span><span class="lines">@@ -410,8 +390,8 @@
</span><span class="cx"> m_eor = Iterator();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-template <class Iterator, class Run, class Subclass>
-void BidiResolverBase<Iterator, Run, Subclass>::raiseExplicitEmbeddingLevel(UCharDirection from, UCharDirection to)
</del><ins>+template<typename Iterator, typename Run, typename DerivedClass>
+void BidiResolverBase<Iterator, Run, DerivedClass>::raiseExplicitEmbeddingLevel(UCharDirection from, UCharDirection to)
</ins><span class="cx"> {
</span><span class="cx"> if (!m_emptyRun && m_eor != m_last) {
</span><span class="cx"> checkDirectionInLowerRaiseEmbeddingLevel();
</span><span class="lines">@@ -447,8 +427,8 @@
</span><span class="cx"> m_eor = Iterator();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-template <class Iterator, class Run, class Subclass>
-bool BidiResolverBase<Iterator, Run, Subclass>::commitExplicitEmbedding()
</del><ins>+template<typename Iterator, typename Run, typename DerivedClass>
+bool BidiResolverBase<Iterator, Run, DerivedClass>::commitExplicitEmbedding()
</ins><span class="cx"> {
</span><span class="cx"> // When we're "inIsolate()" we're resolving the parent context which
</span><span class="cx"> // ignores (skips over) the isolated content, including embedding levels.
</span><span class="lines">@@ -455,17 +435,16 @@
</span><span class="cx"> // We should never accrue embedding levels while skipping over isolated content.
</span><span class="cx"> ASSERT(!inIsolate() || m_currentExplicitEmbeddingSequence.isEmpty());
</span><span class="cx">
</span><del>- unsigned char fromLevel = context()->level();
</del><ins>+ auto fromLevel = context()->level();
</ins><span class="cx"> RefPtr<BidiContext> toContext = context();
</span><span class="cx">
</span><del>- for (size_t i = 0; i < m_currentExplicitEmbeddingSequence.size(); ++i) {
- BidiEmbedding embedding = m_currentExplicitEmbeddingSequence[i];
- if (embedding.direction() == U_POP_DIRECTIONAL_FORMAT) {
- if (BidiContext* parentContext = toContext->parent())
</del><ins>+ for (auto& embedding : m_currentExplicitEmbeddingSequence) {
+ if (embedding.direction == U_POP_DIRECTIONAL_FORMAT) {
+ if (auto* parentContext = toContext->parent())
</ins><span class="cx"> toContext = parentContext;
</span><span class="cx"> } else {
</span><del>- UCharDirection direction = (embedding.direction() == U_RIGHT_TO_LEFT_EMBEDDING || embedding.direction() == U_RIGHT_TO_LEFT_OVERRIDE) ? U_RIGHT_TO_LEFT : U_LEFT_TO_RIGHT;
- bool override = embedding.direction() == U_LEFT_TO_RIGHT_OVERRIDE || embedding.direction() == U_RIGHT_TO_LEFT_OVERRIDE;
</del><ins>+ UCharDirection direction = (embedding.direction == U_RIGHT_TO_LEFT_EMBEDDING || embedding.direction == U_RIGHT_TO_LEFT_OVERRIDE) ? U_RIGHT_TO_LEFT : U_LEFT_TO_RIGHT;
+ bool override = embedding.direction == U_LEFT_TO_RIGHT_OVERRIDE || embedding.direction == U_RIGHT_TO_LEFT_OVERRIDE;
</ins><span class="cx"> unsigned char level = toContext->level();
</span><span class="cx"> if (direction == U_RIGHT_TO_LEFT)
</span><span class="cx"> level = nextGreaterOddLevel(level);
</span><span class="lines">@@ -472,11 +451,11 @@
</span><span class="cx"> else
</span><span class="cx"> level = nextGreaterEvenLevel(level);
</span><span class="cx"> if (level < 61)
</span><del>- toContext = BidiContext::create(level, direction, override, embedding.source(), toContext.get());
</del><ins>+ toContext = BidiContext::create(level, direction, override, embedding.source, toContext.get());
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- unsigned char toLevel = toContext->level();
</del><ins>+ auto toLevel = toContext->level();
</ins><span class="cx">
</span><span class="cx"> if (toLevel > fromLevel)
</span><span class="cx"> raiseExplicitEmbeddingLevel(fromLevel % 2 ? U_RIGHT_TO_LEFT : U_LEFT_TO_RIGHT, toLevel % 2 ? U_RIGHT_TO_LEFT : U_LEFT_TO_RIGHT);
</span><span class="lines">@@ -483,7 +462,7 @@
</span><span class="cx"> else if (toLevel < fromLevel)
</span><span class="cx"> lowerExplicitEmbeddingLevel(fromLevel % 2 ? U_RIGHT_TO_LEFT : U_LEFT_TO_RIGHT);
</span><span class="cx">
</span><del>- setContext(toContext);
</del><ins>+ setContext(WTFMove(toContext));
</ins><span class="cx">
</span><span class="cx"> m_currentExplicitEmbeddingSequence.clear();
</span><span class="cx">
</span><span class="lines">@@ -490,8 +469,8 @@
</span><span class="cx"> return fromLevel != toLevel;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-template <class Iterator, class Run, class Subclass>
-inline void BidiResolverBase<Iterator, Run, Subclass>::updateStatusLastFromCurrentDirection(UCharDirection dirCurrent)
</del><ins>+template<typename Iterator, typename Run, typename DerivedClass>
+inline void BidiResolverBase<Iterator, Run, DerivedClass>::updateStatusLastFromCurrentDirection(UCharDirection dirCurrent)
</ins><span class="cx"> {
</span><span class="cx"> switch (dirCurrent) {
</span><span class="cx"> case U_EUROPEAN_NUMBER_TERMINATOR:
</span><span class="lines">@@ -531,8 +510,8 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-template <class Iterator, class Run, class Subclass>
-inline void BidiResolverBase<Iterator, Run, Subclass>::reorderRunsFromLevels()
</del><ins>+template<typename Iterator, typename Run, typename DerivedClass>
+inline void BidiResolverBase<Iterator, Run, DerivedClass>::reorderRunsFromLevels()
</ins><span class="cx"> {
</span><span class="cx"> unsigned char levelLow = 128;
</span><span class="cx"> unsigned char levelHigh = 0;
</span><span class="lines">@@ -568,8 +547,8 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-template <class Iterator, class Run, class Subclass>
-void BidiResolverBase<Iterator, Run, Subclass>::createBidiRunsForLine(const Iterator& end, VisualDirectionOverride override, bool hardLineBreak)
</del><ins>+template<typename Iterator, typename Run, typename DerivedClass>
+void BidiResolverBase<Iterator, Run, DerivedClass>::createBidiRunsForLine(const Iterator& end, VisualDirectionOverride override, bool hardLineBreak)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(m_direction == U_OTHER_NEUTRAL);
</span><span class="cx">
</span><span class="lines">@@ -595,7 +574,7 @@
</span><span class="cx">
</span><span class="cx"> m_last = m_current;
</span><span class="cx"> bool pastEnd = false;
</span><del>- BidiResolverBase<Iterator, Run, Subclass> stateAtEnd;
</del><ins>+ BidiResolverBase<Iterator, Run, DerivedClass> stateAtEnd;
</ins><span class="cx">
</span><span class="cx"> while (true) {
</span><span class="cx"> UCharDirection dirCurrent;
</span><span class="lines">@@ -975,19 +954,17 @@
</span><span class="cx"> endOfLine = Iterator();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-template <class Iterator, class Run, class Subclass>
-void BidiResolverBase<Iterator, Run, Subclass>::setWhitespaceCollapsingTransitionForIsolatedRun(Run& run, size_t transition)
</del><ins>+template<typename Iterator, typename Run, typename DerivedClass>
+void BidiResolverBase<Iterator, Run, DerivedClass>::setWhitespaceCollapsingTransitionForIsolatedRun(Run& run, size_t transition)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!m_whitespaceCollapsingTransitionForIsolatedRun.contains(&run));
</span><span class="cx"> m_whitespaceCollapsingTransitionForIsolatedRun.add(&run, transition);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-template<class Iterator, class Run, class Subclass>
-unsigned BidiResolverBase<Iterator, Run, Subclass>::whitespaceCollapsingTransitionForIsolatedRun(Run& run)
</del><ins>+template<typename Iterator, typename Run, typename DerivedClass>
+unsigned BidiResolverBase<Iterator, Run, DerivedClass>::whitespaceCollapsingTransitionForIsolatedRun(Run& run)
</ins><span class="cx"> {
</span><span class="cx"> return m_whitespaceCollapsingTransitionForIsolatedRun.take(&run);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><del>-
-#endif // BidiResolver_h
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformtextTextCheckerClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/text/TextCheckerClient.h (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/text/TextCheckerClient.h        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebCore/platform/text/TextCheckerClient.h        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -25,16 +25,10 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#ifndef TextCheckerClient_h
-#define TextCheckerClient_h
</del><ins>+#pragma once
</ins><span class="cx">
</span><span class="cx"> #include "TextChecking.h"
</span><span class="cx">
</span><del>-#include <wtf/Forward.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/Vector.h>
-#include <wtf/text/WTFString.h>
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class VisibleSelection;
</span><span class="lines">@@ -41,7 +35,7 @@
</span><span class="cx">
</span><span class="cx"> class TextCheckerClient {
</span><span class="cx"> public:
</span><del>- virtual ~TextCheckerClient() {}
</del><ins>+ virtual ~TextCheckerClient() { }
</ins><span class="cx">
</span><span class="cx"> virtual bool shouldEraseMarkersAfterChangeSelection(TextCheckingType) const = 0;
</span><span class="cx"> virtual void ignoreWordInSpellDocument(const String&) = 0;
</span><span class="lines">@@ -58,9 +52,7 @@
</span><span class="cx"> // provide more accurate correction suggestions. Caller can pass in more text in "context" to aid such spellcheckers on language
</span><span class="cx"> // identification. Noramlly it's the text surrounding the "word" for which we are getting correction suggestions.
</span><span class="cx"> virtual void getGuessesForWord(const String& word, const String& context, const VisibleSelection& currentSelection, Vector<String>& guesses) = 0;
</span><del>- virtual void requestCheckingOfString(PassRefPtr<TextCheckingRequest>, const VisibleSelection& currentSelection) = 0;
</del><ins>+ virtual void requestCheckingOfString(TextCheckingRequest&, const VisibleSelection& currentSelection) = 0;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> }
</span><del>-
-#endif // TextCheckerClient_h
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformtextTextEncodingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/text/TextEncoding.h (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/text/TextEncoding.h        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebCore/platform/text/TextEncoding.h        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#ifndef TextEncoding_h
-#define TextEncoding_h
</del><ins>+#pragma once
</ins><span class="cx">
</span><span class="cx"> #include "TextCodec.h"
</span><span class="cx"> #include <wtf/Forward.h>
</span><span class="lines">@@ -31,69 +30,52 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>- class TextEncoding {
- public:
- TextEncoding() : m_name(0) { }
- TextEncoding(const char* name);
- WEBCORE_EXPORT TextEncoding(const String& name);
</del><ins>+class TextEncoding {
+public:
+ TextEncoding() = default;
+ TextEncoding(const char* name);
+ WEBCORE_EXPORT TextEncoding(const String& name);
</ins><span class="cx">
</span><del>- bool isValid() const { return m_name; }
- const char* name() const { return m_name; }
- WEBCORE_EXPORT const char* domName() const; // name exposed via DOM
- bool usesVisualOrdering() const;
- bool isJapanese() const;
-
- PassRefPtr<StringImpl> displayString(PassRefPtr<StringImpl> str) const
- {
- if (m_backslashAsCurrencySymbol == '\\' || !str)
- return str;
- return str->replace('\\', m_backslashAsCurrencySymbol);
- }
- template <typename CharacterType>
- void displayBuffer(CharacterType* characters, unsigned len) const
- {
- if (m_backslashAsCurrencySymbol == '\\')
- return;
- for (unsigned i = 0; i < len; ++i) {
- if (characters[i] == '\\')
- characters[i] = m_backslashAsCurrencySymbol;
- }
- }
</del><ins>+ bool isValid() const { return m_name; }
+ const char* name() const { return m_name; }
+ WEBCORE_EXPORT const char* domName() const; // name exposed via DOM
+ bool usesVisualOrdering() const;
+ bool isJapanese() const;
</ins><span class="cx">
</span><del>- const TextEncoding& closestByteBasedEquivalent() const;
- const TextEncoding& encodingForFormSubmission() const;
</del><ins>+ const TextEncoding& closestByteBasedEquivalent() const;
+ const TextEncoding& encodingForFormSubmission() const;
</ins><span class="cx">
</span><del>- String decode(const char* str, size_t length) const
- {
- bool ignored;
- return decode(str, length, false, ignored);
- }
- WEBCORE_EXPORT String decode(const char*, size_t length, bool stopOnError, bool& sawError) const;
- CString encode(StringView, UnencodableHandling) const;
</del><ins>+ WEBCORE_EXPORT String decode(const char*, size_t length, bool stopOnError, bool& sawError) const;
+ String decode(const char*, size_t length) const;
+ CString encode(StringView, UnencodableHandling) const;
</ins><span class="cx">
</span><del>- UChar backslashAsCurrencySymbol() const;
- bool isByteBasedEncoding() const { return !isNonByteBasedEncoding(); }
</del><ins>+ UChar backslashAsCurrencySymbol() const;
+ bool isByteBasedEncoding() const { return !isNonByteBasedEncoding(); }
</ins><span class="cx">
</span><del>- private:
- bool isNonByteBasedEncoding() const;
- bool isUTF7Encoding() const;
</del><ins>+private:
+ bool isNonByteBasedEncoding() const;
+ bool isUTF7Encoding() const;
</ins><span class="cx">
</span><del>- const char* m_name;
- UChar m_backslashAsCurrencySymbol;
- };
</del><ins>+ const char* m_name { nullptr };
+ UChar m_backslashAsCurrencySymbol;
+};
</ins><span class="cx">
</span><del>- inline bool operator==(const TextEncoding& a, const TextEncoding& b) { return a.name() == b.name(); }
- inline bool operator!=(const TextEncoding& a, const TextEncoding& b) { return a.name() != b.name(); }
</del><ins>+inline bool operator==(const TextEncoding& a, const TextEncoding& b) { return a.name() == b.name(); }
+inline bool operator!=(const TextEncoding& a, const TextEncoding& b) { return a.name() != b.name(); }
</ins><span class="cx">
</span><del>- const TextEncoding& ASCIIEncoding();
- const TextEncoding& Latin1Encoding();
- const TextEncoding& UTF16BigEndianEncoding();
- const TextEncoding& UTF16LittleEndianEncoding();
- const TextEncoding& UTF32BigEndianEncoding();
- const TextEncoding& UTF32LittleEndianEncoding();
- WEBCORE_EXPORT const TextEncoding& UTF8Encoding();
- WEBCORE_EXPORT const TextEncoding& WindowsLatin1Encoding();
</del><ins>+const TextEncoding& ASCIIEncoding();
+const TextEncoding& Latin1Encoding();
+const TextEncoding& UTF16BigEndianEncoding();
+const TextEncoding& UTF16LittleEndianEncoding();
+const TextEncoding& UTF32BigEndianEncoding();
+const TextEncoding& UTF32LittleEndianEncoding();
+WEBCORE_EXPORT const TextEncoding& UTF8Encoding();
+WEBCORE_EXPORT const TextEncoding& WindowsLatin1Encoding();
</ins><span class="cx">
</span><ins>+inline String TextEncoding::decode(const char* characters, size_t length) const
+{
+ bool ignored;
+ return decode(characters, length, false, ignored);
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><del>-
-#endif // TextEncoding_h
</del></span></pre></div>
<a id="trunkSourceWebCorerenderingRootInlineBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RootInlineBox.cpp (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RootInlineBox.cpp        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebCore/rendering/RootInlineBox.cpp        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2003-2017 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> COMPILE_ASSERT(sizeof(RootInlineBox) == sizeof(SameSizeAsRootInlineBox), RootInlineBox_should_stay_small);
</span><span class="cx">
</span><span class="cx"> typedef WTF::HashMap<const RootInlineBox*, std::unique_ptr<EllipsisBox>> EllipsisBoxMap;
</span><del>-static EllipsisBoxMap* gEllipsisBoxMap = 0;
</del><ins>+static EllipsisBoxMap* gEllipsisBoxMap;
</ins><span class="cx">
</span><span class="cx"> static ContainingRegionMap& containingRegionMap(RenderBlockFlow& block)
</span><span class="cx"> {
</span><span class="lines">@@ -208,10 +208,10 @@
</span><span class="cx"> void RootInlineBox::childRemoved(InlineBox* box)
</span><span class="cx"> {
</span><span class="cx"> if (&box->renderer() == m_lineBreakObj)
</span><del>- setLineBreakInfo(0, 0, BidiStatus());
</del><ins>+ setLineBreakInfo(nullptr, 0, BidiStatus());
</ins><span class="cx">
</span><span class="cx"> for (RootInlineBox* prev = prevRootBox(); prev && prev->lineBreakObj() == &box->renderer(); prev = prev->prevRootBox()) {
</span><del>- prev->setLineBreakInfo(0, 0, BidiStatus());
</del><ins>+ prev->setLineBreakInfo(nullptr, 0, BidiStatus());
</ins><span class="cx"> prev->markDirty();
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -566,22 +566,20 @@
</span><span class="cx">
</span><span class="cx"> InlineBox* RootInlineBox::firstSelectedBox()
</span><span class="cx"> {
</span><del>- for (InlineBox* box = firstLeafChild(); box; box = box->nextLeafChild()) {
</del><ins>+ for (auto* box = firstLeafChild(); box; box = box->nextLeafChild()) {
</ins><span class="cx"> if (box->selectionState() != RenderObject::SelectionNone)
</span><span class="cx"> return box;
</span><span class="cx"> }
</span><del>-
- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> InlineBox* RootInlineBox::lastSelectedBox()
</span><span class="cx"> {
</span><del>- for (InlineBox* box = lastLeafChild(); box; box = box->prevLeafChild()) {
</del><ins>+ for (auto* box = lastLeafChild(); box; box = box->prevLeafChild()) {
</ins><span class="cx"> if (box->selectionState() != RenderObject::SelectionNone)
</span><span class="cx"> return box;
</span><span class="cx"> }
</span><del>-
- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> LayoutUnit RootInlineBox::selectionTop() const
</span><span class="lines">@@ -805,7 +803,7 @@
</span><span class="cx"> // Return it.
</span><span class="cx"> return lastLeaf;
</span><span class="cx">
</span><del>- InlineBox* closestLeaf = 0;
</del><ins>+ InlineBox* closestLeaf = nullptr;
</ins><span class="cx"> for (InlineBox* leaf = firstLeaf; leaf; leaf = leaf->nextLeafChildIgnoringLineBreak()) {
</span><span class="cx"> if (!leaf->renderer().isListMarker() && (!onlyEditableLeaves || isEditableLeaf(leaf))) {
</span><span class="cx"> closestLeaf = leaf;
</span><span class="lines">@@ -821,13 +819,13 @@
</span><span class="cx">
</span><span class="cx"> BidiStatus RootInlineBox::lineBreakBidiStatus() const
</span><span class="cx"> {
</span><del>- return BidiStatus(static_cast<UCharDirection>(m_lineBreakBidiStatusEor), static_cast<UCharDirection>(m_lineBreakBidiStatusLastStrong), static_cast<UCharDirection>(m_lineBreakBidiStatusLast), m_lineBreakContext);
</del><ins>+ return { static_cast<UCharDirection>(m_lineBreakBidiStatusEor), static_cast<UCharDirection>(m_lineBreakBidiStatusLastStrong), static_cast<UCharDirection>(m_lineBreakBidiStatusLast), m_lineBreakContext.copyRef() };
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void RootInlineBox::setLineBreakInfo(RenderObject* obj, unsigned breakPos, const BidiStatus& status)
</del><ins>+void RootInlineBox::setLineBreakInfo(RenderObject* object, unsigned breakPosition, const BidiStatus& status)
</ins><span class="cx"> {
</span><del>- m_lineBreakObj = obj;
- m_lineBreakPos = breakPos;
</del><ins>+ m_lineBreakObj = object;
+ m_lineBreakPos = breakPosition;
</ins><span class="cx"> m_lineBreakBidiStatusEor = status.eor;
</span><span class="cx"> m_lineBreakBidiStatusLastStrong = status.lastStrong;
</span><span class="cx"> m_lineBreakBidiStatusLast = status.last;
</span><span class="lines">@@ -837,7 +835,7 @@
</span><span class="cx"> EllipsisBox* RootInlineBox::ellipsisBox() const
</span><span class="cx"> {
</span><span class="cx"> if (!hasEllipsisBox())
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> return gEllipsisBoxMap->get(this);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -936,8 +934,8 @@
</span><span class="cx"> const RenderStyle& boxLineStyle = box.lineStyle();
</span><span class="cx"> if (usedFonts && !usedFonts->isEmpty() && (includeFont || (boxLineStyle.lineHeight().isNegative() && includeLeading))) {
</span><span class="cx"> usedFonts->append(&boxLineStyle.fontCascade().primaryFont());
</span><del>- for (size_t i = 0; i < usedFonts->size(); ++i) {
- const FontMetrics& fontMetrics = usedFonts->at(i)->fontMetrics();
</del><ins>+ for (auto& font : *usedFonts) {
+ auto& fontMetrics = font->fontMetrics();
</ins><span class="cx"> int usedFontAscent = fontMetrics.ascent(baselineType());
</span><span class="cx"> int usedFontDescent = fontMetrics.descent(baselineType());
</span><span class="cx"> int halfLeading = (fontMetrics.lineSpacing() - fontMetrics.height()) / 2;
</span></span></pre></div>
<a id="trunkSourceWebCoresvggraphicsSVGImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/graphics/SVGImage.cpp (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/graphics/SVGImage.cpp        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebCore/svg/graphics/SVGImage.cpp        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include "CommonVM.h"
</span><span class="cx"> #include "DOMWindow.h"
</span><span class="cx"> #include "DocumentLoader.h"
</span><ins>+#include "EditorClient.h"
</ins><span class="cx"> #include "ElementIterator.h"
</span><span class="cx"> #include "FrameLoader.h"
</span><span class="cx"> #include "FrameView.h"
</span><span class="lines">@@ -51,6 +52,7 @@
</span><span class="cx"> #include "SVGImageElement.h"
</span><span class="cx"> #include "SVGSVGElement.h"
</span><span class="cx"> #include "Settings.h"
</span><ins>+#include "SocketProvider.h"
</ins><span class="cx"> #include "TextStream.h"
</span><span class="cx"> #include <runtime/JSCInlines.h>
</span><span class="cx"> #include <runtime/JSLock.h>
</span><span class="lines">@@ -412,7 +414,7 @@
</span><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> if (allDataReceived) {
</span><del>- PageConfiguration pageConfiguration(makeUniqueRef<EmptyEditorClient>(), SocketProvider::create());
</del><ins>+ PageConfiguration pageConfiguration(createEmptyEditorClient(), SocketProvider::create());
</ins><span class="cx"> fillWithEmptyClients(pageConfiguration);
</span><span class="cx"> m_chromeClient = std::make_unique<SVGImageChromeClient>(this);
</span><span class="cx"> pageConfiguration.chromeClient = m_chromeClient.get();
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebKit/mac/ChangeLog        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2017-01-06 Darin Adler <darin@apple.com>
+
+ Remove PassRefPtr use from "inspector", "platform/sql", and "platform/text"
+ https://bugs.webkit.org/show_bug.cgi?id=166797
+
+ Reviewed by Alex Christensen.
+
+ * WebCoreSupport/WebEditorClient.h: Updated to take a reference.
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::requestCheckingOfString): Take a reference
+ instead of a PassRefPtr.
+
</ins><span class="cx"> 2017-01-05 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> Turn preferLowPowerWebGLRendering setting on by default
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebEditorClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -166,7 +166,7 @@
</span><span class="cx">
</span><span class="cx"> void willSetInputMethodState() final;
</span><span class="cx"> void setInputMethodState(bool enabled) final;
</span><del>- void requestCheckingOfString(PassRefPtr<WebCore::TextCheckingRequest>, const WebCore::VisibleSelection& currentSelection) final;
</del><ins>+ void requestCheckingOfString(WebCore::TextCheckingRequest&, const WebCore::VisibleSelection& currentSelection) final;
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
</span><span class="cx"> void requestCandidatesForSelection(const WebCore::VisibleSelection&) final;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebEditorClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -1323,11 +1323,11 @@
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-void WebEditorClient::requestCheckingOfString(PassRefPtr<WebCore::TextCheckingRequest> request, const VisibleSelection& currentSelection)
</del><ins>+void WebEditorClient::requestCheckingOfString(WebCore::TextCheckingRequest& request, const VisibleSelection& currentSelection)
</ins><span class="cx"> {
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> ASSERT(!m_textCheckingRequest);
</span><del>- m_textCheckingRequest = request;
</del><ins>+ m_textCheckingRequest = &request;
</ins><span class="cx">
</span><span class="cx"> int sequence = m_textCheckingRequest->data().sequence();
</span><span class="cx"> NSRange range = NSMakeRange(0, m_textCheckingRequest->data().text().length());
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebKit/win/ChangeLog        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2017-01-06 Darin Adler <darin@apple.com>
+
+ Remove PassRefPtr use from "inspector", "platform/sql", and "platform/text"
+ https://bugs.webkit.org/show_bug.cgi?id=166797
+
+ Reviewed by Alex Christensen.
+
+ * WebCoreSupport/WebEditorClient.h: Update argument to take a reference
+ instead of a PassRefPtr.
+
</ins><span class="cx"> 2017-01-05 Andreas Kling <akling@apple.com>
</span><span class="cx">
</span><span class="cx"> Remove ChromeClient::needTouchEvents().
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebEditorClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebEditorClient.h (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebEditorClient.h        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebEditorClient.h        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx">
</span><span class="cx"> void willSetInputMethodState() override;
</span><span class="cx"> void setInputMethodState(bool) override;
</span><del>- void requestCheckingOfString(WTF::PassRefPtr<WebCore::TextCheckingRequest>, const WebCore::VisibleSelection&) override { }
</del><ins>+ void requestCheckingOfString(WebCore::TextCheckingRequest&, const WebCore::VisibleSelection&) override { }
</ins><span class="cx">
</span><span class="cx"> WebCore::TextCheckerClient* textChecker() override { return this; }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebKit2/ChangeLog        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2017-01-06 Darin Adler <darin@apple.com>
+
+ Remove PassRefPtr use from "inspector", "platform/sql", and "platform/text"
+ https://bugs.webkit.org/show_bug.cgi?id=166797
+
+ Reviewed by Alex Christensen.
+
+ * WebProcess/WebCoreSupport/WebEditorClient.cpp:
+ (WebKit::WebEditorClient::requestCheckingOfString): Take a reference
+ instead of a PassRefPtr.
+ * WebProcess/WebCoreSupport/WebEditorClient.h: Updated for above change.
+
</ins><span class="cx"> 2017-01-07 Andy Estes <aestes@apple.com>
</span><span class="cx">
</span><span class="cx"> [QuickLook] Consolidate usage of QuickLookHandle into SubresourceLoader
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebEditorClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -526,14 +526,12 @@
</span><span class="cx"> m_page->sendSync(Messages::WebPageProxy::GetGuessesForWord(word, context, insertionPointFromCurrentSelection(currentSelection)), Messages::WebPageProxy::GetGuessesForWord::Reply(guesses));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebEditorClient::requestCheckingOfString(WTF::PassRefPtr<TextCheckingRequest> prpRequest, const WebCore::VisibleSelection& currentSelection)
</del><ins>+void WebEditorClient::requestCheckingOfString(TextCheckingRequest& request, const WebCore::VisibleSelection& currentSelection)
</ins><span class="cx"> {
</span><del>- RefPtr<TextCheckingRequest> request = prpRequest;
-
</del><span class="cx"> uint64_t requestID = generateTextCheckingRequestID();
</span><del>- m_page->addTextCheckingRequest(requestID, request);
</del><ins>+ m_page->addTextCheckingRequest(requestID, &request);
</ins><span class="cx">
</span><del>- m_page->send(Messages::WebPageProxy::RequestCheckingOfString(requestID, request->data(), insertionPointFromCurrentSelection(currentSelection)));
</del><ins>+ m_page->send(Messages::WebPageProxy::RequestCheckingOfString(requestID, request.data(), insertionPointFromCurrentSelection(currentSelection)));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebEditorClient::willSetInputMethodState()
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebEditorClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h (210491 => 210492)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h        2017-01-07 21:29:57 UTC (rev 210491)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h        2017-01-07 22:08:28 UTC (rev 210492)
</span><span class="lines">@@ -149,7 +149,7 @@
</span><span class="cx"> void getGuessesForWord(const String& word, const String& context, const WebCore::VisibleSelection& currentSelection, Vector<String>& guesses) final;
</span><span class="cx"> void willSetInputMethodState() final;
</span><span class="cx"> void setInputMethodState(bool enabled) final;
</span><del>- void requestCheckingOfString(WTF::PassRefPtr<WebCore::TextCheckingRequest>, const WebCore::VisibleSelection& currentSelection) final;
</del><ins>+ void requestCheckingOfString(WebCore::TextCheckingRequest&, const WebCore::VisibleSelection& currentSelection) final;
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx"> bool shouldShowUnicodeMenu() final;
</span></span></pre>
</div>
</div>
</body>
</html>