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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 10 03:30:02 PDT 2013


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





--- Comment #4 from Yuki Sekiguchi <yuki.sekiguchi at access-company.com>  2013-05-10 03:28:26 PST ---
(In reply to comment #2)
> 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.
Added test cases and fixed RenderStyle::diff()

> 
> > 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.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.
Moved layoutIfNeeded() to setIs*Edge() and setIs*Edge() to .cpp file.


> > Source/WebCore/rendering/RenderRubyRun.cpp:243
> > -    
> > +
> 
> Remove this accidental whitespace change.
Removed.
> 
> > 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.
Fixed.

-- 
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