Closed Bug 950564 Opened 11 years ago Closed 11 years ago

Complex text input panel for plugin should be positioned at bottom-left of focused plugin

Categories

(Core :: Widget: Cocoa, enhancement)

x86_64
macOS
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: masayuki, Assigned: masayuki)

Details

(Keywords: inputmethod)

Attachments

(5 files)

Similar to bug 950559, on Mac, composition string of IME is displayed on complex text input panel when plugin has focus. The panel should be positioned at bottom-left of the focused plugin because it's nearer than current fixed position (bottom-most of the screen, screen-width).
Severity: normal → enhancement
Similar to bug 950559, the panel is aligned to window if the plugin is clipped.

I want Kimura-san to agree the behavior. I'll request the code review to Steven after that.
Attachment #8347900 - Flags: review?(VYV03354)
Comment on attachment 8347900 [details] [diff] [review]
ComplexTextInputPanel should be positioned to bottom-left of the focused plugin

I can't really review a patch for Mac, but it would be OK as long as it is consistent with a windowless Flash movie on other platforms.
Attachment #8347900 - Flags: review?(VYV03354) → feedback+
Comment on attachment 8347900 [details] [diff] [review]
ComplexTextInputPanel should be positioned to bottom-left of the focused plugin

Thank you, Kimura-san.

Steven, could you review this? As I mentioned in this patch, I'm not familiar with Retina display and I don't have it. So, this patch hasn't been tested on Retina display. Therefore, I'm not sure if the min-width pref works well.

FYI: I confirmed that this patch doesn't cause bustage on 10.6.
Attachment #8347900 - Flags: review?(smichaud)
Masayuki, I can test your patch on OS X 10.7 through 10.9, using Retina and non-Retina displays.  I should be able to get to this in the next few days.
Comment on attachment 8347900 [details] [diff] [review]
ComplexTextInputPanel should be positioned to bottom-left of the focused plugin

Masayuki, this looks fine to me.

One small nit, though:  Please add a comment above adjustTo: that describes exactly what adjustments you're making -- for example something like "This places the text input panel fully onscreen and below the lower left corner of the focused plugin."

But I still haven't tested it, because I have nothing to test with.  My favorite example of a Flash movie that accepts text input has disappeared from the web (http://www.playercore.com/bugfiles/146162/AddReturnHTML.html from bug 357670 comment #25).  Please post an example of a plugin I can test with (one that accepts text input, and which causes us to display a text input panel when entering text in, say, Kotoeri Hiragana mode).
Attachment #8347900 - Flags: review?(smichaud) → review+
Thank you, Steven.

Kimura-san created a great testcase here:
http://emk.name/test/swftxt.html
> http://emk.name/test/swftxt.html

Thanks!

I used this to test on OS X 10.7 through 10.9, with and without HiDPI mode.  I had no problems at all.
https://hg.mozilla.org/mozilla-central/rev/be7c246b13b7
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
> +                           std::min(viewRect.size.width, minWidth),

Oops... This should be std::max()! I'll post follow up patch next week :-(
Comment on attachment 8350976 [details] [diff] [review]
part.2 Fix complex text input panel width as focused plugin width if it's not too narrow

I'm sorry, this fixes very stupid mistake.
Attachment #8350976 - Flags: review?(smichaud)
Attachment #8350976 - Attachment description: part.2 Fix complex text input panel width as focused plugin widget if it's not too narrow → part.2 Fix complex text input panel width as focused plugin width if it's not too narrow
Comment on attachment 8350976 [details] [diff] [review]
part.2 Fix complex text input panel width as focused plugin width if it's not too narrow

:-)

Sorry I didn't catch this.
Attachment #8350976 - Flags: review?(smichaud) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: