Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Issue 2554193002: Make sure media query results are re-collected. (Closed)

Created:
4 years ago by rune
Modified:
4 years ago
Reviewers:
meade_UTC10
CC:
chromium-reviews, blink-reviews-html_chromium.org, blink-reviews-style_chromium.org, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make sure media query results are re-collected. When media attributes change on style elements, we need to re-append all sheets in the scope in order to collect the viewport and device dependent media results correctly. This already done forced by the FullStyleUpdate in parseAttribute, but we want to minimize the changes here with async style update and ruleset based invalidations by marking the treeScope dirty, and if nothing changed, invalidate no style. However, we need to re-add global rule data, or at least the media query results. Example: say that we have a window width of 800px below. After the media attribute has been changed, we don't need to recalculate any styles, but we need to make sure we detect style changes crossing the width of 2000px instead of 1000px. <style media="(min-width: 1000px)"> ... </style> <script> styleElement.setAttribute("media", "(min-width: 2000px"); </script> R=meade@chromium.org BUG=567021 Committed: https://crrev.com/f46992525f72e0bdf4331f8cf6fcc31602f307e7 Cr-Commit-Position: refs/heads/master@{#437213}

Patch Set 1 #

Patch Set 2 : TreeScope should always be dirty. #

Patch Set 3 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -1 line) Patch
M third_party/WebKit/Source/core/dom/StyleEngine.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StyleEngine.cpp View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StyleEngineTest.cpp View 1 chunk +54 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLStyleElement.cpp View 1 chunk +1 line, -1 line 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 12 (7 generated)
rune
ptal
4 years ago (2016-12-07 10:52:46 UTC) #3
meade_UTC10
lgtm
4 years ago (2016-12-07 22:50:21 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2554193002/40001
4 years ago (2016-12-08 08:48:07 UTC) #8
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years ago (2016-12-08 08:55:21 UTC) #10
commit-bot: I haz the power
4 years ago (2016-12-08 08:58:11 UTC) #12
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/f46992525f72e0bdf4331f8cf6fcc31602f307e7
Cr-Commit-Position: refs/heads/master@{#437213}

Powered by Google App Engine
This is Rietveld 408576698