Bug 113680 - [css3-text] Parsing -webkit-hanging value for text-indent from css3-text
Summary: [css3-text] Parsing -webkit-hanging value for text-indent from css3-text
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 112755
  Show dependency treegraph
 
Reported: 2013-03-31 23:54 PDT by Jaehun Lim
Modified: 2013-04-14 18:28 PDT (History)
12 users (show)

See Also:


Attachments
Patch (35.25 KB, patch)
2013-04-01 01:47 PDT, Jaehun Lim
no flags Details | Formatted Diff | Diff
Patch (36.13 KB, patch)
2013-04-01 02:23 PDT, Jaehun Lim
no flags Details | Formatted Diff | Diff
Patch (35.54 KB, patch)
2013-04-02 01:17 PDT, Jaehun Lim
no flags Details | Formatted Diff | Diff
Patch (35.71 KB, patch)
2013-04-09 19:37 PDT, Jaehun Lim
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2 (1.30 MB, application/zip)
2013-04-10 03:13 PDT, Build Bot
no flags Details
Patch (35.75 KB, patch)
2013-04-10 16:38 PDT, Jaehun Lim
no flags Details | Formatted Diff | Diff
Patch (35.70 KB, patch)
2013-04-12 09:04 PDT, Jaehun Lim
no flags Details | Formatted Diff | Diff
Patch for landing (35.04 KB, patch)
2013-04-14 03:39 PDT, Jaehun Lim
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaehun Lim 2013-03-31 23:54:04 PDT
The CSS text-indent property accepts the "hanging" values in CSS3.

Please refer:
http://dev.w3.org/csswg/css-text/#hanging

‘hanging’ means
"Inverts which lines are affected."
Comment 1 Jaehun Lim 2013-04-01 01:47:37 PDT
Created attachment 195943 [details]
Patch
Comment 2 Jaehun Lim 2013-04-01 02:23:26 PDT
Created attachment 195945 [details]
Patch
Comment 3 Jaehun Lim 2013-04-02 01:17:11 PDT
Created attachment 196096 [details]
Patch
Comment 4 Andreas Kling 2013-04-09 02:44:06 PDT
Comment on attachment 196096 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=196096&action=review

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2197
> +            // If CSS3_TEXT is disabled or text-indent has only one value(<length> | <perceantage>),
> +            // getPropertyCSSValue() returns CSSValue.

perceantage -> percentage

> Source/WebCore/css/StyleBuilder.cpp:2049
> +        TextIndentLine eachLineValue = TextIndentFirstLine;
> +        TextIndentType hangingValue = TextIndentNormal;

These are badly named, as they refer to one of two possible values in both cases.
I'd suggest something like:

TextIndentLine textIndentLineValue = RenderStyle::initialTextIndentLine();
TextIndentType textIndentTypeValue = RenderStyle::initialTextIndentType();

That way you also avoid repeating the initial values.

> Source/WebCore/rendering/style/StyleRareInheritedData.h:105
> +    unsigned m_textIndentType : 1; // TextIndentHanging

TextIndentHanging -> TextIndentType
Comment 5 Jaehun Lim 2013-04-09 19:37:15 PDT
Created attachment 197196 [details]
Patch
Comment 6 Jaehun Lim 2013-04-09 19:39:16 PDT
Comment on attachment 196096 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=196096&action=review

Thanks for your comments.

>> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2197
>> +            // getPropertyCSSValue() returns CSSValue.
> 
> perceantage -> percentage

Fixed.

>> Source/WebCore/css/StyleBuilder.cpp:2049
>> +        TextIndentType hangingValue = TextIndentNormal;
> 
> These are badly named, as they refer to one of two possible values in both cases.
> I'd suggest something like:
> 
> TextIndentLine textIndentLineValue = RenderStyle::initialTextIndentLine();
> TextIndentType textIndentTypeValue = RenderStyle::initialTextIndentType();
> 
> That way you also avoid repeating the initial values.

Fixed to use init functions and change names.

>> Source/WebCore/rendering/style/StyleRareInheritedData.h:105
>> +    unsigned m_textIndentType : 1; // TextIndentHanging
> 
> TextIndentHanging -> TextIndentType

Fixed with TextIndentEachLine -> TextIndentLine
Comment 7 Build Bot 2013-04-10 03:13:16 PDT
Comment on attachment 197196 [details]
Patch

Attachment 197196 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-commit-queue.appspot.com/results/17667034

New failing tests:
editing/unsupported-content/table-delete-003.html
editing/unsupported-content/list-type-before.html
editing/unsupported-content/table-type-before.html
editing/unsupported-content/table-delete-002.html
editing/unsupported-content/list-delete-001.html
editing/unsupported-content/list-type-after.html
editing/unsupported-content/list-delete-003.html
editing/unsupported-content/table-type-after.html
editing/unsupported-content/table-delete-001.html
Comment 8 Build Bot 2013-04-10 03:13:18 PDT
Created attachment 197235 [details]
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-10  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.2
Comment 9 Jaehun Lim 2013-04-10 16:38:41 PDT
Created attachment 197417 [details]
Patch
Comment 10 Andreas Kling 2013-04-12 07:51:02 PDT
Comment on attachment 197417 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=197417&action=review

r=me

> Source/WebCore/ChangeLog:12
> +        No new tests, this patch updates exisiting tests.

Typo, existing.
Comment 11 Jaehun Lim 2013-04-12 09:03:12 PDT
Comment on attachment 197417 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=197417&action=review

Thanks.

>> Source/WebCore/ChangeLog:12
>> +        No new tests, this patch updates exisiting tests.
> 
> Typo, existing.

Fixed.
Comment 12 Jaehun Lim 2013-04-12 09:04:02 PDT
Created attachment 197856 [details]
Patch
Comment 13 Jaehun Lim 2013-04-14 03:39:41 PDT
Created attachment 197982 [details]
Patch for landing
Comment 14 WebKit Commit Bot 2013-04-14 18:28:30 PDT
Comment on attachment 197982 [details]
Patch for landing

Clearing flags on attachment: 197982

Committed r148414: <http://trac.webkit.org/changeset/148414>
Comment 15 WebKit Commit Bot 2013-04-14 18:28:34 PDT
All reviewed patches have been landed.  Closing bug.