Bug 179324

Summary: Dynamic media queries don't update in shadow tree stylesheets
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, jcraig, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 148695    
Attachments:
Description Flags
patch
rniwa: review+
patch none

Description Antti Koivisto 2017-11-06 10:03:14 PST
This doesn't update when view is resized:

<div id=test></div>
<script>
const shadow = test.attachShadow({mode: 'open'});
shadow.innerHTML = `
    <style>
    @media (min-width:700px) {
        div { color: green }
    }
    </style>
    <div>foo</div>
`;
</script>
Comment 1 Ryosuke Niwa 2017-11-06 10:19:47 PST
Oh no :(
Comment 2 Antti Koivisto 2017-11-07 06:43:10 PST
Created attachment 326208 [details]
patch
Comment 3 Ryosuke Niwa 2017-11-07 09:00:18 PST
Comment on attachment 326208 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=326208&action=review

> LayoutTests/fast/shadow-dom/media-query-in-shadow-style.html:17
> +    }, 50);

Can we use 1 or 10?
Comment 4 Antti Koivisto 2017-11-07 09:37:54 PST
Created attachment 326215 [details]
patch
Comment 5 WebKit Commit Bot 2017-11-07 10:10:44 PST
Comment on attachment 326215 [details]
patch

Clearing flags on attachment: 326215

Committed r224535: <https://trac.webkit.org/changeset/224535>
Comment 6 WebKit Commit Bot 2017-11-07 10:10:46 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2017-11-15 12:10:31 PST
<rdar://problem/35567076>