Bug 179324 - Dynamic media queries don't update in shadow tree stylesheets
Summary: Dynamic media queries don't update in shadow tree stylesheets
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 148695
  Show dependency treegraph
 
Reported: 2017-11-06 10:03 PST by Antti Koivisto
Modified: 2017-11-15 12:10 PST (History)
4 users (show)

See Also:


Attachments
patch (9.49 KB, patch)
2017-11-07 06:43 PST, Antti Koivisto
rniwa: review+
Details | Formatted Diff | Diff
patch (9.48 KB, patch)
2017-11-07 09:37 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>