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

Issue 18804: OpaqueNonClientView cleanup (Closed)

Created:
11 years, 11 months ago by Peter Kasting
Modified:
9 years, 7 months ago
Reviewers:
sky
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

This change should have few user-visible effects. I think I slightly modified the window layout (by a pixel or so) in the popup window case, which I haven't tried to make pixel-perfect yet anyway. Otherwise it's all reorg. Clean up logic of nonclient view to be more consistent and coherent. Most things are now based on a small set of core functions that return various frame/nonclient thicknesses. This allows a noticeable reduction in the number of hardcoded constants, makes the code make more sense (even though a few places are longer than before), and makes it much easier to do things in the future like resizing various borders or handling system metrics better. Rename and update comments for all constants to be more descriptive and less redundant. Rename helper functions and variables for consistency, now that they've changed. Remove an unused variant of TileImageInt(). Add a new one that takes an offset into the source image. This is used to rewrite the maximized bottom border tiling call in a way that doesn't rely on someone else clipping out or painting over the overdraw from tiling "too large" a source image. Probably no visible effect. Make resize border hittest helper function able to handle borders of varying widths, and try to make parameter names more meaningful. Technically, we don't need the extra flexibility, since our bottom and side borders are the same thickness, but since there are different functions calculating that thickness on the caller side, it didn't hurt to not rely on that for the future. BUG=5054 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=8658

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+338 lines, -319 lines) Patch
M chrome/browser/views/constrained_window_impl.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/views/frame/opaque_non_client_view.h View 1 chunk +37 lines, -13 lines 0 comments Download
M chrome/browser/views/frame/opaque_non_client_view.cc View 20 chunks +261 lines, -259 lines 0 comments Download
M chrome/common/gfx/chrome_canvas.h View 1 chunk +2 lines, -5 lines 0 comments Download
M chrome/common/gfx/chrome_canvas.cc View 2 chunks +10 lines, -11 lines 0 comments Download
M chrome/views/custom_frame_window.cc View 2 chunks +2 lines, -6 lines 0 comments Download
M chrome/views/non_client_view.h View 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/views/non_client_view.cc View 1 chunk +19 lines, -18 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Peter Kasting
11 years, 11 months ago (2009-01-26 18:06:20 UTC) #1
sky
11 years, 11 months ago (2009-01-26 20:18:14 UTC) #2
OK

Powered by Google App Engine
This is Rietveld 408576698