Commit graph

1039 commits

Author SHA1 Message Date
Ms2ger
2345f5461b Null-check the result of JS_GetStringCharsAndLength. 2015-03-13 21:27:58 +01:00
Ms2ger
0593d77b93 Use USVString for URLUtils and URLUtilsReadOnly. 2015-03-13 21:27:58 +01:00
Ms2ger
bbbdb98897 Implement USVString. 2015-03-13 21:27:58 +01:00
Ms2ger
4157a2b02b Update the WebIDL parser. 2015-03-13 21:27:58 +01:00
bors-servo
c05de08630 auto merge of #5206 : Ms2ger/servo/pre-rustup-codegen-cleanup, r=jdm,SimonSapin 2015-03-13 08:42:49 -06:00
Ms2ger
6eb9607bb9 Don't define empty FooMethods traits. 2015-03-13 14:54:45 +01:00
Ms2ger
b213a80f80 Remove unused lifetime parameters to dictionaries.
They were used for Root members, but those no longer use lifetimes.
2015-03-13 14:49:36 +01:00
bors-servo
8e811229ba auto merge of #4417 : pcwalton/servo/border-spacing, r=larsbergstrom
Table layout code has been refactored to push the spacing down to
rowgroups and rows; this will aid the implementation of
`border-collapse` as well.

r? @SimonSapin
2015-03-12 13:03:49 -06:00
Patrick Walton
586c12ccc4 layout: Implement border-spacing per CSS 2.1 § 17.6.1 and the legacy
`cellspacing` attribute per HTML5 § 14.3.9.

Table layout code has been refactored to push the spacing down to
rowgroups and rows; this will aid the implementation of
`border-collapse` as well.

This commit also fixes two nasty issues in table layout:

* In fixed layout, extra space would not be divided among columns that
  had auto width but had nonzero minimum width.

* In automatic layout, extra space would be distributed to constrained
  columns as well even if unconstrained columns with percentage equal to
  zero were present.
2015-03-12 12:00:40 -07:00
Chris Double
2af19b2675 Fix #2108 by renaming unwrap functions to native_from_reflector
As noted by @bholley. "unwrap" is confusing because we are
both stripping off wrappers *and* getting a native from a
reflector. Changing the "unwrap" usage to "native_from_reflector"
for clarity.

This renames 'unwrap' to 'native_from_reflector' and
'unwrap_jsmanaged' to 'native_from_reflector_jsmanaged'.
2015-03-12 19:15:12 +13:00
Md. Enzam Hossain
6d13361c64 Remove redundant force_relayout calls. 2015-03-11 19:42:59 +00:00
Glenn Watson
33829c0254 Perform reflow if load events dirty any nodes.
This fixes some test failures that begin occurring when other events (such as resize) are fixed to only occur when needed.
2015-03-11 08:43:47 +10:00
bors-servo
e8f1a046c6 auto merge of #5185 : mmatyas/servo/canvas_arc, r=pcwalton
This patch enables the use of `arc()` on the canvas.
I couldn't add reftest this time, as it involves some antialiasing issues, and so the reference doesn't match.
2015-03-10 09:45:49 -06:00
bors-servo
d31e80f894 auto merge of #5182 : zslayton/servo/master, r=jdm
Opening this PR to invite feedback. 

Of the many `match` statement candidates for conversion to `if let`, several included `if` guards. Since `if let` doesn't support this syntax, I used nested if statements. If this is undesirable, say the word and I can revert those cases to `match`.
2015-03-10 07:51:50 -06:00
Zack Slayton
08ac0766ed Use new if let syntax wherever possible. Fixes #4153. 2015-03-10 09:18:55 -04:00
bors-servo
fd1bb49a65 auto merge of #5160 : pcwalton/servo/counters-redux, r=SimonSapin
Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)

Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.

Reconstructed from #5138 via raw diffing.

