| { |
| // This file specifies the fields we want to diff in the various diff functions |
| // in ComputedStyle. |
| |
| parameters: { |
| // The name parameter represents the name of the function to be created. |
| |
| fields_to_diff: { |
| default: [], |
| }, |
| |
| // 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: |
| // 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: [ |
| { |
| name: "ScrollAnchorDisablingPropertyChanged", |
| 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"], |
| methods_to_diff: [ |
| { |
| method: "GetPosition()", |
| field_dependencies: ["position"] |
| }, |
| ] |
| }, |
| { |
| name: "DiffNeedsFullLayoutAndPaintInvalidation", |
| fields_to_diff: ["padding-top", "padding-left", "padding-right", |
| "padding-bottom", "line-height", "font", "-webkit-border-horizontal-spacing", "-webkit-border-vertical-spacing", "TextAutosizingMultiplier"], |
| 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"] |
| }, |
| { |
| method: "FontInternal().LoadingCustomFonts()", |
| field_dependencies: ["font"] |
| }, |
| { |
| method: "HasPseudoStyle(kPseudoIdScrollbar)", |
| field_dependencies: ["StyleType"] |
| }, |
| { |
| method: "BoxDirection()", |
| field_dependencies: ["-webkit-box-direction"] |
| }, |
| { |
| method: "RtlOrdering()", |
| field_dependencies: ["-webkit-rtl-ordering"] |
| }, |
| { |
| method: "GetTextAlign()", |
| field_dependencies: ["text-align"] |
| }, |
| { |
| method: "TextTransform()", |
| field_dependencies: ["text-transform"] |
| }, |
| { |
| method: "Direction()", |
| field_dependencies: ["direction"] |
| }, |
| { |
| method: "WhiteSpace()", |
| field_dependencies: ["white-space"] |
| }, |
| { |
| method: "GetWritingMode()", |
| field_dependencies: ["writing-mode"] |
| }, |
| { |
| method: "OverflowX()", |
| field_dependencies: ["overflow-x"] |
| }, |
| { |
| method: "OverflowY()", |
| field_dependencies: ["overflow-y"] |
| }, |
| { |
| method: "Clear()", |
| field_dependencies: ["clear"] |
| }, |
| { |
| method: "GetUnicodeBidi()", |
| field_dependencies: ["unicode-bidi"] |
| }, |
| { |
| method: "Floating()", |
| field_dependencies: ["float"] |
| }, |
| { |
| method: "OriginalDisplay()", |
| field_dependencies: ["OriginalDisplay"] |
| } |
| ], |
| predicates_to_test: [ |
| { |
| predicate: "TextShadowDataEquivalent(other)", |
| field_dependencies: ["text-shadow"] |
| }, |
| { |
| predicate: "QuotesDataEquivalent(other)", |
| field_dependencies: ["quotes"] |
| }, |
| ] |
| }, |
| { |
| name: "DiffNeedsFullLayout", |
| fields_to_diff: ["width", "min-width", "max-width", "height", "min-height", "max-height", "box-sizing"] |
| }, |
| { |
| name: "DiffNeedsPaintInvalidationObject", |
| methods_to_diff: [ |
| { |
| method: "Visibility()", |
| field_dependencies: ["visibility"] |
| }, |
| { |
| method: "PrintColorAdjust()", |
| field_dependencies: ["-webkit-print-color-adjust"] |
| }, |
| { |
| method: "InsideLink()", |
| field_dependencies: ["InsideLink"] |
| } |
| ] |
| }, |
| { |
| name: "DiffNeedsVisualRectUpdate", |
| methods_to_diff: [ |
| { |
| method: "Visibility()", |
| field_dependencies: ["visibility"] |
| } |
| ] |
| } |
| ], |
| } |