Commit graph

924 commits

Author SHA1 Message Date
Anthony Ramine
6e75889e41 Fix DOMImplementation.hasFeature() 2015-04-27 23:11:53 +02:00
bors-servo
9ec2ce0dec Auto merge of #5868 - nox:document-legacy, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5868)
<!-- Reviewable:end -->
2015-04-27 13:06:29 -05:00
bors-servo
8a4555cc53 Auto merge of #5870 - SimonSapin:border-collapse, r=SimonSapin
Fixes #5300, which it is a rebase of.

Known issues:

* Collapsed borders do not correctly affect the border-box of the table
  itself.

* The content widths of all cells in a column and the content height of
  all cells in a row is the same in this patch, but not in Gecko and
  WebKit.

* Corners are not painted well. The spec does not say what to do here.

* Column spans are not handled well. The spec does not say what to do
  here either.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5870)
<!-- Reviewable:end -->
2015-04-27 12:29:15 -05:00
Ms2ger
93b883e1db Update web-platform-tests to revision acdb8bf3e4714528b6b5f9ff038dc80ee4fb7dcf 2015-04-27 18:48:44 +02:00
Patrick Walton
48299a53cb layout: Implement most of border-collapse per CSS 2.1 § 17.6.2.
Known issues:

* Collapsed borders do not correctly affect the border-box of the table
  itself.

* The content widths of all cells in a column and the content height of
  all cells in a row is the same in this patch, but not in Gecko and
  WebKit.

* Corners are not painted well. The spec does not say what to do here.

* Column spans are not handled well. The spec does not say what to do
  here either.
2015-04-27 17:12:07 +02:00
Anthony Ramine
16973624c8 Implement Body.bgColor and Document.bgColor 2015-04-27 15:28:37 +02:00
bors-servo
50eb08bcf7 Auto merge of #5841 - jdm:compositeopflaky, r=Ms2ger
...further investigation.

#5803 has been frustrating recently.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5841)
<!-- Reviewable:end -->
2015-04-25 09:45:04 -05:00
Josh Matthews
43ec47fa6e Disable canvas_compositing_globalcompositeoperation_001-ref.htm pending further investigation. 2015-04-25 10:34:09 -04:00
bors-servo
1f9de5ee2c Auto merge of #5779 - nox:css-escape, r=Ms2ger
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5779)
<!-- Reviewable:end -->
2015-04-25 05:42:41 -05:00
Anthony Ramine
31a26fa384 Implement the CSS interface 2015-04-25 12:36:38 +02:00
Patrick Walton
79336d21b5 style: Disregard the size attribute for input elements other than text
or password fields.

HTML5 § 4.10.5.3.2 doesn't explicitly say to do this, but all other
browser engines seem to do it.

Improves the Google home page.
2015-04-24 17:33:53 -07:00
Patrick Walton
8741d9e8c4 layout: Use a flag to record whether we need to perform a line break if
wrapping on newlines rather than searching for a newline character.

Since the newline character might have been stripped out during
whitespace stripping, this was incorrect.

Fixes the "jumpiness" seen on the Google home page, Wikipedia, and many
other places.
2015-04-24 13:16:34 -07:00
James Graham
291ac06c01 Update web-platform-tests expected data to revision 2a9fd810bb18610b422dbc3998ab74aa1bffae95 2015-04-24 18:31:05 +01:00
James Graham
f837e575fe Update to latest wptrunner (036c9931). 2015-04-24 15:37:45 +01:00
Dhananjay Nakrani
731411660c Implement HTMLMetaElement.{name,content} (fixes #5663). 2015-04-24 14:45:51 +02:00
Adenilson Cavalcanti
4f210eb8fe Fixing inline elements filtering rendering.
It required to move create_stacking_context() outside of BlockFlow,
as a method of FragmentDisplayListBuilding. This allowed the reuse
for inline fragments that need a stacking context.

As we now create stacking contexts (SC) for inline elements, this stresses
the code in Fragment that calculates the need for a SC.

For while, we create a SC only if there are filters associated with the
Inline element. Companion issue is #5812.
2015-04-23 12:32:18 -07:00
bors-servo
1b08211a5e Auto merge of #5806 - nox:splittext, r=Ms2ger
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5806)
<!-- Reviewable:end -->
2015-04-23 09:38:48 -05:00
Anthony Ramine
163d97d270 Implement Text.splitText() 2015-04-23 16:36:50 +02:00
bors-servo
68f03c9dbb Auto merge of #5805 - pcwalton:whitespace-effect-on-minimum-inline-sizes, r=glennw
Improves Amazon.

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5805)
<!-- Reviewable:end -->
2015-04-22 20:23:17 -05:00
Patrick Walton
f8b9b31680 layout: Take the white-space property into account when computing
intrinsic sizes of inline flows.

