We were handling the STYLE tag getting added in the
dom_default_action_DOMSubtreeModified_cb callback, however,
the media attribute dadn't been added by that point.
We now check it in the dom_default_action_DOMNodeInserted_cb
callback, at which time the media attribute is available for
checking.
Note, we should probably store the media type in the
html_stylesheet structure, but for now we just have an
`unused` boolean.
Also, it may be possible to optimise to avoid parsing non-
screen media STYLE element data if we could detect the media
earlier.
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.
The html content script handling needs to invalidate its JavaScript
context when the browsing context (browser_window) containing it is
either closed or the content fetch is aborted (stopped)
Previously the invalidation was only done on browser_window close
which resulted in use after free crashes because of the now invalid
JavaScript context.
Previously content handler debugging features were accessed by global
variables. This allows the setting of debugging parameters via a
content API giving per content control over debugging features.
Currently only used by the html content handler to toggle global
redraw debugging.
Added content interface for search.
Removed bw->cur_search search context. Desktop layer now does nothing
except pass search requests from front end onto the bw's current_content
via the content interface.
Search API reduced to a pair of functions at each level:
{desktop|content|html|textplain}_search
and
{desktop|content|html|textplain}_search_clear
Updated front ends to use simplified search API. Only tested GTK and RO builds.
These confine the search stuff to render/. However search still uses struct
selection. The handling for which is still spread over desktop/ and render/.
Also the render/search code itself still fiddles inside html and textplain
privates.
Keypresses now go via content interface.
Contents don't shove the selection object into browser windows any more.
Contents report selection existence by sending message.
HTML content keeps track of where selections in it exist.
Contents report whether they have input focus via caret setting msg.
Caret can be hidden (can still input/paste) or removed.
Consolidate textarea selection handling.
Make textarea report its selection status changes to client.
Various textarea fixes.
Changed how we decide when to clear selections, and give focus.
+ Split up browser window and content related elements of html & text search.
+ Associate search contexts with contents, rather than browser windows.
+ Remove highlighting of search terms dependency on current_redraw_browser.
+ Fixes issues with search contexts being applied to the wrong content.
svn path=/trunk/netsurf/; revision=12646