matchMedia('print').addListener() fires in WK1 but never in WK2 when printing (breaks...
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 21 May 2017 15:08:18 +0000 (15:08 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 21 May 2017 15:08:18 +0000 (15:08 +0000)
commit777cfcfc2180b328f52def8733ac046dfa6614eb
tree564f640da4cfc3740d5a753b872b705ff8c1ca72
parentd8a23945aa54e58a8cf808a58abf069c319be746
matchMedia('print').addListener() fires in WK1 but never in WK2 when printing (breaks printing Google maps, QuickLooks)
https://bugs.webkit.org/show_bug.cgi?id=172361
<rdar://problem/28777408>

Reviewed by Sam Weinig.

Source/WebCore:

Test: fast/media/matchMedia-print.html

* page/FrameView.cpp:
(WebCore::FrameView::layout):

    Evaluate matchMedia queries unconditionally. No idea why it wasn't like that.

* testing/Internals.cpp:
(WebCore::Internals::setPrinting):

    Add testing support. The existing ways to do printing testing were unable to hit this bug as
    they had too much additional gunk.

* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* fast/media/matchMedia-print-expected.txt: Added.
* fast/media/matchMedia-print.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/media/matchMedia-print-expected.txt [new file with mode: 0644]
LayoutTests/fast/media/matchMedia-print.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl