Bug 104035 - Support text-orientation: sideways-right (and sideways when it maps to sideways-right)
Summary: Support text-orientation: sideways-right (and sideways when it maps to sidewa...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar, WebExposed
Depends on:
Blocks:
 
Reported: 2012-12-04 13:37 PST by mitz
Modified: 2012-12-06 10:36 PST (History)
10 users (show)

See Also:


Attachments
Work in progress (17.62 KB, patch)
2012-12-04 13:39 PST, mitz
no flags Details | Formatted Diff | Diff
Add text-orientation: sideways-right support (deleted)
2012-12-04 17:54 PST, mitz
andersca: review+
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
Add text-orientation: sideways-right support (124.34 KB, patch)
2012-12-04 18:40 PST, mitz
no flags Details | Formatted Diff | Diff
Add text-orientation: sideways-right support (124.33 KB, patch)
2012-12-04 18:42 PST, mitz
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2012-12-04 13:37:49 PST
<rdar://problem/12754101>

As specified in <http://dev.w3.org/csswg/css3-writing-modes/>, the text-orientation property accepts the values sideways-right and sideways. The latter maps to sideways-right in vertical-rl writing mode. text-orientation: sideways-right should cause text to be set as if in a horizontal layout, but rotated 90° clockwise.
Comment 1 mitz 2012-12-04 13:39:19 PST
Created attachment 177541 [details]
Work in progress
Comment 2 Dave Hyatt 2012-12-04 13:53:44 PST
Comment on attachment 177541 [details]
Work in progress

Patch looks fine to me. I'm not a fan of fall-through case statements, but it looks ok.
Comment 3 mitz 2012-12-04 17:54:11 PST
Created attachment 177627 [details]
Add text-orientation: sideways-right support
Comment 4 WebKit Review Bot 2012-12-04 17:58:10 PST
Attachment 177627 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast..." exit_code: 1
Source/WebCore/rendering/style/RenderStyle.h:1303:  The parameter name "textOrientation" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/rendering/style/RenderStyle.h:1473:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 2 in 24 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Anders Carlsson 2012-12-04 18:19:10 PST
Comment on attachment 177627 [details]
Add text-orientation: sideways-right support

Looks good, but you should fix the style violations that make sense.
Comment 6 WebKit Review Bot 2012-12-04 18:20:15 PST
Comment on attachment 177627 [details]
Add text-orientation: sideways-right support

Attachment 177627 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/15157124
Comment 7 mitz 2012-12-04 18:40:29 PST
Created attachment 177641 [details]
Add text-orientation: sideways-right support
Comment 8 mitz 2012-12-04 18:42:28 PST
Created attachment 177642 [details]
Add text-orientation: sideways-right support
Comment 9 mitz 2012-12-04 22:16:26 PST
Comment on attachment 177642 [details]
Add text-orientation: sideways-right support

This patch differs from attachment 177627 [details] only in that the style issues and build failure were fixed, so I am going to land it with Anders’s review.
Comment 10 mitz 2012-12-04 22:19:35 PST
Committed as <http://trac.webkit.org/r136640>.
Comment 11 Darin Adler 2012-12-06 10:06:15 PST
Comment on attachment 177642 [details]
Add text-orientation: sideways-right support

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

> Source/WebCore/rendering/style/RenderStyle.h:1801
> +    if (compareEqual(rareInheritedData->m_textOrientation, textOrientation))

What is the compareEqual function? I never heard of that before.
Comment 12 mitz 2012-12-06 10:16:13 PST
(In reply to comment #11)
> (From update of attachment 177642 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=177642&action=review
> 
> > Source/WebCore/rendering/style/RenderStyle.h:1801
> > +    if (compareEqual(rareInheritedData->m_textOrientation, textOrientation))
> 
> What is the compareEqual function? I never heard of that before.

It’s a function template that casts the right hand side to the left hand side’s type (we used unsigned for many of the StyleRareInheritedData data members, for reasons that involve MSVC if I remember correctly). It’s used in the SET_VAR macro, and the above use is similar to an expansion of that macro.

Anyway, the reason I used it here was that I was following a pattern.
Comment 13 Darin Adler 2012-12-06 10:36:00 PST
Thanks for explaining!