[Webkit-unassigned] [Bug 53642] pop-up button text not rendered correctly according to its direction in <option>

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 2 17:11:04 PST 2011


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


mitz at webkit.org changed:

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




--- Comment #2 from mitz at webkit.org  2011-02-02 17:11:04 PST ---
(From update of attachment 81007)
View in context: https://bugs.webkit.org/attachment.cgi?id=81007&action=review

Good catch! I thought I had this covered by the change to RenderStyle::diff(), but of course I didn’t, because adjustInnerStyle() just pokes the style directly.

> Source/WebCore/rendering/RenderMenuList.cpp:216
>              m_buttonText->setText(s.impl());
> +            if (!m_buttonText->selfNeedsLayout() && document()->page()->chrome()->selectItemAlignmentFollowsMenuWritingDirection() && m_optionStyle
> +                && (m_optionStyle->direction() != m_innerBlock->style()->direction() || m_optionStyle->unicodeBidi() != m_innerBlock->style()->unicodeBidi()))
> +                m_buttonText->setNeedsLayout(true);

I don’t think this careful checking of the conditions is really necessary, so you could just accomplish this by calling setText(s.imply(), true) above. But really the right thing to do is to do a RenderStyle::diff() in adjustInnerStyle() and if you get a layout difference, call setNeedsLayoutAndPrefWidthsRecalc().

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