Commit graph

1048 commits

Author SHA1 Message Date
thiagopnts
60ba4a97a5 Make ErrorEvent::new take cancelable and bubbling enums 2014-12-15 00:00:06 -02:00
Patrick Walton
6943ddb93e layout: Implement overflow-wrap/word-wrap per CSS-TEXT § 6.2.
This property is used by approximately 55% of page loads.

To implement the line breaking behavior, the "breaking strategy" has
been cleaned up and abstracted. This should allow us to easily support
other similar properties in the future, such as `text-overflow` and
`word-break`.
2014-12-13 13:05:05 -08:00
bors-servo
1be7d7cced auto merge of #4297 : ChrisParis/servo/parse, r=Ms2ger
Addresses https://github.com/servo/servo/issues/3756. I've tested this code with a new test that I've submitted to https://github.com/w3c/web-platform-tests.
2014-12-13 12:30:45 -07:00
Chris Paris
e0c59818d2 Make DOMParser::ParseFromString actually parse the string 2014-12-13 08:57:08 -10:00
bors-servo
98920b1315 auto merge of #4360 : pcwalton/servo/word-spacing, r=mbrubeck
This assumes that there are no ligatures that span across multiple
words. Since we have a per-word shape cache, this is a safe assumption
as of now. I have left comments to ensure that, if and when this is
revisted, we make sure to handle it properly.

r? @mbrubeck
2014-12-13 10:39:46 -07:00
bors-servo
29c9975a83 auto merge of #4363 : Ms2ger/servo/collectionfilter, r=Manishearth 2014-12-13 10:15:45 -07:00
Ms2ger
14e1455119 Skip the root node in live HTMLCollections.
The root node is never included in the collection, and omitting it here
simplifies and speeds up the filter implementations.
2014-12-13 10:38:19 +01:00
Ms2ger
4a2c4b65cc Factor out part of the traversal routine in HTMLCollection.
I would move the filter() call into the traverse function as well, but the
callback can't outlive its stack frame.
2014-12-13 10:34:42 +01:00
bors-servo
251dbb37ed auto merge of #4357 : pcwalton/servo/compositor-hit-test-clipping, r=mrobinson
Fixes clicking on links on the second page of Hacker News.

r? @mrobinson
2014-12-13 02:00:52 -07:00
Patrick Walton
106fdb1d32 layout: Implement word-spacing per CSS 2.1 § 16.4.
This assumes that there are no ligatures that span across multiple
words. Since we have a per-word shape cache, this is a safe assumption
as of now. I have left comments to ensure that, if and when this is
revisted, we make sure to handle it properly.
2014-12-12 17:55:11 -08:00
Patrick Walton
fa1e06e7ce compositing: Translate clip rects into the coordinate systems of child
layers when doing hit tests.

Fixes clicking on links on the second page of Hacker News.
2014-12-12 16:58:25 -08:00
bors-servo
ea39b878ac auto merge of #4356 : servo/servo/msgs, r=jdm 2014-12-12 17:30:47 -07:00
bors-servo
6362d060e1 auto merge of #4355 : servo/servo/devtools-title, r=metajack
Fixes #4167.
2014-12-12 17:03:45 -07:00
Patrick Walton
caee309ef4 layout: Implement text-indent per CSS 2.1 § 16.1.
I had to use a somewhat unconventional method of computing text
indentation (propagating from blocks down to inlines) because of the way
containing blocks are handled in Servo.

