Title: [203322] trunk/Source
Revision
203322
Author
[email protected]
Date
2016-07-15 21:51:45 -0700 (Fri, 15 Jul 2016)

Log Message

Use emptyString() / nullAtom when possible
https://bugs.webkit.org/show_bug.cgi?id=159850

Reviewed by Ryosuke Niwa.

Use emptyString() / nullAtom when possible, for performance.

Source/WebCore:

* Modules/webaudio/AudioNode.cpp:
(WebCore::AudioNode::channelCountMode):
(WebCore::AudioNode::channelInterpretation):
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::tracker):
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::WebSocket):
(WebCore::WebSocket::didConnect):
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::subprotocol):
(WebCore::WebSocketChannel::extensions):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::supportsPressAction):
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postTextStateChangePlatformNotification):
* css/CSSPropertySourceData.cpp:
(WebCore::CSSPropertySourceData::CSSPropertySourceData):
* css/PageRuleCollector.cpp:
(WebCore::PageRuleCollector::pageName):
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority):
* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker):
* dom/Element.cpp:
(WebCore::Element::setPrefix):
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
(WebCore::AlternativeTextController::markerDescriptionForAppliedAlternativeText):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::removeNodeAttribute):
(WebCore::CompositeEditCommand::moveParagraphs):
* editing/InsertTextCommand.cpp:
(WebCore::InsertTextCommand::positionInsideTextNode):
* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::deleteSelection):
(WebCore::TypingCommand::deleteKeyPressed):
(WebCore::TypingCommand::forwardDeleteKeyPressed):
(WebCore::TypingCommand::insertLineBreak):
(WebCore::TypingCommand::insertParagraphSeparator):
* editing/cocoa/EditorCocoa.mm:
(WebCore::Editor::styleForSelectionStart):
* editing/mac/EditorMac.mm:
(WebCore::Editor::stringSelectionForPasteboard):
(WebCore::Editor::stringSelectionForPasteboardWithImageAltText):
* fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::FileReaderLoader):
* html/FileInputType.cpp:
(WebCore::FileInputType::appendFormData):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::getCurrentMediaControlsStatus):
* html/HTMLOutputElement.cpp:
(WebCore::HTMLOutputElement::HTMLOutputElement):
* html/SearchInputType.cpp:
(WebCore::SearchInputType::handleKeydownEvent):
* html/TextFieldInputType.cpp:
(WebCore::autoFillButtonTypeToAccessibilityLabel):
* html/canvas/WebGLDebugShaders.cpp:
(WebCore::WebGLDebugShaders::getTranslatedShaderSource):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::dispatchContextLostEvent):
(WebCore::WebGLRenderingContextBase::maybeRestoreContext):
* html/canvas/WebGLShader.cpp:
(WebCore::WebGLShader::WebGLShader):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlStatusDisplayElement::update):
* html/track/TextTrack.cpp:
(WebCore::TextTrack::captionMenuOffItem):
(WebCore::TextTrack::captionMenuAutomaticItem):
* html/track/VTTRegion.cpp:
(WebCore::VTTRegion::scroll):
* html/track/VTTRegion.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::toErrorString):
(WebCore::InspectorDOMAgent::resolveNode):
(WebCore::InspectorDOMAgent::documentURLString):
(WebCore::documentBaseURLString):
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::domTypeName):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::localizedStringsURL):
* inspector/InspectorHistory.cpp:
(WebCore::InspectorHistory::Action::mergeId):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::reload):
(WebCore::InspectorPageAgent::frameId):
(WebCore::InspectorPageAgent::loaderId):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::ruleSelector):
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::referrer):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::clearFailedLoadURL):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didReceiveResponse):
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected):
* page/FrameTree.cpp:
(WebCore::FrameTree::setName):
(WebCore::FrameTree::clearName):
* page/Location.cpp:
(WebCore::Location::port):
* platform/network/ProtectionSpaceBase.cpp:
(WebCore::ProtectionSpaceBase::ProtectionSpaceBase):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::handleElementAttributes):

Source/WTF:

* wtf/text/AtomicString.cpp:
(WTF::AtomicString::convertASCIICase):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (203321 => 203322)


--- trunk/Source/WTF/ChangeLog	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WTF/ChangeLog	2016-07-16 04:51:45 UTC (rev 203322)
@@ -1,5 +1,17 @@
 2016-07-15  Chris Dumez  <[email protected]>
 
+        Use emptyString() / nullAtom when possible
+        https://bugs.webkit.org/show_bug.cgi?id=159850
+
+        Reviewed by Ryosuke Niwa.
+
+        Use emptyString() / nullAtom when possible, for performance.
+
+        * wtf/text/AtomicString.cpp:
+        (WTF::AtomicString::convertASCIICase):
+
+2016-07-15  Chris Dumez  <[email protected]>
+
         Unreviewed, rolling out r203304.
 
         This is wrong because of Node* entries in the internal HashMap

Modified: trunk/Source/WTF/wtf/text/AtomicString.cpp (203321 => 203322)


