aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
Commit message (Collapse)AuthorAgeFilesLines
* Make methods storing layout-originating nodes unsafe.Josh Matthews2017-05-153-19/+34
|
* Send information to script as part of finishing layout.Josh Matthews2017-05-151-8/+6
| | | | | | | This avoids the need for multiple layout RPC operations immediately following return of control to script. This means that layout and script can continue to operate in parallel at this point, rather than one potentially waiting on the shared mutex to be unlocked.
* Root nodes for the duration of their CSS transitions.Josh Matthews2017-05-151-1/+5
| | | | | | | | This ensures that we can pass a node address as part of the asynchronous transition end notification, making it safe to fire the corresponding DOM event on the node from the script thread. Without explicitly rooting this node when the transition starts, we risk the node being GCed before the transition is complete.
* Auto merge of #16859 - nox:gradients, r=emiliobors-servo2017-05-151-4/+2
|\ | | | | | | | | | | | | | | Rewrite style images with a good dose of generics 💉 <!-- 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/16859) <!-- Reviewable:end -->
| * Rename LayerImage to ImageLayer and make it a type aliasAnthony Ramine2017-05-151-4/+2
| |
* | Make ParsingMode bitflags.Hiroyuki Ikezoe2017-05-148-19/+19
| | | | | | | | | | assert_parsing_mode_match() is mostly the same as assert_restyle_hints_match().
* | Rename LengthParsingMode to ParsingMode and LengthParsingMode::SVG to ↵Hiroyuki Ikezoe2017-05-148-19/+19
|/ | | | | | | PasingMode::AllowUnitlessLength. We need another flag that represents allow-negative-number for SMIL, so this enum will also comprise the another parsing mode that allows negative number.
* Auto merge of #16845 - asajeffrey:script-rename-browsing-contexts, r=jdmbors-servo2017-05-139-126/+119
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Renamed BrowsingContext to WindowProxy in script. <!-- Please describe your changes on the following line: --> Renamed `script::dom::BrowsingContext` to `script::dom::WindowProxy`. The browsing context is mostly maintained in the constellation, not in script. It would be nice to rename `constellation::Frame` to `constellation::BrowsingContext`, but that will be very confusing if there are two `BrowsingContext` types. --- <!-- 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 renamings aren't externally visible <!-- 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/16845) <!-- Reviewable:end -->
| * Renamed BrowsingContext to WindowProxy in script.Alan Jeffrey2017-05-129-126/+119
| |
* | Auto merge of #16506 - cbrewster:about_chaos, r=asajeffreybors-servo2017-05-124-50/+101
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make non-initial about:blank loads async <!-- 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 #14856 (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/16506) <!-- Reviewable:end -->
| * Make non-initial about:blank loads asynchronousConnor Brewster2017-05-124-50/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Auto merge of #16807 - mrobinson:scroll-clamping, r=emiliobors-servo2017-05-111-2/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 -->
| * Fix clamping of scroll position in window.scrollByMartin Robinson2017-05-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Bug 1355343: Take all the snapshots into account. r=bholleyEmilio Cobos Álvarez2017-05-101-9/+22
|/ | | | | | | | | | | | | | | | | I've chosen this approach mainly because there's no other good way to guarantee the model is correct than holding the snapshots alive until a style refresh. What I tried before this (storing them in a sort of "immutable element data") is a pain, since we call into style from the frame constructor and other content notifications, which makes keeping track of which snapshots should be cleared an which shouldn't an insane task. Ideally we'd have a single entry-point for style, but that's not the case right now, and changing that requires pretty non-trivial changes to the frame constructor. MozReview-Commit-ID: FF1KWZv2iBM Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* Stylo: Bug 1355408 - add support for @-moz-documentFernando Jiménez Moreno2017-05-091-0/+1
|
* Upgrade to rustc 1.19.0-nightly (ced823e26 2017-05-07)Simon Sapin2017-05-082-18/+18
|
* Auto merge of #16697 - cbrewster:history_throw, r=KiChjangbors-servo2017-05-042-12/+26
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make History attributes and methods throw <!-- Please describe your changes on the following line: --> All History methods and attributes should throw a `SecurityError` if the document associated with the `History` object is not fully active. https://html.spec.whatwg.org/multipage/browsers.html#history-3 --- <!-- 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 - [ ] 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/16697) <!-- Reviewable:end -->
| * Make History attributes and methods throwConnor Brewster2017-05-022-12/+26
| |
* | Fix unsafe Heap constructor usage in DOM objects Imanol Fernandez2017-05-047-82/+80
| |
* | Solving merge conficts related to the html5ever_atoms -> html5ever changeChristian Poveda2017-05-03104-442/+345
|\ \
| * \ Auto merge of #16689 - servo:m5e, r=noxbors-servo2017-05-0389-417/+316
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upgrade to html5ever 0.16 <!-- 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/16689) <!-- Reviewable:end -->
| | * | Upgrade to html5ever 0.16Simon Sapin2017-05-0289-417/+316
| | |/
| * / Fix up script and layout.Bobby Holley2017-05-0223-22/+29
| |/
* / Changed all prefixes from DOMString to the atomic Prefix from html5everChristian Poveda2017-05-0375-267/+226
|/
* Stop using unstable slice_patterns featureMatt Brubeck2017-05-011-3/+3
|
* Auto merge of #16658 - n0max:remove-index-size-error, r=emiliobors-servo2017-04-291-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove IndexSizeError in CanvasRenderingContext2D::drawImage <!-- Please describe your changes on the following line: --> The current spec don't expect the IndexSizeError if the rectangle is empty. --- <!-- 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 #10600 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes <!-- 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/16658) <!-- Reviewable:end -->
| * Remove IndexSizeError in CanvasRenderingContext2D::drawImagen0max2017-04-291-2/+2
| |
* | Auto merge of #16590 - MortimerGoro:texture_rgb, r=emiliobors-servo2017-04-281-28/+83
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix WebGL premultiplied alpha. Fix texImage2D calls with RGB images. Fix WebGL premultiplied alpha testcases. Fix broken textures in some WebGL demos (e.g. Three.js). This was caused by WebGL::texImage2D calls with RGB formats. Alpha must be removed from the rgba8 pixel vector before submitting the data to the GPU. --- <!-- 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/16590) <!-- Reviewable:end -->
| * | Fix WebGL premultiplied alpha. Fix texImage2D calls with RGB images.Imanol Fernandez2017-04-281-28/+83
| |/
* | Propagate quirks mode all the way to ParserContextAnthony Ramine2017-04-2711-15/+42
| | | | | | | | The quirks mode is still not properly propagated in geckolib.
* | Make Stylist::quirks_mode hold a QuirksModeAnthony Ramine2017-04-261-1/+1
| |
* | Auto merge of #16618 - emilio:dirty-doc, r=noxbors-servo2017-04-261-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | script: Ensure we don't suppress reflows when stylesheets are dirty. I suspect this will prevent some intermittentness in #16617 <!-- 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/16618) <!-- Reviewable:end -->
| * | script: Ensure we don't suppress reflows when stylesheets are dirty.Emilio Cobos Álvarez2017-04-261-0/+1
| | |
* | | Keep custom-ident and string separate in animation/keyframes name.Simon Sapin2017-04-261-7/+7
| | |
* | | Add initial style system support for @counter-style rulesSimon Sapin2017-04-261-0/+1
| | |
* | | Use CustomIdent for animation-name and @keyframesSimon Sapin2017-04-261-10/+4
|/ /
* | Fix various build warningsAaron Cunningham2017-04-244-0/+4
| | | | | | | | | | | | This should remove six separate warnings when building servo. One of the warnings was an unused mut, and the other were various dead code warnings
* | Auto merge of #16530 - metajack:kill-domrectlist, r=noxbors-servo2017-04-246-77/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove DOMRectList and use sequences instead. DOMRectList was removed last back in 2015. See https://www.w3.org/Bugs/Public/show_bug.cgi?id=26200 for details. <!-- 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: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they are covered by existing tests <!-- 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/16530) <!-- Reviewable:end -->
| * | Remove DOMRectList and use sequences instead.Jack Moffitt2017-04-196-77/+7
| | | | | | | | | | | | | | | DOMRectList was removed last back in 2015. See https://www.w3.org/Bugs/Public/show_bug.cgi?id=26200 for details.
* | | Auto merge of #16592 - avadacatavra:globalscope, r=jdmbors-servo2017-04-246-8/+41
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | added origin to globalscope <!-- Please describe your changes on the following line: --> Replaces #16561 --- <!-- 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 - [ ] 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/16592) <!-- Reviewable:end -->
| * | added origin to globalscopeddh2017-04-246-8/+41
| | |
* | | stylo: Add basic system font support, use for font-size and font-familyManish Goregaokar2017-04-211-1/+1
| | |
* | | Fix highp precision in shaders & Implement WebGL::GetShaderPrecisionFormatImanol Fernandez2017-04-213-2/+26
|/ /
* | Auto merge of #16531 - mrobinson:clip-id, r=glennwbors-servo2017-04-202-7/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminate ScrollRootId Just use WebRender's ClipId directly. This will allow us to create and use ReferenceFrames in the future, if we need to do that. It will also make it easier to have Servo responsible for creating the root scrolling area, which will allow removing some old hacks in the future. <!-- 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: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they should not change behavior. <!-- 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/16531) <!-- Reviewable:end -->
| * | Eliminate ScrollRootIdMartin Robinson2017-04-202-7/+9
| | | | | | | | | | | | | | | | | | | | | Just use WebRender's ClipId directly. This will allow us to create and use ReferenceFrames in the future, if we need to do that. It will also make it easier to have Servo responsible for creating the root scrolling area, which will allow removing some old hacks in the future.
* | | Auto merge of #16472 - cu1t:#14095-fix-xml-doc-namespaces, r=noxbors-servo2017-04-201-1/+8
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix namespaces of elements created in XML documents Correctly implement following step of [Dom Document Spec](https://dom.spec.whatwg.org/#dom-document-createelement): > Let namespace be the HTML namespace, if the context object is an HTML document or context object’s content type is "application/xhtml+xml", and null otherwise. Note, this will make following test in `tests/wpt/web-platform-tests/dom/nodes/Document-constructor.html` to fail, so related .ini file added to mark it as such: ``` test(function() { var doc = new Document(); var a = doc.createElement("a"); // In UTF-8: 0xC3 0xA4 a.href = "http://example.org/?\u00E4"; assert_equals(a.href, "http://example.org/?%C3%A4"); }, "new Document(): URL parsing") ``` I'm not very familiar with specs, but from quick look at it, I'm doubtfull that it is valid in the first place. This is an "application/xml" document, so I don't see why it should encode a.href. Firefox also fails that. --- <!-- 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 #14095 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because because there are already tests which were being ignored <!-- 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/16472) <!-- Reviewable:end -->
| * | Fix namespaces of elements created in XML documentscu1t2017-04-191-1/+8
| | |
* | | Auto merge of #16519 - emilio:unused-import, r=emiliobors-servo2017-04-191-1/+0
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | dom/medialist: remove unused import. <!-- 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/16519) <!-- Reviewable:end -->
| * | | dom/medialist: remove unused `Default` import.Emilio Cobos Álvarez2017-04-191-1/+0
| | | |
| * | | stylo: Add basic system font support, use for font-size and font-familyManish Goregaokar2017-04-181-1/+1
| | |/ | |/|