Commit graph

2018 commits

Author SHA1 Message Date
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
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
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
Ms2ger
8223f695fb Remove plugin attributes from extern crates. 2015-03-11 23:45:16 +01:00
Md. Enzam Hossain
6d13361c64 Remove redundant force_relayout calls. 2015-03-11 19:42:59 +00:00
hirschenberger
ab4b34d423 Fix #5176 by premultiplying the alpha channel to the color channels
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-11 14:52:16 +01:00
Glenn Watson
e265b6b15b Remove unused subpage field from page 2015-03-11 14:13:30 +10:00
Glenn Watson
ec91fa2cfd Remove now unused id field for frame tree. 2015-03-11 13:41:55 +10:00
bors-servo
e581648c75 auto merge of #5189 : glennw/servo/page-url, r=larsbergstrom
This doesn't have any effect on functionality, it just simplifies a few upcoming changes with how FrameIds work.
2015-03-10 18:12:47 -06:00
Glenn Watson
3befc8ce0b Make change page url message consistent with other compositor messages.
This doesn't have any effect on functionality, it just simplifies a few upcoming changes with how FrameIds work.
2015-03-11 08:54:36 +10: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
bors-servo
f4a362725f auto merge of #5183 : aweinstock314/servo/master, r=saneyuki
...via introduction of Worker::WorkerErrorHandler (Closes #5171).
2015-03-09 17:00:51 -06:00
Matt Brubeck
cabbbcc978 Keep track of the containing block writing mode.
This is necessary for correctly converting `relative_containing_block_size`
to physical coordinates.
2015-03-09 14:22:36 -07:00
Matt Brubeck
8221bfc3ef Layout fixes for RTL child flows in LTR parents
...and vice-versa.  This is not a complete fix for all mixed-direction layout
cases, but it fixes enough problems to make some simple test cases pass, like
tha attached reftest.

There are FIXME comments for many of the remaining issues.  In particular,
this does not yet handle RTL layout of fixed/absolute elements.
2015-03-09 14:21:26 -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
da880af742 auto merge of #5170 : metajack/servo/update-cocoa-glutin, r=pcwalton
This just requires updating glutin and cocoa to pick up some backported fixes.
2015-03-07 20:45:48 -07:00
bors-servo
4f3feed2be auto merge of #5150 : Adenilson/servo/reflowNotifications03, r=jdm 2015-03-06 21:48:50 -07:00
Jack Moffitt
43c82b9076 Fix scrolling on OS X.
This just requires updating glutin and cocoa to pick up some backported fixes.
2015-03-06 16:37:29 -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
bors-servo
4bd5aed500 auto merge of #5153 : cyndis/servo/check-font-result, r=jdm
Thread font load errors from platform font loading code to
FontContext::get_layout_font_group_for_style, and cache the failure
result, instead of panicing the thread when a font fails to load.

Before this patch, a failed font load would panic a LayoutTask,
causing a cascade of panics, eventually aborting the whole engine
during a panic within panic.

On my Arch Linux machine almost every page would crash in this manner,
including e.g. reddit.com and cnn.com. Mosf of the requested fonts would
load fine but some single variant of Helvetica would fail always. Not sure
how to create a test for this as it seems pretty system-specific.

Cheers,
cyndis
2015-03-06 10:31:05 -07:00
Mikko Perttunen
92a4bba785 Handle font load errors in FontContext
Thread font load errors from platform font loading code to
FontContext::get_layout_font_group_for_style, and cache the failure
result, instead of panicing the thread when a font fails to load.

Before this patch, a failed font load would panic a LayoutTask,
causing a cascade of panics, eventually aborting the whole engine
during a panic within panic.
2015-03-06 18:18:22 +02:00
Guro Bokum
bf26d61d5e ScriptTask::mouse_over_targets is not traced #4985 2015-03-06 20:22:41 +07:00
bors-servo
1a73766db2 auto merge of #5105 : gilles-leblanc/servo/issue-5063, r=jdm
Adds hostsfile parsing support for:
* Tabs
* Comments (line and end of line)
* IPv4 address validation
* Basic IPv6 address validation
* End of line whitespaces
* Host name alias (multiple host names per address)

Fixes #5063
2015-03-05 20:03:55 -07:00
Gilles Leblanc
70aa253a65 Specify regex and regex_macros version numbers
For compatibility with current Rust version.

Issue #5063
2015-03-05 21:09:41 -05:00
bors-servo
a557b51c28 auto merge of #5154 : luniv/servo/viewpoint-percent-lengths, r=SimonSapin
Spec: http://dev.w3.org/csswg/css-values-3/#viewport-relative-lengths
2015-03-05 18:55:02 -07:00
Gilles Leblanc
0faa55d2ce Add more robust hostsfile parsing
Adds hostsfile parsing support for:
* Tabs
* Comments (line and end of line)
* IPv4 address validation
* Basic IPv6 address validation
* End of line whitespaces
* Host name alias (multiple host names per address)

Fixes #5063
2015-03-05 20:33:33 -05:00
Prabhjyot Singh Sodhi
64ba4a914e implement missing steps from "prepare a script" algorithm
Fixes #4089
2015-03-06 03:16:59 +05:30
James Gilbertson
1931a69ad2 Remove un-used use statement 2015-03-05 12:45:59 -07:00
James Gilbertson
a8cd40e270 Remove the 'ch' font-relative length unit 2015-03-05 12:45:58 -07:00
James Gilbertson
dc5a9e56c7 The 'font-size' property needs to use context.inherited_font_size, not context.font_size 2015-03-05 12:45:58 -07:00
Dan Fox
559ff68b31 Get rid of servo_util 2015-03-05 17:42:05 +00:00
Dan Fox
19686acdec Merge in servo/master 2015-03-05 17:34:18 +00:00
Ms2ger
ff2f7ea567 Remove an unused import from properties.rs. 2015-03-05 16:21:57 +01:00
James Gilbertson
bc1c44bbc2 Implement viewport percentage length units ('vw', 'vh', 'vmin', 'vmax') 2015-03-05 07:11:34 -07:00
James Gilbertson
16a8047343 Defer media query width computation until evalation 2015-03-05 07:09:10 -07:00
James Gilbertson
41786c4cb4 Refactor style::values::specified::Length to store length by kind (absolute, font-relative or character width) 2015-03-05 07:09:10 -07:00
James Gilbertson
00785ecf63 Make the initial viewport size available to style::properties::cascade 2015-03-05 07:09:10 -07:00
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