Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement Named constructors and the Image constructor for HTMLImageElement #6110
Conversation
highfive
commented
May 18, 2015
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @metajack (or someone else) soon. |
|
The https://html.spec.whatwg.org/multipage/embedded-content.html#attr-dim-width There still may be a mistake here though, we should look closely. |
|
Scratch that, our implementation is correct. https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-width That's what I get for clicking the wrong link and not noticing that |
|
r? @Ms2ger |
|
Remember to close #2540 along the way |
hoppipolla-critic-bot
commented
May 19, 2015
|
Critic review: https://critic.hoppipolla.co.uk/r/5049 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
|
Reviewed on critic |
|
I'm not sure about the test I added. Is it comprehensive enough? I'm not really sure what else I could add to it. |
|
|
|
It looks like one of the lines is beyond 120 characters |
|
Sorry I've been dragging my feet. I've added more comments on critic. |
|
|
|
Please rebase on master. |
|
I rebased it, but I haven't addressed the review comments yet. |
|
That should resolve all the comments now. If it's good now I'll squash it into two commits. One for NamedConstructor support and one for adding the named constructor to Image |
|
+S-needs-code-changes Reviewed 1 of 2 files at r2, 3 of 5 files at r7, 1 of 2 files at r8, 1 of 1 files at r9. components/script/dom/bindings/utils.rs, line 203 [r9] (raw file): components/script/dom/bindings/utils.rs, line 218 [r9] (raw file): components/script/dom/bindings/utils.rs, line 228 [r9] (raw file): if (!JS_DefineProperty(cx, namedConstructor, "prototype",
proto,
JSPROP_PERMANENT | JSPROP_READONLY,
JS_STUBGETTER, JS_STUBSETTER)) {
return nullptr;
}components/script/dom/bindings/utils.rs, line 274 [r9] (raw file): components/script/dom/htmlimageelement.rs, line 13 [r9] (raw file): tests/wpt/metadata/html/dom/interfaces.html.ini, line 9024 [r9] (raw file): Comments from the review on Reviewable.io |
|
Review status: 6 of 7 files reviewed at latest revision, 5 unresolved discussions, all commit checks successful. tests/wpt/metadata/html/dom/interfaces.html.ini, line 9024 [r9] (raw file): Comments from the review on Reviewable.io |
|
Reviewed 4 of 4 files at r10, 1 of 1 files at r11. components/script/dom/bindings/codegen/CodegenRust.py, line 4565 [r11] (raw file): Comments from the review on Reviewable.io |
|
-S-awaiting-review +S-needs-code-changes Review status: all files reviewed at latest revision, 6 unresolved discussions, all commit checks successful. Comments from the review on Reviewable.io |
|
-S-awaiting-review +S-needs-squash \o/ Reviewed 1 of 1 files at r12. Comments from the review on Reviewable.io |
|
@bors-servo: r+ |
|
|
Implement Named constructors and the Image constructor for HTMLImageElement I'm not sure if I like how I mostly just duplicated the code in CodegenRust.py, so that might need to be refactored. Instead of just calling it Image, we might want to call it ConstructorImage, to make it clear that it's a constructor. Anyone have an opinion on that? There seems to be a bug in the HTMLImageElement getter/setter as the value is 0 regardless of what I do. This seems to be unrelated to my commits, so I'll investigate that separately. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6110) <!-- Reviewable:end -->
klusark commentedMay 18, 2015
I'm not sure if I like how I mostly just duplicated the code in CodegenRust.py, so that might need to be refactored.
Instead of just calling it Image, we might want to call it ConstructorImage, to make it clear that it's a constructor. Anyone have an opinion on that?
There seems to be a bug in the HTMLImageElement getter/setter as the value is 0 regardless of what I do. This seems to be unrelated to my commits, so I'll investigate that separately.