--- trunk/Source/WTF/wtf/text/AtomicString.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WTF/wtf/text/AtomicString.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -37,7 +37,7 @@
 {
     StringImpl* impl = this->impl();
     if (UNLIKELY(!impl))
-        return AtomicString();
+        return nullAtom;
 
     // Convert short strings without allocating a new StringImpl, since
     // there's a good chance these strings are already in the atomic

Modified: trunk/Source/WebCore/ChangeLog (203321 => 203322)


--- trunk/Source/WebCore/ChangeLog	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/ChangeLog	2016-07-16 04:51:45 UTC (rev 203322)
@@ -1,3 +1,121 @@
+2016-07-15  Chris Dumez  <[email protected]>
+
+        Use emptyString() / nullAtom when possible
+        https://bugs.webkit.org/show_bug.cgi?id=159850
+
+        Reviewed by Ryosuke Niwa.
+
+        Use emptyString() / nullAtom when possible, for performance.
+
+        * Modules/webaudio/AudioNode.cpp:
+        (WebCore::AudioNode::channelCountMode):
+        (WebCore::AudioNode::channelInterpretation):
+        * Modules/webdatabase/DatabaseTracker.cpp:
+        (WebCore::DatabaseTracker::tracker):
+        * Modules/websockets/WebSocket.cpp:
+        (WebCore::WebSocket::WebSocket):
+        (WebCore::WebSocket::didConnect):
+        * Modules/websockets/WebSocketChannel.cpp:
+        (WebCore::WebSocketChannel::subprotocol):
+        (WebCore::WebSocketChannel::extensions):
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::supportsPressAction):
+        * accessibility/mac/AXObjectCacheMac.mm:
+        (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
+        * css/CSSPropertySourceData.cpp:
+        (WebCore::CSSPropertySourceData::CSSPropertySourceData):
+        * css/PageRuleCollector.cpp:
+        (WebCore::PageRuleCollector::pageName):
+        * css/PropertySetCSSStyleDeclaration.cpp:
+        (WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority):
+        * dom/DocumentMarkerController.cpp:
+        (WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker):
+        * dom/Element.cpp:
+        (WebCore::Element::setPrefix):
+        * editing/AlternativeTextController.cpp:
+        (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
+        (WebCore::AlternativeTextController::markerDescriptionForAppliedAlternativeText):
+        * editing/CompositeEditCommand.cpp:
+        (WebCore::CompositeEditCommand::removeNodeAttribute):
+        (WebCore::CompositeEditCommand::moveParagraphs):
+        * editing/InsertTextCommand.cpp:
+        (WebCore::InsertTextCommand::positionInsideTextNode):
+        * editing/TextCheckingHelper.cpp:
+        (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
+        * editing/TypingCommand.cpp:
+        (WebCore::TypingCommand::deleteSelection):
+        (WebCore::TypingCommand::deleteKeyPressed):
+        (WebCore::TypingCommand::forwardDeleteKeyPressed):
+        (WebCore::TypingCommand::insertLineBreak):
+        (WebCore::TypingCommand::insertParagraphSeparator):
+        * editing/cocoa/EditorCocoa.mm:
+        (WebCore::Editor::styleForSelectionStart):
+        * editing/mac/EditorMac.mm:
+        (WebCore::Editor::stringSelectionForPasteboard):
+        (WebCore::Editor::stringSelectionForPasteboardWithImageAltText):
+        * fileapi/FileReaderLoader.cpp:
+        (WebCore::FileReaderLoader::FileReaderLoader):
+        * html/FileInputType.cpp:
+        (WebCore::FileInputType::appendFormData):
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::getCurrentMediaControlsStatus):
+        * html/HTMLOutputElement.cpp:
+        (WebCore::HTMLOutputElement::HTMLOutputElement):
+        * html/SearchInputType.cpp:
+        (WebCore::SearchInputType::handleKeydownEvent):
+        * html/TextFieldInputType.cpp:
+        (WebCore::autoFillButtonTypeToAccessibilityLabel):
+        * html/canvas/WebGLDebugShaders.cpp:
+        (WebCore::WebGLDebugShaders::getTranslatedShaderSource):
+        * html/canvas/WebGLRenderingContextBase.cpp:
+        (WebCore::WebGLRenderingContextBase::dispatchContextLostEvent):
+        (WebCore::WebGLRenderingContextBase::maybeRestoreContext):
+        * html/canvas/WebGLShader.cpp:
+        (WebCore::WebGLShader::WebGLShader):
+        * html/shadow/MediaControlElements.cpp:
+        (WebCore::MediaControlStatusDisplayElement::update):
+        * html/track/TextTrack.cpp:
+        (WebCore::TextTrack::captionMenuOffItem):
+        (WebCore::TextTrack::captionMenuAutomaticItem):
+        * html/track/VTTRegion.cpp:
+        (WebCore::VTTRegion::scroll):
+        * html/track/VTTRegion.h:
+        * inspector/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::toErrorString):
+        (WebCore::InspectorDOMAgent::resolveNode):
+        (WebCore::InspectorDOMAgent::documentURLString):
+        (WebCore::documentBaseURLString):
+        * inspector/InspectorDOMDebuggerAgent.cpp:
+        (WebCore::domTypeName):
+        * inspector/InspectorFrontendHost.cpp:
+        (WebCore::InspectorFrontendHost::localizedStringsURL):
+        * inspector/InspectorHistory.cpp:
+        (WebCore::InspectorHistory::Action::mergeId):
+        * inspector/InspectorPageAgent.cpp:
+        (WebCore::InspectorPageAgent::reload):
+        (WebCore::InspectorPageAgent::frameId):
+        (WebCore::InspectorPageAgent::loaderId):
+        * inspector/InspectorStyleSheet.cpp:
+        (WebCore::InspectorStyleSheet::ruleSelector):
+        * loader/EmptyClients.h:
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::referrer):
+        * loader/ImageLoader.cpp:
+        (WebCore::ImageLoader::clearFailedLoadURL):
+        * loader/ResourceLoader.cpp:
+        (WebCore::ResourceLoader::didReceiveResponse):
+        * page/ContextMenuController.cpp:
+        (WebCore::ContextMenuController::contextMenuItemSelected):
+        * page/FrameTree.cpp:
+        (WebCore::FrameTree::setName):
+        (WebCore::FrameTree::clearName):
+        * page/Location.cpp:
+        (WebCore::Location::port):
+        * platform/network/ProtectionSpaceBase.cpp:
+        (WebCore::ProtectionSpaceBase::ProtectionSpaceBase):
+        * xml/parser/XMLDocumentParserLibxml2.cpp:
+        (WebCore::handleElementAttributes):
+
 2016-07-15  Simon Fraser  <[email protected]>
 
         Repaints rects drawn incorrectly when inspecting a WebView on a Retina display

Modified: trunk/Source/WebCore/Modules/webaudio/AudioNode.cpp (203321 => 203322)


