Bug 67437 - support -webkit-flex-flow: horizontal-rtl
Summary: support -webkit-flex-flow: horizontal-rtl
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ojan Vafai
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-01 14:21 PDT by Ojan Vafai
Modified: 2012-01-03 16:38 PST (History)
4 users (show)

See Also:


Attachments
Patch (9.61 KB, patch)
2011-09-01 14:22 PDT, Ojan Vafai
no flags Details | Formatted Diff | Diff
Patch (10.26 KB, patch)
2011-09-01 18:22 PDT, Ojan Vafai
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ojan Vafai 2011-09-01 14:21:01 PDT
support -webkit-flex-flow: horizontal-rtl
Comment 1 Ojan Vafai 2011-09-01 14:22:22 PDT
Created attachment 106029 [details]
Patch
Comment 2 Tony Chang 2011-09-01 16:36:27 PDT
Comment on attachment 106029 [details]
Patch

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

Just some minor style nits.

> LayoutTests/ChangeLog:10
> +        * platform/mac/Skipped:

Nit: This file doesn't appear to have changed.

> LayoutTests/css3/flexbox/right-to-left.html:36
> +<div class="horizontal-box">
> +  <div data-offset-x="400" style="width: -webkit-flex(1)"></div>

Can you add a test with different flex values?  Also, some tests with horizontal margins or paddings on the flex items?

> Source/WebCore/rendering/RenderFlexibleBox.cpp:257
> +    default:
> +        ASSERT_NOT_REACHED();
> +        return FlowLeftToRight;

I think we can remove the default case since you enumerated all the cases.

> Source/WebCore/rendering/RenderFlexibleBox.cpp:261
> +LayoutUnit RenderFlexibleBox::startOffset()

Maybe add MainAxis to this function name?
Comment 3 Ojan Vafai 2011-09-01 18:22:46 PDT
Created attachment 106076 [details]
Patch
Comment 4 Ojan Vafai 2011-09-01 18:23:52 PDT
(In reply to comment #2)
> (From update of attachment 106029 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=106029&action=review
> > Source/WebCore/rendering/RenderFlexibleBox.cpp:257
> > +    default:
> > +        ASSERT_NOT_REACHED();
> > +        return FlowLeftToRight;
> 
> I think we can remove the default case since you enumerated all the cases.

Compiler's not smart enough to realize it isn't lacking a return statement. In either case, I moved the assert and return statement out of the switch. I think that'll be better as this function expands to include the other cases.
Comment 5 Tony Chang 2011-09-02 09:10:01 PDT
Comment on attachment 106076 [details]
Patch

LGTM, but I defer to Hyatt.
Comment 6 Ojan Vafai 2011-09-09 17:06:56 PDT
Comment on attachment 106076 [details]
Patch

As per discussion with Hyatt on IRC, all this code needs to be reworked to operate in logical, not physical coordiantes.