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

CSS: switch cr-hint from enum to bitmap #359

Merged
merged 3 commits into from
Jul 20, 2020

Conversation

poire-z
Copy link
Contributor

@poire-z poire-z commented Jul 19, 2020

(Upstream) lvstsheet: avoid compilation warnings
Fix some issue affecting upstream only, See #339 (comment)

Strut confinning: don't when there is no strut
Fix list item markers not showing in in-page footnotes (when -cr-hint: footnote-inpage strut-confined, allowed with next commit).

CSS: switch cr-hint from enum to bitmap
Allows specifying multiple hints on a same node. Might help with #355 if we allow glyph overflows by default, and want to get previous behaviour by specifying it via -cr-hint: (on all elements, on only some like tables).


This change is Reviewable

Just moved some stuff from .h to .cpp as it's only
used there.
Copy link
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

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

lgtm

// we have non-space-only text in the paragraph - standalone images
// possibly separated by spaces don't need to be reduced in size.
m_allow_strut_confinning = false;
bool has_non_space = false; // If we have non-empty text, we can do strut confinning
Copy link
Member

Choose a reason for hiding this comment

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

typo

// possibly separated by spaces don't need to be reduced in size.
// And only when we actually have a strut set (list item markers
// with "list-style-position: outside" don't have any set).
m_allow_strut_confinning = has_non_space && m_pbuffer->strut_height > 0;
Copy link
Member

Choose a reason for hiding this comment

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

Ah, purposeful typo because the rest of the code is already typod? :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah... and I remember at the time I googled it to see how it's written, with one n or two.
But now, some months later, the Google results are different ! :)

List item markers with "list-style-position: outside" don't
have any strut set: the arithmetic with a strut height of 0
could cause clipping issues with in-page footnotes.
This allows setting multiple hints on a same node
(i.e. "-cr-hint: footnote-inpage strut-confined").
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.

3 participants