[@property] Support @property in user stylesheets
It's currently a bit tricky to add support for this, because StyleEngine can't currently gracefully support the scenario of user/author rules sharing a single storage location. (We have a similar issue with the font cache). This CL handles @property rules roughly the same way as @font-face rules are handled: - When adding user @property rules, clear all rules (including author), then add user rules. - MarkDocumentDirty + SetNeedsAppendAllSheets, to ensure that we ApplyRuleSetChanges for author rules. - When adding author @property rules, clear all rules (including user), then add all user rules, then author rules. This should cover all the different cases where only user sheets are present/modified, only author sheets present/modified, or when both types of sheets are present/modified. It's a bit of extra clear/add churn, but storing author/user rules separately will add much more complexity (e.g. to PropertyRegistry:: Iterator). Note: I seem to have declared ClearPropertyRules in a previous CL without defining it. Bug: 973830 Change-Id: Id8e490665c2bae371578311eb0636ca7e74b480b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2236141Reviewed-by:Rune Lillesveen <futhark@chromium.org> Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Cr-Commit-Position: refs/heads/master@{#776932}
Showing
Please register or sign in to comment