Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 { | 1 { |
| 2 // This file specifies the fields we want to diff in the various diff function s | 2 // This file specifies the fields we want to diff in the various diff function s |
| 3 // in ComputedStyle. | 3 // in ComputedStyle. |
| 4 | 4 |
| 5 parameters: { | 5 parameters: { |
| 6 // The name parameter represents the name of the function to be created. | 6 // The name parameter represents the name of the function to be created. |
| 7 | 7 |
| 8 fields_to_diff: { | 8 fields_to_diff: { |
| 9 }, | 9 }, |
| 10 | 10 |
| 11 // A list of methods to diff (these can be public getters of fields or | 11 // A list of methods to diff (these can be public getters of fields or |
| 12 // functions that use fields to determine a value). | 12 // functions that use fields to determine a value). |
| 13 // Each entry is expressed as a dict of two fields. | 13 // Each entry is expressed as a dict of two fields. |
| 14 // The fields are method - the method to be diffed and field_dependencies | 14 // The fields are: |
| 15 // which lists the properties this method depends on. | 15 // 1. method - the method to be diffed |
| 16 // 2. field_dependencies - lists the properties this method depends on. | |
| 16 methods_to_diff: { | 17 methods_to_diff: { |
| 17 default: [], | 18 default: [], |
| 18 }, | 19 }, |
| 20 | |
| 21 // A list of predicates that have the diff logic built into them and are onl y | |
| 22 // called by the diff functions in ComputedStyle. | |
| 23 // Each entry is expressed as a dict of two fields. | |
| 24 // 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.
| |
| 25 // 1. predicate - the predicate to be tested | |
| 26 // 2. field_dependencies -lists the properties this predicate test depends o n. | |
|
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.
| |
| 27 // TODO: Note that you also have to pass in the arguments for the predicate. | |
| 28 // This may be removed in the future if we are always passing the other Comp utedStyle | |
| 29 predicates_to_test: { | |
| 30 default: [], | |
| 31 }, | |
| 19 }, | 32 }, |
| 20 data: [ | 33 data: [ |
| 21 { | 34 { |
| 22 name: "ScrollAnchorDisablingPropertyChanged", | 35 name: "ScrollAnchorDisablingPropertyChanged", |
| 23 fields_to_diff: ["width", "min-width", "max-width", "height", "min-heigh t", "max-height", "margin-top", "margin-left", "margin-right", "margin-bottom", | 36 fields_to_diff: ["width", "min-width", "max-width", "height", "min-heigh t", "max-height", "margin-top", "margin-left", "margin-right", "margin-bottom", |
| 24 "left", "right", "top", "bottom", "padding-top", | 37 "left", "right", "top", "bottom", "padding-top", |
| 25 "padding-left", "padding-right", "padding-bottom"] | 38 "padding-left", "padding-right", "padding-bottom"] |
| 26 }, | 39 }, |
| 27 { | 40 { |
| 28 name: "DiffNeedsFullLayoutAndPaintInvalidation", | 41 name: "DiffNeedsFullLayoutAndPaintInvalidation", |
| 29 fields_to_diff: ["padding-top", "padding-left", "padding-right", | 42 fields_to_diff: ["padding-top", "padding-left", "padding-right", |
| 30 "padding-bottom", "line-height", "font", "-webkit-border-horizon tal-spacing", "-webkit-border-vertical-spacing"], | 43 "padding-bottom", "line-height", "font", "-webkit-border-horizon tal-spacing", "-webkit-border-vertical-spacing"], |
| 31 methods_to_diff: [ | 44 methods_to_diff: [ |
| 32 { | 45 { |
| 33 method: "BorderLeftWidth()", | 46 method: "BorderLeftWidth()", |
| 34 field_dependencies: ["border-left-width"] | 47 field_dependencies: ["border-left-width"] |
| 35 }, | 48 }, |
| 36 { | 49 { |
| 37 method: "BorderTopWidth()", | 50 method: "BorderTopWidth()", |
| 38 field_dependencies: ["border-top-width"] | 51 field_dependencies: ["border-top-width"] |
| 39 }, | 52 }, |
| 40 { | 53 { |
| 41 method: "BorderBottomWidth()", | 54 method: "BorderBottomWidth()", |
| 42 field_dependencies: ["border-bottom-width"] | 55 field_dependencies: ["border-bottom-width"] |
| 43 }, | 56 }, |
| 44 { | 57 { |
| 45 method: "BorderRightWidth()", | 58 method: "BorderRightWidth()", |
| 46 field_dependencies: ["border-right-width"] | 59 field_dependencies: ["border-right-width"] |
| 47 } | 60 } |
| 61 ], | |
| 62 predicates_to_test: [ | |
| 63 { | |
| 64 predicate: "TextShadowDataEquivalent(other)", | |
| 65 field_dependencies: ["text-shadow"] | |
| 66 }, | |
| 67 { | |
| 68 predicate: "QuotesDataEquivalent(other)", | |
| 69 field_dependencies: ["quotes"] | |
| 70 }, | |
| 48 ] | 71 ] |
| 49 }, | 72 }, |
| 50 { | 73 { |
| 51 name: "DiffNeedsFullLayout", | 74 name: "DiffNeedsFullLayout", |
| 52 fields_to_diff: ["width", "min-width", "max-width", "height", "min-heigh t", "max-height", "box-sizing"] | 75 fields_to_diff: ["width", "min-width", "max-width", "height", "min-heigh t", "max-height", "box-sizing"] |
| 53 } | 76 } |
| 54 ], | 77 ], |
| 55 } | 78 } |
| OLD | NEW |