(As a side note, neither Gecko nor WebKit correctly handles percentages
in `text-align`, at least incrementally -- i.e. when the percentages are
relative to the viewport and the viewport is resized.)
2014-12-12 14:55:41 -08:00
Patrick Walton
071d320728 layout: Refactor inline layout a bit. 2014-12-12 14:55:24 -08:00
Gilbert Röhrbein
31e40038cd script_trask, handle_msgs: factored out handle_msg_from_devtools 2014-12-12 23:54:54 +01:00
Gilbert Röhrbein
1fc46471ff script_trask, handle_msgs: factored out handle_msg_from_script 2014-12-12 23:54:52 +01:00
Gilbert Röhrbein
8da73afa06 script_trask, handle_msgs: factored out handle_msg_from_constellation 2014-12-12 23:51:14 +01:00
Gilbert Röhrbein
9b9f662732 script_task, handle_msgs: sort for pattern constructor 2014-12-12 23:37:42 +01:00
Adenilson Cavalcanti
00f1ae0a1d Restored older behavior for lighter color, should fix
the regression.
2014-12-12 13:51:25 -08:00
Adenilson Cavalcanti
fcc0229d5e Groove and Ridge rendering shows a solid border when color is black,
that is broken and the current patch will implement a similar behavior
as Firefox.
2014-12-12 13:50:40 -08:00
Greg Weng
a477893ab3 Return real page titles and URLs for devtools tab choices.
Fixes #4167.
2014-12-12 22:38:55 +01:00
bors-servo
9e83f096a5 auto merge of #4354 : neojski/servo/getElementsByTagNameNS-filter-root, r=Ms2ger
This fixes #4349.
2014-12-12 14:09:53 -07:00
bors-servo
914f27263d auto merge of #4325 : pcwalton/servo/letter-spacing, r=mbrubeck
The ligature disabling code has been manually verified, but I was unable
to reftest it. (The only way I could think of would be to create an
Ahem-like font with a ligature table, but that would be an awful lot of
work.)

Near as I can tell, the method used to apply the spacing (manually
inserting extra advance post-shaping) matches Gecko.

r? @SimonSapin
2014-12-12 12:45:54 -07:00
Patrick Walton
07bc97e3e2 gfx: Implement letter-spacing per CSS 2.1 § 16.4.
The ligature disabling code has been manually verified, but I was unable
to reftest it. (The only way I could think of would be to create an
Ahem-like font with a ligature table, but that would be an awful lot of
work.)

Near as I can tell, the method used to apply the spacing (manually
inserting extra advance post-shaping) matches Gecko.
2014-12-12 11:43:43 -08:00
Tomasz Kołodziejski
b30cdb8a5c Follow-up to work done in #4304.
all_elements should ignore root as well.
2014-12-12 10:39:21 -08:00
Tomasz Kołodziejski
5913ba983b Don't include the root element when calling Element#getElementsByTagNameNS. 2014-12-12 10:07:41 -08:00
Nathan E. Egge
b0552cb98e Sending key events through script task before processing them in the compositor.
Fixes #4163
2014-12-12 12:31:44 -05:00
Joseph Crail
c254d195ad Fix spelling mistakes in comments. 2014-12-11 23:56:29 -05:00
bors-servo
9f8dda7abc auto merge of #4343 : glennw/servo/remove-glut, r=mbrubeck 2014-12-11 19:42:55 -07:00
bors-servo
5ef94c716d auto merge of #4340 : michaelwu/servo/css-rem-support, r=SimonSapin
This works on my simple test page https://people.mozilla.org/~mwu/rem.html , hopefully works on real pages too. Seems a little messy to add root_font_size directly to ComputedValues, but it didn't seem appropriate to add to the style structs.
2014-12-11 19:01:01 -07:00
bors-servo
909dd0e80f auto merge of #4339 : pcwalton/servo/refactor-tables, r=mbrubeck
By "idempotent" I mean that later passes do not stomp on data from
earlier passes, so that we can run the passes individually for
incremental reflow. The main change here was to stop overwriting the
"minimum inline-size" field of each column with the column's computed
inline-size.

r? @mbrubeck
2014-12-11 18:06:53 -07:00
Glenn Watson
76c18473b1 Remove glut port now that android glutin has landed. 2014-12-12 11:04:44 +10:00
bors-servo
a016f7b201 auto merge of #4332 : Ms2ger/servo/performance, r=jdm 2014-12-11 17:33:53 -07:00
bors-servo
15187cb451 auto merge of #4327 : glennw/servo/glutin-android, r=larsbergstrom,larsbergstrom 2014-12-11 17:09:54 -07:00
bors-servo
d31237f343 auto merge of #4299 : pcwalton/servo/outline, r=mbrubeck
`invert` is not yet supported.

Objects that get layers will not yet display outlines properly. This is
because our overflow calculation doesn't take styles into account and
because layers are always anchored to the top left of the border box.
Since fixing this is work that is not related to outline *per se* I'm
leaving that to a followup and making a note in the code.

r? @SimonSapin
2014-12-11 16:45:56 -07:00
bors-servo
7ce37636b1 auto merge of #4273 : wenderen/servo/multiple-line-textintput, r=Manishearth
#4258
2014-12-11 16:22:07 -07:00
bors-servo
2615be9bab auto merge of #4189 : chmanchester/servo/rootlint, r=jdm
I think this matches the intent of the issue, I'm a rust/servo novice; any suggestions for improvements are welcome. Thanks!
2014-12-11 15:57:58 -07:00
Patrick Walton
52b9951cad layout: Implement outline per CSS 2.1 § 18.4.
`invert` is not yet supported.

Objects that get layers will not yet display outlines properly. This is
because our overflow calculation doesn't take styles into account and
because layers are always anchored to the top left of the border box.
Since fixing this is work that is not related to outline *per se* I'm
leaving that to a followup and making a note in the code.
2014-12-11 14:25:10 -08:00
Patrick Walton
3cddaf8da6 layout: Make table layout idempotent.
By "idempotent" I mean that later passes do not stomp on data from
earlier passes, so that we can run the passes individually for
incremental reflow. The main change here was to stop overwriting the
"minimum inline-size" field of each column with the column's computed
inline-size.
2014-12-11 14:24:55 -08:00
Glenn Watson
9d192de63d Switch android to glutin. 2014-12-12 08:13:04 +10:00
Michael Wu
94c019dce5 Add support for the 'rem' css unit 2014-12-11 16:29:03 -05:00
Rohan Prinja
0c851d9a0c some fixes for multiple-mode textinput 2014-12-11 23:40:57 +05:30
Ms2ger
e4dc6ca2ec Pass the timing information to PerformanceTiming rather than exposing methods. 2014-12-11 18:41:18 +01:00
bors-servo
512d55ecef auto merge of #4329 : mrobinson/servo/phantom-layer, r=pcwalton
At various moments, whether due to timing or layout issues, root layers (iframes) do not have a size and location. We modify the compositor to have all root layers mask to their content boundaries whether they have a frame rect or not. Uninitialized layers have empty boundaries, so they will disappear from the page. We also have to ensure that clicks to not go to areas of layers that are masked away. This fixes issues where ads on github take over the entire viewport.
2014-12-11 10:39:59 -07:00
Martin Robinson
14bfa45105 Hit test against clipped layer boundaries
When finding the layer under a point, take into account clipping
rectangles defined by layers that mask to bounds. This prevents clicks
from being hijacked by masked layers.
2014-12-11 13:18:21 +01:00
Martin Robinson
66f6c3a213 All root layers should mask their content
Root layers that define the extent of iframes should always mask their
child content. This fixes a bug where root layers without an assigned
size and location do not spill over the entire scene.
2014-12-11 12:29:31 +01:00
Ms2ger
949e7918e0 Reindent in should_move_clip_rect. 2014-12-11 11:26:33 +01:00
Ms2ger
205b4e3f39 Avoid some Option::unwrap calls in page.rs. 2014-12-11 11:26:23 +01:00
Glenn Watson
eb19d663f0 Update skia + azure to get android compile and text rendering fixes. Sync CEF as well. 2014-12-11 10:53:32 +10:00