--- trunk/Source/WebCore/Modules/webaudio/AudioNode.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/Modules/webaudio/AudioNode.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -220,14 +220,14 @@
 {
     switch (m_channelCountMode) {
     case Max:
-        return "max";
+        return ASCIILiteral("max");
     case ClampedMax:
-        return "clamped-max";
+        return ASCIILiteral("clamped-max");
     case Explicit:
-        return "explicit";
+        return ASCIILiteral("explicit");
     }
     ASSERT_NOT_REACHED();
-    return "";
+    return emptyString();
 }
 
 void AudioNode::setChannelCountMode(const String& mode, ExceptionCode& ec)
@@ -254,12 +254,12 @@
 {
     switch (m_channelInterpretation) {
     case AudioBus::Speakers:
-        return "speakers";
+        return ASCIILiteral("speakers");
     case AudioBus::Discrete:
-        return "discrete";
+        return ASCIILiteral("discrete");
     }
     ASSERT_NOT_REACHED();
-    return "";
+    return emptyString();
 }
 
 void AudioNode::setChannelInterpretation(const String& interpretation, ExceptionCode& ec)

Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp (203321 => 203322)


--- trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -76,7 +76,7 @@
 DatabaseTracker& DatabaseTracker::tracker()
 {
     if (!staticTracker)
-        staticTracker = new DatabaseTracker("");
+        staticTracker = new DatabaseTracker(emptyString());
 
     return *staticTracker;
 }

Modified: trunk/Source/WebCore/Modules/websockets/WebSocket.cpp (203321 => 203322)


--- trunk/Source/WebCore/Modules/websockets/WebSocket.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/Modules/websockets/WebSocket.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -150,8 +150,8 @@
     , m_bufferedAmount(0)
     , m_bufferedAmountAfterClose(0)
     , m_binaryType(BinaryTypeBlob)
-    , m_subprotocol("")
-    , m_extensions("")
+    , m_subprotocol(emptyString())
+    , m_extensions(emptyString())
     , m_resumeTimer(*this, &WebSocket::resumeTimerFired)
 {
 }
@@ -560,7 +560,7 @@
 {
     LOG(Network, "WebSocket %p didConnect()", this);
     if (m_state != CONNECTING) {
-        didClose(0, ClosingHandshakeIncomplete, WebSocketChannel::CloseEventCodeAbnormalClosure, "");
+        didClose(0, ClosingHandshakeIncomplete, WebSocketChannel::CloseEventCodeAbnormalClosure, emptyString());
         return;
     }
     ASSERT(scriptExecutionContext());

Modified: trunk/Source/WebCore/Modules/websockets/WebSocketChannel.cpp (203321 => 203322)


--- trunk/Source/WebCore/Modules/websockets/WebSocketChannel.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/Modules/websockets/WebSocketChannel.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -109,10 +109,10 @@
 {
     LOG(Network, "WebSocketChannel %p subprotocol()", this);
     if (!m_handshake || m_handshake->mode() != WebSocketHandshake::Connected)
-        return "";
+        return emptyString();
     String serverProtocol = m_handshake->serverWebSocketProtocol();
     if (serverProtocol.isNull())
-        return "";
+        return emptyString();
     return serverProtocol;
 }
 
@@ -120,10 +120,10 @@
 {
     LOG(Network, "WebSocketChannel %p extensions()", this);
     if (!m_handshake || m_handshake->mode() != WebSocketHandshake::Connected)
-        return "";
+        return emptyString();
     String extensions = m_handshake->acceptedExtensions();
     if (extensions.isNull())
-        return "";
+        return emptyString();
     return extensions;
 }
 

Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (203321 => 203322)


--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -2217,7 +2217,7 @@
             // Search within for immediate descendants that are static text. If we find more than one
             // then this is an event delegator actionElement and we should expose the press action.
             Vector<AccessibilitySearchKey> keys({ StaticTextSearchKey, ControlSearchKey, GraphicSearchKey, HeadingSearchKey, LinkSearchKey });
-            AccessibilitySearchCriteria criteria(axObj, SearchDirectionNext, "", 2, false, false);
+            AccessibilitySearchCriteria criteria(axObj, SearchDirectionNext, emptyString(), 2, false, false);
             criteria.searchKeys = keys;
             axObj->findMatchingObjects(&criteria, results);
             if (results.size() > 1)

Modified: trunk/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm (203321 => 203322)


--- trunk/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm	2016-07-16 04:51:45 UTC (rev 203322)
@@ -429,7 +429,7 @@
     if (!text.length())
         return;
 
-    postTextReplacementPlatformNotification(object, AXTextEditTypeUnknown, "", type, text, position);
+    postTextReplacementPlatformNotification(object, AXTextEditTypeUnknown, emptyString(), type, text, position);
 }
 
 void AXObjectCache::postTextReplacementPlatformNotification(AccessibilityObject* object, AXTextEditType deletionType, const String& deletedText, AXTextEditType insertionType, const String& insertedText, const VisiblePosition& position)

Modified: trunk/Source/WebCore/css/CSSPropertySourceData.cpp (203321 => 203322)


--- trunk/Source/WebCore/css/CSSPropertySourceData.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/css/CSSPropertySourceData.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -74,8 +74,8 @@
 }
 
 CSSPropertySourceData::CSSPropertySourceData()
-    : name("")
-    , value("")
+    : name(emptyString())
+    , value(emptyString())
     , important(false)
     , parsedOk(false)
     , range(SourceRange(0, 0))

Modified: trunk/Source/WebCore/css/PageRuleCollector.cpp (203321 => 203322)


--- trunk/Source/WebCore/css/PageRuleCollector.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/css/PageRuleCollector.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -58,7 +58,7 @@
 String PageRuleCollector::pageName(int /* pageIndex */) const
 {
     // FIXME: Implement page index to page name mapping.
-    return "";
+    return emptyString();
 }
 
 void PageRuleCollector::matchAllPageRules(int pageIndex)

Modified: trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp (203321 => 203322)


--- trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -189,12 +189,12 @@
 String PropertySetCSSStyleDeclaration::getPropertyPriority(const String& propertyName)
 {
     if (isCustomPropertyName(propertyName))
-        return m_propertySet->customPropertyIsImportant(propertyName) ? "important" : "";
+        return m_propertySet->customPropertyIsImportant(propertyName) ? ASCIILiteral("important") : emptyString();
 
     CSSPropertyID propertyID = cssPropertyID(propertyName);
     if (!propertyID)
         return String();
-    return m_propertySet->propertyIsImportant(propertyID) ? "important" : "";
+    return m_propertySet->propertyIsImportant(propertyID) ? ASCIILiteral("important") : emptyString();
 }
 
 String PropertySetCSSStyleDeclaration::getPropertyShorthand(const String& propertyName)

Modified: trunk/Source/WebCore/dom/DocumentMarkerController.cpp (203321 => 203322)


--- trunk/Source/WebCore/dom/DocumentMarkerController.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/dom/DocumentMarkerController.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -118,7 +118,7 @@
     size_t numberOfAlternatives = interpretations.size() - 1;
     for (TextIterator markedText(range); !markedText.atEnd(); markedText.advance()) {
         RefPtr<Range> textPiece = markedText.range();
-        DocumentMarker marker(DocumentMarker::DictationPhraseWithAlternatives, textPiece->startOffset(), textPiece->endOffset(), "", Vector<String>(numberOfAlternatives), RetainPtr<id>());
+        DocumentMarker marker(DocumentMarker::DictationPhraseWithAlternatives, textPiece->startOffset(), textPiece->endOffset(), emptyString(), Vector<String>(numberOfAlternatives), RetainPtr<id>());
         for (size_t i = 0; i < numberOfAlternatives; ++i)
             marker.setAlternative(interpretations[i + 1], i);
         addMarker(&textPiece->startContainer(), marker);

Modified: trunk/Source/WebCore/dom/Element.cpp (203321 => 203322)


--- trunk/Source/WebCore/dom/Element.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/dom/Element.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -1503,7 +1503,7 @@
     if (ec)
         return;
 
-    m_tagName.setPrefix(prefix.isEmpty() ? AtomicString() : prefix);
+    m_tagName.setPrefix(prefix.isEmpty() ? nullAtom : prefix);
 }
 
 const AtomicString& Element::imageSourceURL() const

Modified: trunk/Source/WebCore/editing/AlternativeTextController.cpp (203321 => 203322)


--- trunk/Source/WebCore/editing/AlternativeTextController.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/editing/AlternativeTextController.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -640,7 +640,7 @@
     switch (marker.type()) {
     case DocumentMarker::Spelling:
         m_alternativeTextInfo.rangeWithAlternative = wordRange;
-        m_alternativeTextInfo.details = AutocorrectionAlternativeDetails::create("");
+        m_alternativeTextInfo.details = AutocorrectionAlternativeDetails::create(emptyString());
         startAlternativeTextUITimer(AlternativeTextTypeSpellingSuggestions);
         break;
     case DocumentMarker::Replacement:
@@ -671,7 +671,7 @@
 
     if (alternativeTextType != AlternativeTextTypeReversion && alternativeTextType != AlternativeTextTypeDictationAlternatives && (markerType == DocumentMarker::Replacement || markerType == DocumentMarker::Autocorrected))
         return m_alternativeTextInfo.originalText;
-    return "";
+    return emptyString();
 }
 
 #endif

Modified: trunk/Source/WebCore/editing/CompositeEditCommand.cpp (203321 => 203322)


--- trunk/Source/WebCore/editing/CompositeEditCommand.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/editing/CompositeEditCommand.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -781,7 +781,7 @@
 
 void CompositeEditCommand::removeNodeAttribute(PassRefPtr<Element> element, const QualifiedName& attribute)
 {
-    setNodeAttribute(element, attribute, AtomicString());
+    setNodeAttribute(element, attribute, nullAtom);
 }
 
 void CompositeEditCommand::setNodeAttribute(PassRefPtr<Element> element, const QualifiedName& attribute, const AtomicString& value)
@@ -1390,7 +1390,7 @@
     RefPtr<DocumentFragment> fragment;
     // This used to use a ternary for initialization, but that confused some versions of GCC, see bug 37912
     if (startOfParagraphToMove != endOfParagraphToMove)
-        fragment = createFragmentFromMarkup(document(), createMarkup(*range, 0, DoNotAnnotateForInterchange, true), "");
+        fragment = createFragmentFromMarkup(document(), createMarkup(*range, 0, DoNotAnnotateForInterchange, true), emptyString());
 
     // A non-empty paragraph's style is moved when we copy and move it.  We don't move 
     // anything if we're given an empty paragraph, but an empty paragraph can have style

Modified: trunk/Source/WebCore/editing/InsertTextCommand.cpp (203321 => 203322)


--- trunk/Source/WebCore/editing/InsertTextCommand.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/editing/InsertTextCommand.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -58,7 +58,7 @@
 {
     Position pos = p;
     if (isTabSpanTextNode(pos.anchorNode())) {
-        RefPtr<Node> textNode = document().createEditingTextNode("");
+        RefPtr<Node> textNode = document().createEditingTextNode(emptyString());
         insertNodeAtTabSpanPosition(textNode.get(), pos);
         return firstPositionInNode(textNode.get());
     }
@@ -66,7 +66,7 @@
     // Prepare for text input by looking at the specified position.
     // It may be necessary to insert a text node to receive characters.
     if (!pos.containerNode()->isTextNode()) {
-        RefPtr<Node> textNode = document().createEditingTextNode("");
+        RefPtr<Node> textNode = document().createEditingTextNode(emptyString());
         insertNodeAt(textNode.get(), pos);
         return firstPositionInNode(textNode.get());
     }

Modified: trunk/Source/WebCore/editing/TextCheckingHelper.cpp (203321 => 203322)


--- trunk/Source/WebCore/editing/TextCheckingHelper.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/editing/TextCheckingHelper.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -301,7 +301,7 @@
 String TextCheckingHelper::findFirstMisspellingOrBadGrammar(bool checkGrammar, bool& outIsSpelling, int& outFirstFoundOffset, GrammarDetail& outGrammarDetail)
 {
     if (!unifiedTextCheckerEnabled())
-        return "";
+        return emptyString();
 
     String firstFoundItem;
     String misspelledWord;

Modified: trunk/Source/WebCore/editing/TypingCommand.cpp (203321 => 203322)


--- trunk/Source/WebCore/editing/TypingCommand.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/editing/TypingCommand.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -106,7 +106,7 @@
         return;
     }
 
-    TypingCommand::create(document, DeleteSelection, "", options)->apply();
+    TypingCommand::create(document, DeleteSelection, emptyString(), options)->apply();
 }
 
 void TypingCommand::deleteKeyPressed(Document& document, Options options, TextGranularity granularity)
