Commit graph

6640 commits

Author SHA1 Message Date
Manish Goregaokar
d9d3ddc865 Remove Traceable from formdata.rs 2014-10-05 22:13:16 +05:30
Manish Goregaokar
25af998842 Remove Traceable from eventtarget.rs 2014-10-05 22:13:16 +05:30
Manish Goregaokar
7e1e76f8b0 Remove Traceable from event.rs 2014-10-05 22:13:14 +05:30
Manish Goregaokar
96f6c2fd67 Remove Traceable from element.rs 2014-10-05 22:09:12 +05:30
Manish Goregaokar
4f362ab5e6 Remove Untraceable/Traceable from document.rs 2014-10-05 21:58:59 +05:30
Manish Goregaokar
ad84dd7e47 Remove Untraceable from canvasrenderingcontext2d.rs 2014-10-05 21:36:19 +05:30
Manish Goregaokar
7defa5e941 Remove Untraceable from dedicatedglobalworkerscope.rs 2014-10-05 21:36:17 +05:30
Manish Goregaokar
63dd3070d1 Remove Traceable from customevent.rs 2014-10-05 21:33:45 +05:30
Manish Goregaokar
4f574b4732 Remove Traceable from characterdata.rs 2014-10-05 21:33:43 +05:30
Manish Goregaokar
8de00ab999 Remove Traceable from browsercontext.rs 2014-10-05 21:12:26 +05:30
Manish Goregaokar
b908d5accb Remove Traceable from attr.rs 2014-10-05 21:12:26 +05:30
Ms2ger
e8de0d2b5e Remove the managed_boxes feature. 2014-10-04 15:30:42 +02:00
Ms2ger
31f8100b9d Cleanup URL handling in ScriptTask::load a bit.
This should make it clearer that we always pass a URL to Document::new, and
avoids an unnecessary unwrap() call.
2014-10-04 15:19:08 +02:00
Ms2ger
208afda890 Stop reference-counting the ScriptTask.
The ScriptTask is owned by the proc in ScriptTaskFactory::create.

We started using a managed box for what would eventually become ScriptTask in
d21d27e086.
2014-10-04 13:14:23 +02:00
bors-servo
d23e45fe5d auto merge of #3569 : andrewguertin/servo/mutnullablejs, r=Manishearth
https://github.com/servo/servo/issues/3564
2014-10-03 18:45:27 -06:00
Andrew Guertin
815a701455 Replace Cell<Option<JS<T>>> with MutNullableJS<T>
https://github.com/servo/servo/issues/3564
2014-10-03 20:08:05 -04:00
bors-servo
a6cd13c890 auto merge of #3567 : mrobinson/servo/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.
2014-10-03 16:27:25 -06:00
Martin Robinson
ec29723f2b Account for RenderLayer position when optimizing display list
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.
2014-10-03 14:55:03 -07:00
bors-servo
bf7beb4837 auto merge of #3568 : mbrubeck/servo/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.
2014-10-03 15:45:28 -06:00
Matt Brubeck
b736256d53 Add Android build config to mach/servobuild 2014-10-03 14:29:54 -07:00
bors-servo
d4e977a2be auto merge of #3566 : metajack/servo/fixup-unit-tests, r=mbrubeck
This adds the subpackages to `./mach test-unit`.
2014-10-03 09:57:26 -06:00
bors-servo
a2531cd8aa auto merge of #3562 : Ms2ger/servo/cleanup-fragment-node, r=jdm 2014-10-03 03:48:25 -06:00
Ms2ger
75ee535e3c Use or_else in Document.find_fragment_node. 2014-10-03 09:20:54 +02:00
Jack Moffitt
7f6f072b02 Fix up and run unit tests.
This adds the subpackages to `./mach test-unit`.
2014-10-02 23:14:42 -06:00
Glenn Watson
dc1d66d3ce Add cmd line option to set user agent. Improves github when used. 2014-10-03 13:57:12 +10:00
Ms2ger
c96018152f Cleanup Document.find_fragment_node. 2014-10-02 19:54:12 +02:00
bors-servo
76d1d78cc0 auto merge of #3561 : metajack/servo/build-cef-verbose, r=zwarich 2014-10-02 11:36:25 -06:00
Jack Moffitt
f93dd447b1 Add --verbose to build-cef command 2014-10-02 11:32:00 -06:00
bors-servo
643a6d07a2 auto merge of #3558 : Ms2ger/servo/fragment-node, r=jdm 2014-10-02 10:15:27 -06:00
Ms2ger
4cc24e727b Clear the fragment_name field when resizing.
This reinstates the behaviour from before the change in
a1bf49c1ce.
2014-10-02 18:07:41 +02:00
bors-servo
adb428a725 auto merge of #3560 : pcwalton/servo/subpixel-glyph-positioning, r=mbrubeck
Improves text rendering significantly.

r? @mbrubeck
2014-10-02 09:27:26 -06:00
Patrick Walton
dbdfce0695 gfx: Use subpixel positioning for glyphs.
Improves text rendering significantly.
2014-10-02 08:05:24 -07:00
Ms2ger
7508ca94b3 Remove the fragment_node field from Page (fixes #3543).
Since Page isn't reflected, it cannot be rooted, and pointers to JS-managed
objects inside it are not guaranteed to be traced. This may cause the pointer
to become dangling.
2014-10-02 15:31:26 +02:00
Ms2ger
5d335fd524 Move find_fragment_node to Document. 2014-10-02 12:04:05 +02:00
bors-servo
c7915028b4 auto merge of #3556 : pcwalton/servo/box-sizing, r=SimonSapin
Improves GitHub.
2014-10-01 23:39:26 -06:00
bors-servo
622a6fb113 auto merge of #3549 : pcwalton/servo/fix-float-to-fixed, r=zwarich
Improves text rendering a lot.

r? @zwarich
2014-10-01 23:18:23 -06:00
Patrick Walton
cdc59fe68a gfx: Fix imprecision in float_to_fixed.
Improves text rendering a lot.
2014-10-01 22:07:50 -07:00
Patrick Walton
885fc1c28b layout: Implement box-sizing: border-box.
Improves GitHub.
2014-10-01 20:24:34 -07:00
bors-servo
f7d2fb6ff8 auto merge of #3546 : pcwalton/servo/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
2014-10-01 19:36:25 -06:00
Patrick Walton
287fe3b3ab layout: Implement the correct hypothetical box behavior for
absolutely-positioned elements declared with `display: inline`.

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.
2014-10-01 18:34:53 -07:00
bors-servo
f800960695 auto merge of #3520 : jdm/servo/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.
2014-10-01 16:45:29 -06:00
Josh Matthews
be41c203ac Fix linux build error. 2014-10-01 18:43:24 -04:00
bors-servo
479d8567d1 auto merge of #3538 : mrobinson/servo/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.
2014-10-01 14:33:26 -06:00
bors-servo
da6878a4e2 auto merge of #3539 : jamesberlage/servo/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.
2014-10-01 14:03:27 -06:00
Josh Matthews
7401cd0aeb Split a long line. 2014-10-01 15:40:37 -04:00
Josh Matthews
5794da904e Remove unneeded input type information from layout. 2014-10-01 15:40:36 -04:00
Josh Matthews
ca5d4633c2 Disallow wrapping on input elements. 2014-10-01 15:37:40 -04:00
Josh Matthews
8112859d55 Disallow toggling radio buttons. Use generated content for checkboxes and radio buttons. Switching to the glyph 0 for the average advance width. 2014-10-01 15:37:40 -04:00
Josh Matthews
f70bb68503 Implement simple layout for text, button, radio, and checkbox inputs. Implement simple interaction for checkboxes and radio buttons. 2014-10-01 15:35:42 -04:00
Josh Matthews
9b20d6e7d2 Add average advance width to the font metrics structure, using the X glyph as a best guess. 2014-10-01 15:03:15 -04:00