Commit graph

144 commits

Author SHA1 Message Date
bors-servo
b4b3cedc10 Auto merge of #7724 - glennw:expire-anims, r=pcwalton
Ensure that animations expire correctly and stop compositing occurring after they finish.

There were two problems here:

(1) The animation state update function was only called when nodes were dirty or there were new animations.
(2) When all animations for a node expired, the entry from the hash table was not removed.

The result was that once an animation began, the compositor would be running as fast as it can forever.

Fixes #7721.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7724)
<!-- Reviewable:end -->
2015-09-23 18:46:29 -06:00
Glenn Watson
f6cb6c3b86 Ensure that animations expire correctly and stop compositing occurring after they finish.
There were two problems here:
(1) The animation state update function was only called when nodes were dirty or there were new animations.
(2) When all animations for a node expired, the entry from the hash table was not removed.

The result was that once an animation began, the compositor would be running as fast as it can forever.

Fixes #7721.
2015-09-24 10:29:58 +10:00
Ravi Shankar
889eec364b sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
Manish Goregaokar
3c969b346a Upgrade rust to f93ab64d4a1a7ee91759a1594ab2a426b6cc657e/rustc-1.5.0-dev. 2015-09-23 14:44:59 +02:00
Brandon Fairchild
de3547e401 Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Martin Robinson
1e6f797268 Ensure unique LayerIds for pseudo-elements
Currently pseudo-elements, like the fragments created for ::before and
::after, with layers will have the same LayerId as the body of their
owning fragments. Instead all LayerIds should be unique.

Fixes #2010.
2015-09-17 06:42:29 -07:00
Anthony Ramine
f11fcebd9c Bump euclid to 0.2 2015-09-12 01:06:26 +02:00
Martin Robinson
184238c348 Layerize StackingContexts that are on top of layers
StackingContexts that should be painted on top of StackingContexts that
are already layerized should automatically get their own layer. This
will ensure proper painting order.
2015-09-09 09:13:14 -07:00
bors-servo
8e0b010117 Auto merge of #7487 - mrobinson:paint-layer-upgrade, r=pcwalton
Have PaintLayers own StackingContexts instead of the opposite

Previously, StackingContexts might have a PaintLayer. We switch the
ownership, for several reasons:

   * We want PaintLayers to potentially contain something other
     than a StackingContext soon.
   * We want to delay the creation of PaintLayers until the last
     minute, so that we can synthesize new layers for sandwiched
     content.

This commit also implements the second goal. Instead of creating
PaintLayers during layout itself, wait until we are sorting and
layerizing a completed DisplayList.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7487)
<!-- Reviewable:end -->
2015-09-04 17:31:54 -06:00
Martin Robinson
4ca93c39d6 Have PaintLayers own StackingContexts instead of the opposite
Previously, StackingContexts might have a PaintLayer. We switch the
ownership, for several reasons:

   * We want PaintLayers to potentially contain something other
     than a StackingContext soon.
   * We want to delay the creation of PaintLayers until the last
     minute, so that we can synthesize new layers for sandwiched
     content.

This commit also implements the second goal. Instead of creating
PaintLayers during layout itself, wait until we are sorting and
layerizing a completed DisplayList.
2015-09-04 15:07:09 -07:00
João Oliveira
4a305d1e62 Add style_traits crate to improve crate separation,
closes #7353
2015-09-04 12:59:37 +01:00
farodin91
f0987380dd Implement viewport functions for window #1718 2015-09-02 00:40:52 +02:00
erneyja
17663315dd make test-tidy check that = have space after them 2015-09-01 07:18:19 -04:00
Johann Tuffe
ec07178b6f sort all uses 2015-08-20 20:47:12 +08:00
vectorijk
14ac1ef75a remove ScriptListener
ref #7175
2015-08-16 01:34:55 -07:00
Bogdan Cuza
45145108da Measure heap memory usage for more types. Fixes #6951 2015-08-13 21:44:41 +03:00
Patrick Walton
300315bb78 compositing: Add some layer tree debugging infrastructure. 2015-08-10 21:27:04 -07:00
Patrick Walton
df4acbac04 layout: Implement basic overflow: scroll functionality.
Known issues:

* Display list optimization can sometimes optimize out elements that
  should be shown. This affects the Enyo demo.

* The `overflow: scroll` container doesn't clip the inner layer properly
  when borders, border radius, etc. are present.

* `overflow-x: scroll` and `overflow-y: scroll` don't work individually;
  elements are scrolled all at once.

* Scrolling only works on absolutely-positioned elements.
2015-08-10 21:27:04 -07:00
Glenn Watson
30d9e75557 Update rust-layers to get 2d transform + clipping support. 2015-08-11 08:48:44 +10:00
Patrick Walton
6b32e5d7a7 servo: Update ipc-channel to pick up bincode support.
Large improvement in page load times, especially in debug builds.
2015-08-08 09:43:53 -07:00
James Graham
36da7e2270 Add DOMLoad message to constellation that is sent after the DOM Load event is dispatched. 2015-08-07 16:55:13 +01:00
Josh Matthews
8620fe5995 Start reporting memory usage for Window and all nodes in all DOM trees for frame treese in script tasks. 2015-08-03 23:05:00 -04:00
Bruno de Oliveira Abinader
b3927d5a2d Implement Msg::Status with serialized url upon mouseover
Credits for Mike Blumenkrantz (@zmike), I just rebased against trunk and
fixed the url serialization.