@@ -120,7 +120,7 @@
         }
     }
 
-    TypingCommand::create(document, DeleteKey, "", options, granularity)->apply();
+    TypingCommand::create(document, DeleteKey, emptyString(), options, granularity)->apply();
 }
 
 void TypingCommand::forwardDeleteKeyPressed(Document& document, Options options, TextGranularity granularity)
@@ -136,7 +136,7 @@
         }
     }
 
-    TypingCommand::create(document, ForwardDeleteKey, "", options, granularity)->apply();
+    TypingCommand::create(document, ForwardDeleteKey, emptyString(), options, granularity)->apply();
 }
 
 void TypingCommand::updateSelectionIfDifferentFromCurrentSelection(TypingCommand* typingCommand, Frame* frame)
@@ -199,7 +199,7 @@
         return;
     }
 
-    applyCommand(TypingCommand::create(document, InsertLineBreak, "", options));
+    applyCommand(TypingCommand::create(document, InsertLineBreak, emptyString(), options));
 }
 
 void TypingCommand::insertParagraphSeparatorInQuotedContent(Document& document)
@@ -220,7 +220,7 @@
         return;
     }
 
-    applyCommand(TypingCommand::create(document, InsertParagraphSeparator, "", options));
+    applyCommand(TypingCommand::create(document, InsertParagraphSeparator, emptyString(), options));
 }
 
 RefPtr<TypingCommand> TypingCommand::lastTypingCommandIfStillOpenForTyping(Frame& frame)

Modified: trunk/Source/WebCore/editing/cocoa/EditorCocoa.mm (203321 => 203322)


--- trunk/Source/WebCore/editing/cocoa/EditorCocoa.mm	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/editing/cocoa/EditorCocoa.mm	2016-07-16 04:51:45 UTC (rev 203322)
@@ -61,7 +61,7 @@
     String styleText = typingStyle->style()->asText() + " display: inline";
     styleElement->setAttribute(HTMLNames::styleAttr, styleText);
 
-    styleElement->appendChild(frame->document()->createEditingTextNode(""), ASSERT_NO_EXCEPTION);
+    styleElement->appendChild(frame->document()->createEditingTextNode(emptyString()), ASSERT_NO_EXCEPTION);
 
     ContainerNode* parentNode = position.deprecatedNode()->parentNode();
 

Modified: trunk/Source/WebCore/editing/mac/EditorMac.mm (203321 => 203322)


--- trunk/Source/WebCore/editing/mac/EditorMac.mm	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/editing/mac/EditorMac.mm	2016-07-16 04:51:45 UTC (rev 203322)
@@ -288,7 +288,7 @@
 String Editor::stringSelectionForPasteboard()
 {
     if (!canCopy())
-        return "";
+        return emptyString();
     String text = selectedText();
     text.replace(noBreakSpace, ' ');
     return text;
@@ -297,7 +297,7 @@
 String Editor::stringSelectionForPasteboardWithImageAltText()
 {
     if (!canCopy())
-        return "";
+        return emptyString();
     String text = selectedTextForDataTransfer();
     text.replace(noBreakSpace, ' ');
     return text;

Modified: trunk/Source/WebCore/fileapi/FileReaderLoader.cpp (203321 => 203322)


--- trunk/Source/WebCore/fileapi/FileReaderLoader.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/fileapi/FileReaderLoader.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -56,7 +56,7 @@
     : m_readType(readType)
     , m_client(client)
     , m_isRawDataConverted(false)
-    , m_stringResult("")
+    , m_stringResult(emptyString())
     , m_variableLength(false)
     , m_bytesLoaded(0)
     , m_totalBytes(0)

Modified: trunk/Source/WebCore/html/FileInputType.cpp (203321 => 203322)


--- trunk/Source/WebCore/html/FileInputType.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/html/FileInputType.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -150,7 +150,7 @@
     // If no filename at all is entered, return successful but empty.
     // Null would be more logical, but Netscape posts an empty file. Argh.
     if (!numFiles) {
-        encoding.appendBlob(element().name(), File::create(""));
+        encoding.appendBlob(element().name(), File::create(emptyString()));
         return true;
     }
 

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (203321 => 203322)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -6715,11 +6715,11 @@
     JSC::JSObject* controllerObject = controllerValue.toObject(exec);
 
     if (exec->hadException())
-        return "";
+        return emptyString();
 
     JSC::JSValue functionValue = controllerObject->get(exec, JSC::Identifier::fromString(exec, "getCurrentControlsStatus"));
     if (exec->hadException() || functionValue.isUndefinedOrNull())
-        return "";
+        return emptyString();
 
     JSC::JSObject* function = functionValue.toObject(exec);
     ASSERT(!exec->hadException());
@@ -6727,12 +6727,12 @@
     JSC::CallType callType = function->methodTable()->getCallData(function, callData);
     JSC::MarkedArgumentBuffer argList;
     if (callType == JSC::CallType::None)
-        return "";
+        return emptyString();
 
     JSC::JSValue outputValue = JSC::call(exec, function, callType, callData, controllerObject, argList);
 
     if (exec->hadException())
-        return "";
+        return emptyString();
 
     return outputValue.getString(exec);
 }

Modified: trunk/Source/WebCore/html/HTMLOutputElement.cpp (203321 => 203322)


--- trunk/Source/WebCore/html/HTMLOutputElement.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/html/HTMLOutputElement.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -44,7 +44,7 @@
     : HTMLFormControlElement(tagName, document, form)
     , m_isDefaultValueMode(true)
     , m_isSetTextContentInProgress(false)
-    , m_defaultValue("")
+    , m_defaultValue(emptyString())
 {
 }
 

Modified: trunk/Source/WebCore/html/SearchInputType.cpp (203321 => 203322)


--- trunk/Source/WebCore/html/SearchInputType.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/html/SearchInputType.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -137,7 +137,7 @@
     const String& key = event->keyIdentifier();
     if (key == "U+001B") {
         Ref<HTMLInputElement> input(this->element());
-        input->setValueForUser("");
+        input->setValueForUser(emptyString());
         input->onSearch();
         event->setDefaultHandled();
         return;

Modified: trunk/Source/WebCore/html/TextFieldInputType.cpp (203321 => 203322)


--- trunk/Source/WebCore/html/TextFieldInputType.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/html/TextFieldInputType.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -411,7 +411,7 @@
     default:
     case AutoFillButtonType::None:
         ASSERT_NOT_REACHED();
-        return AtomicString();
+        return String();
     }
 }
     

