Commit graph

3197 commits

Author SHA1 Message Date
bors-servo
07304235cc Auto merge of #10502 - KiChjang:fix-open-url-base, r=Ms2ger
Add API base url method to global objects

This adds an `api_base_url` function to global objects, which fixes `open-url-base.htm` under XMLHttpRequest.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10502)
<!-- Reviewable:end -->
2016-04-11 17:57:02 +05:30
Keith Yeung
c75079eff3 Add API base url method to global objects 2016-04-11 07:49:31 -04:00
shubham_jain
6626c5cfd4 issue #10141 : Document::location set null for documents without a browsing context. r=Ms2ger 2016-04-09 22:54:07 +05:30
bors-servo
32e53b80e2 Auto merge of #10086 - KiChjang:table-rows, r=Manishearth
Implement HTMLTableElement#rows

Fixes #8084.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10086)
<!-- Reviewable:end -->
2016-04-09 16:36:40 +05:30
Shiroy
ee9bb1f3c6 Avoid script execution when not found
Fix #8391
2016-04-09 09:57:35 +02:00
Daniel Robertson
e0454e0b65 Add tests and clean up *_mode_assign_inline_sizes
Clean up block_mode_assign_inline_sizes and
inline_mode_assign_inline_sizes and add extra css tests.
2016-04-09 01:13:30 -04:00
Patrick Walton
6a6b688fa8 layout: Make inner scroll wrappers acquire the overflow region of their
contents.

Makes Twitter pages show up when scrolling, if WebRender is not in use.
WebRender does not yet support overflow:scroll.
2016-04-08 18:18:49 -07:00
Keith Yeung
5959aa6cbe Remove str_to_string compile test 2016-04-08 07:00:49 -04:00
bors-servo
c191dff04e Auto merge of #10361 - mbrubeck:empty-caret, r=pcwalton
Fixes for insertion point caret rendering

This contains several fixes for the code to position and render the insertion point.  The main effect is that the insertion point is now rendered correctly when in an empty input field.  See the individual commit messages for more detais.  r? @pcwalton

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10361)
<!-- Reviewable:end -->
2016-04-08 06:01:17 +05:30
bors-servo
c0aa049b0a Auto merge of #9688 - KiChjang:worker-terminate, r=jdm
Implement Worker#terminate() (fixes #4427).

Adds support for terminating DOM workers. A closing flag was added to
WorkerGlobalScope per the spec.

Rebased #6652, with some comments addressed.
Fixes #4427.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9688)
<!-- Reviewable:end -->
2016-04-08 05:01:18 +05:30
Matt Brubeck
e72ae2c25a Basic insertion point reftest 2016-04-07 16:09:44 -07:00
Matt Brubeck
32aad0838e Draw insertion point even for empty input fields
This allows text layout to generate an empty text fragment if the fragment
contains the insertion point for a text input box.
2016-04-07 16:09:35 -07:00
Joe Wilm
229b176321 Implement Worker#terminate() (fixes #4427).
Adds support for terminating DOM workers. A closing flag was added to
WorkerGlobalScope per the spec.
2016-04-07 18:54:32 -04:00
Keith Yeung
54f139c5cf Implement HTMLTableElement#rows 2016-04-07 18:37:42 -04:00
bors-servo
eda8784c34 Auto merge of #10438 - KiChjang:text-decoration-fix, r=mbrubeck
Properly inherit text decorations

Fixes #8684.
Fixes #8783.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10438)
<!-- Reviewable:end -->
2016-04-08 03:39:41 +05:30
Keith Yeung
b8971867f8 Properly inherit text decorations 2016-04-07 17:16:45 -04:00
bors-servo
e66e437ae6 Auto merge of #10450 - pcwalton:overflow-scroll-non-positioned, r=mbrubeck
layout: Allow non-absolutely-positioned elements with `overflow: scroll` set to be scrolled.

This makes them establish stacking contexts, which is a CSS 2.1 spec
violation. However, we were already violating the spec here for
absolutely-positioned elements with `overflow: scroll`. It will probably
be easier to fix this spec violation once we either switch entirely to
WebRender or we have multiple layers per stacking context.

