Title: [118934] trunk/Source
Revision
118934
Author
[email protected]
Date
2012-05-30 10:18:11 -0700 (Wed, 30 May 2012)

Log Message

HashTable.h has using directives for std::pair and std::make_pair
https://bugs.webkit.org/show_bug.cgi?id=29919

Reviewed by Darin Adler.

Source/WebCore:

Change code to use std::pair and std::make_pair.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::postNotification):
* html/MediaFragmentURIParser.cpp:
(WebCore::MediaFragmentURIParser::parseFragments):
* html/parser/HTMLMetaCharsetParser.cpp:
(WebCore::HTMLMetaCharsetParser::processMeta):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::brokenImage):
* page/PageSerializer.cpp:
(WebCore::isCharsetSpecifyingNode):

Source/WebKit2:

Change code to use std::pair and std::make_pair.

* UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:
(WebKit::DynamicLinkerEnvironmentExtractor::processEnvironmentVariable):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::postMessageToInjectedBundle):

Source/WTF:

Change code to use std::pair and std::make_pair. Later patch will remove the
'using' directives.

* wtf/HashTable.h:
(WTF::hashTableSwap):
(HashTable):
* wtf/HashTraits.h:
(PairHashTraits):
(WTF::PairHashTraits::emptyValue):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (118933 => 118934)


--- trunk/Source/WTF/ChangeLog	2012-05-30 17:17:15 UTC (rev 118933)
+++ trunk/Source/WTF/ChangeLog	2012-05-30 17:18:11 UTC (rev 118934)
@@ -1,3 +1,20 @@
+2012-05-30  Caio Marcelo de Oliveira Filho  <[email protected]>
+
+        HashTable.h has using directives for std::pair and std::make_pair
+        https://bugs.webkit.org/show_bug.cgi?id=29919
+
+        Reviewed by Darin Adler.
+
+        Change code to use std::pair and std::make_pair. Later patch will remove the
+        'using' directives.
+
+        * wtf/HashTable.h:
+        (WTF::hashTableSwap):
+        (HashTable):
+        * wtf/HashTraits.h:
+        (PairHashTraits):
+        (WTF::PairHashTraits::emptyValue):
+
 2012-05-30  Patrick Gansterer  <[email protected]>
 
         Build fix for WinCE after r118603.

Modified: trunk/Source/WTF/wtf/HashTable.h (118933 => 118934)


--- trunk/Source/WTF/wtf/HashTable.h	2012-05-30 17:17:15 UTC (rev 118933)
+++ trunk/Source/WTF/wtf/HashTable.h	2012-05-30 17:18:11 UTC (rev 118934)
@@ -285,7 +285,7 @@
     }
 
     // Swap pairs by component, in case of pair members that specialize swap.
