Commit graph

9180 commits

Author SHA1 Message Date
bors-servo
f5ddbcf19f auto merge of #5228 : metajack/servo/memory-debug, r=pcwalton
Cycles were being created in the flow tree since absolutely positioned
descendants had pointers to their containing blocks. This adds
WeakFlowRef (based on Weak<T>) and makes these backpointers weak
references. This also harmonizes our custom Arc<T>, FlowRef, to be
consistent with the upstream implementation.

Fixes #4915.
2015-03-16 13:16:03 -06:00
Jack Moffitt
237150fa49 Fix memory leak in flow tree by adding weak refs.
Cycles were being created in the flow tree since absolutely positioned
descendants had pointers to their containing blocks. This adds
WeakFlowRef (based on Weak<T>) and makes these backpointers weak
references. This also harmonizes our custom Arc<T>, FlowRef, to be
consistent with the upstream implementation.

Fixes #4915.
2015-03-16 12:53:16 -06:00
bors-servo
cf39c672b6 auto merge of #5210 : GreenRecycleBin/servo/#4968, r=jdm
`./mach test tests/wpt/web-platform-tests/html/browsers/history/the-location-interface/security_location_0.sub.htm` is still failing with the same message as reported in #3219.
2015-03-16 11:42:59 -06:00
bors-servo
ccc6faa147 auto merge of #5169 : mschroeder/servo/issue-4981, r=saneyuki
Fixes #4981
2015-03-16 11:03:58 -06:00
Martin Schröder
5c8b617715 Refactored optional argument "last_modified" for Document
Fixes #4981
2015-03-16 17:53:19 +01:00
bors-servo
660ea05ddb auto merge of #5173 : cyndis/servo/media-attr, r=jdm
Don't add a stylesheet if the current device does not match the media
query specified in a link or style tag.

Cheers,
cyndis
2015-03-16 09:54:56 -06:00
Mikko Perttunen
51ceaed0d0 Add reftest for media queries in link and style tags 2015-03-16 17:19:28 +02:00
Mikko Perttunen
e7a06cd241 Consider media attribute on link and style tags
Don't add a stylesheet if the current device does not match the media
query specified in a link or style tag.
2015-03-16 17:19:26 +02:00
bors-servo
1e1c97adb3 auto merge of #5220 : dmarcos/servo/issue4595, r=jdm 2015-03-16 06:57:53 -06:00
Diego Marcos
cd84ab2ddc Fixes the problem with canvas not being rendered when displayed as block level elements 2015-03-15 22:10:06 -07:00
Glenn Watson
7ca3c8d6e3 Restore part of PR #5125 that was accidentally removed in PR #5160. 2015-03-16 15:02:26 +10:00
bors-servo
4f32596cc6 auto merge of #5222 : cojennin/servo/mac-font-face, r=metajack
CGDataProviderCreateWithData just wraps the underlying buffer. The
underlying buffer needs to be kept around until the data provider is
freed. Adding the buffer to the FontTemplateData struct ensures it
sticks around.
2015-03-15 13:30:56 -06:00
bors-servo
7a29991382 auto merge of #5221 : andreastt/servo/ato/wpt-bootstrap, r=Manishearth
`./mach test-wpt` will fail in non-obvious ways unless all wpt submodules have recursively been checked out first.  This ensure they have been when running the command in a checkout of Servo that hasn't been bootstrapped yet.
2015-03-15 12:12:54 -06:00
Andreas Tolfsen
b951c2f963 tests: ensure bootstrapping for wpt 2015-03-15 18:03:40 +00:00
Connor Jennings
f298089f02 Retain buffer for CGDataProviderCreateWithData. Fixes #5084.
CGDataProviderCreateWithData just wraps the underlying buffer. The
underlying buffer needs to be kept around until the data provider is
freed. Adding the buffer to the FontTemplateData struct ensures it
sticks around.
2015-03-15 14:02:27 -04:00
bors-servo
f30faeadd0 auto merge of #5218 : wenderen/servo/enums-for-mouse-ui-event-constructors, r=Ms2ger
... cancelable arguments