Modified: trunk/Source/WebCore/html/canvas/WebGLDebugShaders.cpp (203321 => 203322)


--- trunk/Source/WebCore/html/canvas/WebGLDebugShaders.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/html/canvas/WebGLDebugShaders.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -54,7 +54,7 @@
     if (m_context->isContextLost())
         return String();
     if (!m_context->validateWebGLObject("getTranslatedShaderSource", shader))
-        return "";
+        return emptyString();
     return m_context->graphicsContext3D()->getExtensions()->getTranslatedShaderSourceANGLE(shader->object());
 }
 

Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (203321 => 203322)


--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -4740,7 +4740,7 @@
 
 void WebGLRenderingContextBase::dispatchContextLostEvent()
 {
-    Ref<WebGLContextEvent> event = WebGLContextEvent::create(eventNames().webglcontextlostEvent, false, true, "");
+    Ref<WebGLContextEvent> event = WebGLContextEvent::create(eventNames().webglcontextlostEvent, false, true, emptyString());
     canvas()->dispatchEvent(event);
     m_restoreAllowed = event->defaultPrevented();
     if (m_contextLostMode == RealLostContext && m_restoreAllowed)
@@ -4821,7 +4821,7 @@
     setupFlags();
     initializeNewContext();
     initializeVertexArrayObjects();
-    canvas()->dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextrestoredEvent, false, true, ""));
+    canvas()->dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextrestoredEvent, false, true, emptyString()));
 }
 
 String WebGLRenderingContextBase::ensureNotNull(const String& text) const

Modified: trunk/Source/WebCore/html/canvas/WebGLShader.cpp (203321 => 203322)


--- trunk/Source/WebCore/html/canvas/WebGLShader.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/html/canvas/WebGLShader.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -42,7 +42,7 @@
 WebGLShader::WebGLShader(WebGLRenderingContextBase* ctx, GC3Denum type)
     : WebGLSharedObject(ctx)
     , m_type(type)
-    , m_source("")
+    , m_source(emptyString())
     , m_isValid(false)
 {
     setObject(ctx->graphicsContext3D()->createShader(type));

Modified: trunk/Source/WebCore/html/shadow/MediaControlElements.cpp (203321 => 203322)


--- trunk/Source/WebCore/html/shadow/MediaControlElements.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/html/shadow/MediaControlElements.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -388,7 +388,7 @@
 
     switch (m_stateBeingDisplayed) {
     case Nothing:
-        setInnerText("", IGNORE_EXCEPTION);
+        setInnerText(emptyString(), IGNORE_EXCEPTION);
         break;
     case Loading:
         setInnerText(mediaElementLoadingStateText(), IGNORE_EXCEPTION);

Modified: trunk/Source/WebCore/html/track/TextTrack.cpp (203321 => 203322)


--- trunk/Source/WebCore/html/track/TextTrack.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/html/track/TextTrack.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -85,13 +85,13 @@
 
 TextTrack* TextTrack::captionMenuOffItem()
 {
-    static TextTrack& off = TextTrack::create(0, 0, "off menu item", "", "", "").leakRef();
+    static TextTrack& off = TextTrack::create(0, 0, "off menu item", emptyAtom, emptyAtom, emptyAtom).leakRef();
     return &off;
 }
 
 TextTrack* TextTrack::captionMenuAutomaticItem()
 {
-    static TextTrack& automatic = TextTrack::create(0, 0, "automatic menu item", "", "", "").leakRef();
+    static TextTrack& automatic = TextTrack::create(0, 0, "automatic menu item", emptyAtom, emptyAtom, emptyAtom).leakRef();
     return &automatic;
 }
 

Modified: trunk/Source/WebCore/html/track/VTTRegion.cpp (203321 => 203322)


--- trunk/Source/WebCore/html/track/VTTRegion.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/html/track/VTTRegion.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -186,7 +186,7 @@
     m_viewportAnchor.setY(value);
 }
 
-const AtomicString VTTRegion::scroll() const
+const AtomicString& VTTRegion::scroll() const
 {
     static NeverDestroyed<const AtomicString> upScrollValueKeyword("up", AtomicString::ConstructFromLiteral);
 
@@ -193,7 +193,7 @@
     if (m_scroll)
         return upScrollValueKeyword;
 
-    return "";
+    return emptyAtom;
 }
 
 void VTTRegion::setScroll(const AtomicString& value, ExceptionCode& ec)

Modified: trunk/Source/WebCore/html/track/VTTRegion.h (203321 => 203322)


--- trunk/Source/WebCore/html/track/VTTRegion.h	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/html/track/VTTRegion.h	2016-07-16 04:51:45 UTC (rev 203322)
@@ -79,7 +79,7 @@
     double viewportAnchorY() const { return m_viewportAnchor.y(); }
     void setViewportAnchorY(double, ExceptionCode&);
 
-    const AtomicString scroll() const;
+    const AtomicString& scroll() const;
     void setScroll(const AtomicString&, ExceptionCode&);
 
     void updateParametersFromRegion(VTTRegion*);

Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (203321 => 203322)


--- trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -206,7 +206,7 @@
         ExceptionCodeDescription description(ec);
         return description.name;
     }
