-
antti@apple.com authored
Source/WebCore: REGRESSION (r104060): Layout Test fast/media/viewport-media-query.html is occasionally failing https://bugs.webkit.org/show_bug.cgi?id=75633 Reviewed by Andreas Kling. If something triggers CSSStyleSelector construction very early, before documentElement is known, it won't be able to resolve viewport-related media queries. In the included test case the attribute on <html> element triggers the style selector creation. I can't repro the fast/media/viewport-media-query.html failure but I suspect it is the same issue with a different mechanism for early CSSStyleSelector construction. - Reset style selector on documentElement change. - Remove the code for lazy documentElement initialization. It is not an useful optimization, the children of Document rarely change. Test: fast/media/viewport-media-query-synchronous.html * WebCore.exp.in: * dom/Document.cpp: (WebCore::Document::childrenChanged): * dom/Document.h: (WebCore::Document::documentElement): LayoutTests: Layout Test fast/media/viewport-media-query.html is occasionally failing https://bugs.webkit.org/show_bug.cgi?id=75633 Reviewed by Andreas Kling. * fast/media/viewport-media-query-synchronous-expected.txt: Added. * fast/media/viewport-media-query-synchronous.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104399 268f45cc-cd09-0410-ab3c-d52691b4dbfc
70726ab7