Commit graph

4748 commits

Author SHA1 Message Date
bors-servo
d1269294e6 Auto merge of #7611 - nox:cache-element-id, r=frewsxcv
Cache the `id` attribute on Element

Thanks to @asabil for the original work, I only rebased it.

Fixes #6359 and #7040.


<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7611)
<!-- Reviewable:end -->
2015-09-20 09:23:20 -06:00
Michael Howell
554a4cf9f2 Add transitions for CSS calc().
Closes #7284
2015-09-19 19:39:55 -07:00
bors-servo
61267cde63 Auto merge of #7601 - nox:cleanup-dom-webidls, r=Ms2ger
Improve DOM interfaces' extended attributes

Some should have been `[SameObject]` instead of `[Constant]`. The rest of the changes are additional `[Constant]` and `[Pure]` extended attributes on many operations.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7601)
<!-- Reviewable:end -->
2015-09-19 17:50:22 -06:00
Brandon Fairchild
de3547e401 Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Anthony Ramine
49219baab8 Annotate many DOM attribute and methods with [Constant] and [Pure] 2015-09-19 16:03:13 +02:00
Sam Gibson
6d20b388f6 General cleanup for HSTS/Cookie Arc 2015-09-19 18:30:38 +12:00
Sam Gibson
6f573d5d44 Move HSTS/CookieStorage to Arc<RwLock> from Ipc
servo/servo#7421
2015-09-19 18:30:37 +12:00
bors-servo
c91c0188f2 Auto merge of #7679 - bjwbell:reftest-twitter-fail-whale, r=pcwalton
Add css twitter fail whale html test & update ellipse_to_bezier comment

cgaebel had a TODO for a css twitter fail whale reftest, which depended on elliptical border-radius support.
I didn't see any feasible way other than a reference image for border_twitter_fail_whale_b.html.

r? @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7679)
<!-- Reviewable:end -->
2015-09-18 22:54:44 -06:00
Bryan Bell
f4a04614ff Add css twitter fail whale test & update ellipse_to_bezier comment 2015-09-18 20:55:10 -07:00
Philipp Hartwig
c2db10217c Use computed display property for hypothetical box of root element
The root element should never be treated as an inline element by the
flow construction.

Closes #7558.
2015-09-18 23:08:10 +02:00
Hugo Thiessard
6565e7b02f Issue #7390 correct the order of mod declaration 2015-09-18 22:02:04 +02:00
bors-servo
8a8204ffc8 Auto merge of #7447 - ddrmanxbxfr:master, r=jdm
Issue #7382 Use descriptive enums instead of booleans for MIMEClassifier::classifer

Hi guys i've done a small pass of refactor in the MIMEClassifier implementation. (See issue #7382 )
   - Moved the predicates to separate functions
   - Added a mimetype enum so we can compare them easily after calling MIMEClassifier::get_media_type

I hope it follows rust good pratices (care it's my first time doing rust).

Improvements and tips are welcome :).

Thanks for looking at it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7447)
<!-- Reviewable:end -->
2015-09-18 07:22:59 -06:00
Matt Brubeck
8606a94722 Set default limits on page zoom and pinch zoom
Currently these both clamp to 100% in one direction and are unbounded in the
other direction.  This sets default zoom constraints of 10% to 800%.
2015-09-18 05:30:55 -07:00
Matt Brubeck
9333f028e8 Snap to screen pixels instead of px
Fixes #7665.
2015-09-18 03:06:06 -07:00
bors-servo
acde10f005 Auto merge of #7656 - mbrubeck:incremental-text-6501, r=pcwalton
Reconstruct flows when text/font styles change

These styles are used during text shaping.  When they change, we need to re-run shaping and construct new flows.

Fixes #6501. r? @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7656)
<!-- Reviewable:end -->
2015-09-18 01:32:40 -06:00
Matt Brubeck
734513c668 Update glutin to latest upstream merge
To pick up servo/glutin#47.
2015-09-17 22:33:11 -07:00
Matt Brubeck
0c77705f52 Reconstruct flows when text/font/list styles change
Fixes #6501.
2015-09-17 11:59:00 -07:00
Matt Brubeck
040c09fbc5 Always reset HAS_NEWLY_CONSTRUCTED_FLOW during flow construction
This extra reflows when the HAS_NEWLY_CONSTRUCTED_FLOW flag remained set
during a later reflow.  This masked other incremental layout bugs, including
the one tested by the reftest in the commit following this one.
2015-09-17 10:50:47 -07:00
Martin Robinson
1e6f797268 Ensure unique LayerIds for pseudo-elements
Currently pseudo-elements, like the fragments created for ::before and
::after, with layers will have the same LayerId as the body of their
owning fragments. Instead all LayerIds should be unique.

Fixes #2010.
2015-09-17 06:42:29 -07:00
Simon Sapin
feaf6f4c3f Initial support for custom properties in CSSStyleDeclaration 2015-09-17 14:48:56 +02:00
Simon Sapin
d56ea10770 var() substitution: insert /**/ between tokens that would be parse as one token. 2015-09-17 14:48:20 +02:00
Simon Sapin
81dd1ab363 Record first and last token type of custom property values. 2015-09-17 14:48:19 +02:00
Simon Sapin
389d537451 Look for var() in a non-custom property declaration after a parse error. 2015-09-17 14:48:17 +02:00
Simon Sapin
70ea5f61a2 Don’t ignore input at the end of a declaration with var(). 2015-09-17 14:48:16 +02:00
Simon Sapin
54ef8055ec The function name var() is case-insensitive. 2015-09-17 14:48:15 +02:00
Simon Sapin
ab9e1af206 Allow whitespace-only custom property values. 2015-09-17 14:48:14 +02:00
Simon Sapin
c7622bf22f Fix !important in custom properties.
Test changes are also in https://github.com/w3c/csswg-test/pull/847/files
2015-09-17 14:48:13 +02:00
Simon Sapin
4abe7cdf97 Support var() in shorthands. 2015-09-17 14:48:12 +02:00
Patrick Walton
757e2cf4e5 layout: Reformat some long lines and fix some whitespace issues. 2015-09-17 13:31:17 +02:00
Patrick Walton
af8fcdf073 gfx: Fix a minor typo. 2015-09-17 13:31:16 +02:00
Patrick Walton
53f47e74db gfx: Remove some useless calls to drop during HarfBuzz shaping. 2015-09-17 13:31:14 +02:00
Patrick Walton
efdf435ba3 gfx: Paint the insertion point as a one-pixel wide line. 2015-09-17 13:31:13 +02:00
Patrick Walton
357419dc8d layout: Query and maintain the position of the insertion point
throughout layout for input elements.
2015-09-17 13:31:12 +02:00
Patrick Walton
34d9a6091b script: Ask layout to redraw the selection whenever the user moves the
caret in an input element.
2015-09-17 13:31:11 +02:00
Patrick Walton
4a53c873f5 util: Make the number of app units per pixel a constant instead of
repeating the literal value everywhere.

Factoring this value out into a public constant makes it easier to
create `Au` constants in other modules.
2015-09-17 13:31:10 +02:00
Patrick Walton
dc26511ff3 gfx: Properly create continuation glyph entries for ligatures. 2015-09-17 13:31:09 +02:00
Patrick Walton
c62d8292c7 gfx: Add a Debug impl for GlyphStore instances.
Gecko has a `Dump()` routine in a similar spirit.
2015-09-17 13:31:08 +02:00
bors-servo
9e914ca0db Auto merge of #7588 - notriddle:master, r=pcwalton
Actually store the overflow for inline-block elements.

Fixes #7571

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7588)
<!-- Reviewable:end -->
2015-09-17 00:53:04 -06:00
Martin Robinson
30963d76be Improve printing of DisplayLists
Use box tree characters to make DisplayLists easier to scan when
printing them out.
2015-09-16 12:31:38 -07:00
bors-servo
2879da54f9 Auto merge of #7645 - nox:omtc-types, r=Ms2ger
Introduce structs for compositing and script task constructors' arguments

Extracted from @pcwalton's #4271.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7645)
<!-- Reviewable:end -->
2015-09-16 10:41:10 -06:00
Anthony Ramine
a7738a5eef Introduce InitialScriptState 2015-09-16 18:38:24 +02:00
bors-servo
8f0b702018 Auto merge of #7642 - bjwbell:shorthand-parse-elliptical-border-radius, r=jdm
gfx: Add elliptical border-radius shorthand parsing

Adds support for parsing shorthand border-radius values such as:

    /* The syntax of the second radius allows one to four values */
    /* (first radius values) / radius */
    border-radius: 10px 5% / 20px;

    /* (first radius values) / top-left-and-bottom-right | top-right-and-bottom-left */
    border-radius: 10px 5% / 20px 30px;

    /* (first radius values) / top-left | top-right-and-bottom-left | bottom-right */
    border-radius: 10px 5px 2em / 20px 25px 30%;

    /* (first radius values) / top-left | top-right | bottom-right | bottom-left */
    border-radius: 10px 5% / 20px 25em 30px 35em;

r? @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7642)
<!-- Reviewable:end -->
2015-09-16 10:13:52 -06:00
bors-servo
df083ccb52 Auto merge of #7628 - Ms2ger:events-markers, r=jdm
Emit markers for all events, not just UI events.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7628)
<!-- Reviewable:end -->
2015-09-16 08:34:32 -06:00
Ms2ger
73b9925cc1 Remove a pointless clone() call. 2015-09-16 16:29:03 +02:00
Ms2ger
f4cf90f127 Remove an obsolete TODO comment. 2015-09-16 16:29:02 +02:00
Ms2ger
e85b1e4e89 Use an early return in dispatch_to_listeners. 2015-09-16 16:29:02 +02:00
Ms2ger
b7a0440f91 Emit markers for all events, not just UI events. 2015-09-16 16:29:01 +02:00
Ms2ger
6dab37c88c Implement a global_object_for_reflector method. 2015-09-16 16:29:00 +02:00
Ms2ger
69ed59d78f Remove the outdated no_move annotation from GlobalRoot. 2015-09-16 16:28:59 +02:00
Ms2ger
a85196398d Return immediately from dispatch_to_listeners if propagation is stopped. 2015-09-16 16:28:58 +02:00