matchMedia() MediaQueryList not updating
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Apr 2012 18:45:29 +0000 (18:45 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Apr 2012 18:45:29 +0000 (18:45 +0000)
commit3795ef8f3d82d6e1727984fa5a64146c45e10ebb
tree2cc003f871070c56f0935d759559da3e949da46d
parent175c4bf762acbd0cfa02e74905fc4041e26ace63
matchMedia() MediaQueryList not updating
https://bugs.webkit.org/show_bug.cgi?id=75903

Patch by Luiz Agostini <luiz.agostini@palm.com> on 2012-04-16
Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/media/media-query-list-08.html

Viewport related MediaQueryList listeners were not triggered and the value
of matches were not updated if the document's style selector were not
affected by viewport changes.

The new method evaluateMediaQueries() is now called by FrameView instead of
styleSelectorChanged() if the style selector is not affected by viewport changes.

* dom/Document.cpp:
(WebCore::Document::evaluateMediaQueries):
(WebCore):
(WebCore::Document::styleSelectorChanged):
* dom/Document.h:
(Document):
* page/FrameView.cpp:
(WebCore::FrameView::layout):

LayoutTests:

Testing MediaQueryLists listeners related to viewport changes.

* fast/media/media-query-list-08-expected.txt: Added.
* fast/media/media-query-list-08.html: Added.

Skipping the new test in Qt due to an issue in its DumpRenderTree.

* platform/qt/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114285 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/media/media-query-list-08-expected.txt [new file with mode: 0644]
LayoutTests/fast/media/media-query-list-08.html [new file with mode: 0644]
LayoutTests/platform/qt/Skipped
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/page/FrameView.cpp