Closed Bug 636872 Opened 9 years ago Closed 9 years ago

allow CSS style cursor property to be used for plugins

Categories

(Core :: Plug-ins, defect)

All
macOS
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: jaas, Assigned: jaas)

Details

Attachments

(1 file, 2 obsolete files)

No description provided.
Attached file utility code v1.0 (obsolete) —
This code seems to modify the DOM properly from a plugin but the cursor doesn't change.
Attached file modify border sample v1.0 (obsolete) —
This sample code from Google's Chromium project succeeds in modifying the border of the plugin using the technique I want to use to modify the cursor.
Attachment #515214 - Attachment is patch: false
Do you see CSS parse errors in the error console?
I don't see any errors.
Giving a plugin a basic style attribute setting the cursor (style="cursor: crosshair;") doesn't work either. So this is probably not about whether or not it is done from plugins.
Chrome has the same behavior we do - setting the cursor style on a plugin has no impact no matter how you do it.
Oh, you're setting this on the <object> or <embed> that loaded the plug-in?

Then yeah, sounds like something else is messing with the cursor....
nsObjectFrame::GetCursor returns NS_ERROR_NOT_IMPLEMENTED, which causes nsEventStateManager::UpdateCursor to bail out.

Looks like that was done to fix bug 118877.
Assignee: nobody → joshmoz
I've started working on a spec for allowing this to work:

https://wiki.mozilla.org/NPAPI:DOMCursors

I have it working in Gecko and a test plugin. If we don't allow this we're going to be stuck with native API forwarding for cursors.
Summary: changes to CSS style cursor property from a plugin don't work → allow CSS style cursor property to be used for plugins
Attachment #515214 - Attachment is obsolete: true
Attachment #515218 - Attachment is obsolete: true
Attached patch fix v1.0Splinter Review
This fully implements DOM cursor control for plugins according to the current proposal, OOP and IP.
Comment on attachment 522458 [details] [diff] [review]
fix v1.0

The spec is not quite approved but it's close and this patch is ready for review.
Attachment #522458 - Flags: review?(bzbarsky)
Comment on attachment 522458 [details] [diff] [review]
fix v1.0

r=me

This doesn't implement the "let the plugin set the cursor" bit, right?

Do we have a way to test this?
Attachment #522458 - Flags: review?(bzbarsky) → review+
(In reply to comment #12)
> This doesn't implement the "let the plugin set the cursor" bit, right?

Not sure what you mean. This patch is all that is necessary for the plugin to set the cursor via the CSS cursor property via NPRuntime. Plugins can already do that actually, it just doesn't actually cause the cursor to change because the object frame returns NS_ERROR_FAILURE for nsObjectFrame::GetCursor regardless of what the CSS cursor property says. With this patch that call can succeed (via the parent implementation), allowing the CSS-specified cursor to be displayed.
Ah, I see.  OK.
pushed to mozilla-central

http://hg.mozilla.org/mozilla-central/rev/b59f443dd42f
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.