aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/style
Commit message (Collapse)AuthorAgeFilesLines
...
| * Restart selector matching from an appropriate compound selectorYusuke Suzuki2014-04-051-12/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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".
* | Computed value of 'height: <percentage>' is 'auto' in some cases.Simon Sapin2014-04-032-3/+25
| | | | | | | | | | | | | | | | | | 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.
* | layout: Address some more review commentsPatrick Walton2014-04-031-21/+25
| |
* | layout: Address review feedback.Patrick Walton2014-04-032-28/+45
| |
* | style: Parse `background-position` and `background-attachment`.Patrick Walton2014-04-031-6/+131
| |
* | style: Implement `-servo-minimum-line-height`, a derived property fromPatrick Walton2014-04-032-46/+134
| | | | | | | | | | | | | | | | `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`.
* | style: Parse `min-height` and `max-height`Patrick Walton2014-04-031-0/+7
| |
* | Build: Ugrade Mako to 0.9.1, to support Python 3.4Simon Sapin2014-03-312-0/+0
| |
* | Build: Do not swallow Mako template errors in ↵Simon Sapin2014-03-311-0/+1
|/ | | | src/components/style/properties.rs.mako
* Construct table-related flow and calculate fixed layoutJunyoung Cho2014-03-241-4/+7
|
* Change from TNode/TElement::with_element() to as_element().Tetsuharu OHZEKI2014-03-212-80/+66
|
* Rust upgrade for new master rebaseLars Bergstrom2014-03-183-8/+8
|
* Warning police.Josh Matthews2014-03-184-6/+8
|
* Rust upgradesLars Bergstrom2014-03-186-70/+98
|
* script: Fix background color of Acid2.Patrick Walton2014-03-131-0/+1
| | | | | | There were two problems here: (1) we did not process style sheets with an unexpected `rel` attribute but a correct MIME type; (2) we did not consider `none` a valid value for the `background` property.
* Implement JSManaged for DOM objects.Josh Matthews2014-02-241-1/+7
|
* Fix #1723: Parsing of a compound selector made of only a pseudo-elementSimon Sapin2014-02-201-4/+25
|
* Reduce code duplication in CSS parsing by passing base_url everywhere.Simon Sapin2014-02-191-139/+48
|
* Support base_url in stylesheetYoungmin Yoo2014-02-193-21/+127
|
* Add background-image propertyYoungmin Yoo2014-02-191-6/+47
|
* Refactor cascade() and fix cascade_with_cached_declarations()Simon Sapin2014-02-162-267/+171
| | | | | | | | | | | | * Expand the apply() and apply_cached() templates. Their two invocations each were different enough that this improves readability IMO. * Create computed::Context from inherited and cascaded values rather than computed value, as much as possible. * Centralize this creation rather than making it per-property, making 'needed_for_context' not needed anymore. * Pass a context to cascade_with_cached_declarations() rather than duplicate the creation code.
* Make some selector matching code a little more consistent.Ms2ger2014-02-161-2/+5
|
* Use eq() and eq_slice() less, and map_default() more.Ms2ger2014-02-161-10/+8
|
* Use DOMString instead of ~str in a few places.Ms2ger2014-02-161-7/+8
|
* layout: Aggressively try to share styles with the last few nodes seen.Patrick Walton2014-02-142-57/+179
| | | | | | | This roughly implements the same cache found in Blink. 50% improvement on the rainbow page, but at the cost of reducing parallel gains down to nothing. I added a new page, `perf-rainbow-hard.html`, which disables the optimizations in both Blink and Servo.
* style: Eliminate a temporary vector when performing selector matching.Patrick Walton2014-02-143-79/+71
| | | | 26% improvement in style recalc on the rainbow page.
* layout: Cache applicable-declarations-to-computed-values mappings.Patrick Walton2014-02-141-6/+99
| | | | | If the cache is hit, then we can only compute inherited properties. This is a WebKit optimization.
* layout: Implement basic style sharing.Patrick Walton2014-02-143-153/+242
| | | | | No improvement on the rainbow page, but necessary for some other optimizations we want to do.
* style: Separate out style structs into inherited and initial structs.Patrick Walton2014-02-142-167/+243
| | | | | This doesn't make much of a difference in performance, but will be necessary for style struct sharing.
* Use custom enum for the namespace of attribute selectors.Simon Sapin2014-02-112-14/+24
| | | | | … instead of None meaning "any namespace" (where it could be the null namespace.)
* Fix #1652: Attribute selectors should default to the null namespaceSimon Sapin2014-02-101-10/+57
| | | | … and not "any namespace" or use the default namespace declaration.
* auto merge of #1617 : xiongmao86/servo/issue1612, r=larsbergstrombors-servo2014-02-091-0/+0
|\ | | | | | | Rename *.rc to *.rs in components directory, and do some relevant changes in Makefile.in
| * Fix #1612 Rename .rc to .rs, and relevant changes in Makefile.inxiongmao862014-02-091-0/+0
| |
* | This is implement Hover Event. If over element, currently full reflow. after ↵HyunJune Kim2014-02-103-2/+9
|/ | | | PR, will make partial reflow.
* Rename "get_applicable_declarations" to "push_applicable_declarations".Tetsuharu OHZEKI2014-02-091-8/+8
|
* layout: Small vector optimize CSS selector matchingPatrick Walton2014-01-301-12/+10
|
* style: Quicksort rules to avoid allocation of temporary vectors.Patrick Walton2014-01-291-7/+11
| | | | 17% improvement in selector matching on the rainbow page.
* auto merge of #1566 : pcwalton/servo/fewer-allocations, r=SimonSapinbors-servo2014-01-271-6/+53
|\ | | | | | | | | | | | | | | hash. 31% win on selector matching. r? @larsbergstrom
| * style: Stop allocating when lowercasing element names for lookup in thePatrick Walton2014-01-271-6/+53
| | | | | | | | | | | | hash. 31% win on selector matching.
* | style: Short-circuit the selector matching process if the map is empty.Patrick Walton2014-01-271-0/+9
|/ | | | 125% win on selector matching (!)
* Do not copy the result of get_link()Simon Sapin2014-01-252-2/+2
|
* Convert to Namespace during CSS parsing rather than selector matching.Simon Sapin2014-01-254-26/+32
|
* Make get_attr() take a &Namespace rather than Option<~str>Simon Sapin2014-01-252-5/+8
|
* Restore perf improvement from #1554Simon Sapin2014-01-254-21/+15
| | | | | Lower-case attribute names when parsing selectors rather than when matching. This avoid one allocation in matching code.
* Do not lowercase names for *AttributeNS APIs. (Move lower-casing to callers.)Simon Sapin2014-01-252-5/+3
|
* style: Stop copying attribute names when looking them up in the hashPatrick Walton2014-01-241-1/+1
| | | | | | table. 40% improvement in selector matching performance on the rainbow page.
* Implement white-space property(pre)Deokjin Kim2014-01-231-0/+2
| | | | | | In order to support line-break by new-line character, Fist, calculate new-line character's position.(fn flush_clump_to_list) Second, split box(which includes new-line character) and do line-break.(fn scan_for_lines)
* fix line-height propertypatrick kim2014-01-231-1/+1
|
* Change `get_attr()` to `get_attr_val_for_layout()`.Jack Moffitt2014-01-221-1/+1
| | | | | | | | The old code was used by both layout and script, but was erroneously borrowing for the layout case (which causes parallelism problems). script now uses only `value_ref()` or `get_attribute()`, and layout now has its own unsafe version that dances around the borrows of `@mut Attr`.
* Upgrade to latest Rust.Jack Moffitt2014-01-129-102/+93
|