-    return "";
+    return emptyString();
 }
 
 InspectorDOMAgent::InspectorDOMAgent(WebAgentContext& context, InspectorPageAgent* pageAgent, InspectorOverlay* overlay)
@@ -1221,7 +1221,7 @@
 
 void InspectorDOMAgent::resolveNode(ErrorString& errorString, int nodeId, const String* const objectGroup, RefPtr<Inspector::Protocol::Runtime::RemoteObject>& result)
 {
-    String objectGroupName = objectGroup ? *objectGroup : "";
+    String objectGroupName = objectGroup ? *objectGroup : emptyString();
     Node* node = nodeForId(nodeId);
     if (!node) {
         errorString = ASCIILiteral("No node with given id found");
@@ -1257,13 +1257,13 @@
 String InspectorDOMAgent::documentURLString(Document* document)
 {
     if (!document || document->url().isNull())
-        return "";
+        return emptyString();
     return document->url().string();
 }
 
 static String documentBaseURLString(Document* document)
 {
-    return document->completeURL("").string();
+    return document->completeURL(emptyString()).string();
 }
 
 static bool pseudoElementType(PseudoId pseudoId, Inspector::Protocol::DOM::PseudoType* type)

Modified: trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp (203321 => 203322)


--- trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -213,12 +213,12 @@
 static String domTypeName(int type)
 {
     switch (type) {
-    case SubtreeModified: return "subtree-modified";
-    case AttributeModified: return "attribute-modified";
-    case NodeRemoved: return "node-removed";
+    case SubtreeModified: return ASCIILiteral("subtree-modified");
+    case AttributeModified: return ASCIILiteral("attribute-modified");
+    case NodeRemoved: return ASCIILiteral("node-removed");
     default: break;
     }
-    return "";
+    return emptyString();
 }
 
 void InspectorDOMDebuggerAgent::setDOMBreakpoint(ErrorString& errorString, int nodeId, const String& typeString)

Modified: trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp (203321 => 203322)


--- trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -222,7 +222,7 @@
 
 String InspectorFrontendHost::localizedStringsURL()
 {
-    return m_client ? m_client->localizedStringsURL() : "";
+    return m_client ? m_client->localizedStringsURL() : emptyString();
 }
 
 String InspectorFrontendHost::debuggableType()

Modified: trunk/Source/WebCore/inspector/InspectorHistory.cpp (203321 => 203322)


--- trunk/Source/WebCore/inspector/InspectorHistory.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/inspector/InspectorHistory.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -73,7 +73,7 @@
 
 String InspectorHistory::Action::mergeId()
 {
-    return "";
+    return emptyString();
 }
 
 void InspectorHistory::Action::merge(std::unique_ptr<Action>)

Modified: trunk/Source/WebCore/inspector/InspectorPageAgent.cpp (203321 => 203322)


--- trunk/Source/WebCore/inspector/InspectorPageAgent.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/inspector/InspectorPageAgent.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -419,7 +419,7 @@
 
 void InspectorPageAgent::reload(ErrorString&, const bool* const optionalIgnoreCache, const String* optionalScriptToEvaluateOnLoad)
 {
-    m_pendingScriptToEvaluateOnLoadOnce = optionalScriptToEvaluateOnLoad ? *optionalScriptToEvaluateOnLoad : "";
+    m_pendingScriptToEvaluateOnLoadOnce = optionalScriptToEvaluateOnLoad ? *optionalScriptToEvaluateOnLoad : emptyString();
     m_page.mainFrame().loader().reload(optionalIgnoreCache ? *optionalIgnoreCache : false);
 }
 
@@ -766,7 +766,7 @@
 String InspectorPageAgent::frameId(Frame* frame)
 {
     if (!frame)
-        return "";
+        return emptyString();
     String identifier = m_frameToIdentifier.get(frame);
     if (identifier.isNull()) {
         identifier = IdentifiersFactory::createIdentifier();
@@ -784,7 +784,7 @@
 String InspectorPageAgent::loaderId(DocumentLoader* loader)
 {
     if (!loader)
-        return "";
+        return emptyString();
     String identifier = m_loaderToIdentifier.get(loader);
     if (identifier.isNull()) {
         identifier = IdentifiersFactory::createIdentifier();

Modified: trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp (203321 => 203322)


--- trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -636,7 +636,7 @@
     CSSStyleRule* rule = ruleForId(id);
     if (!rule) {
         ec = NOT_FOUND_ERR;
-        return "";
+        return emptyString();
     }
     return rule->selectorText();
 }

Modified: trunk/Source/WebCore/loader/EmptyClients.h (203321 => 203322)


--- trunk/Source/WebCore/loader/EmptyClients.h	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/loader/EmptyClients.h	2016-07-16 04:51:45 UTC (rev 203322)
@@ -350,7 +350,7 @@
     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 ""; }
+    String generatedMIMETypeForURLScheme(const String&) const override { return emptyString(); }
 
     void frameLoadCompleted() override { }
     void restoreViewState() override { }
@@ -362,7 +362,7 @@
     void updateCachedDocumentLoader(DocumentLoader&) override { }
     void setTitle(const StringWithDirection&, const URL&) override { }
 
-    String userAgent(const URL&) override { return ""; }
+    String userAgent(const URL&) override { return emptyString(); }
 
     void savePlatformDataToCachedFrame(CachedFrame*) override { }
     void transitionToCommittedFromCachedFrame(CachedFrame*) override { }

Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (203321 => 203322)


--- trunk/Source/WebCore/loader/FrameLoader.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -3466,7 +3466,7 @@
 
 String FrameLoader::referrer() const
 {
-    return m_documentLoader ? m_documentLoader->request().httpReferrer() : "";
+    return m_documentLoader ? m_documentLoader->request().httpReferrer() : emptyString();
 }
 
 void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()

Modified: trunk/Source/WebCore/loader/ImageLoader.cpp (203321 => 203322)


--- trunk/Source/WebCore/loader/ImageLoader.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/loader/ImageLoader.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -470,7 +470,7 @@
 
 inline void ImageLoader::clearFailedLoadURL()
 {
-    m_failedLoadURL = AtomicString();
+    m_failedLoadURL = nullAtom;
 }
 
 }

Modified: trunk/Source/WebCore/loader/ResourceLoader.cpp (203321 => 203322)


--- trunk/Source/WebCore/loader/ResourceLoader.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/loader/ResourceLoader.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -439,7 +439,7 @@
         if (!m_documentLoader->response().isHttpVersion0_9()) {
             String message = "Cancelled resource load from '" + url.string() + "' because it is using HTTP/0.9 and the document was loaded with a different HTTP version.";
             m_frame->document()->addConsoleMessage(MessageSource::Security, MessageLevel::Error, message, identifier());
-            ResourceError error("", 0, url, message);
+            ResourceError error(emptyString(), 0, url, message);
             didFail(error);
             return;
         }
@@ -446,7 +446,7 @@
         if (!isDefaultPortForProtocol(url.port(), url.protocol())) {
             String message = "Cancelled resource load from '" + url.string() + "' because it is using HTTP/0.9 on a non-default port.";
             m_frame->document()->addConsoleMessage(MessageSource::Security, MessageLevel::Error, message, identifier());
-            ResourceError error("", 0, url, message);
+            ResourceError error(emptyString(), 0, url, message);
             didFail(error);
             return;
         }

Modified: trunk/Source/WebCore/page/ContextMenuController.cpp (203321 => 203322)


--- trunk/Source/WebCore/page/ContextMenuController.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/page/ContextMenuController.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -370,7 +370,7 @@
 
             Document* document = frame->document();
             ASSERT(document);
-            RefPtr<ReplaceSelectionCommand> command = ReplaceSelectionCommand::create(*document, createFragmentFromMarkup(*document, title, ""), replaceOptions);
+            RefPtr<ReplaceSelectionCommand> command = ReplaceSelectionCommand::create(*document, createFragmentFromMarkup(*document, title, emptyString()), replaceOptions);
             applyCommand(command);
             frame->selection().revealSelection(SelectionRevealMode::Reveal, ScrollAlignment::alignToEdgeIfNeeded);
         }

Modified: trunk/Source/WebCore/page/FrameTree.cpp (203321 => 203322)


--- trunk/Source/WebCore/page/FrameTree.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/page/FrameTree.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -48,14 +48,14 @@
         m_uniqueName = name;
         return;
     }
-    m_uniqueName = AtomicString(); // Remove our old frame name so it's not considered in uniqueChildName.
+    m_uniqueName = nullAtom; // Remove our old frame name so it's not considered in uniqueChildName.
     m_uniqueName = parent()->tree().uniqueChildName(name);
 }
 
 void FrameTree::clearName()
 {
-    m_name = AtomicString();
-    m_uniqueName = AtomicString();
+    m_name = nullAtom;
+    m_uniqueName = nullAtom;
 }
 
 Frame* FrameTree::parent() const 

