Skip to content

Include <button type=submit> data whilst constructing the form dataset - #11333

Merged
bors-servo merged 2 commits into
servo:masterfrom
Manishearth:submit-submit-button
May 23, 2016
Merged

bors-servo merged 2 commits into
servo:masterfrom
Manishearth:submit-submit-button

Conversation

@Manishearth

@Manishearth Manishearth commented May 23, 2016 •

Copy link
Copy Markdown
Member

This makes it possible to close things in github (see
Manishearth/mitochondria#1)

  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors

Either:

  • There are tests for these changes OR
  • These changes do not require tests because _____

This change is Reviewable

@highfive

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/dom/htmlformelement.rs, components/script/dom/htmlinputelement.rs, components/script/dom/htmlbuttonelement.rs

@highfive

Copy link
Copy Markdown

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label May 23, 2016
@Manishearth

Copy link
Copy Markdown
Member Author

r? @nox

@highfive highfive assigned nox and unassigned mbrubeck May 23, 2016
@Manishearth Manishearth mentioned this pull request May 23, 2016
24 of 25 tasks
if name == "" {
// unspecced, however all the browsers do it
// and it could break urlencoded parsing if
// there are random equal signs floating around

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will file a spec bug on this in a while

@Manishearth

Copy link
Copy Markdown
Member Author

@bors try

@Manishearth
Manishearth force-pushed the submit-submit-button branch from 15703f2 to aaa85de Compare May 23, 2016 06:26
@highfive

Copy link
Copy Markdown

New code was committed to pull request.

@Manishearth

Copy link
Copy Markdown
Member Author

@bors-servo try

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit aaa85de with merge b74cb98...

bors-servo pushed a commit that referenced this pull request May 23, 2016
Include <button type=submit> data whilst constructing the form dataset

This makes it possible to close things in github (see
Manishearth/mitochondria#1)

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

Either:
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

Don't merge yet, I need to handle tests and work out a possible spec bug
regarding no-name form elements

<!-- 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/11333)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows

@Manishearth
Manishearth force-pushed the submit-submit-button branch from aaa85de to 2cd9564 Compare May 23, 2016 09:21
@highfive

Copy link
Copy Markdown

New code was committed to pull request.

@nox

nox commented May 23, 2016

Copy link
Copy Markdown
Contributor

Thanks for your contribution, just some nits to address.

-S-awaiting-review +S-needs-code-changes

Previously, highfive wrote…

New code was committed to pull request.


Reviewed 3 of 3 files at r1, 1 of 1 files at r2, 1 of 1 files at r3.
Review status: all files reviewed at latest revision, 5 unresolved discussions.


components/script/dom/htmlbuttonelement.rs, line 145 [r1] (raw file):

    /// Steps range from 3.1 to 3.7 (specific to HTMLButtonElement)
    pub fn form_datum(&self, submitter: Option<FormSubmitter>) -> Option<FormDatum> {
        // 3.1: disabled state check is in get_unclean_dataset

Nit: "Step 3.1"


components/script/dom/htmlbuttonelement.rs, line 147 [r1] (raw file):

        // 3.1: disabled state check is in get_unclean_dataset

        // 3.1: only run steps if this is the submitter

Nit: "Step 3.1"


components/script/dom/htmlbuttonelement.rs, line 160 [r1] (raw file):

        let name = self.Name();

        if name == "" {

Nit: name.is_empty().


components/script/dom/htmlbuttonelement.rs, line 167 [r1] (raw file):

        }

        // Step 3.6

AFAICT, this is step 3.9. not 3.6..


components/script/dom/htmlbuttonelement.rs, line 161 [r3] (raw file):

        if name == "" {
            // 3.1: Must have a name

Nit: "Step 3.1"


Comments from Reviewable

@nox nox added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels May 23, 2016
@Manishearth
Manishearth force-pushed the submit-submit-button branch from 2cd9564 to 102cdaa Compare May 23, 2016 09:42
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels May 23, 2016
@highfive

Copy link
Copy Markdown

New code was committed to pull request.

@highfive

Copy link
Copy Markdown

New code was committed to pull request.

@nox

nox commented May 23, 2016

Copy link
Copy Markdown
Contributor

@bors-servo r+

Previously, highfive wrote…

New code was committed to pull request.


Reviewed 2 of 2 files at r4, 1 of 1 files at r5.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 90d72c5 has been approved by nox

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels May 23, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 90d72c5 with merge de79f96...

bors-servo pushed a commit that referenced this pull request May 23, 2016
Include <button type=submit> data whilst constructing the form dataset

This makes it possible to close things in github (see
Manishearth/mitochondria#1)

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

Either:
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/11333)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows

@bors-servo
bors-servo merged commit 90d72c5 into servo:master May 23, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label May 23, 2016
@Manishearth
Manishearth deleted the submit-submit-button branch May 7, 2019 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants