Commit graph

12563 commits

Author SHA1 Message Date
Ms2ger
995cb21b48 Use if-let in dispatch_to_listeners, and simplify break conditions. 2015-09-16 16:28:56 +02:00
Ms2ger
a5925020ce Avoid calling any listeners for events whose stop propagation flag is set prior to dispatching. 2015-09-16 16:28:31 +02:00
Ms2ger
b342dff07d Add more assertions to dispatch_event. 2015-09-16 14:48:36 +02:00
Ms2ger
76eea43c83 Factor out a dispatch_to_listeners function from dispatch_event. 2015-09-16 13:36:18 +02:00
Ms2ger
15717173ee Reorder the code in dispatch_event a bit. 2015-09-16 13:36:17 +02:00
Ms2ger
9ddeec09c3 Remove outdated FIXME comment. 2015-09-16 13:36:17 +02:00
bors-servo
67cf241acd Auto merge of #7548 - jgraham:webdriver_prefs, r=metajack
Add get/set pref extensions to webdriver server.

This can be used by the test framework to ensure that the correct prefs are
set for a test without restarting the browser

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7548)
<!-- Reviewable:end -->
2015-09-14 22:08:28 -06:00
bors-servo
e3d36bfceb Auto merge of #7631 - jxs:rewrite_uses_of_map, r=jdm
rewrite uses of map as if let

in the end only found this case as re-writable, am i missing some?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7631)
<!-- Reviewable:end -->
2015-09-14 21:31:53 -06:00
João Oliveira
832cfac747 rewrite uses of map as if let
closes #7580
2015-09-15 02:51:59 +01:00
bors-servo
25abe646f8 Auto merge of #7619 - frewsxcv:font-face, r=nox
Implement <font> 'face' attribute



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7619)
<!-- Reviewable:end -->
2015-09-14 18:32:17 -06:00
Corey Farwell
3ae76f4e76 Implement <font> 'face' attribute 2015-09-14 20:24:52 -04:00
bors-servo
e107f112d8 Auto merge of #7633 - aidanhs:aphs-remove-sslprovider, r=jdm
Remove SslProvider, fixes #7627



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7633)
<!-- Reviewable:end -->
2015-09-14 14:57:55 -06:00
Aidan Hobson Sayers
7632e89a04 Remove unsupported SslProvider, fixes #7627 2015-09-14 21:30:05 +01:00
bors-servo
3d420abe40 Auto merge of #7629 - zmike:THE_RETURN_OF_EMBEDDING, r=larsbergstrom
sync cef interfaces with upstream

@larsbergstrom I guess

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7629)
<!-- Reviewable:end -->
2015-09-14 14:24:18 -06:00
zmike
80b027ef9f add missing cef types from last sync 2015-09-14 16:01:16 -04:00
zmike
5f9aac6c1a update cef interfaces from upstream 2015-09-14 14:02:35 -04:00
zmike
f749fe4125 update cef interfaces script to use better syntax
zsh version upgrade broke this somehow I guess
2015-09-14 14:02:06 -04:00
bors-servo
35c30ab70d Auto merge of #7549 - jxs:master, r=jdm
Move setting UserAgent header into http_loader::load,

closes #7541

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7549)
<!-- Reviewable:end -->
2015-09-14 08:57:42 -06:00
João Oliveira
813cdaa012 Move setting UserAgent header into http_loader::load,
closes #7541
2015-09-14 15:35:34 +01:00
bors-servo
97710f0739 Auto merge of #7622 - Ms2ger:atoms, r=nox
Use static atoms in some places.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7622)
<!-- Reviewable:end -->
2015-09-14 02:38:02 -06:00
Ms2ger
9faa2de0fc Use static atoms in some places. 2015-09-14 10:33:16 +02:00
Corey Farwell
768993f03f Fix incorrect indentation 2015-09-13 23:17:38 -04:00
bors-servo
d5ee58caf2 Auto merge of #7606 - nox:move-typeid, r=jdm
Move the type_id fields to DOMClass

