Commit graph

51 commits

Author SHA1 Message Date
Andrea Marchesini
3f67e0bfd8 Bug 1167423 - patch 8 - Handle return values of FallibleTArray functions in HTMLInputElement, r=smaug 2015-05-25 12:50:15 +01:00
Andrea Marchesini
3aa189b5ff Bug 1163388 - patch 2 - get rid of nsIDOMFile, r=ehsan
--HG--
rename : dom/base/nsIDOMFile.idl => dom/base/nsIDOMBlob.idl
2015-05-18 14:52:26 +01:00
Andrea Marchesini
338c67e420 Bug 1163388 - patch 1 - make nsIDOMFile an empty interface, r=ehsan 2015-05-18 14:51:54 +01:00
Andrea Marchesini
f4538bb921 Bug 1163387 - Rename FileImpl to BlobImpl, r=ehsan
--HG--
rename : dom/base/MultipartFileImpl.cpp => dom/base/MultipartBlobImpl.cpp
rename : dom/base/MultipartFileImpl.h => dom/base/MultipartBlobImpl.h
2015-05-12 13:11:03 +01:00
Andrea Marchesini
368a198972 Bug 1159401 - Split Blob and File classes, r=bz 2015-05-12 13:09:51 +01:00
Wes Kocher
983fcabeef Backed out 2 changesets (bug 1159401) for b2g build bustage
Backed out changeset adfee1efb1e1 (bug 1159401)
Backed out changeset 70c63c8546e3 (bug 1159401)
2015-05-11 14:54:02 -07:00
Wes Kocher
6b003ab737 Backed out changeset 56e4c68dc3da (bug 1163387) for build bustage CLOSED TREE
--HG--
rename : dom/base/MultipartBlobImpl.cpp => dom/base/MultipartFileImpl.cpp
rename : dom/base/MultipartBlobImpl.h => dom/base/MultipartFileImpl.h
2015-05-11 13:17:58 -07:00
Andrea Marchesini
49a0ee6938 Bug 1163387 - Rename FileImpl to BlobImpl, r=ehsan
--HG--
rename : dom/base/MultipartFileImpl.cpp => dom/base/MultipartBlobImpl.cpp
rename : dom/base/MultipartFileImpl.h => dom/base/MultipartBlobImpl.h
2015-05-11 18:50:54 +01:00
Andrea Marchesini
91a8a35606 Bug 1159401 - patch 1 - Split Blob and File in 2 classes, r=bz 2015-05-11 18:50:50 +01:00
Ryan VanderMeulen
2390c704f8 Backout revisions 4287533203fb and 96a3ebfe09d8 (bug 1159401) for bustage.
CLOSED TREE

