Closed
Bug 864589
Opened 12 years ago
Closed 12 years ago
Show/hide text selection handles if a selection is programatically added/removed
Categories
(Firefox for Android Graveyard :: Text Selection, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 26
People
(Reporter: Margaret, Assigned: capella)
References
Details
Attachments
(1 file, 1 obsolete file)
|
4.79 KB,
patch
|
Margaret
:
review+
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
This was originally half fixed in bug 767065, but I removed that logic in bug 667243, since it didn't work well with our new caretPositionFromPoint approach.
| Assignee | ||
Updated•12 years ago
|
Assignee: nobody → markcapella
Status: NEW → ASSIGNED
| Assignee | ||
Comment 1•12 years ago
|
||
This appears to solve for this and the test case in bug 767065, as well as solving bug 904288 the right way.
I have one minor concern, let's see if you notice :-)
Attachment #790198 -
Flags: review?(margaret.leibovic)
| Reporter | ||
Comment 2•12 years ago
|
||
Comment on attachment 790198 [details] [diff] [review]
bug864589
Review of attachment 790198 [details] [diff] [review]:
-----------------------------------------------------------------
I'm impressed that you aren't afraid to jump right into the platform side of things. This seems like a less hacky approach than what I did back in bug 767065!
However, I want Ehsan to take a look at these platform changes before I start reviewing the JS side of things :)
Attachment #790198 -
Flags: review?(ehsan)
| Assignee | ||
Comment 3•12 years ago
|
||
margaret: fyi - yah - when I started out with a11y I did some tinkering with text selection, notably here https://bugzilla.mozilla.org/show_bug.cgi?id=614585
Updated•12 years ago
|
Attachment #790198 -
Flags: review?(ehsan) → review+
| Reporter | ||
Comment 4•12 years ago
|
||
Comment on attachment 790198 [details] [diff] [review]
bug864589
Review of attachment 790198 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM. I'm wondering what your concern is! :)
::: mobile/android/chrome/content/SelectionHandler.js
@@ +479,1 @@
> selection.removeAllRanges();
This is the opposite order of what was in my patch from bug 767065, but I did update it to do this before removing the selection listener from the code:
http://hg.mozilla.org/mozilla-central/annotate/c8d7e2709f01/mobile/android/chrome/content/SelectionHandler.js#l402
So this is correct.
Attachment #790198 -
Flags: review?(margaret.leibovic) → review+
| Reporter | ||
Comment 5•12 years ago
|
||
I wonder if this platform change is something that will help out metro. Cc'ing jimm in case it is.
| Assignee | ||
Comment 6•12 years ago
|
||
I'm reposting this for review as a little research confirmed it needed help a) to better target the notification reasons we're interested in, and b) allow our reasons to co-exist with, vs. supercede, other bit flags that may be present.
Attachment #790198 -
Attachment is obsolete: true
Attachment #791111 -
Flags: review?(margaret.leibovic)
Attachment #791111 -
Flags: review?(ehsan)
| Assignee | ||
Comment 8•12 years ago
|
||
Copying aaronmt ... fyi ... this should confirm the fix for bug 767065, as well as solving bug 904288.
| Reporter | ||
Comment 9•12 years ago
|
||
Comment on attachment 791111 [details] [diff] [review]
bug864589
Review of attachment 791111 [details] [diff] [review]:
-----------------------------------------------------------------
r+ to the JS changes. Thanks for being so thorough!
Attachment #791111 -
Flags: review?(margaret.leibovic) → review+
Comment 10•12 years ago
|
||
Comment on attachment 791111 [details] [diff] [review]
bug864589
Review of attachment 791111 [details] [diff] [review]:
-----------------------------------------------------------------
::: layout/generic/nsSelection.cpp
@@ +4444,5 @@
> if (!firstRange)
> return NS_ERROR_FAILURE;
>
> + if (mFrameSelection) {
> + short reason = mFrameSelection->PopReason() | nsISelectionListener::COLLAPSETOSTART_REASON;
int16_t here and below.
::: mobile/android/chrome/content/SelectionHandler.js
@@ +176,5 @@
>
> + notifySelectionChanged: function sh_notifySelectionChanged(aDocument, aSelection, aReason) {
> + // If the selection was collapsed to Start or to End, always close it
> + if (aReason & Ci.nsISelectionListener.COLLAPSETOSTART_REASON ||
> + aReason & Ci.nsISelectionListener.COLLAPSETOEND_REASON) {
Please don't rely on operator precedence like this! Use parenthesis to make the precedence explicit.
Attachment #791111 -
Flags: review?(ehsan) → review+
| Assignee | ||
Comment 11•12 years ago
|
||
| Assignee | ||
Comment 12•12 years ago
|
||
>Whack-a-mole<
https://hg.mozilla.org/integration/fx-team/rev/2404f5888de3
Backed out in https://hg.mozilla.org/integration/fx-team/rev/2c6cf76338b5 under suspicion of breaking the build a few pushes after it landed (See https://tbpl.mozilla.org/php/getParsedLog.php?id=26657945&tree=Fx-Team for the bustage.)
| Assignee | ||
Comment 14•12 years ago
|
||
re-push because uuid's are real things
https://hg.mozilla.org/integration/fx-team/rev/5a5d5ebec1fc
Comment 15•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
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
•