Commit graph

5280 commits

Author SHA1 Message Date
bors-servo
c78da15abb Auto merge of #8314 - jdm:timeoutinvestigations, r=metajack
Investigations for #7787

I'm just going to keep throwing stuff at try, because running directly on the builders isn't yielding results.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8314)
<!-- Reviewable:end -->
2015-11-05 04:08:30 +05:30
bors-servo
50e0c36eeb Auto merge of #8318 - eefriedman:dead-sync-load, r=jdm
Remove dead load_sync function.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8318)
<!-- Reviewable:end -->
2015-11-05 03:21:04 +05:30
bors-servo
dc159d055c Auto merge of #8322 - mrobinson:iframe-resizing, r=pcwalton
Properly resize iframe root layers

When a layer containing an iframe changes, we also need to resize the
root layer of the subpage. This ensures that content from the child
layer tree is masked to the new size.

Fixes #8301.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8322)
<!-- Reviewable:end -->
2015-11-05 02:23:43 +05:30
bors-servo
b39035c60e Auto merge of #8243 - eefriedman:canvas-width-height, r=Ms2ger
Simplify implementation of '<canvas>' 'width' and 'height' attributes.

Strictly speaking, this affects correctness for extremely large width and height values... but that's unlikely to matter in practice.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8243)
<!-- Reviewable:end -->
2015-11-04 23:22:09 +05:30
Josh Matthews
19a1e57c90 Add debugging information when running tests that timeout on build machines. 2015-11-04 12:26:41 -05:00
bors-servo
b4d234107e Auto merge of #7128 - Ms2ger:bc-root, r=jdm
Make BrowsingContext JS-managed.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7128)
<!-- Reviewable:end -->
2015-11-04 22:38:51 +05:30
bors-servo
df4e614179 Auto merge of #8321 - servo:reset-zero, r=Ms2ger
counter-reset defaults to 0, not 1.

https://drafts.csswg.org/css2/generate.html#counters

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8321)
<!-- Reviewable:end -->
2015-11-04 17:52:23 +05:30
Ms2ger
f86502f80c Make BrowsingContext JS-managed. 2015-11-04 12:30:13 +01:00
Ms2ger
6b75078503 Make DOMString a newtype around String, rather than a typedef.
This should make it somewhat easier to experiment with alternative
representations in the future. To reduce churn, this commit leaves the String
field public, though.

Also, this will allow us to use the default String type to represent the IDL
USVString type, which explicitly forbids unpaired surrogates, ans as such is
a better match to the Rust String type.
2015-11-04 12:09:11 +01:00
Ms2ger
e6aa976462 Use DOMString::new() somewhat consistently. 2015-11-04 12:09:10 +01:00
Simon Sapin
80dbd29528 counter-reset defaults to 0, not 1. 2015-11-04 10:55:16 +01:00
Simon Sapin
75bc88b3d4 Counter names serialize as identifiers, not strings. 2015-11-04 10:29:25 +01:00
bors-servo
b6850853da Auto merge of #8202 - dzbarsky:getComputedStyle, r=pcwalton
Allow retrieving width/height for non-positioned elements

This was causing a bunch of tests in tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes* to fail.  They were returning "auto" instead of the correct size. They still fail because the returned size is off by a few pixels, not sure why yet. But this is more correct and may fix other failing tests.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8202)
<!-- Reviewable:end -->
2015-11-04 13:32:15 +05:30
David Zbarsky
d95ca55f26 Allow retrieving width/height for non-positioned elements 2015-11-03 20:13:09 -08:00
David Zbarsky
722aa86c89 Get rid of a bunch of explicit derefs 2015-11-03 19:51:46 -08:00
bors-servo
ca56ebbb09 Auto merge of #8306 - glennw:fix-abd-overflow, r=pcwalton
Change overflow calculation to be calculated after compute_absolute_position.

Also include absolutely positioned elements in the overflow rect calculation.

Fixes #7797.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8306)
<!-- Reviewable:end -->
2015-11-04 08:15:58 +05:30
bors-servo
86e3add8fd Auto merge of #8266 - mrobinson:stacking-context-mix, r=pcwalton
Mix stacking contexts into the positioned content list

Sometimes positioned content needs to be layered on top of stacking
contexts. The layer synthesis code can do this, but the current design
prevents it because stacking contexts are stored in a separate struct
member. In order to preserve tree order, mix stacking contexts into the
positioned content list, by adding a new StackingContextClass
DisplayItem. Such items do not have a base DisplayItem.

