Commit Graph
104 Commits
Author SHA1 Message Date
Chris Peterson 99957af4ec Bug 1402666 - Part 1: Replace Replace("") with ReplaceLiteral(""). r=erahm
MozReview-Commit-ID: s2hrTSkBiJ
2017-09-15 19:22:58 -07:00
Valentin Gosu bc7d16e493 Bug 1380617 - Add nsIURI.displayPrePath r=mcmanus,Gijs
- Use displayPrePath in the pageInfo permissions that shows "Permissions for:"
- The extra displayPrePath method is necessary because it's difficult to compute it manually, as opposed to not having a displaySpecWithoutRef - as it's easy to get that by truncating displaySpec at the first '#' symbol.

MozReview-Commit-ID: 9RM5kQ2OqfC
2017-08-09 17:43:58 +02:00
Masatoshi Kimura a9e30eaec8 Bug 1322874 - Get rid of nsIURI.originCharset. r=valentin.gosu
nsIURI.originCharset had two use cases:
 1) Dealing with the spec-incompliant feature of escapes in the hash
    (reference) part of the URL.
 2) For UI display of non-UTF-8 URLs.

For hash part handling, we use the document charset instead. For pretty
display of query strings on legacy-encoded pages, we no longer care to them
(see bug 817374 comment 18).

Also, the URL Standard has no concept of "origin charset". This patch
removes nsIURI.originCharset for reducing complexity and spec compliance.

MozReview-Commit-ID: 3tHd0VCWSqF
2017-08-02 20:43:30 +09:00
Masatoshi Kimura c0943e4f30 Bug 1326520 - Rename nsIURI.path to pathQueryRef. r=valentin.gosu
MozReview-Commit-ID: DqJdTGopR9G
2017-07-29 20:50:21 +09:00
Valentin Gosu d95286b8e0 Bug 1386195 - mDisplayHost must be initalized even when host does not start with xn-- r=dragana
MozReview-Commit-ID: HnDqw8oyE2r
2017-08-01 14:24:53 +03:00
Valentin Gosu 35a11dc6d4 Bug 1385883 - nsStandardURL - make sure we always check if the host is ascii r=jduell
SetRef and several other methods call InvalidateCache, which in turn sets mCheckedIfHostA to false.
That means that each time before trying to access mDisplayHost we need to make sure it is properly initalized.

MozReview-Commit-ID: Agtsy6Lx7Nb
2017-08-01 01:51:48 +03:00
Catalin Badea 67d3db74ab Bug 1344751 - Make nsStandardURL and nsIDNService available on worker threads. r=valentin 2017-07-13 12:17:19 +01:00
Valentin Gosu 34af3ba11a Bug 945240 - Add a pref to be able to restore previous behaviour where nsIURI.host/.spec returned unicode instead of punycode r=mcmanus
This is to deal with possible bugs or web-compat issues that may arrise.
Also fixes GetDisplayHostPort which would not return the correct brackets for IPv6 addresses

MozReview-Commit-ID: 3OfiBDND5Cs
* * *
[mq]: fix_ipv6_hostport.patch

MozReview-Commit-ID: 3VYCwlt7IGT
2017-07-11 19:10:10 +02:00
Valentin Gosu efa71e2ddb Bug 945240 - Make nsIURI.host & variants return ASCII strings r=mcmanus
* nsStandardURL::GetHost/GetHostPort/GetSpec contain an punycode encoded hostname.
* Added nsIURI::GetDisplayHost/GetDisplayHostPort/GetDisplaySpec which have unicode hostnames, depending on the hostname, character blacklist and the network.IDN_show_punycode pref
* remove mHostEncoding since it's not needed anymore (the hostname is always ASCII encoded)
* Add mCheckedIfHostA to know when GetDisplayHost can return the regular host, or when we need to use the cached mDisplayHost

MozReview-Commit-ID: 4qV9Ynhr2Jl
* * *
Bug 945240 - Make sure nsIURI.specIgnoringRef/.getSensitiveInfoHiddenSpec/.prePath contain unicode hosts when network.standard-url.punycode-host is set to false r=mcmanus

