| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Support extending DOM classes in JS
Adds support for determining the correct prototype as part of a `new` call for non-HTML constructors. Support for HTML constructors [was added](https://github.com/servo/servo/blob/master/components/script/dom/bindings/htmlconstructor.rs#L116) as part of the custom element work, but that wasn't enough for extending other DOM objects like `EventTarget`.
This work is based on Gecko's code in https://searchfox.org/mozilla-central/rev/2d678a843ceab81e43f7ffb83212197dc10e944a/dom/bindings/BindingUtils.cpp#3667, and is split into two parts:
1) the actualy new implementation (demonstrating that extending `EventTarget` works as expected)
2) plumbing the new prototype through all of the rest of the DOM object construction code.
This ends up being more complex than the way it's done in Gecko because they have lazy DOM reflectors, so their native DOM objects can be constructed without any knowledge of a JS prototype. Servo's reflectors are eager, however, so we need to propagate prototype information into individual constructors. As a result, this was a tedious set of changes to make.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #29770
- [x] There are tests for these changes
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Extract bodies of generated binding helpers into common code
This is part of fixing #29770, by extracting common behaviour that [will be called](https://searchfox.org/mozilla-central/rev/2d678a843ceab81e43f7ffb83212197dc10e944a/dom/bindings/BindingUtils.cpp#3744) from new code in interface.rs.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes
|
| | |
|
| | |
|
| |
| |
| |
| | |
out of generated bindings.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Backport several style changes from Gecko
<!-- 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. -->
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Make `Location` operate on the correct objects
This PR updates the implementation of the "[`Location`-object navigate][1]" algorithm to use the correct browsing context as the source browsing context for navigation. This affects the determination of a referrer and referrer policy and the treatment of `javascript:` URLs.
This PR also fixes the derivation of a `Location` object's [relevant `Document`][2] to match the specified behavior.
[1]: https://html.spec.whatwg.org/multipage/#location-object-navigate
[2]: https://html.spec.whatwg.org/multipage/#relevant-document
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This PR updates the implementation of the "Location-object navigate"
algorithm to use the correct browsing context as the source browsing
context for navigation. This affects the determination of a referrer and
referrer policy and the treatment of javascript: URLs.
This PR also fixes the derivation of a Location object's relevant
Document to match the specified behavior.
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
AnthonyJ3:Use-same-origin-as-default-credential-mode-for-RequestInit-fix, r=mukilan
Use same-origin as default credential mode for RequestInit fix
<!-- Please describe your changes on the following line: -->
- Updated the default credential mode from omit to same-origin as per: https://github.com/whatwg/fetch/pull/1153
- Deleted instances of fallback credentials
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #29633 (GitHub issue number if applicable)
- [X] There are tests for these changes
|
| | |
|
| | |
|
| |
| |
| |
| | |
Signed-off-by: AnthonyJ3 <johnsonac.3300@gmail.com>
|
| |
| |
| |
| |
| |
| | |
This commit should fix #29725.
Signed-off-by: Veronika Bušů <paricbat@email.cz>
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Implemented special cases for Element.clientWidth() and clientHeight()
<!-- Please describe your changes on the following line: -->
Implemented the special cases for Element.clientWidth() and Element.clientHeight() as outlined in issue #29704.
---
<!-- 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
<!-- Either: -->
- [x] These changes do not require tests because tests already exist.
<!-- 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. -->
[Specification text](https://w3c.github.io/csswg-drafts/cssom-view/#dom-element-clientwidth):
> If the element is the [root element](https://w3c.github.io/csswg-drafts/css-display-4/#root-element) and the element’s [node document](https://dom.spec.whatwg.org/#concept-node-document) is not in [quirks mode](https://dom.spec.whatwg.org/#concept-document-quirks), or if the element is [the body element](https://html.spec.whatwg.org/multipage/dom.html#the-body-element-2) and the element’s node document is in quirks mode, return the [viewport](https://www.w3.org/TR/CSS21/visuren.html#x1) width excluding the size of a rendered scroll bar (if any).
|
| | |
| | |
| | |
| | | |
special cases, reconfigured Window constructor to initialize current_viewport to initial window size
|
| | |
| | |
| | |
| | | |
cases, reconfigured Window constructor to initialize current_viewport to initial window size
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Update step numbers in URL constructor
<!-- Please describe your changes on the following line: -->
Two commits have been made ahead of the current implementation of
Servo's URL constructor:
- Align with a more modern IDL definition style [1]
- Add URL.canParse() [2]
Since these commits don't alter the actual behavior, this commit only
updates the step numbers and adds brief descriptions for each step.
No behavior change is expected with this commit.
[1]: https://github.com/whatwg/url/commit/ea3b75d333cbce91f73676ef2d21bcadb12b4419
[2]: https://github.com/whatwg/url/commit/ae3c28b84e3e7122c2807401c26b8a63cb2ab445
---
<!-- 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] These changes do not require tests because no behavior has changed.
<!-- 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. -->
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Two commits have been made ahead of the current implementation of
Servo's URL constructor:
- Align with a more modern IDL definition style [1]
- Add URL.canParse() [2]
Since these commits don't alter the actual behavior, this commit only
updates the step numbers and adds brief descriptions for each step.
No behavior change is expected with this commit.
[1]: https://github.com/whatwg/url/commit/ea3b75d333cbce91f73676ef2d21bcadb12b4419
[2]: https://github.com/whatwg/url/commit/ae3c28b84e3e7122c2807401c26b8a63cb2ab445
Signed-off-by: Yutaro Ohno <yutaro.ono.418@gmail.com>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
eca0acf4598c173c71765b961bd2079c0bb48cd2 uncovered a bug in the way that
the scrolling area of `window` was calculated and broke scrolling on the
root element. This change does two things in order to fix that:
1. Does a partial revert of eca0acf4598c173c71765b961bd2079c0bb48cd2 in
order to get scrolling from script working again on the window
object.
2. Has the compositor always generate a frame for scrolls starting from
script and waits for them. This is speculative fix for flakiness in
root scrolling tests on CI.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Clean up how command-line options are passed around
<!-- 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 #29678
- [x] These changes do not require tests because they do not change behavior.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
1. When updating the animation timeline, ensure that nodes that are
animating are marked dirty, if necessary, so any style queries will
force an layout flush.
2. Disable the problematic transition test suites, as they are in Gecko.
These suites often fail when Servo is so overloaded that it cannot
deliver frames fast enough to get more than two samples during the
animation lifecycle.
Fixes #28334.
Fixes #26435.
Fixes #21486.
|
|/ /
| |
| |
| |
| |
| |
| | |
Because the response body stream is initialized with FetchResponse, it
cannot be processed with in-memory empty sequence. Thus, instead of
using the FetchResponse stream, we'll reset it to Memory body stream
with empty byte sequence if there's no init body.
|
| |
| |
| |
| |
| |
| | |
Before the code was only allowing `overflow: hidden` elements to scroll.
This fixes that issue and also clean up the code that deals with
detecting whether the body is a "potentially scrollable" in quirks mode.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Scrolling from script should flow layout and send a display list to
WebRender. This allows all of the scroll nodes to exist in WebRender
before asking it to move the node.
See https://gist.github.com/paulirish/5d52fb081b3570c81e3a.
Fixes #29659.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fix checking for empty set in getElementsByClassName
Because empty set with `.all(predicate)` will always return `true`, it will result in always filtering wrong elements when the classes is empty set.
Thus, we return earlier with `always_empty` HTMLCollection in the empty classes case so that we can avoid filtering on empty sets.
With adding the checking, we can fix the failures in `/dom/nodes/getElementsByClassName-empty-set.html`.
---
- [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)
- [x] There are tests for these changes
|