mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 06:05:44 +00:00
Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
8b160783a8
Bug 1319660 - 1. Don't take shortcut if old replacement ranges don't match; r=esawin The block at [1] is a shortcut we take when we reconcile Java text changes with Gecko text changes. However, we only checked that the new ranges are the same, i.e. that the new Gecko text is the same as the new Java text. We should also be checking that the old ranges are the same, i.e. that the replaced Gecko text is the same as the replaced Java text. [1] https://dxr.mozilla.org/mozilla-central/rev/bbbd2f7539f224a482cc6d2dd10e6a5f31c8baf3/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoEditable.java#1233 Bug 1319660 - 2. Use previous node instead of sibling when adjusting last node; r=masayuki r=smaug nsContentIterator in pre mode adjusts its last node if the node is a childless node like <br>. However, right now it's using GetPrevSibling, which can lead to error in some edge cases such as: <p></p><div><br></div> In this case, if the last node is <br> with offset 0, GetPrevSibling will return <p> because <p> is <br>'s parent's previous sibling, and the last node will be set to <p>. However, the correct last node in this case is <div>, because <br> with offset 0 refers to the position to the left of <br>, which is <div> with offset 0. In this case, PrevNode returns the correct <div> value, so we should set the last node to the result of PrevNode. For the first node, for a childless node in pre mode, GetNextSibling and NextNode are the same, so there is no bug in this case. Nevertheless, this patch changes the call to NextNode to be consistent with calling PrevNode for the last node. Bug 1319660 - 3. Add test for correctly adjusting last node in content iterator; r=masayuki Add a test for the previous patch that makes sure querying selected text in an edge case works correctly. Bug 1319660 - 4. Add test for start node regression; r=me Add a new test case for the NextNode() regression. r=me for trivial test-only patch. Bug 1319660 - 5. Restore GetNextSibling call for first node of pre-content-iterator; r=smaug The last patch changed the `GetNextSibling()` call to `NextNode()` because I assumed they're equivalent in this case. That turned out to not be the case because we can reach this line even if the node has children -- the index just has to be after the last child. So this patch restores the `GetNextSibling` call to restore the correct behavior. I also added some comment to clarify that we can reach this line due to one of two conditions: 1) the node has no children; 2) the node has children but the index is after the last child. This patch also replaces the `HasChildren()` check when setting `cChild`. If the index is after the last child (i.e. index == childCount), `GetChildAt()` fails and we erroneously log an assertion warning, even though the input was valid. The new check handles all cases whether start node has children or not. |
||
---|---|---|
.cargo | ||
accessible | ||
addon-sdk | ||
b2g | ||
browser | ||
build | ||
caps | ||
chrome | ||
config | ||
db/sqlite3 | ||
devtools | ||
docshell | ||
dom | ||
editor | ||
embedding/ios | ||
extensions | ||
gfx | ||
gradle/wrapper | ||
hal | ||
image | ||
intl | ||
ipc | ||
js | ||
layout | ||
media | ||
memory | ||
mfbt | ||
mobile | ||
modules | ||
mozglue | ||
netwerk | ||
nsprpub | ||
other-licenses | ||
parser | ||
probes | ||
python | ||
rdf | ||
release/docker | ||
security | ||
services | ||
servo/ports/geckoservo | ||
startupcache | ||
storage | ||
taskcluster | ||
testing | ||
third_party/rust | ||
toolkit | ||
tools | ||
uriloader | ||
view | ||
widget | ||
xpcom | ||
xpfe | ||
.clang-format | ||
.clang-format-ignore | ||
.clang-tidy | ||
.cron.yml | ||
.eslintignore | ||
.eslintrc.js | ||
.flake8 | ||
.gdbinit | ||
.gdbinit_python | ||
.gitignore | ||
.hgignore | ||
.hgtags | ||
.lldbinit | ||
.taskcluster.yml | ||
.ycm_extra_conf.py | ||
aclocal.m4 | ||
Android.mk | ||
AUTHORS | ||
build.gradle | ||
client.mk | ||
client.py | ||
CLOBBER | ||
configure.in | ||
configure.py | ||
GNUmakefile | ||
gradle.properties | ||
gradlew | ||
LEGAL | ||
LICENSE | ||
mach | ||
Makefile.in | ||
moz.build | ||
moz.configure | ||
mozilla-config.h.in | ||
old-configure.in | ||
README.txt | ||
settings.gradle | ||
test.mozbuild |
An explanation of the Mozilla Source Code Directory Structure and links to project pages with documentation can be found at: https://developer.mozilla.org/en/Mozilla_Source_Code_Directory_Structure For information on how to build Mozilla from the source code, see: http://developer.mozilla.org/en/docs/Build_Documentation To have your bug fix / feature added to Mozilla, you should create a patch and submit it to Bugzilla (https://bugzilla.mozilla.org). Instructions are at: http://developer.mozilla.org/en/docs/Creating_a_patch http://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree If you have a question about developing Mozilla, and can't find the solution on http://developer.mozilla.org, you can try asking your question in a mozilla.* Usenet group, or on IRC at irc.mozilla.org. [The Mozilla news groups are accessible on Google Groups, or news.mozilla.org with a NNTP reader.] You can download nightly development builds from the Mozilla FTP server. Keep in mind that nightly builds, which are used by Mozilla developers for testing, may be buggy. Firefox nightlies, for example, can be found at: https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/ - or - http://nightly.mozilla.org/