Closed
Bug 854605
Opened 13 years ago
Closed 13 years ago
Use selectAtPoint to start a selection
Categories
(Firefox for Android Graveyard :: Text Selection, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 22
People
(Reporter: Margaret, Assigned: Margaret)
References
Details
Attachments
(3 files)
|
18.70 KB,
patch
|
bnicholson
:
review+
|
Details | Diff | Splinter Review |
|
12.79 KB,
patch
|
bnicholson
:
review+
|
Details | Diff | Splinter Review |
|
7.97 KB,
patch
|
bnicholson
:
review+
|
Details | Diff | Splinter Review |
I'm going to try to work on bug 667243 in smaller bugs. This one just gets rid of the mouse event hack in startSelection.
I started by doing some more refactoring to get this to look more like metro's SelectionHandler, so that we can follow the same logic (and hopefully eventually share some utility functions).
This first patch does some renaming, but it also keeps _targetElement and _contentWindow as separate things, instead of the way we were just setting _target = _view in the selection case, which avoids some confusion.
Attachment #729250 -
Flags: review?(bnicholson)
| Assignee | ||
Comment 1•13 years ago
|
||
Some more renaming to match metro (and make me less confused).
Attachment #729251 -
Flags: review?(bnicholson)
| Assignee | ||
Comment 2•13 years ago
|
||
Here's the real patch. I suppose there was a bit of scope creep to refactor showThumb here, but I just went for it while I was creating _initTargetInfo.
Text selection still works with our mouse event hacks, but this removes the first hack to start the selection!
Modeled after _onSelectionStart and _onCaretAttach:
http://mxr.mozilla.org/mozilla-central/source/browser/metro/base/content/contenthandlers/SelectionHandler.js#108
http://mxr.mozilla.org/mozilla-central/source/browser/metro/base/content/contenthandlers/SelectionHandler.js#260
Attachment #729256 -
Flags: review?(bnicholson)
Updated•13 years ago
|
Attachment #729250 -
Flags: review?(bnicholson) → review+
Comment 3•13 years ago
|
||
Comment on attachment 729251 [details] [diff] [review]
(Part 2) Make private SelectionHanlder functions look private
Review of attachment 729251 [details] [diff] [review]:
-----------------------------------------------------------------
nit: s/SelectionHanlder/SelectionHandler/ in commit message
Attachment #729251 -
Flags: review?(bnicholson) → review+
Comment 4•13 years ago
|
||
Comment on attachment 729256 [details] [diff] [review]
(Part 3) Use selectAtPoint to start a selection
Review of attachment 729256 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me with the event type fixed.
::: mobile/android/chrome/content/SelectionHandler.js
@@ +236,5 @@
> + */
> + attachCaret: function sh_attachCaret(aElement) {
> + this._initTargetInfo(aElement);
> +
> + this._contentWindow.addEventListener("pagehide", this, false);
A "pagehide" listener is already added in _initTargetInfo -- I assume this should be "blur"?
Attachment #729256 -
Flags: review?(bnicholson) → review+
| Assignee | ||
Comment 5•13 years ago
|
||
(In reply to Brian Nicholson (:bnicholson) from comment #4)
> Comment on attachment 729256 [details] [diff] [review]
> (Part 3) Use selectAtPoint to start a selection
>
> Review of attachment 729256 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Looks good to me with the event type fixed.
>
> ::: mobile/android/chrome/content/SelectionHandler.js
> @@ +236,5 @@
> > + */
> > + attachCaret: function sh_attachCaret(aElement) {
> > + this._initTargetInfo(aElement);
> > +
> > + this._contentWindow.addEventListener("pagehide", this, false);
>
> A "pagehide" listener is already added in _initTargetInfo -- I assume this
> should be "blur"?
Nice catch, thanks.
| Assignee | ||
Comment 6•13 years ago
|
||
Comment 7•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0e4a2753c2a2
https://hg.mozilla.org/mozilla-central/rev/16adf42b1eee
https://hg.mozilla.org/mozilla-central/rev/e2ec9e008ee9
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•