Commit graph

3318 commits

Author SHA1 Message Date
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
Patrick Walton
e1d562198c Merge pull request #1379 from pcwalton/png
net: Color space convert 32-bit ARGB PNGs as well.
2013-12-11 12:37:17 -08:00
Patrick Walton
85f1af42c3 net: Color space convert 32-bit ARGB PNGs as well. 2013-12-11 11:22:37 -08:00
Patrick Walton
fc80be982a Merge pull request #1368 from SimonSapin/master
Fix #1264: support namespaced attribute selectors.
2013-12-11 09:16:47 -08:00
Patrick Walton
64c18ab699 Merge pull request #1370 from pcwalton/height-containing-block
layout: Make "height" relative to the initial containing block for the root.
2013-12-11 09:15:39 -08:00
Simon Sapin
4f673f031e Make sure stylsheets have a base URL. 2013-12-11 16:51:08 +00:00
Simon Sapin
2d6ac33656 Add support for non-UTF8 CSS stylesheets, with rust-encoding. 2013-12-11 16:40:30 +00:00
Simon Sapin
b98acc2f75 Add rust-encoding as a submodule.
Upstream: https://github.com/lifthrasiir/rust-encoding
Servo’s fork: https://github.com/mozilla-servo/rust-encoding

As of this writing, upstream’s master branch targets Rust 0.8,
and its rust-0.9-pre branch targets Rust master.
Servo uses a Rust version in-between those.
I pushed a rust-servo branch to our fork
that backports from rust-0.9-pre.
2013-12-11 14:25:07 +00:00
Simon Sapin
bc36ca860d Remove obsolete makefile lines about Netsurf’s libcss. 2013-12-11 13:10:52 +00:00
bors-servo
803f9f6d7e auto merge of #1372 : ksh8281/servo/remove_@_in_LayoutTask.FontContext2, r=pcwalton
Remove @ in layout task.font_context & fix linux/FontContextHandle
Arc<FontContextHandle> -> Rc<FontContextHandle>
2013-12-10 21:01:12 -08:00
patrick kim
ac216be06d makes linux/Arc<FontContextHandle> Rc<FontContextHandle> 2013-12-11 11:42:14 +09:00
patrick kim
0026eb0899 remove @ in LayoutTask.FontContext 2013-12-11 11:42:14 +09:00
patrick kim
55771bc307 make font/platform/gfx/font_context safe 2013-12-11 11:40:58 +09:00
bors-servo
279a82bdd3 auto merge of #1371 : pcwalton/servo/flatten-box, r=larsbergstrom
63% improvement in box building on the rainbow page.

r? @larsbergstrom
2013-12-10 18:22:10 -08:00
Patrick Walton
1ba71432ee layout: Change ~Box to Box.
63% improvement in box building on the rainbow page.
2013-12-10 18:00:38 -08:00
Patrick Walton
225ae67b60 layout: Make "height" relative to the initial containing block for the root.
Fixes Wikipedia.
2013-12-10 17:30:31 -08:00
Simon Sapin
b290823f4d Fix #1264: support namespaced attribute selectors. 2013-12-10 17:53:12 +00:00
bors-servo
4b3defb282 auto merge of #1353 : dhedlund/servo/resource_port_and_user, r=pcwalton
User credentials and port were not being preserved when pre-fetching path-based resources.  For example, consider the following HTML:

```html
<html>
  <body>
    <img src="logo.png" />
  </body>
```

Running the following command would try to fetch the image from `http://localhost/my-site/logo.png` and crash the browser with ConnectionRefused error:
```
$ ./servo http://foo:bar@localhost:8080/my-site/
task '<unnamed>' failed at 'Unhandled condition: io_error: rt::io::IoError{kind: ConnectionRefused, desc: "connection refused", detail: None}', /home/daniel/Programming/servo/src/compiler/rust/src/libstd/condition.rs:131
...
```

This should now be fixed.
2013-12-09 22:16:10 -08:00
bors-servo
794ea62ed9 auto merge of #1363 : ryanhc/servo/owned_layout, r=metajack
Removing all @ from flowtree to make it parallelism-ready.
The connection between displaylist and flowtree is removed, i.e., when displaylist is built, box is cloned.
Whether displaylist still needs to have boxes is a design decision to make.

Also thanks to @ksh8281
2013-12-09 21:01:09 -08:00
Ryan Choi
d26bf36833 removing @ from flowtree. (but cloning boxes when creating a display list) 2013-12-10 13:44:20 +09:00
bors-servo
6014bd3813 auto merge of #1365 : pcwalton/servo/minor-layout-refactoring, r=metajack
r? @metajack
2013-12-09 19:43:16 -08:00
Patrick Walton
30bbaa49b7 Revert "auto merge of #1356 : ksh8281/servo/remove_@_in_LayoutTask.FontContext, r=pcwalton"
This reverts commit e8ffac13d7, reversing
changes made to db923feffe.

Reverting this change because FreeType is *not* thread safe. See the
documentation here:

http://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html

"In multi-threaded applications, make sure that the same FT_Library
object or any of its children doesn't get accessed in parallel."

We will need to use a `MutexArc` instead.
2013-12-09 19:40:08 -08:00
Patrick Walton
2624b937aa layout: Refactor InlineFlow::assign_height to pull out horizontal
position calculation into a separate function.
2013-12-09 19:25:04 -08:00
bors-servo
e8ffac13d7 auto merge of #1356 : ksh8281/servo/remove_@_in_LayoutTask.FontContext, r=pcwalton
Remove @ in LayoutTask.FontContext, ScannedTextBox.text_run
#1334
2013-12-09 19:13:45 -08:00
patrick kim
e1e59ac3b6 remove FontContxtHandle.clone 2013-12-10 11:58:51 +09:00
Patrick Walton
7148a28611 layout: Refactor try_append_to_line to eliminate duplicate code. 2013-12-09 18:54:17 -08:00
bors-servo
db923feffe auto merge of #1362 : pcwalton/servo/rm-display-boxes, r=larsbergstrom
`@`-free layout

r? @larsbergstrom
2013-12-09 18:34:16 -08:00
Patrick Walton
594eb0067a layout: Remove the ability to put boxes in display list items. 2013-12-09 18:18:52 -08:00
Patrick Walton
64222f5772 layout: Remove DisplayBoxes to save memory and as one step toward an
`@`-free layout
2013-12-09 18:16:06 -08:00
patrick kim
301df201c3 fix some code 2013-12-10 08:59:43 +09:00