MozReview-Commit-ID: F6bZuHOWEsj
2017-07-11 19:09:10 +02:00
Sylvestre Ledru 9d4a84d778 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG
2017-07-06 14:00:35 +02:00
Nicholas Nethercote 4ce1e9c11f Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString
2017-06-20 19:19:52 +10:00
Nicholas Nethercote 4cbdad69e6 Bug 1374580 (part 2) - Remove nsAFlat{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsAFlatString  --> nsString
- nsAFlatCString --> nsCString
2017-06-20 19:19:05 +10:00
Nicholas Nethercote 8bdcb2343a Bug 1374580 (part 1) - Remove nsASingleFragment{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsASingleFragmentString  --> nsAString
- nsASingleFragmentCString --> nsACString
2017-06-20 19:18:17 +10:00
Henri Sivonen 7af0452b6b Bug 1261841 part 2 - Use encoding_rs instead of uconv. r=emk,mystor.
MozReview-Commit-ID: 15Y5GTX98bv
2017-06-13 13:23:23 +03:00
Milan Sreckovic 165feb045f Bug 1358225: Validate characters with a cached lookup array. About 10-15% improvement on TestStandardURL.Perf gtest. r=valentin.gosu
MozReview-Commit-ID: KMABJ3X6IZ1
2017-05-15 11:53:40 -04:00
Milan Sreckovic 944bf0d6b9 Bug 1304605: Part 2. Optimizing NormalizeIPv4. Seems to be 4-6x faster. r=valentin.gosu
MozReview-Commit-ID: FjkNmbW5I93
2017-04-26 12:02:58 -04:00
Milan Sreckovic da61522450 Bug 1304605: Part 1. Unit tests, including performance, for NormalizeIPv4. r=valentin.gosu
MozReview-Commit-ID: KAecFlYTUfW
2017-04-26 11:56:16 -04:00
dOn'tReallycAre f20686dbe9 Bug 1357155 - Convert PRCList usage in nsStandardURL to LinkedList. r=erahm 2017-04-21 01:46:12 +09:00
Valentin Gosu 20b6a7013f Bug 1326175 - Stop preserving empty passwords in URLs r=mcmanus
MozReview-Commit-ID: 7wdZSJmpErF
2017-03-27 23:56:28 +02:00
Valentin Gosu 029e26bc91 Bug 1342438 - Remove url .hash encoding/decoding prefs r=bagder
These prefs have been added close to two years ago:
dom.url.encode_decode_hash and dom.url.getters_decode_hash
The main reason for their existence was in case we encounter any web-compat issues. At this point the extra code is mostly useless, and flipping the pref may lead to crashes.

MozReview-Commit-ID: LhAHkYmv0TR
2017-03-08 22:19:34 +01:00
Valentin Gosu d658c247ea Bug 1324243 - Normalize IPv6 r=manishearth
MozReview-Commit-ID: 1UFIdeWrz1E
2017-03-09 00:55:05 +01:00
Carsten "Tomcat" Book ef29ab69a8 Backed out changeset 189b914221f4 (bug 1324243) for wpt-11 bustage 2017-03-06 14:13:03 +01:00
Valentin Gosu 754adfd0d5 Bug 1324243 - Normalize IPv6 r=manishearth
MozReview-Commit-ID: Kxe9eLqvKp6
2017-03-01 00:01:15 +01:00
Eric Rahm 56140bb9f9 Bug 1332202 - Followup to fix comment to say infallible. DONTBUILD r=me
MozReview-Commit-ID: ByRWrv7nGnM
2017-02-16 11:52:54 -08:00
Junior Hsu ae3461bdbe Bug 1338154 - not normalize ipv4 for resource and chrome uri. r=valentin 2017-02-13 03:10:00 +08:00
Valentin Gosu 7dfe84b0f2 Bug 1337629 - Restrict allowed hostname characters r=mcmanus
MozReview-Commit-ID: H8u2C5oSiT9
2017-02-09 01:55:49 +01:00
Valentin Gosu 7b83c9315d Bug 1275746 - Don't allow empty host name for URLTYPE_AUTHORITY URLs r=mcmanus
* Return NS_ERROR_MALFORMED_URI if mURLType is URLTYPE_AUTHORITY and the hostname is empty.
* Make sure nsStandardURL::SetFile calls init with the correct arguments

MozReview-Commit-ID: 7t3mZtAbMF3
2016-07-07 15:06:08 +03:00
Valentin Gosu 07e364244c Bug 1320925 - Backout changeset b80531102366 (bug 1254098) a=backout
MozReview-Commit-ID: 1tX0Keg66Dc
2017-02-07 21:07:30 +01:00
Eric Rahm 6bbd759663 Bug 1332202 - Convert most infallible NS_EscapeURL calls to fallible version. r=froydnj
This makes most users of |NS_EscapeURL| use the fallible version. A few are
left infallible as it seems like the entire function is assumed to be
infallible.

MozReview-Commit-ID: Cy1L5jQwjO1
2017-01-24 11:11:44 -08:00
Masatoshi Kimura 92eaf70c38 Bug 1321705 - Remove "network.standard-url.(escape|encode)-utf8". r=valentin.gosu
MozReview-Commit-ID: D6fRD9ElrBd
2016-12-30 20:32:29 +09:00
Sebastian Hengst 2db67552f3 Backed out changeset daabf6b822f0 (bug 1321705) for Android bustage. r=backout 2016-12-30 12:39:58 +01:00
Masatoshi Kimura bc0de3b080 Bug 1323683 - Fold nsIURIWithQuery into nsIURI. r=valentin.gosu
MozReview-Commit-ID: BFfgr42sNyx
2016-12-28 20:40:21 +09:00
Masatoshi Kimura 775eb31c94 Bug 1321705 - Remove "network.standard-url.(escape|encode)-utf8". r=valentin.gosu
MozReview-Commit-ID: D6fRD9ElrBd
2016-12-30 10:28:18 +09:00
Henri Sivonen e83e8b3cdf Bug 1225255 - Encode URL query string segments to bytes with HTML numeric character references for unmappable characters. r=valentin
MozReview-Commit-ID: HDJxSSZZYlw
2016-07-15 14:49:22 +03:00
Manish Goregaokar 22ca343bd6 Bug 1324251 - Unconditionally parse windows drive letters in file paths; r=valentin
MozReview-Commit-ID: 6nBPHYHNprF
2016-12-18 18:38:01 -08:00
Valentin Gosu c96760ef2d Bug 1318432 - Make it possible to switch on rust-url at runtime r=bagder
MozReview-Commit-ID: 3BfqFWIpS7F
2016-11-22 01:53:43 +01:00
Valentin Gosu 2b74227270 Bug 1151899 - Add code to run both URL parsers at the same time; r=bagder,ted,valentin
MozReview-Commit-ID: Jd2RgPmdPrn
2016-11-08 00:42:36 +01:00
Valentin Gosu cf10de34d0 Bug 1151899 - Add RustURL which implements nsIURI,nsIURL,nsIStandardURL,etc; r=bagder
MozReview-Commit-ID: 2rVu4t66cfD
2016-11-08 00:42:27 +01:00
Sebastian Hengst 0bb80a0248 Backed out changeset f87f327d7ef2 (bug 1151899) 2016-11-17 20:22:34 +01:00
Sebastian Hengst 82746c9b50 Backed out changeset 910b4b74261d (bug 1151899) 2016-11-17 20:21:55 +01:00
Valentin Gosu deb781f973 Bug 1151899 - Add code to run both URL parsers at the same time; r=bagder,ted,valentin
MozReview-Commit-ID: Jd2RgPmdPrn
2016-11-08 00:42:36 +01:00
Valentin Gosu 4821d0dfc3 Bug 1151899 - Add RustURL which implements nsIURI,nsIURL,nsIStandardURL,etc; r=bagder
MozReview-Commit-ID: 2rVu4t66cfD
2016-11-08 00:42:27 +01:00
Andrea Marchesini d722c927a8 Bug 1310483 - Implement nsIURIWithQuery for having query part in simple URI, r=valentin 2016-11-14 13:04:33 +01:00
Gerald Squelart 9a3fb4229e Bug 1316432 - Fix nsCOMPtr constructions&assignments from 0 - r=froydnj
Giving '0' (literal zero) to nsCOMPtr is now ambiguous, as both
nsCOMPtr(decltype(nullptr)) and nsCOMPtr(T*) could be used.
In any case, our coding standards mandate the use of 'nullptr' for pointers.
So I'm changing all zeroes into nullptr's where necessary.

MozReview-Commit-ID: LXiZTu87Ck6
2016-11-10 14:11:27 +11:00
Valentin Gosu e0de246d6b Bug 1314859 - SetHost should also call NormalizeIPv4 r=mcmanus
MozReview-Commit-ID: 79sQrld6TBG
2016-11-06 23:26:04 +01:00
Manish Goregaokar 2bbb804b70 Bug 1151899 - Include rust-url-capi (leave-open); r=valentin,ted
MozReview-Commit-ID: 1ITlPLvwzF4
2016-10-28 16:34:21 -07:00
Valentin Gosu eaba41adc8 Bug 1305204 - (Part 3) Backout bug 1275746 a=backout
MozReview-Commit-ID: B627xyv9BRm
2016-10-23 14:24:49 +02:00
Manish Goregaokar 404a46fa74 Bug 1301621 - Parse URL ports as 16 bit; r=valentin
MozReview-Commit-ID: 5FbRUsYzJdy
2016-09-09 15:42:42 +08:00
Carsten "Tomcat" Book 6c6013c457 Backed out changeset fc9963bf6d98 (bug 1301621) for xpcshell bustage 2016-09-14 12:28:50 +02:00
Manish Goregaokar cc69edf939 Bug 1301621 - Parse URL ports as 16 bit; r=valentin
MozReview-Commit-ID: 5FbRUsYzJdy
2016-09-09 15:42:42 +08:00