Auto merge of #11554 - paulrouget:targetProperty, r=Ms2ger

Support link target attribute

<!-- 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 _____

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11554)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-06-02 07:07:19 -05:00
commit e7241c8215
4 changed files with 7 additions and 136 deletions

View file

@ -139,6 +139,12 @@ impl HTMLAnchorElementMethods for HTMLAnchorElement {
// https://html.spec.whatwg.org/multipage/#dom-a-shape
make_setter!(SetShape, "shape");
// https://html.spec.whatwg.org/multipage/#attr-hyperlink-target
make_getter!(Target, "target");
// https://html.spec.whatwg.org/multipage/#attr-hyperlink-target
make_setter!(SetTarget, "target");
// https://html.spec.whatwg.org/multipage/#dom-hyperlink-hash
fn Hash(&self) -> USVString {
// Step 1.

View file

@ -12,7 +12,7 @@
// https://html.spec.whatwg.org/multipage/#htmlanchorelement
interface HTMLAnchorElement : HTMLElement {
// attribute DOMString target;
attribute DOMString target;
// attribute DOMString download;
//[PutForwards=value] attribute DOMSettableTokenList ping;
// attribute DOMString rel;

View file

@ -1602,9 +1602,6 @@
[HTMLDListElement interface: attribute compact]
expected: FAIL
[HTMLAnchorElement interface: attribute target]
expected: FAIL
[HTMLAnchorElement interface: attribute download]
expected: FAIL
@ -1623,9 +1620,6 @@
[HTMLAnchorElement interface: attribute charset]
expected: FAIL
[HTMLAnchorElement interface: document.createElement("a") must inherit property "target" with the proper type (0)]
expected: FAIL
[HTMLAnchorElement interface: document.createElement("a") must inherit property "download" with the proper type (1)]
expected: FAIL

View file

@ -444,135 +444,6 @@
[a.tabIndex: IDL set to -2147483648 followed by getAttribute()]
expected: FAIL
[a.target: typeof IDL attribute]
expected: FAIL
[a.target: IDL get with DOM attribute unset]
expected: FAIL
[a.target: setAttribute() to "" followed by IDL get]
expected: FAIL
[a.target: setAttribute() to " \\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07 \\b\\t\\n\\v\\f\\r\\x0e\\x0f \\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17 \\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f foo " followed by IDL get]
expected: FAIL
[a.target: setAttribute() to undefined followed by IDL get]
expected: FAIL
[a.target: setAttribute() to 7 followed by IDL get]
expected: FAIL
[a.target: setAttribute() to 1.5 followed by IDL get]
expected: FAIL
[a.target: setAttribute() to true followed by IDL get]
expected: FAIL
[a.target: setAttribute() to false followed by IDL get]
expected: FAIL
[a.target: setAttribute() to object "[object Object\]" followed by IDL get]
expected: FAIL
[a.target: setAttribute() to NaN followed by IDL get]
expected: FAIL
[a.target: setAttribute() to Infinity followed by IDL get]
expected: FAIL
[a.target: setAttribute() to -Infinity followed by IDL get]
expected: FAIL
[a.target: setAttribute() to "\\0" followed by IDL get]
expected: FAIL
[a.target: setAttribute() to null followed by IDL get]
expected: FAIL
[a.target: setAttribute() to object "test-toString" followed by IDL get]
expected: FAIL
[a.target: setAttribute() to object "test-valueOf" followed by IDL get]
expected: FAIL
[a.target: IDL set to "" followed by getAttribute()]
expected: FAIL
[a.target: IDL set to " \\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07 \\b\\t\\n\\v\\f\\r\\x0e\\x0f \\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17 \\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f foo " followed by getAttribute()]
expected: FAIL
[a.target: IDL set to undefined followed by getAttribute()]
expected: FAIL
[a.target: IDL set to undefined followed by IDL get]
expected: FAIL
[a.target: IDL set to 7 followed by getAttribute()]
expected: FAIL
[a.target: IDL set to 7 followed by IDL get]
expected: FAIL
[a.target: IDL set to 1.5 followed by getAttribute()]
expected: FAIL
[a.target: IDL set to 1.5 followed by IDL get]
expected: FAIL
[a.target: IDL set to true followed by getAttribute()]
expected: FAIL
[a.target: IDL set to true followed by IDL get]
expected: FAIL
[a.target: IDL set to false followed by getAttribute()]
expected: FAIL
[a.target: IDL set to false followed by IDL get]
expected: FAIL
[a.target: IDL set to object "[object Object\]" followed by getAttribute()]
expected: FAIL
[a.target: IDL set to object "[object Object\]" followed by IDL get]
expected: FAIL
[a.target: IDL set to NaN followed by getAttribute()]
expected: FAIL
[a.target: IDL set to NaN followed by IDL get]
expected: FAIL
[a.target: IDL set to Infinity followed by getAttribute()]
expected: FAIL
[a.target: IDL set to Infinity followed by IDL get]
expected: FAIL
[a.target: IDL set to -Infinity followed by getAttribute()]
expected: FAIL
[a.target: IDL set to -Infinity followed by IDL get]
expected: FAIL
[a.target: IDL set to "\\0" followed by getAttribute()]
expected: FAIL
[a.target: IDL set to null followed by getAttribute()]
expected: FAIL
[a.target: IDL set to null followed by IDL get]
expected: FAIL
[a.target: IDL set to object "test-toString" followed by getAttribute()]
expected: FAIL
[a.target: IDL set to object "test-toString" followed by IDL get]
expected: FAIL
[a.target: IDL set to object "test-valueOf" followed by IDL get]
expected: FAIL
[a.download: typeof IDL attribute]
expected: FAIL