Commit graph

21295 commits

Author SHA1 Message Date
bors-servo
90007ee781 auto merge of #4064 : trevorriles/servo/isintervalenum, r=jdm
Created an `IsInterval` enum to improve readability and remove the need for `true // is_interval`

I'm still fairly new to rust. I briefly looked for a way to implement boolean comparisons of the enum but didn't figure out a way. 

Also I'm not attached to any of the names. Let me know what I can fix :)
2014-11-23 21:36:37 -07:00
Kshitij Parajuli
9eda82f4a3 Break out of loop if can't send data
Fixes #4046
2014-11-23 12:47:20 -05:00
Manish Goregaokar
534919327d Use atom! in place of Atom::from_slice where necessary 2014-11-23 22:03:27 +05:30
bors-servo
d215ff7867 auto merge of #4067 : wenderen/servo/document-create-attribute, r=Manishearth
fixes #4054
2014-11-23 08:21:37 -07:00
Rohan Prinja
4b754bd457 implement Document#createAttribute 2014-11-23 14:51:04 +05:30
Patrick Walton
95b57f55cd layout: Fix De Morgan's Law error in incremental reflow, allowing
float/absolute layout layout to be idempotent again.

Fixes the maze solver.
2014-11-21 20:53:59 -08:00
Mike Blumenkrantz
0341444ce9 util::opts::default_opts() is now pub 2014-11-21 21:52:56 -05:00
Trevor Riles
0cba3eec62 remove comments now that we have more descriptive names 2014-11-21 15:12:52 -06:00
Trevor Riles
89f1949913 Use an enum to set set_timeout_or_interval's is_interval field. Fixes #4059 2014-11-21 15:10:27 -06:00
Bruno de Oliveira Abinader
6f2af793e8 Arc::make_unique is now stable 2014-11-21 10:45:35 -04:00
Bruno de Oliveira Abinader
b9f974ab33 No longer need for local variable in PropertyDeclaration::parse 2014-11-21 10:40:21 -04:00
bors-servo
c23bfdf1c5 auto merge of #4050 : mttr/servo/implement_attr_nodevalue, r=Ms2ger
Fixes #4047, and updates to expect tests that are now passing because of it.
2014-11-20 17:18:29 -07:00
Glenn Watson
898c1ecc8f Remove unused exit after load option.
This simplifies some upcoming changes to how event handling works.
2014-11-21 09:15:02 +10:00
Matthew Rasmus
73721cd189 Implement Attr#nodeValue
Fixes #4047
2014-11-20 13:18:10 -08:00
bors-servo
9da7f10c3c auto merge of #3964 : mrobinson/servo/code-duplication, r=larsbergstrom
It is possible to share the code which creates root layers.
2014-11-19 09:00:47 -07:00
bors-servo
554f696db8 auto merge of #4035 : glennw/servo/remove-rust-alert, r=pcwalton 2014-11-18 21:30:27 -07:00
Glenn Watson
c39852a3f4 Remove rust-alert as it's broken on mac, and unimplemented on other platforms. 2014-11-19 14:19:40 +10:00
Patrick Walton
55da2c97d5 layout: Incrementalize reflow of block formatting contexts impacted by
floats, and make float placement idempotent.

This moves float placement outside sequential block size computation.

Improves the maze solver.
2014-11-18 15:36:04 -08:00
Patrick Walton
be36fcd3b1 layout: Eliminate the virtual is_float() in favor of the flow flags 2014-11-18 15:36:04 -08:00
bors-servo
f5c6146de0 auto merge of #4028 : glennw/servo/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.
2014-11-18 15:48:29 -07:00
Glenn Watson
0278920343 Add glutin port (supported on Linux only currently).
Default build uses glfw, but glutin can be enabled via:

./mach cargo build --no-default-features --features=glutin
2014-11-19 08:31:34 +10:00
bors-servo
e13873bba1 auto merge of #4015 : letharion/servo/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.
2014-11-18 11:42:32 -07:00
Claes 'Letharion' Gyllensvärd
2737db3ad7 Remove bitfield! macro in favour of bitflags! 2014-11-18 19:26:10 +01:00
Achal Shah
712b3d0f5b Stop including the element during Element.getElementsByClassName.
https://github.com/servo/servo/issues/3995
2014-11-18 07:20:07 -08:00
bors-servo
efb4fe4a4a auto merge of #4027 : znewman01/servo/issue4010, r=Ms2ger
Fixes #4010.

This is my first Servo contribution, so let me know if I missed anything!
2014-11-18 07:54:33 -07:00
bors-servo
929671f945 auto merge of #4029 : znewman01/servo/issue4009, r=Ms2ger
Fixes #4009.

Only lower-case the argument to Document#createElement if it's a HTML document.
2014-11-18 07:15:34 -07:00
Zachary Newman
2399a1449d Implement DOMImplementation.hasFeature
Fixes #4010.
2014-11-18 09:00:45 -05:00
Claes 'Letharion' Gyllensvärd
d84c0fc52a Lower case the type attribute before checking if it's JS 2014-11-18 08:39:59 +01:00
Zachary Newman
a8ce3e3366 Update behavior of Document.createElement
Fixes #4009.

Only lower-case the argument to Document#createElement if it's a HTML document.
2014-11-17 21:21:46 -05:00
Ms2ger
4d3977b8f8 Various cleanup in constellation.rs. 2014-11-17 18:27:22 +01:00
bors-servo
9833cfbbff auto merge of #4017 : Ms2ger/servo/sniffertask, r=jdm 2014-11-17 07:57:29 -07:00
Ms2ger
d8b0f973b0 Reformat sniffer_task.rs. 2014-11-17 15:49:45 +01:00
bors-servo
d1eaa3adda auto merge of #3796 : shanil-puri/servo/ServoExitDevtools, r=jdm 2014-11-17 06:15:30 -07:00
Shanil Puri
d6e99cb269 Spacing changes corrected. 2014-11-17 00:55:41 -05:00
bors-servo
eeb11d6851 auto merge of #4014 : wenderen/servo/doc-createevent-keyevents, r=Manishearth
fix #4007
2014-11-16 21:36:30 -07:00
Rohan Prinja
aad124fce3 key[board]event args for Document#createEvent 2014-11-17 09:37:05 +05:30
bors-servo
a51d08737a auto merge of #4012 : glennw/servo/update-green-rs, r=mbrubeck 2014-11-16 20:21:28 -07:00
Glenn Watson
a1de810dd3 Add missing gfx dependency, that was causing a race in cargo on the build machine. 2014-11-17 12:13:58 +10:00
bors-servo
1fd94adb3d auto merge of #4013 : glennw/servo/android-resources, r=larsbergstrom
This is a temporary solution, until they are packaged properly.
2014-11-16 18:12:28 -07:00
Glenn Watson
e4bc2ca82a Redirect android resource folder (user-agent.css and friends) to /sdcard/servo. This is a temporary solution, until they are packaged properly. 2014-11-17 09:51:13 +10:00
bors-servo
397d8138e7 auto merge of #3990 : pcwalton/servo/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
2014-11-16 16:39:27 -07:00
Ms2ger
859f14f38b Correct the checks in step 5 of Node::pre_insert. 2014-11-16 12:40:42 +01:00
bors-servo
561fab57d6 auto merge of #3998 : Hoverbear/servo/fix_table_caption, r=jdm
Fixed #3997.
2014-11-15 13:24:28 -07:00
bors-servo
43b452f3b8 auto merge of #3941 : mukilan/servo/timeout-arguments, r=Ms2ger 2014-11-15 11:09:32 -07:00
Andrew Hobden
a70543c2a3 Fix Table Caption infinite recursion. 2014-11-15 09:37:44 -08:00
bors-servo
796258114b auto merge of #3766 : t29/servo/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.
2014-11-15 10:36:31 -07:00
Mukilan Thiyagarajan
4b2b0d0723 Allow passing arguments to setTimeout/setInterval callbacks 2014-11-15 18:32:12 +05:30
Mukilan Thiyagarajan
05bd182538 Fix binding generation for Callback Functions and Callback Interfaces 2014-11-15 18:29:48 +05:30
Patrick Walton
a4a9a46a87 gfx: Rewrite display list construction to make stacking-contexts more
first-class.

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.
2014-11-14 17:31:15 -08:00
Ms2ger
86d609abaf Use RefCell in DOMRefCell to reduce duplicated code. 2014-11-14 21:18:43 +01:00