diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-03-19 08:08:56 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-03-19 08:08:56 +0530 |
commit | 2d6283c64be8c052e6b0a06e857950d7f25db353 (patch) | |
tree | fd988e057ce5fe54a1430094a90dbca780fa85c2 /components/script/dom/bindings/codegen/parser | |
parent | 9e0c73c8f3b1941b01c705066815303d59221ffd (diff) | |
parent | 529164e4a5b0fcca67d5a1fa31f17f87c038eadd (diff) | |
download | servo-2d6283c64be8c052e6b0a06e857950d7f25db353.tar.gz servo-2d6283c64be8c052e6b0a06e857950d7f25db353.zip |
Auto merge of #9929 - servo:cascade, r=pcwalton
Refactor the cascade
Converting the specified value of some properties into a computed value depends on the value of other properties. For example, the `em` unit of any length depends on the `font-size` property.
Previously, we would do a first pass over applicable declarations to build up a `values::computed::Context` struct with a number of fields for each such piece of data from other properties.
This simplies the struct by instead having it contain the set of computed values (for a given element) that is being populated and classify properties into "early" and "other", such that the only dependencies can be from "other" to "early". We iterate applicable_declarations twice, first cascading "early" properties then "other". Unfortunately, it’s not easy to check that this classification is correct.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9929)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/codegen/parser')
0 files changed, 0 insertions, 0 deletions