- Revision
- 156311
- Author
- [email protected]
- Date
- 2013-09-23 17:51:34 -0700 (Mon, 23 Sep 2013)
Log Message
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).
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):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (156310 => 156311)
--- trunk/Source/WTF/ChangeLog 2013-09-24 00:34:49 UTC (rev 156310)
+++ trunk/Source/WTF/ChangeLog 2013-09-24 00:51:34 UTC (rev 156311)
@@ -1,3 +1,16 @@
+2013-09-23 Commit Queue <[email protected]>
+
+ 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 <[email protected]>
Test the waters and begin using lambdas
Modified: trunk/Source/WTF/wtf/ListDump.h (156310 => 156311)
--- trunk/Source/WTF/wtf/ListDump.h 2013-09-24 00:34:49 UTC (rev 156310)
+++ trunk/Source/WTF/wtf/ListDump.h 2013-09-24 00:51:34 UTC (rev 156311)
@@ -94,9 +94,15 @@
}
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>
Modified: trunk/Source/WebCore/ChangeLog (156310 => 156311)
--- trunk/Source/WebCore/ChangeLog 2013-09-24 00:34:49 UTC (rev 156310)
+++ trunk/Source/WebCore/ChangeLog 2013-09-24 00:51:34 UTC (rev 156311)
@@ -1,3 +1,22 @@
+2013-09-23 Commit Queue <[email protected]>
+
+ 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 <[email protected]>
Move rendererForRootBackground() to RenderElement.
Modified: trunk/Source/WebCore/css/MediaQuery.cpp (156310 => 156311)
--- trunk/Source/WebCore/css/MediaQuery.cpp 2013-09-24 00:34:49 UTC (rev 156310)
+++ trunk/Source/WebCore/css/MediaQuery.cpp 2013-09-24 00:51:34 UTC (rev 156311)
@@ -72,6 +72,11 @@
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 @@
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;
Modified: trunk/Source/WebCore/dom/MutationObserver.cpp (156310 => 156311)
--- trunk/Source/WebCore/dom/MutationObserver.cpp 2013-09-24 00:34:49 UTC (rev 156310)
+++ trunk/Source/WebCore/dom/MutationObserver.cpp 2013-09-24 00:51:34 UTC (rev 156311)
@@ -48,6 +48,13 @@
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 @@
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();
Modified: trunk/Source/WebCore/page/CaptionUserPreferences.cpp (156310 => 156311)
--- trunk/Source/WebCore/page/CaptionUserPreferences.cpp 2013-09-24 00:34:49 UTC (rev 156310)
+++ trunk/Source/WebCore/page/CaptionUserPreferences.cpp 2013-09-24 00:51:34 UTC (rev 156311)
@@ -173,6 +173,11 @@
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 @@
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());