Граф коммитов

348 Коммитов

Автор SHA1 Сообщение Дата
Martin Robinson c3675e6a6d servo: Merge #3964 - Remove some code duplication in the Compositor (from mrobinson:code-duplication); r=larsbergstrom
It is possible to share the code which creates root layers.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9da7f10c3c46fee3d11d4ef9e8fb642fc9fb9870
2014-11-19 09:00:47 -07:00
Glenn Watson 8a83aa075e servo: Merge #4035 - Remove rust-alert as it's broken on mac, and unimplemented on other platforms (from glennw:remove-rust-alert); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 554f696db81665f92e9976a15d986b0fd0f99edf
2014-11-18 21:30:27 -07:00
Patrick Walton c45bdbbfb9 servo: Merge #3904 - layout: Incrementalize reflow of block formatting contexts impacted by floats, and make float placement idempotent (from pcwalton:maze-solver-float-placement); r=cgaebel
r? @glennw @cgaebel

Source-Repo: https://github.com/servo/servo
Source-Revision: a07401ca4e9ab26d66c7a02e710cea143caca401
2014-11-18 16:39:25 -07:00
Glenn Watson c04e3b2bc7 servo: Merge #4028 - Add glutin port (supported on Linux only currently) (from glennw:glutin); r=larsbergstrom
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
2014-11-18 15:48:29 -07:00
Claes 'Letharion' Gyllensvärd 91a5610f1a servo: Merge #4015 - Bitfield to bitflags (from letharion:Bitfield-to-bitflags); r=mbrubeck
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
2014-11-18 11:42:32 -07:00
Achal Shah 9c9758245b servo: Merge #4030 - Stop including the element during Element.getElementsByClassName (from achals:master); r=Ms2ger
https://github.com/servo/servo/issues/3995

This is my first PR, so please let me know if I'm doing something wrong!

Source-Repo: https://github.com/servo/servo
Source-Revision: 8cecb03d756d8df4de69ca13b663d547f438d320
2014-11-18 08:45:35 -07:00
Zachary Newman 36a1fd352e servo: Merge #4027 - Implement DOMImplementation.hasFeature (from znewman01:issue4010); r=Ms2ger
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
2014-11-18 07:54:33 -07:00
Zachary Newman 981dd5640f servo: Merge #4029 - Update behavior of Document.createElement (from znewman01:issue4009); r=Ms2ger
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
2014-11-18 07:15:34 -07:00
Claes 'Letharion' Gyllensvärd 75a8017b4c servo: Merge #4021 - HTMLScriptElementHelpers::is_javascript should compare ASCII case-insensitively (from letharion:Case-insensitive-HTMLScriptElementHelpers-comparision); r=Ms2ger
Fix for #3993

Source-Repo: https://github.com/servo/servo
Source-Revision: 3fafd61f718e1f0d14c192b670a602316d02dfd0
2014-11-18 06:51:34 -07:00
Ms2ger 058206f7bf servo: Merge #4019 - Various cleanup in constellation.rs (from Ms2ger:constellation); r=mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: 64cc9ec6881add395b93341a32e90546b2f7211f
2014-11-17 10:36:29 -07:00
Ms2ger 81e4c70e86 servo: Merge #4017 - Reformat sniffer_task.rs (from Ms2ger:sniffertask); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 9833cfbbffa79c74d9ee794e836c8007cd802c10
2014-11-17 07:57:29 -07:00
Shanil Puri f04b66f021 servo: Merge #3796 - Servo exit devtools: Send exit message to devtools on browser exit (from shanil-puri:ServoExitDevtools); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: d1eaa3adda5e59cc34822d6d1477b987796dfd62
2014-11-17 06:15:30 -07:00
Rohan Prinja 757be2eede servo: Merge #4014 - key[board]event args for Document#createEvent (from ajnirp:doc-createevent-keyevents); r=Manishearth
fix #4007

Source-Repo: https://github.com/servo/servo
Source-Revision: eeb11d68516c201d7c57508263517b69ef425273
2014-11-16 21:36:30 -07:00
Glenn Watson a9771bc8d8 servo: Merge #4012 - Update green-rs submodule to get android tls fix (from glennw:update-green-rs); r=mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: a51d08737a1f7337f6fad1d3f28b11345fed70e2
2014-11-16 20:21:28 -07:00
Glenn Watson f605e86196 servo: Merge #4013 - Redirect android resource folder (user-agent.css and friends) to /sdcard/servo (from glennw:android-resources); r=larsbergstrom
This is a temporary solution, until they are packaged properly.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1fd94adb3ddaa56c2e5fb41422960a8a433a6389
2014-11-16 18:12:28 -07:00
Patrick Walton 7ccbb6f29d servo: Merge #3990 - gfx: Rewrite display list construction to make stacking-contexts more first-class (from pcwalton:stacking-contexts); r=glennw
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
2014-11-16 16:39:27 -07:00
Ms2ger 6da7215f3a servo: Merge #4003 - Correct the checks in step 5 of Node::pre_insert (from Ms2ger:pre-insert); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 1a40a6bc82558d1ca4997c9b93379df26e2a951f
2014-11-16 07:24:28 -07:00
Andrew Hobden 9088de48aa servo: Merge #3998 - Fix Table Caption infinite recursion (from Hoverbear:fix_table_caption); r=jdm
Fixed #3997.

