Title: [153456] trunk/Source/WebCore
Revision
153456
Author
[email protected]
Date
2013-07-29 21:14:22 -0700 (Mon, 29 Jul 2013)

Log Message

[Gtk] Improve string use in PasteboardGtk
https://bugs.webkit.org/show_bug.cgi?id=119204

Reviewed by Martin Robinson.

Use emptyString() instead of "" and use ASCIILiteral where appropriate.

No behavior change, no new tests needed.

* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::documentFragment):
Use emptyString() instead of "".
(WebCore::Pasteboard::types):
Use ASCIILiteral where appropriate.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (153455 => 153456)


--- trunk/Source/WebCore/ChangeLog	2013-07-30 03:33:57 UTC (rev 153455)
+++ trunk/Source/WebCore/ChangeLog	2013-07-30 04:14:22 UTC (rev 153456)
@@ -1,3 +1,20 @@
+2013-07-29  Kwang Yul Seo  <[email protected]>
+
+        [Gtk] Improve string use in PasteboardGtk
+        https://bugs.webkit.org/show_bug.cgi?id=119204
+
+        Reviewed by Martin Robinson.
+
+        Use emptyString() instead of "" and use ASCIILiteral where appropriate.
+
+        No behavior change, no new tests needed.
+
+        * platform/gtk/PasteboardGtk.cpp:
+        (WebCore::Pasteboard::documentFragment):
+        Use emptyString() instead of "".
+        (WebCore::Pasteboard::types):
+        Use ASCIILiteral where appropriate.
+
 2013-07-29  Simon Fraser  <[email protected]>
 
         Page count can be incorrect if there is a pending style recalc

Modified: trunk/Source/WebCore/platform/gtk/PasteboardGtk.cpp (153455 => 153456)


--- trunk/Source/WebCore/platform/gtk/PasteboardGtk.cpp	2013-07-30 03:33:57 UTC (rev 153455)
+++ trunk/Source/WebCore/platform/gtk/PasteboardGtk.cpp	2013-07-30 04:14:22 UTC (rev 153456)
@@ -318,7 +318,7 @@
     chosePlainText = false;
 
     if (m_dataObject->hasMarkup()) {
-        RefPtr<DocumentFragment> fragment = createFragmentFromMarkup(frame->document(), m_dataObject->markup(), "", DisallowScriptingAndPluginContent);
+        RefPtr<DocumentFragment> fragment = createFragmentFromMarkup(frame->document(), m_dataObject->markup(), emptyString(), DisallowScriptingAndPluginContent);
         if (fragment)
             return fragment.release();
     }
@@ -368,21 +368,21 @@
 
     ListHashSet<String> types;
     if (m_dataObject->hasText()) {
-        types.add("text/plain");
-        types.add("Text");
-        types.add("text");
+        types.add(ASCIILiteral("text/plain"));
+        types.add(ASCIILiteral("Text"));
+        types.add(ASCIILiteral("text"));
     }
 
     if (m_dataObject->hasMarkup())
-        types.add("text/html");
+        types.add(ASCIILiteral("text/html"));
 
     if (m_dataObject->hasURIList()) {
-        types.add("text/uri-list");
-        types.add("URL");
+        types.add(ASCIILiteral("text/uri-list"));
+        types.add(ASCIILiteral("URL"));
     }
 
     if (m_dataObject->hasFilenames())
-        types.add("Files");
+        types.add(ASCIILiteral("Files"));
 
     return types;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to