summaryrefslogtreecommitdiffstats
path: root/app/gfx/canvas_linux.cc
Commit message (Collapse)AuthorAgeFilesLines
* Move base/gfx contents to gfx/ben@chromium.org2010-03-141-1/+1
| | | | | | | | | TBR=darin BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41559 0039d316-1c4b-4281-b951-d872f2087c98
* svn prop fixes. Applied to all files not in third_party.pkasting@chromium.org2010-03-091-0/+0
| | | | | | | | | | | | * Removed eol-style, executable and mergeinfo from BMP/GIF/ICO/JPEG files, and set correct mime-type. * Removed executable and mergeinfo from .c/.cc/.cpp/.h/.m/.mm and .gyp files, and set eol-style to LF. TBR=evanm BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40991 0039d316-1c4b-4281-b951-d872f2087c98
* app: string_util.h -> utf_string_conversions.h fix.jhawkins@chromium.org2010-03-061-1/+1
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/668226 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40853 0039d316-1c4b-4281-b951-d872f2087c98
* Remove ampersands from menu item titles. See http://crosbug.com/1273avayvod@chromium.org2010-02-131-8/+19
| | | | | | | | | | BUG=None TEST=Right click bookmark bar. See no & in Cut,Copy,Paste and Bookmark Manager. Review URL: http://codereview.chromium.org/593074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38987 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt to fix text not being clipped. This only seems to happen insky@chromium.org2010-01-111-0/+3
| | | | | | | | | | | | certain configurations. I'm guessing the problem is because a width/height <= 0 is not honored and clipping doesn't happen. BUG=26483 TEST=none Review URL: http://codereview.chromium.org/542011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35909 0039d316-1c4b-4281-b951-d872f2087c98
* Workaround bug in Pango that was resulted in incorrect wrapping.sky@chromium.org2010-01-041-0/+17
| | | | | | | | | BUG=30361 TEST=see bug Review URL: http://codereview.chromium.org/512002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35490 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bug where Chrome was not rendering fonts at the size it shouldsky@chromium.org2009-12-011-0/+23
| | | | | | | | | | | | have been. This was only apparent at DPIs other than the default, such as is typically seen on netbooks. BUG=none TEST=none Review URL: http://codereview.chromium.org/452031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33487 0039d316-1c4b-4281-b951-d872f2087c98
* Problem clipping gtk text.davemoore@chromium.org2009-10-301-1/+1
| | | | | | | | | BUG=26266i TEST=NONE Review URL: http://codereview.chromium.org/342060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30604 0039d316-1c4b-4281-b951-d872f2087c98
* Got the about panel to have its text lined up correctly.davemoore@chromium.org2009-10-271-3/+11
| | | | | | | | 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-231-8/+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
* 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
* Do work necessary to make Views About panel work on Chrome OS. This is to be ↵davemoore@chromium.org2009-10-191-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Reverts linux font change again. Slow down isn't as bad as before. Butsky@chromium.org2009-09-141-1/+3
| | | | | | | | | | | | 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-141-3/+1
| | | | | | | | | | | | 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-111-1/+3
| | | | | | | | | | 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-111-3/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* Porting textfield to toolkit_views Gtk.jcampan@chromium.org2009-09-011-27/+1
| | | | | | | | | | | 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
* 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
* Show favicon in panel title, highlight focused panel, fix breakagedavemoore@chromium.org2009-08-131-50/+39
| | | | | | | recent search box changes Review URL: http://codereview.chromium.org/164425 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23395 0039d316-1c4b-4281-b951-d872f2087c98
* Use system default favicon in tab strip when using GTK theme.estade@chromium.org2009-08-101-0/+6
| | | | | | Review URL: http://codereview.chromium.org/164266 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22947 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: make gfx::Canvas honor GTK font settings.derat@chromium.org2009-08-061-0/+76
| | | | | | | | | | | | Reverts r22593, which was itself a revert of r22555. Per nsylvain, it looks like the memory_test failures weren't helped by rolling back this change. TBR=nsylvain Review URL: http://codereview.chromium.org/165059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22625 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r22555, "Linux: make gfx::Canvas honor GTK font settings."derat@chromium.org2009-08-061-76/+0
| | | | | | | | | Per nsylvain, this appears to be causing problems in memory_test in Release mode. Review URL: http://codereview.chromium.org/165036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22593 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: make gfx::Canvas honor GTK font settings.derat@chromium.org2009-08-051-0/+76
| | | | | | | | | BUG=18038 TESTED=restarted chrome a bunch while mucking around with gnome-appearance-settings Review URL: http://codereview.chromium.org/164017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22555 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Fix RTL layout of page title for strong right-to-left characters. When ↵jhawkins@chromium.org2009-07-211-0/+4
| | | | | | | | | | pango detects strong RTL characters in the layout, it switches the text direction. For our uses of DrawStringInt, we've already handled the layout and don't want the direction switched. This matches the behavior of Windows. BUG=16970 TEST=Open a browser in a RTL language. Navigate to google.com and notice that the tab title is right-aligned. Open up the history page and notice that the title (in Hebrew) is right-aligned as well. Review URL: http://codereview.chromium.org/155829 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21145 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 20516 by re-landing this previous patch.brettw@chromium.org2009-07-171-20/+1
| | | | | | | | | | | | | Keep the cairo clipping region in sync with the Skia one. The PlatformCanvas now tracks this, so we don't need to have the similar code in gfx::Canvas. I moved most references of cairo_surface_t to cairo_t since the cairo_t has a transform and clip but the surface does not. Review URL: http://codereview.chromium.org/149409 Review URL: http://codereview.chromium.org/155700 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20992 0039d316-1c4b-4281-b951-d872f2087c98
* Revert previous clipping rect change for Cairo to see if it fixes the build.brettw@chromium.org2009-07-131-1/+20
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20516 0039d316-1c4b-4281-b951-d872f2087c98
* Keep the cairo clipping region in sync with the Skia one.brettw@chromium.org2009-07-131-20/+1
| | | | | | | | | | The PlatformCanvas now tracks this, so we don't need to have the similar code in gfx::Canvas. I moved most references of cairo_surface_t to cairo_t since the cairo_t has a transform and clip but the surface does not. Review URL: http://codereview.chromium.org/149409 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20499 0039d316-1c4b-4281-b951-d872f2087c98
* Remove svn:executable property from files that don't need it.thestig@chromium.org2009-07-081-0/+0
| | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/155199 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20161 0039d316-1c4b-4281-b951-d872f2087c98
* Add missing cairo_surface_destroy. Fixes a memory leak.phajdan.jr@chromium.org2009-06-161-0/+1
| | | | | | Review URL: http://codereview.chromium.org/126133 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18497 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor the PlatformContext layer to have only one class.brettw@chromium.org2009-06-141-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Previously we had three classes of PlatformCanvas*, one for each platform. Then we had a typedef of PlatformContext to PlatformCanvas[Mac|Win|Linux] for the specific platform. This means that it was almost impossible to forward-declare PlatformCanvas and there were a bunch of unnecessary includes of platform_canvas.h in header files. This change makes there be only one platform_canvas.h header with ifdefs, which removes a decent amount of duplicated code. There is a platform-independent file, and one platform-dependent file of platform_canvas for each platform. I also renamed PlatformDevice[Mac|Win|Linux] to PlatformDevice, althouth in this case I kept the separate headers since there was much less overlap. I also broke out CanvasPaint into separate headers so this template doesn't need to be included all over the project (only a couple of files actually need it). Review URL: http://codereview.chromium.org/125109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18363 0039d316-1c4b-4281-b951-d872f2087c98
* Unified the ways Font and Canvas get the pixel size of strings, using pangodavemoore@chromium.org2009-05-201-1/+33
| | | | | | Review URL: http://codereview.chromium.org/115586 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16535 0039d316-1c4b-4281-b951-d872f2087c98
* ChromeCanvas->gfx::Canvasben@chromium.org2009-05-151-0/+141
Rename files too. TBR=brettw http://crbug.com/11387 Review URL: http://codereview.chromium.org/113443 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16148 0039d316-1c4b-4281-b951-d872f2087c98