Commit graph

16155 commits

Author SHA1 Message Date
Simon Sapin
460fd6eba8 Deduplicate declarations when inserting each one, not at the end of parsing.
This will reduce the amount of re-allocations and copies.
It will be further optimized with a bit map.
2017-03-07 23:37:30 +01:00
Simon Sapin
4b4a873c3e Move parse method of PropertyDeclaration to ParsedDeclaration
This is what it now returns.
2017-03-07 23:37:29 +01:00
Simon Sapin
9d663ea7af Make PropertyDeclaration::parse return an enum rather than push to a Vec. 2017-03-07 23:37:29 +01:00
Simon Sapin
8160490272 Remove some unused impls. 2017-03-07 23:37:28 +01:00
Simon Sapin
7455ad5eb4 PropertyDeclarationParseResult -> Result<(), PropertyDeclarationParseError> 2017-03-07 23:37:27 +01:00
Simon Sapin
da6316fbe3 Return shorthand decarations as a new enum, don’t push them to a Vec. 2017-03-07 23:37:26 +01:00
bors-servo
b11847d86c Auto merge of #15837 - upsuper:bug1344135, r=emilio
Return true in set_property only when declaration block is changed

This is [bug 1344135](https://bugzilla.mozilla.org/show_bug.cgi?id=1344135).

<!-- 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/15837)
<!-- Reviewable:end -->
2017-03-07 13:51:33 -08:00
bors-servo
f85c8ef744 Auto merge of #15855 - ferjm:IframeLoadEventSteps, r=Ms2ger
s/IframeLoadEventSteps/IFrameLoadEventSteps/g

All the other IFrame* names have the capital "I" and capital "F", so I'm changing this to keep uniformity.

- [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).
- [ ] These changes do not require tests because it's just a name change and the code is already tested.

<!-- 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/15855)
<!-- Reviewable:end -->
2017-03-07 09:38:44 -08:00
Fernando Jiménez Moreno
9a5268d757 s/IframeLoadEventSteps/IFrameLoadEventSteps/g 2017-03-07 18:33:02 +01:00
Anthony Ramine
57291e5609 Remove obsolete step from Text::SplitText
https://github.com/whatwg/dom/pull/419
2017-03-07 13:31:22 +01:00
bors-servo
b66839367c Auto merge of #15833 - sendilkumarn:mut-js-heap, r=nox
removing mutHeapJs references

<!-- 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 #15316

<!-- 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/15833)
<!-- Reviewable:end -->
2017-03-07 01:40:39 -08:00
SendilKumar N
2996d3a413 removing mutHeapJs references
changes as per comments
2017-03-07 17:37:44 +08:00
Ms2ger
5a61d8b2ea Remove unused content blocker code.
I don't know what it is for, so I believe it would be better to remove it
entirely until and unless we start using it.
2017-03-07 10:29:27 +01:00
Josh Matthews
f79850754d Avoid marking image element as complete before its image data is available. 2017-03-07 14:02:46 +05:30
Josh Matthews
dc5335a21e Move checks for document completion to the end of the event loop.
This better reflects the text of the specification - rather than
queuing a task to dispatch the load evnet as soon as the document
loader is unblocked, we want to "spin the event loop until there
is nothing that delays the load event in the Document." Spinning
the event loop is a concept that requires running tasks
completely, hence we check the condition before returning to the
start of the event loop.
2017-03-07 14:02:42 +05:30
bors-servo
e3cc2dd283 Auto merge of #15848 - hiikezoe:transition, r=emilio
Pass transition properties to gecko's struct

<!-- Please describe your changes on the following line: -->
This is a servo side fix for  https://bugzilla.mozilla.org/show_bug.cgi?id=1343751

All patches have been reviewed by @emilio
---
<!-- 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: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because this change is only for gecko.

<!-- 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/15848)
<!-- Reviewable:end -->
2017-03-06 22:45:50 -08:00
Hiroyuki Ikezoe
6503717c20 Skip animation and transition process in servo side.
Otherwise they trigger their animations and transitions.
We will introduce gecko's own process in bug 1341985 (animations) and
bug 1341372 (transitions).
2017-03-07 13:27:55 +09:00
Hiroyuki Ikezoe
16cba0876d Pass transition-property into gecko's struct. 2017-03-07 13:27:49 +09:00
Hiroyuki Ikezoe
3616e4240f Pass transition-timing-function into gecko struct. 2017-03-07 13:27:44 +09:00
Hiroyuki Ikezoe
d61a2ff29e Make a macro for timing function. 2017-03-07 13:27:39 +09:00
Hiroyuki Ikezoe
40822f9575 Pass transition-delay and transition-duration into gecko struct. 2017-03-07 13:27:32 +09:00
Hiroyuki Ikezoe
e340d37a9f Modify some macro for animations to be able to use for transition properties as well. 2017-03-07 13:26:48 +09:00
Hiroyuki Ikezoe
96dbc9849d ensure_len() for nsStyleAutoArray<StyleTransition>. 2017-03-07 13:26:03 +09:00
Hiroyuki Ikezoe
e5386ed7aa Update bindgens. 2017-03-07 13:24:01 +09:00
bors-servo
005f1b6326 Auto merge of #15831 - paulrouget:winParams, r=glennw
introduce frame_size and window_rect

follow up of https://github.com/servo/webrender/pull/951

---
<!-- 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 webrender/issues/833 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because I don't know how to test that feature

