WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 139601
[CSS Shapes] Fix StyleBuilder code to use CSSValueNone to match spec and other code
https://bugs.webkit.org/show_bug.cgi?id=139601
Summary
[CSS Shapes] Fix StyleBuilder code to use CSSValueNone to match spec and othe...
Bem Jones-Bey
Reported
2014-12-12 15:54:03 PST
This one part of the code didn't get updated when the rest was to use none instead of auto.
Attachments
Patch
(3.56 KB, patch)
2014-12-12 16:01 PST
,
Bem Jones-Bey
no flags
Details
Formatted Diff
Diff
Patch
(8.14 KB, patch)
2014-12-12 17:29 PST
,
Bem Jones-Bey
cdumez
: review+
cdumez
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Bem Jones-Bey
Comment 1
2014-12-12 16:01:47 PST
Created
attachment 243224
[details]
Patch
Chris Dumez
Comment 2
2014-12-12 16:15:01 PST
Comment on
attachment 243224
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=243224&action=review
> Source/WebCore/css/StyleBuilderCustom.h:228 > inline void StyleBuilderCustom::applyValueWebkitShapeOutside(StyleResolver& styleResolver, CSSValue& value)
Based on the assertions, it looks like we *always* end up calling RenderStyle::setShapeOutside(). If so, I think it would be great to get rid of this custom code and use a standard: PassRefPtr<ShapeValue> convertShapeValue(StyleResolver&, CSSValue&); in StyleBuilderConverter.h Then use Converter=ShapeValue for this property in CSSPropertyNames.in, instead of Custom=*.
> Source/WebCore/css/StyleBuilderCustom.h:237 > + if (is<CSSImageValue>(value) || is<CSSImageGeneratorValue>(value) || is<CSSImageSetValue>(value)) {
Looks like the last one should be protected by #if ENABLE(CSS_IMAGE_SET) ?
> Source/WebCore/css/StyleBuilderCustom.h:243 > + if (is<CSSValueList>(value)) {
Based on the parser code, it looks to me that it can only be a CSSValueList at this point. I would get rid of this check and rely on the assertion in downcast<CSSValueList>(value) below.
Bem Jones-Bey
Comment 3
2014-12-12 17:29:14 PST
Created
attachment 243236
[details]
Patch Update for comments
Chris Dumez
Comment 4
2014-12-12 17:59:15 PST
Comment on
attachment 243236
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=243236&action=review
r=me, very nice, thanks. Just a couple of nits before landing.
> Source/WebCore/ChangeLog:10 > + In doing this change, it became apparent that thwere is nothing
"there"
> Source/WebCore/css/StyleBuilderConverter.h:560 > +static inline bool isImageShape(CSSValue& value)
nit: "const CSSValue&"
> Source/WebCore/css/StyleBuilderConverter.h:572 > + return nullptr;
if (is<CSSPrimitiveValue>(value)) { ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNone); return nullptr; } Because CSSValueNone is the only CSSPrimitiveValue allowed by the parser.
> Source/WebCore/css/StyleBuilderConverter.h:587 > + referenceBox = CSSBoxType(primitiveValue);
nit: "CSSBoxType()" is likely unnecessary.
Bem Jones-Bey
Comment 5
2014-12-15 10:57:14 PST
Committed
r177289
: <
http://trac.webkit.org/changeset/177289
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug