Commit graph

25860 commits

Author SHA1 Message Date
Connor Brewster
727e5b41f5 Add test to make sure contentDocument is updated after load matures 2017-05-12 13:54:51 -06:00
Nathan Froyd
e966d976fc explicitly specify bitness for x86 cross-compilation situations
Despite compiling for architecture X, the user may have specified a
clang that defaults to architecture Y.  We need to ensure that we invoke
clang with the correct architecture selection.  We do not use --target
to do this, however, because that runs into problems with LLVM's default
search paths.  For the x86 case, we can simply use -m$BITNESS to select
the correct architecture.
2017-05-12 14:29:12 -04:00
Connor Brewster
d004db95cf Make non-initial about:blank loads asynchronous
Don't update iframe pipeline until load completes

To preserve the previous functionality of delaying load events when a
new navigation is triggered, pending pipeline id represents the
current pending load. The load event is only fired if the load message's
pipeline id matches the pending pipeline id.

Track frame size on Frame instead of Pipeline

Disabled matchMedia test

Track creator pipeline id
2017-05-12 11:53:43 -06:00
bors-servo
875b07b4ec Auto merge of #16826 - hiikezoe:check-animation-flag, r=birtles
Check ElementHasAnimations flag in rust side.

We can bail out earlier before calling an FFI function.
This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1364264 .

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because it's for stylo

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16826)
<!-- Reviewable:end -->
2017-05-12 12:35:52 -05:00
Boris Zbarsky
51cf50f20b Fix the situation when :any-link starts or stops matching to actually restyle correctly. 2017-05-12 13:22:41 -04:00
bors-servo
c260beba39 Auto merge of #16821 - Manishearth:variant-caps, r=jryans
font-variant-caps should accept all-small-caps and all-petite-caps

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16821)
<!-- Reviewable:end -->
2017-05-12 10:27:35 -05:00
Simon Sapin
8c9e5d9f9d Fix future illegal_floating_point_literal_pattern warnings.
They make component/style fail to build, because of `#[deny(warnings)]`
2017-05-12 16:12:17 +02:00
bors-servo
eeb1ee9723 Auto merge of #16802 - emilio:slim-down-slc, r=bholley
style: Slim down SharedStyleContext, and do various other cleanups around the style crate.

This slims down SharedStyleContext, in preparation for a few things.

First, I would like to eventually move the stylist to the document in Servo, in
order for it to hold the StyleSheetSet.

Also, this gets rid of a fair amount of overhead while creating it in stylo.

Fixes bug 1363245.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16802)
<!-- Reviewable:end -->
2017-05-12 08:56:47 -05:00
Fernando Jiménez Moreno
bc156cfe1c Stylo: Bug 1350175 - Support getting line / column number of CSS rules
Fix font_cache_thread test
2017-05-12 15:20:12 +02:00
Emilio Cobos Álvarez
25d39006b6
stylo: Stop cloning the list of stylesheets each flush. 2017-05-12 14:51:01 +02:00
Emilio Cobos Álvarez
677daaabc5
style: Parameterize the update and rebuild methods to take an iterator.
In preparation to avoid cloning the stylesheets while rebuilding in Gecko.
2017-05-12 14:50:59 +02:00
bors-servo
db080cea97 Auto merge of #16834 - emilio:nac-is-a-pain, r=bholley
Bug 1364377: Fix inheritance of NAC, and selector-matching of pseudo-implementing NAC.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16834)
<!-- Reviewable:end -->
2017-05-12 07:25:00 -05:00
Emilio Cobos Álvarez
2ffffcfdce
Bug 1364377: Fix inheritance of NAC, and selector-matching of pseudo-implementing NAC. r=bholley
MozReview-Commit-ID: DjSyaWHq1Xj
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-12 13:07:29 +02:00
Imanol Fernandez
593e89086f Fix unsafe AtomicRefCell<PersistentLayoutData> transmute due to memory alignment differences 2017-05-12 12:48:13 +02:00
bors-servo
1faac6a6e6 Auto merge of #16811 - heycam:snapshots, r=emilio
style: record attribute and state selector dependencies

From https://bugzilla.mozilla.org/show_bug.cgi?id=1352306.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16811)
<!-- Reviewable:end -->
2017-05-12 05:41:35 -05:00
Cameron McCormack
bc685fde68 style: Support :-moz-autofill and :-moz-autofill-preview in Gecko. 2017-05-12 17:36:37 +08:00
Cameron McCormack
b405a1cb67 style: Record ElementState bits that selectors depend on. 2017-05-12 17:02:50 +08:00
Cameron McCormack
5cf915118e style: Record names that appear in attribute selectors. 2017-05-12 17:02:18 +08:00
bors-servo
58253f545b Auto merge of #16818 - zombiefungus:fix15638, r=Manishearth
Add default value to layout.threads in prefs.rs (fix #15638)

<!-- Please describe your changes on the following line: -->
Add default value to layout.threads in prefs.rs

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15638  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16818)
<!-- Reviewable:end -->
2017-05-12 03:53:24 -05:00
bors-servo
48fdda3f07 Auto merge of #16785 - aethanyc:fix-typo-and-simplify, r=mbrubeck
Fix typo and simplify for PresentationalHintsSynthesizer

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because it only affects build.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16785)
<!-- Reviewable:end -->
2017-05-12 02:41:25 -05:00
Hiroyuki Ikezoe
652c2153a4 Check ElementHasAnimations flag in rust side.
We can bail out earlier before calling an FFI function.
2017-05-12 12:07:26 +09:00
Manish Goregaokar
f80690fa41 font-variant-caps should accept all-small-caps and all-petite-caps 2017-05-11 15:00:55 -07:00
bors-servo
d1f2cdfb3d Auto merge of #16815 - Manishearth:cssup, r=metajack
Bump cssparser to 0.13.3

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16815)
<!-- Reviewable:end -->
2017-05-11 16:10:23 -05:00
zombiefungus
b055e07aa7 Add default value to layout.threads in prefs.rs (fix15638) 2017-05-11 15:28:37 -05:00
Manish Goregaokar
1b9bac7e66 Bump cssparser to 0.13.3 2017-05-11 12:50:40 -07:00
bors-servo
c277beab2b Auto merge of #16816 - MortimerGoro:unsafe_layout_data_cast, r=SimonSapin
Fix unsafe casting between PersistentLayoutData and PartialPersistentLayoutData

<!-- Please describe your changes on the following line: -->

PersistentLayoutData and PartialPersistentLayoutData castings in Layout component assume that they have the same base raw address. This is unsafe because field orders is not guaranteed by default, and it's causing some SEGV crashes on Android indeed (https://github.com/servo/servo/issues/16647)

Add a C representation to guarantee that the order of the fields and the safe casting.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #16647 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16816)
<!-- Reviewable:end -->
2017-05-11 14:47:24 -05:00
Imanol Fernandez
273bcfbd8e Fix unsafe casting between PersistentLayoutData and PartialPersistentLayoutData 2017-05-11 21:30:59 +02:00
Emilio Cobos Álvarez
50e0c67e2c
style: Stop refcounting the stylist. 2017-05-11 21:05:42 +02:00
Emilio Cobos Álvarez
ebd9bf8181
style: Slim down SharedStyleContext.
This slims down SharedStyleContext, in preparation for a few things.

First, I would like to eventually move the stylist to the document in Servo, in
order for it to hold the StyleSheetSet.

Also, this gets rid of a fair amount of overhead while creating it in stylo.

Fixes bug 1363245.
2017-05-11 21:05:41 +02:00
bors-servo
e196776c24 Auto merge of #16807 - mrobinson:scroll-clamping, r=emilio
Fix clamping of scroll position in window.scrollBy

For rightward and downward overflow the spec says:

Let x be max(0, min(x, viewport scrolling area width - viewport width)).
Let y be max(0, min(y, viewport scrolling area height - viewport height)).

Previously, those operations were reversed, which created negative
overflow even when the overflow direction was downward. This change
ensures that Servo matches spec behavior.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16807)
<!-- Reviewable:end -->
2017-05-11 13:23:39 -05:00
bors-servo
f579405510 Auto merge of #16813 - bholley:importance_handling, r=emilio
Handle importance when inserting into the rule tree

https://bugzilla.mozilla.org/show_bug.cgi?id=1358635

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16813)
<!-- Reviewable:end -->
2017-05-11 12:21:02 -05:00
Martin Robinson
b13cf11505 Fix clamping of scroll position in window.scrollBy
For rightward and downward overflow the spec says:

