Unreviewed, rolling out r156307.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Sep 2013 00:51:34 +0000 (00:51 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Sep 2013 00:51:34 +0000 (00:51 +0000)
http://trac.webkit.org/changeset/156307
https://bugs.webkit.org/show_bug.cgi?id=121817

Broke the build, and crashes the compiler (Requested by ap on
#webkit).

Source/WebCore:

* css/MediaQuery.cpp:
(WebCore::expressionCompare):
(WebCore::MediaQuery::MediaQuery):
* dom/MutationObserver.cpp:
(WebCore::MutationObserver::ObserverLessThan::operator()):
(WebCore::MutationObserver::deliverAllMutations):
* page/CaptionUserPreferences.cpp:
(WebCore::textTrackCompare):
(WebCore::CaptionUserPreferences::sortedTrackListForMenu):

Source/WTF:

* wtf/ListDump.h:
(WTF::lessThan):
(WTF::sortedListDump):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156311 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WTF/ChangeLog
Source/WTF/wtf/ListDump.h
Source/WebCore/ChangeLog
Source/WebCore/css/MediaQuery.cpp
Source/WebCore/dom/MutationObserver.cpp
Source/WebCore/page/CaptionUserPreferences.cpp

index 0cf973849b714a0b976b34e4973e1bb9fc89ad51..24821d4f511bbd59c3a8d48b8e4b842091e29181 100644 (file)
@@ -1,3 +1,16 @@
+2013-09-23  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r156307.
+        http://trac.webkit.org/changeset/156307
+        https://bugs.webkit.org/show_bug.cgi?id=121817
+
+        Broke the build, and crashes the compiler (Requested by ap on
+        #webkit).
+
+        * wtf/ListDump.h:
+        (WTF::lessThan):
+        (WTF::sortedListDump):
+
 2013-09-23  Anders Carlsson  <andersca@apple.com>
 
         Test the waters and begin using lambdas
index 7e996a331d85aaa33457e84164224372dad90c15..a1344e5e8a40c0df7cfa16bdc43e6675eccb3ba1 100644 (file)
@@ -93,10 +93,16 @@ CString sortedListDump(const T& list, const Comparator& comparator, const char*
     return out.toCString();
 }
 
+template<typename T>
+inline bool lessThan(const T& a, const T& b)
+{
+    return a < b;
+}
+
 template<typename T>
 CString sortedListDump(const T& list, const char* comma = ", ")
 {
-    return sortedListDump(list, std::less<typename T::ValueType>(), comma);
+    return sortedListDump(list, lessThan<typename T::ValueType>, comma);
 }
 
 template<typename T>
index 43b3d20d5f3a877027838be58dd406aa57ceb2d5..83046af03ea2574f93eaca2a7c856a500ae68ecd 100644 (file)
@@ -1,3 +1,22 @@
+2013-09-23  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r156307.
+        http://trac.webkit.org/changeset/156307
+        https://bugs.webkit.org/show_bug.cgi?id=121817
+
+        Broke the build, and crashes the compiler (Requested by ap on
+        #webkit).
+
+        * css/MediaQuery.cpp:
+        (WebCore::expressionCompare):
+        (WebCore::MediaQuery::MediaQuery):
+        * dom/MutationObserver.cpp:
+        (WebCore::MutationObserver::ObserverLessThan::operator()):
+        (WebCore::MutationObserver::deliverAllMutations):
+        * page/CaptionUserPreferences.cpp:
+        (WebCore::textTrackCompare):
+        (WebCore::CaptionUserPreferences::sortedTrackListForMenu):
+
 2013-09-23  Andreas Kling  <akling@apple.com>
 
         Move rendererForRootBackground() to RenderElement.
index 39304d8f838e8e908ed08737b828f6e7ec72d44e..fe0f9d516ee4d76065287d7744892541e50380ef 100644 (file)
@@ -72,6 +72,11 @@ String MediaQuery::serialize() const
     return result.toString();
 }
 
+static bool expressionCompare(const OwnPtr<MediaQueryExp>& a, const OwnPtr<MediaQueryExp>& b)
+{
+    return codePointCompare(a->serialize(), b->serialize()) < 0;
+}
+
 MediaQuery::MediaQuery(Restrictor r, const String& mediaType, PassOwnPtr<ExpressionVector> exprs)
     : m_restrictor(r)
     , m_mediaType(mediaType.lower())
@@ -83,9 +88,7 @@ MediaQuery::MediaQuery(Restrictor r, const String& mediaType, PassOwnPtr<Express
         return;
     }
 
-    std::sort(m_expressions->begin(), m_expressions->end(), [](const OwnPtr<MediaQueryExp>& a, const OwnPtr<MediaQueryExp>& b) {
-        return codePointCompare(a->serialize(), b->serialize()) < 0;
-    });
+    std::sort(m_expressions->begin(), m_expressions->end(), expressionCompare);
 
     // remove all duplicated expressions
     String key;
index 1ff26b1702df044d733ee38974e89a284388484c..d4a6e6e28ab988a440468fdc8eba133f9ca55d32 100644 (file)
@@ -48,6 +48,13 @@ namespace WebCore {
 
 static unsigned s_observerPriority = 0;
 
+struct MutationObserver::ObserverLessThan {
+    bool operator()(const RefPtr<MutationObserver>& lhs, const RefPtr<MutationObserver>& rhs)
+    {
+        return lhs->m_priority < rhs->m_priority;
+    }
+};
+
 PassRefPtr<MutationObserver> MutationObserver::create(PassRefPtr<MutationCallback> callback)
 {
     ASSERT(isMainThread());
@@ -224,10 +231,7 @@ void MutationObserver::deliverAllMutations()
         Vector<RefPtr<MutationObserver> > observers;
         copyToVector(activeMutationObservers(), observers);
         activeMutationObservers().clear();
-        std::sort(observers.begin(), observers.end(), [](const RefPtr<MutationObserver>& lhs, const RefPtr<MutationObserver>& rhs) {
-            return lhs->m_priority < rhs->m_priority;
-        });
-
+        std::sort(observers.begin(), observers.end(), ObserverLessThan());
         for (size_t i = 0; i < observers.size(); ++i) {
             if (observers[i]->canDeliver())
                 observers[i]->deliver();
index f8c4d096d85d5fc39afd6b57af6898be88eaf061..2375ed3b6ed09bb05817af50f0d005465002794f 100644 (file)
@@ -173,6 +173,11 @@ String CaptionUserPreferences::displayNameForTrack(TextTrack* track) const
     return trackDisplayName(track);
 }
     
+static bool textTrackCompare(const RefPtr<TextTrack>& a, const RefPtr<TextTrack>& b)
+{
+    return codePointCompare(trackDisplayName(a.get()), trackDisplayName(b.get())) < 0;
+}
+
 Vector<RefPtr<TextTrack>> CaptionUserPreferences::sortedTrackListForMenu(TextTrackList* trackList)
 {
     ASSERT(trackList);
@@ -182,9 +187,7 @@ Vector<RefPtr<TextTrack>> CaptionUserPreferences::sortedTrackListForMenu(TextTra
     for (unsigned i = 0, length = trackList->length(); i < length; ++i)
         tracksForMenu.append(trackList->item(i));
 
-    std::sort(tracksForMenu.begin(), tracksForMenu.end(), [](const RefPtr<TextTrack>& a, const RefPtr<TextTrack>& b) {
-        return codePointCompare(trackDisplayName(a.get()), trackDisplayName(b.get())) < 0;
-    });
+    std::sort(tracksForMenu.begin(), tracksForMenu.end(), textTrackCompare);
 
     tracksForMenu.insert(0, TextTrack::captionMenuOffItem());
     tracksForMenu.insert(1, TextTrack::captionMenuAutomaticItem());