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

Unified Diff: third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/config-templates.js

Issue 2867883003: [CSS Typed OM] Delete obsolete number and length classes from Typed OM (Closed)
Patch Set: rebase 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/LayoutTests/typedcssom/inlinestyle/properties/config-templates.js
diff --git a/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/config-templates.js b/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/config-templates.js
index 505c0d37a77a19a3c33261759edcce9312659020..7a9ec47069e32477e04cb622bf6d837240a555b7 100644
--- a/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/config-templates.js
+++ b/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/config-templates.js
@@ -6,76 +6,76 @@
let config_templates = {};
config_templates.lengthConfig_ = {
validObjects: [
- new CSSSimpleLength(1, 'px'),
- new CSSSimpleLength(3, 'em'),
- new CSSSimpleLength(4, 'ex'),
- new CSSSimpleLength(5, 'ch'),
- new CSSSimpleLength(6, 'rem'),
- new CSSSimpleLength(7, 'vw'),
- new CSSSimpleLength(8, 'vh'),
- new CSSSimpleLength(9, 'vmin'),
- new CSSSimpleLength(10, 'vmax'),
- new CSSSimpleLength(11, 'cm'),
- new CSSSimpleLength(12, 'mm'),
- new CSSSimpleLength(13, 'in'),
- new CSSSimpleLength(14, 'pc'),
- new CSSSimpleLength(15, 'pt'),
- // Fully populated calc (no percent)
- new CSSCalcLength({
- px: 1200,
- em: 4.5,
- ex: -6.7,
- ch: 8.9,
- rem: -10,
- vw: 1.1,
- vh: -1.2,
- vmin: 1.3,
- vmax: -1.4,
- cm: 1.56,
- mm: -1.7,
- in: 1.8,
- pc: -1.9,
- pt: 2.1}),
- // Contains only px
- new CSSCalcLength({px: 10}),
- // Contains neither pixels or percent
- new CSSCalcLength({vmin: 5, in: 10}),
+ new CSSUnitValue(1, 'px'),
+ new CSSUnitValue(3, 'em'),
+ new CSSUnitValue(4, 'ex'),
+ new CSSUnitValue(5, 'ch'),
+ new CSSUnitValue(6, 'rem'),
+ new CSSUnitValue(7, 'vw'),
+ new CSSUnitValue(8, 'vh'),
+ new CSSUnitValue(9, 'vmin'),
+ new CSSUnitValue(10, 'vmax'),
+ new CSSUnitValue(11, 'cm'),
+ new CSSUnitValue(12, 'mm'),
+ new CSSUnitValue(13, 'in'),
+ new CSSUnitValue(14, 'pc'),
+ new CSSUnitValue(15, 'pt'),
+ // // Fully populated calc (no percent)
+ // new CSSCalcValue({
+ // px: 1200,
+ // em: 4.5,
+ // ex: -6.7,
+ // ch: 8.9,
+ // rem: -10,
+ // vw: 1.1,
+ // vh: -1.2,
+ // vmin: 1.3,
+ // vmax: -1.4,
+ // cm: 1.56,
+ // mm: -1.7,
+ // in: 1.8,
+ // pc: -1.9,
+ // pt: 2.1}),
+ // // Contains only px
+ // new CSSCalcValue({px: 10}),
+ // // Contains neither pixels or percent
+ // new CSSCalcValue({vmin: 5, in: 10}),
],
validStringMappings: {
- // Contains multiplication
- 'calc(3 * (5px - 3em))': new CSSCalcLength({px: 15, em: -9}),
- // Contains division
- 'calc((5vmin + 1mm) / 2)': new CSSCalcLength({vmin: 2.5, mm: 0.5}),
+ // // Contains multiplication
+ // 'calc(3 * (5px - 3em))': new CSSCalcValue({px: 15, em: -9}),
+ // // Contains division
+ // 'calc((5vmin + 1mm) / 2)': new CSSCalcValue({vmin: 2.5, mm: 0.5}),
},
supportsMultiple: false,
- invalidObjects: [new CSSNumberValue(1)]
+ invalidObjects: [new CSSUnitValue(1, 'number')]
};
config_templates.lengthPercentConfig_ = Object.assign(
{}, config_templates.lengthConfig_);
config_templates.lengthPercentConfig_.validObjects.concat([
- new CSSSimpleLength(2, 'percent'),
+ new CSSUnitValue(2, 'percent'),
// Fully populated calc
- new CSSCalcLength({
- px: 1200,
- percent: -2.3,
- em: 4.5,
- ex: -6.7,
- ch: 8.9,
- rem: -10,
- vw: 1.1,
- vh: -1.2,
- vmin: 1.3,
- vmax: -1.4,
- cm: 1.56,
- mm: -1.7,
- in: 1.8,
- pc: -1.9,
- pt: 2.1}),
- // Contains only percent
- new CSSCalcLength({percent: 10}),
- // Contains px and percent
- new CSSCalcLength({px: 6, percent: 10})
+ // new CSSCalcValue({
+ // px: 1200,
+ // percent: -2.3,
+ // em: 4.5,
+ // ex: -6.7,
+ // ch: 8.9,
+ // rem: -10,
+ // vw: 1.1,
+ // vh: -1.2,
+ // vmin: 1.3,
+ // vmax: -1.4,
+ // cm: 1.56,
+ // mm: -1.7,
+ // in: 1.8,
+ // pc: -1.9,
+ // pt: 2.1}),
+ // // Contains only percent
+ // new CSSCalcValue({percent: 10}),
+ // // Contains px and percent
+ // new CSSCalcValue({px: 6, percent: 10})
]);
config_templates.borderConfig_ = {
@@ -96,7 +96,7 @@ config_templates.borderConfig_ = {
validObjects: [
],
supportsMultiple: false,
- invalidObjects: [new CSSSimpleLength(4, 'px')]
+ invalidObjects: [new CSSUnitValue(4, 'px')]
};
config_templates.lengthConfig = function() {

Powered by Google App Engine
This is Rietveld 408576698