--HG--
extra : histedit_source : a6c24f88b9c5a0cbcf2d44189fd359ddb20757b4%2C46613cfc309a9f0531e8c2475ac17877f606f231
2015-05-11 11:43:59 -04:00
Andrea Marchesini
48ecacaa74 Bug 1159401 - patch 1 - Split Blob and File in 2 classes, r=bz 2015-05-11 15:20:06 +01:00
Anthony Tseng
6fe5a1137f Bug 1158425 - Rename _SYNTH event names. r=smaug
--HG--
extra : rebase_source : 533cc7e18cf7f92d95a146d61f7aa2da7c0b8e48
2015-05-01 22:06:00 -04:00
Andrew McCreight
9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Mike Hommey
924c9eb636 Bug 1134923 - Remove NS_Alloc/NS_Realloc/NS_Free. r=nfroyd
They are kept around for the sake of the standalone glue, which is used
for e.g. webapprt, which doesn't have direct access to jemalloc, and thus
still needs a wrapper to go through the xpcom function list and get to
jemalloc from there.
2015-05-01 09:40:30 +09:00
Boris Zbarsky
1540774b0c Bug 1157898 part 1. Make code of the form "return rv.ErrorCode();" where rv is an ErrorResult use StealNSResult instead. r=peterv
This patch was generated with the following command:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 's/return ([a-zA-Z0-9]+)\.ErrorCode\(\);/return \1.StealNSResult();/'
2015-04-27 09:18:51 -04:00
Ehsan Akhgari
51fd5c3de1 Bug 956530 - Clear the delayed caret data when clicking on a selected part of a text control if the focus event handler selects the control; r=roc 2015-04-14 08:29:11 -04:00
Jed Davis
ae42a23a28 Bug 1143934 - Disallow mozSetFileNameArray in content processes. r=ehsan
Summary of rationale: it never entirely worked, in that the File objects
it created would cause form submission to fail, and the longer-term plan
for content-process system-principal scripts is to remove APIs that allow
direct filesystem access.
2015-03-31 20:47:00 -04:00
Nathan Froyd
4c7234747e Bug 1143651 - don't use CallQueryInterface when the compiler can do the cast for us; r=ehsan 2015-03-12 13:20:29 -04:00
Mike Hommey
b077d9624d Bug 1134920 - Use moz_xmalloc/moz_xrealloc/free instead of nsMemory::Alloc/Realloc/Free. r=nfroyd 2015-04-01 13:51:45 +09:00
Jed Davis
5335bb72d5 Bug 1146116 - Clone File objects passed to mozSetFileArray into receiver's global. r=sicking 2015-03-27 08:41:00 -04:00
Blake Kaplan
5c1748cefe Bug 1086684 - Stash the full path for file inputs to avoid doing IPC at inopportune times. r=ehsan/bent/gps 2015-03-27 13:12:37 -07:00
Matthew Noorenberghe
b2a7f5ef69 Bug 1120860 - Measure whether an <input type=password> is associated with a <form> in BindToTree. r=smaug
--HG--
extra : rebase_source : bbabe796a1ec1c6d545cec4dc61e51c3bba31624
2015-03-24 10:27:56 -07:00
Tooru Fujisawa
e44e20c93d Bug 1144322 - Handle tabindex in overridden IsInteractiveHTMLContent methods. r=smaug 2015-03-23 18:02:33 +09:00
Ehsan Akhgari
883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Ryan VanderMeulen
aa74b23d94 Backed out changesets 992c504934d3 and 5832c2042614 (bug 1086684) for LSAN leaks.
CLOSED TREE

--HG--
extra : rebase_source : 1bada522a99be6a058723cbe24323dbaca27f8c9
2015-03-20 17:06:27 -04:00
Blake Kaplan
fc6395db41 Bug 1086684 - Stash the full path for file inputs to avoid doing IPC at inopportune times. r=ehsan 2015-03-20 12:04:58 -07:00
Boris Zbarsky
dc24477d79 Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp.  The
rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 10:13:33 -04:00
Tooru Fujisawa
de4b4e39c8 Bug 1141455 - Do not treat an element with tabindex as an interactive content in label. r=smaug 2015-03-18 05:42:14 +09:00
Nikhil Marathe
f51e8c8dbd Bug 1127150 - Use File's name instead of explicit file name in form submission related classes. r=baku
Our nsFormSubmission and subclasses accepted a third filename argument to
explicitly specify the filename. Since switching from nsIDOMBlob to File in Bug
1085283, we can read out the filename directly from the File. This simplifies
the code, but introduces a change in the way Firefox submits form data to
servers.

Consider the code:
var fd = new FormData();
fd.append("blob1", new Blob(["hi"]), ""); // explicit empty filename as third arg
fd.append("file1", new File(["hi"], "")); // File's name is empty, no third arg.
xhr.send(fd);

Previously, the request body had filename="" in the first case, and filename="blob" in the second.
This patch will change it to both cases result in filename=""

This behaviour isn't exactly specced anywhere, nor in the HTML spec [1], nor in
RFC 2388. In addition Blink (at least Chromium v40) has the same behaviour
introduced by this patch. So shipping it seems ok to me.

[1]: http://www.w3.org/html/wg/drafts/html/master/semantics.html#multipart/form-data-encoding-algorithm

--HG--
extra : rebase_source : 6631e6900fe1a9b991c397b76e5be6b913715c5a
2015-02-21 11:54:44 -08:00
Ehsan Akhgari
3cf3794589 Bug 1125963 - Part 1: Fix serialization of the pre-wrap elements that Thunderbird relies on; r=bzbarsky
This ensures that the plaintext serializer doesn't use the preformatted
text code path if we have encountered a pre-wrap element that
Thunderbird uses (which means setting white-space: pre-wrap and width:
NNch on the body element.)

