Commit Graph

2638 Commits

Author SHA1 Message Date
Tim Taubert
fc4bdae442 servo: Merge #3620 - Remove unnecessary deref()s (fixes #3586) (from ttaubert:issue/3586-remove-derefs); r=Manishearth
r? @Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: 510f8a817f8144dd5046886d4ca7c612f19a3d08
2014-10-09 07:12:37 -06:00
Patrick Walton
c3ef958820 servo: Merge #3600 - layout: Mark the styles of elements with pseudos as unshareable (from pcwalton:pseudo-unshareable); r=mbrubeck
Makes multiple `<br>` elements work, since those are implemented via
`before` pseudos.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 15b508ac10d0e98ba10474b6ab091017ae95804e
2014-10-09 00:06:32 -06:00
Patrick Walton
1d89e44b97 servo: Merge #3599 - layout: Implement z-index (from pcwalton:z-index); r=glennw
r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: c4ac93b315f058d9a061b20ce64cacbead339f86
2014-10-08 23:33:33 -06:00
Martin Robinson
d274f01aaa servo: Merge #3617 - Position layers using their absolute position (from mrobinson:layer-positioning); r=pcwalton
Layers are currently all children of the root layer, so instead of
using coordinates relative to the parent flow we should use coordinates
relative to the page.

Fixes #2061.

Source-Repo: https://github.com/servo/servo
Source-Revision: eff0de0ce12b20ffc4806d14c95777004003f2ae
2014-10-08 17:27:33 -06:00
Tim Taubert
46dd61e917 servo: Merge #3577 - Use HashMap::find_with_or_insert_with in DocumentHelpers::register_named_element (fixes #3193) (from ttaubert:issue/3193-named-element-mangle); r=jdm
Should probably use HashMap::entry() but that doesn't seem to be available with servo's current rust snapshot.

r? @Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: a127fcd854ae0e31d05f34232f595833ccc2ba9e
2014-10-08 13:15:32 -06:00
Robin Stocker
e81f609d79 servo: Merge #3612 - Allow to specify port with --devtools option (fixes #3597) (from robinst:devtools-port-option); r=jdm
Note that using `servo --devtools http://example.org` doesn't work. In
that case either the port must be specified or the option moved to the
end. But this is the same for other such options, e.g. `--profile`.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9be266270b2e8d00f4cec0f1b262efce85913640
2014-10-08 08:24:36 -06:00
Manish Goregaokar
2dfaa0ee12 servo: Merge #3605 - Improve macro getters, add macro setters, implement attributes for <form> (from Manishearth:form-stuff); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 94731270df688f2df49fdec36ccf7eefd9ed021f
2014-10-08 03:42:34 -06:00
Tim Taubert
17eeb55b66 servo: Merge #3584 - Support [*|attr], attribute selectors in any namespace (fixes #1558) (from ttaubert:issue/1558-attr-ns-selectors); r=Manishearth
This implements basic support for attribute selectors with namespace prefixes. I would have added a more sophisticated test covering various selectors but it seems that we don't have an XML parser yet and thus no XHTML support?

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: f49c730720a51d14dacefe9815faf50216b36b91
2014-10-08 03:12:34 -06:00
Patrick Walton
4418d703bc servo: Merge #3603 - layout: white_space::pre should not yield ignorable whitespace (from pcwalton:pre-ignorable-whitespace); r=mbrubeck
Improves the Google home page.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: c628d11e6f8defbdaa4438f990b566272a3b0eff
2014-10-08 01:15:36 -06:00
Simon Sapin
006cccd339 servo: Merge #3601 - Read user-agent.css at run time. Fix #3516 (from SimonSapin:runtime-ua-stylesheet); r=jdm
When we want to use Servo binaries outside of their `target` build directory, `./resources` is what we’ll need to ship with them.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 8312fde154768c4a5ce133a1aaaf1293529a5558

