summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_widget.cc
Commit message (Collapse)AuthorAgeFilesLines
* FBTF: Remove all the easy headers from *_messages.h.erg@google.com2010-08-121-0/+2
| | | | | | | | | BUG=51411 TEST=compiles Review URL: http://codereview.chromium.org/3174002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55902 0039d316-1c4b-4281-b951-d872f2087c98
* Making window.focus() work in Chrome.jcivelli@chromium.org2010-08-111-7/+1
| | | | | | | | | | | | | | | | A patch on the WebKit side https://bugs.webkit.org/show_bug.cgi?id=43542 ensures we get the correct notification when window.focus()/blur() is called. This CL makes the browser active/unactive in response to the focus/blur message. BUG=29643 TEST=Visit gmail. Open an IM conversation window and pop-it out. Focus the browser (so the IM window is in the back). Click on the person name in the IM section of gmail. The conversation window should be brought back to the front. Repeat but this time minimize the conversation window. Review URL: http://codereview.chromium.org/3060045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55678 0039d316-1c4b-4281-b951-d872f2087c98
* Let PaintAtAck send an int tag instead of the TransportDIB handle.thakis@chromium.org2010-07-191-4/+3
| | | | | | | | | | | TransportDIB handles are file descriptors on mac, which are duped when sent over IPC. Hence, they change their value, and the handle that comes back over IPC is not the same that was originally sent -- so they can't be used as map keys. BUG=none TEST=none Review URL: http://codereview.chromium.org/3037006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52925 0039d316-1c4b-4281-b951-d872f2087c98
* Revert some changes I accidentally checked in in revision 50597. This was anbrettw@chromium.org2010-07-011-7/+1
| | | | | | | | | | | experiment to see how much time was spent doing background painting. This resulted in incorrect opacity for Pepper plugins repainting themselves. TEST=none BUG=none Review URL: http://codereview.chromium.org/2830034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51420 0039d316-1c4b-4281-b951-d872f2087c98
* Improve input method support.suzhe@chromium.org2010-06-231-100/+58
| | | | | | | | | | | | | | | This CL fixes following issues: BUG=23219 IME should be disabled in password box. BUG=41876 Chinese IME is still active when current focus is not a text input control BUG=44529 Clause segmentation information of composition text is not honored when using CJK input methods. BUG=46326 Clicking during a composition cancels it TEST=See individual bug report. This CL is blocked on webkit bug: https://bugs.webkit.org/show_bug.cgi?id=40608 Review URL: http://codereview.chromium.org/2824015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50622 0039d316-1c4b-4281-b951-d872f2087c98
* Replace wstring with string16 in history. The only time wstring is used now ↵brettw@chromium.org2010-06-231-1/+7
| | | | | | | | | | | | in history is for bookmark-related stuff (the bookmarks system is still wstring-based). The substantial change here is in RTL to make a string16 variant of the functions and in changing the WordIterator to use string16 (this cleaned up some weird utf-32 code). TEST=none BUG=none Review URL: http://codereview.chromium.org/2808017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50597 0039d316-1c4b-4281-b951-d872f2087c98
* Cleaning up the node focus notification.jcivelli@google.com2010-06-011-6/+0
| | | | | | | | | | | | | The notification that the focus changed in the page now uses webkit::WebViewClient::focusedNodeChanged() implemented by RenderView. It was previously relying on the more general webkit::WebWidgetClient::didFocus() implemented in RenderWidget. (that should ideally only be fired when the frame gets focused, not everytime the focus in the frame changes). BUG=None TEST=Interactive UI tests should still pass (especially BrowserFocus*) Review URL: http://codereview.chromium.org/2301001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48638 0039d316-1c4b-4281-b951-d872f2087c98
* This tunes up some of the snapshot creation code.gspencer@chromium.org2010-05-281-15/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Includes: - Makes it so that the PaintAtSize message does what it should do: render the page at the size given and then scale (in the render process) the result to the desired size. - Changed some of the timeouts for updating snapshots to help with performance - Reduced the number of cases where we refresh snapshots in response to tabs changing. - Removed the need to force updates whenever we switch to overview mode, which makes it faster, and avoids the "shuffling" effect. - Started listening to TAB_CONTENTS_CONNECTED in order to detect new browsers, instead of BROWSER_WINDOW_READY, because there were still times when the tab contents didn't have any dimensions by the time BROWSER_WINDOW_READY was sent. This helps fix the bug referenced below. - Stopped updating snapshots in active mode. Now we just invalidate the snapshots and render them when we enter overview mode. - Added a parameter to indicate whether we prefer using the backing store or not when asking for snapshots from the thumbnail generator. - Added tracking of a timestamp for events from the window manager so we can avoid racing. TEST=ran in chromeos under WM and verified snapshot contents BUG=chromium-os:3142, 3136 Review URL: http://codereview.chromium.org/2098006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48544 0039d316-1c4b-4281-b951-d872f2087c98
* Enabled mousewheel coalescing to work better for ChromeOS.davemoore@chromium.org2010-05-281-1/+8
| | | | | | | | | | | | | This was important because the browser process couldn't keep up with the input stream, resulting in poor 2 finger scroll behavior. It's now tuned to the settings in cros. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/2239001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48541 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up calls like "gfx::Rect(0, 0, size().width(), size().height()".erg@chromium.org2010-05-261-4/+4
| | | | | | | | | | | | The caller can use the much shorter "gfx::Rect(size())", since gfx::Rect has a constructor that just takes a Size. BUG=none TEST=none Review URL: http://codereview.chromium.org/2204001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48283 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a regression where we send too many IME_CANCEL_COMPOSITIONtony@chromium.org2010-05-261-3/+5
| | | | | | | | | | | | | | events back to the browser. This isn't a problem on OSX because we clear the compositon before sending WebCompositionCommandDiscard (hbono even asked about this during the OSX review). BUG=45003 Review URL: http://codereview.chromium.org/2247003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48251 0039d316-1c4b-4281-b951-d872f2087c98
* Stop the browser from scrolling the View contents when gpu accelerated ↵vangelis@chromium.org2010-05-141-2/+9
| | | | | | | | | | compositing is enabled. BUG=44044 Review URL: http://codereview.chromium.org/2053008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47224 0039d316-1c4b-4281-b951-d872f2087c98
* Do right-alignment of popups when WebKit indicates to do so.avi@chromium.org2010-05-131-0/+1
| | | | | | | | | BUG=http://crbug.com/23106 TEST=as in bug Review URL: http://codereview.chromium.org/1992006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47204 0039d316-1c4b-4281-b951-d872f2087c98
* Adding a new IPC message to notify the browser process when a render widget ↵vangelis@chromium.org2010-05-071-1/+17
| | | | | | | | | | | | | is using the gpu process for painting its contents so that the browser will stop rendering from its own backing surface. This will currently only trigger if a page uses the accelerated compositing path. This patch can only land _after_ https://bugs.webkit.org/show_bug.cgi?id=38220 BUG=42677 TEST=NONE Review URL: http://codereview.chromium.org/1696014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46697 0039d316-1c4b-4281-b951-d872f2087c98
* Fix various uses of release() that did not check its valueestade@chromium.org2010-05-041-4/+2
| | | | | | | | | BUG=42904 TEST=compile, unit tests Review URL: http://codereview.chromium.org/1730024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46376 0039d316-1c4b-4281-b951-d872f2087c98
* This adds in the ability for Chrome to generate windows with snapshotsgspencer@chromium.org2010-04-281-4/+70
| | | | | | | | | | | | of all currently open tabs in all browsers. This is needed for overview mode on ChromeOS. BUG=http://code.google.com/p/chromium-os/issues/detail?id=1170 TEST=Ran Chrome under ChromeOS with updated window manager. Review URL: http://codereview.chromium.org/661237 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45824 0039d316-1c4b-4281-b951-d872f2087c98
* Add an IME_CANCEL_COMPOSITION event. This is fired iftony@chromium.org2010-04-151-3/+7
| | | | | | | | | | webkit can't handle the composition for some reason. For example, if the text field is disabled, we send this message back to the browser process. Review URL: http://codereview.chromium.org/1539037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44621 0039d316-1c4b-4281-b951-d872f2087c98
* Adding the new WebPopupType to the RenderWidget creation.jcivelli@google.com2010-04-071-5/+6
| | | | | | | | | BUG=None TEST=Tests that all popups (select popup, autofill, browser actions, bookmark bubble...) work as expected and get the focus correctly. Review URL: http://codereview.chromium.org/1523013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43845 0039d316-1c4b-4281-b951-d872f2087c98
* Calling OpenGL from the renderer processapatrick@chromium.org2010-03-251-46/+0
| | | | | | | | | | | | | | - Added ability for renderer processes to render to a real window (Windows only so far). - Added ability to create offscreen frame buffer objects that can be resized later. - OpenGL context can have a "parent" context that can access its last swapped back buffer through a texture ID. - Moved code to establish GPU channel from RenderWidget to RenderThread. - Changed way service size command buffer object lifetimes are managed. TEST=trybot and visual verification that OpenGL can clear the browser window to magenta. BUG=none Review URL: http://codereview.chromium.org/1136006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42679 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed bugs in GPU process startup on POSIX platforms. Addedkbr@google.com2010-03-231-0/+7
| | | | | | | | | | | | --gpu-startup-dialog command line option to allow debugging of GPU process. BUG=none TEST=none (tested manually in development workspace) Review URL: http://codereview.chromium.org/1095005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42375 0039d316-1c4b-4281-b951-d872f2087c98
* Remove dependency from webkit on chrome/common by moving files to src/app.pinkerton@chromium.org2010-03-191-1/+1
| | | | | | | | BUG=37985 TEST=no functional change. Review URL: http://codereview.chromium.org/1060001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42101 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Match popup contents to page zoom size.thakis@chromium.org2010-03-171-0/+1
| | | | | | | | | | | | | | | | | | Fix the size of the font used in popups presented by the browser UI thread. WebKit was modified to add a field containing the font size, the font size is then propagated in the message sent to the browser, and the web menu runner sets that font size on the popup button resonsible for running the popup menu. Requires WebKit release >= 55897. See WebKit bug https://bugs.webkit.org/show_bug.cgi?id=35990 BUG=14010 TEST=none Review URL: http://codereview.chromium.org/996001 Patch from scottbyer@chromium.org. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41845 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/gfx contents to gfx/ben@chromium.org2010-03-141-2/+2
| | | | | | | | | TBR=darin BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41559 0039d316-1c4b-4281-b951-d872f2087c98
* Make the pepper 2D flush callback actually function as advertised. It will nowbrettw@chromium.org2010-03-061-3/+7
| | | | | | | | | | | | | | | | | | | | | get called asynchronously when the bits are actually copied to the screen, rather than synchronously from inside the paint function. This makes it useful for plugins to use the callback for rate limiting. This also adds a lot of infrastructure for running tests on pepper devices, and includes a unit test for the new flush behavior. I made the existing RenderProcess object an abstract interface and made the existing MockProcess (renamed to be more clear) implement that. This avoids a static cast that would actually crash during a unit test because some code was hardcoded to expect a RenderProcess object. This fixes base's IDMap iterator which has apparently never been used for an IDMap with ownership semantics. TEST=Unit test included BUG=none Original review URL: http://codereview.chromium.org/661124 Review URL: http://codereview.chromium.org/664001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40813 0039d316-1c4b-4281-b951-d872f2087c98
* Added support for opening a GPU command buffer from a renderer processes ↵apatrick@chromium.org2010-03-051-0/+41
| | | | | | | | | | | | through a GPU channel. Probably only works in windows only so far. TEST=none BUG=none Review URL: http://codereview.chromium.org/657046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40783 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 40490 - Make the pepper 2D flush callback actually function as ↵brettw@chromium.org2010-03-031-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | advertised. It will now get called asynchronously when the bits are actually copied to the screen, rather than synchronously from inside the paint function. This makes it useful for plugins to use the callback for rate limiting. This also adds a lot of infrastructure for running tests on pepper devices, and includes a unit test for the new flush behavior. I made the existing RenderProcess object an abstract interface and made the existing MockProcess (renamed to be more clear) implement that. This avoids a static cast that would actually crash during a unit test because some code was hardcoded to expect a RenderProcess object. This fixes base's IDMap iterator which has apparently never been used for an IDMap with ownership semantics. TEST=Unit test included BUG=none Review URL: http://codereview.chromium.org/661124 TBR=brettw@chromium.org Review URL: http://codereview.chromium.org/660439 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40494 0039d316-1c4b-4281-b951-d872f2087c98
* Make the pepper 2D flush callback actually function as advertised. It will nowbrettw@chromium.org2010-03-031-3/+7
| | | | | | | | | | | | | | | | | | | | | | | get called asynchronously when the bits are actually copied to the screen, rather than synchronously from inside the paint function. This makes it useful for plugins to use the callback for rate limiting. This also adds a lot of infrastructure for running tests on pepper devices, and includes a unit test for the new flush behavior. I made the existing RenderProcess object an abstract interface and made the existing MockProcess (renamed to be more clear) implement that. This avoids a static cast that would actually crash during a unit test because some code was hardcoded to expect a RenderProcess object. This fixes base's IDMap iterator which has apparently never been used for an IDMap with ownership semantics. TEST=Unit test included BUG=none Review URL: http://codereview.chromium.org/661124 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40490 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 39670 which breaks suggestion popupvictorw@chromium.org2010-03-021-29/+3
| | | | | | | | | | | | | | | | | | | | | Do not send extra blur and focus events if popup menu is showing Add flag to RenderWidget to remember the popup menu state and suppress focus / blur events when popup menu is showing. This fixes the issue that extra focus / blur events are fired after select control is clicked. R=darin BUG=23499 TEST=none Review URL: http://codereview.chromium.org/647047 TBR=victorw@chromium.org Review URL: http://codereview.chromium.org/660408 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40445 0039d316-1c4b-4281-b951-d872f2087c98
* Initial work for cross-process video rendering using layers.scherkus@chromium.org2010-02-261-0/+10
| | | | | | | | | | | Introduces VideoLayer, which is similar to BackingStore except handles YUV surfaces and conversion to RGB. BUG=33329 TEST=N/A Review URL: http://codereview.chromium.org/597066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40137 0039d316-1c4b-4281-b951-d872f2087c98
* Do not send extra blur and focus events if popup menu is showingvictorw@chromium.org2010-02-221-3/+29
| | | | | | | | | | | | | | | | Add flag to RenderWidget to remember the popup menu state and suppress focus / blur events when popup menu is showing. This fixes the issue that extra focus / blur events are fired after select control is clicked. R=darin BUG=23499 TEST=none Review URL: http://codereview.chromium.org/647047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39670 0039d316-1c4b-4281-b951-d872f2087c98
* Correct the code that suppresses multiple paint rects to avoid thedarin@chromium.org2009-12-211-6/+6
| | | | | | | | | | | | single-core perf regressions. TBR=chase BUG=none TEST=none Review URL: http://codereview.chromium.org/501151 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35093 0039d316-1c4b-4281-b951-d872f2087c98
* Combine ViewHostMsg_{Paint,Scroll}Rect into one IPC.darin@chromium.org2009-12-211-113/+74
| | | | | | | | | | | | | | | | | | | | | | | | The combined IPC means that scrolling only requires one transport DIB instead of two. Previously, we'd use one in the ScrollRect IPC to pass up the pixels for the exposed region, and then we'd use a second one in the PaintRect IPC to pass up the pixels for the updated scroll bar rendering. Now all paints are done using a single transport DIB. Optimize RenderWidgetHostViewWin::OnPaint to only paint the damaged regions. This means calling GetUpdateRgn and GetRegionData to enumerate the list of damage rects. Then only those rects are copied from the backing store. The same optimization is not done for Linux or Mac yet. R=brettw BUG=29591 TEST=none Originally reviewed at http://codereview.chromium.org/506013 Review URL: http://codereview.chromium.org/509005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35078 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 34951 - Combine ViewHostMsg_{Paint,Scroll}Rect into one IPC.rsesek@chromium.org2009-12-181-74/+113
| | | | | | | | | | | | | | | | | | | | | | | | | The combined IPC means that scrolling only requires one transport DIB instead of two. Previously, we'd use one in the ScrollRect IPC to pass up the pixels for the exposed region, and then we'd use a second one in the PaintRect IPC to pass up the pixels for the updated scroll bar rendering. Now all paints are done using a single transport DIB. Optimize RenderWidgetHostViewWin::OnPaint to only paint the damaged regions. This means calling GetUpdateRgn and GetRegionData to enumerate the list of damage rects. Then only those rects are copied from the backing store. The same optimization is not done for Linux or Mac yet. R=brettw BUG=29591 TEST=none Review URL: http://codereview.chromium.org/506013 TBR=darin@chromium.org Review URL: http://codereview.chromium.org/506075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34953 0039d316-1c4b-4281-b951-d872f2087c98
* Combine ViewHostMsg_{Paint,Scroll}Rect into one IPC.darin@chromium.org2009-12-181-113/+74
| | | | | | | | | | | | | | | | | | | | | | The combined IPC means that scrolling only requires one transport DIB instead of two. Previously, we'd use one in the ScrollRect IPC to pass up the pixels for the exposed region, and then we'd use a second one in the PaintRect IPC to pass up the pixels for the updated scroll bar rendering. Now all paints are done using a single transport DIB. Optimize RenderWidgetHostViewWin::OnPaint to only paint the damaged regions. This means calling GetUpdateRgn and GetRegionData to enumerate the list of damage rects. Then only those rects are copied from the backing store. The same optimization is not done for Linux or Mac yet. R=brettw BUG=29591 TEST=none Review URL: http://codereview.chromium.org/506013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34951 0039d316-1c4b-4281-b951-d872f2087c98
* Disable multiple paint rects due to page cycler regression on single-core-xp.chase@chromium.org2009-12-171-0/+7
| | | | | | | | | | | | This is just a partial revert of r33949. TBR=stuartmorgan BUG=29589 TEST=none Review URL: http://codereview.chromium.org/502042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34793 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 34777 - Disable multiple paint rects due to page cycler regression on ↵stuartmorgan@chromium.org2009-12-171-7/+0
| | | | | | | | | | | | | | | | | singlecorexp. This is just a partial revert of r33949. TBR=chase BUG=29589 TEST=none Review URL: http://codereview.chromium.org/503034 TBR=darin@chromium.org Review URL: http://codereview.chromium.org/500084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34792 0039d316-1c4b-4281-b951-d872f2087c98
* Disable multiple paint rects due to page cycler regression on single-core-xp.darin@chromium.org2009-12-161-0/+7
| | | | | | | | | | | | This is just a partial revert of r33949. TBR=chase BUG=29589 TEST=none Review URL: http://codereview.chromium.org/503034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34777 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor the keyboard events handling code related to ↵suzhe@chromium.org2009-12-101-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | RenderViewHostDelegate::View and TabContentsDelegate interfaces. Significant changes made by this CL: 1. The keyboard event handling code has been moved from TabContentsView implementation classes into BrowserWindow implementation classes. Please refer to this discussion thread: http://groups.google.com/group/chromium-dev/browse_thread/thread/e6e0b5cc105659b7/9953c4308bb0000c This change makes the keyboard event flow comply with the relationship between TabContents/TabContentsView and TabContentsDelegate/BrowserWindow. Besides it, the code is also simplified a lot, for example, the keyboard event handling code in chrome/browser/views/tab_contents/tab_contents_view_{gtk,win}.cc are now merged into one copy and moved into chrome/browser/views/frame/browser_view.cc. 2. A pre-handle phrase has been added into the keyboard event handling flow. A keyboard event will be first sent to the browser for pre-handling before being sent to the renderer. Then if the event was not handled by the renderer, it'll be sent to the browser again for post-handling. 3. The keyboard accelerator handling code of Windows and Linux ports have been optimized to get rid off extra command lookup. 4. The keyboard event message flow between the browser and the renderer is changed back to full async mode, all complex logics introduced by revision 29857 are removed. BUG=24479, 26054, 26131, 28839 TEST=See bug reports. Review URL: http://codereview.chromium.org/400012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34234 0039d316-1c4b-4281-b951-d872f2087c98
* Limit the total number of paint rects.darin@chromium.org2009-12-091-2/+1
| | | | | | | | | | | | | | | | Based on some testing on a single core machine, reducing this number below 10 doesn't seem to help. On some of the page cycler tests (intl2 in particular), I observed some excessive paint rect counts (>50). Those outliers seem to explain the perf regression observed for single core machines. R=brettw BUG=29589 TEST=none Review URL: http://codereview.chromium.org/481002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34189 0039d316-1c4b-4281-b951-d872f2087c98
* Coalesce damage rects that share an edge.darin@chromium.org2009-12-071-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | This fixes the Bloat HTTP page cycler regression, and allows me to remove the hack I checked in to disable multiple-paints due to an observed DHTML page cycler regression. I added a new histogram, RW_IntermediatePaintRectCount, that would have shown the problem clearly had it been there before. I included some cleanup in PaintAggregator: 1- rename "r" to "existing_rect" for clarity 2- check for contained (i.e., redundant) invalidates up front I also changed the opacity of the paint rects used when --show-paint-rects is specified. I find myself dogfooding with this command line option enabled, and I want it to be a little less annoying but still just as useful. R=brettw BUG=29477 TEST=none Review URL: http://codereview.chromium.org/464057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33949 0039d316-1c4b-4281-b951-d872f2087c98
* Return to painting smallest bounding box when not scrolling.darin@chromium.org2009-12-041-1/+8
| | | | | | | | | | | | This is a temporary change to fix the page cycler regressions. TBR=brettw BUG=25905 TEST=none Review URL: http://codereview.chromium.org/460082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33880 0039d316-1c4b-4281-b951-d872f2087c98
* Preserve optimized scrolling in the presence of multiple animating rects.darin@chromium.org2009-12-041-11/+40
| | | | | | | | | | | | | | Change PlatformCanvas so that it only fills with "sea foam green" when bitmap data is not externally supplied. Modifying the interface to make this an option bloated the CL too much. I may do this as a follow-up. Adds a new --show-paint-rects command line flag that will render a border around paint rects to help debug and study WebKit painting issues. R=brettw BUG=25905 TEST=none Review URL: http://codereview.chromium.org/414016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33861 0039d316-1c4b-4281-b951-d872f2087c98
* Refactors RenderWidget to extract a PaintAggregator class.darin@chromium.org2009-11-191-182/+111
| | | | | | | | | | | | | | | | | | | | | | | | After this change, I plan on changing the PaintAggregator algorithm. Some things to note: 1- Previously, it was possible to send overlapping ViewHostMsg_PaintRect and ViewHostMsg_ScrollRect messages. This happened when scrolling a page since the scrollbar would need to be repainted while the contents of the page are being scrolled. With this CL, this overlapping behavior is a bit more explicit. 2- There was a TODO about view_size clipping that I've eliminated. I was able to eliminate it because I realized that it is correct to clip the rects passed by didInvalidateRect and didScrollRect to the size of the RenderWidget. Apparently WebKit can sometimes invalidate regions outside the view. R=brettw BUG=25905 TEST=none Review URL: http://codereview.chromium.org/403005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32496 0039d316-1c4b-4281-b951-d872f2087c98
* Upstreaming WebKit.gypyaar@chromium.org2009-11-121-7/+7
| | | | | | | | | | | | This mega patch contains a few simple but tightly dependent changes: 1. Deletion of webkit/api/WebKit.gyp. The file now lives in webkit.org. 2. Rename of webkit/webkit.gyp to webkit/webkit_glue.gyp. Having two webkit.gyp was a source of developer confusion. 3. Gyp dependencies are updated across chromium to point at the upstream WebKit.gyp and the renamed webkit_glue.gyp. 4. Some 200+ files include paths fixed to point to third_party/WebKit/WebKit/chromium instead of webkit/api. The later will be deleted in a subsequent patch. Review URL: http://codereview.chromium.org/387020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31749 0039d316-1c4b-4281-b951-d872f2087c98
* Turn NULL used as int to 0.phajdan.jr@chromium.org2009-10-131-1/+1
| | | | | | | | | | | | | (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
* This CL makes the browser focus tests faster by replacingjcampan@chromium.org2009-09-181-0/+6
| | | | | | | | | | | | some time-outs with notifications. BUG=22065 TEST=Run the interactive tests, especially BrowserFocusTest*FocusTraversal* These tests should run in few seconds. Review URL: http://codereview.chromium.org/210013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26597 0039d316-1c4b-4281-b951-d872f2087c98
* Supports Gtk keyboard themes.suzhe@chromium.org2009-09-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | This CL fixes issue 11480: Support GTK keyboard themes (emacs keybindings). A new class GtkKeyBindingsHandler has been added, which matches a key event against key bindings defined in current Gtk keyboard theme. A new render message ViewMsg_SetEditCommandsForNextKeyEvent has been added for sending edit commands associated to a key event to renderer. This message shall be sent just before sending the key event. RenderView will handle this event and cache the edit commands until the key event is processed. When processing the key event, EditClientImpl::handleKeyboardEvent() will eventually be called to handle the key event, if it's not handled by DOM and the focus is inside an input box. Then a newly added method WebViewDelegate::ExecuteEditCommandsForCurrentKeyEvent(), which is implemented in RenderView, will be called by EditClientImpl::handleKeyboardEvent() to execute edit commands previously sent from browser by ViewMsg_SetEditCommandsForNextKeyEvent message. If WebViewDelegate::ExecuteEditCommandsForCurrentKeyEvent() returns false, which means the key event doesn't have edit command associated, EditClientImpl will handle the key event with built-in logic, which may trigger a built-in key binding. With this approach, system defined key bindings always have higher priority than built-in key bindings defined in editor_client_impl.cc. Known issue: If a key event matches not only a system defined key binding but also an accesskey of a DOM element, then both corresponding edit commands and accesskey action will be executed. Because accesskey is handled in WebViewImpl::CharEvent(), while edit commands are bound to RawKeyDown or KeyUp events. BUG=11480 "Support GTK keyboard themes (emacs keybindings)" TEST=Switch to Emacs keyboard theme by changing the value of gconf key "/desktop/gnome/interface/gtk_key_theme" to "Emacs", then starts chrome and opens a webpage with a text input box. Input something into the text box, then press any of the Emacs key bindings defined in /usr/share/themes/Emacs/gtk-2.0-key/gtkrc, to see if it works as expected. For example, ctrl-p should move the cursor up one line, and ctrl-k should delete to the end of paragraph. Review URL: http://codereview.chromium.org/165293 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25852 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate remaining WebCore dependencies from webplugin_impl.ccdarin@chromium.org2009-09-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces WebPluginPageDelegate to hold the methods that only existed on WebViewDelegate to allow WebPluginImpl to talk to the RenderView. This enables us to eliminate those methods from WebViewDelegate, which eliminates the last dependency on gfx/ native_widget_types.h in our WebKit interface! WebViewDelegate grows a CreatePlugin method that returns a WebKit::WebPlugin. It loses its CreatePluginDelegate method, which now lives on WebPluginPageDelegate. This change makes RenderView use WeakPtr when it hands itself to each WebPluginDelegateProxy and WebPluginImpl instance. This makes the memory management simpler. This change also moves various WebPlugin* interfaces defined in webkit/glue into the webkit_glue namespace. This was to help reduce confusion with similarly named types in the WebKit namespace. WebKit::WebPluginParams is added to contain the set of parameters used to construct a plugin. WebPluginContainer gets a couple more methods to allow us to avoid WebCore dependencies in WebPluginImpl. R=jam BUG=10036 TEST=none Review URL: http://codereview.chromium.org/181014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25184 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce the size of the paint queue.agl@chromium.org2009-09-011-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Sheriffs: warning, dangerous patch) On Chronos, with the slower CPU, it appears that page scrolling sigificantly lags the mouse cursor sometimes. Some amount of lag will always happen, but it appears that we are queuing old mouse positions. This patch makes it so that we don't ACK a mouse move event if there is a resulting paint pending. Current we get something like this: Renderer: Browser: <------- HandleInputEvent -------- (handles the event and defers the painting) -------- ACK -------------------> (has a mouse move saved up) ... HandleInputEvent --------- (painting starts) ----------- PaintRect -------------> <----... At this point, we buffered a mouse position while painting. If we don't ACK the event until we have finished painting, we can get a more up-to-date event. This will need careful observation of the perf bots to check that nothing bad happens. http://codereview.chromium.org/173285 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25059 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Fix a ton of compiler warnings."tony@chromium.org2009-08-281-1/+1
| | | | | | | | | | | 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