Fixes #6178.
2015-07-30 16:37:54 +03:00
bors-servo
b90fd5931d Auto merge of #6812 - ecoal95:webgl-fail, r=jdm
webgl: Make context creation fallible. Fixes #6806



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6812)
<!-- Reviewable:end -->
2015-07-29 15:29:58 -06:00
Avi Weinstock
f86252a60b Add set_clipboard_context function and relevant plumbing. Use Option more consistantly (less unwraps) in textinput's selection handling. 2015-07-29 12:19:37 -04:00
ecoal95
bc908458ff webgl: Make context creation fallible. Fixes #6806 2015-07-28 17:34:23 +02:00
Patrick Walton
bb99b2f3c8 script: Make most of 2D canvas and WebGL run over IPC.
To actually make the multiprocess communication work, we'll need to
reroute the task creation to the pipeline or the compositor. But this
works as a first step.
2015-07-25 00:50:12 -07:00
Bogdan Cuza
0baa6b477c Replace astersisks with appropriate versions in deps 2015-07-20 20:08:08 +03:00
James Graham
f44470ef52 Ensure we get the post-redirect url 2015-07-19 20:40:55 +01:00
James Graham
f28219b8cb Implement WebDriver Refresh command 2015-07-19 13:01:08 +01:00
James Graham
9eade19897 Add support for the Get URL WebDriver command. 2015-07-19 12:55:06 +01:00
Patrick Walton
b6485a9eaf compositing: Make the constellation messages serializable. 2015-07-18 12:43:08 -07:00
Patrick Walton
6eacb0c995 gfx: Make display lists serializable using serde.
This commit introduces the `serde` dependency, which we will use to
serialize messages going between processes in multiprocess Servo.

This also adds a new debugging flag, `-Z print-display-list-json`,
allowing the output of display list serialization to be visualized.
This will be useful for our experiments with alternate rasterizers.
2015-07-15 19:04:17 -07:00
Simon Sapin
83d2a11d86 Upgrade to rustc 1.3.0-dev (fddfd089b 2015-07-10) 2015-07-15 00:46:43 +02:00
Patrick Walton
9ce65c08a5 layout: Make the LayoutControlChan use IPC. 2015-07-14 13:45:52 -07:00
Patrick Walton
e841065351 compositing: Move messages that go over the ScriptListener to go over
an IPC channel instead.

Because this used a boxed trait object to invoke messages across a
process boundary, and boxed trait objects are not supported across IPC,
we spawn a helper thread inside the compositor to perform the marshaling
for us.
2015-07-14 12:12:19 -07:00
Martin Robinson
e115c3d3c4 Move LayerBuffer cache to the compositor
Now that NativeDisplay can be shared between the compositor and the
paint task, we can move the LayerBuffer cache to the compositor. This
allows surfaces to be potentially reused between different paint tasks
and will eventually allow OpenGL contexts to be preserved between
instances of GL rasterization.
2015-07-08 08:05:11 -07:00
bors-servo
4674afe846 Auto merge of #6525 - mrobinson:simplify-display, r=glennw
Update to latest rust-layers

The compositing context, painting context and display metadata have all
been collapsed into a single NativeDisplay class.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6525)
<!-- Reviewable:end -->
2015-06-30 17:02:26 -06:00
Martin Robinson
0f27bd6c4b Update to latest rust-layers
The compositing context, painting context and display metadata have all
been collapsed into a single NativeDisplay class.
2015-06-30 21:58:54 -07:00
Jesse Ruderman
1ff4fe02d9 Add keyboard shortcuts to glutin browser 2015-06-27 03:06:18 -07:00
Glenn Watson
39ddbbb0e1 Implement enough of 3d transforms spec to run the CSS FPS demo. 2015-06-23 14:10:44 +10:00
ecoal95
8cbfb3482c Use euclid from crates.io 2015-06-19 00:04:24 +02:00
James Graham
22c06307b8 Implement timeout for url load from WebDriver. 2015-06-17 00:25:23 +01:00
Jack Moffitt
b5ebbaefe3 Clean up dependencies. 2015-06-07 12:14:38 -06:00
Corey Farwell
a14c745a6a Bump rust-url version: 0.2.16 → 0.2.35 2015-06-04 16:45:15 -04:00
bors-servo
b0f3417cff Auto merge of #6219 - zmike:favicons_and_stringlOWWW-MY-HEAD, r=pcwalton
Getting these down to the embedding API level required that I redo the bindings generator again, so this is more commits than anticipated.

@mbrubeck @Manishearth @pcwalton but NOT @larsbergstrom so don't even look at this.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6219)
<!-- Reviewable:end -->
2015-06-03 00:27:41 -05:00
Mike Blumenkrantz
ffa2093012 add window method for notifying when the <head> tag has been parsed 2015-06-02 22:16:28 -04:00
Mike Blumenkrantz
12f20f1ecc add handling for favicon link elements
fixes #6166
2015-06-02 22:16:25 -04:00
bors-servo
0b7886b15f Auto merge of #6161 - jgraham:webdriver_stability, r=glennw
This fixes various race conditions that affect test execution when using the servodriver product. It doesn't yet do enough to make servodriver a viable alternative to the normal servo test executor.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6161)
<!-- Reviewable:end -->
2015-06-02 21:11:44 -05:00
bors-servo
20f63459ef Auto merge of #6254 - servo:rustup_20150601, r=SimonSapin
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6254)
<!-- Reviewable:end -->
2015-06-02 12:53:37 -05:00