Improves Amazon.
2015-04-22 17:45:16 -07:00
Glenn Watson
d8aef7208e Refactored image cache task - details below.
* Simpler image cache API for clients to use.
 * Significantly fewer threads.
   * One thread for image cache task (multiplexes commands, decoder threads and async resource requests).
   * 4 threads for decoder worker tasks.
 * Removed ReflowEvent hacks in script and layout tasks.
   * Image elements pass a Trusted<T> to image cache, which is used to dirty nodes via script task. Previous use of Untrusted addresses was unsafe.
   * Image requests such as background-image on layout / paint threads trigger repaint only rather than full reflow.
 * Add reflow batching for when multiple images load quickly.
   * Reduces the number of paints loading wikipedia from ~95 to ~35.
 * Reasonably simple to add proper prefetch support in a follow up PR.
 * Async loaded images always construct Image fragments now, instead of generic.
   * Image fragments support the image not being present.
 * Simpler implementation of synchronous image loading for reftests.
 * Removed image holder.
 * image.onload support.
 * image NaturalWidth and NaturalHeight support.
 * Updated WPT expectations.
2015-04-23 09:40:24 +10:00
bors-servo
e278e5b9a2 Auto merge of #5757 - mmatyas:canvas_globalcomposite, r=jdm
Implements https://html.spec.whatwg.org/multipage/scripting.html#dom-context-2d-globalcompositeoperation.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5757)
<!-- Reviewable:end -->
2015-04-22 14:15:28 -05:00
Mátyás Mustoha
a8343a0750 Canvas: implement global composition and blending. 2015-04-22 20:54:27 +02:00
bors-servo
9ae3cad31e Auto merge of #5781 - jdm:reparent, r=Ms2ger
Fixes html5test.com.

r? @Ms2ger

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5781)
<!-- Reviewable:end -->
2015-04-22 13:01:32 -05:00
nithin murali
c5e101b6e5 Implement child reparenting and node removal during parsing. 2015-04-22 13:47:28 -04:00
Mátyás Mustoha
6fd6eefb35 Canvas: add clipping path support. 2015-04-22 16:25:02 +02:00
bors-servo
533949150b Auto merge of #5783 - Adenilson:ffBrokenImage01, r=mbrubeck
Got it from:
https://mxr.mozilla.org/mozilla-central/source/layout/generic/broken-image.png

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5783)
<!-- Reviewable:end -->
2015-04-21 19:01:38 -05:00
Adenilson Cavalcanti
0f5b5a5cd4 Using FF broken image icon.
Got it from:
https://mxr.mozilla.org/mozilla-central/source/layout/generic/broken-image.png
2015-04-21 16:04:28 -07:00
bors-servo
9974ebb2f9 Auto merge of #5547 - aweinstock314:x11-clipboard, r=jdm
Manual re-opening of #5479 (since it seems that GitHub disables re-opening with the same number after a rebase).

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5547)
<!-- Reviewable:end -->
2015-04-21 14:41:32 -05:00
Avi Weinstock
cf6aef5d51 Make the channel argument to TextInput::new be optional, to support the signature expected by the unit tests. 2015-04-21 15:18:23 -04:00
bors-servo
f795440ee3 Auto merge of #5776 - servo:split-unit-tests, r=mbrubeck
Closes #5707. (Includes a rebase of it.)
Fixes #5688.

