Ignore:
Timestamp:
Sep 8, 2010, 4:08:08 AM (15 years ago)
Author:
[email protected]
Message:

2010-08-30 Maciej Stachowiak <[email protected]>

Reviewed by Darin Adler.

Handle MediaQueryExp memory management exclusively with smart pointers
https://bugs.webkit.org/show_bug.cgi?id=44874


Implemented a non-copying sort function to make it possible to sort a Vector
of OwnPtrs (which cannot be copied). This is required for the above.

  • wtf/NonCopyingSort.h: Added. (WTF::nonCopyingSort): It's secretly heapsort. (WTF::heapSort): heapsort implementation. (WTF::siftDown): Helper function for heapsort. (WTF::heapify): ditto

Adjust build systems.


2010-08-30 Maciej Stachowiak <[email protected]>

Reviewed by Darin Adler.

Handle MediaQueryExp memory management exclusively with smart pointers
https://bugs.webkit.org/show_bug.cgi?id=44874

Gace MediaQueryExp a create function, made the constructor private, and followed
the implications. The one tricky bit was using a non-copying sort to sort
the Vector<OwnPtr<MediaQueryExp> > in the MediaQuery constructor.


  • ForwardingHeaders/wtf/NonCopyingSort.h: Added.
  • css/CSSGrammar.y:
  • css/CSSParser.cpp: (WebCore::CSSParser::~CSSParser): (WebCore::CSSParser::createFloatingMediaQueryExp): (WebCore::CSSParser::createFloatingMediaQueryExpList): (WebCore::CSSParser::sinkFloatingMediaQueryExpList): (WebCore::CSSParser::createFloatingMediaQuery):
  • css/CSSParser.h:
  • css/MediaList.cpp:
  • css/MediaQuery.cpp: (WebCore::expressionCompare): (WebCore::MediaQuery::MediaQuery): (WebCore::MediaQuery::~MediaQuery):
  • css/MediaQuery.h: (WebCore::MediaQuery::expressions):
  • css/MediaQueryEvaluator.cpp: (WebCore::MediaQueryEvaluator::eval):
  • css/MediaQueryExp.h: (WebCore::MediaQueryExp::create):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.gypi

    r65077 r66968  
    395395            'wtf/MathExtras.h',
    396396            'wtf/MessageQueue.h',
     397            'wtf/NonCopyingSort.h',
    397398            'wtf/Noncopyable.h',
    398399            'wtf/NotFound.h',
Note: See TracChangeset for help on using the changeset viewer.