This moves the checking code back to NS_SniffContent and specifically
checks requests for either:
- Empty `Content-type` header, OR
- A known JSON MIME type
If present, sniffing is allowed despite `nosniff` because in the first
case this is webmaster error (conflicting `nosniff` without MIME type
would always fail, so sniff it), and in the second case we need this
carveout or our json viewer will break.
This fixes a regression for the JSON viewer from part 1 as it relies on
sniffing to prettify (and should carve out the exception even if `nosniff`
headers are sent).
No real functional changes otherwise. Just catering to a corner case.
Protobuf uses `dynamic_cast` on polymorphic types which cannot be
inferred properly at compile-time, which can lead to unexpected behavior.
As a code safety measure, enable C++ RTTI for protobuf.
Vim control lines were re-introduced or not entirely cleaned up.
This nukes them again.
Removing from modules, netwerk, security, storage, testing, toolkit, and
a few scattered misc files. More to come.
The first part also means that Compact no longer needs the SurfaceCache lock (used to be via CreateChunk->CanHold),
which avoids potential deadlocks during shutdown that m-c 523950 would otherwise cause
The autocomplete module listens to keypress events for both printable keys
and non-printable keys a lot. However, we're stopping dispatching keypress
events for non-printable keys in the default event group of web content.
This means that autocomplete should listen to keypress events in the
system event group.
Note that it's difficult to globally change keypress event listeners to
keydown event listeners because if we stop keypress events at preceding
keydown event in autocomplete or satchel modules, some other modules
fail to handle keydown or keypress events before autocomplete, and it's
not easy to investigate which keypress event listener in which modules
should be changed to a keydown event listener.
Therefore, this patch doesn't do that, and uses the event group approach.