r? @mbrubeck

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10450)
<!-- Reviewable:end -->
2016-04-07 21:30:13 +05:30
Ms2ger
7deaeea707 Update CSS tests to revision aac1cd51245c0c469325988a0446985a2f1e476c 2016-04-07 15:10:43 +02:00
Patrick Walton
1e884ddc69 layout: Allow non-absolutely-positioned elements with overflow: scroll
set to be scrolled.

This makes them establish stacking contexts, which is a CSS 2.1 spec
violation. However, we were already violating the spec here for
absolutely-positioned elements with `overflow: scroll`. It will probably
be easier to fix this spec violation once we either switch entirely to
WebRender or we have multiple layers per stacking context.

Closes #2742.
2016-04-06 17:58:47 -07:00
bors-servo
c631fcf96f Auto merge of #10388 - autrilla:dom-legend-form, r=emilio
Added .form property for legend tag

r? @emilio

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10388)
<!-- Reviewable:end -->
2016-04-06 22:30:25 +05:30
Adrian Utrilla
a8f9887d86 Added .form property for legend tag 2016-04-06 17:42:24 +02:00
bors-servo
cb943b016f Auto merge of #10419 - notriddle:whitespace_border, r=mbrubeck
Whitespace stripping should not result in a dangling, open border.

No open issue (found it while working on #7681).

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10419)
<!-- Reviewable:end -->
2016-04-06 15:30:51 +05:30
bors-servo
e36e3be855 Auto merge of #10351 - stjepang:impl-url-searchparams, r=Manishearth
Implement URL.searchParams

Spec: https://url.spec.whatwg.org/#dom-url-searchparams
Closes #10335.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10351)
<!-- Reviewable:end -->
2016-04-06 14:27:30 +05:30
bors-servo
6171188f59 Auto merge of #10319 - Mylainos:Issue-#10284, r=emilio
Issue #10284 Ignore alternate stylesheets

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10319)
<!-- Reviewable:end -->
2016-04-06 12:21:27 +05:30
Hugo Thiessard
c39c7533ca Issue #10284 Ignore alternate stylesheets 2016-04-05 23:57:39 +02:00
Michael Howell
2b75ef09f7 Whitespace stripping should not result in a dangling, open border. 2016-04-05 11:39:49 -07:00
bors-servo
04600458e6 Auto merge of #10411 - servo:scrollingElement, r=emilio
Rewrite scrollingElement.html to fail reliably when URL.createObjectURL is not implemented.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10411)
<!-- Reviewable:end -->
2016-04-05 22:03:24 +05:30
bors-servo
0ff8adb097 Auto merge of #9811 - paulrouget:forceTouch, r=mbrubeck
forcetouch events

https://developer.apple.com/library/mac/documentation/AppleApplications/Conceptual/SafariJSProgTopics/RespondingtoForceTouchEventsfromJavaScript.html

Not sure how we want to land that yet. Maybe reproduce the webkit events (as in this PR), or as touch/mousemouse events.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9811)
<!-- Reviewable:end -->
2016-04-05 21:07:05 +05:30
Stjepan Glavina
7b38f289b0 Implement URL.searchParams
Spec: https://url.spec.whatwg.org/#dom-url-searchparams
2016-04-05 16:10:05 +02:00
Ms2ger
5fc5891e04 Rewrite scrollingElement.html to fail reliably when URL.createObjectURL is not implemented. 2016-04-05 15:15:46 +02:00
Paul Rouget
df6e7394d4 forcetouch events support
This enables Apple forcetouch DOM events. It requires the preference dom.forcetouch.enabled.

The DOM events are described here:
- https://developer.apple.com/library/mac/documentation/AppleApplications/Conceptual/SafariJSProgTopics/RespondingtoForceTouchEventsfromJavaScript.html

The Cocoa mechanism is documented here:
- 20000016-SW274
2016-04-05 18:42:28 +08:00
bors-servo
17ffc6cf71 Auto merge of #10362 - amarant:10348-string-preferences, r=jdm
Issue #10348 Implement StringMozPreference, string preferences, WPT test

I'm not exactly sure of the wanted semantics with boolean values.

Fixes #10348.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10362)
<!-- Reviewable:end -->
2016-04-05 16:06:26 +05:30
bors-servo
a29da7b48e Auto merge of #10365 - emilio:warnings, r=Wafflespeanut
servo: Clean up unused variables and imports

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10365)
<!-- Reviewable:end -->
2016-04-04 23:39:31 +05:30
bors-servo
ca3d120f4a Auto merge of #10372 - dzbarsky:rmAttrNS, r=Ms2ger
Implement nodeName on Attr

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10372)
<!-- Reviewable:end -->
2016-04-04 18:12:32 +05:30
bors-servo
3b2a1a3c47 Auto merge of #10354 - perlun:implement-missing-html-script-element-attributes, r=Ms2ger
HTMLScriptElement: Added missing DOM properties

