Closed
Bug 449955
Opened 17 years ago
Closed 17 years ago
Remove #ifdef of nsCaret.cpp for IME
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: masayuki, Assigned: masayuki)
Details
(Keywords: inputmethod)
Attachments
(1 file)
9.56 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
> 894 void nsCaret::GetViewForRendering(nsIFrame *caretFrame,
> 895 EViewCoordinates coordType,
> 896 nsPoint &viewOffset,
> 897 nsIView **outRenderingView,
> 898 nsIView **outRelativeView)
> 899 {
> 900 if (!caretFrame || !outRenderingView)
> 901 return;
> 902
> 903 // XXX by Masayuki Nakano:
> 904 // This code is not good. This is adhoc approach.
> 905 // Our best approach is to use the event fired widget related view.
> 906 // But if we do so, we need large change for editor and this.
> 907 if (coordType == eIMECoordinates) {
> 908 #if defined(XP_MACOSX) || defined(XP_WIN)
> 909 // #59405 and #313918, on Mac and Windows, the coordinate for IME need to be
> 910 // root view related.
> 911 coordType = eTopLevelWindowCoordinates;
> 912 #else
> 913 // #59405, on unix, the coordinate for IME need to be view
> 914 // (nearest native window) related.
> 915 coordType = eRenderingViewCoordinates;
> 916 #endif
IME composing events return the caret position to the widgets. But the origin of the coordinates is different by this code.
Now, Win32 and Mac use the top level window coordinates, however, Mac widgets don't use the caret position of the composing events. Therefore, if we can change the origin on Win32, we can remove this ugly code.
Fortunately, now we have reference widget in the reply of the composing events (bug 447945). Therefore, we can fix.
Attachment #333094 -
Flags: superreview?(roc)
Attachment #333094 -
Flags: review?(roc)
Comment on attachment 333094 [details] [diff] [review]
Patch v1.0
+ * Converting the caret rect of a composition event result to another widget
+ * original rect.
"Convert the caret rect of a composition event to another widget's coordinate system."
Otherwise looks great!
Attachment #333094 -
Flags: superreview?(roc)
Attachment #333094 -
Flags: superreview+
Attachment #333094 -
Flags: review?(roc)
Attachment #333094 -
Flags: review+
Assignee | ||
Comment 2•17 years ago
|
||
pushed to trunk.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•15 years ago
|
Keywords: inputmethod
You need to log in
before you can comment on or make changes to this bug.
Description
•