Bug 109875 - Convert 3 settings to use Settings.in
Summary: Convert 3 settings to use Settings.in
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tony Chang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-14 16:22 PST by Tony Chang
Modified: 2013-02-19 16:34 PST (History)
9 users (show)

See Also:


Attachments
Patch (13.11 KB, patch)
2013-02-14 16:26 PST, Tony Chang
no flags Details | Formatted Diff | Diff
Patch (15.19 KB, patch)
2013-02-15 09:58 PST, Tony Chang
no flags Details | Formatted Diff | Diff
Patch (15.15 KB, patch)
2013-02-19 12:02 PST, Tony Chang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Chang 2013-02-14 16:22:34 PST
Convert 3 settings to use Settings.in
Comment 1 Tony Chang 2013-02-14 16:26:33 PST
Created attachment 188449 [details]
Patch
Comment 2 Build Bot 2013-02-14 21:06:40 PST
Comment on attachment 188449 [details]
Patch

Attachment 188449 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://queues.webkit.org/results/16570665
Comment 3 Build Bot 2013-02-15 06:19:35 PST
Comment on attachment 188449 [details]
Patch

Attachment 188449 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/16585141
Comment 4 Tony Chang 2013-02-15 09:58:05 PST
Created attachment 188592 [details]
Patch
Comment 5 Tony Chang 2013-02-19 12:02:04 PST
Created attachment 189133 [details]
Patch
Comment 6 Tony Chang 2013-02-19 12:02:30 PST
(In reply to comment #5)
> Created an attachment (id=189133) [details]
> Patch

Retrying on mac and win.
Comment 7 Tony Chang 2013-02-19 14:46:58 PST
Maybe abarth or rniwa would like to review this?
Comment 8 Ryosuke Niwa 2013-02-19 15:07:24 PST
Comment on attachment 189133 [details]
Patch

rs=me.
Comment 9 WebKit Review Bot 2013-02-19 15:39:57 PST
Comment on attachment 189133 [details]
Patch

Clearing flags on attachment: 189133

Committed r143398: <http://trac.webkit.org/changeset/143398>
Comment 10 WebKit Review Bot 2013-02-19 15:40:02 PST
All reviewed patches have been landed.  Closing bug.
Comment 11 Eric Seidel (no email) 2013-02-19 16:08:25 PST
Comment on attachment 189133 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=189133&action=review

> Source/WebCore/dom/make_names.pl:1021
> -    if (!MediaPlayer::isAvailable() || (settings && !settings->isMediaEnabled()))
> +    if (!MediaPlayer::isAvailable() || (settings && !settings->mediaEnabled()))

Shouldn't this be isMediaEnabled to match WebKit style?  Are we not generating "is" prefixes for bools?
Comment 12 Eric Seidel (no email) 2013-02-19 16:08:49 PST
I'm very glad to see this go in, but it seems the settings.in generator may need a style review. :)
Comment 13 Tony Chang 2013-02-19 16:31:26 PST
(In reply to comment #11)
> (From update of attachment 189133 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=189133&action=review
> 
> > Source/WebCore/dom/make_names.pl:1021
> > -    if (!MediaPlayer::isAvailable() || (settings && !settings->isMediaEnabled()))
> > +    if (!MediaPlayer::isAvailable() || (settings && !settings->mediaEnabled()))
> 
> Shouldn't this be isMediaEnabled to match WebKit style?  Are we not generating "is" prefixes for bools?

I'm happy to change the style, but the style guide says getters should match the name of the variable being gotten:
http://www.webkit.org/coding/coding-style.html#names-setter-getter

I could change the variable to isMediaEnabled/setIsMediaEnabled if that sounds better.
Comment 14 Eric Seidel (no email) 2013-02-19 16:34:02 PST
(In reply to comment #13)
> (In reply to comment #11)
> > (From update of attachment 189133 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=189133&action=review
> > 
> > > Source/WebCore/dom/make_names.pl:1021
> > > -    if (!MediaPlayer::isAvailable() || (settings && !settings->isMediaEnabled()))
> > > +    if (!MediaPlayer::isAvailable() || (settings && !settings->mediaEnabled()))
> > 
> > Shouldn't this be isMediaEnabled to match WebKit style?  Are we not generating "is" prefixes for bools?
> 
> I'm happy to change the style, but the style guide says getters should match the name of the variable being gotten:
> http://www.webkit.org/coding/coding-style.html#names-setter-getter
> 
> I could change the variable to isMediaEnabled/setIsMediaEnabled if that sounds better.

I guess I'm thinking of:
https://www.webkit.org/coding/coding-style.html#names-bool

Which would have these named:
bool m_isMediaEnabled;
void setMediaEnabled(bool);
bool isMediaEnabled()

At least that's my understanding of the style.