Skip to content
  • luiz@webkit.org's avatar
    2010-10-21 Luiz Agostini <luiz.agostini@openbossa.org> · db0dd431
    luiz@webkit.org authored
            Reviewed by Darin Adler.
    
            Implement CSSOM View matchMedia interface
            https://bugs.webkit.org/show_bug.cgi?id=37205
    
            New property matchMedia was added to window.
    
            * fast/dom/Window/window-properties-expected.txt:
            * fast/dom/Window/window-property-descriptors-expected.txt:
    
            window.matchMedia and MediaQueryList tests.
    
            * fast/media/media-query-list-01-expected.txt: Added.
            * fast/media/media-query-list-01.html: Added.
    
            The following tests depend on LayoutTestController::setViewModeMediaFeature() to work.
            As it is only implemented by Qt and Gtk the tests needed to be skipped in all other platforms.
    
            * fast/media/media-query-list-02-expected.txt: Added.
            * fast/media/media-query-list-02.html: Added.
            * fast/media/media-query-list-03-expected.txt: Added.
            * fast/media/media-query-list-03.html: Added.
            * fast/media/media-query-list-04-expected.txt: Added.
            * fast/media/media-query-list-04.html: Added.
            * fast/media/media-query-list-05-expected.txt: Added.
            * fast/media/media-query-list-05.html: Added.
            * fast/media/media-query-list-06-expected.txt: Added.
            * fast/media/media-query-list-06.html: Added.
            * fast/media/media-query-list-07-expected.txt: Added.
            * fast/media/media-query-list-07.html: Added.
            * platform/chromium/test_expectations.txt:
            * platform/mac/Skipped:
            * platform/win/Skipped:
    2010-10-21  Luiz Agostini  <luiz.agostini@openbossa.org>
    
            Reviewed by Darin Adler.
    
            Implement CSSOM View matchMedia interface
            https://bugs.webkit.org/show_bug.cgi?id=37205
    
            New interfaces may be used to evaluate media queries and to associate listeners
            to media queries. Those listeners are called whenever the associated query changes.
            Specification may be found at http://dev.w3.org/csswg/cssom-view/#the-mediaquerylist-interface
    
            operator== added to JS version of ScriptValue.
            Method isFunction added to JS and V8 versions of ScriptValue.
    
            * bindings/js/ScriptValue.cpp:
            (WebCore::ScriptValue::isFunction):
            * bindings/js/ScriptValue.h:
            (WebCore::ScriptValue::operator==):
            * bindings/v8/ScriptValue.h:
            (WebCore::ScriptValue::isFunction):
    
            Some changes were needed to the code generators to handle type MediaQueryListListener.
    
            * bindings/scripts/CodeGeneratorGObject.pm:
            * bindings/scripts/CodeGeneratorJS.pm:
            * bindings/scripts/CodeGeneratorV8.pm:
    
            Some changes to the bindings test results that were previously added.
    
            * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
            * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
            * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
            (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
            * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
            (WebCore::TestMediaQueryListListenerInternal::methodCallback):
            (WebCore::ConfigureV8TestMediaQueryListListenerTemplate):
    
            New interfaces:
    
            * css/MediaQueryList.cpp: Added.
            * css/MediaQueryList.h: Added.
            * css/MediaQueryList.idl: Added.
    
            * css/MediaQueryListListener.cpp: Added.
            * css/MediaQueryListListener.h: Added.
            * css/MediaQueryListListener.idl: Added.
    
            To avoid adding code to classes DOMWindow and Document a new class MediaQueryMatcher was created.
    
            * css/MediaQueryMatcher.cpp: Added.
            * css/MediaQueryMatcher.h: Added.
    
            Document and DOMWindow have changed to support new features. DOMWindow is the class that
            publishes methods matchMedia but for page cache to work properly the reference to the
            MediaQueryMatcher must be in Document.
    
            * dom/Document.cpp:
            (WebCore::Document::~Document):
            (WebCore::Document::mediaQueryMatcher):
            (WebCore::Document::styleSelectorChanged):
            * dom/Document.h:
            * page/DOMWindow.cpp:
            (WebCore::DOMWindow::matchMedia):
            * page/DOMWindow.h:
            * page/DOMWindow.idl:
    
            Build systems
    
            * CMakeLists.txt:
            * DerivedSources.make:
            * GNUmakefile.am:
            * WebCore.gypi:
            * WebCore.pri:
            * WebCore.pro:
            * WebCore.vcproj/WebCore.vcproj:
            * WebCore.xcodeproj/project.pbxproj:
            * bindings/gobject/GNUmakefile.am:
    
            Tests: fast/media/media-query-list-01.html
                   fast/media/media-query-list-02.html
                   fast/media/media-query-list-03.html
                   fast/media/media-query-list-04.html
                   fast/media/media-query-list-05.html
                   fast/media/media-query-list-06.html
                   fast/media/media-query-list-07.html
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    db0dd431