Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the width() function in border_for_style() #2288

Closed
pcwalton opened this issue May 1, 2014 · 2 comments
Closed

Remove the width() function in border_for_style() #2288

pcwalton opened this issue May 1, 2014 · 2 comments

Comments

@pcwalton
Copy link
Contributor

@pcwalton pcwalton commented May 1, 2014

It shouldn't be necessary but is currently necessary to work around an issue in selector matching.

@SimonSapin
Copy link
Member

@SimonSapin SimonSapin commented May 2, 2014

In #2174 I said just removing it should be enough, since src/components/style/properties.rs.mako already does something similar at computed-value time, but apparently there was a bug somewhere causing everything to have a 3px border. (At least on Acid2.)

@SimonSapin
Copy link
Member

@SimonSapin SimonSapin commented May 2, 2014

@pcwalton said in that review:

As I recall the problem here is that if the border was not set at all, then the initial value of 3px will kick in for the border width. Nothing kicks in to set it back to zero.

This reminds me of something where WeasyPrint makes the initial value of some properties (including border-*-width) go through the "specified to computed value" process. (Most properties can store their initial value directly in "computed" form.)

SimonSapin added a commit to SimonSapin/servo that referenced this issue May 6, 2014
Previously we processed them in forward order, latter dcelarations for
the same property overriding any earlier one, making the work of
converting the earlier ones to a computed value redundant.

Maintaining a bit field of "seen" properties will also help fixing
servo#2288.
SimonSapin added a commit to SimonSapin/servo that referenced this issue May 7, 2014
Previously we processed them in forward order, latter dcelarations for
the same property overriding any earlier one, making the work of
converting the earlier ones to a computed value redundant.

Maintaining a bit field of "seen" properties will also help fixing
servo#2288.
@SimonSapin SimonSapin closed this in e405f81 May 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.