Commit graph

4860 commits

Author SHA1 Message Date
bors-servo
7ece5f92db auto merge of #1971 : Constellation/servo/quick-fail-selector-matching, r=SimonSapin
Restart selector matching from an appropriate selector

Introducing 3 matching failure statuses,

+ NotMatchedGlobally
+ NotMatchedAndRestartFromClosestDescendant
+ NotMatchedAndRestartFromClosestLaterSibling

When NotMatchedGlobally appears, stop selector matching completely since
the succeeding selector never matches.
It is raised when
+ Child selector cannot find the candidate element
+ Descendant selector cannot find the candidate element

When NotMatchedAndRestartFromClosestDescendant appears, the selector
matching does backtracking and restarts from the closest Descendant
selector.
It is raised when
+ NextSibling selector cannot find the candidate element.
+ LaterSibling selector cannot find the candidate element.
+ Child selector doesn't match on the found element.

When NotMatchedAndRestartFromClosestLaterSibling appears, the selector
matching does backtracking and restarts from the closest LaterSibling
selector.
It is raised when
+ NextSibling selector doesn't match on the found element.

For example, when the selector "d1 d2 a" is provided and we cannot *find*
an appropriate ancestor node for "d1", this selector matching raises
NotMatchedGlobally since even if "d2" is moved to more upper node, the
candidates for "d1" becomes less than before and d1 .

The next example is siblings. When the selector "b1 + b2 ~ d1 a" is
providied and we cannot *find* an appropriate brother node for b1,
the selector matching raises NotMatchedAndRestartFromClosestDescendant.
The selectors ("b1 + b2 ~") doesn't match and matching restart from "d1".

The additional example is child and sibling. When the selector
"b1 + c1 > b2 ~ d1 a" is provided and the selector "b1" doesn't match on
the element, this "b1" raises NotMatchedAndRestartFromClosestLaterSibling.
However since the selector "c1" raises
NotMatchedAndRestartFromClosestDescendant. So the selector
"b1 + c1 > b2 ~ " doesn't match and restart matching from "d1".
2014-04-04 11:19:36 -04:00
Yusuke Suzuki
55cc9ccf22 Restart selector matching from an appropriate compound selector
Introducing 3 matching failure statuses,

    NotMatchedAndRestartFromClosestLaterSibling
    NotMatchedAndRestartFromClosestDescendant
    NotMatchedGlobally

When NotMatchedGlobally appears, stop selector matching completely since
the succeeding selector never matches.
It is raised when
    Child combinator cannot find the candidate element
    Descendant combinator cannot find the candidate element

When NotMatchedAndRestartFromClosestDescendant appears, the selector
matching does backtracking and restarts from the closest Descendant
combinator.
It is raised when
    NextSibling combinator cannot find the candidate element.
    LaterSibling combinator cannot find the candidate element.
    Child combinator doesn't match on the found element.

When NotMatchedAndRestartFromClosestLaterSibling appears, the selector
matching does backtracking and restarts from the closest LaterSibling
combinator.
It is raised when
    NextSibling combinator doesn't match on the found element.

For example, when the selector "d1 d2 a" is provided and we cannot *find*
an appropriate ancestor node for "d1", this selector matching raises
NotMatchedGlobally since even if "d2" is moved to more upper node, the
candidates for "d1" becomes less than before and d1 .

The next example is siblings. When the selector "b1 + b2 ~ d1 a" is
providied and we cannot *find* an appropriate brother node for b1,
the selector matching raises NotMatchedAndRestartFromClosestDescendant.
The selectors ("b1 + b2 ~") doesn't match and matching restart from "d1".

