WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
101634
Sever Chromium's dependence on WebKitSystemInterface media control drawing functions in RenderThemeMac
https://bugs.webkit.org/show_bug.cgi?id=101634
Summary
Sever Chromium's dependence on WebKitSystemInterface media control drawing fu...
Robert Sesek
Reported
2012-11-08 13:15:12 PST
Chromium has RenderThemeChromiumMac that inherits from RenderThemeMac. In RenderThemeMac::paintMedia*, there are various calls to functions in WebKitSystemInterface that Chromium doesn't actually use because it has RenderMediaControlsChromium to paint its media controls. However, since RenderThemeChromiumMac inherits the base implementation in RenderThemeMac, those functions are needed for linking. If we just #if PLATFORM(MAC) guard the impls in RenderThemeMac, the Chromium port will no longer depend on those functions. This pattern was established in
https://bugs.webkit.org/show_bug.cgi?id=37204
.
Attachments
Patch
(13.62 KB, patch)
2012-11-08 13:18 PST
,
Robert Sesek
no flags
Details
Formatted Diff
Diff
RenderThemeAppleMac,v1
(45.36 KB, patch)
2012-11-09 15:41 PST
,
Robert Sesek
no flags
Details
Formatted Diff
Diff
RenderThemeMacShared,v1
(190.14 KB, patch)
2012-11-12 11:25 PST
,
Robert Sesek
no flags
Details
Formatted Diff
Diff
RenderThemeMacShared,v2
(190.15 KB, patch)
2012-11-13 14:03 PST
,
Robert Sesek
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Robert Sesek
Comment 1
2012-11-08 13:18:29 PST
Created
attachment 173105
[details]
Patch
Adam Barth
Comment 2
2012-11-08 13:28:17 PST
Should we add a RenderThemeAppleMac.mm to hold this apple-mac specific code?
Robert Sesek
Comment 3
2012-11-08 13:30:06 PST
There was some discussion of that on
bug 37204
, but this was done instead. There's one or two other functions that do this #if-guarding, so it could make sense to have RenderThemeMac be pure virtual for the functions that differ between PLATFORM(MAC) and PLATFORM(CHROMIUM).
Adam Barth
Comment 4
2012-11-08 19:05:20 PST
Comment on
attachment 173105
[details]
Patch Ok. We might want to revisit the relationship between these classes, but that doesn't need to block your work on removing Chromium's WebKitSystemInterface dependency.
WebKit Review Bot
Comment 5
2012-11-08 21:03:08 PST
Comment on
attachment 173105
[details]
Patch Clearing flags on attachment: 173105 Committed
r134004
: <
http://trac.webkit.org/changeset/134004
>
WebKit Review Bot
Comment 6
2012-11-08 21:03:13 PST
All reviewed patches have been landed. Closing bug.
Simon Fraser (smfr)
Comment 7
2012-11-08 21:10:24 PST
This is RenderThemeMac. Why does it need PLATFORM(MAC) #idefs?
Simon Fraser (smfr)
Comment 8
2012-11-08 21:11:32 PST
Is there any point in trying to share RenderThemeChromiumMac and RenderThemeMac code?
Adam Barth
Comment 9
2012-11-08 21:22:28 PST
> This is RenderThemeMac. Why does it need PLATFORM(MAC) #idefs?
Because the code is shared by apple-mac and chromium-mac. I've just added you to a thread on this topic. I thought I had sent it to webkit-dev, but apparently I only sent it to the people I meant to CC. We might want to forward the thread to webkit-dev.
> Is there any point in trying to share RenderThemeChromiumMac and RenderThemeMac code?
That topic was discussed in
bug 37204
. Apparently sharing code allowed us to delete a large amount of code. Personally, I find these names confusing. We might want to restructure things a bit is that it's more clear what code is shared between apple-mac and chromium-mac.
WebKit Review Bot
Comment 10
2012-11-08 22:43:41 PST
Re-opened since this is blocked by
bug 101713
Maciej Stachowiak
Comment 11
2012-11-09 10:43:48 PST
For this specific case, maybe there should be a RenderMediaControlsMac.cpp to split out the media-control-related calls, along the lines of RenderMediaControlsChromium.cpp. That would perhaps reduce the amount of ifdefing required.
Robert Sesek
Comment 12
2012-11-09 15:41:03 PST
There's three other non-video methods that are currently #if-guarded, so I like Adam's suggestion of splitting out into RenderThemeAppleMac. If you'd prefer, though, I could create a RenderMediaControlsMac.mm/cpp.
Robert Sesek
Comment 13
2012-11-09 15:41:19 PST
Created
attachment 173385
[details]
RenderThemeAppleMac,v1
Maciej Stachowiak
Comment 14
2012-11-09 16:58:26 PST
Instead of making the Mac port version be "AppleMac", I'd suggest using "MacShared" for the base class to be shared between "Mac" and "ChromiumMac". The Mac port has always been identified by "mac", PLATFORM(MAC), etc, and I don't think we should introduce the term "AppleMac" in only this one place. Also let's use a separate bug for distinct changes, especially since the new patch doesn't even do what the title of this bug says.
Robert Sesek
Comment 15
2012-11-12 11:19:02 PST
(In reply to
comment #14
)
> Instead of making the Mac port version be "AppleMac", I'd suggest using "MacShared" for the base class to be shared between "Mac" and "ChromiumMac". The Mac port has always been identified by "mac", PLATFORM(MAC), etc, and I don't think we should introduce the term "AppleMac" in only this one place.
Done.
> Also let's use a separate bug for distinct changes, especially since the new patch doesn't even do what the title of this bug says.
The reason why I repurposed this bug is because the first patch was rolled out. I've retitled the bug to be more accurate description of what this is.
Robert Sesek
Comment 16
2012-11-12 11:25:54 PST
Created
attachment 173677
[details]
RenderThemeMacShared,v1
Adam Barth
Comment 17
2012-11-13 09:46:19 PST
Comment on
attachment 173677
[details]
RenderThemeMacShared,v1 View in context:
https://bugs.webkit.org/attachment.cgi?id=173677&action=review
I didn't verify that you've moved all this code identically, but the overall shape of this change looks like it matches what mjs asked for.
> Source/WebCore/rendering/RenderThemeMac.mm:56 > + : RenderThemeMacShared()
Do you need to explicitly call the base class constructor? Usually the compiler will do that for you.
> Source/WebCore/rendering/RenderThemeMacShared.h:30 > +
Looks like you've got an extra blank line here.
> Source/WebCore/rendering/RenderThemeMacShared.mm:67 > +
Here too
Robert Sesek
Comment 18
2012-11-13 14:03:36 PST
Comment on
attachment 173677
[details]
RenderThemeMacShared,v1 View in context:
https://bugs.webkit.org/attachment.cgi?id=173677&action=review
Thanks for the review!
>> Source/WebCore/rendering/RenderThemeMac.mm:56 >> + : RenderThemeMacShared() > > Do you need to explicitly call the base class constructor? Usually the compiler will do that for you.
Nope, left over from the old ctor.
>> Source/WebCore/rendering/RenderThemeMacShared.h:30 >> + > > Looks like you've got an extra blank line here.
Done.
>> Source/WebCore/rendering/RenderThemeMacShared.mm:67 >> + > > Here too
Done.
Robert Sesek
Comment 19
2012-11-13 14:03:54 PST
Created
attachment 173983
[details]
RenderThemeMacShared,v2
WebKit Review Bot
Comment 20
2012-11-13 19:16:34 PST
Comment on
attachment 173983
[details]
RenderThemeMacShared,v2 Clearing flags on attachment: 173983 Committed
r134520
: <
http://trac.webkit.org/changeset/134520
>
WebKit Review Bot
Comment 21
2012-11-13 19:16:39 PST
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