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

Unified Diff: third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5

Issue 2876803003: Generate diffs for fields in ComputedStyle that use their public getters (Closed)
Patch Set: alancutter@'s suggestions 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 side-by-side diff with in-line comments
Download patch
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 ceb9657597ee2c714912264d3f81c2df46906717..e88af56f305fdbf3bc910d4311f48023b23f3147 100644
--- a/third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5
+++ b/third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5
@@ -5,25 +5,51 @@
parameters: {
// The name parameter represents the name of the function to be created.
- // The fields that need to be diffed.
- fields: {
+ fields_to_diff: {
+ },
+
+ // 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.
+ methods_to_diff: {
+ default: [],
},
},
data: [
{
name: "ScrollAnchorDisablingPropertyChanged",
- fields: ["width", "min-width", "max-width", "height", "min-height", "max-height", "margin-top", "margin-left", "margin-right", "margin-bottom",
+ fields_to_diff: ["width", "min-width", "max-width", "height", "min-height", "max-height", "margin-top", "margin-left", "margin-right", "margin-bottom",
"left", "right", "top", "bottom", "padding-top",
"padding-left", "padding-right", "padding-bottom"]
},
{
name: "DiffNeedsFullLayoutAndPaintInvalidation",
- fields: ["padding-top", "padding-left", "padding-right",
- "padding-bottom"]
+ fields_to_diff: ["padding-top", "padding-left", "padding-right",
+ "padding-bottom"],
+ methods_to_diff: [
+ {
+ method: "BorderLeftWidth()",
+ field_dependencies: ["border-left-width"]
+ },
+ {
+ method: "BorderTopWidth()",
+ field_dependencies: ["border-top-width"]
+ },
+ {
+ method: "BorderBottomWidth()",
+ field_dependencies: ["border-bottom-width"]
+ },
+ {
+ method: "BorderRightWidth()",
+ field_dependencies: ["border-right-width"]
+ }
+ ]
},
{
name: "DiffNeedsFullLayout",
- fields: ["width", "min-width", "max-width", "height", "min-height", "max-height", "box-sizing"]
+ fields_to_diff: ["width", "min-width", "max-width", "height", "min-height", "max-height", "box-sizing"]
}
],
}

Powered by Google App Engine
This is Rietveld 408576698