In some ways this simplifies the code, because we no longer have to
have a separate code path in the StackingContextLayerCreator.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8266)
<!-- Reviewable:end -->
2015-11-04 07:22:43 +05:30
Martin Robinson
c1a38e240a Mix stacking contexts into the positioned content list
Sometimes positioned content needs to be layered on top of stacking
contexts. The layer synthesis code can do this, but the current design
prevents it because stacking contexts are stored in a separate struct
member. In order to preserve tree order, mix stacking contexts into the
positioned content list, by adding a new StackingContextClass
DisplayItem. Such items do not have a base DisplayItem.

In some ways this simplifies the code, because we no longer have to
have a separate code path in the StackingContextLayerCreator.

Fixes #7779.
Fixes #7983.
Fixes #8122.
Fixes #8310.
2015-11-03 17:47:39 -08:00
bors-servo
36c5dd4c8c Auto merge of #8299 - pcwalton:dont-reflow-on-hover, r=mbrubeck
Fix several bugs causing the page to reflow on every mouse move event

After all these changes are applied, Hacker News and GitHub only repaint and reflow nodes that actually have hover styles applied when the mouse moves over them.

r? @mbrubeck 

cc @bholley

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8299)
<!-- Reviewable:end -->
2015-11-04 06:28:46 +05:30
bors-servo
e91169c0e2 Auto merge of #8265 - fiji-flo:password_caret, r=eefriedman
add get_raw_layout_value (HTMLInputElementHelpers)

This resolves #8107
Previously the index of the insetion point for a password input was
calculated using the scrambled string based on the edit point in the
raw string. That could lead to a wrong position of the caret. This
commit changes this behavior to calculate the insertion point using
the raw string.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8265)
<!-- Reviewable:end -->
2015-11-04 05:29:59 +05:30
Martin Robinson
261246ea25 Properly resize iframe root layers
When a layer containing an iframe changes, we also need to resize the
root layer of the subpage. This ensures that content from the child
layer tree is masked to the new size.

Fixes #8301.
2015-11-03 15:28:07 -08:00
Florian Merz
a918df9e6f change comments to complete sentences 2015-11-03 23:53:34 +01:00
bors-servo
daad09d442 Auto merge of #8221 - wenderen:8130-reorganise, r=jdm
move modules around

for #8130

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8221)
<!-- Reviewable:end -->
2015-11-04 02:56:02 +05:30
Patrick Walton
6633773a58 layout: Minor whitespace cleanup. 2015-11-03 13:12:47 -08:00
Patrick Walton
34611f126d layout: Dump damage as well as part of the flow tree debug spew. 2015-11-03 13:12:46 -08:00
Patrick Walton
3ae5f04bd1 layout: Store viewport and screen size separately.
Fixes a bug whereby all nodes would get unconditionally reflowed on
every layout event if the page set a viewport.
2015-11-03 13:12:45 -08:00
Florian Merz
c26b80cf4f add get_insertion_point_index_for_layout
This resolves #8107
Previously the index of the insetion point for a password input was
calculated using the scrambled string based on the edit point in the
raw string. That could lead to a wrong position of the caret. This
commit changes this behavior to calculate the insertion point using
the raw string.
This is done in
`HTMLInputElementHelpers::get_insertion_point_index_for_layout`
and relies on a 1:1 mapping of the chars in the raw input to the
scrambled chars (currently bullets) in the password input.
2015-11-03 21:55:41 +01:00
Eli Friedman
193d8f2dba Remove dead load_sync function. 2015-11-03 12:01:09 -08:00
bors-servo
bb911d772e Auto merge of #8303 - nfallen:6638-http_loader, r=eefriedman
Refactor code dealing with headers of requests and responses #6638

Extract the code in load in http_loader.rs that specifically deals with modifying the headers for a request into a separate function. Extract the code that deals with processing the headers for a response into a separate function. This will enable use by websocket code when starting a websocket connection is refactored out of the content process.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8303)
<!-- Reviewable:end -->
2015-11-04 00:21:29 +05:30
bors-servo
3fdaa6e3f3 Auto merge of #8232 - mbrubeck:glutin-touch, r=glennw
Correct event dispatching for multiple simultaneous touch points

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)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8232)
<!-- Reviewable:end -->
2015-11-03 22:45:21 +05:30
Matt Brubeck
ef93650db9 Handle multi-touch events from glutin 2015-11-03 08:56:34 -08:00
Nova Fallen
00528f1f1f Refactor code dealing with headers of requests and responses into separate functions to enable use by websocket code 2015-11-03 11:17:53 -05:00
bors-servo
5070c873d0 Auto merge of #8111 - gilles-leblanc:issue-8002, r=SimonSapin
Compute value of float according to position value