Let x be max(0, min(x, viewport scrolling area width - viewport width)).
Let y be max(0, min(y, viewport scrolling area height - viewport height)).

Previously, those operations were reversed, which created negative
overflow even when the overflow direction was downward. This change
ensures that Servo matches spec behavior.
2017-05-11 19:20:31 +02:00
Bobby Holley
e9d4110ad4 Handle importance when inserting into the rule tree. 2017-05-11 17:37:17 +02:00
bors-servo
060a651f88 Auto merge of #16812 - MortimerGoro:update_blurdroid, r=jdm
Update blurdroid and set ANDROID_SDK in build_steps.yml

<!-- Please describe your changes on the following line: -->

See https://github.com/servo/saltfs/issues/661. Update blurdroid and set ANDROID_SDK in build_steps.yml

cc @aneeshusa @larsbergstrom

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16812)
<!-- Reviewable:end -->
2017-05-11 10:32:52 -05:00
bors-servo
973bf7af40 Auto merge of #16806 - heycam:state, r=bholley
style: Fix IN_LOADING_STATE value.

;_;

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16806)
<!-- Reviewable:end -->
2017-05-11 08:33:47 -05:00
Imanol Fernandez
a4a4d96e9c Update blurdroid and set ANDROID_SDK in build_steps.yml 2017-05-11 14:43:51 +02:00
bors-servo
48b5e5ebc4 Auto merge of #16805 - brisad:master, r=Wafflespeanut
Make no_viewport_percentage! use an absolute path for HasViewportPerc…

…entage

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #16781

<!-- Either: -->
- [X] These changes do not require tests because the compiler warnings should be enough

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16805)
<!-- Reviewable:end -->
2017-05-11 07:30:30 -05:00
Michael Brennan
f7459fd848 Make no_viewport_percentage! use an absolute path for HasViewportPercentage 2017-05-11 14:24:03 +02:00
bors-servo
7281668763 Auto merge of #16797 - ferjm:bug1361994.mozdocument.cssom, r=xidorn
Stylo: Bug 1361994 - Implement access to CSSMozDocumentRule

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

Bugzilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1361994

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16797)
<!-- Reviewable:end -->
2017-05-11 06:27:42 -05:00
bors-servo
0b4726c055 Auto merge of #16810 - bholley:bool_flags_wrapper_cache, r=emilio
Handle mBoolFlags living on nsWrapperCache

https://bugzilla.mozilla.org/show_bug.cgi?id=1363375

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16810)
<!-- Reviewable:end -->
2017-05-11 04:37:50 -05:00
Bobby Holley
2ee99ddf10 Handle mBoolFlags living on nsWrapperCache. 2017-05-11 11:36:59 +02:00
Cameron McCormack
c0ab74324a style: Fix IN_LOADING_STATE value. 2017-05-11 16:01:40 +08:00
bors-servo
9a419ec3d5 Auto merge of #16799 - pyfisch:unused-opts, r=Wafflespeanut
Remove unused opts

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15963 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16799)
<!-- Reviewable:end -->
2017-05-11 02:11:56 -05:00
bors-servo
f7d67b8624 Auto merge of #16804 - hiikezoe:allow-unitless-length-for-smil, r=birtles
Allow unitless length for smil

This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1363574

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because it's for stylo

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16804)
<!-- Reviewable:end -->
2017-05-10 21:25:47 -05:00
bors-servo
6de4c93aaf Auto merge of #16800 - Manishearth:border-radius, r=emilio
Allow border radii to be set via preshints

Fixes rendering of `<hr>`

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16800)
<!-- Reviewable:end -->
2017-05-10 19:05:21 -05:00
Hiroyuki Ikezoe
5c8394f469 Update bindings. 2017-05-11 08:29:00 +09:00
Hiroyuki Ikezoe
51e434c790 Allow unitless length for SMIL values. 2017-05-11 08:29:00 +09:00
Hiroyuki Ikezoe
51fb4456fc Use parse_property for Servo_CSSSupports2() as well. 2017-05-11 08:29:00 +09:00
Hiroyuki Ikezoe
7ebdf95a3d Factor out common part of Servo_ParseProperty() and set_property(). 2017-05-11 08:29:00 +09:00
Manish Goregaokar
d1c3021f43 Make unknown pres attrs panic 2017-05-10 16:26:29 -07:00