Changeset 155277 in webkit


Ignore:
Timestamp:
Sep 7, 2013 8:17:30 PM (11 years ago)
Author:
andersca@apple.com
Message:

Remove NonCopyableSort.h from WTF
https://bugs.webkit.org/show_bug.cgi?id=120984

Reviewed by Andreas Kling.

Source/WebCore:

  • css/MediaQuery.cpp:

(WebCore::MediaQuery::MediaQuery):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::updateActiveTextTrackCues):

  • html/RangeInputType.cpp:

(WebCore::RangeInputType::updateTickMarkValues):

  • inspector/InspectorMemoryAgent.cpp:
  • page/CaptionUserPreferences.cpp:

(WebCore::CaptionUserPreferences::sortedTrackListForMenu):

  • page/CaptionUserPreferences.h:
  • page/CaptionUserPreferencesMediaAF.cpp:

(WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu):

  • platform/graphics/texmap/TextureMapper.cpp:

(WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):

Source/WebKit/blackberry:

  • WebKitSupport/RenderQueue.cpp:

(BlackBerry::WebKit::RenderQueue::quickSort):

Source/WTF:

std::sort as defined by C++11 moves elements when possible, so there's no need for nonCopyableSort anymore.

  • GNUmakefile.list.am:
  • WTF.pro:
  • WTF.vcxproj/WTF.vcxproj:
  • WTF.vcxproj/WTF.vcxproj.filters:
  • WTF.xcodeproj/project.pbxproj:
  • wtf/NonCopyingSort.h: Removed.