--HG--
rename : servo/tests/html/failure.html => servo/resources/failure.html
rename : servo/components/style/user-agent.css => servo/resources/user-agent.css
2014-10-08 00:42:36 -06:00
Patrick Walton
949eeba3a8 servo: Merge #3602 - style: Remove max-height from the input style (from pcwalton:max-height-input); r=jdm
Some pages, like Google, want to set height explicitly.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 543f11b62b9da6a5362f96e5c85f660ee68acf76
2014-10-07 12:30:34 -06:00
Cameron Zwarich
f00ef3ffd5 servo: Merge #3592 - Remove trailing whitespace (from zwarich:trailing-whitespace); r=Manishearth
The Mach test runner doesn't actually make these failures yet, which is
tracked by #3482.

Source-Repo: https://github.com/servo/servo
Source-Revision: ae946a9b762d66f01f669ff526eff5c0eaaa3404
2014-10-07 04:57:29 -06:00
Gilles Leblanc
543822d46c servo: Merge #3575 - Take the prefix from createElementNS into account for HTML elements (from gilles-leblanc:issue-3139); r=Ms2ger
Fixes #3139

Source-Repo: https://github.com/servo/servo
Source-Revision: a4b414746bc2b067251d7a543b43fe136b319bdc
2014-10-07 01:33:32 -06:00
Glenn Watson
403b94ee11 servo: Merge #3548 - Remove manual encodable implementation. Fixes #3425 (from glennw:remove-encodable); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 4475cbe7e86eaace7622c33405231a25182e300e
2014-10-06 23:51:35 -06:00
Glenn Watson
fe35ac2331 servo: Merge #3565 - Add cmd line option to set user agent. Improves github when used (from glennw:user-agent); r=mbrubeck
Fixes #3455

Source-Repo: https://github.com/servo/servo
Source-Revision: 3e8aa0592154a3ec5cc8e1167e17bd70b8c7144b
2014-10-06 23:21:32 -06:00
Cameron Zwarich
b634bdc417 servo: Merge #3593 - Cleanup some code formatting in compositing/compositor.rs (from zwarich:compositor-cleanup); r=mrobinson
Source-Repo: https://github.com/servo/servo
Source-Revision: 0549ed3c675d1cc7a8832128e90b7886e3c1710c
2014-10-06 18:24:32 -06:00
Cameron Zwarich
6adb0bc9c8 servo: Merge #3591 - Silence unused_mut warnings in generated style/properties/mod.rs (from zwarich:style-properties-mut); r=jdm
I would have put the attribute on the binding itself, but that doesn't
appear to be possible yet.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1aa13bb31f0f1fbd8a7ac663634a222903681af9
2014-10-06 15:57:34 -06:00
Ms2ger
8bb716551a servo: Merge #3571 - Cleanup URL handling in ScriptTask::load a bit (from Ms2ger:rewrite-js-url); r=jdm
This should make it clearer that we always pass a URL to Document::new, and
avoids an unnecessary unwrap() call.

Source-Repo: https://github.com/servo/servo
Source-Revision: 06489fcc426ca65e807ea13d0d8fcf23bee3ca75
2014-10-06 12:21:30 -06:00
Manish Goregaokar
333c486c81 servo: Merge #3573 - Remove unused mutable variable (from Manishearth:warnings); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: ae4c9be536bcf386db5b6ad2603ecf874566f6ef
2014-10-06 11:51:32 -06:00
Ms2ger
b8bbefb15b servo: Merge #3572 - Remove the managed_boxes feature (from Ms2ger:gc); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: 8c858b4575b602f0392b2f07b2c53c44be4e2f45
2014-10-06 11:24:31 -06:00
Ms2ger
05d1a9458c servo: Merge #3570 - Stop reference-counting the ScriptTask (from Ms2ger:rc-scripttask); r=metajack
The ScriptTask is owned by the proc in ScriptTaskFactory::create.

We started using a managed box for what would eventually become ScriptTask in
d21d27e08633b6a7f2b774a28c65c81d1eedbeaf.

Source-Repo: https://github.com/servo/servo
Source-Revision: f60e985e6b1c401730306acaf2b84152cdc7d0aa
2014-10-06 11:00:37 -06:00
Manish Goregaokar
da1369f261 servo: Merge #3518 - Purge Traceable and Untraceable from Servo (from Manishearth:trace-cleanup); r=jdm
Now that we use `JSTraceable` (defined in `script`), we can create arbitrary implementations on non-`script` types (eg `Url` or `RequestHeaderCollection`) where in the past we had to rely on `Traceable` and `Untraceable` to achieve cross-crate impls of `Encodable`.

