WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
91564
Element wants to have userAgentShadowRoot()
https://bugs.webkit.org/show_bug.cgi?id=91564
Summary
Element wants to have userAgentShadowRoot()
Hajime Morrita
Reported
2012-07-17 17:28:47 PDT
This is a follow up t
bug 77936
. userAgentShadowRoot() could have an assertion to type debug field. Also, it will make ua-shadow related code more readable.
Attachments
Patch
(5.09 KB, patch)
2012-07-17 22:22 PDT
,
Shinya Kawanaka
no flags
Details
Formatted Diff
Diff
Patch
(5.06 KB, patch)
2012-07-17 22:46 PDT
,
Shinya Kawanaka
no flags
Details
Formatted Diff
Diff
Patch for landing
(5.06 KB, patch)
2012-07-18 18:11 PDT
,
Shinya Kawanaka
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Shinya Kawanaka
Comment 1
2012-07-17 18:53:36 PDT
I think Element should have this method, right? A lot of code use the following pattern shadow()->oldestShadowRoot()->... But we should be able to do: userAgentShadowRoot()->...
Shinya Kawanaka
Comment 2
2012-07-17 22:22:56 PDT
Created
attachment 152919
[details]
Patch
Early Warning System Bot
Comment 3
2012-07-17 22:37:55 PDT
Comment on
attachment 152919
[details]
Patch
Attachment 152919
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/13269368
Early Warning System Bot
Comment 4
2012-07-17 22:40:24 PDT
Comment on
attachment 152919
[details]
Patch
Attachment 152919
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/13273405
WebKit Review Bot
Comment 5
2012-07-17 22:42:38 PDT
Comment on
attachment 152919
[details]
Patch
Attachment 152919
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/13277399
Shinya Kawanaka
Comment 6
2012-07-17 22:46:12 PDT
Created
attachment 152930
[details]
Patch
Eric Carlson
Comment 7
2012-07-18 09:39:30 PDT
Comment on
attachment 152930
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=152930&action=review
This is much cleaner, thanks!
> Source/WebCore/html/HTMLMediaElement.cpp:4185 > + if (ShadowRoot* userAgent = userAgentShadowRoot()) { > + Node* node = userAgent->firstChild(); > + return node && node->isMediaControls(); > + }
Isn't it true that userAgentShadowRoot()->firstChild() *must* be the media controls? If so, I think "&& node->isMediaControls()" could be replaced with "ASSERT(node->isMediaControls())".
Shinya Kawanaka
Comment 8
2012-07-18 17:58:00 PDT
(In reply to
comment #7
)
> (From update of
attachment 152930
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=152930&action=review
> > This is much cleaner, thanks! > > > Source/WebCore/html/HTMLMediaElement.cpp:4185 > > + if (ShadowRoot* userAgent = userAgentShadowRoot()) { > > + Node* node = userAgent->firstChild(); > > + return node && node->isMediaControls(); > > + } > > Isn't it true that userAgentShadowRoot()->firstChild() *must* be the media controls? If so, I think "&& node->isMediaControls()" could be replaced with "ASSERT(node->isMediaControls())".
If firstChild() exists, it must be the media control, I believe. I'll update the patch, and if it passes tests, I'll land it.
Shinya Kawanaka
Comment 9
2012-07-18 18:11:38 PDT
Created
attachment 153150
[details]
Patch for landing
WebKit Review Bot
Comment 10
2012-07-18 22:09:03 PDT
Comment on
attachment 153150
[details]
Patch for landing Clearing flags on attachment: 153150 Committed
r123071
: <
http://trac.webkit.org/changeset/123071
>
WebKit Review Bot
Comment 11
2012-07-18 22:09:09 PDT
All reviewed patches have been landed. Closing bug.
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