Bug 52826 - [Chromium] Use WebThemeEngine for relevant RenderTheme parts for chromium/linux
Summary: [Chromium] Use WebThemeEngine for relevant RenderTheme parts for chromium/linux
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-20 11:38 PST by xiyuan
Modified: 2011-01-21 12:26 PST (History)
7 users (show)

See Also:


Attachments
Proposed code change and new baseline for layout tests. (824.11 KB, patch)
2011-01-20 12:02 PST, xiyuan
tony: review-
Details | Formatted Diff | Diff
Layout test results to show image diff (1.49 MB, application/octet-stream)
2011-01-20 18:30 PST, xiyuan
no flags Details
Address tony's comments @ 2 (823.72 KB, patch)
2011-01-20 18:43 PST, xiyuan
no flags Details | Formatted Diff | Diff
Fix style @ 6 (823.71 KB, patch)
2011-01-20 18:59 PST, xiyuan
tony: review+
Details | Formatted Diff | Diff
Address comments @ 9 (823.71 KB, patch)
2011-01-20 21:42 PST, xiyuan
no flags Details | Formatted Diff | Diff
Sync and resolve. (824.05 KB, patch)
2011-01-21 09:26 PST, xiyuan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description xiyuan 2011-01-20 11:38:31 PST
We have moved/implemented the drawing code into NativeThemeLinux and now need to use WebThemeEngine to hook it up with RenderTheme code.
Comment 1 xiyuan 2011-01-20 12:02:04 PST
Created attachment 79628 [details]
Proposed code change and new baseline for layout tests.
Comment 2 Tony Chang 2011-01-20 15:29:25 PST
Comment on attachment 79628 [details]
Proposed code change and new baseline for layout tests.

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

r- for style nits.

Can you upload some of image diffs?  I'm having a hard time seeing the difference.  Maybe it's just a few rgb points off?

> Source/WebCore/rendering/RenderThemeChromiumLinux.cpp:58
> +      return ChromiumBridge::StateHover;

4 space indent here and above 2 conditions

> Source/WebCore/rendering/RenderThemeChromiumLinux.cpp:196
> +    ChromiumBridge::paintThemePart(
> +        i.context,
> +        ChromiumBridge::PartCheckbox,
> +        getWebThemeState(this, o),
> +        rect,
> +        &extraParams);

I think this should just be one long line (maybe one line of wrapping if it's really long).

> Source/WebCore/rendering/RenderThemeChromiumLinux.cpp:217
> +    ChromiumBridge::paintThemePart(
> +        i.context,
> +        ChromiumBridge::PartRadio,

less wrapping

> Source/WebCore/rendering/RenderThemeChromiumLinux.cpp:238
> +    extraParams.button.backgroundColor = SkColorSetRGB(0xdd, 0xdd, 0xdd);

Should this color be a constant somewhere?

> Source/WebCore/rendering/RenderThemeChromiumLinux.cpp:244
> +    ChromiumBridge::paintThemePart(
> +        i.context,
> +        ChromiumBridge::PartButton,

less wrapping

> Source/WebCore/rendering/RenderThemeChromiumLinux.cpp:294
> +    ChromiumBridge::paintThemePart(
> +        i.context,
> +        ChromiumBridge::PartMenuList,

less wrapping

> Source/WebCore/rendering/RenderThemeChromiumLinux.cpp:308
> +    ChromiumBridge::paintThemePart(
> +        i.context,
> +        ChromiumBridge::PartSliderTrack,

less wrapping

> Source/WebCore/rendering/RenderThemeChromiumLinux.cpp:323
> +    ChromiumBridge::paintThemePart(
> +        i.context,
> +        ChromiumBridge::PartSliderThumb,

less wrapping

> Source/WebCore/rendering/RenderThemeChromiumLinux.cpp:346
> +    ChromiumBridge::paintThemePart(
> +        i.context,
> +        ChromiumBridge::PartInnerSpinButton,

less wrapping

> Source/WebCore/rendering/RenderThemeChromiumLinux.cpp:372
> +    ChromiumBridge::paintThemePart(
> +        i.context,
> +        ChromiumBridge::PartProgressBar,

less wrapping
Comment 3 xiyuan 2011-01-20 18:30:00 PST
Created attachment 79676 [details]
Layout test results to show image diff

This is the layout test results of broken image tests. It's pretty hard to tell the difference with naked eyes. :p
Comment 4 Tony Chang 2011-01-20 18:37:31 PST
(In reply to comment #3)
> Created an attachment (id=79676) [details]
> Layout test results to show image diff
> 
> This is the layout test results of broken image tests. It's pretty hard to tell the difference with naked eyes. :p

I agree, these all look fine.  Thanks for uploading your results!
Comment 5 xiyuan 2011-01-20 18:43:22 PST
Created attachment 79678 [details]
Address tony's comments @ 2
Comment 6 WebKit Review Bot 2011-01-20 18:48:17 PST
Attachment 79678 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/plat..." exit_code: 1

Source/WebCore/rendering/RenderThemeChromiumLinux.cpp:55:  An else if statement should be written as an if statement when the prior "if" concludes with a return, break, continue or goto statement.  [readability/control_flow] [4]
Total errors found: 1 in 45 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 xiyuan 2011-01-20 18:50:36 PST
Note that this change need to land after http://src.chromium.org/viewvc/chrome?view=rev&revision=71969 is rolled in.
Comment 8 xiyuan 2011-01-20 18:59:51 PST
Created attachment 79679 [details]
Fix style @ 6
Comment 9 Tony Chang 2011-01-20 19:28:19 PST
Comment on attachment 79679 [details]
Fix style @ 6

static const unsigned kDefaultButtonBackgroundColor = 0xffdddddd;

This should be defaultButtonBackgroundColor.
Comment 10 xiyuan 2011-01-20 21:42:18 PST
Created attachment 79692 [details]
Address comments @ 9
Comment 11 xiyuan 2011-01-20 21:45:00 PST
Comment on attachment 79692 [details]
Address comments @ 9

Please take another look. Thanks.
Comment 12 xiyuan 2011-01-21 09:26:24 PST
Created attachment 79748 [details]
Sync and resolve.

Synced with ToT and adapted to r76340 (ChromiumBridge -> PlatformBridge rename change).
Comment 13 WebKit Commit Bot 2011-01-21 12:26:15 PST
Comment on attachment 79748 [details]
Sync and resolve.

Clearing flags on attachment: 79748

Committed r76379: <http://trac.webkit.org/changeset/76379>
Comment 14 WebKit Commit Bot 2011-01-21 12:26:26 PST
All reviewed patches have been landed.  Closing bug.