Commit graph

2018 commits

Author SHA1 Message Date
bors-servo
fb5c1bef6f auto merge of #4385 : pcwalton/servo/page-double-borrow, r=jdm
This was my fault. It comes up on almost any page after scrolling a bit.

r? @jdm
2014-12-15 20:54:44 -07:00
bors-servo
e0ec21e814 auto merge of #4381 : Manishearth/servo/performancenow, r=jdm 2014-12-15 20:00:53 -07:00
Manish Goregaokar
eec68faa41 Fix window.performance.now() 2014-12-16 08:28:11 +05:30
bors-servo
8e31e5f987 auto merge of #4289 : pcwalton/servo/hacker-news, r=SimonSapin
This patch provides some of the groundwork for column spans greater than
1. It implements the column-span CSS property as well as the
corresponding colspan attribute; although the former is not
well-specified outside of CSS multi-column layout, INTRINSIC refers to
it. Although width is distributed to spanning columns, they do not yet
contribute minimum and preferred widths; this will be implemented in a
follow-up.

The parsing for the legacy bgcolor and border attributes is
implemented according to the WHATWG HTML specification.

Additionally, this patch cleans up some miscellaneous formatting issues,
refactors layout/css somewhat to eliminate needless levels of
indirection, and cleans up the handling of table rowgroups.

New Hacker News screenshot: http://i.imgur.com/hnl2a7E.png
2014-12-15 19:33:46 -07:00
Patrick Walton
34d76fef28 script: Fix double-borrow error
This was my fault. It comes up on almost any page after scrolling a bit.
2014-12-15 18:21:51 -08:00
bors-servo
88ec52dd61 auto merge of #4371 : pcwalton/servo/line-breaking-improvements, r=mbrubeck
This commit removes the "merge-fragments" pass from inline reflow,
instead merging "on the fly". This ended up being simpler, as well as
more fine grained. Additionally, this patch makes the line breaker no
longer clone every fragment (!)

This functionality will be used in the implementation of
`text-overflow`.

r? @mbrubeck
2014-12-15 19:09:49 -07:00
Patrick Walton
a1ea44b294 style: Address review comments relating to bgcolor and column spans 2014-12-15 18:09:44 -08:00
Patrick Walton
17835ba0cb style: Implement quirks mode rules. 2014-12-15 17:41:51 -08:00
Patrick Walton
56b78de5bc style: Implement basic column spans.
This patch provides some of the groundwork for column spans greater than
1. It implements the column-span CSS property (prefixed so as not to be
exposed to content) as well as the corresponding colspan attribute;
although the former is not well-specified outside of CSS multi-column
layout, INTRINSIC refers to it. Although width is distributed to
spanning columns, they do not yet contribute minimum and preferred
widths; this will be implemented in a follow-up.

Additionally, this patch cleans up some miscellaneous formatting issues
and improves the handling of table rowgroups.
2014-12-15 17:41:51 -08:00
Patrick Walton
14bafb11be style: Parse the legacy bgcolor attribute per the HTML5 specification.
Additionally, this patch cleans up some miscellaneous formatting issues.
2014-12-15 17:41:44 -08:00
Patrick Walton
10f1ed5e31 style: Parse the legacy border attribute per the legacy HTML specification.
Additionally, this patch cleans up some miscellaneous formatting issues
and refactors files in `layout/css/` somewhat to eliminate needless
levels of indirection. It also fixes our handling of presentational
hints that only apply if border is nonzero.
2014-12-15 17:41:37 -08:00
Patrick Walton
e0e14c60d6 style: Move presentational hint synthesis into legacy.rs. 2014-12-15 17:41:25 -08:00
Patrick Walton
3029fbab92 layout: Implement basic lists and the CSS1 list properties.
The exact rendering is ill-spec'd. Some things are ugly (especially the
width and height of list style images) but they are infrequently used
and I believe this implementation matches the spec. Numeric lists are
not supported yet, since they will require a separate layout pass.

The implementation is a subclass of `BlockFlow`, on advice from Robert
O'Callahan.
2014-12-15 16:25:06 -08:00
bors-servo
7805fe19ed auto merge of #4318 : pcwalton/servo/box-shadow-redux, r=SimonSapin
r? @SimonSapin
2014-12-15 16:31:14 -07:00
bors-servo
5f2684d2f8 auto merge of #3844 : pcwalton/servo/script-layout-synchronization, r=jdm
This fixes race conditions whereby layout and script could be running
simultaneously.

r? @jdm 
cc @cgaebel
2014-12-15 15:31:21 -07:00
Patrick Walton
a200b139b6 script: Add some workarounds for image cache task races 2014-12-15 14:16:20 -08:00
Patrick Walton
d101c1dd91 script: Improve dirty propagation and fix script-layout synchronization.
This fixes race conditions whereby layout and script could be running
simultaneously.
2014-12-15 14:16:04 -08:00
Patrick Walton
3ba0abd8ff gfx: Implement box-shadow per CSS-BACKGROUNDS. 2014-12-15 13:39:06 -08:00
Ms2ger
ba891e49f8 Correctly set the BlobType for File objects. 2014-12-15 10:45:45 +01:00
thiagopnts
60ba4a97a5 Make ErrorEvent::new take cancelable and bubbling enums 2014-12-15 00:00:06 -02:00
Patrick Walton
42a8d9384b layout: Make line breaking able to restart from any position.
This commit removes the "merge-fragments" pass from inline reflow,
instead merging "on the fly". This ended up being simpler, as well as
more fine grained. Additionally, this patch makes the line breaker no
longer clone every fragment (!)

This functionality will be used in the implementation of
`text-overflow`.
2014-12-14 12:23:11 -08: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