Bug 101108 - [CSS Exclusions] Support outside-shape value on shape-inside
Summary: [CSS Exclusions] Support outside-shape value on shape-inside
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Bear Travis
URL:
Keywords:
Depends on:
Blocks: 89256 102571
  Show dependency treegraph
 
Reported: 2012-11-02 15:00 PDT by Bear Travis
Modified: 2012-11-20 14:40 PST (History)
6 users (show)

See Also:


Attachments
Initial patch (33.90 KB, patch)
2012-11-16 14:43 PST, Bear Travis
no flags Details | Formatted Diff | Diff
Fixing windows build failure (33.93 KB, patch)
2012-11-19 11:16 PST, Bear Travis
no flags Details | Formatted Diff | Diff
Incorporating Dirk's feedback (33.16 KB, patch)
2012-11-19 16:41 PST, Bear Travis
no flags Details | Formatted Diff | Diff
Updating patch (33.12 KB, patch)
2012-11-20 11:14 PST, Bear Travis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bear Travis 2012-11-02 15:00:08 PDT
Make sure values outside-shape and auto work properly
Comment 1 Bear Travis 2012-11-16 14:43:37 PST
Created attachment 174764 [details]
Initial patch

Patch adding CSS support for the 'outside-shape' value of shape-inside. Layout support to follow in a subsequent patch.
Comment 2 Build Bot 2012-11-16 20:41:05 PST
Comment on attachment 174764 [details]
Initial patch

Attachment 174764 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/14872382
Comment 3 Bear Travis 2012-11-19 11:16:47 PST
Created attachment 175009 [details]
Fixing windows build failure

Changing ExclusionShapeValue to not conditionally compile, as RenderStyle::shapeInside/Outside must return a value regardless of whether CSS Exclusions are enabled.
Comment 4 Dirk Schulze 2012-11-19 15:04:58 PST
Comment on attachment 175009 [details]
Fixing windows build failure

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

I think OutsideExclusionShapeValue does not make any sense. It is adding a new class without any sense IMO.

> Source/WebCore/ChangeLog:11
> +        auto (null), basic shape, or outside-shape. Eventually there will be a url

Well, it is <shape> (a Basic Shape), 'outside-shape' and 'auto'. It should be more clear here.

> Source/WebCore/css/CSSValueKeywords.in:917
>  // -webkit-wrap-shape

this is not called wrap-shape anymore, is it? Can you update this comment please?

> Source/WebCore/css/StyleBuilder.cpp:1734
> +                setValue(styleResolver->style(), OutsideExclusionShapeValue::create());

There should be an FIXME here, with a link to a bug report.

> Source/WebCore/page/animation/CSSPropertyAnimation.cpp:155
> +    const BasicShape* fromShape = static_cast<ShapeExclusionShapeValue*>(from)->shape();
> +    const BasicShape* toShape = static_cast<ShapeExclusionShapeValue*>(to)->shape();
> +
> +    if (!fromShape->canBlend(toShape))
> +        return to;

You may want to blend with outside shape in the future. Please add an FIXME here.

> Source/WebCore/rendering/RenderBlock.h:525
> +    void updateExclusionShapeInsideInfoAfterStyleChange(const ExclusionShapeValue*, const ExclusionShapeValue* oldWrapShape);

Can you rename it to oldExclusionShape?

> Source/WebCore/rendering/style/ExclusionShapeValue.h:69
> +    : ExclusionShapeValue(SHAPE)
> +    , m_shape(shape)

indentation looks wrong here.

> Source/WebCore/rendering/style/ExclusionShapeValue.h:83
> +class OutsideExclusionShapeValue : public ExclusionShapeValue {
> +public:
> +    static PassRefPtr<OutsideExclusionShapeValue> create()
> +    {
> +        return adoptRef(new OutsideExclusionShapeValue());
> +    }
> +
> +private:
> +    OutsideExclusionShapeValue() : ExclusionShapeValue(OUTSIDE) { }
> +};

I don't think that you need to create this class at this point. It doesn't have any information. Just use ExclusionShapeValue for everything and remove OutsideExclusionShapeValue and ShapeExclusionShapeValue for now. Then we don't have unnecessary vtables and inheritance.
Comment 5 Bear Travis 2012-11-19 16:41:22 PST
Created attachment 175074 [details]
Incorporating Dirk's feedback
Comment 6 Bear Travis 2012-11-20 11:14:30 PST
Created attachment 175249 [details]
Updating patch
Comment 7 Dirk Schulze 2012-11-20 14:08:13 PST
Comment on attachment 175249 [details]
Updating patch

LGTM. r=me
Comment 8 WebKit Review Bot 2012-11-20 14:40:20 PST
Comment on attachment 175249 [details]
Updating patch

Clearing flags on attachment: 175249

Committed r135314: <http://trac.webkit.org/changeset/135314>
Comment 9 WebKit Review Bot 2012-11-20 14:40:25 PST
All reviewed patches have been landed.  Closing bug.