[Webkit-unassigned] [Bug 115149] Implement ruby-align

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 30 14:59:12 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=115149


Dave Hyatt <hyatt at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #199625|review?                     |review-
               Flag|                            |




--- Comment #2 from Dave Hyatt <hyatt at apple.com>  2013-04-30 14:57:33 PST ---
(From update of attachment 199625)
View in context: https://bugs.webkit.org/attachment.cgi?id=199625&action=review

r-

Don't forget to patch RenderStyle::diff to do a relayout if ruby-align changes. You should add a test that dynamically changes ruby-align in order to test this.

> Source/WebCore/rendering/RenderBlockLineLayout.cpp:671
> +            if (rubyRun->rubyBase())
> +                rubyRun->rubyBase()->layoutIfNeeded();

Can't you fold this code into setIsEndEdge?

> Source/WebCore/rendering/RenderBlockLineLayout.cpp:734
> +        rubyRun->setIsEndEdge(true);
> +        if (rubyRun->rubyBase())
> +            rubyRun->rubyBase()->layoutIfNeeded();

Same here.

> Source/WebCore/rendering/RenderRubyRun.cpp:243
> -    
> +

Remove this accidental whitespace change.

> Source/WebCore/rendering/RenderRubyRun.h:83
> +    void setIsStartEdge(bool isEdge)
> +    {
> +        if (m_isStartEdge != isEdge && rubyBase())
> +            rubyBase()->setNeedsLayout(true, MarkOnlyThis);
> +        m_isStartEdge = isEdge;
> +    }
> +    bool isEndEdge() const { return m_isEndEdge; }
> +    void setIsEndEdge(bool isEdge)
> +    {
> +        if (m_isEndEdge != isEdge && rubyBase())
> +            rubyBase()->setNeedsLayout(true, MarkOnlyThis);
> +        m_isEndEdge = isEdge;
> +    }

Go ahead and do the layoutIfNeeded directly inside the set methods. I would un-inline them also and put them in the .cpp file.

> Source/WebCore/rendering/RenderRubyRun.h:96
> +    bool m_isStartEdge;
> +    bool m_isEndEdge;

I know you set these to false on every layout, but just to avoid future issues in case things change, let's init them to false in the constructor as well.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list