Cc @michaelwu.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7606)
<!-- Reviewable:end -->
2015-09-13 11:53:42 -06:00
Anthony Ramine
c25085f68a Introduce [Abstract] to mark non-leaf interfaces
Some interfaces like Node, CharacterData and HTMLTableCellElement are never
instantiated directly, only their descendant interfaces are. Those are marked
with [Abstract] to set their type_id to None instead of having dummy values
in the TypeId enums.
2015-09-13 19:46:28 +02:00
bors-servo
6a21bcd9c5 Auto merge of #7615 - frewsxcv:obsolete-link-anchor, r=nox
Add obsolete reflecting attributes on <a> and <link>

From my understanding, setting any of these will not affect any
presentational hints for the elements

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7615)
<!-- Reviewable:end -->
2015-09-13 10:47:32 -06:00
bors-servo
e10c5c74cc Auto merge of #7616 - Ms2ger:js-reflector, r=jdm
Stop implementing Reflectable for JS<T>.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7616)
<!-- Reviewable:end -->
2015-09-13 09:20:25 -06:00
Ms2ger
3781567c19 Stop implementing Reflectable for JS<T> (fixes #2285).
It's not generally safe to expose the contents of a JS<T>.
2015-09-13 16:47:12 +02:00
Ms2ger
ca5e7097a0 Stop requiring that the type argument to RootedVec implements Reflectable.
It is sufficient that it implements JSTraceable.
2015-09-13 16:43:28 +02:00
Corey Farwell
fdebd2ae2a Add obsolete reflecting attributes on <a> and <link>
From my understanding, setting any of these will not affect any
presentational hints for the elements
2015-09-13 09:45:02 -04:00
bors-servo
dbd614045b Auto merge of #7614 - frewsxcv:incorrect-element-interfaces, r=nox
Fix a few incorrect Element interfaces



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7614)
<!-- Reviewable:end -->
2015-09-13 06:23:42 -06:00
Corey Farwell
be3352f379 Explicitly state 'blink' should create HTMLUnknownElement, like the spec
https://html.spec.whatwg.org/#other-elements,-attributes-and-apis:blink
2015-09-13 08:07:03 -04:00
Corey Farwell
cc8994422b Fix a few incorrect Element interfaces 2015-09-13 08:02:51 -04:00
Corey Farwell
202a7e3f13 Bump string_cache 2015-09-13 07:25:07 -04:00
bors-servo
b05f4aa3aa Auto merge of #7559 - ddrmanxbxfr:RFC-0344-Work, r=nox
Remove 'get_*' on getters as per RFC 0344 on canevas, compositing, devtools, gfx, layout, net, profile, servo and webdriver_server

Hi guys,

I just gave a big pass of RFC-0344 as per issue #6224 .

Pretty much renamed all the get_* fn that were used to fetch values. 

I hope I didn't rename too much. 

As said in the issue discussion, I didn't touch at the scripts folder so we keep the unsafe ones pretty explicit.

I've ran the whole pass of test, everything seems to be still working right :).

Please give feedback on this PR.

Thanks for looking into it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7559)
<!-- Reviewable:end -->
2015-09-12 18:29:56 -06:00
Mathieu Rheaume
7320433cca Remove 'get_*' on getters as per RFC 0344 on various components 2015-09-12 20:14:01 -04:00
bors-servo
815e981c69 Auto merge of #7610 - servo:filename-parsing, r=saneyuki
Replace reftest with a problematic file name with a unit test.

Fix #7609, "error: unable to create file tests/ref/hello_a?foo#bar.html (Invalid argument)" during git checkout on Windows.

Behavior change: passing an nonexistent file name on the command line now shows a blank page (like network errors) rather than exit with an error message.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7610)
<!-- Reviewable:end -->
2015-09-12 09:10:37 -06:00
bors-servo
a63e2935ed Auto merge of #7613 - frewsxcv:minor-window-cleanup, r=nox
Minor script::dom:🪟:Window cleanup



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7613)
<!-- Reviewable:end -->
2015-09-12 08:05:18 -06:00
Corey Farwell
9331dc7bd1 Minor script::dom:🪟:Window cleanup 2015-09-12 15:03:18 +01:00
Simon Sapin
43c999905c Replace reftest with a problematic file name with a unit test.
Fix #7609, "error: unable to create file tests/ref/hello_a?foo#bar.html
(Invalid argument)" during git checkout on Windows.

