Skip to content

Commit

Permalink
Don't add borderbox to a path with other arguments.
Browse files Browse the repository at this point in the history
As borderbox is the default for a clip path, if there are any other
arguments for the clip-path style property, we don't add 'border-box' to
the value.

Bug: 1457596

Change-Id: I83f8d57c63367678266954f30671e67d1a38ae07
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4936936
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Yotam Hacohen <yotha@chromium.org>
Auto-Submit: Yotam Hacohen <yotha@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1209594}
  • Loading branch information
yotam-hacohen authored and Chromium LUCI CQ committed Oct 13, 2023
1 parent 632aadc commit 3c9a23e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1746,7 +1746,11 @@ const CSSValue* ClipPath::ParseSingleValue(CSSParserTokenRange& range,
list->Append(*basic_shape);
}
if (geometry_box) {
list->Append(*geometry_box);
if (list->length() == 0 ||
To<CSSIdentifierValue>(geometry_box)->GetValueID() !=
CSSValueID::kBorderBox) {
list->Append(*geometry_box);
}
}
return list;
}
Expand Down

This file was deleted.

0 comments on commit 3c9a23e

Please sign in to comment.