The additional example is child and sibling. When the selector
"b1 + c1 > b2 ~ d1 a" is provided and the selector "b1" doesn't match on
the element, this "b1" raises NotMatchedAndRestartFromClosestLaterSibling.
However since the selector "c1" raises
NotMatchedAndRestartFromClosestDescendant. So the selector
"b1 + c1 > b2 ~ " doesn't match and restart matching from "d1".
2014-04-05 00:07:33 +09:00
Bruno de Oliveira Abinader
c451b1c9dc Adding .DS_Store to list of ignored files 2014-04-04 09:08:36 -04:00
Bruno de Oliveira Abinader
0b24ef4cf8 Added HTML space characters check content test 2014-04-04 09:08:36 -04:00
Bruno de Oliveira Abinader
943743195f Split class names using split_html_space_chars helper function 2014-04-04 09:08:36 -04:00
Bruno de Oliveira Abinader
594df4d696 Implement split_html_space_chars helper function 2014-04-04 09:08:36 -04:00
hyunjunekim
a344d465e8 documnet location 2014-04-04 21:18:30 +09:00
bors-servo
fe1615bc3d auto merge of #2033 : larsbergstrom/servo/disable_parallel_layout, r=metajack
Until we land a fix for #1926, set the default number of threads for parallel layout to 1 to avoid races, a double-borrow, and task failure resulting in all cores spinning indefinitely.

r? @metajack
2014-04-03 23:46:47 -04:00
Lars Bergstrom
ccc7c8b497 Disable parallel layout 2014-04-03 20:40:48 -05:00
bors-servo
3ec22157ca auto merge of #1988 : pcwalton/servo/acid2-2, r=SimonSapin
r? @metajack @SimonSapin @larsbergstrom @june0cho @hyunjunekim
2014-04-03 21:01:48 -04:00
Simon Sapin
9e3f7a005d Computed value of 'height: <percentage>' is 'auto' in some cases.
See http://dev.w3.org/csswg/css2/visudet.html#propdef-height

This is necessary but not sufficient for #2029.

A bug fix in the previous commit "broke" Acid 2 because that bug was hiding
this one. This makes Acid 2 pass again.
2014-04-03 14:51:19 -07:00
Simon Sapin
8e14579797 Adress more #1988 (Acid 2) review comments. 2014-04-03 14:51:19 -07:00
Patrick Walton
9712e6d124 layout: Address review comments for min-height and max-height
computation
2014-04-03 14:51:19 -07:00
Patrick Walton
56096503b0 layout: Address some more review comments 2014-04-03 14:51:19 -07:00
Patrick Walton
aabda89a90 layout: Fix percentages in relatively positioned elements 2014-04-03 14:51:19 -07:00
Patrick Walton
2e5b210c95 test: Fix some reftests. 2014-04-03 14:51:18 -07:00
Patrick Walton
c49f23ffb2 layout: Address review feedback. 2014-04-03 14:51:18 -07:00
Patrick Walton
30b7f5d0ad support: Update submodules. 2014-04-03 14:50:57 -07:00
Patrick Walton
42170c7585 test: Add many reftests for parts of Acid2. 2014-04-03 14:50:57 -07:00
Hyun June Kim
4c53a21aa3 layout: Implement pseudo-elements. 2014-04-03 14:50:57 -07:00
Junyoung Cho
901c4483b2 layout: Implement enough of automatic table layout to pass Acid2. 2014-04-03 14:50:57 -07:00
Patrick Walton
10aed5bc1f layout: Rewrite the margin collapse code to work with negative margins. 2014-04-03 14:50:57 -07:00
Patrick Walton
392afdb014 layout: Implement -servo-minimum-line-height 2014-04-03 14:50:57 -07:00
Patrick Walton
98bf325e76 layout: Support multiple boxes per node; don't store fixed/absolute
descendant links separately
2014-04-03 14:50:56 -07:00
Patrick Walton
4fd950eae0 layout: Update parallel.rs to use OpaqueNodeMethods 2014-04-03 14:50:56 -07:00
Patrick Walton
e6665a2f14 layout: Take padding into account for inline boxes 2014-04-03 14:50:56 -07:00
Patrick Walton
9874d0f9d3 layout: Take min-height and max-height into account 2014-04-03 14:50:56 -07:00
Patrick Walton
cd9d824c21 servo: Implement stacking contexts and allow multiple layers per
pipeline. This handles fixed positioning mostly correctly.
2014-04-03 14:50:56 -07:00
Patrick Walton
f8e3e50db5 util: Add a rect_contains_point utility method 2014-04-03 14:50:07 -07:00
Patrick Walton
dae4166eb3 util: Add some utility methods to SmallVec. 2014-04-03 14:50:07 -07:00
Patrick Walton
1b04165f67 style: Parse background-position and background-attachment. 2014-04-03 14:50:07 -07:00
Patrick Walton
d136d7a7d7 style: Implement -servo-minimum-line-height, a derived property from
`line-height`, and the infrastructure needed for derived properties to
work.

