-
Notifications
You must be signed in to change notification settings - Fork 2
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
Don't apply linePadding to line areas with zero background area #17
base: smp-master
Are you sure you want to change the base?
Conversation
Fixes the linePadding3 render to be the same as before, whether that is right or wrong!
Fixes typo.
Fixes an issue where linePadding sometimes didn't appear on one side or the other, and reduces the test differences still further.
It is needed to correctly inset when linePadding is applied.
src/main/js/html.js
Outdated
if (se === ee) { | ||
|
||
// Check to see if there's any background at all | ||
elementBoundingRect = se.node.getBoundingClientRect(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work – elementBoundingRect doesn't have a var – but it's like this upstream, so I don't know how this fixes anything, unless the exception fixing it by stopping it going further when se === ee
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, might be my bad habit of not declaring the var. It's been a while but I'm pretty sure this code fixed a test case at some point.
The intent of the code is to avoid adding line padding background in the inline direction to a line that contains no content, and therefore has no background area to extend. It checks for either width = 0 or height = 0 rather than jumping through other hoops trying to work out the writing direction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in e671704.
Fixes the linePadding3 render to be the same as before, whether that is right or wrong!
This PR results from the discussion following sandflow#216 (comment)