bors-servo
f7cc49c30f
auto merge of #1360 : kmcallister/servo/content-changed, r=jdm
...
r? @jdm
2013-12-09 13:07:24 -08:00
Keegan McAllister
962984fb3b
Reflow with full style damage when content changes
...
Fixes #664 .
2013-12-09 12:34:33 -08:00
Keegan McAllister
b61160490a
Refactor DocumentDamageLevel::add and add test
2013-12-09 12:31:34 -08:00
bors-servo
1bf28ebaf4
auto merge of #1352 : dhedlund/servo/issue_76, r=jdm,metajack
...
Fixes #76 .
Implemented the only font metric remaining to resolve issue #76 for the Linux platform.
There are still some variations between Linux and OS X font metrics. Looking at values for the "Times New Roman" font, the following metrics differed by over 10%: `leading`, `x_height` and `max_advance`. It was not obvious if this would create any major difference in rendering, or whether the discrepancies would be handled in platform specific ways during the rendering process. Only `x_height` is being used by existing code. The `leading` property under Linux is still an order of magnitude off from the OS X version, but they are computed with similar calculations. Issue #1355 has been opened to further investigate the discrepancies.
#### Platform comparison of font metrics for "Times New Roman" between Linux and OS X:
**Au** is the raw metric values stored in the `FontMetrics` struct. **% of em** is how large that value is relative to the raw `em_size` of the font as a percentage. Linux reports the pt size differently than OS X, but this is probably because the linux platform uses hard-coded points-per-inch value (hard-coded in `src/components/util/geometry.rs`), whereas OS X uses the points-per-inch value provided by the font library.
+-----------------------------------+ +-----------------------------------+
| Linux (@14.25pt, 1.33em) | | OS X (@19.35pt, 1.0em) |
+------------------+------+---------+ +------------------+------+---------+
| property | Au | % of em | | property | Au | % of em |
+------------------+------+---------+ +------------------+------+---------+
| underline_size | 55 | 4.82 | | underline_size | 60 | 5.17 |
| underline_offset | -151 | -13.25 | | underline_offset | -120 | -10.34 |
| strikeout_size | 56 | 4.91 | | strikeout_size | 0 | 0.00 |
| strikeout_offset | 295 | 25.88 | | strikeout_offset | 0 | 0.00 |
| leading | 541 | 47.45 | | leading | 60 | 5.17 |
| x_height | 1015 | 89.04 | | x_height | 660 | 56.85 |
| em_size | 1140 | 100.00 | | em_size | 1161 | 100.00 |
| ascent | 1015 | 89.04 | | ascent | 893 | 76.92 |
| descent | 246 | 21.58 | | descent | 203 | 17.48 |
| max_advance | 1199 | 105.18 | | max_advance | 2820 | 242.89 |
+------------------+------+---------+ +------------------+------+---------+
+-----------------------------------+ +-----------------------------------+
| Linux (@24pt, 1.33em) | | OS X (@32.683333pt, 1.0em) |
+------------------+------+---------+ +------------------+------+---------+
| property | Au | % of em | | property | Au | % of em |
+------------------+------+---------+ +------------------+------+---------+
| underline_size | 93 | 4.84 | | underline_size | 120 | 6.12 |
| underline_offset | -255 | -13.28 | | underline_offset | -240 | -12.24 |
| strikeout_size | 95 | 4.95 | | strikeout_size | 0 | 0.00 |
| strikeout_offset | 496 | 25.83 | | strikeout_offset | 0 | 0.00 |
| leading | 912 | 47.50 | | leading | 60 | 3.06 |
| x_height | 1710 | 89.06 | | x_height | 1080 | 55.10 |
| em_size | 1920 | 100.00 | | em_size | 1960 | 100.00 |
| ascent | 1710 | 89.06 | | ascent | 1544 | 78.77 |
| descent | 415 | 21.61 | | descent | 365 | 18.62 |
| max_advance | 2020 | 105.21 | | max_advance | 4740 | 241.84 |
+------------------+------+---------+ +------------------+------+---------+
+-----------------------------------+ +-----------------------------------+
| Linux (@45pt, 1.33em) | | OS X (@60.833333pt, 1.0em) |
+------------------+------+---------+ +------------------+------+---------+
| property | Au | % of em | | property | Au | % of em |
+------------------+------+---------+ +------------------+------+---------+
| underline_size | 175 | 4.86 | | underline_size | 180 | 4.93 |
| underline_offset | -479 | -13.31 | | underline_offset | -480 | -13.15 |
| strikeout_size | 179 | 4.97 | | strikeout_size | 0 | 0.00 |
| strikeout_offset | 931 | 25.86 | | strikeout_offset | 0 | 0.00 |
| leading | 1709 | 47.47 | | leading | 180 | 4.93 |
| x_height | 3208 | 89.11 | | x_height | 2040 | 55.89 |
| em_size | 3600 | 100.00 | | em_size | 3650 | 100.00 |
| ascent | 3208 | 89.11 | | ascent | 2925 | 80.14 |
| descent | 778 | 21.61 | | descent | 690 | 18.90 |
| max_advance | 3788 | 105.22 | | max_advance | 8880 | 243.29 |
+------------------+------+---------+ +------------------+------+---------+
+-----------------------------------+ +-----------------------------------+
| Linux (@30.75pt, 1.33em) | | OS X (@41.9pt, 1.0em) |
+------------------+------+---------+ +------------------+------+---------+
| property | Au | % of em | | property | Au | % of em |
+------------------+------+---------+ +------------------+------+---------+
| underline_size | 120 | 4.88 | | underline_size | 120 | 4.77 |
| underline_offset | -327 | -13.29 | | underline_offset | -360 | -14.32 |
| strikeout_size | 122 | 4.95 | | strikeout_size | 0 | 0.00 |
| strikeout_offset | 636 | 25.85 | | strikeout_offset | 0 | 0.00 |
| leading | 1168 | 47.47 | | leading | 120 | 4.77 |
| x_height | 2192 | 89.11 | | x_height | 1440 | 57.27 |
| em_size | 2460 | 100.00 | | em_size | 2514 | 100.00 |
| ascent | 2192 | 89.11 | | ascent | 1991 | 79.20 |
| descent | 532 | 21.63 | | descent | 487 | 19.37 |
| max_advance | 2588 | 105.20 | | max_advance | 6120 | 243.44 |
+------------------+------+---------+ +------------------+------+---------+
2013-12-09 11:04:57 -08:00
Daniel Hedlund
79789a18de
Implement font leading metric for linux platform
...
Fixes #76 .
2013-12-09 10:33:58 -08:00
Daniel Hedlund
00e3a2144d
Document the Au struct and add similar font metrics debug as mac
2013-12-09 10:22:26 -08:00
bors-servo
c3a9583000
auto merge of #1359 : SimonSapin/servo/ns-noalloc, r=metajack
...
Also rename Element::get_namespace to get_namespace_url.
2013-12-09 08:16:21 -08:00
Simon Sapin
61c7f2f220
Change Namespace::to_str() to not allocate and return a reference.
2013-12-09 15:10:09 +00:00
bors-servo
4fc48f5e32
auto merge of #1358 : therealglazou/servo/therealglazou/namespaces, r=jdm
...
Add a namespace to elements. Sets by default the namespace to HTML for elements created by hubbub. Fixes :nth-of-type() and friends to match the namespace.
Note: prefix is not added by this PR because hubbub does not preserve it and I wanted to keep the patch as simple as possible.
2013-12-09 07:01:23 -08:00
Daniel Glazman
28575c20bf
add namespaces to elements
2013-12-09 15:55:51 +01:00
Lars Bergstrom
76e3b34c75
Merge pull request #1348 from dhedlund/issue_163
...
Remove orphaned gfx::text::shaper code
2013-12-07 09:53:12 -08:00
Lars Bergstrom
030e3073c0
Merge pull request #1347 from ksh8281/remove_@_from_net_image_cache_task
...
remove @ from net/image_cache_task
2013-12-07 08:20:35 -08:00
Daniel Hedlund
b5046d24e0
Remove orphaned gfx::text::shaper code
...
The shaper code referenced in this issue is no longer being used. It
was removed in commit a535f22146
, but
later reintroduced due to a merge conflict in commit
d64d987e1d
.
Fixes #163 .
2013-12-07 03:03:39 -08:00
patrick kim
01a3edd2ac
remove @ from net/image_cache_task
...
~[Chan<ImageResponseMsg>] is not freezetype.
so we have to use unsafe_access
2013-12-07 10:54:41 +09:00
Lars Bergstrom
403958aed7
Merge pull request #1342 from ksh8281/remove_@_from_font_context
...
Remove @ from font context, remove SendableTextRun
2013-12-06 17:18:04 -08:00
patrick kim
86e2cac8e8
fix indent & some code
2013-12-07 09:52:54 +09:00
Junyoung Cho
ab1291f34a
Patch for macos
2013-12-07 09:52:54 +09:00
patrick kim
1b8f9c09d3
remove @ fontcontext
2013-12-07 09:52:54 +09:00
patrick kim
964b5e9d9a
remove SendableTextRun & remove @mut Font From TextRun&Shaper(Font),Font.shaper,
...
fontfamily,fontgroup,render_context.font_ctx
2013-12-07 09:52:06 +09:00
patrick kim
c60ab361a5
remove @ from FontContextHandle in linux
2013-12-07 09:48:19 +09:00
Lars Bergstrom
c5e5e5a46b
Merge pull request #1344 from kmcallister/layout-boxes
...
Remove @mut from LineboxScanner and image caching
2013-12-06 12:25:27 -08:00
Keegan McAllister
dda6d2b53c
Convert LayoutContext.image_cache from @mut to MutexArc
...
LocalImageCache isn't Freeze so we have to use unsafe_access,
which exists for MutexArc and not RWArc.
2013-12-06 11:31:49 -08:00
Keegan McAllister
94b70e25e1
Remove unnecessary @mut from LineboxScanner
2013-12-06 11:26:47 -08:00
Lars Bergstrom
e8da737322
Merge pull request #1343 from ryanhc/removing_to_owned
...
removing unnecessary to_owned
2013-12-06 05:01:06 -08:00
Lars Bergstrom
24e21bcc28
Merge pull request #1341 from deokjinkim/layout_font_optimize
...
Use last resort font when only there is no font in font group.
2013-12-06 04:54:32 -08:00
Ryan Choi
ecd44fe9a8
removing unnecessary to_owned
2013-12-06 17:50:26 +09:00
Deokjin Kim
a5db5d5eeb
Use last resort font when only there is no font in font group.
...
There is a little bit of performance gain of layout.
2013-12-06 16:50:25 +09:00
Patrick Walton
91fcc6703b
Merge pull request #1327 from pcwalton/enumify-boxes
...
layout: Change `RenderBox` to an enum and shorten its name in preparation for removing its `@`-ness.
2013-12-05 17:44:24 -08:00
Patrick Walton
4fda26f76e
layout: Change RenderBox
to an enum and shorten its name in
...
preparation for removing its `@`-ness.
Also removes a few text copies that were taking place.
This sure does remove a lot of code!
2013-12-05 17:41:41 -08:00
Lars Bergstrom
2c4714e803
Merge pull request #1339 from kmcallister/native_graphics_context
...
Return None from get_graphics_metadata in headless compositor
2013-12-05 14:50:34 -08:00
Lars Bergstrom
101e39a7a2
Merge pull request #1304 from Ms2ger/exceptions
...
Report exceptions to JS when the DOM implementation fails.
2013-12-05 14:03:54 -08:00
Keegan McAllister
4a72abbbb2
Return None from get_graphics_metadata in headless compositor
...
This fixes servo -z.
2013-12-05 13:55:33 -08:00
Ms2ger
4bf9bece92
Add test.
2013-12-05 16:14:09 +01:00
Ms2ger
29a7405b4e
Report exceptions to JS when the DOM implementation fails.
...
As a bonus, adds some debugging statements.
2013-12-05 16:14:02 +01:00
Patrick Walton
c5db2ab516
Merge pull request #1337 from brunoabinader/acid1_fix
...
Acid1 fix (fixed FloatFlow refactory)
2013-12-04 18:58:34 -08:00
Bruno de Oliveira Abinader
10db916137
Acid1 fix (fixed FloatFlow refactory)
...
While doing the FloatFlow refactory, I forgot to transpose a variable
assignment in assign_widths(). Also did a minor change in
bubble_widths() to avoid creating temporary variables in an iteration
loop.
This patch is for:
https://github.com/mozilla/servo/issues/1335
2013-12-04 17:17:14 -04:00
bors-servo
a92d430007
auto merge of #1331 : SimonSapin/servo/visibility, r=pcwalton
...
http://www.w3.org/TR/CSS21/visufx.html#visibility
`visibility: collapse` is not supported yet because tables are not, either.
This fixes #1329 .
2013-12-04 10:07:06 -08:00
bors-servo
7222048567
auto merge of #1330 : kmcallister/servo/http_loader, r=pcwalton
...
Serving suggestion: `git show -w`
Fixes #1325 .
Some of the control-flow reorganization is for clarity rather than out of necessity.
2013-12-04 09:43:24 -08:00
Simon Sapin
7a4c809436
CSS: Add the 'visibility' property.
...
http://www.w3.org/TR/CSS21/visufx.html#visibility
'visibility: collapse' is not supported yet because tables are not, either.
This fixes #1329 .
2013-12-04 10:58:27 +00:00
Keegan McAllister
5763937ecd
http_loader: Don't tail-call for redirects
...
Serving suggestion: git show -w
Fixes #1325 .
Some of the control-flow reorganization is for clarity rather than out of
necessity.
2013-12-03 21:25:11 -08:00
bors-servo
b26fe9a430
auto merge of #1321 : brunoabinader/servo/remove-floatflow, r=pcwalton
...
Removes 'FloatFlow' in favor of FloatBlockFlow, which is contained
inside BlockFlow in a 'has-a' relationship. This avoids a bunch of
duplicated code.
This patch is for:
https://github.com/mozilla/servo/issues/1281
2013-12-03 15:31:15 -08:00
bors-servo
148d1720e5
auto merge of #1328 : kmcallister/servo/properties, r=jdm
...
The bug is mozilla/rust#10683 and there's no fix yet, plus it would take us a while to upgrade Rust anyway.
Fixes #1258 .
2013-12-03 13:10:14 -08:00
Keegan McAllister
48ce016209
Work around Rust bug causing nondeterministic CSS parse failure
...
The bug is mozilla/rust#10683 and there's no fix yet, plus it
would take us a while to upgrade Rust anyway.
Fixes #1258 .
2013-12-03 12:57:51 -08:00
Bruno de Oliveira Abinader
ac45d70a4a
Remove 'FloatFlow'
...
Removes 'FloatFlow' in favor of FloatBlockFlow, which is cointained
inside BlockFlow in a 'has-a' relationship. This avoids a bunch of
duplicated code.
This patch is for:
https://github.com/mozilla/servo/issues/1281
2013-12-03 14:36:31 -04:00
bors-servo
a0c6075b4d
auto merge of #1326 : brunoabinader/servo/rename-flowcontext, r=pcwalton
...
This patch is for:
https://github.com/mozilla/servo/issues/1282
2013-12-03 09:16:18 -08:00
bors-servo
b5645737da
auto merge of #1311 : pradeep90/servo/rule-hash-optimize, r=pcwalton
...
Commit for #1301
2013-12-03 08:50:30 -08:00
bors-servo
529c21bb65
auto merge of #1252 : jdm/servo/layoutassert, r=jdm,metajack
...
...224.
2013-12-02 16:32:32 -08:00
Josh Matthews
b502f03fd6
Add forgotten test for Element.attributes.
2013-12-02 19:25:17 -05:00
Josh Matthews
f9f9c42ab7
Ensure that it's safe to modify the DOM node pointers before doing so. Fixes #1224 .
2013-12-02 19:25:11 -05:00
Bruno de Oliveira Abinader
bf277e634b
s/FlowContext/Flow
...
This patch is for:
https://github.com/mozilla/servo/issues/1282
2013-12-02 16:14:06 -04:00