This should sort out most (all?) of the ones pointed out in #10227.

/cc @jdm

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10354)
<!-- Reviewable:end -->
2016-04-04 17:21:22 +05:30
bors-servo
a9eb08dbaa Auto merge of #10344 - servo:wpt-20160401, r=Ms2ger
Update web-platform-tests to revision 15ad8eaadd91425cc9331b2e658d4c2796ae5ad8.

Fixes #10375.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10344)
<!-- Reviewable:end -->
2016-04-04 16:17:43 +05:30
Ms2ger
dba68269e0 Update web-platform-tests to revision 15ad8eaadd91425cc9331b2e658d4c2796ae5ad8 2016-04-04 09:43:55 +02:00
bors-servo
241518a7d2 Auto merge of #10034 - rilut:implement-elementsfrompoint, r=emilio
Implement Document#elementsFromPoint

Fixes #9859.

I'm trying to implement Document#elementsFromPoint, which I need to reuse the `get_nodes_under_mouse` and `mouse_over` function which have been removed a days ago in #9715. So I added it back while I'm not sure if my implementation is correct. Any advice will be greatly appreciated.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10034)
<!-- Reviewable:end -->
2016-04-04 12:48:39 +05:30
Per Lundberg
99f473631a HTMLScriptElement: Added missing DOM properties
This should sort out most (all?) of the ones pointed out in #10227.

(Amended with suggested fixes in PR #10354.)
2016-04-03 22:33:57 +03:00
Arnaud Marant
95c077af46 Issue #10348 Implement StringMozPreference, string preferences, WPT tests
I'm not exactly sure of the wanted semantics with boolean values.
2016-04-03 21:28:17 +02:00
David Zbarsky
8cbcdfb761 Implement nodeName on Attr 2016-04-03 10:27:41 -07:00
bors-servo
d35ae3beb7 Auto merge of #9972 - dagnir:xhr-data, r=KiChjang
Xhr data

Builds on existing work by @emosenkis.  Fixes #8015.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9972)
<!-- Reviewable:end -->
2016-04-03 20:45:36 +05:30
Rizky Luthfianto
07584b9f29 Implement Document#elementsFromPoint 2016-04-03 21:44:01 +07:00
Emilio Cobos Álvarez
70229b1720 webgl: Add test for WebGL vertex attributes out of bounds. 2016-04-03 01:22:52 +02:00
Emilio Cobos Álvarez
ee8ecd9299 webgl: tests: Fix webgl triangle test
It was giving a ton of whitespace errors, and I don't know if it's due
to nodeValue or ANGLE...
2016-04-03 01:21:56 +02:00
Emilio Cobos Álvarez
6fcc03c965 webgl: Make the api return the context limits and use them for validations
This allows keeping the VertexAttrib* calls asynchronous.

Another option would be to do the validation in the apply() function,
but that'd require us passing an unnecessary channel around and add
extra synchronization.

The counterpart of this is that it has to be updated when the context
changes, but that's less problem.
2016-04-03 01:21:56 +02:00
bors-servo
8b32e63db8 Auto merge of #10215 - ConnorGBrewster:webgl_finish, r=emilio
WebGL: Finish, Flush, DetachShader, GenerateMipmap

Implements #10212 and #10213

r? @emilio

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10215)
<!-- Reviewable:end -->
2016-04-03 00:08:47 +05:30
Connor Brewster
3fd7634f54 webgl: finish, flush, detachShader, generateMipmap, Uniform1i 2016-04-02 12:31:47 -06:00
bors-servo
c0bfcc5155 Auto merge of #10350 - mbrubeck:selection-chars, r=SimonSapin
Fix some char/byte bugs in textinput

Fixes #9569. r? @SimonSapin or @Ms2ger

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10350)
<!-- Reviewable:end -->
2016-04-02 20:53:26 +05:30
Matt Brubeck
deca979967 TextInput::max_length should be in code units, not bytes 2016-04-02 07:33:53 -07:00