WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
132533
Pass around RenderStyle by const-reference inside SVGInlineTextBox.
https://bugs.webkit.org/show_bug.cgi?id=132533
Summary
Pass around RenderStyle by const-reference inside SVGInlineTextBox.
Andreas Kling
Reported
2014-05-03 15:16:56 PDT
Functions that immediately start by asserting that some Foo* argument is non-null are silly.
Attachments
Patch
(16.28 KB, patch)
2014-05-03 15:19 PDT
,
Andreas Kling
dbates
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Andreas Kling
Comment 1
2014-05-03 15:19:51 PDT
Created
attachment 230766
[details]
Patch
Daniel Bates
Comment 2
2014-05-03 16:19:34 PDT
Comment on
attachment 230766
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=230766&action=review
> Source/WebCore/ChangeLog:9 > + Reviewed by NOBODY (OOPS!).
The reviewed by line should precede the description of the change log entry.
> Source/WebCore/rendering/svg/SVGInlineTextBox.cpp:204 > + const RenderStyle* selectionStyle = &style;
This local variables isn't used in a meaningful way in this function. I mean, we only assign a value(s) to it and never reference it. Shouldn't we be referencing this variable instead of |style| in SVGInlineTextBox::selectionRectForTextFragment() and GraphicsContext::fillRect() below?
> Source/WebCore/rendering/svg/SVGInlineTextBox.cpp:273 > + const RenderStyle* selectionStyle = &style; > if (hasSelection) { > selectionStyle = parentRenderer.getCachedPseudoStyle(SELECTION); > if (selectionStyle) {
This is OK as-is. We should consider simplifying this code so as to remove an extraneous assignment to selectionStyle when parentRenderer.getCachedPseudoStyle(SELECTION) (on line 272) returns null. We can do this in another patch.
Dirk Schulze
Comment 3
2014-07-12 23:22:18 PDT
Will you land this kling?
Ahmad Saleem
Comment 4
2022-09-22 15:59:38 PDT
It seems that this r+ patch didn't landed. Is this needed anymore? Thanks!
Ahmad Saleem
Comment 5
2024-07-18 07:04:15 PDT
It seems to be done -
https://searchfox.org/wubkat/rev/7cf0e3722de99a6fc09380aae193381be6733ebb/Source/WebCore/rendering/svg/SVGInlineTextBox.h#78
Marking this as 'REOSLVED CONFIGURATION CHANGED'.
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