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 @@
runPropertyTests('pointer-events', [
{ syntax: 'bounding-box' },
{ syntax: 'visiblePainted' },
{ syntax: 'visibleFill' },
{ syntax: 'visibleStroke' },
{ syntax: 'visiblepainted' },
{ syntax: 'visiblefill' },
{ syntax: 'visiblestroke' },
{ syntax: 'visible' },
{ syntax: 'painted' },
{ syntax: 'fill' },
......
......@@ -13,7 +13,7 @@
// TODO(napper): Generate this table from CSSProperties.in.
var independent_properties = [
// [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"]],
["whiteSpace", ["normal", "pre", "pre-wrap", "pre-line", "nowrap"]],
["borderCollapse", ["separate", "collapse"]],
......
......@@ -2522,8 +2522,8 @@
inherited: true,
field_template: "keyword",
keywords: [
"none", "auto", "stroke", "fill", "painted", "visible", "visibleStroke",
"visibleFill", "visiblePainted", "bounding-box", "all"
"none", "auto", "stroke", "fill", "painted", "visible", "visiblestroke",
"visiblefill", "visiblepainted", "bounding-box", "all"
],
typedom_types: ["Keyword"],
default_value: "auto",
......
......@@ -797,9 +797,9 @@
//
// pointer-events
//
"visiblePainted",
"visibleFill",
"visibleStroke",
"visiblepainted",
"visiblefill",
"visiblestroke",
//visible
"painted",
"fill",
......
......@@ -665,7 +665,7 @@ bool CSSParserFastPaths::IsValidKeywordPropertyAndValue(
case CSSPropertyPointerEvents:
return value_id == CSSValueVisible || value_id == CSSValueNone ||
value_id == CSSValueAll || value_id == CSSValueAuto ||
(value_id >= CSSValueVisiblePainted &&
(value_id >= CSSValueVisiblepainted &&
value_id <= CSSValueBoundingBox);
case CSSPropertyPosition:
return value_id == CSSValueStatic || value_id == CSSValueRelative ||
......
......@@ -48,7 +48,7 @@ PointerEventsHitRules::PointerEventsHitRules(EHitTesting hit_testing,
case EPointerEvents::kBoundingBox:
can_hit_bounding_box = true;
break;
case EPointerEvents::kVisiblePainted:
case EPointerEvents::kVisiblepainted:
case EPointerEvents::kAuto: // "auto" is like "visiblePainted" when in
// SVG content
require_fill = true;
......@@ -59,11 +59,11 @@ PointerEventsHitRules::PointerEventsHitRules(EHitTesting hit_testing,
can_hit_fill = true;
can_hit_stroke = true;
break;
case EPointerEvents::kVisibleFill:
case EPointerEvents::kVisiblefill:
require_visible = true;
can_hit_fill = true;
break;
case EPointerEvents::kVisibleStroke:
case EPointerEvents::kVisiblestroke:
require_visible = true;
can_hit_stroke = true;
break;
......@@ -90,7 +90,7 @@ PointerEventsHitRules::PointerEventsHitRules(EHitTesting hit_testing,
case EPointerEvents::kBoundingBox:
can_hit_bounding_box = true;
break;
case EPointerEvents::kVisiblePainted:
case EPointerEvents::kVisiblepainted:
case EPointerEvents::kAuto: // "auto" is like "visiblePainted" when in
// SVG content
require_visible = true;
......@@ -99,8 +99,8 @@ PointerEventsHitRules::PointerEventsHitRules(EHitTesting hit_testing,
can_hit_fill = true;
can_hit_stroke = true;
break;
case EPointerEvents::kVisibleFill:
case EPointerEvents::kVisibleStroke:
case EPointerEvents::kVisiblefill:
case EPointerEvents::kVisiblestroke:
case EPointerEvents::kVisible:
require_visible = 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