r? @mbrubeck

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5776)
<!-- Reviewable:end -->
2015-04-21 14:06:22 -05:00
Simon Sapin
ce1f2bab7b Fix up the splitting of the unit tests crate.
Closes #5707. (Includes a rebase of it.)
Fixes #5688.
2015-04-21 20:22:10 +02:00
Prabhjyot Singh Sodhi
7b9c9e1453 Split up the unit tests crate 2015-04-21 20:05:53 +02:00
bors-servo
c8cb62058c Auto merge of #5761 - dhananjay92:Issue#5754, r=jdm
Solves Issue #5754.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5761)
<!-- Reviewable:end -->
2015-04-21 12:25:42 -05:00
Dhananjay Nakrani
72ab06a6ec Add test for createDocument(). [Issue#5754]. 2015-04-21 10:13:55 -07:00
Mátyás Mustoha
5287cb7fba Canvas: implement rectangle drawing. 2015-04-21 15:21:30 +02:00
bors-servo
e4b620ea54 Auto merge of #5652 - dmarcos:webgl, r=jdm
@jdm @ecoal95 I'm working on making VR happen in the Browser and I want to bring to Servo the [webVR APIs](https://github.com/MozVR/webvr-spec/blob/master/webvr.idl) we already have in Gecko. Before anything happens we need a working implementation of WebGL (and also the [fullscreen API](https://fullscreen.spec.whatwg.org/)). My implementation is very basic and probably naive (I just recently started to contribute to Servo). My patch is just a starting point: 

- It only implements ```clearColor``` and ```clear``` methods of the [WebGL spec](https://www.khronos.org/registry/webgl/specs/latest/).
- It uses the readback strategy that ```canvasRenderingContext2D``` is using (The webgl task paints stuff independently on it's own buffer and the compositor task request the pixels back to the webgl task when it needs them) I'm sure there are much better ways to handle this. Latency and FPS are critical in VR so we have to figure out the fastest way to push pixels to the screen. I've read something about layerizing the canvas but I'm still not sure what that even means :)
- There's an included test you can try ```./mach run tests/ref/webgl-context/clearcolor.html``` 

@ecoal95 I know you'll be working on this for the next three months. With a foundation in place we will be able to make quick progress in parallel. This is exciting!

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5652)
<!-- Reviewable:end -->
2015-04-20 19:29:02 -05:00
Josh Matthews
a1c4f49da8 Disable intermittently-passing test pending further investigation. #5764 2015-04-20 19:54:38 -04:00
Diego Marcos
c82485874d Kicks off a WebGL implementation 2015-04-20 14:29:39 -07:00
Ms2ger
dd9351d722 Parse attributes according to the specification in AttrValue::from_u32.
This exposes another bug: "-0" failed to parse with str.parse(), and is now
successfully parsed into 0. However, input.size and textarea.{rows, cols} are
supposed to be "limited to only non-negative numbers greater than zero", so 0
is not actually supposed to be accepted.
2015-04-20 10:51:44 +02:00
Mátyás Mustoha
5b8416a2b6 Canvas: implement context state save/restore. 2015-04-19 21:12:13 +02:00
bors-servo
f164cc253e Auto merge of #5742 - marcusklaas:issue-5718, r=jdm
This closes issue https://github.com/servo/servo/issues/5718.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5742)
<!-- Reviewable:end -->
2015-04-19 10:10:57 -05:00
Marcus Klaas
c1f25bbfe4 Replace usage of ResponseSenders by LoadConsumer 2015-04-19 13:26:56 +02:00
Ms2ger
0042f78aa7 Use get_attr_for_layout in get_classes_for_layout.
This fixes a bug with elements with multiple class attributes. In this case,
the class attribute in the null namespace would only be considered if it was
the first class attribute in the list.
2015-04-18 17:51:03 +02:00
Ms2ger
21d3ddabbf Add a test for the class selector with multiple class attributes. 2015-04-18 17:50:25 +02:00
bors-servo
2b3acd1f5d Auto merge of #5734 - marcusklaas:issue-5709, r=jdm
This closes issue https://github.com/servo/servo/issues/5709.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5734)
<!-- Reviewable:end -->
2015-04-17 09:52:46 -05:00
Marcus Klaas
0d482e36e6 Fix compiler warnings in net unit tests 2015-04-17 16:44:51 +02:00
Ms2ger
25e8bc8ed8 Move the lookupPrefix content test. 2015-04-17 13:53:18 +02:00
bors-servo
4fd4370a96 Auto merge of #5721 - nox:nodeorstring, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5721)
<!-- Reviewable:end -->
2015-04-16 14:47:32 -05:00
bors-servo
e26219828b Auto merge of #5717 - Ms2ger:usp, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5717)
<!-- Reviewable:end -->
2015-04-16 14:15:16 -05:00