Modified: trunk/Source/WebCore/page/Location.cpp (203321 => 203322)


--- trunk/Source/WebCore/page/Location.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/page/Location.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -104,7 +104,7 @@
         return String();
 
     const URL& url = ""
-    return url.hasPort() ? String::number(url.port()) : "";
+    return url.hasPort() ? String::number(url.port()) : emptyString();
 }
 
 String Location::pathname() const

Modified: trunk/Source/WebCore/platform/network/ProtectionSpaceBase.cpp (203321 => 203322)


--- trunk/Source/WebCore/platform/network/ProtectionSpaceBase.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/platform/network/ProtectionSpaceBase.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -38,10 +38,10 @@
 // Need to enforce empty, non-null strings due to the pickiness of the String == String operator
 // combined with the semantics of the String(NSString*) constructor
 ProtectionSpaceBase::ProtectionSpaceBase()
-    : m_host("")
+    : m_host(emptyString())
     , m_port(0)
     , m_serverType(ProtectionSpaceServerHTTP)
-    , m_realm("")
+    , m_realm(emptyString())
     , m_authenticationScheme(ProtectionSpaceAuthenticationSchemeDefault)
     , m_isHashTableDeletedValue(false)
 {
@@ -50,10 +50,10 @@
 // Need to enforce empty, non-null strings due to the pickiness of the String == String operator
 // combined with the semantics of the String(NSString*) constructor
 ProtectionSpaceBase::ProtectionSpaceBase(const String& host, int port, ProtectionSpaceServerType serverType, const String& realm, ProtectionSpaceAuthenticationScheme authenticationScheme)
-    : m_host(host.length() ? host : "")
+    : m_host(host.length() ? host : emptyString())
     , m_port(port)
     , m_serverType(serverType)
-    , m_realm(realm.length() ? realm : "")
+    , m_realm(realm.length() ? realm : emptyString())
     , m_authenticationScheme(authenticationScheme)
     , m_isHashTableDeletedValue(false)
 {    

Modified: trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp (203321 => 203322)


--- trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp	2016-07-16 04:17:21 UTC (rev 203321)
+++ trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp	2016-07-16 04:51:45 UTC (rev 203322)
@@ -761,7 +761,7 @@
         int valueLength = static_cast<int>(attributes[i].end - attributes[i].value);
         AtomicString attrValue = toAtomicString(attributes[i].value, valueLength);
         String attrPrefix = toString(attributes[i].prefix);
-        AtomicString attrURI = attrPrefix.isEmpty() ? AtomicString() : toAtomicString(attributes[i].uri);
+        AtomicString attrURI = attrPrefix.isEmpty() ? nullAtom : toAtomicString(attributes[i].uri);
         AtomicString attrQName = attrPrefix.isEmpty() ? toAtomicString(attributes[i].localname) : attrPrefix + ":" + toString(attributes[i].localname);
 
         QualifiedName parsedName = anyName;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to