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

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: Created 3 years, 7 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 }, 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 method - the method to be diffed and field_dependencies
15 // which lists the properties this method depends on. 15 // which lists the properties this method depends on.
16 methods_to_diff: { 16 methods_to_diff: {
17 default: [], 17 default: [],
18 }, 18 },
19
20 // A list of predicates that have the diff logic built into them and are onl y
21 // called by the diff functions in ComputedStyle.
22 // Each entry is expressed as a dict of two fields.
23 // The fields are predicate - the predicate to be tested and field_dependenc ies
24 // which lists the properties this predicate test depends on.
alancutter (OOO until 2018) 2017/05/24 07:29:36 List the config fields with bullet points or a ske
nainar 2017/05/24 08:01:45 Done.
25 predicates_to_test: {
26 default: [],
27 },
19 }, 28 },
20 data: [ 29 data: [
21 { 30 {
22 name: "ScrollAnchorDisablingPropertyChanged", 31 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", 32 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", 33 "left", "right", "top", "bottom", "padding-top",
25 "padding-left", "padding-right", "padding-bottom"] 34 "padding-left", "padding-right", "padding-bottom"]
26 }, 35 },
27 { 36 {
28 name: "DiffNeedsFullLayoutAndPaintInvalidation", 37 name: "DiffNeedsFullLayoutAndPaintInvalidation",
29 fields_to_diff: ["padding-top", "padding-left", "padding-right", 38 fields_to_diff: ["padding-top", "padding-left", "padding-right",
30 "padding-bottom", "line-height", "font", "-webkit-border-horizon tal-spacing", "-webkit-border-vertical-spacing"], 39 "padding-bottom", "line-height", "font", "-webkit-border-horizon tal-spacing", "-webkit-border-vertical-spacing"],
31 methods_to_diff: [ 40 methods_to_diff: [
32 { 41 {
33 method: "BorderLeftWidth()", 42 method: "BorderLeftWidth()",
34 field_dependencies: ["border-left-width"] 43 field_dependencies: ["border-left-width"]
35 }, 44 },
36 { 45 {
37 method: "BorderTopWidth()", 46 method: "BorderTopWidth()",
38 field_dependencies: ["border-top-width"] 47 field_dependencies: ["border-top-width"]
39 }, 48 },
40 { 49 {
41 method: "BorderBottomWidth()", 50 method: "BorderBottomWidth()",
42 field_dependencies: ["border-bottom-width"] 51 field_dependencies: ["border-bottom-width"]
43 }, 52 },
44 { 53 {
45 method: "BorderRightWidth()", 54 method: "BorderRightWidth()",
46 field_dependencies: ["border-right-width"] 55 field_dependencies: ["border-right-width"]
47 } 56 }
57 ],
58 predicates_to_test: [
59 {
60 predicate: "TextShadowDataEquivalent(other)",
nainar 2017/05/22 03:45:29 could add the other as an argument bit in field.tm
shend 2017/05/22 03:51:05 I would prefer not writing "other" in here, but it
nainar1 2017/05/22 03:52:55 Yeah - I think leaving it here for the MVP and the
61 field_dependencies: ["text-shadow"]
62 },
63 {
64 predicate: "QuotesDataEquivalent(other)",
65 field_dependencies: ["quotes"]
66 },
48 ] 67 ]
49 }, 68 },
50 { 69 {
51 name: "DiffNeedsFullLayout", 70 name: "DiffNeedsFullLayout",
52 fields_to_diff: ["width", "min-width", "max-width", "height", "min-heigh t", "max-height", "box-sizing"] 71 fields_to_diff: ["width", "min-width", "max-width", "height", "min-heigh t", "max-height", "box-sizing"]
53 } 72 }
54 ], 73 ],
55 } 74 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698