Commit graph

7733 commits

Author SHA1 Message Date
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
bors-servo
112ef5c484 auto merge of #4310 : pcwalton/servo/lists, r=SimonSapin
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.

r? @SimonSapin
2014-12-15 17:42:48 -07: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
bors-servo
d75e85261f auto merge of #4375 : michaelwu/servo/fix-gonk-20141215, r=glennw
This updates azure to pick up a gonk fix - https://github.com/servo/rust-azure/pull/120 and adds a stub function to the window.
2014-12-15 15:06:59 -07:00
Patrick Walton
3ba0abd8ff gfx: Implement box-shadow per CSS-BACKGROUNDS. 2014-12-15 13:39:06 -08:00
bors-servo
4e187af2f1 auto merge of #4373 : Ms2ger/servo/blob-type, r=Manishearth 2014-12-15 13:16:05 -07:00
Michael Wu
d3c669db45 Update azure to fix gonk build 2014-12-15 09:21:47 -05:00
Michael Wu
814ca68c72 Add handle_key stub to gonk port 2014-12-15 09:21:32 -05:00
Ms2ger
ba891e49f8 Correctly set the BlobType for File objects. 2014-12-15 10:45:45 +01:00
bors-servo
1bc2c8a639 auto merge of #4372 : thiagopnts/servo/errorevent, r=Ms2ger
Fixes #4174.
2014-12-15 02:15:51 -07:00
thiagopnts
60ba4a97a5 Make ErrorEvent::new take cancelable and bubbling enums 2014-12-15 00:00:06 -02:00
bors-servo
2e34125710 auto merge of #4370 : Ms2ger/servo/test-fileapi, r=jdm 2014-12-14 10:39:46 -07:00
Ms2ger
341c485653 Run the File API tests. 2014-12-14 09:49:27 +01:00
bors-servo
0cee72d70e auto merge of #4365 : Ms2ger/servo/test-domparsing, r=jdm 2014-12-13 16:06:43 -07:00
bors-servo
68ab18876b auto merge of #4361 : pcwalton/servo/overflow-wrap, r=glennw
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`.

r? @glennw
2014-12-13 14:06:47 -07: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
Ms2ger
439d02ad4f Run the DOM parsing tests. 2014-12-13 21:09:57 +01: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
bors-servo
be66121937 auto merge of #4328 : pcwalton/servo/text-indent, r=SimonSapin
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.)

r? @SimonSapin
2014-12-12 15:57:46 -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
bors-servo
e74a57821f auto merge of #4324 : Adenilson/servo/grooveBorderColor01, r=pcwalton
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 15:30:56 -07:00
bors-servo
25a251e6ab auto merge of #4300 : servo/servo/fix-power, r=Manishearth 2014-12-12 15:06:55 -07:00
Adenilson Cavalcanti
00f1ae0a1d Restored older behavior for lighter color, should fix
the regression.
2014-12-12 13:51:25 -08:00
Adenilson Cavalcanti
4d5cca2c69 Adding tests to check behavior. There are 3 files that will test:
a) If the groove border is different from a black border (the bug that this
patch set fixes);
b) If a ridge border is different from a black border (samething);
c) If groove is different from ridge (they should be inverse of each other).

All 3 new tests passes on OSX Yosemite (10.10).
2014-12-12 13:51:24 -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
Jack Moffitt
ca156942bc Update PowerMeasure.py post-cargoify 2014-12-12 22:49:02 +01: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