This removes the two completely. They can be reintroduced if required, though the `untraceable!` macro should suffice.

Fixes #3469

Source-Repo: https://github.com/servo/servo
Source-Revision: b34df7c343579f200d2e67e21fc566842a4e4a91
2014-10-06 10:15:33 -06:00
Ms2ger
294c72706d servo: Merge #3581 - Pin Cargo to the 2014-10-02 nightly (from Ms2ger:pin-cargo); r=metajack
Relevant to #3580.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8de734f00a9d7598b72acce991410f457169e27a
2014-10-06 09:33:32 -06:00
Andrew Guertin
e9e999ad3b servo: Merge #3569 - Replace Cell<Option<JS<T>>> with MutNullableJS<T> (from andrewguertin:mutnullablejs); r=Manishearth
https://github.com/servo/servo/issues/3564

Source-Repo: https://github.com/servo/servo
Source-Revision: d23e45fe5db54994f4f3569f8bda1ec5a6121610
2014-10-03 18:45:27 -06:00
Martin Robinson
5e7fb04ec5 servo: Merge #3567 - Account for RenderLayer position when optimizing display list (from mrobinson:optimizer); r=zwarich
The page_rect passed to DisplayListOptimizer is relative to the
RenderLayer origin, but the display list components are relative to the
page origin. Before passing the page rect to the display list, we
translate it by the RenderLayer position.

Source-Repo: https://github.com/servo/servo
Source-Revision: a6cd13c89054b605e1000bc3475153fbd2fde7bf
2014-10-03 16:27:25 -06:00
Matt Brubeck
add1ba71b5 servo: Merge #3568 - Add Android build config to mach/servobuild (from mbrubeck:mach-android); r=metajack
This allows setting Android toolchain paths in `.servobuild`, and also adds a `--android` option that sets the correct default target and causes `mach build` to also build the APK.

Source-Repo: https://github.com/servo/servo
Source-Revision: bf7beb4837246aa53f611492b1ff0986f221a47e
2014-10-03 15:45:28 -06:00
Jack Moffitt
47258b49e5 servo: Merge #3566 - Fix up and run unit tests (from metajack:fixup-unit-tests); r=mbrubeck
This adds the subpackages to `./mach test-unit`.

Source-Repo: https://github.com/servo/servo
Source-Revision: d4e977a2be1f1fea81c32d1f7024b228cb161966
2014-10-03 09:57:26 -06:00
Ms2ger
b8ea8e33d2 servo: Merge #3562 - Cleanup Document.find_fragment_node (from Ms2ger:cleanup-fragment-node); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: a2531cd8aa0463e0941229b2f89f1433ad5b5e5e
2014-10-03 03:48:25 -06:00
Jack Moffitt
9648aa2490 servo: Merge #3561 - Add --verbose to build-cef command (from metajack:build-cef-verbose); r=zwarich
Source-Repo: https://github.com/servo/servo
Source-Revision: 76d1d78cc0e08185f372a53e0cb2ce9e46213c31
2014-10-02 11:36:25 -06:00
Ms2ger
84e54dd33a servo: Merge #3558 - Remove the fragment_node field from Page (from Ms2ger:fragment-node); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 643a6d07a201d7db9325250522a80bc3357f11ce
2014-10-02 10:15:27 -06:00
Patrick Walton
08b194a932 servo: Merge #3560 - gfx: Use subpixel positioning for glyphs (from pcwalton:subpixel-glyph-positioning); r=mbrubeck
Improves text rendering significantly.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: adb428a725293fd639a0f188a32f3111ffca4d5b
2014-10-02 09:27:26 -06:00
Patrick Walton
000f242577 servo: Merge #3556 - layout: Implement box-sizing: border-box (from pcwalton:box-sizing); r=SimonSapin
Improves GitHub.

