forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1343037 part 6. Simplify the setup around the editor state's GetS…
…electionRange function. r=ehsan Really, there are only two cases we need to worry about. Either IsSelectionCached(), and then our SelectionProperties has the data we want, or not and then we have a non-null mSelCon which has the data we want. Since we are now using cached selection state a lot more (instead of initializing the editor whenever someone asks for selection state), we need to actually update it more correctly when .value is set. And since we now update the cached selection state for the case when .value has been set (to point to the end of the text), we need to change HTMLInputElement::HasCachedSelection to return false for that case. Otherwise we will always do eager editor init on value set. We handle that by not doing eager init if the cached selection is collapsed. The web platform test changes test the "update on .value set" behavior. They fail without this patch, pass with it. MozReview-Commit-ID: DDU8U4MGb23
- Loading branch information
Showing
10 changed files
with
229 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.