I found this issue while trying to reproduce the Bug 170762, so I created a small test case but I used media query to see if the :host() descendants were getting updated properly. But then, I found out that the styles inside @media selectors are not updated after the user resizes the window. Take this example inspired by one on the original bug report http://jsbin.com/xuyozoguqu/edit?html,output When user clicks on the toggle button, the color of the <p> element should get updated and that works for Safari 11 Tech Preview (though it doesn't work for Safari 10). If you try to resize the Output iframe, the color is not updated for the host descendants. The styles within @media are applied only if the criteria is matched on the first load and are not being updated whenever the viewport is resized. I have tested it for both Safari 10.1.2 (12603.3.8) and Release 38 (Safari 11.1, WebKit 12605.1.3.1) and both failed for this. I have also tested in Chrome 60.0.3112.113 (Official Build) (64-bit) and it worked as expected.
<rdar://problem/34163850>
https://trac.webkit.org/changeset/224535 fixed media queries expect that :host style still fails to update in some cases
Created attachment 326932 [details] patch
Attachment 326932 [details] did not pass style-queue: ERROR: Source/WebCore/style/StyleScope.cpp:506: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/WebCore/style/StyleScope.cpp:506: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebCore/style/StyleScope.cpp:507: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 3 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 326933 [details] patch
Comment on attachment 326933 [details] patch Rejecting attachment 326933 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 326933, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: fs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc ... Currently at 224856 = 13c8da873b53e262b788bfb2945c36df76fdc584 r224857 = 915e5c28f8c64df9691b6d007304b2b785f03abd r224858 = 7c4b622050f2aa40cb2d8531c87fe42d825df805 r224859 = 60eceb4f1e31232e4bfb04e04deef9db559fdf8e Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc First, rewinding head to replay your work on top of it... Fast-forwarded master to refs/remotes/origin/master. Full output: http://webkit-queues.webkit.org/results/5235071
https://trac.webkit.org/r224864