When the operations tables were created the browser table was renamed
to miscellaneous except the actual rename patch was never applied,
this fixes that situation.
The printf formatting for size_t is set in c99 as %zu but in windows
it is %Iu this is solved by adding and inttypes style PRI macro for size_t
This also uses this macro everywhere size_t is formatted.
The return of calloc was not being checked and could have lead to a
NULL pointer dereference. This fixes coverity CID 1316337
Additionally the functions documentation comments were cleaned up.
In CSS 2.1 this was undefined.
CSS 2.1 -- 12.1 The :before and :after pseudo-elements
Note. This specification does not fully define the interaction
of :before and :after with replaced elements (such as IMG in HTML).
This will be defined in more detail in a future specification.
-- https://www.w3.org/TR/CSS21/generate.html#before-after-content
In CSS 3 the :before and :after generated content boxes are not allowed
on replaced elements.
CSS 3 Generated and Replaced Content Module
12. Replaced content
The box model defines different rules for the layout of replaced
elements than normal elements. Replaced elements do not have
'::before' and '::after' pseudo-elements; the 'content' property
in the case of replaced content replaces the entire contents of
the element's box.
-- https://www.w3.org/TR/css3-content/#replacedContent
An alternative approach which may be better would be to create the
JavaScript context when the html_content is created, rather than
on demand.
This code checks for the JS context and creates one every time we
add a node to the DOM. So when JS is on, every doc with a single
node in it has a JS context. This seems to make on-demand creation
a redundant overhead.
Now we take the value of the javascript_enabled option when the
content is created. We then use the content's script_enabled
boolean everywhere else.
This prevents us getting inconsistent values for javascript_enabled
if a user toggles the setting while a page is loading.
It was read frequently during box construction, and also the
parser's script enabled setting could change where we handled
a change of encoding.
Now we only care about the setting of the javascript_enabled
option at time of html_content creation.
Default is to display the encoded version as this provides some security making phishing domains more obvious, and a lot of our frontends are unable to display the full range of UTF-8 characters on the status bar.
Displaying the decoded address in the URL bar requires frontends to be updated (GTK and Amiga done already), and the same caveats apply.