-    template<typename T, typename U> inline void hashTableSwap(pair<T, U>& a, pair<T, U>& b)
+    template<typename T, typename U> inline void hashTableSwap(std::pair<T, U>& a, std::pair<T, U>& b)
     {
         swap(a.first, b.first);
         swap(a.second, b.second);
@@ -392,8 +392,8 @@
         static ValueType* allocateTable(int size);
         static void deallocateTable(ValueType* table, int size);
 
-        typedef pair<ValueType*, bool> LookupType;
-        typedef pair<LookupType, unsigned> FullLookupType;
+        typedef std::pair<ValueType*, bool> LookupType;
+        typedef std::pair<LookupType, unsigned> FullLookupType;
 
         LookupType lookupForWriting(const Key& key) { return lookupForWriting<IdentityTranslatorType>(key); };
         template<typename HashTranslator, typename T> FullLookupType fullLookupForWriting(const T&);

Modified: trunk/Source/WTF/wtf/HashTraits.h (118933 => 118934)


--- trunk/Source/WTF/wtf/HashTraits.h	2012-05-30 17:17:15 UTC (rev 118933)
+++ trunk/Source/WTF/wtf/HashTraits.h	2012-05-30 17:18:11 UTC (rev 118934)
@@ -169,14 +169,14 @@
     // special traits for pairs, helpful for their use in HashMap implementation
 
     template<typename FirstTraitsArg, typename SecondTraitsArg>
-    struct PairHashTraits : GenericHashTraits<pair<typename FirstTraitsArg::TraitType, typename SecondTraitsArg::TraitType> > {
+    struct PairHashTraits : GenericHashTraits<std::pair<typename FirstTraitsArg::TraitType, typename SecondTraitsArg::TraitType> > {
         typedef FirstTraitsArg FirstTraits;
         typedef SecondTraitsArg SecondTraits;
-        typedef pair<typename FirstTraits::TraitType, typename SecondTraits::TraitType> TraitType;
-        typedef pair<typename FirstTraits::EmptyValueType, typename SecondTraits::EmptyValueType> EmptyValueType;
+        typedef std::pair<typename FirstTraits::TraitType, typename SecondTraits::TraitType> TraitType;
+        typedef std::pair<typename FirstTraits::EmptyValueType, typename SecondTraits::EmptyValueType> EmptyValueType;
 
         static const bool emptyValueIsZero = FirstTraits::emptyValueIsZero && SecondTraits::emptyValueIsZero;
-        static EmptyValueType emptyValue() { return make_pair(FirstTraits::emptyValue(), SecondTraits::emptyValue()); }
+        static EmptyValueType emptyValue() { return std::make_pair(FirstTraits::emptyValue(), SecondTraits::emptyValue()); }
 
         static const bool needsDestruction = FirstTraits::needsDestruction || SecondTraits::needsDestruction;
 
@@ -187,7 +187,7 @@
     };
 
     template<typename First, typename Second>
-    struct HashTraits<pair<First, Second> > : public PairHashTraits<HashTraits<First>, HashTraits<Second> > { };
+    struct HashTraits<std::pair<First, Second> > : public PairHashTraits<HashTraits<First>, HashTraits<Second> > { };
 
 } // namespace WTF
 

Modified: trunk/Source/WebCore/ChangeLog (118933 => 118934)


--- trunk/Source/WebCore/ChangeLog	2012-05-30 17:17:15 UTC (rev 118933)
+++ trunk/Source/WebCore/ChangeLog	2012-05-30 17:18:11 UTC (rev 118934)
@@ -1,3 +1,23 @@
+2012-05-30  Caio Marcelo de Oliveira Filho  <[email protected]>
+
+        HashTable.h has using directives for std::pair and std::make_pair
+        https://bugs.webkit.org/show_bug.cgi?id=29919
+
+        Reviewed by Darin Adler.
+
+        Change code to use std::pair and std::make_pair.
+
+        * accessibility/AXObjectCache.cpp:
+        (WebCore::AXObjectCache::postNotification):
+        * html/MediaFragmentURIParser.cpp:
+        (WebCore::MediaFragmentURIParser::parseFragments):
+        * html/parser/HTMLMetaCharsetParser.cpp:
+        (WebCore::HTMLMetaCharsetParser::processMeta):
+        * loader/cache/CachedImage.cpp:
+        (WebCore::CachedImage::brokenImage):
+        * page/PageSerializer.cpp:
+        (WebCore::isCharsetSpecifyingNode):
+
 2012-05-30  Peter Rybin  <[email protected]>
 
         Web Inspector: disable ExactlyInt feature in InspectorTypeBuilder since it breaks release Windows 7 WK2

Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (118933 => 118934)


--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2012-05-30 17:17:15 UTC (rev 118933)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2012-05-30 17:18:11 UTC (rev 118934)
@@ -525,7 +525,7 @@
         return;
 
     if (postType == PostAsynchronously) {
-        m_notificationsToPost.append(make_pair(object, notification));
+        m_notificationsToPost.append(std::make_pair(object, notification));
         if (!m_notificationPostTimer.isActive())
             m_notificationPostTimer.startOneShot(0);
     } else

Modified: trunk/Source/WebCore/html/MediaFragmentURIParser.cpp (118933 => 118934)


--- trunk/Source/WebCore/html/MediaFragmentURIParser.cpp	2012-05-30 17:17:15 UTC (rev 118933)
+++ trunk/Source/WebCore/html/MediaFragmentURIParser.cpp	2012-05-30 17:18:11 UTC (rev 118934)
@@ -151,7 +151,7 @@
         }
         
         if (validUTF8)
-            m_fragments.append(make_pair(name, value));
+            m_fragments.append(std::make_pair(name, value));
 
         offset = parameterEnd + 1;
     }

Modified: trunk/Source/WebCore/html/parser/HTMLMetaCharsetParser.cpp (118933 => 118934)


--- trunk/Source/WebCore/html/parser/HTMLMetaCharsetParser.cpp	2012-05-30 17:17:15 UTC (rev 118933)
+++ trunk/Source/WebCore/html/parser/HTMLMetaCharsetParser.cpp	2012-05-30 17:18:11 UTC (rev 118934)
@@ -107,7 +107,7 @@
     for (HTMLToken::AttributeList::const_iterator iter = tokenAttributes.begin(); iter != tokenAttributes.end(); ++iter) {
         String attributeName(iter->m_name.data(), iter->m_name.size());
         String attributeValue(iter->m_value.data(), iter->m_value.size());
-        attributes.append(make_pair(attributeName, attributeValue));
+        attributes.append(std::make_pair(attributeName, attributeValue));
     }
 
     m_encoding = encodingFromMetaAttributes(attributes);

