WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
56969
Move media controls subtree creation into one method.
https://bugs.webkit.org/show_bug.cgi?id=56969
Summary
Move media controls subtree creation into one method.
Dimitri Glazkov (Google)
Reported
2011-03-23 15:34:33 PDT
Move media controls subtree creation into one method.
Attachments
Patch
(13.26 KB, patch)
2011-03-23 15:37 PDT
,
Dimitri Glazkov (Google)
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Dimitri Glazkov (Google)
Comment 1
2011-03-23 15:37:57 PDT
Created
attachment 86711
[details]
Patch
Darin Adler
Comment 2
2011-03-23 16:18:32 PDT
Comment on
attachment 86711
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=86711&action=review
> Source/WebCore/rendering/MediaControlElements.cpp:800 > + setAttribute(precisionAttr, "float");
It’s not a great idea to call functional like this inside the constructor where the object still hasn’t been adopted by its first owner. It can lead to RefCounted assertions if anything ref/derefs. I took these out of the class intentionally a while back, and you are undoing that. The work should be either in a create function or at the call site rather than in the constructor.
> Source/WebCore/rendering/MediaControlElements.cpp:864 > + setAttribute(precisionAttr, "float"); > + setAttribute(maxAttr, "1"); > + setAttribute(valueAttr, String::number(mediaElement->volume()));
Ditto.
Dimitri Glazkov (Google)
Comment 3
2011-03-23 16:23:33 PDT
(In reply to
comment #2
)
> (From update of
attachment 86711
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=86711&action=review
> > > Source/WebCore/rendering/MediaControlElements.cpp:800 > > + setAttribute(precisionAttr, "float"); > > It’s not a great idea to call functional like this inside the constructor where the object still hasn’t been adopted by its first owner. It can lead to RefCounted assertions if anything ref/derefs. I took these out of the class intentionally a while back, and you are undoing that. > > The work should be either in a create function or at the call site rather than in the constructor. > > > Source/WebCore/rendering/MediaControlElements.cpp:864 > > + setAttribute(precisionAttr, "float"); > > + setAttribute(maxAttr, "1"); > > + setAttribute(valueAttr, String::number(mediaElement->volume())); > > Ditto.
Sure, I'll move these to create func.
Dimitri Glazkov (Google)
Comment 4
2011-03-24 09:58:25 PDT
Committed
r81872
: <
http://trac.webkit.org/changeset/81872
>
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