summaryrefslogtreecommitdiffstats
path: root/ui/gfx/native_theme_win.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix windows classic scrollbar buttons.scottbyer@chromium.org2011-09-081-1/+16
| | | | | | | | | | | | State wasn't getting translated into classic state for drawing. BUG=88930 TEST=Put Windows into classic theme (hey, some people do), press on a scrollbar arrow - before, nothing, after this change, gets pressed. Review URL: http://codereview.chromium.org/7849007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100197 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: base/scoped_ptr.h -> base/memory/scoped_ptr.h. (part 4)thestig@chromium.org2011-08-181-1/+1
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7670016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97286 0039d316-1c4b-4281-b951-d872f2087c98
* First pass at removal of unneeded dependencies on skia\ext\platform_canvas.htwiz@google.com2011-08-021-0/+1
| | | | | | | | | | All 'low-hanging' platform_canvas.h dependencies have been removed, and replaced with skia-specific includes. BUG=None TEST=None Review URL: http://codereview.chromium.org/7517020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95083 0039d316-1c4b-4281-b951-d872f2087c98
* Distinguish menu bullet and menu check when Windows theme is not present.rhashimoto@chromium.org2011-07-261-1/+2
| | | | | | | | | | | | | Radio button menu items were drawn properly with a uxtheme.dll on Windows but show as a check when no theme is present (i.e. on XP). BUG=chromium:90190 TEST=try Context Menus Sample on XP Review URL: http://codereview.chromium.org/7467032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94205 0039d316-1c4b-4281-b951-d872f2087c98
* Fix vertical range slider.rogerta@chromium.org2011-07-191-0/+3
| | | | | | | | | | | | | BUG=88017 TEST=Load a web page that should display a vertical slider and make sure it appears vertical and correctly instead of horizonatally. Note that the thumb part appears too far to the right; I have confirmed this on all platforms (win,linux,mac). Since bug was was about a windows specific rendering issue, I have opened another bug (89616) to keep track of the right offset. Review URL: http://codereview.chromium.org/7400024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92927 0039d316-1c4b-4281-b951-d872f2087c98
* Fix checkbox in windows uninstaller.rogerta@chromium.org2011-06-271-8/+60
| | | | | | | | | | BUG=84791 TEST=Test the checkbox in the uninstaller as mentioned in the bug, but also all checkboxes in chrome too. Review URL: http://codereview.chromium.org/7196002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90640 0039d316-1c4b-4281-b951-d872f2087c98
* Fix NativeThemeWin with --enable-accelerated-drawing path.asvitkine@chromium.org2011-06-221-11/+18
| | | | | | | | | | | | | Do a local copy of the bitmap pixels to a temporary bitmap whose pixels are created with |allocPixels()| and hence refcounted. This is necessary because SkPicture defers drawing until some time after the |drawBitmap()| call and expects the ref-counting mechanism to hold on to the pixels for it. BUG=none TEST=manual using --enable-accelerated-drawing and --force-compositing-mode flags Review URL: http://codereview.chromium.org/7189064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90025 0039d316-1c4b-4281-b951-d872f2087c98
* Enable NativeThemeWin to draw to non-HDC backed canvas. For example, an ↵asvitkine@chromium.org2011-06-101-2/+57
| | | | | | | | | | | | | | | | | | | accelerated canvas via Ganesh. This change adds a code path to NativeThemeWin that will be taken when skia::SupportsPlatformPaint(canvas) is false (i.e. the canvas is not backed by an HDC). In this path, this code will create a temporary offscreen HDC-backed bitmap and draw into that first, followed by drawing the bitmap to the canvas. Unfortunately, some of the Windows theme drawing APIs do not set correct alphas when painting to non-opaque destinations. As a result, the code has to do some tricks to work-around this (more details in the code and comments). This is an initial implementation that creates an offscreen bitmap for each paint operation, which is inefficient. This can be sped up in the future by building a cache of the bitmaps. BUG=none TEST=manual using a test-page with many different form controls Review URL: http://codereview.chromium.org/7125011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88722 0039d316-1c4b-4281-b951-d872f2087c98
* Makes rendering of selected disabled menu items match what windows does. As ↵sky@chromium.org2011-05-271-4/+7
| | | | | | | | | | | | well as disallowing opening disabled child menus by way of the keyboard. BUG=80837 TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/7062031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87064 0039d316-1c4b-4281-b951-d872f2087c98
* We assume that each SkDevice is our custom PlatformDevice. This assumption ↵alokp@chromium.org2011-05-261-0/+7
| | | | | | | | is not valid when using skia gpu path. This patch adds a "bool" meta-data to our custom PlatformDevice to properly identify them before performing the cast. This is a temporary hack for me to move forward with the gpu path. twiz@ is working on a long term solution that eliminates the need for subclassing SkDevice. Review URL: http://codereview.chromium.org/6914029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86867 0039d316-1c4b-4281-b951-d872f2087c98
* This change implements a first pass in the effort to remove the dependency ↵twiz@chromium.org2011-05-261-3/+2
| | | | | | | | | | | | | | of PlatformDevice within Chrome. The Skia library now provides multiple back-ends for the SkDevice class, so PlatformDevice's inheritance of SkDevice, and the assumption of instances of PlatformDevice limits the use of these new back-ends. A new set of helper functions is provided for the PlatformDevice entry points. Upon construction of a PlatformDevice, a pointer to the interface is cached in the parent SkDevice's SkMetaData. The new helper functions forward calls to the interface cached in the metadata. BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86625 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=86625 Review URL: http://codereview.chromium.org/7019013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86823 0039d316-1c4b-4281-b951-d872f2087c98
* Fix scrollbar buttons in classic windows theme. When I refactored the coderogerta@chromium.org2011-05-261-2/+20
| | | | | | | | | | | | | | a few weeks ago, it seems a code path that was not being used before is now called. Added support to draw the scroll buttons in the correct orientation. BUG=92773 TEST=Run chrome in classic windows theme. Open the NTP and resize it to make it small enough so that scroll bars appeat both horizontally and vertically. Make sure all four scrollbar buttons appear in the correct orientation. Review URL: http://codereview.chromium.org/7008013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86817 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 86625 - This change implements a first pass in the effort to remove ↵vandebo@chromium.org2011-05-251-2/+3
| | | | | | | | | | | | | | | the dependency of PlatformDevice within Chrome. The Skia library now provides multiple back-ends for the SkDevice class, so PlatformDevice's inheritance of SkDevice, and the assumption of instances of PlatformDevice limits the use of these new back-ends. A new set of helper functions is provided for the PlatformDevice entry points. Upon construction of a PlatformDevice, a pointer to the interface is cached in the parent SkDevice's SkMetaData. The new helper functions forward calls to the interface cached in the metadata. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/7019013 TBR=twiz@chromium.org Review URL: http://codereview.chromium.org/6987019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86629 0039d316-1c4b-4281-b951-d872f2087c98
* This change implements a first pass in the effort to remove the dependency ↵twiz@chromium.org2011-05-251-3/+2
| | | | | | | | | | | | of PlatformDevice within Chrome. The Skia library now provides multiple back-ends for the SkDevice class, so PlatformDevice's inheritance of SkDevice, and the assumption of instances of PlatformDevice limits the use of these new back-ends. A new set of helper functions is provided for the PlatformDevice entry points. Upon construction of a PlatformDevice, a pointer to the interface is cached in the parent SkDevice's SkMetaData. The new helper functions forward calls to the interface cached in the metadata. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/7019013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86625 0039d316-1c4b-4281-b951-d872f2087c98
* Step 5 in native theme refactoringrogerta@chromium.org2011-04-271-53/+232
| | | | | | | | | | | | | | | | | | Moved all calls to new API. Kept PaintTextField() still available from the old API since there is one user of the method that is not in views::View specific code, and does not have access to gfx::Canvas and such. Also moved callers of GetThemePartSize() to the new GetPartSize() API. BUG=None TEST=Use the following URL to test all possible controls on web pages: http://www.corp.google.com/~rogerta/no_crawl/widgets_test.html All controls should look and before the same with and without my changes. Also, make sure the chrome UI has not been changed, for example the wrench menu. Review URL: http://codereview.chromium.org/6880107 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83204 0039d316-1c4b-4281-b951-d872f2087c98
* step 4 of native theme refactoringrogerta@chromium.org2011-04-201-143/+289
| | | | | | | | | | | Moved all calls made by webthemeengine_impl_win.cc from the old api to the new api. BUG=None TEST=None Review URL: http://codereview.chromium.org/6873047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82296 0039d316-1c4b-4281-b951-d872f2087c98
* step 3 of native theme refactoringrogerta@chromium.org2011-04-121-95/+128
| | | | | | | | | | | | | | Moved all calls to old menu drawing api to new NativeTheme::Paint(). Moved all calls to old push/radio/check button api to new NativePaint::Paint(). BUG=None TEST=Affects windows platform only. All menus in chrome, such as wrench menu, should look and behave as before, with no change. All pushbuttons, radiobuttons, and checkbox in web page forms should look and behave as before. Review URL: http://codereview.chromium.org/6825007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81257 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate skia::PlatformCanvas - Step 1 (linux)alokp@chromium.org2011-04-111-3/+3
| | | | | | | Patch corresponding to r80955 on linux. Review URL: http://codereview.chromium.org/6813050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81099 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate skia::PlatformCanvas, a subclass of SkCanvas. Skia provides ↵alokp@chromium.org2011-04-081-4/+4
| | | | | | | | | | | | | | | | multiple types of SkCanvas classes that we would like to use. Unfortunately these classes are implemented as subclasses of SkCanvas. Subclassing SkCanvas in both Skia and Chromium makes it impossible to dynamically use any SkCanvas. There is also no reason for chromium to subclass SkCanvas. Most of the extra functionalities can be implemented by hanging meta-data from SkCanvas. We cannot eliminate skia::PlatformCanvas in one step due to WebKit's dependency on skia::PlatformCanvas. WebKit::WebCanvas is typedef as skia::PlatformDevice. It should be SkCanvas. So we need to do it in multiple steps: 1. Prepare Chromium tree for the change in WebKit::WebCanvas tyepdef. This basically means adding a couple of static_cast<skia::PlatformCanvas>(WebCanvas). 2. Change WebKit::WebCanvas typedef from skia::PlatformCanvas to SkCanvas 3. Eliminate skia::PlatformCanvas in chromium This CL accomplishes the first step on windows. WebKit BUG=https://bugs.webkit.org/show_bug.cgi?id=57563 Review URL: http://codereview.chromium.org/6783023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80955 0039d316-1c4b-4281-b951-d872f2087c98
* Step 1 in refactoring NativeThemeWin so that it shares more with the nativerogerta@chromium.org2011-04-051-8/+292
| | | | | | | | | | | | | | | | | | | | | theme support in linux and chromeos. This first change introduces a new common base class for all plaforms called NativeTheme, and NativeThemeWin now derives from it. NativeThemeWin will continue to support its "old" API while the transition to the new API is ongoing, so that each user of NativeThemeWin can be transitioned carefully. Once the windows support is complete, the linux and chromeos native themes will then derive from NativeTheme, and any references do the specific platform classes will be removed as needed. TEST=No user visible changes caused by this CL BUG=None R=xiyuan@chromium.org Review URL: http://codereview.chromium.org/6720046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80495 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 80314 - Step 1 in refactoring NativeThemeWin so that it shares more ↵rogerta@chromium.org2011-04-041-302/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | with the native theme support in linux and chromeos. This first change introduces a new common base class for all plaforms called NativeTheme, and NativeThemeWin now derives from it. NativeThemeWin will continue to support its "old" API while the transition to the new API is ongoing, so that each user of NativeThemeWin can be transitioned carefully. Once the windows support is complete, the linux and chromeos native themes will then derive from NativeTheme, and any references do the specific platform classes will be removed as needed. TEST=No user visible changes caused by this CL BUG=None R=xiyuan@chromium.org Review URL: http://codereview.chromium.org/6728029 TBR=rogerta@chromium.org Review URL: http://codereview.chromium.org/6720022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80326 0039d316-1c4b-4281-b951-d872f2087c98
* Step 1 in refactoring NativeThemeWin so that it shares more with the nativerogerta@chromium.org2011-04-041-8/+302
| | | | | | | | | | | | | | | | | | | | | theme support in linux and chromeos. This first change introduces a new common base class for all plaforms called NativeTheme, and NativeThemeWin now derives from it. NativeThemeWin will continue to support its "old" API while the transition to the new API is ongoing, so that each user of NativeThemeWin can be transitioned carefully. Once the windows support is complete, the linux and chromeos native themes will then derive from NativeTheme, and any references do the specific platform classes will be removed as needed. TEST=No user visible changes caused by this CL BUG=None R=xiyuan@chromium.org Review URL: http://codereview.chromium.org/6728029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80314 0039d316-1c4b-4281-b951-d872f2087c98
* In preparation for NativeTheme refactoring, renaming the class NativeThemerogerta@chromium.org2011-03-301-131/+131
| | | | | | | | | | | | to NativeThemeWin, since it is windows specific anyway. BUG=None TEST=None R=xiyuan@chromium.org Review URL: http://codereview.chromium.org/6778009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79874 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Change includes of gfx/* to ui/gfx/*sail@chromium.org2011-02-051-3/+3
| | | | | | | | | BUG=71063 TEST=compiled Review URL: http://codereview.chromium.org/6312156 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73890 0039d316-1c4b-4281-b951-d872f2087c98
* Move src/gfx/ to src/ui/gfxsail@chromium.org2011-02-021-0/+874
To reduce the size of this change I've left stub header files in src/gfx/. Once all includes have been updated I'll delete the stub files. BUG=71063 TEST=Still doing test builds. Review URL: http://codereview.chromium.org/6246027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73530 0039d316-1c4b-4281-b951-d872f2087c98