Bug 141417 - text-align start / end failure in table cells
Summary: text-align start / end failure in table cells
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks: 169645
  Show dependency treegraph
 
Reported: 2015-02-10 00:30 PST by Philippe Wittenbergh
Modified: 2017-05-04 07:30 PDT (History)
9 users (show)

See Also:


Attachments
test case (840 bytes, text/html)
2015-02-10 00:30 PST, Philippe Wittenbergh
no flags Details
Patch (5.49 KB, patch)
2017-04-13 20:30 PDT, zalan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews126 for ios-simulator-wk2 (52.50 MB, application/zip)
2017-04-14 02:55 PDT, Build Bot
no flags Details
Patch (11.38 KB, patch)
2017-04-14 10:10 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (11.53 KB, patch)
2017-04-14 10:43 PDT, zalan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-elcapitan (2.45 MB, application/zip)
2017-04-14 11:51 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews114 for mac-elcapitan (3.23 MB, application/zip)
2017-04-14 12:16 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews107 for mac-elcapitan-wk2 (2.29 MB, application/zip)
2017-04-14 12:35 PDT, Build Bot
no flags Details
Patch (11.56 KB, patch)
2017-04-14 12:42 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Wittenbergh 2015-02-10 00:30:26 PST
Created attachment 246315 [details]
test case

text-align: start fails inside a <th>; the content in the cell is centred aligned instead (the default / initial value)
text-align: end fails inside a <td>; text is left-aligned instead (text-align: start appears to work, but then, text-align: left is the initial value…)

In the attached test case, I’ve set `td { text-align: center; }` this is (correctly) overridden by `text-align: start`.

Tested on 10.10.2 with Safari 8.0.3 and latest Nightly build (r179862)
Comment 1 Nikita Vasilyev 2017-03-14 16:42:37 PDT
This is still relevant.
Comment 2 Nikita Vasilyev 2017-03-14 16:57:37 PDT
This works as expected in Chrome and Firefox.
Comment 3 Radar WebKit Bug Importer 2017-03-14 16:58:33 PDT
<rdar://problem/31051672>
Comment 4 zalan 2017-04-13 20:30:42 PDT
Created attachment 307081 [details]
Patch
Comment 5 Build Bot 2017-04-14 02:55:43 PDT
Comment on attachment 307081 [details]
Patch

Attachment 307081 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/3532959

New failing tests:
webrtc/captureCanvas-webrtc.html
Comment 6 Build Bot 2017-04-14 02:55:46 PDT
Created attachment 307110 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.6
Comment 7 zalan 2017-04-14 10:10:51 PDT
Created attachment 307118 [details]
Patch
Comment 8 Antti Koivisto 2017-04-14 10:28:07 PDT
Comment on attachment 307118 [details]
Patch

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

> Source/WebCore/rendering/style/RenderStyle.h:1897
>          static const unsigned styleTypeAndPaddingBitCount = styleTypeBitCount + styleTypePadding;
>          static const uint64_t styleTypeMask = (oneBitMask << styleTypeAndPaddingBitCount) - 1;
>          static const unsigned styleTypeOffset = hasViewportUnitsBitCount + hasViewportUnitsOffset;
> +        static const unsigned hasExplicitlySetTextAlignOffset = styleTypeOffset + styleTypeAndPaddingBitCount;
>  
>          // Byte 8.
> -        static const unsigned isUniqueOffset = styleTypeOffset + styleTypeAndPaddingBitCount;
> +        static const unsigned isUniqueOffset = hasExplicitlySetTextAlignOffset + 1;

You need to reduce styleTypePadding by one so since you are grabbing bit there. It would also be clearer to add hasExplicitlySetTextAlignOffset bit to the beginning of the byte 7 so that the padding stays at end.
Comment 9 zalan 2017-04-14 10:43:39 PDT
Created attachment 307123 [details]
Patch
Comment 10 Antti Koivisto 2017-04-14 10:54:44 PDT
r=me
Comment 11 Build Bot 2017-04-14 11:51:56 PDT
Comment on attachment 307123 [details]
Patch

Attachment 307123 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/3534966

New failing tests:
css2.1/t0804-c5507-padn-r-01-c-a.html
css1/box_properties/margin_right.html
fast/lists/002.html
css2.1/t0803-c5502-mrgn-r-01-c-a.html
fast/css/text-align-webkit-match-parent.html
fast/css/list-item-text-align.html
css1/box_properties/padding_right.html
fast/lists/003.html
editing/pasteboard/paste-4039777-fix.html
fast/lists/001.html
fast/lists/001-vertical.html
fast/lists/003-vertical.html
fast/lists/002-vertical.html
Comment 12 Build Bot 2017-04-14 11:51:58 PDT
Created attachment 307128 [details]
Archive of layout-test-results from ews102 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 13 Build Bot 2017-04-14 12:16:54 PDT
Comment on attachment 307123 [details]
Patch

Attachment 307123 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/3535039

New failing tests:
css2.1/t0804-c5507-padn-r-01-c-a.html
css1/box_properties/margin_right.html
fast/lists/002.html
editing/pasteboard/paste-4039777-fix.html
fast/css/text-align-webkit-match-parent.html
fast/css/list-item-text-align.html
css1/box_properties/padding_right.html
fast/lists/003.html
css2.1/t0803-c5502-mrgn-r-01-c-a.html
fast/lists/001.html
fast/lists/001-vertical.html
fast/lists/003-vertical.html
fast/lists/002-vertical.html
Comment 14 Build Bot 2017-04-14 12:16:55 PDT
Created attachment 307132 [details]
Archive of layout-test-results from ews114 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 15 Build Bot 2017-04-14 12:35:11 PDT
Comment on attachment 307123 [details]
Patch

Attachment 307123 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/3535115

New failing tests:
css2.1/t0804-c5507-padn-r-01-c-a.html
css1/box_properties/margin_right.html
fast/lists/002.html
css2.1/t0803-c5502-mrgn-r-01-c-a.html
fast/css/text-align-webkit-match-parent.html
fast/css/list-item-text-align.html
css1/box_properties/padding_right.html
fast/lists/003.html
editing/pasteboard/paste-4039777-fix.html
fast/lists/001.html
fast/lists/001-vertical.html
fast/lists/003-vertical.html
fast/lists/002-vertical.html
Comment 16 Build Bot 2017-04-14 12:35:13 PDT
Created attachment 307133 [details]
Archive of layout-test-results from ews107 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 17 zalan 2017-04-14 12:42:13 PDT
Created attachment 307135 [details]
Patch
Comment 18 WebKit Commit Bot 2017-04-14 13:59:39 PDT
Comment on attachment 307135 [details]
Patch

Clearing flags on attachment: 307135

Committed r215375: <http://trac.webkit.org/changeset/215375>
Comment 19 WebKit Commit Bot 2017-04-14 13:59:41 PDT
All reviewed patches have been landed.  Closing bug.
Comment 20 Ebrahim Byagowi 2017-05-04 07:30:27 PDT
Similar bug worths to be fixed if not yet by this: Bug 79272