Fixes#4047, and updates to expect tests that are now passing because of it.
Source-Repo: https://github.com/servo/servo
Source-Revision: c23bfdf1c52cdd42c37cd931525c23e22f1d289f
This simplifies some upcoming changes to how event handling works.
Source-Repo: https://github.com/servo/servo
Source-Revision: 32d765fb049318f2ff22f39fdeb9fa258ec8a174
It is possible to share the code which creates root layers.
Source-Repo: https://github.com/servo/servo
Source-Revision: 9da7f10c3c46fee3d11d4ef9e8fb642fc9fb9870
Default build uses glfw, but glutin can be enabled via:
./mach cargo build --no-default-features --features=glutin
Remaining work:
* Mac
* Android
* hi-dpi
* nested event loop
This PR also enables true headless (without X) rendering on Linux by specifying the rendering API as Mesa.
Source-Repo: https://github.com/servo/servo
Source-Revision: f5c6146de0b3bfda97edff6662033f4a981df3f6
Attempt to solve #3690
I've re-rolled the changes from https://github.com/servo/servo/pull/2610, and then doen the necessary updates to get this to compile with the current snapshot of rust.
The documentation for values I've added in the bitflag are missing, because I don't know what is the appropriate text.
Source-Repo: https://github.com/servo/servo
Source-Revision: e13873bba1782580db4abe46e883b08da829cbb6
Fixes#4010.
This is my first Servo contribution, so let me know if I missed anything!
Source-Repo: https://github.com/servo/servo
Source-Revision: efb4fe4a4ac9bf96cf1db649ab112014ce2c13a4
Fixes#4009.
Only lower-case the argument to Document#createElement if it's a HTML document.
Source-Repo: https://github.com/servo/servo
Source-Revision: 929671f945d30deaf37bbb9e23d15d09387bdf09
This is a temporary solution, until they are packaged properly.
Source-Repo: https://github.com/servo/servo
Source-Revision: 1fd94adb3ddaa56c2e5fb41422960a8a433a6389
This implements the scheme described here:
https://groups.google.com/forum/#!topic/mozilla.dev.servo/sZVPSfPVfkg
This commit changes Servo to generate one display list per stacking
context instead of one display list per layer. This is purely a
refactoring; there are no functional changes. Performance is essentially
the same as before. However, there should be numerous future benefits
that this is intended to allow for:
* It makes the code simpler to understand because the "new layer needed"
vs. "no new layer needed" code paths are more consolidated.
* It makes it easy to support CSS properties that did not fit into our
previous flat display list model (without unconditionally layerizing
them):
o `opacity` should be easy to support because the stacking context
provides the higher-level grouping of display items to which opacity
is to be applied.
o `transform` can be easily supported because the stacking context
provides a place to stash the transformation matrix. This has the side
benefit of nicely separating the transformation matrix from the
clipping regions.
* The `flatten` logic is now O(1) instead of O(n) and now only needs to
be invoked for pseudo-stacking contexts (right now: just floats),
instead of for every stacking context.
* Layers are now a proper tree instead of a flat list as far as layout
is concerned, bringing us closer to a production-quality
compositing/layers framework.
* This commit opens the door to incremental display list construction at
the level of stacking contexts.
Future performance improvements could come from optimizing allocation of
display list items, and, of course, incremental display list
construction.
r? @glennw
f? @mrobinson @cgaebel
Source-Repo: https://github.com/servo/servo
Source-Revision: 397d8138e7b27541faf03d9635d7648416da4a75
Issue: #3144
We created a sniffer task in components/net/, added a call in resource_task load function to create a new sniffer task (sending all the data), and sniffer_task currently sends all the data back to resource_task.
The purpose of this request is to get feedback from @jdm on our progress before moving forward and writing tests.
Source-Repo: https://github.com/servo/servo
Source-Revision: 796258114b1d4681ca9dd9f745036f68535ecb56
Because of #2122 I cannot write test for this right now because it will be failing randomly due to that iframe issue. However, if it doesn't fail due to that issue a test like this:
```html
<html>
<head>
<meta charset="utf8" />
<script src="harness.js"></script>
<title>Iframe contentDocument test.</title>
</head>
<body>
<iframe src="test_iframe_contentDocument_inner.html" id="iframe"></iframe>
<script>
waitForExplicitFinish();
var timeout = 100;
var iframe = document.getElementById('iframe');
function test_contentWindow() {
if (!iframe.contentWindow) {
// Iframe not loaded yet, try again.
// No load event for iframe, insert bug number here.
setTimeout(test_contentWindow, timeout);
return;
}
is(iframe.contentDocument.getElementById('test').textContent, 'value');
finish();
}
test_contentWindow();
</script>
</body>
</html>
```
where inner is simply:
```html
<html><body><div id="test">value</div></body></html>
```
passes.
I have added `SameOrigin` method to the `UrlHelper`. I wanted to reuse it in [`constellation.rs` same_script check](f0184a2d01/components/compositing/constellation.rs (L625)) but I it didn't want to compile saying
```
error: unresolved import `dom::urlhelper::UrlHelper`. Maybe a missing `extern crate dom`?
```
So I didn't include it in this PR for now.
There is more discussion about the cross origin iframes in [another issue](https://github.com/servo/servo/issues/3939). In this PR I just added same origin check.
Source-Repo: https://github.com/servo/servo
Source-Revision: 85a2f0b66a32cfd6022b3e6cec6ec06f3b59baf1
This attempts to implement a bunch of the DOM Level 3 Events spec by implementing the KeyboardEvent interface, the document focus context, and dispatching keyup/keydown/keypress events appropriately. There's also some support for multiline text input that's untested.
Source-Repo: https://github.com/servo/servo
Source-Revision: 2ffa845cf463b14b19322d477a77ffd20efa89a9
Instead of creating a display list for the entire page, only create one
for an area that expands around the viewport. On my machine this makes
incremental layout of http://timecube.com 50% faster.
Source-Repo: https://github.com/servo/servo
Source-Revision: 26045d7fcbab8851fbefe2851cd904203f8fd8dd
I was messing around devtools code and saw some TODOs, is anyone working on it? I took one of them:
```// TODO: this really belongs in the protocol module.```
I would be glad to help with this if no one is on it already, just let me know.
Source-Repo: https://github.com/servo/servo
Source-Revision: 88ff8c61f075e6f8b6123b810f1be4acf444b3d1
This is the first step to allowing incremental iframe creation and destruction. This should eliminate task failures when an iframe is added to the frame tree lazily via script.
Source-Repo: https://github.com/servo/servo
Source-Revision: ccdd2910a2df9921b22c9db74f84559d78019199
We have completed the initial step for "Implement Window.sessionStorage and Window.localStorage"
- Create and stub the Storage WebIDL interface
Source-Repo: https://github.com/servo/servo
Source-Revision: c828e8360416e61deaaf6870ebdf9ee2f0abc19b
This implements a subset of the CSS `linear-gradient` property per the
CSS-IMAGES specification:
http://dev.w3.org/csswg/css-images-3/
The full syntax is parsed, but only the beginning and end color stops
are used, and gradients are clamped to the nearest 90 degrees. It should
not be architecturally difficult to add the remaining pieces, but in the
interests of bounding the size of this patch that work has been left to
follow-ups.
Improves GitHub.
r? @glennw
Source-Repo: https://github.com/servo/servo
Source-Revision: ed22c9b35b64ccf7a68ed4f26b1eecfa39996efd
Glob imports are frowned upon, and after the removal of
build_element_for_tag, only a few types are actually used.
Source-Repo: https://github.com/servo/servo
Source-Revision: 44fa9f9b18a042e50367b1580528fc94587f0a15