r? @SimonSapin
2015-03-09 23:24:47 -06:00
Patrick Walton
f9cdd05d58 layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1
§ 12.3-12.5.

Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)

Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.
2015-03-09 17:13:45 -07:00
Mátyás Mustoha
c98bca6130 Canvas: added arc(). 2015-03-09 21:55:40 +01:00
Avi Weinstock
7803f2b216 Subsume ScriptMsg::WorkerDispatchErrorEvent into ScriptMsg::RunnableMsg via introduction of Worker::WorkerErrorHandler (Closes #5171). 2015-03-09 09:24:40 -04:00
bors-servo
4f3feed2be auto merge of #5150 : Adenilson/servo/reflowNotifications03, r=jdm 2015-03-06 21:48:50 -07:00
bors-servo
73e5bbec43 auto merge of #5054 : psdh/servo/scriptimplementation, r=jdm
Fixes #4089
2015-03-06 13:36:53 -07:00
Adenilson Cavalcanti
618f56410d Implements reflow events debugging.
Start servo with -Z relayout-event and you should have
reflow events printed to the terminal.
2015-03-06 12:27:18 -08:00
Guro Bokum
bf26d61d5e ScriptTask::mouse_over_targets is not traced #4985 2015-03-06 20:22:41 +07:00
Prabhjyot Singh Sodhi
64ba4a914e implement missing steps from "prepare a script" algorithm
Fixes #4089
2015-03-06 03:16:59 +05:30
bors-servo
67548a6244 auto merge of #5127 : KiChjang/servo/partial-eq-jsref, r=Ms2ger
Fixes #5112, #3960
2015-03-05 01:15:44 -07:00
Adenilson Cavalcanti
a31d3d7f70 Due to changes on Page/Window interfaces, we no longer have use
for flush_layout().
2015-03-04 11:39:29 -08:00
Josh Matthews
4972b623e1 Separate disposing of layout data from the GCing of the DOM object reflectors. Change the order of operations when shutting down the script task to ensure that Window globals aren't used after they've been GCed. 2015-03-03 16:25:40 -05:00
Josh Matthews
c816975750 Documentation and cleanup. 2015-03-03 16:25:40 -05:00
Josh Matthews
e2c4f5ed67 Move everything unrelated to the frame tree out of Page and into Document or Window. Reduce the API surface of Page to a bare minimum to allow for easier future removal. 2015-03-03 16:25:40 -05:00
bors-servo
621150db1c auto merge of #5124 : Adenilson/servo/cleanupWarning01, r=Ms2ger 2015-03-03 13:51:48 -07:00
Simon Sapin
4c1d778ced Revert "layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1"
This reverts commit 30fd28d107.
2015-03-03 21:16:24 +01:00
bors-servo
e1a50c7719 auto merge of #5133 : servo/servo/background-size, r=SimonSapin
`background-size` per CSS-BACKGROUNDS § 3.9.

Nearest neighbor interpolation is used for `crisp-edges`, like Firefox.
A note has been added that we could do better if we wanted to.

Multiple backgrounds are not yet supported.

Rebase of #4368. Fixes #4368.
2015-03-03 11:48:54 -07:00
bors-servo
5cd6316add auto merge of #5067 : servo/servo/counters, r=SimonSapin
Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)

Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.

Moved from #4544, because Critic.

Fixes #4544.
2015-03-03 10:42:52 -07:00
Patrick Walton
09c53f461d layout: Implement image-rendering per CSS-IMAGES-3 § 5.3 and
`background-size` per CSS-BACKGROUNDS § 3.9.

Nearest neighbor interpolation is used for `crisp-edges`, like Firefox.
A note has been added that we could do better if we wanted to.

Multiple backgrounds are not yet supported.
2015-03-03 17:54:12 +01:00
Patrick Walton
30fd28d107 layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1
§ 12.3-12.5.

Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)

Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.
2015-03-03 17:31:19 +01:00
Patrick Walton
a82fc00806 layout: Implement overflow-x and overflow-y per CSS-OVERFLOW § 3.
Fragmentation is not yet supported.
2015-03-03 17:03:27 +01:00
Avi Weinstock
bcc27d9bd0 Replace borrow with borrow_for_gc_trace in JSTraceable::trace (Issue #4778). 2015-03-03 09:06:45 -05:00
Keith Yeung
a07a0cf39f Added type parameter to PartialEq on JSRef (fixes #5112, #3960) 2015-03-03 11:46:13 +08:00
Adenilson Cavalcanti
a2fea4c093 Cleanup compilation warning. 2015-03-02 17:03:06 -08:00
bors-servo
65454e51c8 auto merge of #5086 : glennw/servo/reap-more-stuff, r=jdm
Also introduce a clear() function to layout data which will be used to clear items such as compositor layouts.

Clear the layout data when a node becomes display:none.
2015-03-02 16:45:51 -07:00
bors-servo
93d1f40a96 auto merge of #4475 : pcwalton/servo/text-shadow, r=mbrubeck
r? @mbrubeck 

Depends on servo/rust-geom#64.
2015-03-02 14:54:52 -07:00
Patrick Walton
09358b908d layout: Implement text-shadow per CSS-TEXT-DECORATION-3 § 4. 2015-03-02 13:28:51 -08:00
Glenn Watson
611fd7a846 Reap layout data whenever a node is removed from the tree.
Also introduce a clear() function to layout data which will be used to clear items such as compositor layouts.

Clear the layout data when a node becomes display:none.
2015-03-03 07:12:51 +10:00
bors-servo
9eaa48b793 auto merge of #5089 : mmatyas/servo/canvas_lineto, r=jdm
This patch enables the use of `lineTo()` on the canvas.
2015-03-02 13:33:55 -07:00
Mátyás Mustoha
774cc4a93a Canvas: added lineTo(). 2015-03-02 21:00:50 +01:00
bors-servo
2f3697f5f3 auto merge of #5110 : Ms2ger/servo/defaultvalue-strings, r=jdm 2015-03-02 12:57:59 -07:00
Ms2ger
5a1e6b772c Fix string default values. 2015-03-02 20:54:55 +01:00
bors-servo
fed878710c auto merge of #5111 : KiChjang/servo/step-1-anchor, r=Manishearth
Fixes #4871
2015-03-01 22:18:49 -07:00
Keith Yeung
83f56ed061 Implementation of step 1 activation behavior of htmlanchorelement (fixes #4871)
Fixed issues
2015-03-02 12:54:50 +08:00
bors-servo
184d32b519 auto merge of #5103 : Ms2ger/servo/from_actual, r=jdm 2015-02-28 13:33:49 -07:00