These changes restore the previous behavior in which the data is decoded
according to a locale specific default charset if the UTF-8 conversion fails.
This allows the method to properly decode both UTF-8 data and data that has
been encoded with the locale default charset (ISO-8859-1 in most cases) without
any charset hints from the source.
The conversion is now a two step process:
1. Convert the stream content to a string using the locale specific encoding.
2. Try reinterpret the data according to UTF-8 rules. If it succeeds, return
the conversion result. If it fails, return the original string.
--HG--
extra : histedit_source : df0406180eb6a9581c08e09b102f9eb523659c52
Copy outerHTML of the currently selected node of the inspector.
Works for ELEMENT, DOCUMENT_TYPE and COMMENT node types.
- bound "copy" event in markup-view to copy outerHTML
- added doctypeString property to NodeFront in actors/inspector.js
- markup-view.js is also using this property now
- added mochitest with dedicated html
--HG--
extra : rebase_source : 8eab78ec13fe79705d261a1883327f426e0ca576
Introduced a new highlighter option that makes each region <path> element in the highlighter only
cover the actual area of the corresponding region, excluding the area of nested regions.
This is useful when used with the existing showOnly region because it lets users see exactly where
a given region is.
This patch makes the layout-view use this new option, so that when users hover over the various
regions in the layout-view, only the corresponding regions are highlighted.
The method was using NetUtil or IOService based on the scheme of the given
URL. Due to changes in NetUtil since the code was originally written these two
code paths are doing the same thing now. These changes unify the two cases into
a single one which
* creates a channel for the given URL and works around some problems in
xpcshell-tests
* sets loading options on the channel and
* leaves the fetching, stream reading and charset conversion to NetUtil.
It also adds code to work around bug 982654 which causes the stream to
throw if the file is empty. If a file cannot be read by the file:// handler, it
will try to use OS.File.read which handles empty files properly. This is only
used as a fallback as OS.File doesn't provide the content type for the file
required by the method.