[webkit-reviews] review granted: [Bug 61495] Make RenderStyle visuallyOrdered property use an enum instead of a bool. : [Attachment 96192] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 6 22:35:41 PDT 2011


Eric Seidel <eric at webkit.org> has granted Luke Macpherson
<macpherson at chromium.org>'s request for review:
Bug 61495: Make RenderStyle visuallyOrdered property use an enum instead of a
bool.
https://bugs.webkit.org/show_bug.cgi?id=61495

Attachment 96192: Patch
https://bugs.webkit.org/attachment.cgi?id=96192&action=review

------- Additional Comments from Eric Seidel <eric at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=96192&action=review

Now I have mixed feelings about this again.  I'm amazed that 4 places in our
code have diffent names for hte same bool!

Anyway, r=me.  If you are interested in this area of code, obviously someone
might want to make all 4 use the same enum/bool/whatever.

> Source/WebCore/css/CSSStyleSelector.cpp:1226
> +    documentStyle->setRTLOrdering(document->visuallyOrdered() ? VisualOrder
: LogicalOrder);

Two ways to say the same thing.... Sigh.

> Source/WebCore/rendering/RenderBlock.cpp:6311
> +    bool directionalOverride = style->rtlOrdering() == VisualOrder;

wow.  I love how we have a 3rd confusing way to say the same thing here.

> Source/WebCore/rendering/RenderBlockLineLayout.cpp:964
> +	       VisualDirectionOverride override = (style()->rtlOrdering() ==
VisualOrder ? (style()->direction() == LTR ? VisualLeftToRightOverride :
VisualRightToLeftOverride) : NoVisualOverride);

What!?	We have a 4th way to express the same concept?


More information about the webkit-reviews mailing list