Commit graph

3647 commits

Author SHA1 Message Date
bors-servo
b81749bee3 auto merge of #1415 : dhedlund/servo/constellation_deadlock, r=pcwalton
Constellation blocks on SetId by sending a Port through the compositor channel and waits for a response.  If the compositor is in the process of shutting down, it will not look in the queue again.  The compositor requires the constellation to be shut down first, so it sends a message to shut down and blocks until the constellation finishes, deadlocking.

Only very short lived executions would've been likely to see this deadlock.

_It is technically still possible to trigger a SetId message between when the compositor finishes running and when the constellation shuts down, but the window for exposure is greatly reduced.  I've only seen it with "-o" so far._
2013-12-15 11:25:26 -08:00
Daniel Hedlund
183c387d8b Drain compositor_chan on shutdown, causes deadlocks on constellation
Constellation blocks on SetId by sending a Port through the compositor
channel and waits for a response.  If the compositor is in the process of
shutting down, it will not look in the queue again.  The compositor
requires the constellation to be shut down first, so it sends a message
to shut down and blocks until the constellation finishes, deadlocking.

Only very short lived executions would've been likely to see this deadlock.
2013-12-14 21:57:32 -08:00
bors-servo
8c3c547c07 auto merge of #1414 : dhedlund/servo/issue_941, r=larsbergstrom
Moving another window on top of servo window, or switching screen would result in a blank window until the app was resized.  This was due to a missing glfw callback.

