Merge lp://staging/~justinmcp/oxide/cursor-support into lp://staging/~oxide-developers/oxide/oxide.trunk

Proposed by Justin McPherson
Status: Merged
Merged at revision: 486
Proposed branch: lp://staging/~justinmcp/oxide/cursor-support
Merge into: lp://staging/~oxide-developers/oxide/oxide.trunk
Diff against target: 238 lines (+152/-0) (has conflicts)
6 files modified
qt/core/browser/oxide_qt_render_widget_host_view.cc (+137/-0)
qt/core/browser/oxide_qt_render_widget_host_view.h (+2/-0)
qt/core/glue/oxide_qt_render_widget_host_view_delegate.h (+2/-0)
qt/quick/oxide_qquick_render_view_item.cc (+4/-0)
qt/quick/oxide_qquick_render_view_item.h (+3/-0)
shared/browser/oxide_render_widget_host_view.h (+4/-0)
Text conflict in shared/browser/oxide_render_widget_host_view.h
To merge this branch: bzr merge lp://staging/~justinmcp/oxide/cursor-support
Reviewer Review Type Date Requested Status
Chris Coulson Needs Information
Review via email: mp+210936@code.staging.launchpad.net

Commit message

Add support for cursor changes.

To post a comment you must log in.
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Thanks for working on this. This is pretty much ok. The only question I have is:

+void RenderWidgetHostView::UpdateCursor(const WebCursor& cursor) {
+ if (GetFormFactorHint() != FORM_FACTOR_DESKTOP) {
+ return; // Cursor only on desktop
+ }
+

Is this check really necessary? Is this done in other parts of the stack that process cursor changes? And do we know whether Chromium calls UpdateCursor() without mouse events?

+ QImage::Format format = QImage::Format_Invalid;
+ switch (cursor_info.custom_image.config()) {
+ case SkBitmap::kRGB_565_Config: format = QImage::Format_RGB16;
+ case SkBitmap::kARGB_4444_Config: format = QImage::Format_ARGB4444_Premultiplied;
+ case SkBitmap::kARGB_8888_Config: format = QImage::Format_ARGB32_Premultiplied;
+ default: ;
+ }

I was going to say that this bit is missing an indent for each of the case statements, but I've just noticed that this rule is already applied quite inconsistently in this file, so it doesn't matter for now :)

review: Needs Information
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Note, I've just updated to Chromium 35.0.1908.4 which changes some things related to this merge :(

- blink::WebCursor is now content::WebCursor
- webkit/common/cursors/webcursor.h is now content/common/cursors/webcursor.h

It looks like those are the only changes

394. By Justin McPherson

Request form factor hint only once.

395. By Justin McPherson

Changes to match chromium.

Movement of WebCursor from blink to common.

Revision history for this message
Justin McPherson (justinmcp) wrote :

Hi. I can't find a definitive answer to your question about UpdateCursor()
and non-desktop platforms. Browsing the code doesn't reveal any special
casing, but maybe I've missed something.

If you're concerned about the overhead; I've made a change to store the
FormFactor in a static variable, it should cause no problems in this
circumstance and avoid overhead on subsequent calls.

I've also made the changes to match changes in upstream.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

I'm not particularly concerned about the overhead - just whether its necessary (neither qtwebengine or qtwebkit seem to do it) or correct (ie, is the form factor a reliable indicator of not having a cursor input)?

I'll test it on my Nexus 4 to see what happens on !desktop

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

I didn't get a chance to try this yet - there's quite a few build failures against the latest Chromium. Whilst WebCursor moved to from webkit to content, blink::WebCursorInfo hasn't changed

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

I've fixed up the build issues and merged this now. Thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches