Commit 766bc54b authored by Rob Buis's avatar Rob Buis Committed by Commit Bot

Make -webkit-app-region CSS implementation self-consistent

The property -webkit-app-region went through renames and other changes.
It seems we can settle on none | drag | no-drag. The value none is used
internally as default, make it explicit by allowing it to be specified
in the style.

Bug: 803699

Change-Id: I1ec96c9e436c7595ac7ab34d90bfbfdd9ea48672
Reviewed-on: https://chromium-review.googlesource.com/964381Reviewed-by: default avatarEric Willigers <ericwilligers@chromium.org>
Commit-Queue: Rob Buis <rob.buis@samsung.com>
Cr-Commit-Position: refs/heads/master@{#543671}
parent 6fb4b645
......@@ -3,7 +3,7 @@ This test documents all computed styles on a div element.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-webkit-app-region: no-drag
-webkit-app-region: none
-webkit-appearance: none
-webkit-border-horizontal-spacing: 0px
-webkit-border-image: none
......
......@@ -3,7 +3,7 @@ This test documents all computed styles on a display: none element.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-webkit-app-region: no-drag
-webkit-app-region: none
-webkit-appearance: none
-webkit-border-horizontal-spacing: 0px
-webkit-border-image: none
......
......@@ -3,7 +3,7 @@ This test documents all computed styles on an SVG rect element.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-webkit-app-region: no-drag
-webkit-app-region: none
-webkit-appearance: none
-webkit-border-horizontal-spacing: 0px
-webkit-border-image: none
......
......@@ -751,7 +751,8 @@ bool CSSParserFastPaths::IsValidKeywordPropertyAndValue(
return value_id == CSSValueVisible || value_id == CSSValueHidden ||
value_id == CSSValueCollapse;
case CSSPropertyWebkitAppRegion:
return value_id >= CSSValueDrag && value_id <= CSSValueNoDrag;
return (value_id >= CSSValueDrag && value_id <= CSSValueNoDrag) ||
value_id == CSSValueNone;
case CSSPropertyWebkitAppearance:
return (value_id >= CSSValueCheckbox && value_id <= CSSValueTextarea) ||
value_id == CSSValueNone;
......
......@@ -16,6 +16,8 @@ const CSSValue* WebkitAppRegion::CSSValueFromComputedStyleInternal(
const LayoutObject*,
Node*,
bool allow_visited_style) const {
if (style.DraggableRegionMode() == EDraggableRegionMode::kNone)
return CSSIdentifierValue::Create(CSSValueNone);
return CSSIdentifierValue::Create(style.DraggableRegionMode() ==
EDraggableRegionMode::kDrag
? CSSValueDrag
......
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