Bug 126147 - Support <box> values parsing on 'clip-path' property
Summary: Support <box> values parsing on 'clip-path' property
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 126207 126148
  Show dependency treegraph
 
Reported: 2013-12-22 23:32 PST by Dirk Schulze
Modified: 2013-12-27 07:08 PST (History)
8 users (show)

See Also:


Attachments
Patch (14.21 KB, patch)
2013-12-22 23:52 PST, Dirk Schulze
rniwa: review+
Details | Formatted Diff | Diff
Patch (14.09 KB, patch)
2013-12-25 09:34 PST, Dirk Schulze
commit-queue: commit-queue-
Details | Formatted Diff | Diff
Patch (14.09 KB, patch)
2013-12-25 10:01 PST, Dirk Schulze
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schulze 2013-12-22 23:32:07 PST
The new syntax of clip-path supports <box> values as specified for background. In addition the keywords 'margin-box' and 'bounding-box' are supported.
Comment 1 Dirk Schulze 2013-12-22 23:52:26 PST
Created attachment 219894 [details]
Patch
Comment 2 Ryosuke Niwa 2013-12-24 01:23:07 PST
Comment on attachment 219894 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=219894&action=review

> Source/WebCore/ChangeLog:13
> +        http://dev.w3.org/fxtf/masking/#the-clip-path

Could you refer to a specific revision of the specification you used to implement
so that we know exactly what the reference point was should the spec change in the future.

> Source/WebCore/css/CSSParser.cpp:5929
> +    if (!shapeFound && value->unit == CSSParserValue::Function) {
> +        RefPtr<CSSBasicShape> shapeValue = parseBasicShape();
> +        if (!shapeValue)
> +            return nullptr;
> +        list->append(cssValuePool().createValue(shapeValue.release()));
> +    } else if (shapeFound && (isBoxValue(valueId) || valueId == CSSValueBoundingBox)) {
> +        list->append(parseValidPrimitive(valueId, value));
> +        m_valueList->next();

It seems strange to repeat this code given shape and box cannot appear twice.
I would refer an approach where we have a loop and guarantee that we run it at most twice,
and making sure that shape & box are parsed at most once.
Comment 3 Dirk Schulze 2013-12-25 09:34:16 PST
Created attachment 219989 [details]
Patch
Comment 4 WebKit Commit Bot 2013-12-25 09:39:18 PST
Comment on attachment 219989 [details]
Patch

Rejecting attachment 219989 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-03', 'validate-changelog', '--check-oops', '--non-interactive', 219989, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

ChangeLog entry in LayoutTests/ChangeLog contains OOPS!.

Full output: http://webkit-queues.appspot.com/results/6429664826359808
Comment 5 Dirk Schulze 2013-12-25 10:01:35 PST
Created attachment 219990 [details]
Patch
Comment 6 WebKit Commit Bot 2013-12-25 11:00:19 PST
Comment on attachment 219990 [details]
Patch

Clearing flags on attachment: 219990

Committed r161067: <http://trac.webkit.org/changeset/161067>
Comment 7 WebKit Commit Bot 2013-12-25 11:00:22 PST
All reviewed patches have been landed.  Closing bug.