summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/tabs
Commit message (Collapse)AuthorAgeFilesLines
* Fix up extension badge text drawing.estade@chromium.org2009-10-301-1/+1
| | | | | | | | | | | | | | | Fall abck to the system default font if the preferred font isn't available. Also, only create the SkPaint struct once, not on every paint. Also, make some more things const. BUG=25693 TEST=badge still looks good, that crash goes away Review URL: http://codereview.chromium.org/341045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30631 0039d316-1c4b-4281-b951-d872f2087c98
* Put TabGtk's Observer inside a scoped_ptr.thestig@chromium.org2009-10-292-4/+25
| | | | | | | | BUG=24679 TEST=Mouse down on a tab, then press ctrl+w. This should not result in a dangling pointer in the MessagePump's ObserverList. Review URL: http://codereview.chromium.org/340028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30472 0039d316-1c4b-4281-b951-d872f2087c98
* Makes inactive pinned tabs on linux throb when the title changes. Isky@chromium.org2009-10-234-19/+71
| | | | | | | | | | | need to resolve with Glen/Nicholas how to handle the windows side. BUG=25308 TEST=none Review URL: http://codereview.chromium.org/314010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29903 0039d316-1c4b-4281-b951-d872f2087c98
* Hack around the floating tab when using space/enter to end a drag.tony@chromium.org2009-10-212-2/+38
| | | | | | | | | | | | | We don't get a drag-end or a drag-failed event if the user presses space/enter, so we hack around this with a timer. I filed a bug with GTK+ upstream about not getting the event: https://bugzilla.gnome.org/show_bug.cgi?id=599130 BUG=21627 Review URL: http://codereview.chromium.org/300028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29697 0039d316-1c4b-4281-b951-d872f2087c98
* If we're in the middle of a drag, don't allow the user to middletony@chromium.org2009-10-201-1/+14
| | | | | | | | | | | | click to close or right click for the context menu. BUG=21627 TEST=On a tab, left mouse down, right mouse click, then drag. Left mouse up should release the tab. Review URL: http://codereview.chromium.org/305004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29542 0039d316-1c4b-4281-b951-d872f2087c98
* Wires up bookmark all tabs on linux.sky@chromium.org2009-10-131-3/+6
| | | | | | | | | | | | BUG=2935 TEST=Create two tabs, press control-shift-d. You should be presented with a dialog that lets you give a name to a folder. Change the name, press enter and make sure you get a bookmark folder populated with the urls of any open tabs. Review URL: http://codereview.chromium.org/268038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28788 0039d316-1c4b-4281-b951-d872f2087c98
* Move classes depending on Skia out of base/gfx and into app/gfx. Renamebrettw@chromium.org2009-10-072-2/+2
| | | | | | | | | | 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
* Fix the tab move animation when the custom frame is on. Previously,tony@chromium.org2009-10-071-2/+2
| | | | | | | | | | | | | | | | we were using the tab's y position which takes into account the custom frame padding. However, TabBounds is relative to the tabstrip origin so the we kept incrementing the y position by 15px at each step of the animation. Use the original tab bound y instead (matches code in the pin tab animation). TEST=open some tabs and use ctrl+shift+page{up,down} with the custom frame on. Review URL: http://codereview.chromium.org/269010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28298 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Restore the window that is hidden when the last tab is dragged out of ↵jhawkins@chromium.org2009-10-022-6/+21
| | | | | | | | | | the window. BUG=21002 TEST=Drag the last tab out of a window and press esc. The window should be restored. Review URL: http://codereview.chromium.org/257026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27853 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Add three simple unit tests to the bookmark bar.erg@google.com2009-09-251-8/+4
| | | | | | Review URL: http://codereview.chromium.org/249004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27251 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: First cut at tab dragging automation.estade@chromium.org2009-09-251-11/+14
| | | | | | | | | | | | | Also make tab dragging slightly more robust. I tried really hard to avoid hackiness, but after many hours of wrestling with gtk and X, this is the best I could do. The main point of contention is that GTK (and our tab dragging code in particular) seems to be able to get X into a state where gdk_display_warp_pointer() doesn't send back any events (although it does move the X pointer). I tried to fix our code directly, but decided it was GTK that was broken. So I faked some mouse motion events to prod the tab dragging into working. This approach does not appear to be flaky, and is actually closer to the event stream that occurs when a user drags a tab than the obvious approach would be. (The tests themselves are somewhat flaky, but only due to WaitForURLDisplayedForTab() flakiness, which is a separate issue I'll look at later. The tests aren't on any buildbot for now so I'd like to leave them enabled.) BUG=22182 TEST=--gtest_filter=AutomatedUITest.Drag* Review URL: http://codereview.chromium.org/218017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27166 0039d316-1c4b-4281-b951-d872f2087c98
* Move functions from skia/ext to app/gfx where possible: most of skia_utils.* ↵pkasting@chromium.org2009-09-241-3/+3
| | | | | | | | | | | | | 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
* Add more view ids and gtk widget names to so gtkparasite istony@chromium.org2009-09-231-0/+1
| | | | | | | | easier to navigate. Review URL: http://codereview.chromium.org/221001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26992 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 26975.pkasting@chromium.org2009-09-231-3/+3
| | | | | | 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-231-3/+3
| | | | | | | | | | | | 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
* Linux: create dropped tab windows at the restore size of the source window ↵mdm@chromium.org2009-09-233-11/+12
| | | | | | | | | | | instead of its current size (different when the source is maximized) BUG=22154 TEST=open a window with two tabs, maximize it, then drag one tab out - it should be the original size of the original window Review URL: http://codereview.chromium.org/216053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26972 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Get rid of default drag icon for tab drags.estade@chromium.org2009-09-172-9/+18
| | | | | | | | | | | I guess this regressed at some point. BUG=none TEST=none Review URL: http://codereview.chromium.org/209002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26491 0039d316-1c4b-4281-b951-d872f2087c98
* Changes the width of pinned tabs to 56, except on chrome os where itsky@chromium.org2009-09-141-7/+7
| | | | | | | | | | | remains at 64. BUG=none TEST=none Review URL: http://codereview.chromium.org/203055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26156 0039d316-1c4b-4281-b951-d872f2087c98
* Remove code doing a no-op due to float -> int rounding.phajdan.jr@chromium.org2009-09-142-8/+15
| | | | | | | | | | | | | | | | Make implicit float -> int/long conversions explicit. (Implicit float -> int conversions can be found by compiling with -Wconversion in gcc [versions 4.1.1 and 4.2.4, and surely many others].) Landing the patch for Jacob Mandelson, original review: http://codereview.chromium.org/201091 BUG=none TEST=app_unittests & base_unittests Review URL: http://codereview.chromium.org/200122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26119 0039d316-1c4b-4281-b951-d872f2087c98
* Adds pinned tabs to windows. As the code between windows and gtk issky@chromium.org2009-09-111-1/+0
| | | | | | | | | | | | quite similar, this wasn't that much work. BUG=none TEST=make sure tabs behave correctly on windows, as well as testing pinning/unpinning. Review URL: http://codereview.chromium.org/193051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25973 0039d316-1c4b-4281-b951-d872f2087c98
* Update the system favicon/folder icon on theme change.estade@chromium.org2009-09-111-1/+1
| | | | | | | | | BUG=21531 TEST=use gtk theme, look at icons in task manager, bookmark bar, tab strip, change gtk theme with gnome-appearance-properties,note that the default favicons and folder icons have changed Review URL: http://codereview.chromium.org/202055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25962 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: fix tabstrip index misalignment during tab removal.estade@chromium.org2009-09-092-2/+22
| | | | | | | | | | | | | | | | | | Repro steps: - open a gmail tab and get someone to message you such that the tab title keeps changing - put that tab to the right of a bunch of other tabs - close a bunch of the tabs to the left of gmail Each time you close a tab you have about a 10% chance of reproing. The solution is essentially copy-pasted from the windows tabstrip. The Browser change is somewhat unrelated. I noticed the comment "Do not dereference |contents|" and that we were in fact dereferncing |contents|, so I worked around it. BUG=13811 Review URL: http://codereview.chromium.org/199054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25766 0039d316-1c4b-4281-b951-d872f2087c98
* Don't paint the throbber animation while dragging.tony@chromium.org2009-09-021-1/+2
| | | | | | | | | | | | | Windows doesn't paint the throbber either, so we match. We can probably add it back in if we want, but it might not be worth the effort. BUG=20750 Review URL: http://codereview.chromium.org/183039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25128 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Don't complete the tab drag if the user canceled the drag operation.jhawkins@chromium.org2009-09-022-31/+28
| | | | | | | | BUG=20155 TEST=Start dragging a tab and press esc. The tab should go back to the source tabstrip. Review URL: http://codereview.chromium.org/173653 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25126 0039d316-1c4b-4281-b951-d872f2087c98
* Minor tweaks to how pin tabs look:sky@chromium.org2009-09-013-3/+31
| | | | | | | | | | | | | . Increases the width by 8 pixels. . Animates the position of the favicon when the tab changes from pinned to unpinned. Without this the favicon jumps noticably. BUG=none TEST=none Review URL: http://codereview.chromium.org/183040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25118 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the position of the throbber for pinned tabs. It was wrong before,tony@chromium.org2009-09-011-13/+5
| | | | | | | | | | | | but we repainted the whole pinned tab so it wasn't as obvious. With this change, the throbber is placed where the favicon will go. BUG=20626 Review URL: http://codereview.chromium.org/175038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25005 0039d316-1c4b-4281-b951-d872f2087c98
* Paint the hover animation state when painting just the favicon.tony@chromium.org2009-08-311-0/+20
| | | | | | | | | BUG=20658 Review URL: http://codereview.chromium.org/173630 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24960 0039d316-1c4b-4281-b951-d872f2087c98
* Makes 'Pin tab' option in context menu a checkbox.sky@chromium.org2009-08-311-1/+1
| | | | | | | | | | BUG=20575 TEST=On linux pin a tab. Right click on the tab and make sure you see a check next to 'Pin Tab'. Review URL: http://codereview.chromium.org/175028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24905 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Use a GtkInvisible to track the tab dragging operation. Originally we ↵jhawkins@chromium.org2009-08-313-81/+114
| | | | | | | | | | were using the actual tab widget for this purpose, but this is unreliable becauase we hide and detach the tab widget, which disturbs the drag operation. BUG=19725,20513 TEST=Extensive tab dragging. Review URL: http://codereview.chromium.org/176034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24903 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: Schedule a paint operation for the previously selected tab when ↵jhawkins@chromium.org2009-08-301-0/+4
| | | | | | | | | | selecting a new tab. BUG=20583 TEST=Open a browser with two tabs. Select the unselected tab. The now-unselected tab should be rendered as unselected. Review URL: http://codereview.chromium.org/182025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24863 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Initialize |background_offset_x_|. When rendering a dragged tab, we ↵jhawkins@chromium.org2009-08-301-0/+1
| | | | | | | | | | weren't hitting the codepath that initializes this variable, leading to a UMR that caused glitchy rendering. BUG=20157 TEST=Drag a tab. The rendering should not be glitchy. Review URL: http://codereview.chromium.org/176035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24862 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Fix a ton of compiler warnings."tony@chromium.org2009-08-283-14/+6
| | | | | | | | | | | This reverts commit r24792. TBR=estade Review URL: http://codereview.chromium.org/179028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24796 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a ton of compiler warnings.estade@chromium.org2009-08-283-6/+14
| | | | | | | | | | | | | | | Most of these are classes with virtual methods lacking virtual destructors or NULL used in non-pointer context. BUG=none TEST=app_unittests && base_unittests --gtest_filter=-ConditionVariableTest.LargeFastTaskTest patch by Jacob Mandelson <jlmjlm [at] gmail> http://codereview.chromium.org/171028/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24792 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Clip the tab title to the content height and not the font height. The ↵jhawkins@chromium.org2009-08-281-2/+1
| | | | | | | | | | font height is a design measure and should not be used for a bounding box. BUG=20401 TEST=Open google.com in a tab. Tab title should be fully visible and not clipped. Review URL: http://codereview.chromium.org/179022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24765 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Remove unnecessary gtk_widget_queue_draws from the tabstrip code.jhawkins@chromium.org2009-08-281-6/+1
| | | | | | | | BUG=15872 TEST=none Review URL: http://codereview.chromium.org/182007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24744 0039d316-1c4b-4281-b951-d872f2087c98
* Add a fast path for tab strip expose.tony@chromium.org2009-08-274-2/+116
| | | | | | | | | | | | | | | | | This optimizes the common case of just needing to update favicons. If the expose area consists of just favicons, only paint the favicons (i.e., don't bother with the complex tab edges that overlap). This doesn't help when tabs are resizing or moving, but does reduce CPU usage quite a bit. BUG=15872 Review URL: http://codereview.chromium.org/179003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24675 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Subtract the tabstrip x offset from the last tab x offset when ↵jhawkins@chromium.org2009-08-271-1/+1
| | | | | | | | | | calculating the available tab width. The tabstrip and its tabs are not necessarily based at (0,0). BUG=20329 TEST=Open many tabs until they resize smaller. Repeatedly close the left-most tab with the close button. The tabs should not resize at all until the mouse leaves the tabstrip. Review URL: http://codereview.chromium.org/173559 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24630 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Fix the bounds of the clip region for tab title text.jhawkins@chromium.org2009-08-261-4/+4
| | | | | | | | 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
* Make the tab strip expose events more targeted on linux.tony@chromium.org2009-08-263-13/+29
| | | | | | | | | | | | Rather than queueing the whole tab strip, only queue the area that changed when updating the throbber. This doesn't do much now since the tab strip expose always repaints everything, but this sets us up to optimize the expose handler. Review URL: http://codereview.chromium.org/173391 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24518 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Clip the cairo context to the extents provided to the DrawStringInt ↵jhawkins@chromium.org2009-08-242-4/+6
| | | | | | | | | | 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
* gtk: Update the tooltip state whenever the tab is resized.jhawkins@chromium.org2009-08-203-14/+41
| | | | | | | | BUG=19754 TEST=Open a new window and browse to google.com. Hover the mouse over the tab and notice that the tooltip does not display. Open enough new tabs so that the google.com tab title is ellipsized. Hover the mouse over the tab and notice that the tooltip displays. Review URL: http://codereview.chromium.org/174188 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23899 0039d316-1c4b-4281-b951-d872f2087c98
* Cache the left and right tab curve images. We were spending a lottony@chromium.org2009-08-192-33/+73
| | | | | | | | | | | | | | | | of time regenerating the images for all the tabs. This speeds up the time needed to paint a tab by about 30%. This helps a bit, but we're still slow. We need to calculate damage rects and only redraw damage rects (most of the remaining time is spent on painting to the canvas now). BUG=15872 Review URL: http://codereview.chromium.org/174095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23771 0039d316-1c4b-4281-b951-d872f2087c98
* Moves GtkDndUtil into app.sky@chromium.org2009-08-182-2/+2
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/165423 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23627 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Add view ids to our widgets. These will be used for testing.estade@chromium.org2009-08-132-1/+28
| | | | | | | | | | Also add unit test to test test infrastructure. BUG=19214 Review URL: http://codereview.chromium.org/164519 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23392 0039d316-1c4b-4281-b951-d872f2087c98
* Add a first attempt at a compact location bar and a status bar. The status barbrettw@chromium.org2009-08-112-90/+0
| | | | | | | | contains a clock, an application menu, and a non-working battery indicator. The compact location bar can be toggled by COMPACT_NAV_BAR in browser_window_gtk.cc Review URL: http://codereview.chromium.org/165272 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23070 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Load PRIMARY selection on middle-click on new tab button.derat@chromium.org2009-08-111-1/+60
| | | | | | | | | BUG=18938,11612,11614 TESTED=highlighted text and checked that middle-click loads it if it's a URL but does nothing if it isn't Review URL: http://codereview.chromium.org/164282 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23025 0039d316-1c4b-4281-b951-d872f2087c98
* Use system default favicon in tab strip when using GTK theme.estade@chromium.org2009-08-102-13/+32
| | | | | | Review URL: http://codereview.chromium.org/164266 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22947 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Change the way to calculate the position of the tab title text.estade@chromium.org2009-08-061-4/+8
| | | | | | | | | | On my machine this doesn't actually change the position, but at least it gets rid of the magic -1. BUG=18555 Review URL: http://codereview.chromium.org/165024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22696 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up copy pasta hotkeys in gtk bookmark manager.estade@chromium.org2009-08-061-1/+1
| | | | | | | | | | | Also change the display hotkey for tab reload from f5 (windowsy) to ctrl+r (linuxy). BUG=none TEST=use the new hotkeys Review URL: http://codereview.chromium.org/164097 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22685 0039d316-1c4b-4281-b951-d872f2087c98