Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Issue 199025: Fix some gcc 4.4 issues when compiling with toolkit_views. (Closed)

Created:
11 years, 3 months ago by Craig
Modified:
9 years, 7 months ago
Reviewers:
tony
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Fix some gcc 4.4 issues when compiling with toolkit_views. Most of these squash harmless compiler warnings but the custom_button.cc change fixes a real problem with the accelerator key bitmask calculation (+ preceeds << in terms of operator precedence) The change to tab_strip.cc is ugly but it fixes the following error: chrome/browser/views/tabs/tab_strip.cc: In member function ‘void TabStrip::StartRemoveTabAnimation(int, TabContents*)’: chrome/browser/views/tabs/tab_strip.cc:201: error: assuming signed overflow does not occur when assuming that (X - c) > X is always false As an added bonus, this makes the Linux shared build of toolkit_views work too. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=25602

Patch Set 1 #

Total comments: 3

Patch Set 2 : Alternate fix for tab_strip.cc issue #

Patch Set 3 : rebase against r25573 #

Total comments: 3

Patch Set 4 : Remove CreateFindBar, use COMPILER_GCC and add comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -15 lines) Patch
M app/os_exchange_data_provider_gtk.cc View 5 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/views/dialog_stubs_gtk.cc View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/views/tabs/tab_strip.cc View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 2 chunks +5 lines, -2 lines 0 comments Download
M views/controls/button/custom_button.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M views/widget/drop_target_gtk.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
Craig
Any takers to review this please? Suggestions are welcome for less ugly ways to fix ...
11 years, 3 months ago (2009-09-04 17:23:47 UTC) #1
tony
http://codereview.chromium.org/199025/diff/1/3 File chrome/browser/views/dialog_stubs_gtk.cc (right): http://codereview.chromium.org/199025/diff/1/3#newcode49 Line 49: #if !defined(TOOLKIT_VIEWS) I don't think we compile this ...
11 years, 3 months ago (2009-09-04 21:02:36 UTC) #2
Craig
On 2009/09/04 21:02:36, tony wrote: > http://codereview.chromium.org/199025/diff/1/3 > File chrome/browser/views/dialog_stubs_gtk.cc (right): > > http://codereview.chromium.org/199025/diff/1/3#newcode49 > ...
11 years, 3 months ago (2009-09-05 08:13:52 UTC) #3
tony
LGTM with the below changes applied. http://codereview.chromium.org/199025/diff/3003/1003 File chrome/browser/views/dialog_stubs_gtk.cc (right): http://codereview.chromium.org/199025/diff/3003/1003#newcode50 Line 50: FindBar* CreateFindBar(BrowserView* ...
11 years, 3 months ago (2009-09-05 18:25:39 UTC) #4
Craig
11 years, 3 months ago (2009-09-06 16:06:13 UTC) #5
On 2009/09/05 18:25:39, tony wrote:
> LGTM with the below changes applied.

Thank you.
 
> http://codereview.chromium.org/199025/diff/3003/1003
> File chrome/browser/views/dialog_stubs_gtk.cc (right):
> 
> http://codereview.chromium.org/199025/diff/3003/1003#newcode50
> Line 50: FindBar* CreateFindBar(BrowserView* browser_view) {
> > Toolkit_views includes dialog_stubs_gtk.cc explicitly (line 2407,
chrome.gyp)
> > and I get a range of linker issues if I drop it. There is another definition
> for
> > CreateFindBar in find_bar_win.cc which is also part of the views build which
> > creates linker errors so I dropped the stub to resolve the issue.
> 
> I think you can just remove the stub since it's in find_bar_win.cc and
> find_bar_win.cc is compiled on win and linux.  It's always the case that if
this
> file is compiled, TOOLKIT_VIEWS=1.

Ah, yes! ... for some odd reason I kept thinking it was part of the non-views
build but it isn't. Duh. Fixed. Thanks!

> http://codereview.chromium.org/199025/diff/3003/1004
> File chrome/browser/views/tabs/tab_strip.cc (right):
> 
> http://codereview.chromium.org/199025/diff/3003/1004#newcode39
> Line 39: #if defined(OS_LINUX)
> Nit: COMPILER_GCC (also in build_config.h)

Fixed.
 
> http://codereview.chromium.org/199025/diff/3003/1005
> File chrome/chrome.gyp (right):
> 
> http://codereview.chromium.org/199025/diff/3003/1005#newcode2545
> Line 2545: ['exclude', '^browser/extensions/extension_creator.cc'],
> That's fine, can you actually add the comment here.  The other stuff is all
gtk
> specific, so it's not obvious just from looking at this.

I've added some comments now.

Powered by Google App Engine
This is Rietveld 408576698