Source-Repo: https://github.com/servo/servo
Source-Revision: c7915028b498dc8426cdbb5b35f0ad270613a244
2014-10-01 23:39:26 -06:00
Patrick Walton
3a9cd8611d servo: Merge #3549 - gfx: Fix imprecision in float_to_fixed (from pcwalton:fix-float-to-fixed); r=zwarich
Improves text rendering a lot.

r? @zwarich

Source-Repo: https://github.com/servo/servo
Source-Revision: 622a6fb113081175bcc144e113e592dc2cf4b142
2014-10-01 23:18:23 -06:00
Patrick Walton
c3a687251b servo: Merge #3546 - layout: Implement the correct hypothetical box behavior for absolutely-positioned elements declared with display: inline (from pcwalton:absolute-inline); r=glennw
Although the computed `display` property of elements with `position:
absolute` is `block`, `position: absolute; display: inline` can still
behave differently from `position: absolute; display: block`. This is
because the hypothetical box for `position: absolute` can be at the
position it would have been if it had `display: inline`. CSS 2.1 §
10.3.7 describes this case in a parenthetical:

"The static-position containing block is the containing block of a
hypothetical box that would have been the first box of the element if
its specified 'position' value had been 'static' and its specified
'float' had been 'none'. (Note that due to the rules in section 9.7 this
hypothetical calculation might require also assuming a different
computed value for 'display'.)"

To handle this, I had to change both style computation and layout. For
the former, I added an internal property
`-servo-display-for-hypothetical-box`, which stores the `display` value
supplied by the author, before the computed value is calculated. Flow
construction now uses this value.

As for layout, implementing the proper behavior is tricky because the
position of an inline fragment in the inline direction cannot be
determined until height assignment, which is a parallelism hazard
because in parallel layout widths are computed before heights. However,
in this particular case we can avoid the parallelism hazard because the
inline direction of a hypothetical box only affects the layout if an
absolutely-positioned element is unconstrained in the inline direction.
Therefore, we can just lay out such absolutely-positioned elements with
a bogus inline position and fix it up once the true inline position of
the hypothetical box is computed. The name for this fix-up process is
"late computation of inline position" (and the corresponding fix-up for
the block position is called "late computation of block position").

This improves the header on /r/rust.

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: f7d2fb6ff86afff7a5b674f751af9370a5a6b142
2014-10-01 19:36:25 -06:00
Josh Matthews
5b0373348c servo: Merge #3520 - Implement basic form control support (from jdm:formcontrols); r=pcwalton
So far the changes to layout seem fairly well-contained; I think this is worth integrating to give us a browser that is easier to dogfood (and allows us to work on things like form submission much easier), especially since the long-term viability of WebComponents-as-forms is not assured.

Source-Repo: https://github.com/servo/servo
Source-Revision: f80096069592b864221abe112eaf2ecb6c444fda
2014-10-01 16:45:29 -06:00
Martin Robinson
ecc949231f servo: Merge #3538 - Fix layer selection and point translation for mouse events (from mrobinson:events-and-layers); r=zwarich
Select the topmost layer at a given point to send mouse events and when
sending the event, ensure that they are relative to the layer origin,
rather than in absolute page coordinates.

Fixes #3504.

Source-Repo: https://github.com/servo/servo
Source-Revision: 479d8567d12aa0845c835fdae7d0dd45d7c63d4f
2014-10-01 14:33:26 -06:00
Jim Berlage
68ad93214e servo: Merge #3539 - Replace implementation of is in actor.rs (from jimberlage:fix/meaningful-is); r=jdm
This is intended to address #3488.  [AnyPrivate](http://doc.rust-lang.org/core/any/trait.AnyPrivate.html) is now in the Rust core, so we can leverage that instead of writing an implementation.

Source-Repo: https://github.com/servo/servo
Source-Revision: da6878a4e2925cefe9aa9368890d5791f965433e
2014-10-01 14:03:27 -06:00
Martin Robinson
166dee8d53 servo: Merge #3544 - No longer consider window size when scrolling (from mrobinson:simplify-scrolling); r=zwarich
Now that scrolling roots are properly sized, we can simply look at the
scrolling root layer size when deciding the extents of layer scrolling.
This simplifies things a bit and further codifies the current model of
scrolling root + mask_to_bounds.

