Commit graph

19254 commits

Author SHA1 Message Date
bors-servo
69b9c221f6 Auto merge of #18995 - Manishearth:rm-diagnostics, r=emilio
Revert all hashmap diagnostics changes

We don't need them anymore

<!-- 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/18995)
<!-- Reviewable:end -->
2017-10-23 19:00:24 -05:00
Glenn Watson
1da9dc99b5 Update WR (render notifier API changes). 2017-10-24 09:22:21 +10:00
Manish Goregaokar
44f16452b6
Replace manual iteration with retain() 2017-10-23 14:24:16 -07:00
Manish Goregaokar
f61151a726
Revert diagnostics code from 1251537459 2017-10-23 14:10:52 -07:00
Bobby Holley
3cffc8c427 Revert "Poison hashtable buffers."
This reverts commit c866486b99.
2017-10-23 13:51:51 -07:00
Manish Goregaokar
b118ba72d0 Revert "Diagnostic map semantics."
This reverts commit f5c5be00a7.
2017-10-23 13:51:08 -07:00
Manish Goregaokar
d6bafde971 Revert "Add canary and journaling."
This reverts commit 58322d0021.
2017-10-23 13:46:05 -07:00
Manish Goregaokar
f7ad19f500 Revert "Assert more things in hashtables."
This reverts commit e5023a3eb4.
2017-10-23 13:45:57 -07:00
Manish Goregaokar
fde96d0ff5 Revert "Stuff HashMap journal into a string and verify invariants in a few more places."
This reverts commit 4b64390b81.
2017-10-23 13:45:48 -07:00
Manish Goregaokar
f98f83ceb3 Revert "Verify in DiagnosticHashMap::drop."
This reverts commit c9b5ffb586.
2017-10-23 13:45:38 -07:00
Manish Goregaokar
f9eff7f546 Revert "Write poison to canary when removing item from diagnostic hashmap"
This reverts commit b547e96b44.
2017-10-23 13:45:17 -07:00
Manish Goregaokar
2931e71d40 Revert "Correct the position and record count of broken canary"
This reverts commit cb2772b46c.
2017-10-23 13:45:09 -07:00
Manish Goregaokar
d48aa12b8d Revert "Report hash value at HashMap corruption location."
This reverts commit f7f898b3b3.
2017-10-23 13:44:58 -07:00
Manish Goregaokar
bf69d1b460 Revert "Include map length in diagnostics"
This reverts commit a10329f8ff.
2017-10-23 13:44:47 -07:00
Nika Layzell
2d3331fbd4 Move nsstring from gecko into servo/support/gecko/nsstring
This is the servo side of bug 1403213.

MozReview-Commit-ID: HFdQiuMnGhJ
2017-10-23 14:22:42 -04:00
Keith Yeung
c6bb1cb9d5 Merge request type and destination 2017-10-23 11:19:35 -07:00
bors-servo
d9ede4dc05 Auto merge of #18990 - mhaessig:mouse-event-fixup, r=KiChjang
Fixed FireMouseEventType mixup

Fix for a bug I didn't catch in #18957. Thanks to @rharel for pointing it out.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix issue #18943 and bug in PR #18957
- [X] These changes do not require tests as specified in #18943

r?@jdm

<!-- 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/18990)
<!-- Reviewable:end -->
2017-10-23 10:18:42 -05:00
bors-servo
eaba7ede23 Auto merge of #18988 - emilio:qs, r=heycam
stylo: querySelector / querySelectorAll machinery.

Bug: 1410624
Reviewed-by: heycam

<!-- 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/18988)
<!-- Reviewable:end -->
2017-10-23 08:14:35 -05:00
bors-servo
6381fdf750 Auto merge of #18989 - emilio:all-is-sad, r=xidorn
style: Ensure logical longhands appear before their physical counter-part.

Bug: 1410028
Reviewed-by: xidorn
MozReview-Commit-ID: KPIbt1e2Eq

<!-- 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/18989)
<!-- Reviewable:end -->
2017-10-23 05:34:49 -05:00
Manuel Hässig
072151d28d fixed mouse-event-type mixup 2017-10-23 12:01:48 +02:00
Emilio Cobos Álvarez
b8021335d7
style: Ensure logical longhands appear before their physical counter-part.
Bug: 1410028
Reviewed-by: xidorn
MozReview-Commit-ID: KPIbt1e2Eq
2017-10-23 08:37:49 +02:00
Xidorn Quan
9c23594e74 Remove XBL as a separate cascading level in Stylo.
In Gecko, we handle XBL rules like author rules everywhere, except that
XBL rules are added and sorted in an independent step, behave as if it
has a separate level.

It is not clear to me why Stylo chose to add a separate level for XBL
rules, but it doesn't seem that there is anything special to do with
XBL rules.

This bug happens because we don't handle XBL important rules which are
handled as part of author rules in Gecko due to lack of the additional
level there. We should just follow what Gecko does here and handle them
all the same.
2017-10-23 17:34:34 +11:00
Emilio Cobos Álvarez
9a804f68f9
style: Update bindings. 2017-10-23 08:32:00 +02:00
Emilio Cobos Álvarez
644b502b0d
style: Ensure QuerySelector only processes the light tree.
MozReview-Commit-ID: 7Nw1SEuWNaC
2017-10-23 08:27:50 +02:00
Emilio Cobos Álvarez
dd7196949f
style: Don't use the invalidation machinery unless we may get some benefit from it.
MozReview-Commit-ID: 8Wpn2bjuHBQ
2017-10-23 08:27:49 +02:00
Emilio Cobos Álvarez
d73af807b7
style: Add a few QuerySelector fast-paths.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-10-23 08:27:46 +02:00
Emilio Cobos Álvarez
2274fd7ef3
style: Refactor querySelector to be generic over the query type, and implement a tree-walking variant of it.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-10-23 08:25:09 +02:00
Emilio Cobos Álvarez
4f997bf333
style: Add methods to iterate a subtree in preorder.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-10-23 08:25:08 +02:00
Emilio Cobos Álvarez
6ae8bdee61
style: Hook QuerySelector into stylo.
Bug: 1410624
MozReview-Commit-ID: 4uKWN9uqi3r
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-10-23 08:24:57 +02:00
Emilio Cobos Álvarez
6d78e9ba54
style: Add a very simple invalidation-based querySelector.
MozReview-Commit-ID: Fimc8tz4OWX
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-10-23 08:22:52 +02:00
Emilio Cobos Álvarez
7f5536d5bc
style: Ensure invalidated_self is called at most once per element.
MozReview-Commit-ID: 1M0WuAduqun
2017-10-23 08:22:51 +02:00
Emilio Cobos Álvarez
bd2a82334b
style: Don't look at user and author rules if the element can't be affected by them.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-10-23 08:22:50 +02:00
Emilio Cobos Álvarez
1b32709d95
style: avoid selector refcount churn during invalidation.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-10-23 08:22:49 +02:00
Emilio Cobos Álvarez
258efb70df
style: Move MatchingContext to the InvalidationProcessor.
This avoids threading the quirks mode and nth-index cache around, and prevents
having to thread even more arguments down for the querySelector stuff (at least
VisitedHandlingMode and the style scope).

Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-10-23 08:22:48 +02:00
Emilio Cobos Álvarez
5ac0f5121e
style: Add a way to add self-invalidations to the initial collection.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-10-23 08:22:47 +02:00
Emilio Cobos Álvarez
191c39f28c
style: Make invalidations with offset zero "universal" invalidations.
We'll use this for querySelector / querySelectorAll.

Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-10-23 08:22:46 +02:00
Josh Matthews
99b5eac393 Update webrender for latest RenderNotifier changes. 2017-10-23 11:03:57 +10:00
Emilio Cobos Álvarez
e1aa829d67
selectors: Reformat signatures in the parser module.
I was doing something unrelated with this code, and each signature uses a
different style. This PR unifies them.
2017-10-22 16:33:04 +02:00
bors-servo
1667fcc16d Auto merge of #18255 - CYBAI:prevent-reentrancy-pr18218, r=jdm
Update concept of node filter algorithm

Implement new [filter](https://dom.spec.whatwg.org/#concept-node-filter) algorithm from specification

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #18218 (github issue number if applicable).
- [X] These changes do not require tests because changes are minimal and the error was triggered by a test

<!-- 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/18255)
<!-- Reviewable:end -->
2017-10-21 15:13:04 -05:00
bors-servo
338956461c Auto merge of #18972 - mbrubeck:ok, r=emilio
Remove unnecessary Result::ok calls

- [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 they are code cleanup only

<!-- 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/18972)
<!-- Reviewable:end -->
2017-10-21 11:06:08 -05:00
bors-servo
5ab0ac1620 Auto merge of #18971 - mbrubeck:var, r=emilio
Use env::var_os to read paths from the environment

