-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Apply text-justify: none on lines #38054
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
base: main
Are you sure you want to change the base?
Conversation
EWS run on previous version of this PR (hash 06cd35a) |
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.
inter-character/inter-word need to be implemented to enable this
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.
I would like to make work in the text-justify: none in this pr, it is possible or is necessary implement the others?
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.
That's fine, but I wouldn't enable the preference in that case
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.
Ok, gonna set all for false again
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.
If put false, the test case will not work as text-justify is disabled, there is a way to enable for text-justify: none?
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.
The status of CSSTextJustifyEnabled
is testable
, which means tests should have it enabled by default
06cd35a
to
3c4175f
Compare
EWS run on previous version of this PR (hash 3c4175f)
|
https://bugs.webkit.org/show_bug.cgi?id=241304 Reviewed by NOBODY (OOPS!). Verify if text-justify is set to none, and do not compute justification on lines. * LayoutTests/fast/css3-text/css3-text-justify/text-justify-none-01-expected.txt: Added. * LayoutTests/fast/css3-text/css3-text-justify/text-justify-none-01.html: Added. * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: * Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp: (WebCore::Layout::LineBuilder::placeInlineAndFloatContent):
3c4175f
to
4fb2286
Compare
EWS run on current version of this PR (hash 4fb2286) |
@nt1m hey, is all right for this one? |
// the last line before a forced break or the end of the block is start-aligned. | ||
auto hasTextAlignJustify = (isLastInlineContent || m_line.runs().last().isLineBreak()) ? rootStyle.textAlignLast() == TextAlignLast::Justify : rootStyle.textAlign() == TextAlignMode::Justify; | ||
if (hasTextAlignJustify) { | ||
if (hasTextAlignJustify && rootStyle.textJustify() != TextJustify::None) { |
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.
according to the spec text-justify: none
sets the justification opportunities to 0 (https://drafts.csswg.org/css-text/#text-justify-property). does this mean ruby align is impacted too as it aligns the base content using the number of justification opportunities? (https://drafts.csswg.org/css-ruby/#ruby-align-property)
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.
for ruby align it should not apply ?
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.
@alanbaradlay in this case we should verify if ruby-align is present and not skip justify, do you think this approach would be ok ?
4fb2286
4fb2286