Source-Repo: https://github.com/servo/servo
Source-Revision: bfe5c34f8abcf7d8f02ef46792913e289df173a5
2014-10-01 12:06:28 -06:00
Josh Matthews
179c7b7dcc servo: Merge #3531 - Implement MutNullableJS for mutable, nullable member pointers to DOM objects (from Ms2ger:MutNullableJS); r=Ms2ger
Extracted from #3527.

Source-Repo: https://github.com/servo/servo
Source-Revision: bae5440689c67f425f94ec27bf0f61ff955dc290
2014-10-01 09:09:28 -06:00
Cameron Zwarich
5ac3634894 servo: Merge #3542 - Remove extra lifetime parameters (from zwarich:more-jsref); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: a840fed78a493a481683ef73dae923190d87ba6c
2014-10-01 04:03:29 -06:00
Cameron Zwarich
8ef892113e servo: Merge #3541 - Convert the NodeHelpers trait to use self methods (from zwarich:more-jsref); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: f73e5088219cd6deeea0d4f0612cad750fc532a9
2014-10-01 02:51:27 -06:00
Cameron Zwarich
8e1c96a87b servo: Merge #3540 - Convert TNode / TElement to use self parameters rather than &self (from zwarich:more-jsref); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 09e9abc047e03b81b8a4aa90d13efa184d0a732f
2014-09-30 22:36:28 -06:00
Martin Robinson
7809f0a80f servo: Merge #3537 - Use LayerPixel for Layer bounds and most arguments (from mrobinson:scale); r=zwarich
When interacting with Layers it is simpler to use LayerPixels, which
are unscaled pixels in the Layer coordinate system. This removes a lot
of room for error and makes things simpler.

Source-Repo: https://github.com/servo/servo
Source-Revision: 6358b7d94e14fc61348fd56bcd5c0ff50ae11156
2014-09-30 18:57:26 -06:00
Cameron Zwarich
f911787c54 servo: Merge #3536 - Convert a method from &JSRef to JSRef (from zwarich:more-jsref); r=Manishearth
This also removes the unnecessary formation of a trait object.

Source-Repo: https://github.com/servo/servo
Source-Revision: 93e259227a969dbea1319d4d3ce92bc5706c6b06
2014-09-30 18:39:27 -06:00
Glenn Watson
c863efe3ac servo: Merge #3535 - Refactor background image, fix fixed attachment. Improve acid2 (from glennw:fixed-bg); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: a63155b564b64825d292953983117c0df4b34e91
2014-09-30 17:45:29 -06:00
Keegan McAllister
2e5e961694 servo: Merge #3530 - Use string-cache's Namespace type, backed by Atom (from kmcallister:namespace-atom); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 698b916c097ae0272a31a680cba7fc6dbd03ca3d
2014-09-30 02:42:23 -06:00
Glenn Watson
7732ccd2ac servo: Merge #3529 - Enable acid2 reftest on Linux. Update rust-layers (from glennw:linux-acid2); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: eec2225716daf7515b07456c290cf2ac0f8ae283
2014-09-29 23:09:24 -06:00
Martin Robinson
e0360fa36f servo: Merge #3526 - Mask root layer rectangles to their boundaries (from mrobinson:masks-to-bounds); r=zwarich
This prevents iframes contents from overflowing their root layers.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4be0a07585b019d45dd83849818854566c5e118b
2014-09-29 17:48:25 -06:00
Matt Brubeck
bce5f7089e servo: Merge #3525 - Pass a viewport to the rendering code (from mbrubeck:viewport); r=zwarich
Updates to the latest rust-layers and rust-geom to pick up
servo/rust-layers#114.  r? @zwarich

Source-Repo: https://github.com/servo/servo
Source-Revision: 01b4100756ec0ae1ff61d0bee5ea065396bed855
2014-09-29 17:03:26 -06:00
Glenn Watson
2eb5f4d16d servo: Merge #3523 - Add support for <super> and <sup> tags. Fixes equations on wikipedia (from glennw:wiki-equations); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: b2ff320aecab80b06aeedad440c28b23b2dc3824
2014-09-29 15:36:26 -06:00