Closed
Bug 416551
Opened 16 years ago
Closed 16 years ago
Cannot use IME on rich formatting editor of gmail (design mode)
Categories
(Core :: Internationalization, defect, P1)
Core
Internationalization
Tracking
()
RESOLVED
FIXED
mozilla1.9beta4
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
(Keywords: inputmethod, regression)
Attachments
(1 file, 2 obsolete files)
2.48 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
This is a regression of bug 415026. In such editor, the focused content is always null, so, the new code always disables IME on the document. I think that I need to check whether the doc is editable.
Flags: blocking1.9?
Assignee | ||
Comment 1•16 years ago
|
||
fix.
Attachment #302301 -
Flags: superreview?(roc)
Attachment #302301 -
Flags: review?(roc)
Assignee | ||
Updated•16 years ago
|
Summary: Cannot use IME on rich formatting editor of gmail → Cannot use IME on rich formatting editor of gmail (design mode)
Assignee | ||
Comment 2•16 years ago
|
||
Comment on attachment 302301 [details] [diff] [review] Patch v1.0 Oops, this patch is buggy. If the clicked not is focusable (e.g., <a>), the result depends on the content.
Attachment #302301 -
Flags: superreview?(roc)
Attachment #302301 -
Flags: review?(roc)
Attachment #302301 -
Flags: review-
Assignee | ||
Comment 3•16 years ago
|
||
If the aContent is null (there are no focused contents), nsIMEStateManager checks whether the document is editable. Otherwise it calls nsIContent::GetDesiredIMEState. If the content is not editable, but the document is editable, it returns ENABLE. However, if the content is text editor (input or textarea), the method is overridden by nsGenericHTMLElement, so, the editors in editable document can keep to support ime-mode.
Attachment #302301 -
Attachment is obsolete: true
Attachment #302304 -
Flags: superreview?(roc)
Attachment #302304 -
Flags: review?(roc)
Why do we need to return ENABLE for non-editable content in editable documents?
Assignee | ||
Comment 5•16 years ago
|
||
(In reply to comment #4) > Why do we need to return ENABLE for non-editable content in editable documents? I'm not sure. But in design mode, the editable content doesn't have editable flag :-(
Assignee | ||
Comment 6•16 years ago
|
||
It seems that the document is only editable in the design mode. See nsHTMLDocument::SetDesignMode http://mxr.mozilla.org/mozilla/source/content/html/document/src/nsHTMLDocument.cpp#4094
Peterv, see comment #5 ... is this true? If it is I'd like to know why :-)
Comment 8•16 years ago
|
||
Yes, it is. I've been pondering changing it, the downside is that you have to walk the whole tree to reset the flags when designMode changes. But not sure we care about that performance hit. I'll try to make a patch, I don't think a lot of code relies on the way things are now.
Comment 9•16 years ago
|
||
BTW, using nsINode::IsEditable would allow you to ignore that issue, it already does the checking for you.
Assignee | ||
Comment 10•16 years ago
|
||
Thank you, Peter. This should be better.
Attachment #302304 -
Attachment is obsolete: true
Attachment #302571 -
Flags: superreview?(roc)
Attachment #302571 -
Flags: review?(roc)
Attachment #302304 -
Flags: superreview?(roc)
Attachment #302304 -
Flags: review?(roc)
Assignee | ||
Comment 11•16 years ago
|
||
roc: would you check the new patch? If Peter needs much time for his checking for the performance of the ideal way, we should land the current patch, temporary.
Comment 12•16 years ago
|
||
+'ing w/ P3. Please adjust the priority if needed.
Flags: blocking1.9? → blocking1.9+
Priority: -- → P3
Attachment #302571 -
Flags: superreview?(roc)
Attachment #302571 -
Flags: superreview+
Attachment #302571 -
Flags: review?(roc)
Attachment #302571 -
Flags: review+
Assignee | ||
Comment 14•16 years ago
|
||
checked-in. Sorry for this regression.
Assignee | ||
Comment 15•16 years ago
|
||
-> FIXED # sorry for the spam.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment 16•16 years ago
|
||
Comment on attachment 302571 [details] [diff] [review] Patch v3.0 >Index: content/base/public/nsIContent.h >=================================================================== >+ if (!IsEditableInternal()) Please change this to IsEditable (which is what I told you to use).
Assignee | ||
Comment 17•16 years ago
|
||
(In reply to comment #16) > (From update of attachment 302571 [details] [diff] [review]) > >Index: content/base/public/nsIContent.h > >=================================================================== > > >+ if (!IsEditableInternal()) > > Please change this to IsEditable (which is what I told you to use). Why? The method is protected, not private. # And did you check me email?
Comment 18•16 years ago
|
||
(In reply to comment #17) > Why? The method is protected, not private. Internal/External is just an implementation detail to make internal callers of IsEditable get a fast non-virtual function and have it still be callable by external callers. The API is IsEditable and your code won't be any slower by using it. > # And did you check me email? Yes.
Assignee | ||
Comment 19•16 years ago
|
||
(In reply to comment #18) > (In reply to comment #17) > > Why? The method is protected, not private. > > Internal/External is just an implementation detail to make internal callers of > IsEditable get a fast non-virtual function and have it still be callable by > external callers. The API is IsEditable and your code won't be any slower by > using it. How about they are moved to private method? > > # And did you check me email? > > Yes. Thanks, and please do it.
Assignee | ||
Updated•14 years ago
|
Keywords: inputmethod
You need to log in
before you can comment on or make changes to this bug.
Description
•