From cf2d7d1ae96dd7ec5eec6331cf41bb241b8cb608 Mon Sep 17 00:00:00 2001
From: roytam1
Date: Wed, 28 Feb 2024 12:10:08 +0800
Subject: [PATCH] import changes from `dev' branch of rmottola/Arctic-Fox: -
Bug 1212114 - Stop using dom::Promise::MaybeRejectBrokenly() in various
FileSystemTaskBase subclasses. r=baku (9f6ea5db27) - Bug 1253534 - Suspicious
code with probably reversed parms in call to IsSingleLineTextControl,
r=mounir (1a5ee1fd1e) - Bug 769117 - Mochitests for youtube flash -> html5
rewriting; r=bz r=hsivonen (6324471dd9) - Bug 1250148 - FormData should treat
empty input type=file as empty string in FormData and as unnamed Blob in HTML
submission, r=smaug (7043113247) - Bug 1173320 - patch 1/8 - Implement
Directory object as string and not as BlobImpl, r=smaug (eca4bec6ea) - Bug
1173320 - patch 2/8 - Proper naming for the FileSystem path serialization,
r=smaug (e1604ff2b1) - Bug 1173320 - patch 3/8 - Improve the Windows path
management, r=smaug (f8da8541b5) - Bug 1252347 - Provide missing
implementations of nsIBaseWindow::SetPositionDesktopPix. r=emk (97f9b92465) -
Bug 1235066 - SVG elements should not display title attributes as tooltips.
r=enndeakin (a77e809688) - Bug 1251809 - Add input[type=file] tooltip support
for e10s. r=ehsan (9f72cf3cd2) - Bug 1173320 - patch 4/8 - Directory in
FileList, r=smaug (c09d445043) - Bug 1246244 - Regression test.
r=jaws,Margaret (8de084f9db) - Bug 1224105 - Allow windowless chrome
docshells containing content docshells (r=smaug) (3343a2a966) - Bug 1230267 -
Inconsistent display of SVG title as tooltip when multi-process is enabled.
r=jst (b3fc298b7f) - Bug 1173320 - patch 5/8 - Cleanup manual string path
management, r=smaug (8f6f0c4e44) - Bug 1250403 - Part 1. Define
ARCH_CPU_ARM64 instead of ARCH_CPU_AARCH64. r=billm (d93a0b54da) - Bug
1250403 - Part 2. Import crbug #354405 for aarch64. r=billm (9dca949bcc) -
Bug 1246501 - Add ppc specific atomic operations to ipc/chromium. r=Waldo
(8054b612be) - Bug 1257305 - Avoid VS2015 about casting int to void*.
r=dvander (6234acf6fc) - Bug 1207401 - Send B2G sandbox logging to both
stderr and logcat. r=kang (ae404aa5ca) - Bug 1173320 - patch 6/8 - Make
FileList clonable to workers if it doesn't contain Directories, r=smaug
(ea6ba42f31) - Bug 1173320 - patch 7/8 - Tests for FileList and Directories,
r=smaug (3f11503300) - Bug 1222522, part 1 - Make most dom/devicestorage/
tests work with e10s. r=dhylands (3cc7e339a5) - Bug 1173320 - patch 8/8 - Fix
e10s tests for DeviceStorage API, r=smaug (949454bae7) - Bug 1222522, part 2
- Inline devicestorage_cleanup() in dom/devicestorage/ tests. r=dhylands
(bcdee11385) - Bug 1258137 - OSFileSystem should not be kept alive by more
than 1 Directory, r=smaug (225775f48d) - Bug 1255867. Remove some unnecessary
AutoJSAPI uses. r=bholley (618cf018e8) - Bug 1237173 - Part2: Change type of
duration to Maybe. r=birtles (6b83473e05) - Bug 1238469 -
Part 1: Refactor b2g emulator tests to remove the usage of custom mozharness
configs; r=ahal (a128c8a8bb) - Bug 1238469 - Part 2: Refactor b2g mulet tests
to remove the usage of custom mozharness configs; r=ahal (6c7ced3419) - Bug
1238469 - Part 3: Use b2g_emulator_unittest.py for b2g marionette tests;
r=ahal (5fdb88b0e1) - Bug 1237173 - Part3: Throw TypeError if duration is
NaN, negative value or not 'auto' string. r=birtles, r=smaug (d60b0318d2) -
Bug 1136567 - Marionette test for selection carets' positions after changing
orientation of device. r=Automatedtester (e7b25b1e4f) - Bug 1138839 - Part1 -
Marionette test for selecting text inside an iframe. r=automatedtester
(45db397a94) - Bug 1138839 - Part2 - Fix naming issue in marionette test for
selection carets. r=automatedtester (c54850d9d3) - Bug 1198542: Update
Marionette element IDs to be valid UUID. r=ato This allows WebDriver
compatibility to create valid URI. (1b3de245de) - Bug 1204496: When searching
by link text start from the startNode and not the rootNode; r=ato
(0dfa3b8830) - Bug 1157725 - Rewrite test_mouse_action.py to be more robust.
r=ato (40273abca2) - Bug 1141519: added test that puts marionette into a
position that can cause hangs when in content scope; r=jgriffin (c99d8cf325)
- Bug 1246407 - Rename parent directories for Marionette client and test
harness; r=automatedtester (79d4e521fd) - Bug 1253989 Part 3 - Use
@parameterized to rewrite selection mode tests. r=mtseng (baf189f1d5) - Bug
1253989 Part 4 - Rename AccessibleCaret test files. r=mtseng (d562edc8f4) -
Bug 1251519 Part 3 - Add regression tests for caret dragging. r=mats
(048dd5f103) - Bug 1253989 Part 5 - Remove touch caret and selection carets
naming. r=mtseng (9929425b6d) - Bug 1253989 Part 6 - Refactor
open_test_html(). r=mtseng (25a2424ca1) - Bug 1251519 Part 4 - Add tests for
dragging caret to content boundary. r=mats (489b47269b) - Bug 1251519 Part 5
- Use union rect of child frames for clamping. r=mats (5520416749) - Bug
1216924 - Don't align to tiles (either real or virtual) if displayport
suppression is enabled. r=BenWa (d470d188e4) - Bug 1254273 - Align the
displayport to a max of 256 pixels even if the layer is larger. r=BenWa
(0cf8cc0b6c) - Bug 1257938 part 3: Remove support for the
"layout.css.sticky.enabled" pref (so we'll unconditionally support "position:
sticky"). r=corey (fe12efd18f) - Bug 1257938 part 1: Adjust automated tests
to assume position:sticky is unconditionally supported. r=corey (e749ac579e)
- Bug 1257938 part 2: Remove separation between test_position_sticky.html &
its helper-file, now that it doesn't need to tweak a pref. r=corey
(631edab31a) - Bug 1257491 - Ensure that if the peek-messages code modifies
the displayport, we schedule a repaint. r=BenWa (d6fb6ff96c) - Bug 1255006 -
Ensure the displayport rect takes priority over a suppressed-margins
displayport. r=kats (aa6cbc0250) - Bug 1259235 - Add
IsScrollFrameWithSnapping to speed up event regions. r=mstange (2a744c311e) -
Bug 1185140 - [css-grid][flexbox] Make grid/flex item blockification happen
before creating table pseudos, per the latest specs. r=dholbert (dddb8b17ef)
- Bug 1224424 - Replace mask-mode:auto keyword by mask-mode:match-source;
r=dbaron (5a51b3b301) - Bug 1252039 - corrected MOZ_ASSERT expression in
SeparatorRequiredBetweenTokens. r=dbaron (08790aa514) - Bug 1243734 - Part 1.
Use MOZ_ENABLE_MASK_AS_SHORTHAND to define the type of mask property;
r=dbaron (d8cd3a1c4a) - Bug 1243734 - Part 2. Set up gCSSProperties depends
on mask-as-shorth and; r=dbaron (aa6b0259d8) - Bug 1243734 - Part 3. Set
mask-mode reftest as failure before enable mask-as-shorthand; r=dbaron
(6a326fbaf2) - Bug 1243734 - Part 5. Add MOZ_ENABLE_MASK_AS_SHORTHAND compile
flag; r=ted r=dbaron (fcc1344ac8) - Bug 1142531: Check more bits in
nsStyleContext::MoveTo assertion. r=heycam (8b62b139df) - Bug 1258147 -
Pierce through display:contents style context ancestors when looking for CB
context to compare our writing-mode to. r=jfkthame (956d8c25e5) - Bug 823483
patch 1 - Check for percentage max-width in addition to percentage width when
deciding to ignore intrinsic min-width of replaced elements. r=dholbert
(f88cb5f6a8) - Bug 823483 patch 3 - Limit effect of percentage width and
max-width on intrinsic size to elements with replaced element sizing.
r=dholbert (2573c3cfff) - Bug 823483 patch 4 - Make a percentage max-width
override a fixed width for replaced element intrinsic size computation.
r=dholbert (dda859f06c) - Bug 823483 patch 5 - Make (again) percentage width
on text inputs make intrinsic minimum width be 0. r=dholbert (d46ada73ef) -
Bug 1247929 patch 2 - Hard-code the Web-compatible set of form controls whose
intrinsic minimum inline-size shrinks to 0 when inline-size (width) is
specified as a percentage. r=dholbert (e4f0c80fcb) - Bug 1254968 - Add
support for running JS builtins' constructors over Xray wrappers without
unwrapping the newTarget. r=bholley,f=bz (56213ae395) - Bug 1249123 - Add
telemetry for __defineGetter__/__defineSetter__ |this| values.
data-review=bsmedberg r=till (52c5fd3488) - Bug 1232639 - Implement
Object.{values,entries} in C++ to avoid native call overhead in tight loop.
r=jorendorff (7262497283) - Bug 1254966 - Disambiguate JS Telemetry macro
names. r=evilpie (781d0916c4) - Bug 1254384: Use generic shell switch syntax
in js/src/jit-test tests. r=nbp (6f5975cc55) - Bug 1253016 - Remove legacy
__defineGetter__/__defineSetter__ this behavior. r=till (cf1b7ad28c) - Bug
1253016 - Implement and test the new spec for legacy functions. r=till
(1ff7762e3e)
---
.../base/content/test/general/title_test.svg | 59 +
build/mach_bootstrap.py | 4 +-
build/pgo/server-locations.txt | 3 +
build/virtualenv_packages.txt | 6 +-
configure.in | 10 +
docshell/base/nsDocShell.cpp | 12 +-
dom/animation/AnimationEffectTiming.cpp | 21 +-
dom/animation/AnimationEffectTiming.h | 3 +-
.../AnimationEffectTimingReadOnly.cpp | 11 +
dom/animation/AnimationEffectTimingReadOnly.h | 5 +-
dom/animation/KeyframeEffect.cpp | 10 +-
dom/animation/KeyframeEffect.h | 16 +-
dom/animation/TimingParams.cpp | 71 +-
dom/animation/TimingParams.h | 35 +-
dom/base/Element.cpp | 9 +-
dom/base/File.cpp | 22 +-
dom/base/File.h | 88 +-
dom/base/FileList.cpp | 87 +-
dom/base/FileList.h | 44 +-
dom/base/FormData.cpp | 28 +-
dom/base/FormData.h | 8 +-
dom/base/StructuredCloneHolder.cpp | 126 +-
dom/base/nsContentUtils.cpp | 1 -
dom/base/nsIDOMFileList.idl | 2 +-
dom/base/test/file_bug1250148.sjs | 60 +
dom/base/test/mochitest.ini | 3 +
dom/base/test/script_postmessages_fileList.js | 24 +-
dom/base/test/test_bug1187157.html | 8 +-
dom/base/test/test_bug1250148.html | 52 +
dom/base/test/test_bug769117.html | 51 +
dom/base/test/test_postMessages.html | 65 +-
.../BrowserElementAudioChannel.cpp | 8 +-
dom/devicestorage/DeviceStorage.h | 6 +-
dom/devicestorage/DeviceStorageStatics.cpp | 20 +-
dom/devicestorage/ipc/ipc.json | 8 -
dom/devicestorage/ipc/mochitest.ini | 8 -
dom/devicestorage/ipc/test_ipc.html | 173 --
dom/devicestorage/moz.build | 1 -
dom/devicestorage/nsDeviceStorage.cpp | 104 +-
.../test/devicestorage_common.js | 50 +-
dom/devicestorage/test/mochitest.ini | 4 +-
.../test/remove_testing_directory.js | 11 +
dom/devicestorage/test/test_823965.html | 13 +-
dom/devicestorage/test/test_add.html | 13 +-
.../test/test_addCorrectType.html | 13 +-
dom/devicestorage/test/test_available.html | 8 +-
dom/devicestorage/test/test_basic.html | 17 +-
dom/devicestorage/test/test_diskSpace.html | 12 +-
dom/devicestorage/test/test_dotdot.html | 13 +-
dom/devicestorage/test/test_enumerate.html | 15 +-
.../test/test_enumerateMultipleContinue.html | 8 +-
.../test/test_enumerateNoParam.html | 6 +-
.../test/test_enumerateOptions.html | 9 +-
dom/devicestorage/test/test_freeSpace.html | 11 +-
.../test/test_fs_appendFile.html | 11 +-
dom/devicestorage/test/test_fs_basic.html | 10 +-
.../test/test_fs_createDirectory.html | 18 +-
.../test/test_fs_createFile.html | 9 +-
dom/devicestorage/test/test_fs_get.html | 18 +-
.../test/test_fs_getFilesAndDirectories.html | 11 +-
dom/devicestorage/test/test_fs_remove.html | 13 +-
.../test/test_lastModificationFilter.html | 18 +-
dom/devicestorage/test/test_overrideDir.html | 20 +-
dom/devicestorage/test/test_overwrite.html | 13 +-
dom/devicestorage/test/test_sanity.html | 9 +-
.../test/test_storageAreaListener.html | 6 +-
dom/devicestorage/test/test_usedSpace.html | 10 +-
dom/devicestorage/test/test_watch.html | 8 +-
dom/devicestorage/test/test_watchOther.html | 8 +-
dom/events/DataTransfer.cpp | 64 +-
dom/events/DataTransfer.h | 7 +-
dom/filehandle/ActorsChild.cpp | 3 +-
dom/filesystem/CreateDirectoryTask.cpp | 132 +-
dom/filesystem/CreateDirectoryTask.h | 36 +-
dom/filesystem/CreateFileTask.cpp | 184 +-
dom/filesystem/CreateFileTask.h | 43 +-
dom/filesystem/DeviceStorageFileSystem.cpp | 78 +-
dom/filesystem/DeviceStorageFileSystem.h | 11 +-
dom/filesystem/Directory.cpp | 336 ++-
dom/filesystem/Directory.h | 65 +-
dom/filesystem/FileSystemBase.cpp | 49 +-
dom/filesystem/FileSystemBase.h | 40 +-
.../FileSystemPermissionRequest.cpp | 10 +-
dom/filesystem/FileSystemRequestParent.cpp | 9 +-
dom/filesystem/FileSystemTaskBase.cpp | 32 +-
dom/filesystem/FileSystemTaskBase.h | 8 +-
dom/filesystem/FileSystemUtils.cpp | 57 +-
dom/filesystem/FileSystemUtils.h | 25 +-
dom/filesystem/GetDirectoryListingTask.cpp | 225 +-
dom/filesystem/GetDirectoryListingTask.h | 51 +-
dom/filesystem/GetFileOrDirectoryTask.cpp | 156 +-
dom/filesystem/GetFileOrDirectoryTask.h | 46 +-
dom/filesystem/OSFileSystem.cpp | 52 +-
dom/filesystem/OSFileSystem.h | 14 +-
dom/filesystem/PFileSystemRequest.ipdl | 19 +-
dom/filesystem/RemoveTask.cpp | 163 +-
dom/filesystem/RemoveTask.h | 48 +-
dom/filesystem/moz.build | 2 +
dom/filesystem/tests/mochitest.ini | 5 +
dom/filesystem/tests/moz.build | 7 +
dom/filesystem/tests/script_fileList.js | 13 +
dom/filesystem/tests/test_basic.html | 103 +
dom/html/HTMLInputElement.cpp | 385 ++--
dom/html/HTMLInputElement.h | 33 +-
dom/html/nsFormSubmission.cpp | 129 +-
dom/html/nsFormSubmission.h | 11 +-
dom/html/test/test_formSubmission.html | 12 +-
dom/indexedDB/FileSnapshot.h | 24 -
dom/indexedDB/IDBObjectStore.cpp | 3 +-
dom/ipc/Blob.cpp | 64 +-
dom/ipc/BlobChild.h | 5 +-
dom/ipc/DOMTypes.ipdlh | 1 -
dom/ipc/FilePickerParent.cpp | 98 +-
dom/ipc/FilePickerParent.h | 31 +-
dom/ipc/PContent.ipdl | 2 +
dom/ipc/PFilePicker.ipdl | 14 +-
dom/media/test/external/README.md | 2 +-
dom/webidl/AnimationEffectTiming.webidl | 3 +-
dom/webidl/Directory.webidl | 3 +
dom/webidl/FileList.webidl | 4 +-
dom/webidl/HTMLInputElement.webidl | 4 +
embedding/browser/nsDocShellTreeOwner.cpp | 131 +-
embedding/browser/nsDocShellTreeOwner.h | 4 +
embedding/browser/nsWebBrowser.cpp | 14 +-
.../composite/AsyncCompositionManager.cpp | 5 +-
ipc/chromium/moz.build | 2 +-
ipc/chromium/src/base/atomicops.h | 6 +-
.../src/base/atomicops_internals_arm64_gcc.h | 360 +++
.../src/base/atomicops_internals_ppc_gcc.h | 132 ++
ipc/chromium/src/base/thread_local.h | 3 +-
ipc/chromium/src/build/build_config.h | 3 +-
js/public/Class.h | 14 +-
js/src/builtin/Object.cpp | 128 +-
js/src/builtin/Object.js | 116 +-
js/src/builtin/SelfHostingDefines.h | 2 +
.../jit-test/tests/auto-regress/bug488421.js | 2 +-
.../jit-test/tests/auto-regress/bug490191.js | 2 +-
.../jit-test/tests/auto-regress/bug521163.js | 2 +-
.../jit-test/tests/auto-regress/bug560796.js | 2 +-
.../jit-test/tests/auto-regress/bug580699.js | 2 +-
.../jit-test/tests/auto-regress/bug600128.js | 2 +-
.../jit-test/tests/auto-regress/bug653789.js | 2 +-
js/src/jit-test/tests/baseline/bug1095870.js | 2 +-
js/src/jit-test/tests/baseline/bug1153458.js | 4 +-
js/src/jit-test/tests/basic/bug593611.js | 3 +-
js/src/jit-test/tests/basic/bug641229.js | 2 +-
js/src/jit-test/tests/basic/bug785094.js | 2 +-
js/src/jit-test/tests/basic/testBug628564.js | 2 +-
js/src/jit-test/tests/basic/testBug775807.js | 2 +-
js/src/jit-test/tests/gc/bug-1053676.js | 2 +-
js/src/jit-test/tests/ion/bug-870034.js | 2 +-
js/src/jit-test/tests/ion/bug1076026.js | 2 +-
js/src/jit-test/tests/ion/bug780842.js | 2 +-
js/src/jit-test/tests/ion/bug819611.js | 2 +-
js/src/jit-test/tests/ion/bug875452.js | 2 +-
js/src/jit-test/tests/ion/bug892794.js | 2 +-
js/src/jit-test/tests/ion/bug905999.js | 2 +-
js/src/jit-test/tests/ion/bug906035.js | 2 +-
js/src/jit-test/tests/ion/bug909601.js | 2 +-
js/src/jit-test/tests/ion/bug911707.js | 2 +-
js/src/jit-test/tests/ion/divmodself.js | 2 +-
.../ion/inline-Math-random-before-called.js | 2 +-
...create-with-primitive-second-arg-in-ion.js | 2 +-
js/src/jit-test/tests/jaeger/bug768313.js | 2 +-
js/src/jsarray.cpp | 14 +
js/src/jsarray.h | 3 +
js/src/jscompartment.h | 8 +
js/src/jsiter.cpp | 10 +-
.../Object/defineGetter-defineSetter.js | 92 +
js/src/vm/SelfHosting.cpp | 12 +-
js/xpconnect/wrappers/XrayWrapper.cpp | 42 +
js/xpconnect/wrappers/XrayWrapper.h | 15 +-
layout/base/AccessibleCaretManager.cpp | 61 +-
layout/base/AccessibleCaretManager.h | 7 +-
layout/base/nsDisplayList.cpp | 20 +-
layout/base/nsLayoutUtils.cpp | 85 +-
layout/base/nsPresContext.h | 2 +-
.../test_accessiblecaret_cursor_mode.py | 191 +-
.../test_accessiblecaret_selection_mode.py | 561 ++---
.../test_selectioncarets_multiplerange.py | 72 +
layout/forms/nsListControlFrame.h | 3 +
layout/generic/nsGfxScrollFrame.cpp | 20 +
layout/generic/nsGfxScrollFrame.h | 7 +
layout/generic/nsIScrollableFrame.h | 2 +
layout/inspector/inDOMUtils.cpp | 2 +
layout/mathml/crashtests/crashtests.list | 2 +-
layout/reftests/bugs/reftest.list | 4 +-
.../fieldset/fieldset-flexbox-001-ref.html | 40 +
layout/reftests/forms/fieldset/reftest.list | 8 +-
.../position-sticky/pref-1-disabled-ref.html | 20 -
.../position-sticky/pref-1-enabled-ref.html | 20 -
layout/reftests/position-sticky/pref-1.html | 34 -
layout/reftests/position-sticky/reftest.list | 4 -
.../w3c-css/submitted/masking/reftest.list | 8 +-
layout/style/Declaration.cpp | 10 +
layout/style/StyleAnimationValue.cpp | 8 +-
layout/style/nsAnimationManager.cpp | 3 +-
layout/style/nsCSSKeywordList.h | 1 +
layout/style/nsCSSParser.cpp | 6 +-
layout/style/nsCSSPropAliasList.h | 3 +-
layout/style/nsCSSPropList.h | 14 +
layout/style/nsCSSProps.cpp | 12 +-
layout/style/nsCSSProps.h | 4 +-
layout/style/nsComputedDOMStyle.cpp | 4 +-
layout/style/nsComputedDOMStyle.h | 3 +-
layout/style/nsComputedDOMStylePropertyList.h | 2 +
layout/style/nsRuleNode.cpp | 18 +-
layout/style/nsStyleConsts.h | 2 +-
layout/style/nsStyleContext.cpp | 78 +-
layout/style/nsStyleContext.h | 2 +
layout/style/nsStyleStruct.cpp | 4 +-
layout/style/nsStyleStruct.h | 9 +-
layout/style/nsTransitionManager.cpp | 2 +-
layout/style/test/file_position_sticky.html | 88 -
layout/style/test/mochitest.ini | 1 -
layout/style/test/moz.build | 2 +
layout/style/test/property_database.js | 563 ++---
layout/style/test/test_position_sticky.html | 77 +-
.../test/test_transitions_per_property.html | 23 +-
modules/libpref/init/all.js | 3 -
security/sandbox/linux/SandboxLogging.cpp | 8 +-
testing/config/marionette_requirements.txt | 2 +-
.../luciddream/luciddream/runluciddream.py | 4 +-
testing/marionette/client/MANIFEST.in | 4 -
.../marionette/www/test_selectioncarets.html | 32 -
.../marionette/www/test_touchcaret.html | 17 -
.../marionette_driver/__init__.py | 0
.../marionette_driver/addons.py | 0
.../marionette_driver/by.py | 0
.../marionette_driver/date_time_value.py | 0
.../marionette_driver/decorators.py | 0
.../marionette_driver/errors.py | 0
.../marionette_driver/expected.py | 0
.../marionette_driver/geckoinstance.py | 0
.../marionette_driver/gestures.py | 0
.../marionette_driver/keys.py | 0
.../marionette_driver/selection.py | 68 +-
.../marionette_driver/transport.py | 0
.../marionette_driver/wait.py | 0
testing/marionette/client/requirements.txt | 13 -
testing/marionette/client/setup.py | 25 +-
testing/marionette/driver/MANIFEST.in | 2 -
.../driver/marionette_driver/marionette.py | 1990 -----------------
testing/marionette/driver/requirements.txt | 1 -
testing/marionette/elements.js | 5 +-
testing/marionette/harness/MANIFEST.in | 6 +
.../{client => harness}/docs/Makefile | 0
.../docs/advanced/actions.rst | 0
.../docs/advanced/debug.rst | 0
.../docs/advanced/findelement.rst | 0
.../docs/advanced/landing.rst | 0
.../docs/advanced/stale.rst | 0
.../{client => harness}/docs/basics.rst | 0
.../{client => harness}/docs/conf.py | 0
.../{client => harness}/docs/index.rst | 0
.../{client => harness}/docs/interactive.rst | 0
.../{client => harness}/docs/make.bat | 0
.../{client => harness}/docs/reference.rst | 0
.../marionette/__init__.py | 0
.../marionette/atoms/b2g_update_test.js | 0
.../marionette/b2g_update_test.py | 0
.../marionette/chrome/test.xul | 0
.../marionette/chrome/test2.xul | 0
.../chrome/test_anonymous_content.xul | 0
.../marionette/chrome/test_nested_iframe.xul | 0
.../marionette/marionette_test.py | 0
.../marionette/runner/__init__.py | 0
.../marionette/runner/base.py | 0
.../marionette/runner/httpd.py | 0
.../marionette/runner/mixins/__init__.py | 0
.../marionette/runner/mixins/b2g.py | 0
.../mixins/browsermob-proxy-py/History.md | 0
.../browsermobproxy/__init__.py | 0
.../browsermobproxy/client.py | 0
.../browsermobproxy/server.py | 0
.../webdriver_event_listener.py | 0
.../mixins/browsermob-proxy-py/docs/Makefile | 0
.../docs/_build/html/.buildinfo | 0
.../_build/html/_modules/browsermobproxy.html | 0
.../docs/_build/html/_modules/index.html | 0
.../docs/_build/html/_sources/client.txt | 0
.../docs/_build/html/_sources/index.txt | 0
.../docs/_build/html/_sources/server.txt | 0
.../docs/_build/html/_static/basic.css | 0
.../docs/_build/html/_static/default.css | 0
.../docs/_build/html/_static/doctools.js | 0
.../docs/_build/html/_static/jquery.js | 0
.../docs/_build/html/_static/pygments.css | 0
.../docs/_build/html/_static/searchtools.js | 0
.../docs/_build/html/_static/sidebar.js | 0
.../docs/_build/html/_static/underscore.js | 0
.../docs/_build/html/_static/websupport.js | 0
.../docs/_build/html/client.html | 0
.../docs/_build/html/genindex.html | 0
.../docs/_build/html/index.html | 0
.../docs/_build/html/objects.inv | 0
.../docs/_build/html/py-modindex.html | 0
.../docs/_build/html/search.html | 0
.../docs/_build/html/searchindex.js | 0
.../docs/_build/html/server.html | 0
.../browsermob-proxy-py/docs/client.rst | 0
.../mixins/browsermob-proxy-py/docs/conf.py | 0
.../mixins/browsermob-proxy-py/docs/index.rst | 0
.../mixins/browsermob-proxy-py/docs/make.bat | 0
.../browsermob-proxy-py/docs/server.rst | 0
.../mixins/browsermob-proxy-py/readme.md | 0
.../mixins/browsermob-proxy-py/setup.py | 0
.../browsermob-proxy-py/test/test_client.py | 0
.../browsermob-proxy-py/test/test_remote.py | 0
.../test/test_webdriver.py | 0
.../marionette/runner/mixins/browsermob.py | 0
.../marionette/runner/mixins/endurance.py | 0
.../marionette/runner/mixins/reporting.py | 0
.../mixins/resources/htmlreport/jquery.js | 0
.../mixins/resources/htmlreport/main.js | 0
.../mixins/resources/htmlreport/style.css | 0
.../marionette/runner/mixins/xmlgen.py | 0
.../marionette/runtests.py | 0
.../marionette/tests/print-manifest-dirs.py | 0
.../marionette/tests/unit-tests.ini | 0
.../tests/unit/importanotherscript.js | 0
.../marionette/tests/unit/importscript.js | 0
.../tests/unit/mn-restartless-unsigned.xpi | Bin
.../tests/unit/single_finger_functions.py | 0
.../marionette/tests/unit/test_about_pages.py | 0
.../tests/unit/test_accessibility.py | 0
.../marionette/tests/unit/test_addons.py | 0
.../tests/unit/test_anonymous_content.py | 0
.../tests/unit/test_browsermobproxy.py | 0
.../tests/unit/test_capabilities.py | 0
.../marionette/tests/unit/test_chrome.py | 35 +
.../tests/unit/test_chrome_async_finish.js | 0
.../tests/unit/test_chrome_element_css.py | 0
.../marionette/tests/unit/test_clearing.py | 0
.../marionette/tests/unit/test_click.py | 0
.../tests/unit/test_click_chrome.py | 0
.../tests/unit/test_click_scrolling.py | 0
.../marionette/tests/unit/test_cookies.py | 0
.../marionette/tests/unit/test_data_driven.py | 0
.../tests/unit/test_date_time_value.py | 0
.../tests/unit/test_elementState.py | 0
.../tests/unit/test_elementState_chrome.py | 0
.../tests/unit/test_element_touch.py | 0
.../marionette/tests/unit/test_elementsize.py | 0
.../marionette/tests/unit/test_emulator.py | 0
.../marionette/tests/unit/test_errors.py | 0
.../tests/unit/test_execute_async_script.py | 0
.../tests/unit/test_execute_isolate.py | 0
.../tests/unit/test_execute_sandboxes.py | 0
.../tests/unit/test_execute_script.py | 0
.../marionette/tests/unit/test_expected.py | 0
.../tests/unit/test_expectedfail.py | 0
.../marionette/tests/unit/test_file_upload.py | 0
.../marionette/tests/unit/test_findelement.py | 18 +
.../tests/unit/test_findelement_chrome.py | 0
.../marionette/tests/unit/test_gesture.py | 0
.../tests/unit/test_getactiveframe_oop.py | 0
.../marionette/tests/unit/test_getattr.py | 0
.../tests/unit/test_getattr_chrome.py | 0
.../tests/unit/test_implicit_waits.py | 0
.../tests/unit/test_import_script.py | 0
.../unit/test_import_script_reuse_window.py | 0
.../marionette/tests/unit/test_key_actions.py | 0
.../marionette/tests/unit/test_log.py | 0
.../marionette/tests/unit/test_marionette.py | 0
.../tests/unit/test_modal_dialogs.py | 0
.../tests/unit/test_mouse_action.py | 12 +-
.../tests/unit/test_multi_finger.py | 0
.../marionette/tests/unit/test_navigation.py | 0
.../marionette/tests/unit/test_pagesource.py | 0
.../marionette/tests/unit/test_position.py | 0
.../tests/unit/test_profile_management.py | 0
.../marionette/tests/unit/test_proxy.py | 0
.../tests/unit/test_rendered_element.py | 0
.../marionette/tests/unit/test_report.py | 0
.../marionette/tests/unit/test_run_js_test.py | 0
.../tests/unit/test_screen_orientation.py | 0
.../marionette/tests/unit/test_screenshot.py | 0
.../marionette/tests/unit/test_selected.py | 0
.../tests/unit/test_selected_chrome.py | 0
.../marionette/tests/unit/test_session.py | 0
.../tests/unit/test_set_window_size.py | 0
.../marionette/tests/unit/test_shadow_dom.py | 0
.../tests/unit/test_simpletest_chrome.js | 0
.../tests/unit/test_simpletest_fail.js | 0
.../tests/unit/test_simpletest_pass.js | 0
.../tests/unit/test_simpletest_sanity.py | 0
.../tests/unit/test_simpletest_timeout.js | 0
.../tests/unit/test_single_finger.py | 0
.../tests/unit/test_single_finger_desktop.py | 0
.../marionette/tests/unit/test_skip_setup.py | 0
.../tests/unit/test_switch_frame.py | 0
.../tests/unit/test_switch_frame_chrome.py | 0
.../tests/unit/test_switch_remote_frame.py | 0
.../unit/test_teardown_context_preserved.py | 0
.../marionette/tests/unit/test_text.py | 0
.../marionette/tests/unit/test_text_chrome.py | 0
.../marionette/tests/unit/test_timeouts.py | 0
.../marionette/tests/unit/test_transport.py | 0
.../marionette/tests/unit/test_typing.py | 0
.../tests/unit/test_using_permissions.py | 0
.../marionette/tests/unit/test_using_prefs.py | 0
.../marionette/tests/unit/test_visibility.py | 0
.../marionette/tests/unit/test_wait.py | 0
.../tests/unit/test_window_handles.py | 0
.../tests/unit/test_window_management.py | 0
.../tests/unit/test_window_position.py | 0
.../tests/unit/test_window_switching.py | 0
.../tests/unit/test_window_title.py | 0
.../marionette/tests/unit/test_window_type.py | 0
.../tests/unit/test_with_using_context.py | 0
.../marionette/tests/unit/unit-tests.ini | 5 +
.../marionette/tests/update-tests.ini | 0
.../marionette/tests/webapi-tests.ini | 0
.../marionette/venv_b2g_update_test.sh | 0
.../marionette/www/bug814037.html | 0
.../www/click_out_of_bounds_overflow.html | 0
.../marionette/www/clicks.html | 0
.../marionette/www/cssTransform.html | 0
.../marionette/www/cssTransform2.html | 0
.../marionette/www/datetimePage.html | 0
.../marionette/www/deletingFrame.html | 0
.../harness/marionette/www/double_click.html | 18 +
.../marionette/www/element_bottom.html | 0
.../marionette/www/element_left.html | 0
.../www/element_outside_viewport.html | 0
.../marionette/www/element_right.html | 0
.../marionette/www/element_top.html | 0
.../marionette/www/empty.html | 0
.../marionette/www/formPage.html | 0
.../marionette/www/frameset.html | 0
.../marionette/www/framesetPage2.html | 0
.../marionette/www/hidden.html | 0
.../marionette/www/html5/blue.jpg | Bin
.../www/html5/boolean_attributes.html | 0
.../marionette/www/html5/geolocation.js | 0
.../marionette/www/html5/green.jpg | Bin
.../marionette/www/html5/offline.html | 0
.../marionette/www/html5/red.jpg | Bin
.../marionette/www/html5/status.html | 0
.../marionette/www/html5/test.appcache | 0
.../www/html5/test_html_inputs.html | 0
.../marionette/www/html5/yellow.jpg | Bin
.../marionette/www/html5Page.html | 0
.../marionette/www/javascriptPage.html | 0
.../marionette/www/macbeth.html | 0
.../marionette/www/modal_dialogs.html | 0
.../marionette/www/nestedElements.html | 9 +
.../marionette/www/rectangles.html | 0
.../marionette/www/resultPage.html | 0
.../marionette/www/scroll.html | 0
.../marionette/www/scroll2.html | 0
.../marionette/www/scroll3.html | 0
.../marionette/www/scroll4.html | 0
.../marionette/www/scroll5.html | 0
.../marionette/www/shim.js | 0
.../marionette/www/test.html | 0
.../marionette/www/testAction.html | 0
.../marionette/www/testPageSource.html | 0
.../marionette/www/testPageSource.xml | 0
.../www/testPageSourceWithUnicodeChars.html | 0
.../marionette/www/testSize.html | 0
.../marionette/www/test_accessibility.html | 0
.../marionette/www/test_carets_columns.html | 31 +
.../marionette/www/test_carets_cursor.html | 31 +
.../www/test_carets_display_none.html | 0
.../marionette/www/test_carets_iframe.html | 20 +
.../marionette/www/test_carets_longtext.html | 9 +
.../www/test_carets_multipleline.html} | 10 +-
.../www/test_carets_multiplerange.html} | 0
.../marionette/www/test_carets_selection.html | 38 +
.../marionette/www/test_clearing.html | 0
.../marionette/www/test_dynamic.html | 0
.../marionette/www/test_iframe.html | 0
.../marionette/www/test_inner_iframe.html | 0
.../marionette/www/test_nested_iframe.html | 0
.../marionette/www/test_oop_1.html | 0
.../marionette/www/test_oop_2.html | 0
.../marionette/www/test_shadow_dom.html | 0
.../marionette/www/test_windows.html | 0
.../marionette/www/windowHandles.html | 0
.../marionette/www/xhtmlTest.html | 0
testing/marionette/harness/requirements.txt | 14 +
.../marionette/{driver => harness}/setup.py | 25 +-
testing/marionette/jar.mn | 8 +-
testing/marionette/mach_commands.py | 2 +-
testing/marionette/moz.build | 13 +-
testing/marionette/test_element.js | 44 +
testing/marionette/test_error.js | 337 +++
testing/marionette/test_message.js | 204 ++
testing/marionette/unit.ini | 12 +
.../configs/b2g/desktop_automation_config.py | 78 -
.../configs/b2g/emulator_automation_config.py | 2 +
.../configs/b2g/gaia_integration_config.py | 40 -
.../b2g/gaia_unit_production_config.py | 45 -
.../mozharness/configs/b2g/generic_config.py | 25 -
.../mozharness/configs/b2g/mulet_config.py | 26 -
.../b2g/taskcluster_emulator_automation.py | 195 ++
.../b2g/taskcluster_gaia_integration.py | 28 +
.../b2g/taskcluster_gaia_unit_production.py | 32 +
.../b2g/taskcluster_mulet_automation.py | 45 +
.../marionette/automation_emulator_config.py | 2 +
.../mozharness/mozilla/testing/unittest.py | 22 +-
.../scripts/b2g_emulator_unittest.py | 38 +-
testing/mozharness/scripts/marionette.py | 4 +-
.../tasks/tests/b2g_build_test.yml | 10 +-
.../tasks/tests/b2g_build_unit.yml | 10 +-
.../tasks/tests/b2g_emulator_cpp_unit.yml | 9 +-
.../tasks/tests/b2g_emulator_crashtest.yml | 9 +-
.../tasks/tests/b2g_emulator_js_reftest.yml | 9 +-
.../tasks/tests/b2g_emulator_marionette.yml | 14 +-
.../tests/b2g_emulator_marionette_webapi.yml | 13 +-
.../tasks/tests/b2g_emulator_mochitest.yml | 10 +-
.../tests/b2g_emulator_mochitest_media.yml | 10 +-
.../tasks/tests/b2g_emulator_reftest.yml | 9 +-
.../tasks/tests/b2g_emulator_xpcshell.yml | 4 +-
.../tests/b2g_emulator_xpcshell_chunked.yml | 9 +-
.../tests/b2g_gaia_js_integration_tests.yml | 13 +-
.../tests/b2g_gaia_ui_test_accessibility.yml | 9 +-
.../tests/b2g_gaia_ui_test_functional.yml | 10 +-
.../tasks/tests/b2g_gaia_ui_test_unit.yml | 9 +-
.../taskcluster/tasks/tests/b2g_gaia_unit.yml | 8 +-
.../tasks/tests/b2g_gaia_unit_oop.yml | 8 +-
.../taskcluster/tasks/tests/b2g_gip_oop.yml | 2 +-
.../taskcluster/tasks/tests/b2g_linter.yml | 10 +-
.../taskcluster/tasks/tests/b2g_mochitest.yml | 2 +-
.../tasks/tests/b2g_mochitest_oop.yml | 2 +-
.../taskcluster/tasks/tests/b2g_reftests.yml | 2 +-
.../tasks/tests/b2g_reftests_sanity_oop.yml | 2 +-
.../tasks/tests/b2g_unittest_base.yml | 23 +
.../flame_kk_gaia_ui_test_functional.yml | 11 +-
.../flame_kk_gaia_ui_test_functional_dsds.yml | 11 +-
.../tests/flame_kk_gaia_ui_test_sanity.yml | 11 +-
.../tests/flame_kk_gaia_ui_test_unit.yml | 11 +-
.../tasks/tests/fx_linux64_mochitest_bc.yml | 26 +
.../tasks/tests/fx_linux64_mochitest_dt.yml | 25 +
.../tasks/tests/fx_linux64_mochitest_gl.yml | 22 +
.../tests/fx_linux64_mochitest_plain.yml | 25 +
.../tasks/tests/fx_linux64_reftest.yml | 17 +
.../tasks/tests/fx_linux64_xpcshell.yml | 17 +
.../tasks/tests/fx_unittest_base.yml | 34 +
.../tasks/tests/mulet_build_test.yml | 35 +
.../tasks/tests/mulet_build_unit.yml | 34 +
.../tests/mulet_gaia_js_integration_tests.yml | 8 +-
.../tasks/tests/mulet_gaia_unit.yml | 39 +
.../tasks/tests/mulet_gaia_unit_oop.yml | 39 +
.../taskcluster/tasks/tests/mulet_linter.yml | 34 +
.../tasks/tests/mulet_mochitests.yml | 6 +-
.../tasks/tests/mulet_reftests.yml | 11 +-
testing/testsuite-targets.mk | 15 +-
.../animation-effect-timing/duration.html.ini | 14 -
.../web-animations/animatable/animate.html | 1 -
.../animation-effect-timing/duration.html | 125 +-
.../keyframe-effect/constructor.html | 55 +-
.../keyframe-effect/getComputedTiming.html | 29 +-
toolkit/components/telemetry/Histograms.json | 8 +
toolkit/content/tests/browser/browser.ini | 9 +-
.../browser/browser_input_file_tooltips.js | 121 +-
.../tests/browser/browser_saveImageURL.js | 64 +
toolkit/content/tests/browser/head.js | 11 +
toolkit/content/tests/browser/image.jpg | Bin 0 -> 24204 bytes
toolkit/content/tests/browser/image_page.html | 9 +
toolkit/content/widgets/popup.xml | 5 +-
widget/nsBaseFilePicker.cpp | 75 +-
widget/nsFilePickerProxy.cpp | 66 +-
widget/nsFilePickerProxy.h | 11 +-
566 files changed, 7128 insertions(+), 5646 deletions(-)
create mode 100644 browser/base/content/test/general/title_test.svg
create mode 100644 dom/base/test/file_bug1250148.sjs
create mode 100644 dom/base/test/test_bug1250148.html
create mode 100644 dom/base/test/test_bug769117.html
delete mode 100644 dom/devicestorage/ipc/ipc.json
delete mode 100644 dom/devicestorage/ipc/mochitest.ini
delete mode 100644 dom/devicestorage/ipc/test_ipc.html
create mode 100644 dom/devicestorage/test/remove_testing_directory.js
create mode 100644 dom/filesystem/tests/mochitest.ini
create mode 100644 dom/filesystem/tests/moz.build
create mode 100644 dom/filesystem/tests/script_fileList.js
create mode 100644 dom/filesystem/tests/test_basic.html
create mode 100644 ipc/chromium/src/base/atomicops_internals_arm64_gcc.h
create mode 100644 ipc/chromium/src/base/atomicops_internals_ppc_gcc.h
create mode 100644 js/src/tests/ecma_7/Object/defineGetter-defineSetter.js
create mode 100644 layout/reftests/forms/fieldset/fieldset-flexbox-001-ref.html
delete mode 100644 layout/reftests/position-sticky/pref-1-disabled-ref.html
delete mode 100644 layout/reftests/position-sticky/pref-1-enabled-ref.html
delete mode 100644 layout/reftests/position-sticky/pref-1.html
delete mode 100644 layout/style/test/file_position_sticky.html
delete mode 100644 testing/marionette/client/marionette/www/test_selectioncarets.html
delete mode 100644 testing/marionette/client/marionette/www/test_touchcaret.html
rename testing/marionette/{driver => client}/marionette_driver/__init__.py (100%)
rename testing/marionette/{driver => client}/marionette_driver/addons.py (100%)
rename testing/marionette/{driver => client}/marionette_driver/by.py (100%)
rename testing/marionette/{driver => client}/marionette_driver/date_time_value.py (100%)
rename testing/marionette/{driver => client}/marionette_driver/decorators.py (100%)
rename testing/marionette/{driver => client}/marionette_driver/errors.py (100%)
rename testing/marionette/{driver => client}/marionette_driver/expected.py (100%)
rename testing/marionette/{driver => client}/marionette_driver/geckoinstance.py (100%)
rename testing/marionette/{driver => client}/marionette_driver/gestures.py (100%)
rename testing/marionette/{driver => client}/marionette_driver/keys.py (100%)
rename testing/marionette/{driver => client}/marionette_driver/selection.py (79%)
rename testing/marionette/{driver => client}/marionette_driver/transport.py (100%)
rename testing/marionette/{driver => client}/marionette_driver/wait.py (100%)
delete mode 100644 testing/marionette/driver/MANIFEST.in
delete mode 100644 testing/marionette/driver/marionette_driver/marionette.py
delete mode 100644 testing/marionette/driver/requirements.txt
create mode 100644 testing/marionette/harness/MANIFEST.in
rename testing/marionette/{client => harness}/docs/Makefile (100%)
rename testing/marionette/{client => harness}/docs/advanced/actions.rst (100%)
rename testing/marionette/{client => harness}/docs/advanced/debug.rst (100%)
rename testing/marionette/{client => harness}/docs/advanced/findelement.rst (100%)
rename testing/marionette/{client => harness}/docs/advanced/landing.rst (100%)
rename testing/marionette/{client => harness}/docs/advanced/stale.rst (100%)
rename testing/marionette/{client => harness}/docs/basics.rst (100%)
rename testing/marionette/{client => harness}/docs/conf.py (100%)
rename testing/marionette/{client => harness}/docs/index.rst (100%)
rename testing/marionette/{client => harness}/docs/interactive.rst (100%)
rename testing/marionette/{client => harness}/docs/make.bat (100%)
rename testing/marionette/{client => harness}/docs/reference.rst (100%)
rename testing/marionette/{client => harness}/marionette/__init__.py (100%)
rename testing/marionette/{client => harness}/marionette/atoms/b2g_update_test.js (100%)
rename testing/marionette/{client => harness}/marionette/b2g_update_test.py (100%)
rename testing/marionette/{client => harness}/marionette/chrome/test.xul (100%)
rename testing/marionette/{client => harness}/marionette/chrome/test2.xul (100%)
rename testing/marionette/{client => harness}/marionette/chrome/test_anonymous_content.xul (100%)
rename testing/marionette/{client => harness}/marionette/chrome/test_nested_iframe.xul (100%)
rename testing/marionette/{client => harness}/marionette/marionette_test.py (100%)
rename testing/marionette/{client => harness}/marionette/runner/__init__.py (100%)
rename testing/marionette/{client => harness}/marionette/runner/base.py (100%)
rename testing/marionette/{client => harness}/marionette/runner/httpd.py (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/__init__.py (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/b2g.py (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/History.md (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/browsermobproxy/__init__.py (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/browsermobproxy/client.py (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/browsermobproxy/server.py (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/browsermobproxy/webdriver_event_listener.py (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/Makefile (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/.buildinfo (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_modules/browsermobproxy.html (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_modules/index.html (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_sources/client.txt (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_sources/index.txt (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_sources/server.txt (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/basic.css (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/default.css (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/doctools.js (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/jquery.js (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/pygments.css (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/searchtools.js (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/sidebar.js (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/underscore.js (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/websupport.js (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/client.html (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/genindex.html (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/index.html (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/objects.inv (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/py-modindex.html (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/search.html (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/searchindex.js (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/server.html (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/client.rst (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/conf.py (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/index.rst (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/make.bat (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/docs/server.rst (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/readme.md (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/setup.py (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/test/test_client.py (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/test/test_remote.py (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob-proxy-py/test/test_webdriver.py (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/browsermob.py (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/endurance.py (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/reporting.py (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/resources/htmlreport/jquery.js (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/resources/htmlreport/main.js (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/resources/htmlreport/style.css (100%)
rename testing/marionette/{client => harness}/marionette/runner/mixins/xmlgen.py (100%)
rename testing/marionette/{client => harness}/marionette/runtests.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/print-manifest-dirs.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit-tests.ini (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/importanotherscript.js (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/importscript.js (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/mn-restartless-unsigned.xpi (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/single_finger_functions.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_about_pages.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_accessibility.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_addons.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_anonymous_content.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_browsermobproxy.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_capabilities.py (100%)
create mode 100644 testing/marionette/harness/marionette/tests/unit/test_chrome.py
rename testing/marionette/{client => harness}/marionette/tests/unit/test_chrome_async_finish.js (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_chrome_element_css.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_clearing.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_click.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_click_chrome.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_click_scrolling.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_cookies.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_data_driven.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_date_time_value.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_elementState.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_elementState_chrome.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_element_touch.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_elementsize.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_emulator.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_errors.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_execute_async_script.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_execute_isolate.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_execute_sandboxes.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_execute_script.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_expected.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_expectedfail.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_file_upload.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_findelement.py (89%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_findelement_chrome.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_gesture.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_getactiveframe_oop.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_getattr.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_getattr_chrome.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_implicit_waits.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_import_script.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_import_script_reuse_window.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_key_actions.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_log.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_marionette.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_modal_dialogs.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_mouse_action.py (90%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_multi_finger.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_navigation.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_pagesource.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_position.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_profile_management.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_proxy.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_rendered_element.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_report.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_run_js_test.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_screen_orientation.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_screenshot.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_selected.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_selected_chrome.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_session.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_set_window_size.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_shadow_dom.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_simpletest_chrome.js (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_simpletest_fail.js (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_simpletest_pass.js (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_simpletest_sanity.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_simpletest_timeout.js (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_single_finger.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_single_finger_desktop.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_skip_setup.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_switch_frame.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_switch_frame_chrome.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_switch_remote_frame.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_teardown_context_preserved.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_text.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_text_chrome.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_timeouts.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_transport.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_typing.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_using_permissions.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_using_prefs.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_visibility.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_wait.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_window_handles.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_window_management.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_window_position.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_window_switching.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_window_title.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_window_type.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/test_with_using_context.py (100%)
rename testing/marionette/{client => harness}/marionette/tests/unit/unit-tests.ini (98%)
rename testing/marionette/{client => harness}/marionette/tests/update-tests.ini (100%)
rename testing/marionette/{client => harness}/marionette/tests/webapi-tests.ini (100%)
rename testing/marionette/{client => harness}/marionette/venv_b2g_update_test.sh (100%)
mode change 100755 => 100644
rename testing/marionette/{client => harness}/marionette/www/bug814037.html (100%)
rename testing/marionette/{client => harness}/marionette/www/click_out_of_bounds_overflow.html (100%)
rename testing/marionette/{client => harness}/marionette/www/clicks.html (100%)
rename testing/marionette/{client => harness}/marionette/www/cssTransform.html (100%)
rename testing/marionette/{client => harness}/marionette/www/cssTransform2.html (100%)
rename testing/marionette/{client => harness}/marionette/www/datetimePage.html (100%)
rename testing/marionette/{client => harness}/marionette/www/deletingFrame.html (100%)
create mode 100644 testing/marionette/harness/marionette/www/double_click.html
rename testing/marionette/{client => harness}/marionette/www/element_bottom.html (100%)
rename testing/marionette/{client => harness}/marionette/www/element_left.html (100%)
rename testing/marionette/{client => harness}/marionette/www/element_outside_viewport.html (100%)
rename testing/marionette/{client => harness}/marionette/www/element_right.html (100%)
rename testing/marionette/{client => harness}/marionette/www/element_top.html (100%)
rename testing/marionette/{client => harness}/marionette/www/empty.html (100%)
rename testing/marionette/{client => harness}/marionette/www/formPage.html (100%)
rename testing/marionette/{client => harness}/marionette/www/frameset.html (100%)
rename testing/marionette/{client => harness}/marionette/www/framesetPage2.html (100%)
rename testing/marionette/{client => harness}/marionette/www/hidden.html (100%)
rename testing/marionette/{client => harness}/marionette/www/html5/blue.jpg (100%)
rename testing/marionette/{client => harness}/marionette/www/html5/boolean_attributes.html (100%)
rename testing/marionette/{client => harness}/marionette/www/html5/geolocation.js (100%)
rename testing/marionette/{client => harness}/marionette/www/html5/green.jpg (100%)
rename testing/marionette/{client => harness}/marionette/www/html5/offline.html (100%)
rename testing/marionette/{client => harness}/marionette/www/html5/red.jpg (100%)
rename testing/marionette/{client => harness}/marionette/www/html5/status.html (100%)
rename testing/marionette/{client => harness}/marionette/www/html5/test.appcache (100%)
rename testing/marionette/{client => harness}/marionette/www/html5/test_html_inputs.html (100%)
rename testing/marionette/{client => harness}/marionette/www/html5/yellow.jpg (100%)
rename testing/marionette/{client => harness}/marionette/www/html5Page.html (100%)
rename testing/marionette/{client => harness}/marionette/www/javascriptPage.html (100%)
rename testing/marionette/{client => harness}/marionette/www/macbeth.html (100%)
rename testing/marionette/{client => harness}/marionette/www/modal_dialogs.html (100%)
create mode 100644 testing/marionette/harness/marionette/www/nestedElements.html
rename testing/marionette/{client => harness}/marionette/www/rectangles.html (100%)
rename testing/marionette/{client => harness}/marionette/www/resultPage.html (100%)
rename testing/marionette/{client => harness}/marionette/www/scroll.html (100%)
rename testing/marionette/{client => harness}/marionette/www/scroll2.html (100%)
rename testing/marionette/{client => harness}/marionette/www/scroll3.html (100%)
rename testing/marionette/{client => harness}/marionette/www/scroll4.html (100%)
rename testing/marionette/{client => harness}/marionette/www/scroll5.html (100%)
rename testing/marionette/{client => harness}/marionette/www/shim.js (100%)
rename testing/marionette/{client => harness}/marionette/www/test.html (100%)
rename testing/marionette/{client => harness}/marionette/www/testAction.html (100%)
rename testing/marionette/{client => harness}/marionette/www/testPageSource.html (100%)
rename testing/marionette/{client => harness}/marionette/www/testPageSource.xml (100%)
rename testing/marionette/{client => harness}/marionette/www/testPageSourceWithUnicodeChars.html (100%)
rename testing/marionette/{client => harness}/marionette/www/testSize.html (100%)
rename testing/marionette/{client => harness}/marionette/www/test_accessibility.html (100%)
create mode 100644 testing/marionette/harness/marionette/www/test_carets_columns.html
create mode 100644 testing/marionette/harness/marionette/www/test_carets_cursor.html
rename testing/marionette/{client => harness}/marionette/www/test_carets_display_none.html (100%)
create mode 100644 testing/marionette/harness/marionette/www/test_carets_iframe.html
create mode 100644 testing/marionette/harness/marionette/www/test_carets_longtext.html
rename testing/marionette/{client/marionette/www/test_selectioncarets_multipleline.html => harness/marionette/www/test_carets_multipleline.html} (76%)
rename testing/marionette/{client/marionette/www/test_selectioncarets_multiplerange.html => harness/marionette/www/test_carets_multiplerange.html} (100%)
create mode 100644 testing/marionette/harness/marionette/www/test_carets_selection.html
rename testing/marionette/{client => harness}/marionette/www/test_clearing.html (100%)
rename testing/marionette/{client => harness}/marionette/www/test_dynamic.html (100%)
rename testing/marionette/{client => harness}/marionette/www/test_iframe.html (100%)
rename testing/marionette/{client => harness}/marionette/www/test_inner_iframe.html (100%)
rename testing/marionette/{client => harness}/marionette/www/test_nested_iframe.html (100%)
rename testing/marionette/{client => harness}/marionette/www/test_oop_1.html (100%)
rename testing/marionette/{client => harness}/marionette/www/test_oop_2.html (100%)
rename testing/marionette/{client => harness}/marionette/www/test_shadow_dom.html (100%)
rename testing/marionette/{client => harness}/marionette/www/test_windows.html (100%)
rename testing/marionette/{client => harness}/marionette/www/windowHandles.html (100%)
rename testing/marionette/{client => harness}/marionette/www/xhtmlTest.html (100%)
create mode 100644 testing/marionette/harness/requirements.txt
rename testing/marionette/{driver => harness}/setup.py (54%)
create mode 100644 testing/marionette/test_element.js
create mode 100644 testing/marionette/test_error.js
create mode 100644 testing/marionette/test_message.js
create mode 100644 testing/marionette/unit.ini
delete mode 100644 testing/mozharness/configs/b2g/desktop_automation_config.py
delete mode 100644 testing/mozharness/configs/b2g/gaia_integration_config.py
delete mode 100644 testing/mozharness/configs/b2g/gaia_unit_production_config.py
delete mode 100644 testing/mozharness/configs/b2g/generic_config.py
delete mode 100644 testing/mozharness/configs/b2g/mulet_config.py
create mode 100644 testing/mozharness/configs/b2g/taskcluster_emulator_automation.py
create mode 100644 testing/mozharness/configs/b2g/taskcluster_gaia_integration.py
create mode 100644 testing/mozharness/configs/b2g/taskcluster_gaia_unit_production.py
create mode 100644 testing/mozharness/configs/b2g/taskcluster_mulet_automation.py
create mode 100644 testing/taskcluster/tasks/tests/b2g_unittest_base.yml
create mode 100644 testing/taskcluster/tasks/tests/fx_linux64_mochitest_bc.yml
create mode 100644 testing/taskcluster/tasks/tests/fx_linux64_mochitest_dt.yml
create mode 100644 testing/taskcluster/tasks/tests/fx_linux64_mochitest_gl.yml
create mode 100644 testing/taskcluster/tasks/tests/fx_linux64_mochitest_plain.yml
create mode 100644 testing/taskcluster/tasks/tests/fx_linux64_reftest.yml
create mode 100644 testing/taskcluster/tasks/tests/fx_linux64_xpcshell.yml
create mode 100644 testing/taskcluster/tasks/tests/fx_unittest_base.yml
create mode 100644 testing/taskcluster/tasks/tests/mulet_build_test.yml
create mode 100644 testing/taskcluster/tasks/tests/mulet_build_unit.yml
create mode 100644 testing/taskcluster/tasks/tests/mulet_gaia_unit.yml
create mode 100644 testing/taskcluster/tasks/tests/mulet_gaia_unit_oop.yml
create mode 100644 testing/taskcluster/tasks/tests/mulet_linter.yml
delete mode 100644 testing/web-platform/meta/web-animations/animation-effect-timing/duration.html.ini
create mode 100644 toolkit/content/tests/browser/browser_saveImageURL.js
create mode 100644 toolkit/content/tests/browser/image.jpg
create mode 100644 toolkit/content/tests/browser/image_page.html
diff --git a/browser/base/content/test/general/title_test.svg b/browser/base/content/test/general/title_test.svg
new file mode 100644
index 0000000000..7638fd5ccb
--- /dev/null
+++ b/browser/base/content/test/general/title_test.svg
@@ -0,0 +1,59 @@
+
diff --git a/build/mach_bootstrap.py b/build/mach_bootstrap.py
index 211d98abe2..820fe27f23 100644
--- a/build/mach_bootstrap.py
+++ b/build/mach_bootstrap.py
@@ -50,9 +50,9 @@ SEARCH_PATHS = [
'testing/firefox-ui/harness',
'testing/firefox-ui/tests',
'testing/luciddream',
+ 'testing/marionette/harness',
+ 'testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py',
'testing/marionette/client',
- 'testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py',
- 'testing/marionette/driver',
'testing/mozbase/mozcrash',
'testing/mozbase/mozdebug',
'testing/mozbase/mozdevice',
diff --git a/build/pgo/server-locations.txt b/build/pgo/server-locations.txt
index bb359d9f70..a034c02ad6 100644
--- a/build/pgo/server-locations.txt
+++ b/build/pgo/server-locations.txt
@@ -258,3 +258,6 @@ https://sha256ee.example.com:443 privileged,cer
https://ssl3.example.com:443 privileged,ssl3
https://rc4.example.com:443 privileged,rc4
https://ssl3rc4.example.com:443 privileged,ssl3,rc4
+
+# Hosts for youtube rewrite tests
+https://mochitest.youtube.com:443
diff --git a/build/virtualenv_packages.txt b/build/virtualenv_packages.txt
index 122804e652..4179884c74 100644
--- a/build/virtualenv_packages.txt
+++ b/build/virtualenv_packages.txt
@@ -1,7 +1,7 @@
-marionette_driver.pth:testing/marionette/driver
-browsermobproxy.pth:testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py
+marionette_driver.pth:testing/marionette/client
+browsermobproxy.pth:testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py
wptserve.pth:testing/web-platform/tests/tools/wptserve
-marionette.pth:testing/marionette/client
+marionette.pth:testing/marionette/harness
blessings.pth:python/blessings
configobj.pth:python/configobj
jsmin.pth:python/jsmin
diff --git a/configure.in b/configure.in
index e5138eb512..4ae68a00bb 100644
--- a/configure.in
+++ b/configure.in
@@ -8839,6 +8839,16 @@ fi
MOZ_CONFIG_ICU()
+dnl ========================================================
+dnl mask as short hand property
+dnl ========================================================
+dnl Uncommenting the next line would enable mask-as-shorthand feature.
+dnl MOZ_ENABLE_MASK_AS_SHORTHAND=1
+if test "$MOZ_ENABLE_MASK_AS_SHORTHAND"; then
+ AC_DEFINE(MOZ_ENABLE_MASK_AS_SHORTHAND)
+fi
+AC_SUBST(MOZ_ENABLE_MASK_AS_SHORTHAND)
+
if test -z "$JS_SHARED_LIBRARY"; then
AC_DEFINE(MOZ_STATIC_JS)
fi
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
index dcf2ed229d..aae0044498 100644
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -5783,10 +5783,14 @@ nsDocShell::SetPosition(int32_t aX, int32_t aY)
NS_IMETHODIMP
nsDocShell::SetPositionDesktopPix(int32_t aX, int32_t aY)
{
- // Added to nsIBaseWindow in bug 1247335;
- // implement if a use-case is found.
- NS_ASSERTION(false, "implement me!");
- return NS_ERROR_NOT_IMPLEMENTED;
+ nsCOMPtr ownerWindow(do_QueryInterface(mTreeOwner));
+ if (ownerWindow) {
+ return ownerWindow->SetPositionDesktopPix(aX, aY);
+ }
+
+ double scale = 1.0;
+ GetDevicePixelsPerDesktopPixel(&scale);
+ return SetPosition(NSToIntRound(aX * scale), NSToIntRound(aY * scale));
}
NS_IMETHODIMP
diff --git a/dom/animation/AnimationEffectTiming.cpp b/dom/animation/AnimationEffectTiming.cpp
index 6fe676af43..07bb66a101 100644
--- a/dom/animation/AnimationEffectTiming.cpp
+++ b/dom/animation/AnimationEffectTiming.cpp
@@ -8,6 +8,7 @@
#include "mozilla/dom/AnimatableBinding.h"
#include "mozilla/dom/AnimationEffectTimingBinding.h"
+#include "mozilla/TimingParams.h"
namespace mozilla {
namespace dom {
@@ -39,26 +40,20 @@ AnimationEffectTiming::SetEndDelay(double aEndDelay)
}
void
-AnimationEffectTiming::SetDuration(const UnrestrictedDoubleOrString& aDuration)
+AnimationEffectTiming::SetDuration(const UnrestrictedDoubleOrString& aDuration,
+ ErrorResult& aRv)
{
- if (mTiming.mDuration.IsUnrestrictedDouble() &&
- aDuration.IsUnrestrictedDouble() &&
- mTiming.mDuration.GetAsUnrestrictedDouble() ==
- aDuration.GetAsUnrestrictedDouble()) {
+ Maybe newDuration =
+ TimingParams::ParseDuration(aDuration, aRv);
+ if (aRv.Failed()) {
return;
}
- if (mTiming.mDuration.IsString() && aDuration.IsString() &&
- mTiming.mDuration.GetAsString() == aDuration.GetAsString()) {
+ if (mTiming.mDuration == newDuration) {
return;
}
- if (aDuration.IsUnrestrictedDouble()) {
- mTiming.mDuration.SetAsUnrestrictedDouble() =
- aDuration.GetAsUnrestrictedDouble();
- } else {
- mTiming.mDuration.SetAsString() = aDuration.GetAsString();
- }
+ mTiming.mDuration = newDuration;
NotifyTimingUpdate();
}
diff --git a/dom/animation/AnimationEffectTiming.h b/dom/animation/AnimationEffectTiming.h
index 1f3afae6dc..b98b28bbdc 100644
--- a/dom/animation/AnimationEffectTiming.h
+++ b/dom/animation/AnimationEffectTiming.h
@@ -25,7 +25,8 @@ public:
void Unlink() override { mEffect = nullptr; }
void SetEndDelay(double aEndDelay);
- void SetDuration(const UnrestrictedDoubleOrString& aDuration);
+ void SetDuration(const UnrestrictedDoubleOrString& aDuration,
+ ErrorResult& aRv);
private:
void NotifyTimingUpdate();
diff --git a/dom/animation/AnimationEffectTimingReadOnly.cpp b/dom/animation/AnimationEffectTimingReadOnly.cpp
index 1d61c6dbfc..52c7179830 100644
--- a/dom/animation/AnimationEffectTimingReadOnly.cpp
+++ b/dom/animation/AnimationEffectTimingReadOnly.cpp
@@ -26,6 +26,17 @@ AnimationEffectTimingReadOnly::WrapObject(JSContext* aCx, JS::Handle
return AnimationEffectTimingReadOnlyBinding::Wrap(aCx, this, aGivenProto);
}
+void
+AnimationEffectTimingReadOnly::GetDuration(
+ OwningUnrestrictedDoubleOrString& aRetVal) const
+{
+ if (mTiming.mDuration) {
+ aRetVal.SetAsUnrestrictedDouble() = mTiming.mDuration->ToMilliseconds();
+ } else {
+ aRetVal.SetAsString().AssignLiteral("auto");
+ }
+}
+
void
AnimationEffectTimingReadOnly::GetEasing(nsString& aRetVal) const
{
diff --git a/dom/animation/AnimationEffectTimingReadOnly.h b/dom/animation/AnimationEffectTimingReadOnly.h
index 2715530493..6c570342b1 100644
--- a/dom/animation/AnimationEffectTimingReadOnly.h
+++ b/dom/animation/AnimationEffectTimingReadOnly.h
@@ -41,10 +41,7 @@ public:
FillMode Fill() const { return mTiming.mFill; }
double IterationStart() const { return mTiming.mIterationStart; }
double Iterations() const { return mTiming.mIterations; }
- void GetDuration(OwningUnrestrictedDoubleOrString& aRetVal) const
- {
- aRetVal = mTiming.mDuration;
- }
+ void GetDuration(OwningUnrestrictedDoubleOrString& aRetVal) const;
PlaybackDirection Direction() const { return mTiming.mDirection; }
void GetEasing(nsString& aRetVal) const;
diff --git a/dom/animation/KeyframeEffect.cpp b/dom/animation/KeyframeEffect.cpp
index bf73d13dcb..5c0c9a2f51 100644
--- a/dom/animation/KeyframeEffect.cpp
+++ b/dom/animation/KeyframeEffect.cpp
@@ -238,12 +238,12 @@ KeyframeEffectReadOnly::GetComputedTimingAt(
// Always return the same object to benefit from return-value optimization.
ComputedTiming result;
- if (aTiming.mDuration.IsUnrestrictedDouble()) {
- double durationMs = aTiming.mDuration.GetAsUnrestrictedDouble();
- if (!IsNaN(durationMs) && durationMs >= 0.0f) {
- result.mDuration = StickyTimeDuration::FromMilliseconds(durationMs);
- }
+ if (aTiming.mDuration) {
+ MOZ_ASSERT(aTiming.mDuration.ref() >= zeroDuration,
+ "Iteration duration should be positive");
+ result.mDuration = aTiming.mDuration.ref();
}
+
result.mIterations = IsNaN(aTiming.mIterations) || aTiming.mIterations < 0.0f ?
1.0f :
aTiming.mIterations;
diff --git a/dom/animation/KeyframeEffect.h b/dom/animation/KeyframeEffect.h
index f66460de3c..7f44bf1c18 100644
--- a/dom/animation/KeyframeEffect.h
+++ b/dom/animation/KeyframeEffect.h
@@ -204,9 +204,13 @@ public:
const UnrestrictedDoubleOrKeyframeEffectOptions& aOptions,
ErrorResult& aRv)
{
+ TimingParams timingParams =
+ TimingParams::FromOptionsUnion(aOptions, aTarget, aRv);
+ if (aRv.Failed()) {
+ return nullptr;
+ }
return ConstructKeyframeEffect(
- aGlobal, aTarget, aFrames,
- TimingParams::FromOptionsUnion(aOptions, aTarget), aRv);
+ aGlobal, aTarget, aFrames, timingParams, aRv);
}
void GetTarget(Nullable& aRv) const;
@@ -431,9 +435,13 @@ public:
const UnrestrictedDoubleOrKeyframeEffectOptions& aOptions,
ErrorResult& aRv)
{
+ TimingParams timingParams =
+ TimingParams::FromOptionsUnion(aOptions, aTarget, aRv);
+ if (aRv.Failed()) {
+ return nullptr;
+ }
return ConstructKeyframeEffect(
- aGlobal, aTarget, aFrames,
- TimingParams::FromOptionsUnion(aOptions, aTarget), aRv);
+ aGlobal, aTarget, aFrames, timingParams, aRv);
}
// More generalized version for Animatable.animate.
diff --git a/dom/animation/TimingParams.cpp b/dom/animation/TimingParams.cpp
index dbb1df9f9d..702d14a629 100644
--- a/dom/animation/TimingParams.cpp
+++ b/dom/animation/TimingParams.cpp
@@ -8,24 +8,6 @@
namespace mozilla {
-TimingParams::TimingParams(const dom::AnimationEffectTimingProperties& aRhs,
- const dom::Element* aTarget)
- : mDuration(aRhs.mDuration)
- , mDelay(TimeDuration::FromMilliseconds(aRhs.mDelay))
- , mEndDelay(TimeDuration::FromMilliseconds(aRhs.mEndDelay))
- , mIterations(aRhs.mIterations)
- , mIterationStart(aRhs.mIterationStart)
- , mDirection(aRhs.mDirection)
- , mFill(aRhs.mFill)
-{
- mFunction = AnimationUtils::ParseEasing(aTarget, aRhs.mEasing);
-}
-
-TimingParams::TimingParams(double aDuration)
-{
- mDuration.SetAsUnrestrictedDouble() = aDuration;
-}
-
template
static const dom::AnimationEffectTimingProperties&
GetTimingProperties(const OptionsType& aOptions);
@@ -52,10 +34,18 @@ template
static TimingParams
TimingParamsFromOptionsUnion(
const OptionsType& aOptions,
- const Nullable& aTarget)
+ const Nullable& aTarget,
+ ErrorResult& aRv)
{
+ TimingParams result;
if (aOptions.IsUnrestrictedDouble()) {
- return TimingParams(aOptions.GetAsUnrestrictedDouble());
+ double durationInMs = aOptions.GetAsUnrestrictedDouble();
+ if (durationInMs >= 0) {
+ result.mDuration.emplace(
+ StickyTimeDuration::FromMilliseconds(durationInMs));
+ } else {
+ aRv.Throw(NS_ERROR_DOM_TYPE_ERR);
+ }
} else {
// If aTarget is a pseudo element, we pass its parent element because
// TimingParams only needs its owner doc to parse easing and both pseudo
@@ -72,41 +62,48 @@ TimingParamsFromOptionsUnion(
targetElement = target.GetAsCSSPseudoElement().ParentElement();
}
}
- return TimingParams(GetTimingProperties(aOptions), targetElement);
+ const dom::AnimationEffectTimingProperties& timing =
+ GetTimingProperties(aOptions);
+ Maybe duration =
+ TimingParams::ParseDuration(timing.mDuration, aRv);
+ if (aRv.Failed()) {
+ return result;
+ }
+ result.mDuration = duration;
+ result.mDelay = TimeDuration::FromMilliseconds(timing.mDelay);
+ result.mEndDelay = TimeDuration::FromMilliseconds(timing.mEndDelay);
+ result.mIterations = timing.mIterations;
+ result.mIterationStart = timing.mIterationStart;
+ result.mDirection = timing.mDirection;
+ result.mFill = timing.mFill;
+ result.mFunction =
+ AnimationUtils::ParseEasing(targetElement, timing.mEasing);
}
+ return result;
}
/* static */ TimingParams
TimingParams::FromOptionsUnion(
const dom::UnrestrictedDoubleOrKeyframeEffectOptions& aOptions,
- const Nullable& aTarget)
+ const Nullable& aTarget,
+ ErrorResult& aRv)
{
- return TimingParamsFromOptionsUnion(aOptions, aTarget);
+ return TimingParamsFromOptionsUnion(aOptions, aTarget, aRv);
}
/* static */ TimingParams
TimingParams::FromOptionsUnion(
const dom::UnrestrictedDoubleOrKeyframeAnimationOptions& aOptions,
- const Nullable& aTarget)
+ const Nullable& aTarget,
+ ErrorResult& aRv)
{
- return TimingParamsFromOptionsUnion(aOptions, aTarget);
+ return TimingParamsFromOptionsUnion(aOptions, aTarget, aRv);
}
bool
TimingParams::operator==(const TimingParams& aOther) const
{
- bool durationEqual;
- if (mDuration.IsUnrestrictedDouble()) {
- durationEqual = aOther.mDuration.IsUnrestrictedDouble() &&
- (mDuration.GetAsUnrestrictedDouble() ==
- aOther.mDuration.GetAsUnrestrictedDouble());
- } else {
- // We consider all string values and uninitialized values as meaning "auto".
- // Since mDuration is either a string or uninitialized, we consider it equal
- // if aOther.mDuration is also either a string or uninitialized.
- durationEqual = !aOther.mDuration.IsUnrestrictedDouble();
- }
- return durationEqual &&
+ return mDuration == aOther.mDuration &&
mDelay == aOther.mDelay &&
mIterations == aOther.mIterations &&
mIterationStart == aOther.mIterationStart &&
diff --git a/dom/animation/TimingParams.h b/dom/animation/TimingParams.h
index 442ebc482d..26829afcb2 100644
--- a/dom/animation/TimingParams.h
+++ b/dom/animation/TimingParams.h
@@ -33,20 +33,39 @@ class ElementOrCSSPseudoElement;
struct TimingParams
{
TimingParams() = default;
- TimingParams(const dom::AnimationEffectTimingProperties& aTimingProperties,
- const dom::Element* aTarget);
- explicit TimingParams(double aDuration);
static TimingParams FromOptionsUnion(
const dom::UnrestrictedDoubleOrKeyframeEffectOptions& aOptions,
- const Nullable& aTarget);
+ const Nullable& aTarget,
+ ErrorResult& aRv);
static TimingParams FromOptionsUnion(
const dom::UnrestrictedDoubleOrKeyframeAnimationOptions& aOptions,
- const Nullable& aTarget);
+ const Nullable& aTarget,
+ ErrorResult& aRv);
- // The unitialized state of mDuration represents "auto".
- // Bug 1237173: We will replace this with Maybe.
- dom::OwningUnrestrictedDoubleOrString mDuration;
+ // Range-checks and validates an UnrestrictedDoubleOrString or
+ // OwningUnrestrictedDoubleOrString object and converts to a
+ // StickyTimeDuration value or Nothing() if aDuration is "auto".
+ // Caller must check aRv.Failed().
+ template
+ static Maybe ParseDuration(DoubleOrString& aDuration,
+ ErrorResult& aRv) {
+ Maybe result;
+ if (aDuration.IsUnrestrictedDouble()) {
+ double durationInMs = aDuration.GetAsUnrestrictedDouble();
+ if (durationInMs >= 0) {
+ result.emplace(StickyTimeDuration::FromMilliseconds(durationInMs));
+ return result;
+ }
+ } else if (aDuration.GetAsString().EqualsLiteral("auto")) {
+ return result;
+ }
+ aRv.Throw(NS_ERROR_DOM_TYPE_ERR);
+ return result;
+ }
+
+ // mDuration.isNothing() represents the "auto" value
+ Maybe mDuration;
TimeDuration mDelay; // Initializes to zero
TimeDuration mEndDelay;
double mIterations = 1.0; // Can be NaN, negative, +/-Infinity
diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp
index 61a561fa5c..5b981c2fb3 100644
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -3425,9 +3425,14 @@ Element::Animate(const Nullable& aTarget,
}
}
+ TimingParams timingParams =
+ TimingParams::FromOptionsUnion(aOptions, aTarget, aError);
+ if (aError.Failed()) {
+ return nullptr;
+ }
+
RefPtr effect =
- KeyframeEffect::Constructor(global, aTarget, frames,
- TimingParams::FromOptionsUnion(aOptions, aTarget), aError);
+ KeyframeEffect::Constructor(global, aTarget, frames, timingParams, aError);
if (aError.Failed()) {
return nullptr;
}
diff --git a/dom/base/File.cpp b/dom/base/File.cpp
index ca07193795..724c281d2e 100644
--- a/dom/base/File.cpp
+++ b/dom/base/File.cpp
@@ -227,12 +227,6 @@ Blob::IsFile() const
return mImpl->IsFile();
}
-bool
-Blob::IsDirectory() const
-{
- return mImpl->IsDirectory();
-}
-
const nsTArray>*
Blob::GetSubBlobImpls() const
{
@@ -420,11 +414,10 @@ File::Create(nsISupports* aParent, BlobImpl* aImpl)
/* static */ already_AddRefed
File::Create(nsISupports* aParent, const nsAString& aName,
const nsAString& aContentType, uint64_t aLength,
- int64_t aLastModifiedDate, BlobDirState aDirState)
+ int64_t aLastModifiedDate)
{
RefPtr file = new File(aParent,
- new BlobImplBase(aName, aContentType, aLength, aLastModifiedDate,
- aDirState));
+ new BlobImplBase(aName, aContentType, aLength, aLastModifiedDate));
return file.forget();
}
@@ -946,17 +939,6 @@ BlobImplFile::SetPath(const nsAString& aPath)
mPath = aPath;
}
-void
-BlobImplFile::LookupAndCacheIsDirectory()
-{
- MOZ_ASSERT(mIsFile,
- "This should only be called when this object has been created "
- "from an nsIFile to note that the nsIFile is a directory");
- bool isDir;
- mFile->IsDirectory(&isDir);
- mDirState = isDir ? BlobDirState::eIsDir : BlobDirState::eIsNotDir;
-}
-
////////////////////////////////////////////////////////////////////////////
// EmptyBlobImpl implementation
diff --git a/dom/base/File.h b/dom/base/File.h
index c43439071d..a052eb8b7b 100644
--- a/dom/base/File.h
+++ b/dom/base/File.h
@@ -44,18 +44,6 @@ class BlobImpl;
class File;
class OwningArrayBufferOrArrayBufferViewOrBlobOrString;
-/**
- * Used to indicate when a Blob/BlobImpl that was created from an nsIFile
- * (when IsFile() will return true) was from an nsIFile for which
- * nsIFile::IsDirectory() returned true. This is a tri-state to enable us to
- * assert that the state is always set when callers request it.
- */
-enum BlobDirState : uint32_t {
- eIsDir,
- eIsNotDir,
- eUnknownIfDir
-};
-
class Blob : public nsIDOMBlob
, public nsIXHRSendable
, public nsIMutable
@@ -101,12 +89,6 @@ public:
bool IsFile() const;
- /**
- * This may return true if the Blob was created from an nsIFile that is a
- * directory.
- */
- bool IsDirectory() const;
-
const nsTArray>* GetSubBlobImpls() const;
// This method returns null if this Blob is not a File; it returns
@@ -114,9 +96,6 @@ public:
// otherwise it returns a new File object with the same BlobImpl.
already_AddRefed ToFile();
- // XXXjwatt Consider having a ToDirectory() method. The need for a FileSystem
- // object complicates that though.
-
// This method creates a new File object with the given name and the same
// BlobImpl.
already_AddRefed ToFile(const nsAString& aName,
@@ -194,7 +173,7 @@ public:
static already_AddRefed
Create(nsISupports* aParent, const nsAString& aName,
const nsAString& aContentType, uint64_t aLength,
- int64_t aLastModifiedDate, BlobDirState aDirState);
+ int64_t aLastModifiedDate);
// The returned File takes ownership of aMemoryBuffer. aMemoryBuffer will be
// freed by moz_free so it must be allocated by moz_malloc or something
@@ -339,28 +318,6 @@ public:
virtual bool IsFile() const = 0;
- /**
- * Called when this BlobImpl was created from an nsIFile in order to call
- * nsIFile::IsDirectory() and cache the result so that when the BlobImpl is
- * copied to another process that informaton is available.
- * nsIFile::IsDirectory() does synchronous I/O, and BlobImpl objects may be
- * created on the main thread or in a non-chrome process (where I/O is not
- * allowed). Do not call this on a non-chrome process, and preferably do not
- * call it on the main thread.
- *
- * Not all creators of BlobImplFile will call this method, in which case
- * calling IsDirectory will MOZ_ASSERT.
- */
- virtual void LookupAndCacheIsDirectory() = 0;
- virtual void SetIsDirectory(bool aIsDir) = 0;
- virtual bool IsDirectory() const = 0;
-
- /**
- * Prefer IsDirectory(). This exists to help consumer code pass on state from
- * one BlobImpl when creating another.
- */
- virtual BlobDirState GetDirState() const = 0;
-
// True if this implementation can be sent to other threads.
virtual bool MayBeClonedToOtherThreads() const
{
@@ -377,11 +334,9 @@ class BlobImplBase : public BlobImpl
{
public:
BlobImplBase(const nsAString& aName, const nsAString& aContentType,
- uint64_t aLength, int64_t aLastModifiedDate,
- BlobDirState aDirState = BlobDirState::eUnknownIfDir)
+ uint64_t aLength, int64_t aLastModifiedDate)
: mIsFile(true)
, mImmutable(false)
- , mDirState(aDirState)
, mContentType(aContentType)
, mName(aName)
, mStart(0)
@@ -397,7 +352,6 @@ public:
uint64_t aLength)
: mIsFile(true)
, mImmutable(false)
- , mDirState(BlobDirState::eUnknownIfDir)
, mContentType(aContentType)
, mName(aName)
, mStart(0)
@@ -412,7 +366,6 @@ public:
BlobImplBase(const nsAString& aContentType, uint64_t aLength)
: mIsFile(false)
, mImmutable(false)
- , mDirState(BlobDirState::eUnknownIfDir)
, mContentType(aContentType)
, mStart(0)
, mLength(aLength)
@@ -427,7 +380,6 @@ public:
uint64_t aLength)
: mIsFile(false)
, mImmutable(false)
- , mDirState(BlobDirState::eUnknownIfDir)
, mContentType(aContentType)
, mStart(aStart)
, mLength(aLength)
@@ -518,36 +470,6 @@ public:
return mIsFile;
}
- virtual void LookupAndCacheIsDirectory() override
- {
- MOZ_ASSERT(false, "Why is this being called on a non-BlobImplFile?");
- }
-
- virtual void SetIsDirectory(bool aIsDir) override
- {
- MOZ_ASSERT(mIsFile,
- "This should only be called when this object has been created "
- "from an nsIFile to note that the nsIFile is a directory");
- mDirState = aIsDir ? BlobDirState::eIsDir : BlobDirState::eIsNotDir;
- }
-
- /**
- * Returns true if the nsIFile that this object wraps is a directory.
- */
- virtual bool IsDirectory() const override
- {
- MOZ_ASSERT(mDirState != BlobDirState::eUnknownIfDir,
- "Must only be used by callers for whom the code paths are "
- "know to call LookupAndCacheIsDirectory() or "
- "SetIsDirectory()");
- return mDirState == BlobDirState::eIsDir;
- }
-
- virtual BlobDirState GetDirState() const override
- {
- return mDirState;
- }
-
virtual bool IsSizeUnknown() const override
{
return mLength == UINT64_MAX;
@@ -565,7 +487,6 @@ protected:
bool mIsFile;
bool mImmutable;
- BlobDirState mDirState;
nsString mContentType;
nsString mName;
@@ -590,8 +511,7 @@ public:
BlobImplMemory(void* aMemoryBuffer, uint64_t aLength, const nsAString& aName,
const nsAString& aContentType, int64_t aLastModifiedDate)
- : BlobImplBase(aName, aContentType, aLength, aLastModifiedDate,
- BlobDirState::eIsNotDir)
+ : BlobImplBase(aName, aContentType, aLength, aLastModifiedDate)
, mDataOwner(new DataOwner(aMemoryBuffer, aLength))
{
NS_ASSERTION(mDataOwner && mDataOwner->mData, "must have data");
@@ -792,8 +712,6 @@ public:
void SetPath(const nsAString& aFullPath);
- virtual void LookupAndCacheIsDirectory() override;
-
// We always have size and date for this kind of blob.
virtual bool IsSizeUnknown() const override { return false; }
virtual bool IsDateUnknown() const override { return false; }
diff --git a/dom/base/FileList.cpp b/dom/base/FileList.cpp
index 5b807e7dea..4018dc1e53 100644
--- a/dom/base/FileList.cpp
+++ b/dom/base/FileList.cpp
@@ -4,6 +4,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+#include "mozilla/dom/Directory.h"
#include "mozilla/dom/FileList.h"
#include "mozilla/dom/FileListBinding.h"
#include "mozilla/dom/File.h"
@@ -11,7 +12,7 @@
namespace mozilla {
namespace dom {
-NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(FileList, mFiles, mParent)
+NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(FileList, mFilesOrDirectories, mParent)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(FileList)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
@@ -28,6 +29,20 @@ FileList::WrapObject(JSContext* aCx, JS::Handle aGivenProto)
return mozilla::dom::FileListBinding::Wrap(aCx, this, aGivenProto);
}
+void
+FileList::Append(File* aFile)
+{
+ OwningFileOrDirectory* element = mFilesOrDirectories.AppendElement();
+ element->SetAsFile() = aFile;
+}
+
+void
+FileList::Append(Directory* aDirectory)
+{
+ OwningFileOrDirectory* element = mFilesOrDirectories.AppendElement();
+ element->SetAsDirectory() = aDirectory;
+}
+
NS_IMETHODIMP
FileList::GetLength(uint32_t* aLength)
{
@@ -37,12 +52,76 @@ FileList::GetLength(uint32_t* aLength)
}
NS_IMETHODIMP
-FileList::Item(uint32_t aIndex, nsISupports** aFile)
+FileList::Item(uint32_t aIndex, nsISupports** aValue)
{
- nsCOMPtr file = Item(aIndex);
- file.forget(aFile);
+ if (aIndex >= mFilesOrDirectories.Length()) {
+ return NS_ERROR_FAILURE;
+ }
+
+ if (mFilesOrDirectories[aIndex].IsFile()) {
+ nsCOMPtr file = mFilesOrDirectories[aIndex].GetAsFile();
+ file.forget(aValue);
+ return NS_OK;
+ }
+
+ MOZ_ASSERT(mFilesOrDirectories[aIndex].IsDirectory());
+ RefPtr directory = mFilesOrDirectories[aIndex].GetAsDirectory();
+ directory.forget(aValue);
return NS_OK;
}
+void
+FileList::Item(uint32_t aIndex, Nullable& aValue,
+ ErrorResult& aRv) const
+{
+ if (aIndex >= mFilesOrDirectories.Length()) {
+ aValue.SetNull();
+ return;
+ }
+
+ aValue.SetValue(mFilesOrDirectories[aIndex]);
+}
+
+void
+FileList::IndexedGetter(uint32_t aIndex, bool& aFound,
+ Nullable& aFileOrDirectory,
+ ErrorResult& aRv) const
+{
+ aFound = aIndex < mFilesOrDirectories.Length();
+ Item(aIndex, aFileOrDirectory, aRv);
+}
+
+void
+FileList::ToSequence(Sequence& aSequence,
+ ErrorResult& aRv) const
+{
+ MOZ_ASSERT(aSequence.IsEmpty());
+ if (mFilesOrDirectories.IsEmpty()) {
+ return;
+ }
+
+ if (!aSequence.SetLength(mFilesOrDirectories.Length(),
+ mozilla::fallible_t())) {
+ aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
+ return;
+ }
+
+ for (uint32_t i = 0; i < mFilesOrDirectories.Length(); ++i) {
+ aSequence[i] = mFilesOrDirectories[i];
+ }
+}
+
+bool
+FileList::ClonableToDifferentThreadOrProcess() const
+{
+ for (uint32_t i = 0; i < mFilesOrDirectories.Length(); ++i) {
+ if (mFilesOrDirectories[i].IsDirectory()) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
} // namespace dom
} // namespace mozilla
diff --git a/dom/base/FileList.h b/dom/base/FileList.h
index 3e262153c2..b6aeeb7940 100644
--- a/dom/base/FileList.h
+++ b/dom/base/FileList.h
@@ -8,6 +8,7 @@
#define mozilla_dom_FileList_h
#include "mozilla/dom/BindingDeclarations.h"
+#include "mozilla/dom/UnionTypes.h"
#include "nsCycleCollectionParticipant.h"
#include "nsIDOMFileList.h"
#include "nsWrapperCache.h"
@@ -39,15 +40,13 @@ public:
return mParent;
}
- bool Append(File* aFile)
- {
- return mFiles.AppendElement(aFile);
- }
+ void Append(File* aFile);
+ void Append(Directory* aDirectory);
bool Remove(uint32_t aIndex)
{
- if (aIndex < mFiles.Length()) {
- mFiles.RemoveElementAt(aIndex);
+ if (aIndex < mFilesOrDirectories.Length()) {
+ mFilesOrDirectories.RemoveElementAt(aIndex);
return true;
}
@@ -56,7 +55,7 @@ public:
void Clear()
{
- return mFiles.Clear();
+ return mFilesOrDirectories.Clear();
}
static FileList* FromSupports(nsISupports* aSupports)
@@ -76,29 +75,34 @@ public:
return static_cast(aSupports);
}
- File* Item(uint32_t aIndex)
+ const OwningFileOrDirectory& UnsafeItem(uint32_t aIndex) const
{
- return mFiles.SafeElementAt(aIndex);
+ MOZ_ASSERT(aIndex < Length());
+ return mFilesOrDirectories[aIndex];
}
- File* IndexedGetter(uint32_t aIndex, bool& aFound)
+ void Item(uint32_t aIndex,
+ Nullable& aFileOrDirectory,
+ ErrorResult& aRv) const;
+
+ void IndexedGetter(uint32_t aIndex, bool& aFound,
+ Nullable& aFileOrDirectory,
+ ErrorResult& aRv) const;
+
+ uint32_t Length() const
{
- aFound = aIndex < mFiles.Length();
- if (!aFound) {
- return nullptr;
- }
- return mFiles.ElementAt(aIndex);
+ return mFilesOrDirectories.Length();
}
- uint32_t Length()
- {
- return mFiles.Length();
- }
+ void ToSequence(Sequence& aSequence,
+ ErrorResult& aRv) const;
+
+ bool ClonableToDifferentThreadOrProcess() const;
private:
~FileList() {}
- nsTArray> mFiles;
+ nsTArray mFilesOrDirectories;
nsCOMPtr mParent;
};
diff --git a/dom/base/FormData.cpp b/dom/base/FormData.cpp
index fd55894bc4..d629eee431 100644
--- a/dom/base/FormData.cpp
+++ b/dom/base/FormData.cpp
@@ -125,7 +125,7 @@ FormData::Append(const nsAString& aName, Blob& aBlob,
return;
}
- AddNameBlobPair(aName, file);
+ AddNameBlobOrNullPair(aName, file);
}
void
@@ -179,12 +179,18 @@ FormData::Has(const nsAString& aName)
}
nsresult
-FormData::AddNameBlobPair(const nsAString& aName, Blob* aBlob)
+FormData::AddNameBlobOrNullPair(const nsAString& aName, Blob* aBlob)
{
- MOZ_ASSERT(aBlob);
+ RefPtr file;
+
+ if (!aBlob) {
+ FormDataTuple* data = mFormData.AppendElement();
+ SetNameValuePair(data, aName, EmptyString(), true /* aWasNullBlob */);
+ return NS_OK;
+ }
ErrorResult rv;
- RefPtr file = GetOrCreateFileCalledBlob(*aBlob, rv);
+ file = GetOrCreateFileCalledBlob(*aBlob, rv);
if (NS_WARN_IF(rv.Failed())) {
return rv.StealNSResult();
}
@@ -269,10 +275,12 @@ FormData::GetValueAtIndex(uint32_t aIndex) const
void
FormData::SetNameValuePair(FormDataTuple* aData,
const nsAString& aName,
- const nsAString& aValue)
+ const nsAString& aValue,
+ bool aWasNullBlob)
{
MOZ_ASSERT(aData);
aData->name = aName;
+ aData->wasNullBlob = aWasNullBlob;
aData->value.SetAsUSVString() = aValue;
}
@@ -285,6 +293,7 @@ FormData::SetNameFilePair(FormDataTuple* aData,
MOZ_ASSERT(aFile);
aData->name = aName;
+ aData->wasNullBlob = false;
aData->value.SetAsBlob() = aFile;
}
@@ -366,13 +375,16 @@ FormData::GetSendInfo(nsIInputStream** aBody, uint64_t* aContentLength,
nsFSMultipartFormData fs(NS_LITERAL_CSTRING("UTF-8"), nullptr);
for (uint32_t i = 0; i < mFormData.Length(); ++i) {
- if (mFormData[i].value.IsBlob()) {
- fs.AddNameBlobPair(mFormData[i].name, mFormData[i].value.GetAsBlob());
+ if (mFormData[i].wasNullBlob) {
+ MOZ_ASSERT(mFormData[i].value.IsUSVString());
+ fs.AddNameBlobOrNullPair(mFormData[i].name, nullptr);
} else if (mFormData[i].value.IsUSVString()) {
fs.AddNameValuePair(mFormData[i].name,
mFormData[i].value.GetAsUSVString());
} else {
- MOZ_CRASH("This should no be possible.");
+ MOZ_ASSERT(mFormData[i].value.IsBlob());
+ fs.AddNameBlobOrNullPair(mFormData[i].name,
+ mFormData[i].value.GetAsBlob());
}
}
diff --git a/dom/base/FormData.h b/dom/base/FormData.h
index 66373730cb..00652e8411 100644
--- a/dom/base/FormData.h
+++ b/dom/base/FormData.h
@@ -35,6 +35,7 @@ private:
struct FormDataTuple
{
nsString name;
+ bool wasNullBlob;
OwningBlobOrUSVString value;
};
@@ -45,7 +46,8 @@ private:
void SetNameValuePair(FormDataTuple* aData,
const nsAString& aName,
- const nsAString& aValue);
+ const nsAString& aValue,
+ bool aWasNullBlob = false);
void SetNameFilePair(FormDataTuple* aData,
const nsAString& aName,
@@ -114,8 +116,8 @@ public:
return NS_OK;
}
- virtual nsresult AddNameBlobPair(const nsAString& aName,
- Blob* aBlob) override;
+ virtual nsresult AddNameBlobOrNullPair(const nsAString& aName,
+ Blob* aBlob) override;
typedef bool (*FormDataEntryCallback)(const nsString& aName,
const OwningBlobOrUSVString& aValue,
diff --git a/dom/base/StructuredCloneHolder.cpp b/dom/base/StructuredCloneHolder.cpp
index f0da538093..1313e53251 100644
--- a/dom/base/StructuredCloneHolder.cpp
+++ b/dom/base/StructuredCloneHolder.cpp
@@ -10,6 +10,7 @@
#include "mozilla/AutoRestore.h"
#include "mozilla/dom/BlobBinding.h"
#include "mozilla/dom/CryptoKey.h"
+#include "mozilla/dom/Directory.h"
#include "mozilla/dom/File.h"
#include "mozilla/dom/FileList.h"
#include "mozilla/dom/FileListBinding.h"
@@ -723,36 +724,59 @@ ReadFileList(JSContext* aCx,
{
RefPtr fileList = new FileList(aHolder->ParentDuringRead());
- uint32_t tag, offset;
- // Offset is the index of the blobImpl from which we can find the blobImpl
- // for this FileList.
- if (!JS_ReadUint32Pair(aReader, &tag, &offset)) {
- return nullptr;
- }
-
- MOZ_ASSERT(tag == 0);
-
- // |aCount| is the number of BlobImpls to use from the |offset|.
+ // |aCount| is the number of Files or Directory for this FileList.
for (uint32_t i = 0; i < aCount; ++i) {
- uint32_t index = offset + i;
- MOZ_ASSERT(index < aHolder->BlobImpls().Length());
-
- RefPtr blobImpl = aHolder->BlobImpls()[index];
- MOZ_ASSERT(blobImpl->IsFile());
-
- ErrorResult rv;
- blobImpl = EnsureBlobForBackgroundManager(blobImpl, nullptr, rv);
- if (NS_WARN_IF(rv.Failed())) {
- rv.SuppressException();
+ uint32_t tagOrDirectoryType, indexOrLengthOfString;
+ if (!JS_ReadUint32Pair(aReader, &tagOrDirectoryType,
+ &indexOrLengthOfString)) {
return nullptr;
}
- MOZ_ASSERT(blobImpl);
+ MOZ_ASSERT(tagOrDirectoryType == SCTAG_DOM_BLOB ||
+ tagOrDirectoryType == Directory::eDOMRootDirectory ||
+ tagOrDirectoryType == Directory::eNotDOMRootDirectory);
- RefPtr file = File::Create(aHolder->ParentDuringRead(), blobImpl);
- if (!fileList->Append(file)) {
+ if (tagOrDirectoryType == SCTAG_DOM_BLOB) {
+ MOZ_ASSERT(indexOrLengthOfString < aHolder->BlobImpls().Length());
+
+ RefPtr blobImpl =
+ aHolder->BlobImpls()[indexOrLengthOfString];
+ MOZ_ASSERT(blobImpl->IsFile());
+
+ ErrorResult rv;
+ blobImpl = EnsureBlobForBackgroundManager(blobImpl, nullptr, rv);
+ if (NS_WARN_IF(rv.Failed())) {
+ rv.SuppressException();
+ return nullptr;
+ }
+
+ RefPtr file =
+ File::Create(aHolder->ParentDuringRead(), blobImpl);
+ MOZ_ASSERT(file);
+
+ fileList->Append(file);
+ continue;
+ }
+
+ nsAutoString path;
+ path.SetLength(indexOrLengthOfString);
+ size_t charSize = sizeof(nsString::char_type);
+ if (!JS_ReadBytes(aReader, (void*) path.BeginWriting(),
+ indexOrLengthOfString * charSize)) {
return nullptr;
}
+
+ nsCOMPtr file;
+ nsresult rv = NS_NewNativeLocalFile(NS_ConvertUTF16toUTF8(path), true,
+ getter_AddRefs(file));
+ if (NS_WARN_IF(NS_FAILED(rv))) {
+ return nullptr;
+ }
+
+ RefPtr directory =
+ Directory::Create(aHolder->ParentDuringRead(), file,
+ (Directory::DirectoryType) tagOrDirectoryType);
+ fileList->Append(directory);
}
if (!ToJSValue(aCx, fileList, &val)) {
@@ -765,7 +789,13 @@ ReadFileList(JSContext* aCx,
// The format of the FileList serialization is:
// - pair of ints: SCTAG_DOM_FILELIST, Length of the FileList
-// - pair of ints: 0, The offset of the BlobImpl array
+// - for each element of the FileList:
+// - if it's a blob:
+// - pair of ints: SCTAG_DOM_BLOB, index of the BlobImpl in the array
+// mBlobImplArray.
+// - else:
+// - pair of ints: 0/1 is root, string length
+// - value string
bool
WriteFileList(JSStructuredCloneWriter* aWriter,
FileList* aFileList,
@@ -775,13 +805,8 @@ WriteFileList(JSStructuredCloneWriter* aWriter,
MOZ_ASSERT(aFileList);
MOZ_ASSERT(aHolder);
- // A FileList is serialized writing the X number of elements and the offset
- // from mBlobImplArray. The Read will take X elements from mBlobImplArray
- // starting from the offset.
if (!JS_WriteUint32Pair(aWriter, SCTAG_DOM_FILELIST,
- aFileList->Length()) ||
- !JS_WriteUint32Pair(aWriter, 0,
- aHolder->BlobImpls().Length())) {
+ aFileList->Length())) {
return false;
}
@@ -789,18 +814,39 @@ WriteFileList(JSStructuredCloneWriter* aWriter,
nsTArray> blobImpls;
for (uint32_t i = 0; i < aFileList->Length(); ++i) {
- RefPtr blobImpl =
- EnsureBlobForBackgroundManager(aFileList->Item(i)->Impl(), nullptr, rv);
- if (NS_WARN_IF(rv.Failed())) {
- rv.SuppressException();
- return false;
+ const OwningFileOrDirectory& data = aFileList->UnsafeItem(i);
+
+ if (data.IsFile()) {
+ RefPtr blobImpl =
+ EnsureBlobForBackgroundManager(data.GetAsFile()->Impl(), nullptr, rv);
+ if (NS_WARN_IF(rv.Failed())) {
+ rv.SuppressException();
+ return false;
+ }
+
+ if (!JS_WriteUint32Pair(aWriter, SCTAG_DOM_BLOB,
+ aHolder->BlobImpls().Length())) {
+ return false;
+ }
+
+ aHolder->BlobImpls().AppendElement(blobImpl);
+ continue;
}
- MOZ_ASSERT(blobImpl);
- blobImpls.AppendElement(blobImpl);
+ MOZ_ASSERT(data.IsDirectory());
+
+ nsAutoString path;
+ data.GetAsDirectory()->GetFullRealPath(path);
+
+ size_t charSize = sizeof(nsString::char_type);
+ if (!JS_WriteUint32Pair(aWriter,
+ (uint32_t)data.GetAsDirectory()->Type(),
+ path.Length()) ||
+ !JS_WriteBytes(aWriter, path.get(), path.Length() * charSize)) {
+ return false;
+ }
}
- aHolder->BlobImpls().AppendElements(blobImpls);
return true;
}
@@ -1004,7 +1050,9 @@ StructuredCloneHolder::CustomWriteHandler(JSContext* aCx,
// See if this is a FileList object.
{
FileList* fileList = nullptr;
- if (NS_SUCCEEDED(UNWRAP_OBJECT(FileList, aObj, fileList))) {
+ if (NS_SUCCEEDED(UNWRAP_OBJECT(FileList, aObj, fileList)) &&
+ (mSupportedContext == SameProcessSameThread ||
+ fileList->ClonableToDifferentThreadOrProcess())) {
return WriteFileList(aWriter, fileList, this);
}
}
diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp
index 384a092666..20c7cb7d5c 100644
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -7576,7 +7576,6 @@ nsContentUtils::TransferableToIPCTransferable(nsITransferable* aTransferable,
// has this data available to it when passed over:
blobImpl->GetSize(rv);
blobImpl->GetLastModified(rv);
- blobImpl->LookupAndCacheIsDirectory();
} else {
if (aInSyncMessage) {
// Can't do anything.
diff --git a/dom/base/nsIDOMFileList.idl b/dom/base/nsIDOMFileList.idl
index 338bd72793..8e6dcf52a3 100644
--- a/dom/base/nsIDOMFileList.idl
+++ b/dom/base/nsIDOMFileList.idl
@@ -5,7 +5,7 @@
#include "nsISupports.idl"
-[uuid(57128a85-34de-42db-a252-84dd57724a59)]
+[builtinclass, uuid(57128a85-34de-42db-a252-84dd57724a59)]
interface nsIDOMFileList : nsISupports
{
readonly attribute unsigned long length;
diff --git a/dom/base/test/file_bug1250148.sjs b/dom/base/test/file_bug1250148.sjs
new file mode 100644
index 0000000000..a85347896b
--- /dev/null
+++ b/dom/base/test/file_bug1250148.sjs
@@ -0,0 +1,60 @@
+const CC = Components.Constructor;
+const BinaryInputStream = CC("@mozilla.org/binaryinputstream;1",
+ "nsIBinaryInputStream",
+ "setInputStream");
+
+function utf8decode(s) {
+ return decodeURIComponent(escape(s));
+}
+
+function utf8encode(s) {
+ return unescape(encodeURIComponent(s));
+}
+
+function handleRequest(request, response) {
+ var bodyStream = new BinaryInputStream(request.bodyInputStream);
+
+ var requestBody = "";
+ while ((bodyAvail = bodyStream.available()) > 0) {
+ requestBody += bodyStream.readBytes(bodyAvail);
+ }
+
+ var result = [];
+
+ if (request.method == "POST") {
+ var contentTypeParams = {};
+ request.getHeader("Content-Type").split(/\s*\;\s*/).forEach(function(s) {
+ if (s.indexOf('=') >= 0) {
+ let [name, value] = s.split('=');
+ contentTypeParams[name] = value;
+ }
+ else {
+ contentTypeParams[''] = s;
+ }
+ });
+
+ if (contentTypeParams[''] == "multipart/form-data" &&
+ request.queryString == "") {
+ requestBody.split("--" + contentTypeParams.boundary).slice(1, -1).forEach(function (s) {
+
+ let headers = {};
+ let headerEnd = s.indexOf("\r\n\r\n");
+ s.substr(2, headerEnd-2).split("\r\n").forEach(function(s) {
+ // We're assuming UTF8 for now
+ let [name, value] = s.split(': ');
+ headers[name] = utf8decode(value);
+ });
+
+ let body = s.substring(headerEnd + 4, s.length - 2);
+ if (!headers["Content-Type"] || headers["Content-Type"] == "text/plain") {
+ // We're assuming UTF8 for now
+ body = utf8decode(body);
+ }
+ result.push({ headers: headers, body: body});
+ });
+ }
+ }
+
+ response.setHeader("Content-Type", "text/plain; charset=utf-8", false);
+ response.write(utf8encode(JSON.stringify(result)));
+}
diff --git a/dom/base/test/mochitest.ini b/dom/base/test/mochitest.ini
index 0ea90b5b13..edec3586a8 100644
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -257,6 +257,7 @@ support-files =
referrer_change_server.sjs
file_change_policy_redirect.html
file_bug1198095.js
+ file_bug1250148.sjs
[test_anonymousContent_api.html]
[test_anonymousContent_append_after_reflow.html]
@@ -848,3 +849,5 @@ skip-if = buildapp == 'b2g' #no ssl support
[test_document.all_iteration.html]
[test_bug1198095.html]
[test_bug1187157.html]
+[test_bug769117.html]
+[test_bug1250148.html]
diff --git a/dom/base/test/script_postmessages_fileList.js b/dom/base/test/script_postmessages_fileList.js
index 8c8af4289a..8382958f32 100644
--- a/dom/base/test/script_postmessages_fileList.js
+++ b/dom/base/test/script_postmessages_fileList.js
@@ -1,15 +1,25 @@
-const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
+var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
Cu.importGlobalProperties(["File"]);
-let testFile = Cc["@mozilla.org/file/directory_service;1"]
- .getService(Ci.nsIDirectoryService)
- .QueryInterface(Ci.nsIProperties)
- .get("ProfD", Ci.nsIFile);
-testFile.append("prefs.js");
-
addMessageListener("file.open", function () {
+ var testFile = Cc["@mozilla.org/file/directory_service;1"]
+ .getService(Ci.nsIDirectoryService)
+ .QueryInterface(Ci.nsIProperties)
+ .get("ProfD", Ci.nsIFile);
+ testFile.append("prefs.js");
+
sendAsyncMessage("file.opened", {
file: new File(testFile)
});
});
+addMessageListener("dir.open", function () {
+ var testFile = Cc["@mozilla.org/file/directory_service;1"]
+ .getService(Ci.nsIDirectoryService)
+ .QueryInterface(Ci.nsIProperties)
+ .get("ProfD", Ci.nsIFile);
+
+ sendAsyncMessage("dir.opened", {
+ dir: testFile.path
+ });
+});
diff --git a/dom/base/test/test_bug1187157.html b/dom/base/test/test_bug1187157.html
index dda4804a7b..37942f0051 100644
--- a/dom/base/test/test_bug1187157.html
+++ b/dom/base/test/test_bug1187157.html
@@ -15,14 +15,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=789315
+
+
+
diff --git a/dom/base/test/test_bug1250148.html b/dom/base/test/test_bug1250148.html
new file mode 100644
index 0000000000..1584360442
--- /dev/null
+++ b/dom/base/test/test_bug1250148.html
@@ -0,0 +1,52 @@
+
+
+
+