Modified: trunk/Source/WebCore/loader/cache/CachedImage.cpp (118933 => 118934)


--- trunk/Source/WebCore/loader/cache/CachedImage.cpp	2012-05-30 17:17:15 UTC (rev 118933)
+++ trunk/Source/WebCore/loader/cache/CachedImage.cpp	2012-05-30 17:18:11 UTC (rev 118934)
@@ -131,11 +131,11 @@
 {
     if (deviceScaleFactor >= 2) {
         DEFINE_STATIC_LOCAL(Image*, brokenImageHiRes, (Image::loadPlatformResource("missingImage@2x").leakRef()));
-        return make_pair(brokenImageHiRes, 2);
+        return std::make_pair(brokenImageHiRes, 2);
     }
 
     DEFINE_STATIC_LOCAL(Image*, brokenImageLoRes, (Image::loadPlatformResource("missingImage").leakRef()));
-    return make_pair(brokenImageLoRes, 1);
+    return std::make_pair(brokenImageLoRes, 1);
 }
 
 bool CachedImage::willPaintBrokenImage() const

Modified: trunk/Source/WebCore/page/PageSerializer.cpp (118933 => 118934)


--- trunk/Source/WebCore/page/PageSerializer.cpp	2012-05-30 17:17:15 UTC (rev 118933)
+++ trunk/Source/WebCore/page/PageSerializer.cpp	2012-05-30 17:18:11 UTC (rev 118934)
@@ -75,7 +75,7 @@
         for (unsigned i = 0; i < element->attributeCount(); ++i) {
             Attribute* item = element->attributeItem(i);
             // FIXME: We should deal appropriately with the attribute if they have a namespace.
-            attributes.append(make_pair(item->name().toString(), item->value().string()));
+            attributes.append(std::make_pair(item->name().toString(), item->value().string()));
         }
     }
     TextEncoding textEncoding = HTMLMetaCharsetParser::encodingFromMetaAttributes(attributes);

Modified: trunk/Source/WebKit2/ChangeLog (118933 => 118934)


--- trunk/Source/WebKit2/ChangeLog	2012-05-30 17:17:15 UTC (rev 118933)
+++ trunk/Source/WebKit2/ChangeLog	2012-05-30 17:18:11 UTC (rev 118934)
@@ -1,3 +1,17 @@
+2012-05-30  Caio Marcelo de Oliveira Filho  <[email protected]>
+
+        HashTable.h has using directives for std::pair and std::make_pair
+        https://bugs.webkit.org/show_bug.cgi?id=29919
+
+        Reviewed by Darin Adler.
+
+        Change code to use std::pair and std::make_pair.
+
+        * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:
+        (WebKit::DynamicLinkerEnvironmentExtractor::processEnvironmentVariable):
+        * UIProcess/WebContext.cpp:
+        (WebKit::WebContext::postMessageToInjectedBundle):
+
 2012-05-30  Kenneth Rohde Christiansen  <[email protected]>
 
         Unreviewed: Fix wrongly typed Qt slot.

Modified: trunk/Source/WebKit2/UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm (118933 => 118934)


--- trunk/Source/WebKit2/UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm	2012-05-30 17:17:15 UTC (rev 118933)
+++ trunk/Source/WebKit2/UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm	2012-05-30 17:18:11 UTC (rev 118934)
@@ -88,7 +88,7 @@
         return;
 
     CString value(equalsLocation + 1);
-    m_extractedVariables.append(make_pair(name.latin1(), value));
+    m_extractedVariables.append(std::make_pair(name.latin1(), value));
 }
 
 size_t DynamicLinkerEnvironmentExtractor::processLoadCommand(const void* data, size_t length, bool shouldByteSwap)

Modified: trunk/Source/WebKit2/UIProcess/WebContext.cpp (118933 => 118934)


--- trunk/Source/WebKit2/UIProcess/WebContext.cpp	2012-05-30 17:17:15 UTC (rev 118933)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp	2012-05-30 17:18:11 UTC (rev 118934)
@@ -451,7 +451,7 @@
 void WebContext::postMessageToInjectedBundle(const String& messageName, APIObject* messageBody)
 {
     if (!m_process || !m_process->canSendMessage()) {
-        m_pendingMessagesToPostToInjectedBundle.append(make_pair(messageName, messageBody));
+        m_pendingMessagesToPostToInjectedBundle.append(std::make_pair(messageName, messageBody));
         return;
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to