Closed
Bug 1088559
Opened 10 years ago
Closed 10 years ago
[Text Selection] Selection carets are missing after scrolling inside iframe.
Categories
(Core :: DOM: Selection, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: mtseng, Assigned: mtseng)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
Details | Diff | Splinter Review |
STR
1. Open UITest app, switch to CopyPaste tab.
2. Long tap to select a word.
3. Scroll the page
Expected result:
Selection carets should remain on screen.
Actual result:
Selection carets are missing.
Assignee | ||
Comment 1•10 years ago
|
||
NotifyAsyncPanZoomStarted/Stopped only dispatch to top level nsDocShell. So if selection carets are inside iframe then those carets never receive NotifyAsyncPanZoomStarted/Stopped event and carets position never get updated.
This patch dispatch this event to nsDocShell's child as well.
Attachment #8510911 -
Flags: review?(roc)
Comment 2•10 years ago
|
||
After applying this patch, SelectionCarets shows correctly after scrolling in the UITest app.
Comment on attachment 8510911 [details] [diff] [review]
also-dispatch-to-docshell-child
Review of attachment 8510911 [details] [diff] [review]:
-----------------------------------------------------------------
::: docshell/base/nsDocShell.cpp
@@ +3120,5 @@
> + uint32_t n = mChildList.Length();
> + kids.SetCapacity(n);
> + for (uint32_t i = 0; i < n; i++) {
> + kids.AppendElement(do_QueryInterface(ChildAt(i)));
> + }
Why are we using this temporary array?
Attachment #8510911 -
Flags: review?(roc) → review-
Assignee | ||
Comment 4•10 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #3)
> Comment on attachment 8510911 [details] [diff] [review]
> also-dispatch-to-docshell-child
>
> Review of attachment 8510911 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: docshell/base/nsDocShell.cpp
> @@ +3120,5 @@
> > + uint32_t n = mChildList.Length();
> > + kids.SetCapacity(n);
> > + for (uint32_t i = 0; i < n; i++) {
> > + kids.AppendElement(do_QueryInterface(ChildAt(i)));
> > + }
>
> Why are we using this temporary array?
I just followed nsDocShell::FirePageHideNotification. Maybe we don't need this temporary array here. I'll attach new patch later.
Assignee | ||
Comment 5•10 years ago
|
||
Remove temporary array.
Attachment #8510911 -
Attachment is obsolete: true
Attachment #8512441 -
Flags: review?(roc)
Updated•10 years ago
|
Priority: -- → P2
(In reply to Morris Tseng [:mtseng] from comment #4)
> I just followed nsDocShell::FirePageHideNotification. Maybe we don't need
> this temporary array here. I'll attach new patch later.
FirePageHideNotification needs a temporary array because it runs arbitrary JS which can alter the docshell tree. I don't think your notifications have that problem.
Attachment #8512441 -
Flags: review?(roc) → review+
Assignee | ||
Comment 7•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 8•10 years ago
|
||
Hi Morris, this patch failed to apply:
Hunk #1 FAILED at 883
1 out of 1 hunks FAILED -- saving rejects to file layout/base/SelectionCarets.cpp.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
errors during apply, please fix and refresh also-dispatch-to-docshell-child
could you take a look? Thanks!
Flags: needinfo?(mtseng)
Assignee | ||
Comment 9•10 years ago
|
||
Rebased. This patch should be applied.
Attachment #8512441 -
Attachment is obsolete: true
Flags: needinfo?(mtseng)
Comment 10•10 years ago
|
||
Keywords: checkin-needed
Comment 11•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in
before you can comment on or make changes to this bug.
Description
•