<!-- 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/15831)
<!-- Reviewable:end -->
2017-03-06 20:03:42 -08:00
bors-servo
1d497857e8 Auto merge of #15836 - upsuper:animation, r=emilio,bholley
Fix animation shorthand parsing (again)

This is from [bug 1343168](https://bugzilla.mozilla.org/show_bug.cgi?id=1343168) and mostly same as #15793 which was backed out in #15814.

<!-- 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/15836)
<!-- Reviewable:end -->
2017-03-06 19:24:01 -08:00
bors-servo
312797fa90 Auto merge of #15797 - sendilkumarn:lang-algo, r=KiChjang
ext. filtering for lang matching

<!-- Please describe your changes on the following line: -->
This adds the extended algorithm to check the lang. This is my very first encounter with`rust`.
Open to learn.
---
<!-- 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 #15746

<!-- 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/15797)
<!-- Reviewable:end -->
2017-03-06 18:55:02 -08:00
Paul Rouget
2a05534efb introduce frame_size and window_rect 2017-03-07 03:52:21 +01:00
SendilKumar N
b6e6e84bcf ext. filtering for lang matching 2017-03-07 10:20:16 +08:00
avinash
f48f0567cf Add ServoUrl as a parameter to report_error(...) of ParseErrorReporter
passes test-tidy
removed match and used map

added new test test_report_error_passing_correct_url(...) and modified old unit tests

removed the option for servourl and tidied up

removed the duplicate test.

made a few more changes after @cbrewster suggestions.

changed _url to url in few places

fixed the indenting
2017-03-06 09:06:42 -06:00
Xidorn Quan
4f07826837 Return true in set_property only when declaration block is changed 2017-03-06 22:21:59 +11:00
Xidorn Quan
cd22bcd506 Treat empty animation entry invalid 2017-03-06 22:01:55 +11:00
Xidorn Quan
97f2ccacbb Parse none as just a normal animation item 2017-03-06 22:01:37 +11:00
Xidorn Quan
6b03760213 Simplify animation shorthand parsing code 2017-03-06 22:01:15 +11:00
Xidorn Quan
bfa847bad7 Allow animation-name to be omitted from shorthand 2017-03-06 22:00:55 +11:00
Xidorn Quan
d2bb111ff2 Add / fix get_initial_specified_value for animation longhands 2017-03-06 22:00:29 +11:00
Xidorn Quan
6273fa0305 Make animation-name parse none 2017-03-06 22:00:04 +11:00
Xidorn Quan
4bc0cac395 Replace assert! in animation code with debug_assert! 2017-03-06 21:58:08 +11:00
bors-servo
511b82eea3 Auto merge of #15465 - austinprete:caret-color, r=Wafflespeanut
Implement parsing/serialization for caret-color

<!-- Please describe your changes on the following line: -->
This pull request implements parsing and serialization for the caret-color CSS property, per issue #15309 .

---
<!-- 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 #15309

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

<!-- 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/15465)
<!-- Reviewable:end -->
2017-03-05 23:53:26 -08:00
Emilio Cobos Álvarez
dffba35d83
style: Remove unneeded indirection in LonghandsToSerialize. 2017-03-06 08:04:22 +01:00
Jyotsna Prakash
27b60135be replace match with if-let 2017-03-05 17:52:39 -08:00
Glenn Watson
44fe81da41 Update WR (overscroll support + fix viewport tests). 2017-03-06 08:21:32 +10:00
austinprete
a2074f2653 Implement parsing/serialization for caret-color 2017-03-05 10:52:32 -07:00
bors-servo
72fd27bbcc Auto merge of #15816 - servo:raf-timer, r=jdm,emilio
Improve performance of layout queries and requestAnimationFrame

Part of #14442.

<!-- 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/15816)
<!-- Reviewable:end -->
2017-03-05 05:14:45 -08:00
Charles Vandevoorde
26e6c09776 Correct unicode handling for text input 2017-03-05 13:58:33 +01:00
Gregory Terzian
ec84560e7f implement stubs for structured clone callbacks 2017-03-05 10:33:00 +08:00
bors-servo
8c4931f26f Auto merge of #15702 - shubDhond:master, r=upsuper
Invalid three value positions are no longer accepted

<!-- Please describe your changes on the following line: -->
- Position parse no longer accepts invalid three value positions

---
<!-- 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 #15488 .

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

<!-- 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/15702)
<!-- Reviewable:end -->
2017-03-04 03:11:44 -08:00
Manish Goregaokar
58d32b284a Support more XUL properties 2017-03-03 17:22:08 -08:00
Patrick Walton
4e7ac19380 script: Use a timer when rAF is used for non-animation purposes
After this patch, when the page calls `requestAnimationFrame()` too many
times in the row without actually mutating the DOM, further calls to
`rAF` will actually perform the moral equivalent of `setTimeout(16)`.
This saves a lot of CPU time compared to actually waiting for the
vertical blanking interval, because waiting for that requires us to draw
the page.

Reduces CPU usage drastically on nytimes.com, which has a perpetual
`requestAnimationFrame()` loop that checks whether ads are in view.
2017-03-03 23:25:29 +01:00
Patrick Walton
198662f8cb layout: Replace ConstructionResult::swap_out() with get()
It only actually swaps out in nonincremental mode (which isn't suitable
for real world use), so the name is confusing.
2017-03-03 23:25:02 +01:00