Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5 |
| diff --git a/third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5 b/third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5 |
| index 0c84d05f0b9dd5f64b16de7bf6cdcb81b736a00e..aac622d291480d7efde228cce49da8e6569ac63d 100644 |
| --- a/third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5 |
| +++ b/third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5 |
| @@ -11,11 +11,24 @@ |
| // A list of methods to diff (these can be public getters of fields or |
| // functions that use fields to determine a value). |
| // Each entry is expressed as a dict of two fields. |
| - // The fields are method - the method to be diffed and field_dependencies |
| - // which lists the properties this method depends on. |
| + // The fields are: |
| + // 1. method - the method to be diffed |
| + // 2. field_dependencies - lists the properties this method depends on. |
| methods_to_diff: { |
| default: [], |
| }, |
| + |
| + // A list of predicates that have the diff logic built into them and are only |
| + // called by the diff functions in ComputedStyle. |
| + // Each entry is expressed as a dict of two fields. |
| + // The fields are: |
|
alancutter (OOO until 2018)
2017/05/25 01:59:20
No need for this line, just end the previous line
nainar
2017/05/25 02:04:26
Done.
|
| + // 1. predicate - the predicate to be tested |
| + // 2. field_dependencies -lists the properties this predicate test depends on. |
|
alancutter (OOO until 2018)
2017/05/25 01:59:20
Missing space. Maybe use : instead of - to match w
nainar
2017/05/25 02:04:26
Done.
|
| + // TODO: Note that you also have to pass in the arguments for the predicate. |
| + // This may be removed in the future if we are always passing the other ComputedStyle |
| + predicates_to_test: { |
| + default: [], |
| + }, |
| }, |
| data: [ |
| { |
| @@ -45,6 +58,16 @@ |
| method: "BorderRightWidth()", |
| field_dependencies: ["border-right-width"] |
| } |
| + ], |
| + predicates_to_test: [ |
| + { |
| + predicate: "TextShadowDataEquivalent(other)", |
| + field_dependencies: ["text-shadow"] |
| + }, |
| + { |
| + predicate: "QuotesDataEquivalent(other)", |
| + field_dependencies: ["quotes"] |
| + }, |
| ] |
| }, |
| { |