Source-Repo: https://github.com/servo/servo
Source-Revision: 561fab57d6ac23758f0150e043be28adda12c772
2014-11-15 13:24:28 -07:00
Mukilan Thiyagarajan f925eec2be servo: Merge #3941 - Allow passing arguments to setTimeout/setInterval callbacks (from mukilan:timeout-arguments); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 43b452f3b874c4bf0392ceaec27a0e40f18b5e34
2014-11-15 11:09:32 -07:00
Kshitij Parajuli e3913a40c6 servo: Merge #3766 - M1456, Implement MIME sniffing initial Step (from t29:mime-sniffing); r=jdm
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
2014-11-15 10:36:31 -07:00
Ms2ger 2aa3272664 servo: Merge #3979 - Use {Cell,RefCell}::as_unsafe_cell (from Ms2ger:as_unsafe_cell); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 7d3b76c60d2d5bd61cf6b48d09d769df77af293d
2014-11-14 15:48:35 -07:00
Tomasz Kołodziejski ddd49dfd1c servo: Merge #3953 - Add contentDocument support for HTMLIFrameElement. Fixes #3808 (from neojski:implement-HTMLIFrameElement.contentDocument); r=jdm
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
2014-11-13 23:54:28 -07:00
Manish Goregaokar c37a7ffe4c servo: Merge #3973 - Don't overwrite redirected URL in script_task (fixes #3970) (from Manishearth:301-fix); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 10cd7728ff0daa7d2e5e13d002d008b5049f389b
2014-11-13 17:45:29 -07:00
Josh Matthews 4d3016e023 servo: Merge #3585 - Implement single-line text input (from jdm:input); r=gw
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
2014-11-13 10:57:33 -07:00
Glenn Watson 22c4035692 servo: Merge #3948 - Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a (from servo:rustup-20141105_2); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: c5e1b0d32e17fad29799023c85e2e73ac89c3af7
2014-11-12 20:48:31 -07:00
Martin Robinson 8cec6a7fbe servo: Merge #3809 - Clip display list based on frame viewport (from mrobinson:display-list-optimization); r=pcwalton
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
2014-11-12 17:36:32 -07:00
Guillaume Bort 7f266cc2c6 servo: Merge #3938 - Fix #3933 (from guillaumebort:fix/3933); r=jdm
Implement HTMLOptionElement.{label,value}

Source-Repo: https://github.com/servo/servo
Source-Revision: 668d9217d8b8d999547fd1e8b690da8c8d80ddda
2014-11-12 15:15:38 -07:00
thiagopnts 67f027d5e5 servo: Merge #3955 - Move code related to json packet reading to JsonPacketSender trait (from thiagopnts:devtools-refactoring); r=jdm
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
2014-11-12 14:42:35 -07:00
Martin Robinson ec4079121d servo: Merge #3951 - Iframes (from mrobinson:iframes); r=jdm
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
2014-11-11 18:48:34 -07:00
Guillaume Bort 7ce46deae8 servo: Merge #3934 - Close #84 (from guillaumebort:fix/84); r=jdm
Actually `<img>` elements in `<noscript>` are not prefetched anymore.

Probably because html5ever already parses the `<noscript>` content as raw
text data if `scripting_enabled` is activated.

See https://github.com/servo/html5ever/blob/servo/src/tree_builder/rules.rs#L126

Also, added a test to the images cache.

Source-Repo: https://github.com/servo/servo
Source-Revision: b94f20c7c119302754c3e47ff8e69fe6edc94af1
2014-11-11 14:30:39 -07:00
Cameron Zwarich 92f13f320e servo: Merge #3958 - Remove unnecessary import of libgreen (from zwarich:remove-libgreen); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: f4471f06029ac03aa2ee26aa4398daaab9c6a371
2014-11-11 03:18:38 -07:00
Ms2ger 2c6798b469 servo: Merge #3949 - Fix the documentation comment for logical_geometry.rs (from Ms2ger:logical_geometry); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: f0184a2d011e12845258a242d2d2f6b8b504a28d
2014-11-10 05:33:35 -07:00
Shing Lyu e9f57feaf4 servo: Merge #3915 - Extract the script task handlers code into separate methods (from shinglyu:bug3811); r=jdm
This is a fix for bug #3811 , thank you.

Source-Repo: https://github.com/servo/servo
Source-Revision: fc62243f81ba4c5a3585b2a80c859fad16083557
2014-11-09 20:24:31 -07:00
Ms2ger 6fd7b67bf9 servo: Merge #3942 - Remove VoidVal (from Ms2ger:VoidVal); r=jdm
There are no undefined constants in IDL.

