Skip to content

Fix #10532 - #10553

Closed
iamajoe wants to merge 18 commits into
servo:masterfrom
iamajoe:master
Closed

iamajoe wants to merge 18 commits into
servo:masterfrom
iamajoe:master

Conversation

@iamajoe

@iamajoe iamajoe commented Apr 12, 2016

Copy link
Copy Markdown

This change is Reviewable

@highfive

Copy link
Copy Markdown

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @pcwalton (or someone else) soon.

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Apr 12, 2016
@pcwalton

Copy link
Copy Markdown
Contributor

Where does that line height value come from?

@iamajoe

iamajoe commented Apr 12, 2016

Copy link
Copy Markdown
Author

Comparison with Firefox. Photoshop to check if everything is as supposed.

Comment thread resources/servo.css
input { background: white; min-height: 1.0em; padding: 0em; padding-left: 0.25em; padding-right: 0.25em; border: solid lightgrey 1px; color: black; white-space: nowrap; text-align: left; }
textarea { background: white; min-height: 1.0em; padding: 0em; padding-left: 0.25em; padding-right: 0.25em; border: solid lightgrey 1px; color: black; white-space: pre; }
input { background: white; min-height: 1.0em; padding: 0em; padding-left: 0.25em; padding-right: 0.25em; border: solid lightgrey 1px; color: black; font-family: sans-serif; font-size: 0.7em; white-space: nowrap; text-align: left; line-height: 1.8; }
textarea { background: white; min-height: 1.0em; padding: 0em; padding-left: 0.25em; padding-right: 0.25em; border: solid lightgrey 1px; color: black; font-family: sans-serif; font-size: 0.7em; white-space: pre; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't we try to split these properties onto multiple lines? It's awfully hard to meaningfully see the changes in the diff when the style is structured like that.

(I know it was the existing structure; I am just suggesting that we should clean it up. 😄)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I totally agree. I also find it weird to work with these.
Also... This file will definitely grow so, besides an import system we should maybe start commenting with sections? For example /* Form */.

@pcwalton

Copy link
Copy Markdown
Contributor

Can you file a follow-up bug to get this added to the spec? https://html.spec.whatwg.org/multipage/rendering.html#form-controls

Once that's done, I'm fine with this patch.

@aethanyc

Copy link
Copy Markdown
Contributor

Firefox use line-height: normal in forms.css.

Do we need a reftest to check these two pages are the same? These two look the same on Firefox. I'm not sure this is in the scope of this bug because even if we set the line-height of the input element, the line containing the input still have the height from the parent.

<div style="line-height: 100px;">
  <input placeholder="foobar">
</div>
<div>
  <input placeholder="foobar">
</div>

@iamajoe

iamajoe commented Apr 13, 2016

Copy link
Copy Markdown
Author

@aethanyc Yes I noticed that line-height: normal in the firefox code before. The problem is that if I set with normal it won't get the right size. Setting line-height as I did, reseted to the right size but... maybe there is other way to set the default on servo so we could use that normal?

@pcwalton What would you want me to write? I'm not used to write these things :P New to contributing but want to keep on doing it!

@paulrouget

Copy link
Copy Markdown
Contributor

(just a unrelated note: please don't name your PR "Fix #xxxx". It makes it a bit difficult to triage PRs and go through github notifications. And thank you for the PR ^^)

@iamajoe

iamajoe commented Apr 13, 2016

Copy link
Copy Markdown
Author

@paulrouget Sure. How would you prefer me to name the PR? So that next time I've that in attention?

@aethanyc

Copy link
Copy Markdown
Contributor

@Sendoushi I'm new to servo, too. Let's wait servo experts to answer your question.

@KiChjang

Copy link
Copy Markdown
Contributor

@Sendoushi It'd be nice if you can have a descriptive title of what the PR is about. Coincidentally, your commit message for this PR is good enough as a PR title.

@jdm

jdm commented Apr 13, 2016

Copy link
Copy Markdown
Member

@perlun

perlun commented Apr 13, 2016

Copy link
Copy Markdown
Contributor

@jdm, @pcwalton - I think @Sendoushi would need some help here in what to write in the whatwg issue. Could either one of you (who know what to write 😄) report the issue there and refer back to this PR?

@iamajoe

iamajoe commented Apr 13, 2016

Copy link
Copy Markdown
Author

Yes please. I have no idea on the next steps...

@jdm

jdm commented Apr 13, 2016

Copy link
Copy Markdown
Member

I have filed whatwg/html#1046 as requested.

@pcwalton

Copy link
Copy Markdown
Contributor

Given that upstream spec states that this could reasonably be covered under the magic "binding" property, I think it's safe to say the spec allows us to do this today, so r=me.

@pcwalton

Copy link
Copy Markdown
Contributor

Oh wait... r=me with a reftest added.

@Ms2ger

Ms2ger commented Apr 14, 2016

Copy link
Copy Markdown
Contributor

(The spec problem is not so much "are we allowed to this" but "should we be required to do this")

@jdm jdm added S-needs-tests New tests have been requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Apr 14, 2016
@iamajoe

iamajoe commented Apr 16, 2016

Copy link
Copy Markdown
Author

Here is the reftest: #10648 is it ok?

jdm and others added 5 commits April 22, 2016 13:01
This is a new attempt of servo#10586, after Simon Sapin's great cleanups in servo#10749 has landed. I have adjusted the changes to the new structure that was introduced, and also only done a few of the longhand ones. Will certainly continue on this as soon as we have a basic agreement that this style is reasonable.
They're not stable enough right now, with no expectation of improvement
any time soon.
@iamajoe

iamajoe commented Apr 22, 2016

Copy link
Copy Markdown
Author

@notriddle checked that but it is hard to spot my commits now.
Tried that @perlun now it is even worse :s

@perlun

perlun commented Apr 22, 2016

Copy link
Copy Markdown
Contributor

What does git remote -v show? I think the problem may be that origin isn't the servo remote in this case, but your local fork, so you didn't rebase on top of what I expected.

Also, git rebase -i origin/master may be an idea where you can explicitly remove the lines for the commits that you don't want to include in the feature branch. Give it a try and see if you can make it work.

@iamajoe

iamajoe commented Apr 22, 2016

Copy link
Copy Markdown
Author

@perlun yes, servo remote is "upstream". I tried -i but the problem with that is that i already have a lot of commits which aren't my own and it is pretty hard for me to go through each commit. I guess at this point I should just re-fork and re-do the whole thing.

@perlun

perlun commented Apr 22, 2016

Copy link
Copy Markdown
Contributor

Try 'git rebase upstream/master' and then force push. Should do the trick, no?

@iamajoe

iamajoe commented Apr 22, 2016

Copy link
Copy Markdown
Author

That makes sense. Pulled upstream/master (everything up to date), rebase upstream/master it and conflict errors on test-helpers.sub.js and MANIFEST.json

@KiChjang

Copy link
Copy Markdown
Contributor

Something is horribly wrong, not only do I see multiple commits, I see commits that are not from the PR author.

@perlun

perlun commented Apr 22, 2016

Copy link
Copy Markdown
Contributor

Weird. I'll see if I can sort it out.

@perlun

perlun commented Apr 22, 2016 •

Copy link
Copy Markdown
Contributor

@Sendoushi - I think I got the branch fixed. The steps I took:

  1. Added your repo as a remote in my own working copy: git remote add sendoushi https://github.com/Sendoushi/servo.git
  2. Fetched from all remotes, to ensure I had your changes and also the latest changes from servo upstream (the remote named origin in my case).
  3. Checked out your branch and gave it a sensible name: git checkout -b sendoushi-master sendoushi/master
  4. Interactively rebased, to see the list of commits: git rebase -i origin/master. Gave me this output and no other commits:
pick 4cd043e [fix] Input line height and styling
pick db9244d [new] Input line height ref test
pick eff4835 [fix] Test for input in manifest
pick 27eea7b Improve properties.mako.rs file structure, take 2

The last one is a change I've made; I don't know how it made its way there. 😄 It's already merged into servo upstream, but I kept the line anyway and let the rebase start.

I got an error when it attempted to apply that commit; it wouldn't apply cleanly. Since I knew it's already merged and doesn't belong to your branch anyway, I decided to skip it and let the rebase continue: git rebase --skip

The rebase was successfully completed. I pushed the result to my own fork: git push perlun sendoushi-master

And then I created the PR. Since I rebased your commits, they still have you as the author and you should get the credit you (rightfully) deserve.

Hope this helped! 😄

@jdm

jdm commented Apr 22, 2016

Copy link
Copy Markdown
Member

Closing in favour of #10809. Thanks @perlun!

@jdm jdm closed this Apr 22, 2016
@iamajoe

iamajoe commented Apr 22, 2016

Copy link
Copy Markdown
Author

@perlun it helped :) rebase is still a mysterious wizardry for me

@perlun

perlun commented Apr 22, 2016

Copy link
Copy Markdown
Contributor

@Sendoushi - it's one of the hardest parts of git perhaps, but don't be afraid: you can learn it as well. I happen to use it more or less every day in my work so I'm very used to the workflow.

(Think of rebase as "replay the commits from my current branch on top of some other commit than the commit I branched out from. Problems can occur if you rebase on top of the wrong commit etc, but once you learn it, it's one of the things with git that you tend to like the most.)

bors-servo pushed a commit that referenced this pull request Apr 23, 2016
Fixed line-height for input and textarea + use correct font

Fixes #10532.

Replaces #10553 since @Sendoushi had problems getting a proper rebase locally, so helping him out to get this merged.

(Credits to Sendoushi who did the actual changes; I'm just helping out to getting things into a mergeable state.)

<!-- 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/10809)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this pull request Apr 29, 2016
Fixed line-height for input and textarea + use correct font

Fixes #10532.

Replaces #10553 since @Sendoushi had problems getting a proper rebase locally, so helping him out to get this merged.

(Credits to Sendoushi who did the actual changes; I'm just helping out to getting things into a mergeable state.)

<!-- 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/10809)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this pull request Apr 29, 2016
Fixed line-height for input and textarea + use correct font

Fixes #10532.

Replaces #10553 since @Sendoushi had problems getting a proper rebase locally, so helping him out to get this merged.

(Credits to Sendoushi who did the actual changes; I'm just helping out to getting things into a mergeable state.)

<!-- 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/10809)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this pull request Apr 30, 2016
Fixed line-height for input and textarea + use correct font

Fixes #10532.

Replaces #10553 since @Sendoushi had problems getting a proper rebase locally, so helping him out to get this merged.

(Credits to Sendoushi who did the actual changes; I'm just helping out to getting things into a mergeable state.)

<!-- 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/10809)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this pull request Apr 30, 2016
Fixed line-height for input and textarea + use correct font

Fixes #10532.

Replaces #10553 since @Sendoushi had problems getting a proper rebase locally, so helping him out to get this merged.

(Credits to Sendoushi who did the actual changes; I'm just helping out to getting things into a mergeable state.)

<!-- 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/10809)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this pull request Apr 30, 2016
Fixed line-height for input and textarea + use correct font

Fixes #10532.

Replaces #10553 since @Sendoushi had problems getting a proper rebase locally, so helping him out to get this merged.

(Credits to Sendoushi who did the actual changes; I'm just helping out to getting things into a mergeable state.)

<!-- 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/10809)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this pull request May 1, 2016
Fixed line-height for input and textarea + use correct font

Fixes #10532.

Replaces #10553 since @Sendoushi had problems getting a proper rebase locally, so helping him out to get this merged.

(Credits to Sendoushi who did the actual changes; I'm just helping out to getting things into a mergeable state.)

<!-- 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/10809)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this pull request May 1, 2016
Fixed line-height for input and textarea + use correct font

Fixes #10532.

Replaces #10553 since @Sendoushi had problems getting a proper rebase locally, so helping him out to get this merged.

(Credits to Sendoushi who did the actual changes; I'm just helping out to getting things into a mergeable state.)

<!-- 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/10809)
<!-- Reviewable:end -->
perlun added a commit to perlun/servo that referenced this pull request May 14, 2016
As discussed in servo#10553, we should consider splitting the long lines in this file onto separate lines (one per css attribute), to make it more readable and maintainable in general.

I also added blank lines where I felt it was applicable.
@perlun perlun mentioned this pull request May 14, 2016
3 tasks done
bors-servo pushed a commit that referenced this pull request May 15, 2016
Reformatted servo.css

- [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 it doesn't introduce new functionality.

----

As discussed in #10553, we should consider splitting the long lines in this file onto separate lines (one per css attribute), to make it more readable and maintainable in general.

I also added blank lines where I felt it was applicable.

<!-- 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/11186)
<!-- Reviewable:end -->
zakorgy pushed a commit to zakorgy/servo that referenced this pull request May 26, 2016
As discussed in servo#10553, we should consider splitting the long lines in this file onto separate lines (one per css attribute), to make it more readable and maintainable in general.

I also added blank lines where I felt it was applicable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed. S-needs-tests New tests have been requested by a reviewer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.