According to CSS2 Section 9.7, if 'position' has a value of 'absolute'
or 'fixed' the computed value of 'float' should be 'none'.

This changes the float to a single_keyword_computed which checks the
positioned value of the element to compute the float value.

Fixes #8002

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8111)
<!-- Reviewable:end -->
2015-11-03 21:39:32 +05:30
Alan Jeffrey
d3ea0a0256 Removced unncessary call to dirty() in Document::node_and_heritage_change, since the node is aready dirtied by force_dirty_ancestors(). 2015-11-03 09:08:13 -06:00
bors-servo
27fb2ed26d Auto merge of #8300 - pcwalton:avoid-animation-state-flooding, r=glennw
layout: Avoid flooding the compositor with animation state changes if there are no animations running and no new animations were added.

Avoids compositor jank during scroll.

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8300)
<!-- Reviewable:end -->
2015-11-03 18:25:33 +05:30
bors-servo
1794e5875a Auto merge of #8295 - Ms2ger:cleanup, r=jdm
Various cleanup.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8295)
<!-- Reviewable:end -->
2015-11-03 16:28:14 +05:30
rohan.prinja
425c0b85d9 make test-tidy happy + fix some merge errors 2015-11-03 19:11:01 +09:00
Glenn Watson
695b7491fe Change overflow calculation to be calculated after compute_absolute_position.
Also include absolutely positioned elements in the overflow rect calculation.

Fixes #7797.
2015-11-03 20:10:06 +10:00
rohan.prinja
6e774ea6eb merge from master 2015-11-03 19:01:23 +09:00
bors-servo
9a800becdf Auto merge of #8239 - Ms2ger:ScriptReflow, r=pcwalton
Remove unused code around ScriptReflow.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8239)
<!-- Reviewable:end -->
2015-11-03 15:29:17 +05:30
Eli Friedman
4fc0a66ba1 Simplify implementation of '<canvas>' 'width' and 'height' attributes. 2015-11-02 18:33:39 -08:00
Patrick Walton
8d58197bf0 layout: Avoid flooding the compositor with animation state changes if
there are no animations running and no new animations were added.

Avoids compositor jank during scroll.
2015-11-02 16:34:17 -08:00
Eli Friedman
df7fb8fa32 Remove JSTraceable implementation from RefCell.
The implementation wasn't really right, and we would rather just use
DOMRefCell anyway.
2015-11-02 14:40:57 -08:00
Ms2ger
d3d1f2b5c4 Simplify DOMTokenList::Item. 2015-11-02 16:04:50 +01:00
Ms2ger
13291c4b64 Avoid some string copies in handle_modify_attribute. 2015-11-02 16:04:49 +01:00
bors-servo
5c11c88e92 Auto merge of #8294 - Ms2ger:layout-input, r=jdm
Remove RawLayoutHTMLInputElementHelpers.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8294)
<!-- Reviewable:end -->
2015-11-02 19:44:51 +05:30
bors-servo
3282174a99 Auto merge of #8291 - ecoal95:webgl-drop, r=jdm
Add destructors to some WebGL objects, remove duplicated glutin dependency and try to enable the webgl reftests

The first commit allows to cleanup the gl resources of the webgl task earlier if they aren't being used.
Right now all resources were cleaned up when the context was destroyed, so I think this is
a slightly better approach.

The second commit bumps rust-offscreen-rendering-context to remove the duplicated glutin dependency.

The third one tries to reenable the webgl reftests.
Since the errored builds are deleted, It's the only way I can try to troubleshoot it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8291)
<!-- Reviewable:end -->
2015-11-02 18:52:33 +05:30
Ms2ger
0dacd33102 Remove RawLayoutHTMLInputElementHelpers. 2015-11-02 11:42:39 +01:00
bors-servo
50d51bab7f Auto merge of #8245 - eefriedman:misc-attribute-fixes, r=nox
Use attribute getter/setter macros for misc DOM attributes.

This fixes a few minor bugs.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8245)
<!-- Reviewable:end -->
2015-11-02 15:14:32 +05:30
David Zbarsky
00980ea595 Implement calc expressions for more value types 2015-11-01 23:16:14 -08:00