This avoids unnecessary UTF-8 validation on OsStrings that we just pass
back to the OS.

---
- [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 they are code cleanup only

<!-- 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/18971)
<!-- Reviewable:end -->
2017-10-21 08:09:22 -05:00
bors-servo
c0a6b59fdf Auto merge of #18973 - MortimerGoro:offscreen_v12, r=jdm
Update offscreen_gl_context to v0.12

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

Update offscreen_gl_context to v0.12. Includes:

- Support for OpenGL version selection. It's required for WebGL 2.
- Support for iOS EAGLContext. WebGL should work out of the box once Servo is fully built on iOS.

---
<!-- 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
- [ ] `./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/18973)
<!-- Reviewable:end -->
2017-10-21 05:08:58 -05:00
bors-servo
2b03a9974c Auto merge of #18968 - mbrubeck:try, r=emilio
Use try syntax for Option where appropriate

- [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 they are refactoring only

<!-- 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/18968)
<!-- Reviewable:end -->
2017-10-21 03:31:21 -05:00
bors-servo
48c715c1c8 Auto merge of #18966 - chenpighead:Bug1399049-transform-animate-refactoring, r=hiikezoe
stylo: Avoid using InterpolateMatrix as a fallback for matched transform function pair

In the current implementation, if there is any interpolation error in a matched
transform function pair, we fall-back to use InterpolateMatrix unconditionally.
However, the error could be caused by:

1. mismatched transform function pair
2. matched transform function pair within at least one undecomposable matrix.

Using InterpolateMatrix for case 1 makes sense, however, using InterpolateMatrix
for case 2 does not. According to the spec, we should just report error for
case 2, and let the caller do the fallback procedure. Using InterpolateMatrix
for case 2 will go through more unnecessary code path, and produce more memory
usage and calculation cost, which should be avoidable.

In this patch, we add an extra pass to check if a transform function pair have
matched operations in advance. With this information, we can easily tell whether
the interpolation error in a equal-length transform function pair is caused by
case 1 or case 2. So, we can avoid the unnecessary cost.

---
<!-- 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 [Bug 1399049](https://bugzilla.mozilla.org/show_bug.cgi?id=1399049)
- [X] These changes do not require tests because the change is for some performance gain, and we have tests to ensure that we won't regress the existing behavior already.

<!-- 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/18966)
<!-- Reviewable:end -->
2017-10-21 01:39:41 -05:00
bors-servo
1b08bfc5c0 Auto merge of #18957 - mhaessig:fire-mouse-event-enum, r=jdm
Made fire_mouse_event take an enum for event_name

Added an enum with the mouse event options for `fire_mouse_event` and refactored the `event_name` parameter to take the enum as argument.
I also added two options (Leave and Enter) which are noted as todo in the comments.

- [x] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These Changes fix #18943.
- [X] These changes do not require tests because the issue said a clean build suffices.

<!-- 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/18957)
<!-- Reviewable:end -->
2017-10-20 22:14:43 -05:00
bors-servo
a71470abe5 Auto merge of #18952 - jdm:no-leak-on-shutdown, r=nox
Do not trace Rust values when thread is shutting down.

This addresses a paint point when using debug-mozjs builds. jonco says that it is considered a leak when objects stored in side tables in a SpiderMonkey embedding are traced right before shutting down. This PR adds a per-thread flag that controls whether to run the Rust-side trace hooks, which is automatically toggled before the final GC occurs when destroying a JS runtime.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #18948 and fix #18947.
- [x] These changes do not require tests because we don't use debug-mozjs on CI

<!-- 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/18952)
<!-- Reviewable:end -->
2017-10-20 20:28:03 -05:00
bors-servo
ba9af5c124 Auto merge of #18977 - Manishearth:map-len, r=Gankro
Include map length in diagnostics

If this doesn't match with the size it's more likely for anything caught
t be hardware corruption. If it does the situation is more interesting.

<!-- 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/18977)
<!-- Reviewable:end -->
2017-10-20 18:52:54 -05:00
Manish Goregaokar
a10329f8ff Include map length in diagnostics 2017-10-20 16:31:42 -07:00
bors-servo
d6042707a6 Auto merge of #18956 - glennw:update-wr-ellipse-bs, r=jdm
Update WR (box shadows + per-corner radii, elliptical clips).

<!-- 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/18956)
<!-- Reviewable:end -->
2017-10-20 16:47:30 -05:00
Manuel Hässig
78583ee339 made fire_mouse_event take an enum for event_name 2017-10-20 23:12:05 +02:00