New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 18 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature

Blocked on:
issue 250762
issue 467406



Sign in to add a comment
link

Issue 248894: Implement CSS3 text-justify property

Reported by dwim....@gmail.com, Jun 12 2013 Project Member

Issue description

I want to implement a new CSS3 property which name is "text-justify".
The specification link is here : http://www.w3.org/TR/css3-text/#text-justify

This property selects the justification method used when a line's alignment is set to ‘justify’ (see ‘text-align’), primarily by controlling which scripts' characters are adjusted together or separately. 
This feature is already properly supported on IE, currently.
 

Comment 1 by dwim....@gmail.com, Jun 17 2013

Blockedon: chromium:250762

Comment 2 by dw...@samsung.com, Oct 28 2013

Status: Started
Parsing part is done.
I will start to implement rendering part.

Comment 3 by dw...@samsung.com, Oct 28 2013

Owner: dw...@samsung.com

Comment 4 by dw...@samsung.com, Oct 28 2013

Cc: jchaffraix@chromium.org
text-justify can have 4 kinds of value.

For 3 of them, I think I don't need to implement something.
Just checking & setting would be enough.

Only for 'distribute', I need to implement some algorithm to treat the value.

So, I'm planning to implement 2 seperate patches, one for the 3 values, and one for 'distribute'.

Comment 6 by bugdroid1@chromium.org, Jan 16 2014

Project Member
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=165189

------------------------------------------------------------------------
r165189 | chrome-bot@google.com | 2014-01-16T04:05:10.061652Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/fonts/mac/ComplexTextController.h?r1=165189&r2=165188&pathrev=165189
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/rendering/RenderBlockLineLayout.cpp?r1=165189&r2=165188&pathrev=165189
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/fonts/WidthIterator.cpp?r1=165189&r2=165188&pathrev=165189
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/linux/fast/css3-text/css3-text-justify/text-justify-8bits-expected.txt?r1=165189&r2=165188&pathrev=165189
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css3-text/css3-text-justify/text-justify-8bits.html?r1=165189&r2=165188&pathrev=165189
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/fonts/WidthIterator.h?r1=165189&r2=165188&pathrev=165189
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/linux/fast/css3-text/css3-text-justify/text-justify-8bits-expected.png?r1=165189&r2=165188&pathrev=165189
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css3-text/css3-text-justify/resources/text-justify.css?r1=165189&r2=165188&pathrev=165189
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/text/TextRun.cpp?r1=165189&r2=165188&pathrev=165189
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/fonts/Font.cpp?r1=165189&r2=165188&pathrev=165189
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/linux/fast/css3-text/css3-text-justify?r1=165189&r2=165188&pathrev=165189
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations?r1=165189&r2=165188&pathrev=165189
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/text/TextRun.h?r1=165189&r2=165188&pathrev=165189
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/fonts/Font.h?r1=165189&r2=165188&pathrev=165189
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/fonts/mac/ComplexTextController.cpp?r1=165189&r2=165188&pathrev=165189
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/rendering/InlineTextBox.cpp?r1=165189&r2=165188&pathrev=165189

Rendering text-justify:distribute for 8 bit characters.

text-justify:distribute provides the ability to justify a line as inter-character level.
This patch takes care of only 8 bit characters.

BUG=248894

Review URL: https://codereview.chromium.org/54743004
------------------------------------------------------------------------

Comment 7 by bugdroid1@chromium.org, Jan 16 2014

Project Member
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=165202

------------------------------------------------------------------------
r165202 | ojan@chromium.org | 2014-01-16T06:57:50.177551Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win/fast/css3-text/css3-text-justify?r1=165202&r2=165201&pathrev=165202
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations?r1=165202&r2=165201&pathrev=165202
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/mac/fast/css3-text/css3-text-justify?r1=165202&r2=165201&pathrev=165202
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win/fast/css3-text/css3-text-justify/text-justify-8bits-expected.txt?r1=165202&r2=165201&pathrev=165202
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/linux/fast/css3-text/css3-text-justify/text-justify-8bits-expected.txt?r1=165202&r2=165201&pathrev=165202
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/mac/fast/css3-text/css3-text-justify/text-justify-8bits-expected.txt?r1=165202&r2=165201&pathrev=165202
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win/fast/css3-text/css3-text-justify/text-justify-8bits-expected.png?r1=165202&r2=165201&pathrev=165202
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/mac/fast/css3-text/css3-text-justify/text-justify-8bits-expected.png?r1=165202&r2=165201&pathrev=165202

Auto-rebaseline for r165189

http://src.chromium.org/viewvc/blink?view=revision&revision=165189

BUG=248894
TBR=dw.im@samsung.com

Review URL: https://codereview.chromium.org/140633002
------------------------------------------------------------------------

Comment 8 by bugdroid1@chromium.org, Jan 24 2014

Project Member
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=165707

------------------------------------------------------------------------
r165707 | inferno@chromium.org | 2014-01-24T06:46:39.577036Z