Fixes #941.
2013-12-14 17:13:26 -08:00
Daniel Hedlund
c44001b64c Add glfw window_refresh_callback, windows now redraw on linux
Fixes #941.
2013-12-14 16:08:58 -08:00
Daniel Hedlund
608cd612df Adjust PNG encoder color type to match what's read from gl2
This should fix images produced by the -o flag.
2013-12-14 15:06:02 -08:00
Patrick Walton
10150b0ec5 script: Don't do anything before the window size comes in.
This fixes the `getBoundingClientRect()` content test.
2013-12-13 18:35:48 -08:00
bors-servo
c5d81f13c1 auto merge of #1388 : hyunjunekim/servo/cssissues, r=kmcallister
Fixed this issue ( https://github.com/mozilla/rust/issues/10683 )
2013-12-13 15:40:13 -08:00
bors-servo
a9980b992c auto merge of #1408 : pcwalton/servo/stop-going-to-dom-for-iframes, r=larsbergstrom
r? @larsbergstrom
2013-12-13 15:19:16 -08:00
Patrick Walton
971f77d2c6 layout: Stop going to the DOM for iframe sizes 2013-12-13 15:10:04 -08:00
bors-servo
aa1ebbbdb0 auto merge of #1405 : pcwalton/servo/defuture, r=larsbergstrom
This will allow us to stop going to the DOM in order to handle iframe
sizing. Instead we can just store the pipeline and frame IDs of iframes
inside the flow tree itself.

r? @kmcallister
2013-12-13 11:28:10 -08:00
Patrick Walton
21e8c72a75 constellation: Stop using futures for frame sizes.
This will allow us to stop going to the DOM in order to handle iframe
sizing. Instead we can just store the pipeline and frame IDs of iframes
inside the flow tree itself.
2013-12-13 10:43:27 -08:00
bors-servo
499aa97fa4 auto merge of #1403 : Ms2ger/servo/exec, r=metajack 2013-12-13 09:40:26 -08:00
Ms2ger
9e2af4aae1 Mark some rust files as non-executable. 2013-12-13 18:34:57 +01:00
bors-servo
c67669fe73 auto merge of #1349 : dhedlund/servo/issue_222, r=jdm,me
Fixes #222.

Implements 'text-align' inheritance for inline elements.  The text alignment code has been changed a couple of times since the ticket was originally opened and was improved to inherit the text-align property from from an ancestor element.  This addressed the issue, so long as no inline elements had a text-align property defined.  Both Firefox and Chromium ignore any text-align properties attached to inline elements, but none of the specs are explicit about ignoring the property or inheriting only from non-inline elements:
http://www.w3.org/TR/CSS2/visuren.html#inline-formatting
http://www.w3.org/TR/CSS2/text.html#propdef-text-align

This is my first stab at writing any code that touches the DOM node tree.  Based on a few observations, I made the assumption that the `self.base.node` of a InlineFlow always corresponds to a BlockFlow-based node, no matter how deep inline DOM elements are nested; there was no obvious way to traverse Flow-traited objects directly and I'm not sure if it's possible to get from a FlowData struct back to a non-child {Block,Inline}Flow (probably intentionally).

I could've kept traversing the node tree directly, checking against each node style to ensure it didn't have an inline display property, but I could not create a scenario where the `base.node` was ever an inline.  It also feels like a code smell to be walking up the tree at all, especially for stylesheet properties.  Feels like it should eventually be handled in style::properties directly as being conditional inherited?
2013-12-13 09:07:11 -08:00
bors-servo
2ecafee5a5 auto merge of #1401 : saneyuki/servo/unused, r=metajack
Fix this warning:
```
servo/src/components/gfx/platform/macos/font_list.rs:6:4: 6:42 warning: unused import, #[warn(unused_imports)] on by default
servo/src/components/gfx/platform/macos/font_list.rs:6 use font_context::FontContextHandleMethods;
```
2013-12-13 08:43:15 -08:00
Daniel Hedlund
555e04475e InlineFlow should always inherit text-width from base style
Fixes #222.
2013-12-13 08:18:44 -08:00
Tetsuharu OHZEKI
0f98647edc Remove unused import. 2013-12-13 23:50:09 +09:00
bors-servo
c168e04fe1 auto merge of #1399 : pcwalton/servo/store-image-dimensions, r=kmcallister
the DOM for them.

r? @kmcallister
2013-12-12 18:22:18 -08:00
bors-servo
03269a8387 auto merge of #1398 : pcwalton/servo/propagate-text-decoration, r=pcwalton
going to the DOM.

r? @SimonSapin
2013-12-12 17:58:21 -08:00
Patrick Walton
42cc04684f layout: GC unused box methods 2013-12-12 17:54:51 -08:00
Patrick Walton
a2e91d242b layout: Perform text decoration propagation per CSS 2.1 § 16.3.1 without
going to the DOM.
2013-12-12 17:54:51 -08:00
Patrick Walton
dc8504fd12 layout: Store image dimensions inside image boxes instead of going to
the DOM for them.
2013-12-12 17:51:31 -08:00
Simon Sapin
b6b89639dc Upgrade to rust-encoding upstream. 2013-12-13 00:40:56 +00:00
bors-servo
7b3c3542a3 auto merge of #1396 : pcwalton/servo/acid1-reftest, r=metajack
r? @metajack
2013-12-12 15:37:53 -08:00
bors-servo
144737ce1b auto merge of #1394 : kmcallister/servo/style-damage, r=pcwalton
This fixes the computation of restyle damage on `color-change-text.html`, which can be seen with `RUST_LOG=servo::layout::layout_task`.

However we can't prune the layout traversals yet, because we don't reuse `Flow` objects between reflows, so we have no old values to fall back to.

I think this used to work because `FlowContexts` (as they were called then) were stored in a DOM node's `LayoutData` and reused.  But it's possible that it never really worked, and my testing when I landed the restyle damage code was insufficient (I didn't understand the layout code nearly as well back then).

r? @pcwalton
2013-12-12 15:17:27 -08:00
Patrick Walton
413a91c2d9 test: Implement a reftest for Acid1. 2013-12-12 15:11:26 -08:00
bors-servo
87acc5d493 auto merge of #1387 : pcwalton/servo/ref-count-style, r=pcwalton
This has no difference in CSS selector matching performance and results
in a 31% speedup in constraint solving on the rainbow page.

r? @kmcallister
2013-12-12 14:50:25 -08:00
Keegan McAllister
53747638a1 Disable remaining reflow traversal pruning for now
We don't reuse Flow objects between reflows, so we have no old values to fall
back to.

I think this used to work because FlowContexts (as they were called then) were
stored in a DOM node's LayoutData and reused.  But it's possible that it never
really worked, and my testing when I landed the restyle damage code was
insufficient (I didn't understand the layout code nearly as well back then).
2013-12-12 14:44:34 -08:00
Patrick Walton
4c8383c38b layout: Reference count ComputedValues structures like Gecko does.
This has no difference in CSS selector matching performance and results
in a 31% speedup in constraint solving on the rainbow page.
2013-12-12 14:44:24 -08:00
Keegan McAllister
0238410b47 Allow setting id, class, style without a full reflow
Instead we do selector matching again, then diff the style structs to set the
"restyle damage" bits which are used to prune reflow traversals.

Also don't force a reflow when timers finish, because individual DOM methods
should already take care of that.
2013-12-12 14:43:26 -08:00
Keegan McAllister
93e10eaf20 Call Element::after_set_attr only for null namespace 2013-12-12 14:43:26 -08:00
Keegan McAllister
39fc9eb868 Get rid of reflow_all
This refactoring should not alter behavior.
2013-12-12 14:43:26 -08:00
Keegan McAllister
dd0bb08927 Print restyle damage for debugging 2013-12-12 14:43:24 -08:00
Keegan McAllister
c3c87e3d44 Propagate up the right bits of style damage
The call to propagate_up was lost in eb1b40db13.
2013-12-12 11:52:35 -08:00
bors-servo
6679baadef auto merge of #1392 : Ms2ger/servo/Node-new_inherited, r=metajack
To match existing style for constructors that don't wrap.
2013-12-12 06:58:14 -08:00
Ms2ger
7f4283f4bc Rename some 'new' functions to 'new_inherited'. 2013-12-12 14:34:58 +01:00
bors-servo
3fe50711d4 auto merge of #1390 : pcwalton/servo/decontentboxwidth, r=metajack
Shaves 4 bytes off the size of `Box`.
2013-12-11 22:10:30 -08:00
Patrick Walton
69f4c38008 layout: Remove unused content_box_width field from Box.
Shaves 4 bytes off the size of `Box`.
2013-12-11 22:01:18 -08:00
HyunJune Kim
cf537469b1 add FIX comments 2013-12-12 14:40:02 +09:00
HyunJune Kim
a7865495f6 Fixed this issue (https://github.com/mozilla/rust/issues/10683) 2013-12-12 13:14:37 +09:00
bors-servo
500060a9e2 auto merge of #1384 : pcwalton/servo/border-style-none, r=kmcallister
Closes #1383.

r? @kmcallister
2013-12-11 17:52:06 -08:00
Patrick Walton
511d2b11d4 layout: If the border style is "none", treat its width as 0.
Closes #1383.
2013-12-11 17:46:36 -08:00
bors-servo
a5aabefa4c auto merge of #1382 : kmcallister/servo/headless, r=jdm
r? @jdm
2013-12-11 16:43:38 -08:00
Keegan McAllister
f0613184cf Don't clear buffers if we have no native graphics context
Fixes ./servo -z for content that calls window.close(), such as content tests.
2013-12-11 16:31:08 -08:00
Keegan McAllister
8891587901 contenttest: Fail if Servo exits with non-zero status
Remove "let stdout" to make the borrow checker happy.
2013-12-11 16:31:08 -08:00
Keegan McAllister
e349bfadb7 Kill Servo instead of displaying about:failure when running content tests
Fixes #1380.
2013-12-11 16:24:47 -08:00
Keegan McAllister
bcc0ae6316 contenttest: Print stderr 2013-12-11 16:24:47 -08:00
bors-servo
acb3d9f533 auto merge of #1381 : pcwalton/servo/bogus-box-deletion, r=jdm
flushing text clumps. Fixes this page:

    http://en.wikipedia.org/wiki/Yellow_River

This is not the most efficient thing to do; a FIXME has been added
noting what is most correct.

r? @jdm
2013-12-11 15:58:34 -08:00
Patrick Walton
dcacab8149 layout: Don't delete non-text boxes from the list of input boxes when
flushing text clumps. Fixes this page:

    http://en.wikipedia.org/wiki/Yellow_River

This is not the most efficient thing to do; a FIXME has been added
noting what is most correct.
2013-12-11 14:35:13 -08:00
Patrick Walton
c9c9984d47 test: Add missing line in reftest list. rs=sillytestfix 2013-12-11 12:37:45 -08:00