Commit graph

2510 commits

Author SHA1 Message Date
Patrick Walton
4011291bf2 layout: Stop rebuilding all inline-block flows unconditionally, and
bubble intrinsic inline sizes as necessary when doing incremental
reflow.
2015-04-01 10:52:15 -07:00
Manish Goregaokar
f41acb589a Give userscripts its own module; panic on broken paths 2015-04-01 23:20:38 +05:30
Josh Matthews
57c5b3228a Warning patrol. 2015-04-01 12:59:51 -04:00
dhneio
069f53a25e Fix is_simple_advance check. Fixes #4614. 2015-04-01 12:11:56 -04:00
Patrick Walton
750bbed2cb gfx: Perform more aggressive caching in
`FontContext::get_layout_font_group_for_style()`.

There are several optimizations here:

* We make font families atoms, to allow for quicker comparisons.

* We precalculate an FNV hash of the relevant fields of the font style
  structure.

* When obtaining a platform font group, we first check pointer equality
  for the font style. If there's no match, we go to the FNV hash. Only
  if both caches miss do we construct and cache a font group. Note that
  individual fonts are *also* cached; thus there are two layers of
  caching here.

15% improvement in total layout thread time for Facebook Timeline.
2015-04-01 08:58:16 -07:00
Josh Matthews
a3c13d8a40 Make reflow queries always perform reflow. Fixes #5458. 2015-04-01 11:56:47 -04:00
bors-servo
6824bc9324 auto merge of #5476 : servo/servo/load-failure-panic, r=jdm
Fixes #5365.
2015-04-01 07:51:46 -06:00
Adenilson Cavalcanti
4e9bb15ba7 Instead of panicking on broken url, break from the loop and return. 2015-04-01 15:30:33 +02:00
bors-servo
f25604c7f1 auto merge of #5474 : servo/servo/script-for-event, r=Ms2ger
...ne of them is present (fixes #5258).
2015-04-01 07:06:46 -06:00
Florian Eula
6288a468b9 Implement the onsubmit event handler (fixes #5396). 2015-04-01 13:15:06 +02:00
Keith Yeung
fdcf9618cb Handle the for and event attributes on a script element correctly when one of them is present (fixes #5258). 2015-04-01 12:43:17 +02:00
bors-servo
4846607e18 auto merge of #5469 : mbrubeck/servo/yodalee-issue4768-textencoder, r=jdm
This is a series of already-reviewed changes by @yodalee from #5025, rebased onto current servo master, with some fixups applied:

* Fixed build errors/warnings from the latest rust upgrade.
* Marked `tests/wpt/web-platform-tests/encoding/single-byte-decoder.html` as expecting CRASH.

I could not verify locally that the new test annotation is correct, since the test appears to hang rather than crash on my Linux box.  (Or maybe I just didn't wait long enough.)  If this crash isn't consistent, or if it takes a long time, maybe we should skip this test instead?

r? @jdm
2015-03-31 20:06:49 -06:00
yodalee
9cd976a4e7 Implement TextEncoder
Fixes #4768.
2015-03-31 17:21:27 -07:00
bors-servo
c0c54875a2 auto merge of #5419 : snf/servo/send_storage_event, r=jdm
Addresses #5196
2015-03-31 15:51:52 -06:00
bors-servo
8976bbfe7d auto merge of #5441 : servo/servo/heap-unclassified, r=jdm 2015-03-31 15:03:56 -06:00
snf
1cc5bd4287 broadcasting storage changes events 2015-03-31 21:51:41 +01:00
bors-servo
b79d06c8d2 auto merge of #5349 : mbrubeck/servo/placement-size, r=pcwalton
I think this should have been changed in #3618 but was missed. r? @pcwalton

I wasn't able to come up with a good test case for this, partly because of other bugs related to floats and formatting contexts.
2015-03-31 14:15:59 -06:00
bors-servo
225d7d2ece auto merge of #5457 : deokjinkim/servo/navigator_appversion, r=jdm
In my mistake, I close PR for this commit.
I'm sorry for inconvenience.

@jdm 's comment
The test expectations for /tests/wpt/web-platform-tests/html/dom/interfaces.html and /tests/wpt/web-platform-tests/workers/interfaces.workers.js will need to be updated - http://mxr.mozilla.org/servo/search?string=appversion

According to your guide, I revised commit. Is this your intention?
r? @jdm 

cc @yichoi
2015-03-31 11:51:55 -06:00
bors-servo
ebdf1d494b auto merge of #5400 : pcwalton/servo/transitions-redux, r=glennw
Transition events are not yet supported, and the only animatable
properties are `top`, `right`, `bottom`, and `left`. However, all other
features of transitions are supported. There are no automated tests at
present because I'm not sure how best to test it, but three manual tests
are included.

r? @glennw
2015-03-31 10:39:56 -06:00
Patrick Walton
66dd8c8a6c layout: Implement CSS transitions per CSS-TRANSITIONS § 2.
Transition events are not yet supported, and the only animatable
properties are `top`, `right`, `bottom`, and `left`. However, all other
features of transitions are supported. There are no automated tests at
present because I'm not sure how best to test it, but three manual tests
are included.
2015-03-31 08:46:11 -07:00
Deokjin Kim
c0e691b08d Implement Navigator.appVersion(#5409) 2015-04-01 00:36:40 +09:00
bors-servo
52cc63a262 auto merge of #5166 : JIoJIaJIu/servo/gc, r=jdm 2015-03-31 09:24:58 -06:00
Nicholas Nethercote
66902d2c90 Use usize rather than u64 in MemoryReport.
I should have used usize in the first place.
2015-03-31 15:37:15 +02:00
bors-servo
c1cc31b9d6 auto merge of #5428 : pcwalton/servo/squash-mouse-move, r=jdm
Otherwise they queue up if the event handler isn't 60FPS.

r? @jdm
2015-03-30 13:40:04 -06:00
bors-servo
1e282d55d7 auto merge of #5366 : Adenilson/servo/loadPlaceholder01, r=jdm
I decided to use the old Netscape broken image link icon (later we may
replace the image asset for something more trendier).
2015-03-30 12:40:12 -06:00
bors-servo
46d4ef8167 auto merge of #5393 : pcwalton/servo/root-flow-color-reform, r=glennw
This allows us to do layout off the main thread, which is necessary for
transitions.

r? @glennw
2015-03-30 11:40:14 -06:00
Adenilson Cavalcanti
cdebb3ca54 Load a placeholder when a url to an image is broken.
I decided to use the old Netscape broken image link icon (later we may
replace the image asset for something more trendier). The ref test will
expect that a failed load should display the rippy image.

ImageCacheTask users can define if a placeholder image should be loaded
at start up or not. This enables both the new behavior (e.g. always
return an image even for broken urls) as also the previous one.
2015-03-30 10:02:54 -07:00
Patrick Walton
16db7bab28 layout: Stop going to the DOM to determine the root flow's background
color.

This allows us to do layout off the main thread, which is necessary for
transitions.
2015-03-30 10:00:32 -07:00
bors-servo
018e1f726d auto merge of #5451 : frewsxcv/servo/cleanup-css-style-declarations, r=Ms2ger
* Group imports
* Convert seralization helper function to use `Iterator::fold`
* Remove basically pointless `serialize_value` helper function
* Wrap lines longer than 100 chars
* Add URLs to spec
2015-03-30 10:55:03 -06:00
Corey Farwell
86c254ab6f Cleanup script::dom::cssstyledeclarations
* Group imports
* Convert seralization helper function to use `Iterator::fold`
* Remove basically pointless `serialize_value` helper function
* Wrap lines longer than 100 chars
* Add URLs to spec
2015-03-30 12:38:06 -04:00
bors-servo
0d00e37c23 auto merge of #5403 : frewsxcv/servo/cookie-default-path, r=jdm
* Previously, the function returned an owned String, which is not
  necessary, so now it returns a slice
* Steps have now been documented/labeled
* The last step of the algorithm was incorrect; it would only slice the
  path if the "/" was the last character, which is not what the spec
  says. The spec says to slice up until (but not including) the last
  "/". Also added a regression test for this.
2015-03-30 08:52:06 -06:00
bors-servo
629edc5c46 auto merge of #5379 : genkku/servo/code_value, r=jdm
Changed Key::N to KeyN, also changed Equals to Equal, and NumpadEquals to NumpadEqual.
2015-03-30 07:58:06 -06:00
Mátyás Mustoha
0a3b4f2f65 Canvas: arc throws IndexSizeError on negative radius. 2015-03-30 11:05:33 +02:00
Mikko Vanhatalo
ee1aa6c999 Fixed code_value values for Equal & KpEqual 2015-03-30 11:52:18 +03:00
bors-servo
350a35428a auto merge of #5448 : frewsxcv/servo/fix-assert, r=Ms2ger
We should ensure the parameter is lowercased. Right now, the assert will
always return true.

Discussed in #5445

Introduced in ee2ccc4f87
2015-03-29 20:31:01 -06:00
bors-servo
39556cc832 auto merge of #5422 : bdero/servo/bdero/box-syntax, r=jdm
Closes #5417
2015-03-29 17:10:01 -06:00
bors-servo
a0a1304be0 auto merge of #5443 : Ms2ger/servo/int, r=saneyuki 2015-03-29 16:16:01 -06:00
Corey Farwell
ae9b1636b1 Fix useless assert in script::dom::element
We should ensure the parameter is lowercased. Right now, the assert will
always return true.

Discussed in #5445

Introduced in ee2ccc4f87
2015-03-29 17:54:01 -04:00
Corey Farwell
d838fcce30 Remove some unnecessary uses of as_slice
For the majority of these cases, `as_slice` can be removed due to
`Deref`. In particular, `Deref` for:

* `String` -> `str`
* `Atom` -> `str`

The latter of those two requires, a bump of the locked `string-cache`
library
2015-03-29 14:42:19 -04:00
Brandon DeRosier
ccc55d658f Use box syntax instead of Box::new()
Closes #5417
2015-03-29 13:41:14 -04:00
bors-servo
1282850b99 auto merge of #5436 : servo/servo/rooted-vec, r=Ms2ger,jdm 2015-03-29 05:07:01 -06:00
Ms2ger
865d4b4eb4 Use usize for UnsafeFlow. 2015-03-29 12:51:27 +02:00
Ms2ger
95004ee4b6 Use usize for Floats::len. 2015-03-29 12:47:25 +02:00
Ms2ger
d2252a7214 Use usize for cache indices. 2015-03-29 12:46:28 +02:00
Ms2ger
803eba0e59 Use usize for cache sizes. 2015-03-29 12:45:19 +02:00
Ms2ger
339ab881a2 Use usize in ApplicableDeclarationsCacheQuery's hash method. 2015-03-29 12:45:07 +02:00
Ms2ger
e39c68e307 Use usize in flow_list. 2015-03-29 12:43:44 +02:00
Mukilan Thiyagarajan
e8a1e9eabb Implement RootedVec<T> 2015-03-29 11:58:25 +02:00
bors-servo
7d0d851456 auto merge of #5437 : Ms2ger/servo/int, r=jdm 2015-03-29 03:49:01 -06:00
Corey Farwell
46f14449d0 Add links to spec for script::dom structs/methods 2015-03-28 20:04:30 -04:00