for #4807
2015-03-15 03:18:49 -06:00
Rohan Prinja
5651ea06c6 make MouseEvent::new() and UIEvent::new() take enums for the bubbles and cancelable arguments 2015-03-15 10:05:36 +05:30
bors-servo
389338c28f auto merge of #5212 : Manishearth/servo/ssl-off, r=larsbergstrom
SSL is broken-ish (eg tw.yahoo.com, html.spec.whatwg.org don't work since we don't verify SAN properly), this flag can let devs bypass the protection for testing purposes.
2015-03-14 08:39:48 -06:00
bors-servo
2fb5eb8747 auto merge of #5211 : Ms2ger/servo/qitem, r=Manishearth
This is more future-proof.
2015-03-14 07:54:49 -06:00
Manish Goregaokar
9119bb2041 Add --no-ssl flag for bypassing SSL checking 2015-03-14 19:17:07 +05:30
bors-servo
a2ff1aae82 auto merge of #5213 : servo/servo/tidy-travis, r=Ms2ger 2015-03-14 06:54:48 -06:00
Manish Goregaokar
ca058508cd Only for master 2015-03-14 17:16:39 +05:30
Manish Goregaokar
62f7766acb Check tidy in Travis file 2015-03-14 17:09:43 +05:30
Ms2ger
347f395f4f Use qitem rather than QualityItem::new in XHR.
This is more future-proof.
2015-03-14 11:58:25 +01:00
Daniel Le
0aa727e5b6 Add HOST_FILE environment variable for test-wpt 2015-03-14 18:45:34 +08:00
bors-servo
19cd87aefc auto merge of #5208 : Ms2ger/servo/USVString, r=jdm 2015-03-13 14:30:49 -06:00
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
2382d71242 auto merge of #5164 : luniv/servo/viewport-length-units-reftests, r=jdm
Looking for some review, due to a couple of issues:
* The vmin/vmax tests fail due to exit status being 1 instead of 0. However, when I manually check them via `./mach run tests/ref/viewport_percentage_vmax_vmin{,a,b,c}.html`, the pages render correctly
* Resizing is incredibly flaky. I've checked (via logging), and the actual calculation of the computed length is correct for a given viewport size. However, the box dimensions end up all over the place. I've attached a screenshot to demonstrate (the box is supposed to cover the top-left quarter of the window).
![screen shot 2015-03-05 at 8 50 50 pm](https://cloud.githubusercontent.com/assets/1111588/6520012/5e5d7ac4-c379-11e4-8d56-f4c57616ac44.png)

Fixes #5165.
2015-03-13 10:42:49 -06:00
James Gilbertson
d80abce13e Reftests for viewport percentage length units 2015-03-13 10:27:27 -06:00
bors-servo
a50807051b auto merge of #5180 : luniv/servo/viewport-length-cached-values-invalidation, r=SimonSapin
When a viewport is resized, the computed values for a style containing viewport percentage length units become stale. However, there's no way for those styles to be invalidated after a resize. As a solution, this commit invalidates the computed values cache after a resize has occurred, which is probably over-kill.

A better solution would probably be to track under what conditions computed values remain valid, and invalidate them as indicated.
2015-03-13 09:36:50 -06: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
5f439e7eaa auto merge of #5204 : ehegnes/servo/squelch_contenttest, r=jdm
This actually fixes 5159.
2015-03-12 20:48:47 -06:00
Eric Hegnes
6208eaa628 Further squelch warnings from contenttest.rs
This actually fixes 5159
2015-03-12 20:38:49 -04:00
bors-servo
1a9679857a auto merge of #5177 : PeterReid/servo/issue5158, r=jdm
Fixes #5158 

Part of this involved switching to OsStrings for process arguments. Those now interface awkwardly with some remaining use old_io, but that will only be needed until rustc is newer.
2015-03-12 18:03:46 -06:00
Peter Reid
8c5f9bb806 Fix warnings in tests/reftest.rs 2015-03-12 19:06:12 -04: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
bors-servo
6593cf9ec4 auto merge of #5194 : hirschenberger/servo/gif_alpha_background, r=larsbergstrom
This is GIF specific. It's also done when the image is PNG but PNG is
handled separately with the PNG crate, whereas GIFs are handled by the
stb-image crate and the distinction between alpha and non-alpha-supporting
images was missing.
2015-03-12 05:51:48 -06:00
hirschenberger
2a91c317c0 Add reftest for issue #5176 2015-03-12 11:02:29 +01:00
bors-servo
d7e9b8b96b auto merge of #5202 : doublec/servo/rename_unwrap, r=Ms2ger
Fix for issue #2108. That issue mentions an `unwrap_object` which doesn't seem to exist so I renamed `unwrap` to `native_from_reflector` and `unwrap_jsmanaged` to `native_from_reflector_jsmanaged`. The latter is a bit unweildy - maybe a shorter name might be better?
2015-03-12 01:51:49 -06: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
bors-servo
27a76f14b2 auto merge of #5201 : Ms2ger/servo/plugins, r=jdm 2015-03-11 21:42:48 -06:00
Ms2ger
8223f695fb Remove plugin attributes from extern crates. 2015-03-11 23:45:16 +01:00
Matt Brubeck
4641640d14 Add an environment variable to override cache-dir
This will be set in servo/saltfs to prevent our buildbot builders from
re-downloading the build tools for every build.
2015-03-11 15:07:28 -07:00
bors-servo
7b6e314df1 auto merge of #5198 : ienzam/servo/force_relayout_cleanup, r=jdm
This is a cleanup for issue #3959 

Do I need to inline force_relayout?
2015-03-11 14:12:50 -06:00