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

Side by Side Diff: third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5

Issue 2902433002: Generates predicates to test in diff functions in ComputedStyle (Closed)
Patch Set: format changes Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 default: [], 9 default: [],
10 }, 10 },
11 11
12 // A list of methods to diff (these can be public getters of fields or 12 // A list of methods to diff (these can be public getters of fields or
13 // functions that use fields to determine a value). 13 // functions that use fields to determine a value).
14 // Each entry is expressed as a dict of two fields. 14 // Each entry is expressed as a dict of two fields:
15 // The fields are method - the method to be diffed and field_dependencies 15 // 1. method: the method to be diffed
16 // which lists the properties this method depends on. 16 // 2. field_dependencies: lists the properties this method depends on.
17 methods_to_diff: { 17 methods_to_diff: {
18 default: [], 18 default: [],
19 }, 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 // 1. predicate: the predicate to be tested
25 // 2. field_dependencies: lists the properties this predicate test depends o n.
26 // TODO: Note that you also have to pass in the arguments for the predicate.
27 // This may be removed in the future if we are always passing the other Comp utedStyle
28 predicates_to_test: {
29 default: [],
30 },
20 }, 31 },
21 data: [ 32 data: [
22 { 33 {
23 name: "ScrollAnchorDisablingPropertyChanged", 34 name: "ScrollAnchorDisablingPropertyChanged",
24 fields_to_diff: ["width", "min-width", "max-width", "height", "min-heigh t", "max-height", "margin-top", "margin-left", "margin-right", "margin-bottom", 35 fields_to_diff: ["width", "min-width", "max-width", "height", "min-heigh t", "max-height", "margin-top", "margin-left", "margin-right", "margin-bottom",
25 "left", "right", "top", "bottom", "padding-top", 36 "left", "right", "top", "bottom", "padding-top",
26 "padding-left", "padding-right", "padding-bottom"], 37 "padding-left", "padding-right", "padding-bottom"],
27 methods_to_diff: [ 38 methods_to_diff: [
28 { 39 {
29 method: "GetPosition()", 40 method: "GetPosition()",
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 method: "GetUnicodeBidi()", 115 method: "GetUnicodeBidi()",
105 field_dependencies: ["unicode-bidi"] 116 field_dependencies: ["unicode-bidi"]
106 }, 117 },
107 { 118 {
108 method: "Floating()", 119 method: "Floating()",
109 field_dependencies: ["float"] 120 field_dependencies: ["float"]
110 }, 121 },
111 { 122 {
112 method: "OriginalDisplay()", 123 method: "OriginalDisplay()",
113 field_dependencies: ["OriginalDisplay"] 124 field_dependencies: ["OriginalDisplay"]
125 }
126 ],
127 predicates_to_test: [
128 {
129 predicate: "TextShadowDataEquivalent(other)",
130 field_dependencies: ["text-shadow"]
131 },
132 {
133 predicate: "QuotesDataEquivalent(other)",
134 field_dependencies: ["quotes"]
114 }, 135 },
115 ] 136 ]
116 }, 137 },
117 { 138 {
118 name: "DiffNeedsFullLayout", 139 name: "DiffNeedsFullLayout",
119 fields_to_diff: ["width", "min-width", "max-width", "height", "min-heigh t", "max-height", "box-sizing"] 140 fields_to_diff: ["width", "min-width", "max-width", "height", "min-heigh t", "max-height", "box-sizing"]
120 }, 141 },
121 { 142 {
122 name: "DiffNeedsPaintInvalidationObject", 143 name: "DiffNeedsPaintInvalidationObject",
123 methods_to_diff: [ 144 methods_to_diff: [
(...skipping 15 matching lines...) Expand all
139 name: "DiffNeedsVisualRectUpdate", 160 name: "DiffNeedsVisualRectUpdate",
140 methods_to_diff: [ 161 methods_to_diff: [
141 { 162 {
142 method: "Visibility()", 163 method: "Visibility()",
143 field_dependencies: ["visibility"] 164 field_dependencies: ["visibility"]
144 } 165 }
145 ] 166 ]
146 } 167 }
147 ], 168 ],
148 } 169 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698