Location:
trunk/Source
Files:
1 deleted
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r155262 r155277  
     12013-09-07  Anders Carlsson  <andersca@apple.com>
     2
     3        Remove NonCopyableSort.h from WTF
     4        https://bugs.webkit.org/show_bug.cgi?id=120984
     5
     6        Reviewed by Andreas Kling.
     7
     8        std::sort as defined by C++11 moves elements when possible, so there's no need for nonCopyableSort anymore.
     9
     10        * GNUmakefile.list.am:
     11        * WTF.pro:
     12        * WTF.vcxproj/WTF.vcxproj:
     13        * WTF.vcxproj/WTF.vcxproj.filters:
     14        * WTF.xcodeproj/project.pbxproj:
     15        * wtf/NonCopyingSort.h: Removed.
     16
    1172013-09-07  Anders Carlsson  <andersca@apple.com>
    218
  • trunk/Source/WTF/GNUmakefile.list.am

    r155262 r155277  
    9292    Source/WTF/wtf/NeverDestroyed.h \
    9393    Source/WTF/wtf/NoLock.h \
    94     Source/WTF/wtf/NonCopyingSort.h \
    9594    Source/WTF/wtf/Noncopyable.h \
    9695    Source/WTF/wtf/NotFound.h \
  • trunk/Source/WTF/WTF.pro

    r155262 r155277  
    8989    Ref.h \
    9090    Noncopyable.h \
    91     NonCopyingSort.h \
    9291    NotFound.h \
    9392    NullPtr.h \
  • trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj

    r155262 r155277  
    193193    <ClInclude Include="..\wtf\NeverDestroyed.h" />
    194194    <ClInclude Include="..\wtf\Noncopyable.h" />
    195     <ClInclude Include="..\wtf\NonCopyingSort.h" />
    196195    <ClInclude Include="..\wtf\NotFound.h" />
    197196    <ClInclude Include="..\wtf\NullPtr.h" />
  • trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters

    r155262 r155277  
    499499    </ClInclude>
    500500    <ClInclude Include="..\wtf\Noncopyable.h">
    501       <Filter>wtf</Filter>
    502     </ClInclude>
    503     <ClInclude Include="..\wtf\NonCopyingSort.h">
    504501      <Filter>wtf</Filter>
    505502    </ClInclude>
  • trunk/Source/WTF/WTF.xcodeproj/project.pbxproj

    r155262 r155277  
    158158                A8A473EE151A825B004123FF /* MetaAllocatorHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A472CF151A825B004123FF /* MetaAllocatorHandle.h */; };
    159159                A8A473EF151A825B004123FF /* Noncopyable.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A472D0151A825B004123FF /* Noncopyable.h */; };
    160                 A8A473F0151A825B004123FF /* NonCopyingSort.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A472D1151A825B004123FF /* NonCopyingSort.h */; };
    161160                A8A473F1151A825B004123FF /* NotFound.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A472D2151A825B004123FF /* NotFound.h */; };
    162161                A8A473F2151A825B004123FF /* NullPtr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A472D3151A825B004123FF /* NullPtr.cpp */; };
     
    433432                A8A472CF151A825B004123FF /* MetaAllocatorHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MetaAllocatorHandle.h; sourceTree = "<group>"; };
    434433                A8A472D0151A825B004123FF /* Noncopyable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Noncopyable.h; sourceTree = "<group>"; };
    435                 A8A472D1151A825B004123FF /* NonCopyingSort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NonCopyingSort.h; sourceTree = "<group>"; };
    436434                A8A472D2151A825B004123FF /* NotFound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotFound.h; sourceTree = "<group>"; };
    437435                A8A472D3151A825B004123FF /* NullPtr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NullPtr.cpp; sourceTree = "<group>"; };
     
    710708                                0F0D85B317234CB100338210 /* NoLock.h */,
    711709                                A8A472D0151A825B004123FF /* Noncopyable.h */,
    712                                 A8A472D1151A825B004123FF /* NonCopyingSort.h */,
    713710                                A8A472D2151A825B004123FF /* NotFound.h */,
    714711                                A8A472D3151A825B004123FF /* NullPtr.cpp */,
     
    10141011                                0F0D85B417234CC100338210 /* NoLock.h in Headers */,
    10151012                                A8A473EF151A825B004123FF /* Noncopyable.h in Headers */,
    1016                                 A8A473F0151A825B004123FF /* NonCopyingSort.h in Headers */,
    10171013                                A8A473F1151A825B004123FF /* NotFound.h in Headers */,
    10181014                                A8A473F3151A825B004123FF /* NullPtr.h in Headers */,
  • trunk/Source/WTF/wtf/CMakeLists.txt

    r155262 r155277  
    5454    MetaAllocator.h
    5555    MetaAllocatorHandle.h
    56     NonCopyingSort.h
    5756    ThreadRestrictionVerifier.h
    5857    Ref.h
  • trunk/Source/WebCore/ChangeLog

    r155264 r155277  
     12013-09-07  Anders Carlsson  <andersca@apple.com>
     2
     3        Remove NonCopyableSort.h from WTF
     4        https://bugs.webkit.org/show_bug.cgi?id=120984
     5
     6        Reviewed by Andreas Kling.
     7
     8        * css/MediaQuery.cpp:
     9        (WebCore::MediaQuery::MediaQuery):
     10        * html/HTMLMediaElement.cpp:
     11        (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
     12        * html/RangeInputType.cpp:
     13        (WebCore::RangeInputType::updateTickMarkValues):
     14        * inspector/InspectorMemoryAgent.cpp:
     15        * page/CaptionUserPreferences.cpp:
     16        (WebCore::CaptionUserPreferences::sortedTrackListForMenu):
     17        * page/CaptionUserPreferences.h:
     18        * page/CaptionUserPreferencesMediaAF.cpp:
     19        (WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu):
     20        * platform/graphics/texmap/TextureMapper.cpp:
     21        (WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):
     22
    1232013-09-07  Antti Koivisto  <antti@apple.com>
    224
  • trunk/Source/WebCore/css/MediaQuery.cpp

    r154533 r155277  
    3131
    3232#include "MediaQueryExp.h"
    33 #include <wtf/NonCopyingSort.h>
    3433#include <wtf/text/StringBuilder.h>
    3534
     
    7978}
    8079
    81 
    8280MediaQuery::MediaQuery(Restrictor r, const String& mediaType, PassOwnPtr<ExpressionVector> exprs)
    8381    : m_restrictor(r)
     
    9189    }
    9290
    93     nonCopyingSort(m_expressions->begin(), m_expressions->end(), expressionCompare);
     91    std::sort(m_expressions->begin(), m_expressions->end(), expressionCompare);
    9492
    9593    // remove all duplicated expressions
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r155194 r155277  
    8383#include <wtf/CurrentTime.h>
    8484#include <wtf/MathExtras.h>
    85 #include <wtf/NonCopyingSort.h>
    8685#include <wtf/Ref.h>
    8786#include <wtf/text/CString.h>
     
    13111310    // 12 - Sort the tasks in events in ascending time order (tasks with earlier
    13121311    // times first).
    1313     nonCopyingSort(eventTasks.begin(), eventTasks.end(), eventTimeCueCompare);
     1312    std::sort(eventTasks.begin(), eventTasks.end(), eventTimeCueCompare);
    13141313
    13151314    for (size_t i = 0; i < eventTasks.size(); ++i) {
     
    13451344    // 14 - Sort affected tracks in the same order as the text tracks appear in
    13461345    // the media element's list of text tracks, and remove duplicates.
    1347     nonCopyingSort(affectedTracks.begin(), affectedTracks.end(), trackIndexCompare);
     1346    std::sort(affectedTracks.begin(), affectedTracks.end(), trackIndexCompare);
    13481347
    13491348    // 15 - For each text track in affected tracks, in the list order, queue a
  • trunk/Source/WebCore/html/RangeInputType.cpp

    r154877 r155277  
    6161#include "HTMLDataListElement.h"
    6262#include "HTMLOptionElement.h"
    63 #include <wtf/NonCopyingSort.h>
    6463#endif
    6564
     
    349348}
    350349
    351 static bool decimalCompare(const Decimal& a, const Decimal& b)
    352 {
    353     return a < b;
    354 }
    355 
    356350void RangeInputType::updateTickMarkValues()
    357351{
     
    374368    }
    375369    m_tickMarkValues.shrinkToFit();
    376     nonCopyingSort(m_tickMarkValues.begin(), m_tickMarkValues.end(), decimalCompare);
     370    std::sort(m_tickMarkValues.begin(), m_tickMarkValues.end());
    377371}
    378372
  • trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp

    r153728 r155277  
    5353#include <runtime/ArrayBufferView.h>
    5454#include <wtf/HashSet.h>
    55 #include <wtf/NonCopyingSort.h>
    5655#include <wtf/OwnPtr.h>
    5756#include <wtf/PassOwnPtr.h>
  • trunk/Source/WebCore/page/CaptionUserPreferences.cpp

    r155048 r155277  
    3535#include "TextTrackList.h"
    3636#include "UserStyleSheetTypes.h"
    37 #include <wtf/NonCopyingSort.h>
    3837
    3938namespace WebCore {
     
    180179}
    181180
    182 Vector<RefPtr<TextTrack> > CaptionUserPreferences::sortedTrackListForMenu(TextTrackList* trackList)
     181Vector<RefPtr<TextTrack>> CaptionUserPreferences::sortedTrackListForMenu(TextTrackList* trackList)
    183182{
    184183    ASSERT(trackList);
    185184
    186     Vector<RefPtr<TextTrack> > tracksForMenu;
     185    Vector<RefPtr<TextTrack>> tracksForMenu;
    187186
    188187    for (unsigned i = 0, length = trackList->length(); i < length; ++i)
    189188        tracksForMenu.append(trackList->item(i));
    190189
    191     nonCopyingSort(tracksForMenu.begin(), tracksForMenu.end(), textTrackCompare);
     190    std::sort(tracksForMenu.begin(), tracksForMenu.end(), textTrackCompare);
     191
    192192    tracksForMenu.insert(0, TextTrack::captionMenuOffItem());
    193193    tracksForMenu.insert(1, TextTrack::captionMenuAutomaticItem());
  • trunk/Source/WebCore/page/CaptionUserPreferences.h

    r148285 r155277  
    8080
    8181    virtual String displayNameForTrack(TextTrack*) const;
    82     virtual Vector<RefPtr<TextTrack> > sortedTrackListForMenu(TextTrackList*);
     82    virtual Vector<RefPtr<TextTrack>> sortedTrackListForMenu(TextTrackList*);
    8383
    8484    void setPrimaryAudioTrackLanguageOverride(const String& language) { m_primaryAudioTrackLanguageOverride = language;  }
  • trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp

    r155130 r155277  
    4646#include "TextTrackList.h"
    4747#include "UserStyleSheetTypes.h"
    48 #include <wtf/NonCopyingSort.h>
    4948#include <wtf/RetainPtr.h>
    5049#include <wtf/text/StringBuilder.h>
     
    846845    }
    847846
    848     nonCopyingSort(tracksForMenu.begin(), tracksForMenu.end(), textTrackCompare);
     847    std::sort(tracksForMenu.begin(), tracksForMenu.end(), textTrackCompare);
    849848
    850849    tracksForMenu.insert(0, TextTrack::captionMenuOffItem());
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.cpp

    r148748 r155277  
    2626#include "Timer.h"
    2727#include <wtf/CurrentTime.h>
    28 #include <wtf/NonCopyingSort.h>
    2928
    3029#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
     
    8685
    8786    // Delete entries, which have been unused in s_releaseUnusedSecondsTolerance.
    88     nonCopyingSort(m_textures.begin(), m_textures.end(), BitmapTexturePoolEntry::compareTimeLastUsed);
     87    std::sort(m_textures.begin(), m_textures.end(), BitmapTexturePoolEntry::compareTimeLastUsed);
    8988
    9089    double minUsedTime = monotonicallyIncreasingTime() - s_releaseUnusedSecondsTolerance;
  • trunk/Source/WebKit/blackberry/ChangeLog

    r155228 r155277  
     12013-09-07  Anders Carlsson  <andersca@apple.com>
     2
     3        Remove NonCopyableSort.h from WTF
     4        https://bugs.webkit.org/show_bug.cgi?id=120984
     5
     6        Reviewed by Andreas Kling.
     7
     8        * WebKitSupport/RenderQueue.cpp:
     9        (BlackBerry::WebKit::RenderQueue::quickSort):
     10
    1112013-09-06  Ryosuke Niwa  <rniwa@webkit.org>
    212
  • trunk/Source/WebKit/blackberry/WebKitSupport/RenderQueue.cpp

    r148739 r155277  
    2525#include "WebPage_p.h"
    2626
    27 #include <wtf/NonCopyingSort.h>
    28 
    2927#define DEBUG_RENDER_QUEUE 0
    3028#define DEBUG_RENDER_QUEUE_SORT 0
     
    379377        return;
    380378
    381     WTF::nonCopyingSort(queue->begin(), queue->end(), TileIndexLessThan(m_primarySortDirection, m_secondarySortDirection));
     379    std::sort(queue->begin(), queue->end(), TileIndexLessThan(m_primarySortDirection, m_secondarySortDirection));
    382380}
    383381
Note: See TracChangeset for help on using the changeset viewer.