Behavior change: passing an nonexistent file name on the command line
now shows a blank page (like network errors)
rather than exit with an error message.
2015-09-12 14:18:15 +02:00
Michael Wu
941f7dc04b Move EventTargetTypeId/NodeTypeId to DOMClass 2015-09-12 01:09:46 +02:00
bors-servo
8d7ba12f28 Auto merge of #7600 - pcwalton:body-overflow-scroll, r=mbrubeck
layout: Allow the overflow area of the `<body>` to be scrolled.

Fixes scrolling on Twitter.

r? @mbrubeck

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7600)
<!-- Reviewable:end -->
2015-09-11 11:20:13 -06:00
bors-servo
c3f9e1813a Auto merge of #7550 - pcwalton:block-formatting-context-overflow, r=mbrubeck
layout: Defend the block formatting context speculation against going wrong in the presence of blocks that overflow in the inline direction.

Makes the Google search result links appear.

Closes #7298.

r? @mbrubeck

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7550)
<!-- Reviewable:end -->
2015-09-11 10:03:39 -06:00
bors-servo
3a97455a65 Auto merge of #7570 - jxs:ignore_length_tidy_script, r=Ms2ger
ignore length on .lock files on tidy.py,

closes #7569

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7570)
<!-- Reviewable:end -->
2015-09-11 03:07:34 -06:00
bors-servo
eb556c1ce6 Auto merge of #7602 - bjwbell:improve_err_msg_when_writing_png, r=pcwalton
Improve err msg when failing to output png

Before on at least Linux the following failure is hard to root cause:

    [~/servo] ./target/debug/servo -o tmp.png ./tests/html/lipsum.html
    thread '<main>' panicked at 'assertion failed: res.is_ok()', .../compositor.rs:1508
    thread '<main>' panicked at 'You should have disposed of the
    pixmap...', .../rust-layers/.../surface.rs:166

Now:

    [~/servo] ./target/debug/servo -o tmp.png ./tests/html/lipsum.html
    thread '<main>' panicked at 'Error writing png: Permission
    denied (os error 13)', .../compositor.rs:1508
    thread '<main>' panicked at 'You should have disposed of the pixmap
    properly with destroy()! This pixmap will leak!', .../rust-layers/.../surface.rs:166

r? @mbrubeck

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7602)
<!-- Reviewable:end -->
2015-09-10 23:55:41 -06:00
Bryan Bell
b7ea7de136 Improve err msg when failing to output png
Before on at least Linux the following failure is hard to root cause:

    [~/servo] ./target/debug/servo -o tmp.png ./tests/html/lipsum.html
    thread '<main>' panicked at 'assertion failed: res.is_ok()', .../compositor.rs:1508
    thread '<main>' panicked at 'You should have disposed of the
    pixmap...', .../rust-layers/.../surface.rs:166

Now:

    [~/servo] ./target/debug/servo -o tmp.png ./tests/html/lipsum.html
    thread '<main>' panicked at 'Error writing png: Permission
    denied (os error 13)', .../compositor.rs:1508
    thread '<main>' panicked at 'You should have disposed of the pixmap
    properly with destroy()! This pixmap will leak!', .../rust-layers/.../surface.rs:166
2015-09-10 21:45:58 -07:00
Patrick Walton
99587cf105 layout: Allow the overflow area of the <body> to be scrolled.
Fixes scrolling on Twitter.
2015-09-10 18:07:21 -07:00
bors-servo
f190ba360e Auto merge of #7595 - connorimes:update-hbs, r=larsbergstrom
Refresh cef and gonk lock files; update heartbeats dependencies



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7595)
<!-- Reviewable:end -->
2015-09-10 13:31:57 -06:00
bors-servo
4e69f301e1 Auto merge of #7593 - connorimes:energy-profiling-doc, r=larsbergstrom
Add documentation to profile crate on Heartbeats and energy-profiling



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7593)
<!-- Reviewable:end -->
2015-09-10 11:29:29 -06:00
bors-servo
e6ed6250b7 Auto merge of #7594 - metajack:embedding-warnings, r=Ms2ger
Fix compiler warnings



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7594)
<!-- Reviewable:end -->
2015-09-10 09:42:33 -06:00
Jack Moffitt
2d35ee6d16 Fix compiler warnings 2015-09-10 09:40:06 -06:00