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
Go to file
Jim Chen 8b160783a8 Bug 1319660 - Fix possible crash when editing contentEditable; r=esawin r=masayuki r=smaug
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.
2017-01-23 14:35:04 -05:00
.cargo Bug 1277338 - Part 1: Turn js/src into the mozjs-sys crate; r=sfink 2016-10-13 16:12:42 -07:00
accessible bug 1332690 - return failure from DocAccessibleParent::RecvShow() when appropriate r=yzen 2017-01-23 11:09:39 -05:00
addon-sdk Backed out 2 changesets (bug 1303113) for test_ext_cookies.html failures 2017-01-21 12:20:41 -08:00
b2g Bug 503613 - Remove old 'tail =' lines from xpcshell.ini files; r=gps 2017-01-18 10:30:39 +00:00
browser Bug 1332741 - Use chrome URL for Wikipedia image. r=flod 2017-01-23 12:24:04 -06:00
build Bug 1331012 - follow-up - delete trailng comma in JSON file; r=me 2017-01-20 13:42:07 -05:00
caps Bug 1331968: Implement the moz: protocol handler to redirect to a fixed website. r=gijs 2017-01-18 14:10:46 -08:00
chrome Bug 503613 - Remove old 'tail =' lines from xpcshell.ini files; r=gps 2017-01-18 10:30:39 +00:00
config Bug 1302028 - part 6 - pass LIBCLANG_PATH and CLANG_PATH environment variables to cargo build; r=gps 2017-01-20 16:33:04 +00:00
db/sqlite3 Bug 1328161 - Upgrade to SQLite 3.16.2. r=mak 2017-01-06 10:08:51 -05:00
devtools Backed out changeset e329450e4d25 (bug 1332085) for browser_color-widget-01.js failures 2017-01-21 12:22:06 -08:00
docshell Bug 1271173 - Upgrade-insecure-requests for navigational requests. r=smaug,freddyb 2017-01-23 15:29:44 +01:00
dom Bug 1319660 - Fix possible crash when editing contentEditable; r=esawin r=masayuki r=smaug 2017-01-23 14:35:04 -05:00
editor Bug 1332353. Make it clearer when a stylesheet is really owned by its mDocument. r=heycam 2017-01-19 23:49:44 -05:00
embedding/ios Bug 1309049 - move embedding/ files out of that directory, r=jst,mossop 2017-01-12 13:47:27 -08:00
extensions Bug 503613 - Remove old 'tail =' lines from xpcshell.ini files; r=gps 2017-01-18 10:30:39 +00:00
gfx Bug 1330399 - determine proper bug_components for gfx/* files. r=milan 2017-01-23 11:10:05 -05:00
gradle/wrapper Bug 1300094 - Update Gradle to 2.14.1 and Gradle Plugin to 2.1.3 r=sebastian 2016-09-22 14:31:01 -07:00
hal Bug 1324428 - Simplified preallocated process mechanism. r=billm 2017-01-23 17:25:34 +01:00
image Bug 503613 - Remove old 'tail =' lines from xpcshell.ini files; r=gps 2017-01-18 10:30:39 +00:00
intl Bug 1332565 - Turn off test_intl_on_worker.js test on Android's xpcshell. r=Waldo 2017-01-20 17:07:35 +09:00
ipc Backed out 5 changesets (bug 1305162) for permatimeout in e10s browser_action_keyword.js 2017-01-21 09:41:03 -08:00
js Bug 1328198 - Fix locale-dependence in GC statistics JSON output, r=jonco 2017-01-19 14:22:36 -08:00
layout Bug 1110928, trigger ZoneGC after evicting from bfcache, r=mccr8 2017-01-23 19:25:13 +02:00
media Merge m-i to m-c, a=merge 2017-01-20 19:00:04 -08:00
memory Bug 1332508 - Reinitialize allocator mutexes in fork() child processes. r=njn 2017-01-20 10:06:41 +09:00
mfbt Bug 1329194 - mfbt:tests: Define RETURN_INSTR for SH in TestPoisonArea. r=glandium 2017-01-20 09:12:22 +09:00
mobile Bug 1319660 - Fix possible crash when editing contentEditable; r=esawin r=masayuki r=smaug 2017-01-23 14:35:04 -05:00
modules merge autoland to mozilla-central a=merge 2017-01-23 11:08:00 +01:00
mozglue Bug 1332523 - Remove nsXPCOMGlue.h. r=bsmedberg 2017-01-13 07:56:05 +09:00
netwerk Bug 1271173 - Upgrade-insecure-requests for navigational requests. r=smaug,freddyb 2017-01-23 15:29:44 +01:00
nsprpub Bug 1288308 - Part 2: implement Named Pipe IO layer; r=bagder,mayhemer 2016-11-03 18:15:08 +08:00
other-licenses Bug 1308740 - change the minimum support OS string to Windows 7 in the modified 7-Zip stub source. r=mhowell 2016-11-23 11:42:58 -08:00
parser Bug 503613 - Remove old 'tail =' lines from xpcshell.ini files; r=gps 2017-01-18 10:30:39 +00:00
probes Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
python Merge m-i to m-c, a=merge 2017-01-19 22:04:52 -08:00
rdf Bug 503613 - Remove old 'tail =' lines from xpcshell.ini files; r=gps 2017-01-18 10:30:39 +00:00
release/docker bug 1314574 replace sys.path with site.addsitedir so that .pth files are processed. r=rail a=release DONTBUILD 2016-11-02 10:43:57 +00:00
security Bug 1317947 - land NSS ee21c9892907, r=me 2017-01-21 14:23:56 +01:00
services Merge m-i to m-c, a=merge 2017-01-20 19:00:04 -08:00
servo/ports/geckoservo Bug 1302028 - part 4 - add dummy geckoservo crate; r=Manishearth 2017-01-20 11:33:04 -05:00
startupcache Bug 1323100 - Register most of the remaining threadfunc threads with the profiler. r=froydnj 2017-01-05 16:34:26 +01:00
storage Bug 503613 - Remove old 'tail =' lines from xpcshell.ini files; r=gps 2017-01-18 10:30:39 +00:00
taskcluster Bug 1333019 - run gtest/cppunit/jittest/jsreftest on Ubuntu 16.04. r=gbrown 2017-01-23 11:10:09 -05:00
testing Backed out changeset a82768d2e585 (bug 1331129) for unexpected access to xperf in pageloader@mozilla.org.xpi. r=backout 2017-01-23 19:13:16 +01:00
third_party/rust Bug 1328221 - Support GASpecificConfig audio channel in rust mp4 parser. r=rillian 2017-01-11 09:03:30 +08:00
toolkit Bug 1321637: Fix execution of batch files with spaces in path. r=mhowell,aswan 2017-01-22 16:23:33 -08:00
tools Merge m-c to m-i 2017-01-20 19:16:11 -08:00
uriloader Bug 503613 - Remove old 'tail =' lines from xpcshell.ini files; r=gps 2017-01-18 10:30:39 +00:00
view Bug 1330225. Remove unused function nsViewManager::InsertChild. r=mats 2017-01-12 00:59:11 -06:00
widget Bug 1319660 - Fix possible crash when editing contentEditable; r=esawin r=masayuki r=smaug 2017-01-23 14:35:04 -05:00
xpcom merge mozilla-inbound to mozilla-central a=merge 2017-01-23 11:15:58 +01:00
xpfe Bug 1329032 - Extend loadURIWithOptions by a triggeringPrincipal. r=bz,gijs 2017-01-18 08:24:55 +01:00
.clang-format Bug 1322321 - Update the clang format file to match more our coding style r=ehsan 2016-12-06 17:43:17 -10:00
.clang-format-ignore Bug 1313040 - Update the list of ignored directories/files with clang-format r=mystor 2016-11-14 15:42:55 +01:00
.clang-tidy Bug 1319396 - Update the list of checkers in the .clang-tidy file r=Ehsan 2016-11-22 12:30:19 +01:00
.cron.yml Bug 1252948: support for periodic taskgraphs; r=Callek,jonasfj,kmoir 2017-01-18 19:45:53 +00:00
.eslintignore Bug 1332170 - Make the pdf.js mochitests pass ESLint and remove them from the whitelist. r=yury 2017-01-19 10:11:57 -05:00
.eslintrc.js Bug 1330147 - add eslint rule to reject newURI(uri, null, null) and removeObserver(notificationName, observer, false), r=jaws. 2017-01-11 22:27:42 +01:00
.flake8 Bug 1321956 - Disable flake8 check for 'visually indented line with same indent as next logical line', r=ahal 2016-12-08 09:53:21 -10:00
.gdbinit Bug 1317802 - don't stop for SIGSYS in .gdbinit; r=jld 2016-11-16 01:13:22 -05:00
.gdbinit_python bug 985566 - add some pretty printers to .gdbinit r=froydnj r=glandium 2016-06-02 13:33:07 -04:00
.gitignore Bug 1301790 - Bundle codemirror into a single script;r=gl 2016-09-11 09:38:51 -07:00
.hgignore Bug 1234500 - Allow mach talos-test to download tp5 pageset; r=jmaher 2016-11-07 19:35:12 -05:00
.hgtags No bug - Tagging mozilla-central 1196bf3032e1bce1fb07a01fd9082a767426c5fb with FIREFOX_AURORA_52_BASE a=release DONTBUILD CLOSED TREE 2016-11-14 13:28:09 +01:00
.lldbinit
.taskcluster.yml Bug 1252948: support for periodic taskgraphs; r=Callek,jonasfj,kmoir 2017-01-18 19:45:53 +00:00
.ycm_extra_conf.py Bug 1293534: Fix .ycm_extra_conf after bug 1195748. r=gps 2016-08-09 10:30:58 -07:00
aclocal.m4 Bug 1262155 - Use moz.build instead of libffi's build system. r=ted,glandium 2016-08-08 16:58:54 -07:00
Android.mk
AUTHORS Bug 1302763 - Move docker images out of testing/docker into taskcluster/docker; r=dustin r=CuriousLearner 2016-10-20 18:25:34 +05:30
build.gradle Bug 1318823 - Use com.getkeepsafe.dexcount in Gradle builds. r=sebastian 2016-11-18 18:28:58 -08:00
client.mk Bug 1317778 - Emit a depfile with python configure dependencies so Make will know when to re-run configure. r=glandium 2016-12-02 10:05:57 -08:00
client.py
CLOBBER Bug 1223692: Update libvpx to v1.6.0. r=rillian 2017-01-16 11:51:27 -08:00
configure.in Bug 1295751 - Make it possible to copy configure.in to configure. r=gps 2016-08-16 19:35:00 -07:00
configure.py Bug 1316140 - Allow use of multiprocessing from config.status on windows. r=mshal 2016-12-21 16:28:28 -08:00
GNUmakefile
gradle.properties
gradlew
LEGAL
LICENSE
mach Bug 1316140 - Allow use of multiprocessing from config.status on windows. r=mshal 2016-12-21 16:28:28 -08:00
Makefile.in bug 1286934 - Switch to using sccache2. r=gps 2016-08-25 18:39:57 -04:00
moz.build bug 1295937 - build NSS using gyp files. r=glandium 2016-11-09 12:37:09 -05:00
moz.configure Bug 1317778 - Emit a depfile with python configure dependencies so Make will know when to re-run configure. r=glandium 2016-12-02 10:05:57 -08:00
mozilla-config.h.in
old-configure.in Backed out 4 changesets (bug 1325299) for frequent Win7VM failures in browser_addonPerformanceAlerts.js a=backout 2017-01-20 12:46:34 -08:00
README.txt
settings.gradle Bug 1291363 - Add geckoview and geckoview_example Gradle projects. r=jchen,sebastian 2016-10-05 20:23:38 -07:00
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/