Changed paths:
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css3-text/css3-text-justify/text-justify-8bits.html?r1=165707&r2=165706&pathrev=165707
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/fonts/WidthIterator.h?r1=165707&r2=165706&pathrev=165707
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/fonts/mac/ComplexTextController.cpp?r1=165707&r2=165706&pathrev=165707
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css3-text/css3-text-justify/resources/text-justify.css?r1=165707&r2=165706&pathrev=165707
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/rendering/InlineTextBox.cpp?r1=165707&r2=165706&pathrev=165707
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/text/TextRun.cpp?r1=165707&r2=165706&pathrev=165707
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/fonts/mac/ComplexTextController.h?r1=165707&r2=165706&pathrev=165707
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/fonts/Font.cpp?r1=165707&r2=165706&pathrev=165707
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/linux/fast/css3-text/css3-text-justify?r1=165707&r2=165706&pathrev=165707
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/rendering/RenderBlockLineLayout.cpp?r1=165707&r2=165706&pathrev=165707
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/fonts/WidthIterator.cpp?r1=165707&r2=165706&pathrev=165707
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/text/TextRun.h?r1=165707&r2=165706&pathrev=165707
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/fonts/Font.h?r1=165707&r2=165706&pathrev=165707

Revert 165189 "Rendering text-justify:distribute for 8 bit chara..."

Cause memory corruption bugs on ClusterFuzz.

> Rendering text-justify:distribute for 8 bit characters.
> 
> text-justify:distribute provides the ability to justify a line as inter-character level.
> This patch takes care of only 8 bit characters.
> 
> BUG=248894
> 
> Review URL: https://codereview.chromium.org/54743004

TBR=dw.im@samsung.com

Review URL: https://codereview.chromium.org/146503002
------------------------------------------------------------------------

Comment 9 by kojii@chromium.org, Nov 27 2014

Talked with dwim, I'll be looking into this while he's busy.

Comment 10 by bugdroid1@chromium.org, Nov 27 2014

Project Member
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=186099

------------------------------------------------------------------
r186099 | dw.im@samsung.com | 2014-11-27T09:38:23.813317Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/linux/fast/css3-text/css3-text-justify?r1=186099&r2=186098&pathrev=186099
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations?r1=186099&r2=186098&pathrev=186099
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/rendering/RenderBlockLineLayout.cpp?r1=186099&r2=186098&pathrev=186099
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/text/TextRun.h?r1=186099&r2=186098&pathrev=186099
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/linux/fast/css3-text/css3-text-justify/text-justify-8bits-expected.txt?r1=186099&r2=186098&pathrev=186099
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/rendering/style/RenderStyleConstants.h?r1=186099&r2=186098&pathrev=186099
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/fonts/Character.cpp?r1=186099&r2=186098&pathrev=186099
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css3-text/css3-text-justify/text-justify-8bits.html?r1=186099&r2=186098&pathrev=186099
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/linux/fast/css3-text/css3-text-justify/text-justify-8bits-expected.png?r1=186099&r2=186098&pathrev=186099
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/fonts/Character.h?r1=186099&r2=186098&pathrev=186099
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css3-text/css3-text-justify/resources/text-justify.css?r1=186099&r2=186098&pathrev=186099
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/rendering/InlineTextBox.cpp?r1=186099&r2=186098&pathrev=186099
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/css/CSSPrimitiveValueMappings.h?r1=186099&r2=186098&pathrev=186099
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/fonts/shaping/SimpleShaper.cpp?r1=186099&r2=186098&pathrev=186099

Rendering text-justify:distribute for 8 bit characters.

text-justify:distribute provides the ability to justify a line as inter-character level.
This patch takes care of only 8 bit characters.

BUG=248894

Review URL: https://codereview.chromium.org/255323004
-----------------------------------------------------------------

Comment 11 by bugdroid1@chromium.org, Nov 27 2014

Project Member
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=186111

------------------------------------------------------------------
r186111 | wangxianzhu@chromium.org | 2014-11-27T11:50:28.231057Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win/fast/css3-text/css3-text-justify/text-justify-8bits-expected.png?r1=186111&r2=186110&pathrev=186111
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win-xp/fast/css3-text/css3-text-justify/text-justify-8bits-expected.txt?r1=186111&r2=186110&pathrev=186111
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/mac/fast/css3-text/css3-text-justify/text-justify-8bits-expected.png?r1=186111&r2=186110&pathrev=186111
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win-xp/fast/css3-text/css3-text-justify/text-justify-8bits-expected.png?r1=186111&r2=186110&pathrev=186111
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations?r1=186111&r2=186110&pathrev=186111
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win/fast/css3-text/css3-text-justify/text-justify-8bits-expected.txt?r1=186111&r2=186110&pathrev=186111
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win-xp/fast/css3-text/css3-text-justify?r1=186111&r2=186110&pathrev=186111
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/mac/fast/css3-text/css3-text-justify/text-justify-8bits-expected.txt?r1=186111&r2=186110&pathrev=186111

Auto-rebaseline for r186099

http://src.chromium.org/viewvc/blink?view=revision&revision=186099

BUG=248894
TBR=dw.im@samsung.com

