Commit 582acfa6 authored by Zhuoyu Qian's avatar Zhuoyu Qian Committed by Commit Bot

CSS: serialize pointer-events keywords in lower case

https://drafts.csswg.org/cssom/#serializing-css-values

"To serialize a CSS component value depends on the component, as follows:
keyword
The keyword converted to ASCII lowercase."

Bug: 901666
Change-Id: Iff579a363de13441c75bbebfc951095b071f6060
Reviewed-on: https://chromium-review.googlesource.com/c/1317300
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: default avatarEric Willigers <ericwilligers@chromium.org>
Reviewed-by: default avatarEmil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605383}
parent 3c88080a
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
runPropertyTests('pointer-events', [ runPropertyTests('pointer-events', [
{ syntax: 'bounding-box' }, { syntax: 'bounding-box' },
{ syntax: 'visiblePainted' }, { syntax: 'visiblepainted' },
{ syntax: 'visibleFill' }, { syntax: 'visiblefill' },
{ syntax: 'visibleStroke' }, { syntax: 'visiblestroke' },
{ syntax: 'visible' }, { syntax: 'visible' },
{ syntax: 'painted' }, { syntax: 'painted' },
{ syntax: 'fill' }, { syntax: 'fill' },
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// TODO(napper): Generate this table from CSSProperties.in. // TODO(napper): Generate this table from CSSProperties.in.
var independent_properties = [ var independent_properties = [
// [Property name, [list of valid keywords]]. Each keyword is tested in consecutive pairs. // [Property name, [list of valid keywords]]. Each keyword is tested in consecutive pairs.
["pointerEvents", ["none", "auto", "stroke", "fill", "painted", "visible", "visibleStroke", "visibleFill", "visiblePainted", "bounding-box", "all"]], ["pointerEvents", ["none", "auto", "stroke", "fill", "painted", "visible", "visiblestroke", "visiblefill", "visiblepainted", "bounding-box", "all"]],
["visibility", ["visible", "hidden", "collapse"]], ["visibility", ["visible", "hidden", "collapse"]],
["whiteSpace", ["normal", "pre", "pre-wrap", "pre-line", "nowrap"]], ["whiteSpace", ["normal", "pre", "pre-wrap", "pre-line", "nowrap"]],
["borderCollapse", ["separate", "collapse"]], ["borderCollapse", ["separate", "collapse"]],
......
...@@ -2522,8 +2522,8 @@ ...@@ -2522,8 +2522,8 @@
inherited: true, inherited: true,
field_template: "keyword", field_template: "keyword",
keywords: [ keywords: [
"none", "auto", "stroke", "fill", "painted", "visible", "visibleStroke", "none", "auto", "stroke", "fill", "painted", "visible", "visiblestroke",
"visibleFill", "visiblePainted", "bounding-box", "all" "visiblefill", "visiblepainted", "bounding-box", "all"
], ],
typedom_types: ["Keyword"], typedom_types: ["Keyword"],
default_value: "auto", default_value: "auto",
......
...@@ -797,9 +797,9 @@ ...@@ -797,9 +797,9 @@
// //
// pointer-events // pointer-events
// //
"visiblePainted", "visiblepainted",
"visibleFill", "visiblefill",
"visibleStroke", "visiblestroke",
//visible //visible
"painted", "painted",
"fill", "fill",
......
...@@ -665,7 +665,7 @@ bool CSSParserFastPaths::IsValidKeywordPropertyAndValue( ...@@ -665,7 +665,7 @@ bool CSSParserFastPaths::IsValidKeywordPropertyAndValue(
case CSSPropertyPointerEvents: case CSSPropertyPointerEvents:
return value_id == CSSValueVisible || value_id == CSSValueNone || return value_id == CSSValueVisible || value_id == CSSValueNone ||
value_id == CSSValueAll || value_id == CSSValueAuto || value_id == CSSValueAll || value_id == CSSValueAuto ||
(value_id >= CSSValueVisiblePainted && (value_id >= CSSValueVisiblepainted &&
value_id <= CSSValueBoundingBox); value_id <= CSSValueBoundingBox);
case CSSPropertyPosition: case CSSPropertyPosition:
return value_id == CSSValueStatic || value_id == CSSValueRelative || return value_id == CSSValueStatic || value_id == CSSValueRelative ||
......
...@@ -48,7 +48,7 @@ PointerEventsHitRules::PointerEventsHitRules(EHitTesting hit_testing, ...@@ -48,7 +48,7 @@ PointerEventsHitRules::PointerEventsHitRules(EHitTesting hit_testing,
case EPointerEvents::kBoundingBox: case EPointerEvents::kBoundingBox:
can_hit_bounding_box = true; can_hit_bounding_box = true;
break; break;
case EPointerEvents::kVisiblePainted: case EPointerEvents::kVisiblepainted:
case EPointerEvents::kAuto: // "auto" is like "visiblePainted" when in case EPointerEvents::kAuto: // "auto" is like "visiblePainted" when in
// SVG content // SVG content
require_fill = true; require_fill = true;
...@@ -59,11 +59,11 @@ PointerEventsHitRules::PointerEventsHitRules(EHitTesting hit_testing, ...@@ -59,11 +59,11 @@ PointerEventsHitRules::PointerEventsHitRules(EHitTesting hit_testing,
can_hit_fill = true; can_hit_fill = true;
can_hit_stroke = true; can_hit_stroke = true;
break; break;
case EPointerEvents::kVisibleFill: case EPointerEvents::kVisiblefill:
require_visible = true; require_visible = true;
can_hit_fill = true; can_hit_fill = true;
break; break;
case EPointerEvents::kVisibleStroke: case EPointerEvents::kVisiblestroke:
require_visible = true; require_visible = true;
can_hit_stroke = true; can_hit_stroke = true;
break; break;
...@@ -90,7 +90,7 @@ PointerEventsHitRules::PointerEventsHitRules(EHitTesting hit_testing, ...@@ -90,7 +90,7 @@ PointerEventsHitRules::PointerEventsHitRules(EHitTesting hit_testing,
case EPointerEvents::kBoundingBox: case EPointerEvents::kBoundingBox:
can_hit_bounding_box = true; can_hit_bounding_box = true;
break; break;
case EPointerEvents::kVisiblePainted: case EPointerEvents::kVisiblepainted:
case EPointerEvents::kAuto: // "auto" is like "visiblePainted" when in case EPointerEvents::kAuto: // "auto" is like "visiblePainted" when in
// SVG content // SVG content
require_visible = true; require_visible = true;
...@@ -99,8 +99,8 @@ PointerEventsHitRules::PointerEventsHitRules(EHitTesting hit_testing, ...@@ -99,8 +99,8 @@ PointerEventsHitRules::PointerEventsHitRules(EHitTesting hit_testing,
can_hit_fill = true; can_hit_fill = true;
can_hit_stroke = true; can_hit_stroke = true;
break; break;
case EPointerEvents::kVisibleFill: case EPointerEvents::kVisiblefill:
case EPointerEvents::kVisibleStroke: case EPointerEvents::kVisiblestroke:
case EPointerEvents::kVisible: case EPointerEvents::kVisible:
require_visible = true; require_visible = true;
can_hit_fill = true; can_hit_fill = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment