Ms2ger
e72b5613ee
Don't move the data when extracting the bytes in XMLHttpRequest::Send.
...
The data is used later to set the Content-Type header. Current rustc
(4d2af3861) does not detect this use-after-move, but treats the later use as
if the data was None. It will, however, detect the bug in d2b30f7d3, which we
are upgrading to.
2014-09-29 17:52:44 +02:00
Glenn Watson
e237519fdd
Revert "Set default resolution to 1280x1024 now that reftests render to FBO."
...
This reverts commit c74798bb6b
.
2014-09-29 10:10:37 +10:00
Glenn Watson
c74798bb6b
Set default resolution to 1280x1024 now that reftests render to FBO.
2014-09-29 07:42:45 +10:00
Ms2ger
652a867800
Fix indentation in is_htmliframeelement.
2014-09-28 15:10:44 +02:00
bors-servo
42205675b3
Merge pull request #3508 from wenderen/JSTraceable.key
...
trace keys as well
Reviewed-by: Manishearth
2014-09-27 23:21:28 -06:00
Rohan Prinja
e50e704f5a
trace keys as well
2014-09-28 09:44:43 +05:30
bors-servo
c9c8d63727
Merge pull request #3501 from zwarich/telement-lifetimes
...
Remove the 'static lifetime parameters from TElement methods
Reviewed-by: jdm
2014-09-27 17:09:28 -06:00
bors-servo
1b5fac5bde
Merge pull request #3503 from Ms2ger/page-url
...
Simplify the Page URL handling in handle_resize_inactive_msg.
Reviewed-by: jdm
2014-09-27 13:39:27 -06:00
bors-servo
b7345796bc
Merge pull request #3498 from pcwalton/border-box-double-counting
...
Stop double-counting stuff in inline-block
Reviewed-by: glennw
2014-09-27 13:12:30 -06:00
bors-servo
c10948736f
Merge pull request #3497 from zwarich/extended-deref
...
Add an extended_deref method to JSRef
Reviewed-by: Manishearth
2014-09-27 12:48:30 -06:00
bors-servo
6fb8eb32f2
Merge pull request #3474 from glennw/reftest-fbo
...
When rendering to PNG, draw to an FBO rather than default framebuffer.
Reviewed-by: mrobinson
2014-09-27 12:21:31 -06:00
Cameron Zwarich
b2a3519011
Remove the 'static lifetime parameters from TElement methods
...
This improves the static correctness of layout's use of DOM nodes.
Fixes #2595 .
2014-09-27 11:14:10 -07:00
Cameron Zwarich
bf025e9b9b
Refine a lifetime parameter
2014-09-27 11:14:10 -07:00
Cameron Zwarich
61ae80e186
Add an extra lifetime parameter to TElement / TNode
...
This isn't used for anything yet, but it's easier to propagate this
change in a separate commit.
2014-09-27 11:14:10 -07:00
Patrick Walton
690bf079f7
layout: Refactor a few things, mostly just to obey the line limit.
2014-09-27 06:07:58 -07:00
Patrick Walton
fb5952fed0
layout: Don't double-count padding, etc, and don't draw
...
backgrounds/borders/etc. twice for inline-blocks.
Improves Reddit, GitHub, and many other sites.
2014-09-27 06:07:58 -07:00
Ms2ger
a12f2b9f06
Simplify the Page URL handling in handle_resize_inactive_msg.
...
This also makes it more obvious what's actually happening.
2014-09-27 13:56:33 +02:00
bors-servo
a2220f1ea4
Merge pull request #3499 from pcwalton/ua-fixes
...
style: Tweak the UA style a little bit.
Reviewed-by: SimonSapin
2014-09-27 03:03:31 -06:00
Glenn Watson
15e1e5e43f
Fix some mutable variable warnings.
2014-09-27 15:04:40 +10:00
bors-servo
33e2a7b362
Merge pull request #3492 from pcwalton/clear-generated-content-table
...
layout: Support any `display` property in generated content, and allow
Reviewed-by: glennw
2014-09-26 22:24:32 -06:00
bors-servo
94b7c486b1
Merge pull request #3486 from glennw/inline-fixes
...
Improve acid2. Fix line height calculation. Text fragments get correct enclosing element style.
Reviewed-by: pcwalton
2014-09-26 21:57:35 -06:00
Glenn Watson
71758643dc
Remove unneeded clones and add some comments.
2014-09-27 13:51:10 +10:00
Patrick Walton
0a0e73b21f
style: Tweak the UA style a little bit.
2014-09-26 20:44:41 -07:00
bors-servo
a35212410a
Merge pull request #3496 from zwarich/disabled-state-helpers-jsref
...
Convert &JSRef -> JSRef in DisabledStateHelpers
Reviewed-by: jdm
2014-09-26 20:24:33 -06:00
bors-servo
86eec63a02
Merge pull request #3493 from zwarich/root-lifetimes
...
Improve the correctness of Root lifetimes
Reviewed-by: jdm
2014-09-26 19:57:33 -06:00
Cameron Zwarich
bad7915914
Make the DocumentHelpers trait use extended_deref
2014-09-26 18:38:58 -07:00
Cameron Zwarich
2789750f66
Make the AttrHelpers trait use extended_deref
2014-09-26 18:38:36 -07:00
Cameron Zwarich
8334942d0c
Add an extended_deref method to JSRef
...
The extended_deref method will take a JSRef<'a, T> and produce an &'a T,
in contrast to the standard deref method that takes an &'b JSRef<'a, T>
and produces an &'a T. This is useful when avoiding passing a JSRef by
reference.
2014-09-26 18:37:26 -07:00
bors-servo
39b6bd9b95
Merge pull request #3489 from ProgramFOX/issue2242-2
...
Made some DOM fields private.
Reviewed-by: jdm
2014-09-26 19:30:33 -06:00
bors-servo
1e5770a138
Merge pull request #3432 from gilles-leblanc/issue-3361
...
Handle dynamic addition of attributes
Reviewed-by: jdm
2014-09-26 19:00:35 -06:00
Gilles Leblanc
8e77422d8e
Handle dynamic addition of attributes
...
Handles dynamic addition of attributes to <link rel=stylesheet>
elements.
Fixes #3361
2014-09-26 19:04:32 -04:00
Cameron Zwarich
4bf2a88ae2
Convert &JSRef -> JSRef in DisabledStateHelpers
2014-09-26 15:58:36 -07:00
Cameron Zwarich
4f32d54fd8
Convert &JSRef -> JSRef for the PrivateNodeHelpers trait
2014-09-26 15:46:37 -07:00
Cameron Zwarich
78f061ee54
Improve the correctness of Root lifetimes
...
Use the new lifetime bounds feature of Rust to enforce that the
RootCollection field of Root outlives the jsref field. This still
doesn't enforce that the Root itself outlives the jsref field, and
doing this would require some sort of init dance.
2014-09-26 14:25:43 -07:00
Patrick Walton
47fc64052c
layout: Support any display
property in generated content, and allow
...
tables to clear floats.
Improves the GitHub header.
2014-09-26 14:09:25 -07:00
ProgramFOX
71a05a9c39
Made some DOM fields private.
...
Relevant to #2242 .
2014-09-26 20:35:01 +02:00
Glenn Watson
26cf00ef4e
Don't render backgrounds for text fragments.
2014-09-26 18:28:40 +10:00
Patrick Walton
36f3f5a0ab
layout: Block formatting contexts should contain all their floats.
...
Improves Pinterest considerably.
2014-09-26 00:39:07 -07:00
Glenn Watson
cf79e64a5a
Improve acid2. Fix line height calculation. Text fragments get correct enclosing element style.
...
* Enabled acid2 on mac + linux. Updated the reference image. The only difference from the
real acid2 now is the paint order and a 1 pixel horizontal offset on the nose.
* Change line-height to be calculated correctly.
* Apply enclosing element style to text fragments.
2014-09-26 17:12:22 +10:00
bors-servo
20f5fdd000
Merge pull request #3467 from pcwalton/enhance-block-formatting-context-guess
...
layout: Enhance the heuristic that guesses the inline size of block formatting contexts.
Reviewed-by: glennw
2014-09-25 19:24:30 -06:00
Patrick Walton
5b4380389e
layout: Enhance the heuristic that guesses the inline size of block
...
formatting contexts.
The widths of block formatting contexts depend on the floats prior to
them. To avoid a circular dependency between width assignment and height
assignment, we must guess their widths during the assign-widths pass.
The old code simply used the size of the last float, whether
left-floated or right-floated, but this proved insufficient to handle
layouts like those seen on Reddit. The new heuristic keeps track of both
left and right floats independently and sums the width of all left and
right floats to determine the width of a block formatting context. This
is still insufficient to properly lay out Reddit, but the results are
much more acceptable.
A fully correct approach will require that blocks be laid out again if
the initial guess proved to be incorrect. A `TODO` is in the code to
handle this case.
2014-09-25 17:50:24 -07:00
bors-servo
177127e597
Merge pull request #3398 from glennw/config-res
...
Allow resolution to be configured on command line. Default to 1280x1024.
Reviewed-by: SimonSapin
2014-09-25 18:27:38 -06:00
Patrick Walton
9f4c2de211
layout: Unify the block-size computation for blocks and floats.
...
The float code was old and did not support most of CSS 2.1. So unifying
the two paths both simplifies code and improves functionality.
Improves the Reddit sidebar.
2014-09-25 16:43:24 -07:00
bors-servo
c2d6d8084c
Merge pull request #3480 from zwarich/trailing-whitespace
...
Fix trailing whitespace tidy errors
Reviewed-by: larsbergstrom
2014-09-25 17:00:34 -06:00
bors-servo
d95b88c830
Merge pull request #3477 from Ms2ger/global
...
Move global_object_for_js_object to global.rs
Reviewed-by: jdm
2014-09-25 14:48:32 -06:00
Cameron Zwarich
ce2484a7ce
Fix trailing whitespace tidy errors
2014-09-25 13:48:07 -07:00
Cameron Zwarich
5399e117de
Add the MPL back to components/plugins/lints.rs
...
This license was accidentally removed in 5b866e9e
.
2014-09-25 13:45:39 -07:00
Ms2ger
c4d36b5721
Remove unused cx_for_dom_object function.
2014-09-25 22:35:38 +02:00
Ms2ger
1d00b28df0
Regroup uses of JS constants in utils.rs.
2014-09-25 22:35:38 +02:00
Ms2ger
47829a37a9
Move global_object_for_js_object to global.rs.
...
This appears to be a more sensible place for it (related to #433 ).
2014-09-25 22:35:37 +02:00