Review of documentation that was missing needed.
Fixes#8833.
Source-Repo: https://github.com/servo/servo
Source-Revision: 7438bc0425749989b8aab084a34ff3fff2ea6679
This commit moves the FocusType enum to the script crate and replaces all usages with the new `usage`.
Fixes#8840
Source-Repo: https://github.com/servo/servo
Source-Revision: e16c930f36582f40da4736f88675f559e7e47098
Rebase of #8746. Introduce and use an XML parser for text/xml network responses when loading web pages.
Source-Repo: https://github.com/servo/servo
Source-Revision: 368dd1dc53cd595bbbcf6f9fb139e9ac573a351b
Fixes browser.html blocker #8759. r? @pcwalton
This adds a slow path for cases where the compositor's layer-based hit testing is incorrect. If the script task discovers that a mouse event should have been dispatched to an iframe, it bounces the event back to the constellation to be forwarded to the correct pipeline.
This isn't terribly slow (on the slow path, it adds one extra round-trip message between script and constellation), but if we want to optimize this better we could instead replace the compositor's layer hit testing with display list hit testing in the paint task. This would be a more complicated change that I think we should save for a follow-up.
This only fixes mouse input for now. A basically-identical change will be needed for touch-screen input, whether we stick with this approach or switch to the paint task.
Source-Repo: https://github.com/servo/servo
Source-Revision: bc62b5aadb62267582fbd65daa28438ce6c6ac9c
The 'text' attribute was implemented on `<body>` in #7841
Source-Repo: https://github.com/servo/servo
Source-Revision: 65108348aa543774ade163b25836018fa8f6c00f
Updated string_cache to 0.2, and updated the dependencies that depend on string_cache.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.
r? @SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 188fa9378c103093f1f8dac24bff0d9d237fd2bc
The document node is always dirty because layout never clears the bit;
instead, check the dirty bit of the root element.
Source-Repo: https://github.com/servo/servo
Source-Revision: a2be34365ae3b3e9a4f7da7a0fb5ed2dbf8426eb
I don't think this code is called when there is no document element, but I
added assertions to make sure we notice in case I was wrong.
Source-Repo: https://github.com/servo/servo
Source-Revision: 20d26853e145e275695463662b6cee334cd27085
This patch makes DOMString an opaque wrapper round String (currently it's a transparent wrapper).
The changes are:
* Replacing DOMString(foo) by DOMString::from(foo).
* Replacing foo.0 by String::from(foo).
* Adding functions clear, push_str and extend for in-place mutation of DOMStrings.
* Replacing DOMString by String in other threads (devtools, storage and filereader).
* Making DOMString implement !Send.
* Removing the pub attribute from the contents of DOMString.
This enables experimenting with other string representations in the DOM.
Source-Repo: https://github.com/servo/servo
Source-Revision: 62acdd303b78951885c2c90747b31f318907d6c9
No functional change; just cleanups related to parsing attributes.
Source-Repo: https://github.com/servo/servo
Source-Revision: d8df028197505ca439363cdb05bed58fe9b4b726
Stylesheets for `HTMLLinkElement`s are now loaded by the resource task, triggered by the element in question. Stylesheets are owned by the elements they're associated with, which can be `HTMLStyleElement`, `HTMLLinkElement`, and `HTMLMetaElement` (for `<meta name="viewport">).
Additionally, the quirks mode stylesheet (just as the user and user agent stylesheets a couple of commits ago), is implemented as a lazy static, loaded once per process and shared between all documents.
This all has various nice consequences:
- Stylesheet loading becomes a non-blocking operation.
- Stylesheets are removed when the element they're associated with is removed from the document.
- It'll be possible to implement the CSSOM APIs that require direct access to the stylesheets (i.e., ~ all of them).
- Various subtle correctness issues are fixed.
One piece of interesting follow-up work would be to move parsing of external stylesheets to the resource task, too. Right now, it happens in the link element once loading is complete, so blocks the script task. Moving it to the resource task would probably be fairly straight-forward as it doesn't require access to any external state.
Depends on #7979 because without that loading stylesheets asynchronously breaks lots of content.
Source-Repo: https://github.com/servo/servo
Source-Revision: 7ff3a17524e0e703e3ac279441729c185444be24
…s to a new one for the first time. Resolves#7865.
Source-Repo: https://github.com/servo/servo
Source-Revision: 4067960ba5d309ec6c4c6aef6e7aa231aca0e5d5
Instead of just converting the mouse into a single "touch" input, Servo can now listen for multi-touch events from Glutin, maintain a list of active touch points, and dispatch events for all of them.
r? @glennw (for the compositor changes) and @jdm (for the DOM changes)
Source-Repo: https://github.com/servo/servo
Source-Revision: 3fdaa6e3f32f6996c416e75119177b98d404adb2
Removed unncessary call to dirty() in Document::node_and_heritage_change, since the node is aready dirtied by force_dirty_ancestors().
Source-Repo: https://github.com/servo/servo
Source-Revision: 23efa0a36f22bc1ba06023892d7cb292f5899275
The existing implementation could panic; make sure that doesn't
happen by requiring that the contents of a RefCell are trivially
traceable (i.e. the value don't contain any traceable objects).
I'm not sure whether the TriviallyJSTraceable trait is actually
worthwhile; maybe we should just never use RefCell in the DOM.
Source-Repo: https://github.com/servo/servo
Source-Revision: 4f51710ed387baa1ad0a6e4cdb0fc5eee44093d5
Including proper support for async and deferred scripts.
r? @jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 704c5ef25a846ac4321cd136d9747dee9513f98b
This implements just enough of [Touch Events](http://w3c.github.io/touch-events/) to enable scrolling on Android without regressing basic single-touch interaction like clicking on links.
Dragging a page will scroll it, unless the page calls `preventDefault` on the "touchstart" event.
Does **not** yet support pinch zooming or other multi-touch gestures or events.
Includes a `-Z convert-mouse-to-touch` command line flag for testing on non-touch platforms. This is also enabled by default on Android because Glutin currently translates touch input to mouse events on Android.
Source-Repo: https://github.com/servo/servo
Source-Revision: dcd207f9bf15c9ecf5d043385ba93277e69201f6
Removes all those messy FooCast structures in InheritTypes.rs.
Source-Repo: https://github.com/servo/servo
Source-Revision: 674589c370d978f543e71f995d58c5b28e6e9842
We can only borrow `JS<T>` from rooted things, so it's safe to deref it.
The only types that provide mutable `JS<T>` things are `MutHeap<JS<T>>` and
`MutNullableHeap<JS<T>>`, which don't actually expose that they contain
`JS<T>` values.
Source-Repo: https://github.com/servo/servo
Source-Revision: 1a376aa75d5de8781b17a673850860f8afd2c28f
Just getting my feet wet with Rust here. Please feel free to nit the hell out of it stylistically and idiomatically. :-)
Source-Repo: https://github.com/servo/servo
Source-Revision: ff2151b8bbc62fa29c90a429b7a4f12520420b6e