Title: [200243] trunk/Source
Revision
200243
Author
[email protected]
Date
2016-04-29 09:35:00 -0700 (Fri, 29 Apr 2016)

Log Message

Unreviewed, rolling out r200217.
https://bugs.webkit.org/show_bug.cgi?id=157183

This change broke the Yosemite build. (Requested by ryanhaddad
on #webkit).

Reverted changeset:

"RTL <select> popup menu is in the wrong location"
https://bugs.webkit.org/show_bug.cgi?id=157159
http://trac.webkit.org/changeset/200217

Patch by Commit Queue <[email protected]> on 2016-04-29

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (200242 => 200243)


--- trunk/Source/WebKit/mac/ChangeLog	2016-04-29 16:08:00 UTC (rev 200242)
+++ trunk/Source/WebKit/mac/ChangeLog	2016-04-29 16:35:00 UTC (rev 200243)
@@ -1,3 +1,17 @@
+2016-04-29  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r200217.
+        https://bugs.webkit.org/show_bug.cgi?id=157183
+
+        This change broke the Yosemite build. (Requested by ryanhaddad
+        on #webkit).
+
+        Reverted changeset:
+
+        "RTL <select> popup menu is in the wrong location"
+        https://bugs.webkit.org/show_bug.cgi?id=157159
+        http://trac.webkit.org/changeset/200217
+
 2016-04-28  Dean Jackson  <[email protected]>
 
         RTL <select> popup menu is in the wrong location

Modified: trunk/Source/WebKit/mac/WebCoreSupport/PopupMenuMac.mm (200242 => 200243)


--- trunk/Source/WebKit/mac/WebCoreSupport/PopupMenuMac.mm	2016-04-29 16:08:00 UTC (rev 200242)
+++ trunk/Source/WebKit/mac/WebCoreSupport/PopupMenuMac.mm	2016-04-29 16:35:00 UTC (rev 200243)
@@ -148,15 +148,11 @@
 
     NSView* view = v->documentView();
 
-    TextDirection textDirection = m_client->menuStyle().textDirection();
-
     [m_popup attachPopUpWithFrame:r inView:view];
     [m_popup selectItemAtIndex:index];
-    [m_popup setUserInterfaceLayoutDirection:textDirection == LTR ? NSUserInterfaceLayoutDirectionLeftToRight : NSUserInterfaceLayoutDirectionRightToLeft];
 
     NSMenu* menu = [m_popup menu];
-    [menu setUserInterfaceLayoutDirection:textDirection == LTR ? NSUserInterfaceLayoutDirectionLeftToRight : NSUserInterfaceLayoutDirectionRightToLeft];
-
+    
     NSPoint location;
     NSFont* font = m_client->menuStyle().font().primaryFont().getNSFont();
 
@@ -173,9 +169,8 @@
         NSFont* defaultFont = [NSFont systemFontOfSize:[font pointSize]];
         vertOffset += [font descender] - [defaultFont descender];
         vertOffset = fminf(NSHeight(r), vertOffset);
-
-        float horizontalOffset = textDirection == LTR ? popOverHorizontalAdjust : 0;
-        location = NSMakePoint(NSMinX(r) + horizontalOffset, NSMaxY(r) - vertOffset);
+    
+        location = NSMakePoint(NSMinX(r) + popOverHorizontalAdjust, NSMaxY(r) - vertOffset);
     } else
         location = NSMakePoint(NSMinX(r) + popUnderHorizontalAdjust, NSMaxY(r) + popUnderVerticalAdjust);    
 

Modified: trunk/Source/WebKit2/ChangeLog (200242 => 200243)


--- trunk/Source/WebKit2/ChangeLog	2016-04-29 16:08:00 UTC (rev 200242)
+++ trunk/Source/WebKit2/ChangeLog	2016-04-29 16:35:00 UTC (rev 200243)
@@ -1,3 +1,17 @@
+2016-04-29  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r200217.
+        https://bugs.webkit.org/show_bug.cgi?id=157183
+
+        This change broke the Yosemite build. (Requested by ryanhaddad
+        on #webkit).
+
+        Reverted changeset:
+
+        "RTL <select> popup menu is in the wrong location"
+        https://bugs.webkit.org/show_bug.cgi?id=157159
+        http://trac.webkit.org/changeset/200217
+
 2016-04-29  Claudio Saavedra  <[email protected]>
 
         [GTK] Move WK2 shareable code out from gtk directories

Modified: trunk/Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.mm (200242 => 200243)


--- trunk/Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.mm	2016-04-29 16:08:00 UTC (rev 200242)
+++ trunk/Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.mm	2016-04-29 16:35:00 UTC (rev 200243)
@@ -118,7 +118,6 @@
     [m_popup setUserInterfaceLayoutDirection:textDirection == LTR ? NSUserInterfaceLayoutDirectionLeftToRight : NSUserInterfaceLayoutDirectionRightToLeft];
 
     NSMenu *menu = [m_popup menu];
-    [menu setUserInterfaceLayoutDirection:textDirection == LTR ? NSUserInterfaceLayoutDirectionLeftToRight : NSUserInterfaceLayoutDirectionRightToLeft];
 
     // These values were borrowed from AppKit to match their placement of the menu.
     const int popOverHorizontalAdjust = -10;
@@ -132,9 +131,8 @@
         NSRect titleFrame = [m_popup  titleRectForBounds:rect];
         if (titleFrame.size.width <= 0 || titleFrame.size.height <= 0)
             titleFrame = rect;
-        float verticalOffset = roundf((NSMaxY(rect) - NSMaxY(titleFrame)) + NSHeight(titleFrame));
-        float horizontalOffset = textDirection == LTR ? popOverHorizontalAdjust : 0;
-        location = NSMakePoint(NSMinX(rect) + horizontalOffset, NSMaxY(rect) - verticalOffset);
+        float vertOffset = roundf((NSMaxY(rect) - NSMaxY(titleFrame)) + NSHeight(titleFrame));
+        location = NSMakePoint(NSMinX(rect) + popOverHorizontalAdjust, NSMaxY(rect) - vertOffset);
     } else
         location = NSMakePoint(NSMinX(rect) + popUnderHorizontalAdjust, NSMaxY(rect) + popUnderVerticalAdjust);  
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to