Title: [171802] trunk/Source/WebCore
Revision
171802
Author
m...@apple.com
Date
2014-07-30 12:40:25 -0700 (Wed, 30 Jul 2014)

Log Message

<rdar://problem/17199364> [Mac] Popup button arrows appear on the left, underlapping text, when the UI layout direction is right-to-left
https://bugs.webkit.org/show_bug.cgi?id=135426

Reviewed by Dean Jackson.

No test, because the UI layout direction in the test harness is always left-to-right.

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::popupButton): Forced the user interface layout direction of the
NSPopUpButtonCell to left-to-right. Added a FIXME about how we could make this vary based on
the direction of the <select>, though that would require additional changes elsewhere.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (171801 => 171802)


--- trunk/Source/WebCore/ChangeLog	2014-07-30 18:56:13 UTC (rev 171801)
+++ trunk/Source/WebCore/ChangeLog	2014-07-30 19:40:25 UTC (rev 171802)
@@ -1,5 +1,19 @@
 2014-07-30  Dan Bernstein  <m...@apple.com>
 
+        <rdar://problem/17199364> [Mac] Popup button arrows appear on the left, underlapping text, when the UI layout direction is right-to-left
+        https://bugs.webkit.org/show_bug.cgi?id=135426
+
+        Reviewed by Dean Jackson.
+
+        No test, because the UI layout direction in the test harness is always left-to-right.
+
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::popupButton): Forced the user interface layout direction of the
+        NSPopUpButtonCell to left-to-right. Added a FIXME about how we could make this vary based on
+        the direction of the <select>, though that would require additional changes elsewhere.
+
+2014-07-30  Dan Bernstein  <m...@apple.com>
+
         Made Credential hold onto an NSURLCredential when needed.
         Work towards fixing https://bugs.webkit.org/show_bug.cgi?id=135327
 

Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (171801 => 171802)


--- trunk/Source/WebCore/rendering/RenderThemeMac.mm	2014-07-30 18:56:13 UTC (rev 171801)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm	2014-07-30 19:40:25 UTC (rev 171802)
@@ -1934,6 +1934,11 @@
         m_popupButton = adoptNS([[NSPopUpButtonCell alloc] initTextCell:@"" pullsDown:NO]);
         [m_popupButton.get() setUsesItemFromMenu:NO];
         [m_popupButton.get() setFocusRingType:NSFocusRingTypeExterior];
+        // We don't want the app's UI layout direction to affect the appearance of popup buttons in
+        // web content, which has its own layout direction.
+        // FIXME: Make this depend on the directionality of the select element, once the rest of the
+        // rendering code can account for the popup arrows appearing on the other side.
+        [m_popupButton setUserInterfaceLayoutDirection:NSUserInterfaceLayoutDirectionLeftToRight];
     }
 
     return m_popupButton.get();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to