summaryrefslogtreecommitdiffstats
path: root/app/gfx
Commit message (Collapse)AuthorAgeFilesLines
* Got the about panel to have its text lined up correctly.davemoore@chromium.org2009-10-273-19/+101
| | | | | | | | Also added underline capability to linux fonts. Review URL: http://codereview.chromium.org/338029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30276 0039d316-1c4b-4281-b951-d872f2087c98
* Get the About panel to align its links correctly,davemoore@chromium.org2009-10-232-9/+2
| | | | | | | | but undo a previous change to the way we measure strings in pango. Review URL: http://codereview.chromium.org/338001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29943 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure the RootView is sized to the correct bounds when the opaque frame ↵ben@chromium.org2009-10-231-0/+3
| | | | | | | | is maximized.It seems that now, when an opaque frame is maximized we also need to add the SM_CXSIZEFRAME to the top of the client rect. I don't know why, it's just is.I reworked the way Widget allows subclasses to handle sizing of the RootView... I delegate responsibility for determining the RootView's bounds to a helper virtual function which BrowserFrameWin overrides. This seems cleaner to me. I make sure this handling only occurs when the window is not maximized.http://crbug.com/25227TEST=use to a theme or switch off glass on vista or use Xp. Maximize the browser window. The tabs should be entirely visible. Review URL: http://codereview.chromium.org/304007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29882 0039d316-1c4b-4281-b951-d872f2087c98
* Make PNGCodec::Decode(...) not make an intermediary copy of the decoded data;erg@google.com2009-10-223-60/+156
| | | | | | | | | | | instead have it write directly to the returned SkBitmap. BUG=http://crbug.com/24493 TEST=Perf should get better. On the perf trybot, tab_complex_theme_cold got an average of ~40ms better. Review URL: http://codereview.chromium.org/305001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29780 0039d316-1c4b-4281-b951-d872f2087c98
* Implement dragging icon for dragging bookmarks in views/gtk.skrul@google.com2009-10-212-2/+2
| | | | | | Review URL: http://codereview.chromium.org/270068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29692 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Display explanatory message on sad tab page.estade@chromium.org2009-10-211-4/+3
| | | | | | | | | | | Also fix canvas text drawing bugs for certain vertical alignments. BUG=25267 TEST=about:crash Review URL: http://codereview.chromium.org/307015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29673 0039d316-1c4b-4281-b951-d872f2087c98
* Plug a font leak.davemoore@chromium.org2009-10-191-1/+3
| | | | | | Review URL: http://codereview.chromium.org/293011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29462 0039d316-1c4b-4281-b951-d872f2087c98
* Do work necessary to make Views About panel work on Chrome OS. This is to be ↵davemoore@chromium.org2009-10-193-24/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | used for forcing Chrome OS updates. There were many things that needed to be fixed for this to work. Make skia's canvas return height of font for size of strings, instead of the actual height of the characters to bring it in line with Windows. Make average character widths use pango metrics and windows dialog units. Make this lazy, to avoid most calls. Fix bug in About panel that failed to adjust the embedded links to allow for the padding that Link adds so they can be focused. Support gtk about panel in regular build, views in chrome os only. Fix WindowGtk to call WindowClosing() Fix canvas_linux::SetupPangoLayout() to wrap correctly, if passed a width Fix Label::ComputeMultiLineFlags() to turn off eliding. With eliding the pango routines always return 1 line. Enable focus manager in dialogs. Version loader crashed in debug. Review URL: http://codereview.chromium.org/282002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29414 0039d316-1c4b-4281-b951-d872f2087c98
* Made sync code build and pass unit tests on OS X.akalin@chromium.org2009-10-162-0/+68
| | | | | | | | | | | | | | | | | | | | Major changes: - Moved sync_setup_{flow,wizard} to sync directory. - Made browser_with_test_window_test compile on non-Windows platform. - Moved localized contents font util functions to app/. BUG=23073 TEST=trybot Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29253 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29255 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29258 Review URL: http://codereview.chromium.org/279004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29263 0039d316-1c4b-4281-b951-d872f2087c98
* Reverted 29258.akalin@chromium.org2009-10-162-68/+0
| | | | | | TBR: nick@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29259 0039d316-1c4b-4281-b951-d872f2087c98
* Made sync code build and pass unit tests on OS X.akalin@chromium.org2009-10-162-0/+68
| | | | | | | | | | | | | | | | | | Major changes: - Moved sync_setup_{flow,wizard} to sync directory. - Made browser_with_test_window_test compile on non-Windows platform. - Moved localized contents font util functions to app/. BUG=23073 TEST=trybot Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29253 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29255 Review URL: http://codereview.chromium.org/279004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29258 0039d316-1c4b-4281-b951-d872f2087c98
* Reverted 29255.akalin@chromium.org2009-10-162-68/+0
| | | | | | TBR: nick@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29256 0039d316-1c4b-4281-b951-d872f2087c98
* Made sync code build and pass unit tests on OS X.akalin@chromium.org2009-10-162-0/+68
| | | | | | | | | | | | | | | | Major changes: - Moved sync_setup_{flow,wizard} to sync directory. - Made browser_with_test_window_test compile on non-Windows platform. - Moved localized contents font util functions to app/. BUG=23073 TEST=trybot Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29253 Review URL: http://codereview.chromium.org/279004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29255 0039d316-1c4b-4281-b951-d872f2087c98
* Reverted 29253.akalin@chromium.org2009-10-162-68/+0
| | | | | | TBR: nick@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29254 0039d316-1c4b-4281-b951-d872f2087c98
* Made sync code build and pass unit tests on OS X.akalin@chromium.org2009-10-162-0/+68
| | | | | | | | | | | | | | Major changes: - Moved sync_setup_{flow,wizard} to sync directory. - Made browser_with_test_window_test compile on non-Windows platform. - Moved localized contents font util functions to app/. BUG=23073 TEST=trybot Review URL: http://codereview.chromium.org/279004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29253 0039d316-1c4b-4281-b951-d872f2087c98
* TBR: nick@chromium.orgakalin@chromium.org2009-10-162-68/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29240 0039d316-1c4b-4281-b951-d872f2087c98
* Made sync code build and pass unit tests on OS X.akalin@chromium.org2009-10-162-0/+68
| | | | | | | | | | | | | | Major changes: - Moved sync_setup_{flow,wizard} to sync directory. - Made browser_with_test_window_test compile on non-Windows platform. - Moved localized contents font util functions to app/. BUG=23073 TEST=trybot Review URL: http://codereview.chromium.org/279004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29239 0039d316-1c4b-4281-b951-d872f2087c98
* Turn NULL used as int to 0.phajdan.jr@chromium.org2009-10-131-0/+3
| | | | | | | | | | | | | (Excluding chrome/browser/...) Landing patch for Jacob Mandelson. Original review: http://codereview.chromium.org/195067 BUG=none TEST=base_unittests & app_unittests Review URL: http://codereview.chromium.org/267076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28810 0039d316-1c4b-4281-b951-d872f2087c98
* Move native_widget_types and gtk_native_view_id_manager from base/gfx tobrettw@chromium.org2009-10-115-1/+396
| | | | | | | | | | | | app/gfx in preparation for removing the base_gfx project. This also moves base/window_impl.cc to app/win/window_impl because this file shouldn't be in base. TEST=none BUG=none Review URL: http://codereview.chromium.org/273017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28691 0039d316-1c4b-4281-b951-d872f2087c98
* Move classes depending on Skia out of base/gfx and into app/gfx. Renamebrettw@chromium.org2009-10-079-0/+1433
| | | | | | | | | | native_theme to native_theme_win since its Windows-specific. BUG=none TEST=none Review URL: http://codereview.chromium.org/259047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28300 0039d316-1c4b-4281-b951-d872f2087c98
* Move the JPEG and PNG codecs from base/gfx to app/gfx/codec. Move the classesbrettw@chromium.org2009-10-037-0/+1674
| | | | | | | | | | | | | | | into the gfx namespace. Combine the PNGEncoder and PNGDecoder. There were separate when we had different executables for the browser and renderer, and linked the encoder only in one of them (which saved us some space used by libpng). This hasn't been the case for years, so combining them (again) makes sense. TEST=none BUG=none Review URL: http://codereview.chromium.org/243076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27930 0039d316-1c4b-4281-b951-d872f2087c98
* Landing font change again. I don't believe early flakiness was thesky@chromium.org2009-10-012-16/+28
| | | | | | | | | | | | result of my change. test_shell doesn't use font at all. This is exactly the same change as was earlier landed. BUG=22791 TEST=see bug TBR=agl Review URL: http://codereview.chromium.org/242111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27790 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting recent font change, it seems to be causing problems withsky@chromium.org2009-10-012-28/+16
| | | | | | | | | | | test_shell and valgrind ui. BUG=22791 TEST=none TBR=agl Review URL: http://codereview.chromium.org/251059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27742 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt 4 at fixing font size on linux. I think I finally gotsky@chromium.org2009-10-012-16/+28
| | | | | | | | | | | | | it. Pango scales all font sizes by a factor. Scaling the font size, then asking skia for the metrics gives us exactly the same sizes as Pango. WAHOO! BUG=22791 TEST=see bug Review URL: http://codereview.chromium.org/251054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27725 0039d316-1c4b-4281-b951-d872f2087c98
* Comment out the condition (b == vmax), since it will always be true at this ↵jhawkins@chromium.org2009-09-281-1/+3
| | | | | | | | | | point in the code. BUG=none TEST=none Review URL: http://codereview.chromium.org/243004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27374 0039d316-1c4b-4281-b951-d872f2087c98
* Simplify life for people trying to pick a "readable" foreground color by not ↵pkasting@chromium.org2009-09-242-15/+28
| | | | | | | | | | requiring them to provide two choices. This also speeds the call up a tiny bit by not calculating the background luminance twice. BUG=none TEST=none Review URL: http://codereview.chromium.org/220029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27138 0039d316-1c4b-4281-b951-d872f2087c98
* Move functions from skia/ext to app/gfx where possible: most of skia_utils.* ↵pkasting@chromium.org2009-09-246-0/+910
| | | | | | | | | | | | | and image_operations.* can be moved because they are not used by WebKit code. This also fixes the spelling of "Convolusion" to "Convolution" and updates some copyrights. This is a re-do of r26975, this time with WebKit update and some fixes to compile on Mac and Linux. BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27031 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 26975.pkasting@chromium.org2009-09-236-910/+0
| | | | | | Review URL: http://codereview.chromium.org/222011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26979 0039d316-1c4b-4281-b951-d872f2087c98
* Move functions from skia/ext to app/gfx where possible: most of skia_utils.* ↵pkasting@chromium.org2009-09-236-0/+910
| | | | | | | | | | | | and image_operations.* can be moved because they are not used by WebKit code. This also fixes the spelling of "Convolusion" to "Convolution" and updates some copyrights. BUG=none TEST=none Review URL: http://codereview.chromium.org/207059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26975 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate a bunch of color conversions. I was going to try and clean up the ↵pkasting@chromium.org2009-09-222-197/+13
| | | | | | | | | | | | code for these but discovered to my surprise that no one actually uses them. Also clean up a few other things, like my AlphaBlend() function using hex alpha values where everyone else uses decimal, or unnecessary global qualifiers, or needlessly long code. I avoided changing postincrement to preincrement :D BUG=none TEST=none Review URL: http://codereview.chromium.org/214054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26856 0039d316-1c4b-4281-b951-d872f2087c98
* Reorder the color_utils functions in preparation for adding more:pkasting@chromium.org2009-09-222-109/+114
| | | | | | | | | | | * Put helper functions in a block at the top of the file (which we can then use an anonymous namespace around) * Make main function order a little more consistent BUG=none TEST=none Review URL: http://codereview.chromium.org/215049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26827 0039d316-1c4b-4281-b951-d872f2087c98
* Workaround for Issue 15949: cannot use the "WenQuanYi Bitmap Song" (chinese ↵yusukes@google.com2009-09-191-4/+23
| | | | | | | | | | | | | | | | Fonts) as the system fonts with chrome - Adding a font fallback code to Font::CreateFont() in font_skia.cc so that Chromium can startup even when a non-scalable font is selected as an application font. If the application font is non-scalable, Font::CreateFont() loads a _scalable_ "sans" font as a fallback. (Note: The function still never load non-scalable fonts.) - Removed a comment for issue 12530 since the issue has been fixed. BUG=12530 BUG=15949 TEST=Download the snap.pcf font from http://artwizaleczapka.sourceforge.net/ and put it to ~/.fonts/. Remove temporarily /etc/fonts/conf.d/70-no-bitmaps.conf and run "fc-cache -f". Start /ust/bin/gnome-appearance-properties and select "snap" as your application font. Then start chromium and verify that it does not crash (by the CHECK failure) on startup. Review URL: http://codereview.chromium.org/207009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26652 0039d316-1c4b-4281-b951-d872f2087c98
* Changes font_skia to use font bounding box rather thansky@chromium.org2009-09-171-5/+12
| | | | | | | | | | | | | ascent/descent. This gets us closer to sizes used by pango. It's not ideal, but as we can't switch to pango (startup hit), this is the best I can do. BUG=20823 TEST=see bug Review URL: http://codereview.chromium.org/211003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26509 0039d316-1c4b-4281-b951-d872f2087c98
* This CL fixes issue 10860 - RTL: Hebrew file names should have forced LTRxji@chromium.org2009-09-163-9/+26
| | | | | | | | | | | | | | | | | | | directionality in download shelf. File names in download shelf are forced to be LTR in DownloadItemView and through ElideFileName(). BUG=http://crbug.com/10860 TEST=1. Open chrome with Hebrew UI. 2. Right click a link and chose Save As... (4th item from the top for non-Hebrew speakers) 3. In the save as dialog name the file קובץ.html 4. In the download shelf the filename should display as קובץ.html (not html.קובץ) Review URL: http://codereview.chromium.org/131001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26359 0039d316-1c4b-4281-b951-d872f2087c98
* Reverts linux font change again. Slow down isn't as bad as before. Butsky@chromium.org2009-09-145-261/+269
| | | | | | | | | | | | still not ideal. BUG=none TEST=none TBR=agl Review URL: http://codereview.chromium.org/194105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26141 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt 2 at converting font from Skia to Pango. The slow down appears to be ↵sky@chromium.org2009-09-145-269/+261
| | | | | | | | | | | | entirely attributed to asking for the metrics. To get back the performance I did the following: . Only ask for the metrics when needed. We appear to create 6 or so fonts very early on without needing the metrics. This ensures we only take the metrics load hit when needed. . Keep a cache of the metrics around. This ensures that we only load the metrics once. I didn't dig through the Pango source to see why Pango is slow at getting metrics. I suspect it's the first person to ask for metrics incurs a penalty as Pango accesses the disk. The code we have now is the same as that as Gtk. Review URL: http://codereview.chromium.org/199101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26116 0039d316-1c4b-4281-b951-d872f2087c98
* Reverts r26015. It caused a startup regression:(sky@chromium.org2009-09-115-170/+270
| | | | | | | | | | BUG=20823 TEST=none TBR=agl Review URL: http://codereview.chromium.org/203041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26030 0039d316-1c4b-4281-b951-d872f2087c98
* Nukes font_skia and converts font_gtk to use pango. This wassky@chromium.org2009-09-115-270/+170
| | | | | | | | | | | | | | | | | | | | | | necessitated by Pango and Skia differing on how the fonts are sized, resulting in lots of clipping in views. The only iffy part of this is I've made Font::nativeFont() win/mac only (it isn't used on Linux). I did this to avoid folks accidentally modifying the underlying font out from under Font. That said, I could certainly nuke GetPangoFontDescription in favor of nativeFont() and make it return the PangoFontDescription (not a copy). Let me know if you feel strongly about converting this. Assuming your ok with this, I'll watch the perf tests to make sure this doesn't impact startup. BUG=20823 TEST=none Review URL: http://codereview.chromium.org/195058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26015 0039d316-1c4b-4281-b951-d872f2087c98
* Avoids the use of "namespace using-directives" in a few places.thakis@chromium.org2009-09-071-2/+0
| | | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/183008 Patch from tfarina. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25607 0039d316-1c4b-4281-b951-d872f2087c98
* Adds Font::CreateFont(PangoFontDescription* desc).sky@chromium.org2009-09-042-10/+15
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/200019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25488 0039d316-1c4b-4281-b951-d872f2087c98
* Add functions to alpha-blend two colors and pick the more readable of two ↵pkasting@chromium.org2009-09-032-4/+50
| | | | | | | | | | | | colors. These will be used to make the UI more readable on non-default themes. Also removes a function that no one was calling. BUG=92, 18367 TEST=none Review URL: http://codereview.chromium.org/190001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25340 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Workaround Skia and Pango measuring font heights differently by ↵evan@chromium.org2009-09-031-24/+3
| | | | | | | | | asking Pango" This reverts commit r25131. It seems to have regressed Linux startup; will track perf builder after committing this to be sure. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25325 0039d316-1c4b-4281-b951-d872f2087c98
* Workaround Skia and Pango measuring font heights differently by asking Pangobrettw@chromium.org2009-09-021-3/+24
| | | | | | | | | | | | | | | | | | for the height that we'll report in the gfx::Font. This seems wrong, but at least things will look reasonable until we find a better solution. This changes the existing height computation code to use ceiling. Even though this is no longer used, it is good to have the correct code for the height computation here so that if we find a better solution, it will be run properly. This also gives more room for the clock in the status area view because the height is now more and we want it to be aligned properly. BUG=none TEST=none Review URL: http://codereview.chromium.org/183044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25131 0039d316-1c4b-4281-b951-d872f2087c98
* Porting textfield to toolkit_views Gtk.jcampan@chromium.org2009-09-013-27/+33
| | | | | | | | | | | BUG=None TEST=Run the view unit-tests. See original review: http://codereview.chromium.org/165512/show Review URL: http://codereview.chromium.org/180061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25063 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Get rid of the title-centering code in TabRendererGtk. DrawStringInt ↵jhawkins@chromium.org2009-08-311-8/+1
| | | | | | | | | | centers the text for us already. This change also removes a hack that modified the clipping rect unnecessarily. BUG=20401,20610 TEST=none Review URL: http://codereview.chromium.org/179037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24875 0039d316-1c4b-4281-b951-d872f2087c98
* Some code style cleanup under src/app.maruel@chromium.org2009-08-297-12/+12
| | | | | | | | | | BUG=None TEST=None Patch contributed by thiago.farina@gmail.com Review URL: http://codereview.chromium.org/173260 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24859 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Fix the bounds of the clip region for tab title text.jhawkins@chromium.org2009-08-261-5/+10
| | | | | | | | BUG=19741 TEST=Open many tabs. The ellipses should not be rendered if the tab is not large enough. Review URL: http://codereview.chromium.org/174582 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24560 0039d316-1c4b-4281-b951-d872f2087c98
* Fall back to the chrome-themed default favicon if the gtk theme fails to ↵estade@chromium.org2009-08-251-0/+5
| | | | | | | | | | | produce one. BUG=19994 Review URL: http://codereview.chromium.org/174267 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24191 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Clip the cairo context to the extents provided to the DrawStringInt ↵jhawkins@chromium.org2009-08-241-0/+7
| | | | | | | | | | function. This fixes an issue when rendering the tab title where the ellipses are rendered no matter how small the tab is sized. This change also fixes an issue where we were using the default font to determine whether to show the tooltip. BUG=19741 TEST=Open many tabs. See that the ellipses should disappear when there's no room left in the tab to display them. Review URL: http://codereview.chromium.org/173300 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24149 0039d316-1c4b-4281-b951-d872f2087c98
* Makes Path::CreateGdkRegion return NULL for empty paths. Without thissky@chromium.org2009-08-192-0/+8
| | | | | | | | | | | gdk_region_polygon asserts. And adds the null check in WindowGtk. BUG=none TEST=none Review URL: http://codereview.chromium.org/164441 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23691 0039d316-1c4b-4281-b951-d872f2087c98