WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
157808
Clean up CSS code
https://bugs.webkit.org/show_bug.cgi?id=157808
Summary
Clean up CSS code
Alex Christensen
Reported
2016-05-17 13:15:15 PDT
Clean up CSS code
Attachments
Patch
(16.02 KB, patch)
2016-05-17 13:17 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(24.68 KB, patch)
2016-05-17 15:27 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(50.60 KB, patch)
2016-05-17 16:13 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(69.29 KB, patch)
2016-05-17 16:37 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews123 for ios-simulator-wk2
(269.62 KB, application/zip)
2016-05-17 17:31 PDT
,
Build Bot
no flags
Details
Patch
(69.50 KB, patch)
2016-05-17 23:25 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews123 for ios-simulator-wk2
(269.04 KB, application/zip)
2016-05-18 00:14 PDT
,
Build Bot
no flags
Details
Patch
(70.34 KB, patch)
2016-05-18 01:08 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(71.42 KB, patch)
2016-05-18 09:58 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(71.81 KB, patch)
2016-05-18 10:22 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(74.83 KB, patch)
2016-05-18 14:03 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(74.10 KB, patch)
2016-05-18 14:15 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews103 for mac-yosemite
(488.16 KB, application/zip)
2016-05-18 14:56 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews113 for mac-yosemite
(444.70 KB, application/zip)
2016-05-18 14:59 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews106 for mac-yosemite-wk2
(365.00 KB, application/zip)
2016-05-18 14:59 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews122 for ios-simulator-wk2
(325.79 KB, application/zip)
2016-05-18 15:08 PDT
,
Build Bot
no flags
Details
Patch
(75.21 KB, patch)
2016-05-18 15:33 PDT
,
Alex Christensen
cdumez
: review+
Details
Formatted Diff
Diff
Show Obsolete
(10)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2016-05-17 13:17:14 PDT
Created
attachment 279158
[details]
Patch
Alex Christensen
Comment 2
2016-05-17 15:27:18 PDT
Created
attachment 279171
[details]
Patch
Darin Adler
Comment 3
2016-05-17 15:53:12 PDT
Comment on
attachment 279171
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=279171&action=review
> Source/WebCore/css/CSSProperty.h:66 > , m_value(value)
Need WTFMove here.
> Source/WebCore/css/StyleProperties.cpp:755 > +void MutableStyleProperties::setProperty(CSSPropertyID propertyID, RefPtr<CSSValue>&& prpValue, bool important)
Should rename prpValue to value.
> Source/WebCore/css/StylePropertyShorthand.h:32 > + : m_properties(nullptr)
Should initialize data members where they are defined rather than in the constructor.
> Source/WebCore/css/StyleResolver.cpp:303 > m_keyframesRuleMap.set(s.impl(), rule);
Missing WTFMove here.
Alex Christensen
Comment 4
2016-05-17 16:13:43 PDT
Created
attachment 279177
[details]
Patch
Alex Christensen
Comment 5
2016-05-17 16:37:32 PDT
Created
attachment 279182
[details]
Patch
Build Bot
Comment 6
2016-05-17 17:30:57 PDT
Comment on
attachment 279182
[details]
Patch
Attachment 279182
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/1338834
Number of test failures exceeded the failure limit.
Build Bot
Comment 7
2016-05-17 17:31:05 PDT
Created
attachment 279189
[details]
Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.4
Alex Christensen
Comment 8
2016-05-17 23:25:40 PDT
Created
attachment 279220
[details]
Patch
Build Bot
Comment 9
2016-05-18 00:14:43 PDT
Comment on
attachment 279220
[details]
Patch
Attachment 279220
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/1341189
Number of test failures exceeded the failure limit.
Build Bot
Comment 10
2016-05-18 00:14:45 PDT
Created
attachment 279223
[details]
Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.4
Alex Christensen
Comment 11
2016-05-18 01:08:36 PDT
Created
attachment 279227
[details]
Patch
Alex Christensen
Comment 12
2016-05-18 09:58:05 PDT
Created
attachment 279257
[details]
Patch
Alex Christensen
Comment 13
2016-05-18 10:22:40 PDT
Created
attachment 279260
[details]
Patch
Chris Dumez
Comment 14
2016-05-18 12:16:49 PDT
Comment on
attachment 279260
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=279260&action=review
> Source/WebCore/css/BasicShapeFunctions.cpp:191 > +static BasicShapeRadius cssValueToBasicShapeRadius(const CSSToLengthConversionData& conversionData, RefPtr<CSSPrimitiveValue>&& radius)
We don't technically transfer ownership, I think this should be a CSSPrimitiveValue*
> Source/WebCore/css/CSSAnimationTriggerScrollValue.h:36 > + static Ref<CSSAnimationTriggerScrollValue> create(RefPtr<CSSValue>&& startValue, RefPtr<CSSValue>&& endValue = nullptr)
Can start be null? If not, it should be a Ref<>
> Source/WebCore/css/CSSAnimationTriggerScrollValue.h:52 > , m_startValue(startValue)
Missing WTFMove()
> Source/WebCore/css/CSSAnimationTriggerScrollValue.h:53 > , m_endValue(endValue)
Missing WTFMove()
> Source/WebCore/css/CSSBasicShapes.h:79 > + void setTop(RefPtr<CSSPrimitiveValue>&& top) { m_top = top; }
Missing WTFMove()?
> Source/WebCore/css/CSSBasicShapes.h:80 > + void setRight(RefPtr<CSSPrimitiveValue>&& right) { m_right = right; }
ditto
> Source/WebCore/css/CSSBasicShapes.h:81 > + void setBottom(RefPtr<CSSPrimitiveValue>&& bottom) { m_bottom = bottom; }
ditto
> Source/WebCore/css/CSSBasicShapes.h:82 > + void setLeft(RefPtr<CSSPrimitiveValue>&& left) { m_left = left; }
ditto
> Source/WebCore/css/CSSBasicShapes.h:107 > + void setTopLeftRadius(RefPtr<CSSPrimitiveValue>&& radius) { m_topLeftRadius = radius; }
Missing WTFMove()?
> Source/WebCore/css/CSSBasicShapes.h:108 > + void setTopRightRadius(RefPtr<CSSPrimitiveValue>&& radius) { m_topRightRadius = radius; }
ditto
> Source/WebCore/css/CSSBasicShapes.h:109 > + void setBottomRightRadius(RefPtr<CSSPrimitiveValue>&& radius) { m_bottomRightRadius = radius; }
ditto
> Source/WebCore/css/CSSBasicShapes.h:110 > + void setBottomLeftRadius(RefPtr<CSSPrimitiveValue>&& radius) { m_bottomLeftRadius = radius; }
ditto
> Source/WebCore/css/CSSBasicShapes.h:138 > + void setCenterX(RefPtr<CSSPrimitiveValue>&& centerX) { m_centerX = centerX; }
Missing WTFMove()?
> Source/WebCore/css/CSSBasicShapes.h:139 > + void setCenterY(RefPtr<CSSPrimitiveValue>&& centerY) { m_centerY = centerY; }
ditto
> Source/WebCore/css/CSSBasicShapes.h:140 > + void setRadius(RefPtr<CSSPrimitiveValue>&& radius) { m_radius = radius; }
ditto
> Source/WebCore/css/CSSBorderImage.cpp:30 > if (image)
You want to use some releaseNonNull() below instead of *imageSlice (etc..) CSSValueList::append() takes in a Ref<>&&.
> Source/WebCore/css/CSSBorderImageSliceValue.h:39 > + return adoptRef(*new CSSBorderImageSliceValue(WTFMove(slices), fill));
The constructor is still using a PassRefPtr, please update it.
> Source/WebCore/css/CSSCanvasValue.h:57 > + , m_element(nullptr)
We probably want to initialize the member inline instead: HTMLCanvasElement* m_element { nullptr }; below.
> Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp:98 > RefPtr<SVGPaint> paint = newPaint;
Useless local variable? Also, if we drop the local, I think we'll need to WTFMove() in the return statement.
> Source/WebCore/css/StyleResolver.cpp:1690 > +RefPtr<StyleImage> StyleResolver::generatedOrPendingFromValue(CSSPropertyID property, CSSImageGeneratorValue& value)
Cannot this return a Ref<>?
Alex Christensen
Comment 15
2016-05-18 14:03:21 PDT
Created
attachment 279279
[details]
Patch
Alex Christensen
Comment 16
2016-05-18 14:15:02 PDT
Created
attachment 279281
[details]
Patch
Build Bot
Comment 17
2016-05-18 14:56:13 PDT
Comment on
attachment 279281
[details]
Patch
Attachment 279281
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/1344515
Number of test failures exceeded the failure limit.
Build Bot
Comment 18
2016-05-18 14:56:17 PDT
Created
attachment 279289
[details]
Archive of layout-test-results from ews103 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 19
2016-05-18 14:59:09 PDT
Comment on
attachment 279281
[details]
Patch
Attachment 279281
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/1344510
Number of test failures exceeded the failure limit.
Build Bot
Comment 20
2016-05-18 14:59:13 PDT
Created
attachment 279290
[details]
Archive of layout-test-results from ews113 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 21
2016-05-18 14:59:26 PDT
Comment on
attachment 279281
[details]
Patch
Attachment 279281
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/1344524
Number of test failures exceeded the failure limit.
Build Bot
Comment 22
2016-05-18 14:59:29 PDT
Created
attachment 279292
[details]
Archive of layout-test-results from ews106 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Build Bot
Comment 23
2016-05-18 15:08:24 PDT
Comment on
attachment 279281
[details]
Patch
Attachment 279281
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/1344518
Number of test failures exceeded the failure limit.
Build Bot
Comment 24
2016-05-18 15:08:28 PDT
Created
attachment 279295
[details]
Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.4
Alex Christensen
Comment 25
2016-05-18 15:33:23 PDT
Created
attachment 279303
[details]
Patch
Chris Dumez
Comment 26
2016-05-18 15:54:19 PDT
Comment on
attachment 279303
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=279303&action=review
r=me
> Source/WebCore/ChangeLog:8 > + No new tests. Just cleaning up and modernizing code.
nit: extra space in there
> Source/WebCore/css/CSSAnimationTriggerScrollValue.h:41 > const CSSValue* startValue() const { return m_startValue.get(); }
This should probably return a reference? And m_startValue should probably be a Ref<>?
> Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp:100 > return paint;
Are you sure we're not supposed to WTFMove() here? We are not returning a local variable anymore.
> Source/WebCore/css/StylePropertyShorthand.h:31 > StylePropertyShorthand()
= default; ?
> Source/WebCore/css/StyleResolver.cpp:306 > +void StyleResolver::addKeyframeStyle(RefPtr<StyleRuleKeyframes>&& rule)
Looks like this should be a Ref<>
Alex Christensen
Comment 27
2016-05-18 16:09:42 PDT
This patch is getting too big. I committed
http://trac.webkit.org/changeset/201113
(In reply to
comment #26
)
> > Source/WebCore/css/CSSAnimationTriggerScrollValue.h:41 > > const CSSValue* startValue() const { return m_startValue.get(); } > > This should probably return a reference? And m_startValue should probably be > a Ref<>?
Maybe in another patch.
> > > Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp:100 > > return paint; > > Are you sure we're not supposed to WTFMove() here? We are not returning a > local variable anymore.
I was under the impression that c++11 made it so we never need to return WTFMove(anything), but I could be wrong. I put it in.
> > Source/WebCore/css/StyleResolver.cpp:306 > > +void StyleResolver::addKeyframeStyle(RefPtr<StyleRuleKeyframes>&& rule) > > Looks like this should be a Ref<>
What??? I don't think so.
Chris Dumez
Comment 28
2016-05-18 18:55:06 PDT
(In reply to
comment #27
)
> This patch is getting too big. I committed >
http://trac.webkit.org/changeset/201113
> (In reply to
comment #26
) > > > Source/WebCore/css/CSSAnimationTriggerScrollValue.h:41 > > > const CSSValue* startValue() const { return m_startValue.get(); } > > > > This should probably return a reference? And m_startValue should probably be > > a Ref<>? > Maybe in another patch. > > > > > Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp:100 > > > return paint; > > > > Are you sure we're not supposed to WTFMove() here? We are not returning a > > local variable anymore. > I was under the impression that c++11 made it so we never need to return > WTFMove(anything), but I could be wrong. I put it in. > > > Source/WebCore/css/StyleResolver.cpp:306 > > > +void StyleResolver::addKeyframeStyle(RefPtr<StyleRuleKeyframes>&& rule) > > > > Looks like this should be a Ref<> > What??? I don't think so.
Could you elaborate? The first thing the method does is dereference 'rule' so how could it ever be null? As such, I maintain this should be a Ref<>&& not a RefPtr<>&&.
Chris Dumez
Comment 29
2016-05-21 19:52:50 PDT
(In reply to
comment #28
)
> (In reply to
comment #27
) > > This patch is getting too big. I committed > >
http://trac.webkit.org/changeset/201113
> > (In reply to
comment #26
) > > > > Source/WebCore/css/CSSAnimationTriggerScrollValue.h:41 > > > > const CSSValue* startValue() const { return m_startValue.get(); } > > > > > > This should probably return a reference? And m_startValue should probably be > > > a Ref<>? > > Maybe in another patch. > > > > > > > Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp:100 > > > > return paint; > > > > > > Are you sure we're not supposed to WTFMove() here? We are not returning a > > > local variable anymore. > > I was under the impression that c++11 made it so we never need to return > > WTFMove(anything), but I could be wrong. I put it in. > > > > Source/WebCore/css/StyleResolver.cpp:306 > > > > +void StyleResolver::addKeyframeStyle(RefPtr<StyleRuleKeyframes>&& rule) > > > > > > Looks like this should be a Ref<> > > What??? I don't think so. > > Could you elaborate? The first thing the method does is dereference 'rule' > so how could it ever be null? As such, I maintain this should be a Ref<>&& > not a RefPtr<>&&.
I guess I'll just do in in
Bug 157961
then.
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