Eventually I would like this to be used for text decorations, like
WebKit does with `-webkit-text-decorations-in-effect`.
2014-04-03 14:50:07 -07:00
Patrick Walton
e6adc54df2 style: Parse min-height and max-height 2014-04-03 14:50:06 -07:00
bors-servo
897c679be2 auto merge of #2031 : saneyuki/servo/2027, r=jdm
Fix #2027

@jdm
This change will decrease the generics for `Document::create_collection`.
Do you have any good idea to avoid this?

Or don't we have to consider it now?
2014-04-03 12:01:49 -04:00
Tetsuharu OHZEKI
faea175505 Document::create_collection's callback should return a boolean instead of a node. (#2027) 2014-04-04 00:51:03 +09:00
bors-servo
e3bf08ea53 auto merge of #2022 : lpy/servo/issue2019, r=jdm
see #2019
2014-04-01 15:31:50 -04:00
lpy
d4d6fcb5f0 Get rid of match statements in layout queries in script_task 2014-04-02 01:28:44 +08:00
lpy
ac5a634082 Get rid of match statements in Layout queries.(fixes #2019) 2014-04-02 00:55:33 +08:00
bors-servo
1c8ad2ce47 auto merge of #2021 : SimonSapin/servo/patch-1, r=jdm
Remove a comment that was about a macro that was removed in a7ef1cd35e
2014-04-01 11:16:51 -04:00
Simon Sapin
b1e629b951 Remove an obsolete comment
Remove a comment that was about a macro that was removed in a7ef1cd35e
2014-04-01 15:38:07 +01:00
bors-servo
3eac31394c auto merge of #2002 : mrobinson/servo/issue-1477, r=jdm
A HashMap allows easily looking up a timer and canceling it in
Window.ClearTimeout.

Fixes #1477.
2014-03-31 19:07:50 -04:00
Martin Robinson
1a8a3cc271 Store Window.active_timers in a HashMap
A HashMap allows easily looking up a timer and canceling it in
Window.ClearTimeout.

Fixes #1477.
2014-03-31 15:07:50 -07:00
bors-servo
83c2d92397 auto merge of #1995 : SimonSapin/servo/mako-py34, r=metajack
On a system where `which python` is Python 3.4.x, the build failed with a very unhelpful error message. The root cause is that Mako 0.8.1 was too old.
2014-03-31 11:53:05 -04:00
Simon Sapin
329f3735e6 Build: Use the same Python for Mako as for DOM codegen.
This defaults to Python 2.x and makes the previous commit useless,
but upgrading Mako doesn’t hurt anyway.
2014-03-31 16:26:32 +01:00
Simon Sapin
f48492e5a5 Build: Ugrade Mako to 0.9.1, to support Python 3.4 2014-03-31 16:16:25 +01:00
Simon Sapin
cde9a0caea Build: Do not swallow Mako template errors in src/components/style/properties.rs.mako 2014-03-31 16:16:23 +01:00
bors-servo
a15f3ee0da auto merge of #1983 : brunoabinader/servo/bogus-title-when-cloning, r=Ms2ger
Document's title is now properly copied when cloning.

Closes #1640.
2014-03-26 12:37:33 -04:00
bors-servo
0204745595 auto merge of #1952 : brunoabinader/servo/htmlcollection-live, r=Ms2ger
Closes #1662.

PS: Cached collections will be next step.
2014-03-26 11:46:47 -04:00
bors-servo
3d4e157faa auto merge of #1932 : brunoabinader/servo/document-import-adopt-node, r=Ms2ger
Specs:
http://dom.spec.whatwg.org/#dom-document-importnode
http://dom.spec.whatwg.org/#dom-document-adoptnode
2014-03-26 10:55:40 -04:00
Bruno de Oliveira Abinader
0efdb47c4c Remove FIXME from Node.cloneNode content tests
Document's title is now properly copied when cloning.

Closes #1640.
2014-03-26 10:15:53 -04:00