WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
145912
Use modern for-loops in WebCore/rendering - 2
https://bugs.webkit.org/show_bug.cgi?id=145912
Summary
Use modern for-loops in WebCore/rendering - 2
Hunseop Jeong
Reported
2015-06-12 03:19:42 PDT
Use modern for-loops in WebCore/rendering - 2 of 2.
Attachments
Patch
(70.37 KB, patch)
2015-06-12 03:47 PDT
,
Hunseop Jeong
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews103 for mac-mavericks
(854.97 KB, application/zip)
2015-06-12 04:21 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews104 for mac-mavericks-wk2
(891.96 KB, application/zip)
2015-06-12 04:25 PDT
,
Build Bot
no flags
Details
Patch
(3.80 MB, patch)
2015-06-12 07:56 PDT
,
Hunseop Jeong
no flags
Details
Formatted Diff
Diff
Patch
(69.83 KB, patch)
2015-06-12 09:38 PDT
,
Hunseop Jeong
no flags
Details
Formatted Diff
Diff
Patch
(69.89 KB, patch)
2015-06-15 19:25 PDT
,
Hunseop Jeong
no flags
Details
Formatted Diff
Diff
Patch
(69.90 KB, patch)
2015-06-15 19:57 PDT
,
Hunseop Jeong
hs85.jeong
: commit-queue?
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Hunseop Jeong
Comment 1
2015-06-12 03:47:08 PDT
Created
attachment 254788
[details]
Patch
Build Bot
Comment 2
2015-06-12 04:21:42 PDT
Comment on
attachment 254788
[details]
Patch
Attachment 254788
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/5854356633026560
New failing tests: svg/W3C-SVG-1.1/struct-group-03-t.svg svg/transforms/svg-css-transforms.xhtml svg/W3C-SVG-1.1/painting-stroke-04-t.svg transforms/svg-vs-css.xhtml svg/custom/invalid-dasharray.svg
Build Bot
Comment 3
2015-06-12 04:21:45 PDT
Created
attachment 254790
[details]
Archive of layout-test-results from ews103 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-mavericks Platform: Mac OS X 10.9.5
Build Bot
Comment 4
2015-06-12 04:25:10 PDT
Comment on
attachment 254788
[details]
Patch
Attachment 254788
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/6255143653736448
New failing tests: svg/W3C-SVG-1.1/struct-group-03-t.svg svg/transforms/svg-css-transforms.xhtml svg/W3C-SVG-1.1/painting-stroke-04-t.svg transforms/svg-vs-css.xhtml svg/custom/invalid-dasharray.svg
Build Bot
Comment 5
2015-06-12 04:25:12 PDT
Created
attachment 254791
[details]
Archive of layout-test-results from ews104 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Hunseop Jeong
Comment 6
2015-06-12 07:56:34 PDT
Created
attachment 254800
[details]
Patch
Hunseop Jeong
Comment 7
2015-06-12 09:38:06 PDT
Created
attachment 254806
[details]
Patch
Darin Adler
Comment 8
2015-06-12 09:53:15 PDT
Comment on
attachment 254806
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=254806&action=review
Simon Fraser did ask us to slow down on these.
> Source/WebCore/rendering/RenderObject.cpp:1085 > + rects.append(SelectionRect(quad.enclosingBoundingBox(), isHorizontalWritingMode(), view().pageNumberForBlockProgressionOffset(quad.enclosingBoundingBox().x())));
It’s inefficient to call enclosingBoundingBox twice here on each quad. This should be rewritten to use a local variable.
> Source/WebCore/rendering/RenderQuote.cpp:70 > + for (auto quoteCharacter : distinctQuoteCharacters) {
This is *wrong*. It needs to be auto& or this function won’t work.
> Source/WebCore/rendering/style/KeyframeList.cpp:103 > + for (auto& currKeyframe : m_keyframes) {
Should just be keyframe, not currKeyframe.
> Source/WebCore/rendering/svg/RenderSVGPath.cpp:117 > + FloatPoint radiusVector(point.x() - location.x(), point.y() - location.y());
This should be: FloatPoint radiusVector = point - location;
> Source/WebCore/rendering/svg/RenderSVGText.cpp:188 > SVGTextLayoutAttributes* attributes = 0;
nullptr
Hunseop Jeong
Comment 9
2015-06-15 19:25:47 PDT
Created
attachment 254924
[details]
Patch
Hunseop Jeong
Comment 10
2015-06-15 19:55:44 PDT
(In reply to
comment #8
)
> Comment on
attachment 254806
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=254806&action=review
> > Simon Fraser did ask us to slow down on these.
Then, Do I wait to upload these patches?
> > > Source/WebCore/rendering/RenderObject.cpp:1085 > > + rects.append(SelectionRect(quad.enclosingBoundingBox(), isHorizontalWritingMode(), view().pageNumberForBlockProgressionOffset(quad.enclosingBoundingBox().x()))); > > It’s inefficient to call enclosingBoundingBox twice here on each quad. This > should be rewritten to use a local variable. >
I made the local variable to remove the inefficient call.
> > Source/WebCore/rendering/RenderQuote.cpp:70 > > + for (auto quoteCharacter : distinctQuoteCharacters) { > > This is *wrong*. It needs to be auto& or this function won’t work. >
I Changed it to use the auto&.
> > Source/WebCore/rendering/style/KeyframeList.cpp:103 > > + for (auto& currKeyframe : m_keyframes) { > > Should just be keyframe, not currKeyframe.
> This function already use the 'keyframe' for the parameter of function. So I used the 'currKeyframe' to avoid the confusion.
> > Source/WebCore/rendering/svg/RenderSVGPath.cpp:117 > > + FloatPoint radiusVector(point.x() - location.x(), point.y() - location.y()); > > This should be: > > FloatPoint radiusVector = point - location; >
'point - location' return the FloatSize. So I changed it to "FloatPoint radiusVector(point - location);"
> > Source/WebCore/rendering/svg/RenderSVGText.cpp:188 > > SVGTextLayoutAttributes* attributes = 0; > > nullptr
Done.
Hunseop Jeong
Comment 11
2015-06-15 19:57:57 PDT
Created
attachment 254926
[details]
Patch
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