summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webcursor.cc
Commit message (Collapse)AuthorAgeFilesLines
* Roll WebKit DEPS past WebKit move. Update gyp files and include paths to ↵abarth@chromium.org2011-01-171-2/+2
| | | | | | reflect the move. Consolidate how we DEPS in WebKit source files. Cross fingers. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71586 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a regression introduced with the change to marshal custom HCURSOR's set ↵ananta@chromium.org2010-12-101-1/+2
| | | | | | | | | | | | | | | | by windowless plugins. This caused the cursor type to not get set correctly. Fixes bug http://code.google.com/p/chromium/issues/detail?id=66105 BUG=66105 TEST=As described in the bug. TBR=jam Review URL: http://codereview.chromium.org/5775001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68803 0039d316-1c4b-4281-b951-d872f2087c98
* Ensure that custom cursors set by windowless flash plugins get marshaled ↵ananta@chromium.org2010-12-091-19/+20
| | | | | | | | | | | | | | | | | correctly back to the renderer and eventually to the browser. We rely on the HCURSOR getting marshaled across on windows. However this regressed when code to validate the custom cursor info was added in the WebCursor deserialization routines. Fixes bug http://code.google.com/p/chromium/issues/list?cursor=39436 BUG=39436 TEST=Covered by new custom cursor deserialization unit test. Review URL: http://codereview.chromium.org/5686001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68759 0039d316-1c4b-4281-b951-d872f2087c98
* Clamp the hotspot on custom cursors to the custom cursor image's dimensions.estade@chromium.org2010-08-111-0/+13
| | | | | | | | | | | | | | | | | Current behavior: windows chrome - respect the crazy hotspot linux chrome - crash mac chrome - fall back to normal cursor firefox - clamp the hotspot to the custom cursor image bounds. So this unifies the behavior of all 3 chrome platforms and matches firefox. BUG=51709 TEST=see bug for reduction Review URL: http://codereview.chromium.org/3168003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55669 0039d316-1c4b-4281-b951-d872f2087c98
* Upstreaming WebKit.gypyaar@chromium.org2009-11-121-2/+2
| | | | | | | | | | | | 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
* Be defensive against 0-sized custom cursors. This may fix a moderately commoncevans@chromium.org2009-09-281-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | browser crash that triggers ~100 times a day: `anonymous namespace'::PureCall() _invalid_parameter_noinfo std::vector<unsigned char,std::allocator<unsigned char> >::operator[](unsigned int) WebCursor::GetCursor(HINSTANCE__ *) RenderWidgetHostViewWin::UpdateCursorIfOverSelf() RenderWidgetHostViewWin::UpdateCursor(WebCursor const &) I was unable to reproduce myself, so I don't know if the bad cursor came from the web or from the Windows "external cursor" concept. Accordingly: - Do not accept 0-sized cursors from the renderer. - Do not access array[0] on an empty array as per other call sites in the cursor code. Thanks to The Mighty Hoppy for triggering this via means unknown! BUG=NONE TEST=NONE (unable to reproduce) Review URL: http://codereview.chromium.org/251008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27372 0039d316-1c4b-4281-b951-d872f2087c98
* Start using WebCursorInfo from the WebKit API. WebCursorInfo is adarin@google.com2009-07-081-28/+61
| | | | | | | | | | | | | | | | lightweight struct containing a description of a cursor that the embedder should render. WebCursor still exists. Instead of WebCursor initializing from a PlatformCursor, it now initializes from a WebCursorInfo. TEST=none BUG=10039 R=jam Review URL: http://codereview.chromium.org/155172 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20194 0039d316-1c4b-4281-b951-d872f2087c98
* Two fixes:cevans@chromium.org2009-06-261-2/+13
| | | | | | | | | | | | | | | - Apply limit to cursor dimensions. Turns out that the APIs used on Windows and Linux are integer-overflow resistant to width * height issues. Not sure about Mac, though. - Ensure the renderer passed enough data for the dimensions specified, otherwise we read out of bounds. BUG=none TEST=WebCursorTest.CursorSerialization plus http://www.iconutils.com/faq/web-page-cursor.htm and http://www.hypergurl.com/customcursor.html Review URL: http://codereview.chromium.org/147193 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19408 0039d316-1c4b-4281-b951-d872f2087c98
* Fix build bustage. Update enum names.darin@chromium.org2009-01-141-3/+3
| | | | | | | | TBR=dglazkov Review URL: http://codereview.chromium.org/18235 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8028 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for custom cursors set by windowless plugins. Windowless plugins ↵ananta@chromium.org2009-01-091-4/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | typically set the cursor in NPP_HandleEvent for WM_MOUSEMOVE.The current implementation looks for the cursor type and if the typedoes not match predefinedcursor types defaults to the pointer cursor. The fixes are as below:- 1. Marshal the HCURSOR after copying it to ensure that it remains valid. This works as a HCURSOR is a user object and can be used across processes. Ideally we would like to convert it to a skia bitmap but there are issues with converting monochrome cursors. 2. Added support for marshaling platform specific data in the webcursor Serialize/Deserialize functions. This is in the form of functions like InitPlatformData, SerializePlatformData, DeserializePlatformData, etc. which are stubbed out for the other platforms. 3. Mimic webkit windowless plugin behavior where it sets a flag to ignore the next setCursor after HandleEvent of WM_MOUSEMOVE. If we don't do this the cursor keeps changing between a pointerCursor and the cursor set by the plugin which also causes flicker. 4. Fixed the WebCursor::IsEqual function to ensure that it checks all fields for equality. 5. The browser(RenderWidgetHostViewWin) now maintains a WebCursor instance representing the current cursor. Any cursor updates received from the renderer update the current cursor member maintained by the browser. 6. We intercept the SetCursor API for windowless plugins like Flash and Silverlight and remember the cursor being set. We don't invoke the original API as the browser UI thread would do it anyways. This fixes the annoying cursor flicker caused by the windowless flash plugin instance constantly setting the cursor even when the tab is not visible. This fixes bug http://code.google.com/p/chromium/issues/detail?id=3800. Review URL: http://codereview.chromium.org/15088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7798 0039d316-1c4b-4281-b951-d872f2087c98
* Cursor support including custom cursors.avi@google.com2008-11-181-6/+3
| | | | | | Review URL: http://codereview.chromium.org/11427 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5634 0039d316-1c4b-4281-b951-d872f2087c98
* Custom cursor support.evanm@google.com2008-11-141-3/+19
| | | | | | | | | This is necessary for Google Maps, and also cuts out another NOTIMPLEMENTED(). Review URL: http://codereview.chromium.org/10734 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5487 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate CursorChromium's dependency on webkit/glue.darin@chromium.org2008-11-061-147/+58
| | | | | | | | | | | Also modified WidgetChromium to use ChromiumBridge instead of talking to ChromeClientChromium. I want to eliminate that fake interface in favor of just having our code talk directly to ChromeClientImpl, but that means a dependency on webkit/glue, so I needed to use ChromiumBridge. Long-term, I'd like to propose changes upstream to HostWindow and ChromeClient to avoid this usage of ChromiumBridge. The most impactful part of this CL is the change to move the enumeration of cursor types from WebCursor to PlatformCursor. This means that WebCursor consumers no longer have access to the type enumeration. I replaced that with helper functions on WebCursor. I think the result not only achieves the goal of breaking CursorChromium's dependency on webkit/glue but is also much cleaner. R=iyengar,eseidel Review URL: http://codereview.chromium.org/9072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4846 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a bug in cursor handling when the width and height of the image differ. Webrettw@google.com2008-10-281-1/+1
| | | | | | | | | | were using the width of the image, when the width is actually inferred by the Windows API call. Instead, we were supposed to pass the height. BUG=100 Review URL: http://codereview.chromium.org/8646 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4063 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent TestShell from crashing at launch: don't release garbage CGImageRefmark@chromium.org2008-10-241-0/+3
| | | | | | | in the WebCursor copy constructor. Review URL: http://codereview.chromium.org/7967 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3901 0039d316-1c4b-4281-b951-d872f2087c98
* Let cursors be based on CGImage instead of SkBitmap on the Macmark@chromium.org2008-10-231-9/+25
| | | | | | Review URL: http://codereview.chromium.org/8111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3869 0039d316-1c4b-4281-b951-d872f2087c98
* Fix build (Icefox's patch used WebKit ifdefs instead of Chromium ones).erg@google.com2008-10-091-1/+1
| | | | | | | Review URL: http://codereview.chromium.org/7034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3139 0039d316-1c4b-4281-b951-d872f2087c98
* Fix build (Icefox's patch used WebKit ifdefs instead of Chromium ones).erg@google.com2008-10-091-3/+3
| | | | | | | Review URL: http://codereview.chromium.org/7034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3138 0039d316-1c4b-4281-b951-d872f2087c98
* Patch by Thatcher Ulrich <tulrich@google.com>.ojan@google.com2008-10-091-1/+1
| | | | | | | | | | | | | | | Implement "iframe shim" behavior for windowed plugins. In FF and IE on windows, iframes are implemented as native HWNDs. This has the side effect that iframes display on top of windowed plugins. This side effect has long been known as a workaround for allowing HTML elements to appear above plugin content. BUG=1788 Review URL: http://codereview.chromium.org/7032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3137 0039d316-1c4b-4281-b951-d872f2087c98
* Wrap Windows functions with ifdef so they are only compiled on windowserg@google.com2008-10-091-3/+6
| | | | | | | | Review URL: http://codereview.chromium.org/6213 Patch from icefox. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3132 0039d316-1c4b-4281-b951-d872f2087c98
* Merge the chrome_webkit_merge_branch back on to trunk. This brings ustc@google.com2008-10-011-10/+17
| | | | | | | up to webkit@36102. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2778 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Add webkit to the repository.initial.commit2008-07-271-0/+168
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18 0039d316-1c4b-4281-b951-d872f2087c98