It also ensures that we use 0 as the wrap column number passed down to
the plaintext serializer, instead of -1, which this code seems to be
unable to handle properly.
2015-03-04 00:50:17 -05:00
Andrea Marchesini
2c4f63331f Bug 1134280 - Get rid of Tag() - patch 1 - Is{HTML,XUL,MathML,SVG}Element and IsAnyOf{HTML,XUL,MathML,SVG}Elements, r=smaug 2015-03-03 11:08:59 +00:00
Boris Zbarsky
ff09f6fedb Bug 1128153. When a number input contains a non-number (possibly empty) value, the validation message should be about the value not being a number, not about there being no value. r=jwatt 2015-02-02 15:42:40 -05:00
Ryan VanderMeulen
661f1f36a2 Backed out changeset 714ddf32db74 (bug 1128153) for mochitest failures. 2015-02-02 16:56:47 -05:00
Boris Zbarsky
472aa76c40 Bug 1128153. When a number input contains a non-number (possibly empty) value, the validation message should be about the value not being a number, not about there being no value. r=jwatt 2015-02-02 15:42:40 -05:00
Jonathan Watt
d6c594fbfd Bug 1064430, pat 2 - Don't set the 'badInput' state on <input type=email> for punycode encoding failures. r=bz 2015-01-28 23:01:37 +00:00
Jonathan Watt
11206c2541 Bug 1064430, part 1 - When punycode encoding <input type=email> content, only encode the domain labels. r=bz 2015-01-28 23:01:33 +00:00
Jed Davis
40793e84d3 Bug 1068838 - Add chrome-only method for setting an <input>'s file list. r=sicking 2015-01-26 16:22:59 -08:00
Tooru Fujisawa
64b2cf34d6 Bug 229925 - Do not dispatch event to label target if interactive content is found between the event target and the label. r=smaug 2015-01-21 05:39:28 +09:00
Ehsan Akhgari
56a443b1c1 Bug 1097452 - Use fallible allocation when setting the value of an <input> or <textarea> element; r=jst,froydnj
This patch handles most of the call sites for these allocations except
for a few where I added TODO comments with some information.  Handling
those places may require reworking lots of code, so I prefer to not do
that here.
2015-01-14 17:31:41 -05:00
Ehsan Akhgari
abb0b24062 Bug 1118424 - Mark virtual overridden functions as MOZ_OVERRIDE in dom/html; r=baku 2015-01-06 23:33:50 -05:00
Arnaud Bienner
35a2e13528 Bug 826176 - Part 2 - Remove similar file picker filters from accept attribute. r=smaug 2014-12-19 00:30:11 +01:00
Arnaud Bienner
1329907ab6 Bug 826176 - Part 1 - File extension support for accept attribute. r=smaug 2014-11-29 12:22:30 +01:00
Giovanni Sferro
95cb83384e Bug 1100535 - Do not assume that the radio required status changed when the attribute changes. r=smaug
--HG--
extra : rebase_source : 5f6b36ba8a05507638d5ab4513864a308fa939c7
2014-11-27 17:40:00 -08:00
Jonathan Watt
c78ef3396f Bug 1071994 - Rework our implementation of HTMLInputElement's stepping algorithm to fix various bugs and more closely align with the current HTML5 text. r=smaug 2014-11-26 09:54:32 +00:00
Tom Schuster
2ee03971b2 Bug 949666 - Save last used upload dir with e10s. r=billm 2014-11-09 20:26:14 +01:00
Andrea Marchesini
3cdd90a43f Bug 1081453 - SessionHistory should not keep alive the DOM file objects, r=smaug 2014-11-11 17:13:50 +00:00
Carsten "Tomcat" Book
2cd87065a8 Backed out changeset 1a2c37d55e5e (bug 949666) for m-9 test failures in B2G ICS Emulator debug 2014-11-10 08:10:30 +01:00
Tom Schuster
c58758bd62 Bug 949666 - Save last used upload dir with e10s. r=billm 2014-11-09 20:26:14 +01:00
Arnaud Bienner
797d251105 Bug 826185 - Make filter constructed from accept attribute the default one unless unknown mime types are found. r=smaug 2014-10-29 00:32:28 +01:00
Olli Pettay
6f4b4f2f5b Bug 1080709, null check files coming from filepicker's enumerator, r=baku 2014-10-28 18:54:57 +02:00