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

Unified 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, 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 0bffbec7200999563b7defd7a8028006ee679b3e..5d226d7c1b39674975465214a8e4ca0f1137dc99 100644
--- a/third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5
+++ b/third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5
@@ -11,12 +11,23 @@
// 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.
+ // Each entry is expressed as a dict of two fields:
+ // 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:
+ // 1. predicate: the predicate to be tested
+ // 2. field_dependencies: lists the properties this predicate test depends on.
+ // 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: [
{
@@ -111,6 +122,16 @@
{
method: "OriginalDisplay()",
field_dependencies: ["OriginalDisplay"]
+ }
+ ],
+ predicates_to_test: [
+ {
+ predicate: "TextShadowDataEquivalent(other)",
+ field_dependencies: ["text-shadow"]
+ },
+ {
+ predicate: "QuotesDataEquivalent(other)",
+ field_dependencies: ["quotes"]
},
]
},

Powered by Google App Engine
This is Rietveld 408576698