Source-Repo: https://github.com/servo/servo
Source-Revision: 182a9a70de44cbefcaeeb0e8d19e3831a83b40b3
2014-11-09 09:09:31 -07:00
Ms2ger f9c1183651 servo: Merge #3937 - Add missing documentation for bindings code (from Ms2ger:docs-bindings); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: fe11a75f794db47a66426456e1e904cf107cc41d
2014-11-07 10:57:30 -07:00
Tom Schuster 5efd3b3693 servo: Merge #3935 - Implement the whole Attr interface (from evilpie:master); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: c311ceea8c875df074b1dc6386a3430c01c48e5c
2014-11-07 07:30:31 -07:00
Mukilan Thiyagarajan 467520dfc0 servo: Merge #3917 - XHR - Trigger readystatechange when transitioning from HEADERS_RECEIVED to DONE (from mukilan:xhr-status-async); r=jdm
Fixes #3877

Source-Repo: https://github.com/servo/servo
Source-Revision: 338a9c3f054db0244185c3d85b47e427b6070e37
2014-11-06 19:00:29 -07:00
Glenn Watson 59a187f44d servo: Merge #3886 - Make media queries work with resize and page zoom (from glennw:mq); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: f775f12fe996718af94951c3c2457d896a213d96
2014-11-06 17:24:28 -07:00
Bruno de Oliveira Abinader 4e10132f16 servo: Merge #3884 - Implement DOMStringMap (from brunoabinader:dataset); r=jdm
This is a sub-task for #2974.

Source-Repo: https://github.com/servo/servo
Source-Revision: 46154fb7ace37e438bddb80bf1e12f4d1f0e00a1
2014-11-06 12:36:30 -07:00
nkdalmia 40995fc3f7 servo: Merge #3817 - M1450: Initial Step for Implement Window.sessionStorage and Window.localStorage (from nkdalmia:master); r=jdm
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
2014-11-06 10:51:40 -07:00
Patrick Walton b12f87d947 servo: Merge #3696 - layout: Implement a subset of CSS linear gradients per the CSS-IMAGES specification (from pcwalton:gradients); r=SimonSapin
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
2014-11-06 10:00:42 -07:00
Ms2ger 1e58536d48 servo: Merge #3914 - Implement HTMLElement#lang (from Ms2ger:lang); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 1225189a4bc46b2468b8a95f138b1d733b193093
2014-11-06 09:27:33 -07:00
Ms2ger d3215f62d3 servo: Merge #3912 - Remove the glob import from the HTML parser (from Ms2ger:parser-glob); r=jdm
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
2014-11-06 06:27:31 -07:00
Manish Goregaokar b52e311bec servo: Merge #3903 - Improve docs and #[must_root] checking in plugins crate (from Manishearth:plugin-fixes); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 57cb8a10f0f6ed445ed7ba88a3fa19d56bd7015e
2014-11-05 20:03:34 -07:00
Ms2ger 3262573f7c servo: Merge #3905 - Pay attention to the prefix in create_element when creating a non-HTML element (from Ms2ger:prefix-create); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 45262ec9d212088f2bafa95981099d25eaac77bb
2014-11-05 19:27:35 -07:00
Ms2ger 6e6d91192c servo: Merge #3901 - Implement HTMLElement.title (from Ms2ger:title); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: c9857d49ddc80196bed1267946f37dcb8ef4807d
2014-11-05 14:33:36 -07:00
Ms2ger c4c3870215 servo: Merge #3898 - Pass the correct argument to Element::create when cloning (from Ms2ger:prefix-clone); r=jdm
The current code calls as_slice() on the Option, yielding &[DOMString], and
then calls to_string, yielding "[prefix]".

Source-Repo: https://github.com/servo/servo
Source-Revision: 76cc006a40d7242e64c6c12f033127c569914e31
2014-11-05 12:57:37 -07:00
Keegan McAllister 989e60d8c9 servo: Merge #3900 - Only print HTML parse errors with RUST_LOG=script::parse (from kmcallister:parse-error); r=Ms2ger
r? @ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: 390e1115375fc887912961baff0ad626e7192cf8
2014-11-05 12:21:42 -07:00
Ms2ger 219d024c5d servo: Merge #3897 - Re-enable reflection-forms.html and make it not crash (from Ms2ger:enable-reflection); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: fba6cb9c429d5f27a1f7520bf2c35b58b0a8f250
2014-11-05 11:12:40 -07:00
Ms2ger b34ddd1c74 servo: Merge #3896 - Defer to GetAttribute in HasAttribute (from Ms2ger:attr-crash); r=jdm
The semantics of has_attribute aren't anywhere close to the ones expected for
Element#hasAttribute, and it fails an assertion when passed non-lower-case
names.

Source-Repo: https://github.com/servo/servo
Source-Revision: b27ec2b2231313055232bf9a55343d581e6ead98
2014-11-05 10:36:38 -07:00