Review URL: https://codereview.chromium.org/742363003
-----------------------------------------------------------------

Comment 12 by kojii@chromium.org, Dec 2 2014

Chinese/Japanese support WIP: https://codereview.chromium.org/766053004/

Comment 13 by bugdroid1@chromium.org, Dec 15 2014

Project Member
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=187112

------------------------------------------------------------------
r187112 | kojii@chromium.org | 2014-12-15T04:00:01.930822Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/text/justify-ideograph-expected.html?r1=187112&r2=187111&pathrev=187112
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/text/justify-ideograph.html?r1=187112&r2=187111&pathrev=187112
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/fonts/shaping/SimpleShaper.cpp?r1=187112&r2=187111&pathrev=187112
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/text/justify-ideograph-leading-expansion.html?r1=187112&r2=187111&pathrev=187112
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations?r1=187112&r2=187111&pathrev=187112
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/fonts/Character.cpp?r1=187112&r2=187111&pathrev=187112

text-justify has been broken for Chinese and Japanese. This patch fixes this
to the same behavior of WebKit.

There are 3 code path to justify; LChar+SimpleShaper, UChar+SimplerShaper,
and UChar+HarfbuzzShaper. This patch fixes UChar and SimpleShaper code
path. Chinese and Japanese justification always occur at UChar (not LChar),
and SimpleShaper is used most of the time for these scripts. I'll work on
complex path later in another patch.

Tests imported from WebKit were rebaselined to incorrect results at some
point. I rebaselined all such tests by looking at them and by comparing the
results with WebKit. Also one ref test was added.

Note that Chinese/Japanese justification had been disabled under the switch
|canExpandAroundIdeographsInComplexText| for Blink except on Mac, and
then it was removed because it's off in
https://codereview.chromium.org/618383003.

What this patch means in that context is to fix SimpleShaper to support the
switch and turn it back always, as long as text-justify: auto, which is the same
as WebKit behavior.

BUG=248894,  368108 
TEST=fast/text/justify-ideograph.html

Review URL: https://codereview.chromium.org/766053004
-----------------------------------------------------------------

Comment 14 by paulir...@chromium.org, Mar 15 2015

Blockedon: chromium:467406

Comment 15 by timloh@chromium.org, Jun 3 2015

Labels: -Type-Bug Type-Feature

Comment 16 by lafo...@chromium.org, Sep 23 2015

Labels: Hotlist-Recharge
This issue likely requires triage.  The current issue owner maybe inactive (i.e. hasn't fixed an issue in the last 30 days).  Thanks for helping out!

-Anthony

Comment 17 by ebra...@gnu.org, Sep 24 2015

Cc: dw...@samsung.com
 Issue 162557  has been merged into this issue.

Comment 18 by dstockwell@chromium.org, Oct 16 2015

Labels: -Cr-Blink

Comment 19 Deleted

Comment 20 Deleted

Comment 21 by yio...@gmail.com, Jun 8 2016

Now text-justify only 4 values:

auto | none | inter-word | inter-character

https://drafts.csswg.org/css-text-3/#propdef-text-justify

Comment 22 by e...@chromium.org, Aug 26 2016

Are you still working on this?

Comment 23 by rjwright@chromium.org, Sep 22 2016

Labels: -Pri-2 Hotlist-Backlog Pri-3
Owner: ----
Status: Available (was: Started)
This doesn't seem to be moving forward. Adding to CSS backlog and making available.

Comment 24 by bugsnash@chromium.org, Feb 12 2017

Labels: Update-Quarterly

Comment 25 by yio...@gmail.com, Feb 16 2017

Mozilla Intent to implement: CSS text-justify property: https://groups.google.com/forum/#!topic/mozilla.dev.platform/I00tLlnmTYk

Comment 26 by kojii@chromium.org, Feb 16 2017

Cc: kojii@chromium.org

Comment 27 by meade@chromium.org, Nov 6 2017

Cc: e...@chromium.org

Comment 28 by wpsa...@gmail.com, Nov 13 2017

Hey there, my client want to solved the justification big space  in chrome browser i have found this solution text-justify:distribute but it's not supported on chrome browser still support in other browser even internet explorer too. What should i do hmmmmm with your modern chrome browser?? just let me if there any other way to remove the text-align:justify big space.

Regard
Safar
justification problem.png
29.2 KB View Download

Comment 29 by nainar@chromium.org, Dec 6 2017

Labels: -Update-Quarterly

Comment 30 by mypor...@gmail.com, Dec 7 2017

Hi nainar, 
There are no change with this text-justify:distrubite property and value. It's still showing like past. See attachment, seems chorom does not fixed this.
chorom complain.png
6.1 KB View Download

Comment 31 by mypor...@gmail.com, Dec 7 2017

Hi nainar, 
There are no change with this text-justify:distrubite property and value. It's still showing like past. See attachment, seems chorom does not fixed this.
chorom complain.png
6.1 KB View Download

Comment 32 by an...@macola.com.br, Oct 18

text-justify:distrubite is buggy in chrome with experimental flags enabled

Sign in to add a comment