Closed
Bug 315457
Opened 19 years ago
Closed 19 years ago
IME candidate list is positioned to wrong position if the editor is on frame page
Categories
(Core :: Internationalization, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
(4 keywords)
Attachments
(3 files, 3 obsolete files)
12.45 KB,
image/png
|
Details | |
10.47 KB,
image/png
|
Details | |
8.82 KB,
patch
|
timeless
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
This is regression of bug 313918.
On Windows, IME events always returns root view coordinates for caret rect.
But if the editor is on frame page, the IME event processing widget is not equal root view related widget.
Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Updated•19 years ago
|
Priority: -- → P1
Assignee | ||
Comment 1•19 years ago
|
||
Attachment #202154 -
Flags: review?(timeless)
Assignee | ||
Comment 2•19 years ago
|
||
Assignee | ||
Comment 3•19 years ago
|
||
Assignee | ||
Updated•19 years ago
|
Attachment #202161 -
Attachment is patch: false
Attachment #202161 -
Attachment mime type: text/plain → image/png
Assignee | ||
Updated•19 years ago
|
Attachment #202154 -
Flags: review?(timeless) → review-
Assignee | ||
Comment 4•19 years ago
|
||
Sorry. I have a mistake in previous patch.
Attachment #202154 -
Attachment is obsolete: true
Attachment #202188 -
Flags: review?(timeless)
Assignee | ||
Updated•19 years ago
|
Attachment #202188 -
Flags: review?(timeless) → review-
Assignee | ||
Comment 5•19 years ago
|
||
Attachment #202188 -
Attachment is obsolete: true
Attachment #202190 -
Flags: review?(timeless)
Comment on attachment 202190 [details] [diff] [review]
Patch rv1.2
>RCS file: /cvsroot/mozilla/widget/src/windows/nsWindow.cpp,v
>retrieving revision 3.590
>@@ -7239,16 +7243,33 @@ PRBool nsWindow::OnIMEQueryCharPosition(
>+void
>+nsWindow::ResolveIMECaretPos(nsWindow* aClient,
>+ nsRect& aEventResult,
>+ nsRect& aResult)
>+{
>+ // RootView coordinates -> Screen coordinates
>+ nsWindow* topWindow = GetTopLevelWindow();
theoretically in certain very strange cases, i believe this can return null. can you prove to me that this will never happen for ime?
>+ topWindow->WidgetToScreen(aEventResult, aResult);
>+ NS_RELEASE(topWindow);
Attachment #202190 -
Flags: review?(timeless) → review-
Assignee | ||
Comment 7•19 years ago
|
||
Comment on attachment 202190 [details] [diff] [review]
Patch rv1.2
> theoretically in certain very strange cases, i believe this can return null.
> can you prove to me that this will never happen for ime?
I don't think so. GetTopLevelWindow always
returns non-null. See this code.
> 8046 nsWindow* nsWindow::GetTopLevelWindow()
> 8047 {
> 8048 nsWindow* curWindow = this;
> 8049 NS_ADDREF(curWindow);
> 8050
> 8051 while (PR_TRUE)
> 8052 {
> 8053 nsWindow* parentWindow = curWindow->GetParent(PR_TRUE);
> 8054
> 8055 if (parentWindow)
> 8056 {
> 8057 NS_RELEASE(curWindow);
> 8058 curWindow = parentWindow;
> 8059 } else
> 8060 return curWindow;
> 8061 }
> 8062 }
if 'this' doesn't have parent, it returns 'this'.
Attachment #202190 -
Flags: review- → review?(timeless)
Assignee | ||
Comment 8•19 years ago
|
||
Comment on attachment 202190 [details] [diff] [review]
Patch rv1.2
> theoretically in certain very strange cases, i believe this can return null.
> can you prove to me that this will never happen for ime?
I don't think so. GetTopLevelWindow always
returns non-null. See this code.
> 8046 nsWindow* nsWindow::GetTopLevelWindow()
> 8047 {
> 8048 nsWindow* curWindow = this;
> 8049 NS_ADDREF(curWindow);
> 8050
> 8051 while (PR_TRUE)
> 8052 {
> 8053 nsWindow* parentWindow = curWindow->GetParent(PR_TRUE);
> 8054
> 8055 if (parentWindow)
> 8056 {
> 8057 NS_RELEASE(curWindow);
> 8058 curWindow = parentWindow;
> 8059 } else
> 8060 return curWindow;
> 8061 }
> 8062 }
if 'this' doesn't have parent, it returns 'this'.
Assignee | ||
Comment 9•19 years ago
|
||
This is not a scope of this bug but...
> 8055 if (parentWindow)
> 8056 {
> 8057 NS_RELEASE(curWindow);
> 8058 curWindow = parentWindow;
NS_ADDREF(curWindow); // <- Don't we need it?
> 8059 } else
Assignee | ||
Comment 10•19 years ago
|
||
timeless:
Please hurry up to re-review for this patch.
This bug is serious for IME users.
Attachment #202190 -
Flags: review?(timeless) → review+
Assignee | ||
Updated•19 years ago
|
Attachment #202190 -
Flags: superreview?(roc)
Comment 11•19 years ago
|
||
Please integrate this. Thanks. We IME users really need this.
(In reply to comment #9)
> This is not a scope of this bug but...
>
> > 8055 if (parentWindow)
> > 8056 {
> > 8057 NS_RELEASE(curWindow);
> > 8058 curWindow = parentWindow;
> NS_ADDREF(curWindow); // <- Don't we need it?
> > 8059 } else
>
We don't need it because GetParent already addrefed parentWindow.
Comment on attachment 202190 [details] [diff] [review]
Patch rv1.2
+ nsWindow* topWindow = GetTopLevelWindow();
You can write
nsCOMPtr<nsWindow> topWindow = getter_AddRefs(GetTopLevelWindow());
and then you don't have to manually release.
Attachment #202190 -
Flags: superreview?(roc) → superreview+
Assignee | ||
Comment 14•19 years ago
|
||
Attachment #202190 -
Attachment is obsolete: true
Attachment #203492 -
Flags: superreview+
Attachment #203492 -
Flags: review+
Assignee | ||
Comment 15•19 years ago
|
||
checked-in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 16•19 years ago
|
||
(In reply to comment #13)
> (From update of attachment 202190 [details] [diff] [review] [edit])
> + nsWindow* topWindow = GetTopLevelWindow();
>
> You can write
> nsCOMPtr<nsWindow> topWindow = getter_AddRefs(GetTopLevelWindow());
> and then you don't have to manually release.
>
this makes bustage. I change to rv1.2.
Assignee | ||
Updated•19 years ago
|
Attachment #203492 -
Attachment is obsolete: true
Attachment #203492 -
Flags: superreview+
Attachment #203492 -
Flags: review-
Attachment #203492 -
Flags: review+
Assignee | ||
Updated•19 years ago
|
Attachment #202190 -
Attachment is obsolete: false
Assignee | ||
Comment 17•19 years ago
|
||
http://tinderbox.mozilla.org/bonsai/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=mozilla/widget/src/windows&command=DIFF_FRAMESET&file=nsWindow.cpp&rev1=3.596&rev2=3.597&root=/cvsroot
> ../../../dist/include/xpcom\nsCOMPtr.h(635) : error C2594: 'argument' : ambiguous conversions from 'class nsWindow *const ' to 'class nsISupports *'
> ../../../dist/include/xpcom\nsCOMPtr.h(632) : while compiling class-template member function '__thiscall nsCOMPtr<class nsWindow>::nsCOMPtr<class nsWindow>(const struct already_AddRefed<class nsWindow> &)'
> make[6]: *** [nsWindow.obj] Error 2
Comment 18•19 years ago
|
||
(you should be able to use nsRefPtr)
Assignee | ||
Updated•17 years ago
|
Keywords: fixed1.8.1.10
Comment 19•17 years ago
|
||
Masayuki, can you check with the Firefox 2.0.0.10 release candidate at http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2.0.0.10-candidates/rc1/ and verify that this is 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
•