Changeset 215830 in webkit
- Timestamp:
- Apr 26, 2017 1:52:15 PM (7 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r215829 r215830 1 2017-04-26 Zalan Bujtas <zalan@apple.com> 2 3 RTL: recent searches popover is displayed in incorrect location 4 https://bugs.webkit.org/show_bug.cgi?id=171338 5 <rdar://problem/31377807> 6 7 Reviewed by Dean Jackson. 8 9 Compute the absolute coordinates for the popup the same way we do for the select dropdown. 10 11 * rendering/RenderSearchField.cpp: 12 (WebCore::RenderSearchField::showPopup): 13 1 14 2017-04-26 Said Abou-Hallawa <sabouhallawa@apple.com> 2 15 -
trunk/Source/WebCore/rendering/RenderSearchField.cpp
r214173 r215830 135 135 } 136 136 137 m_searchPopup->popupMenu()->show(snappedIntRect(absoluteBoundingBoxRect()), &view().frameView(), -1); 137 FloatPoint absTopLeft = localToAbsolute(FloatPoint(), UseTransforms); 138 IntRect absBounds = absoluteBoundingBoxRectIgnoringTransforms(); 139 absBounds.setLocation(roundedIntPoint(absTopLeft)); 140 m_searchPopup->popupMenu()->show(absBounds, &view().frameView(), -1); 138 141 } 139 142 -
trunk/Source/WebKit/mac/ChangeLog
r215784 r215830 1 2017-04-26 Zalan Bujtas <zalan@apple.com> 2 3 RTL: recent searches popover is displayed in incorrect location 4 https://bugs.webkit.org/show_bug.cgi?id=171338 5 <rdar://problem/31377807> 6 7 Reviewed by Dean Jackson. 8 9 Add RTL support for the pop-under branch. 10 11 * WebCoreSupport/PopupMenuMac.mm: 12 (PopupMenuMac::show): 13 1 14 2017-04-25 Brent Fulgham <bfulgham@apple.com> 2 15 -
trunk/Source/WebKit/mac/WebCoreSupport/PopupMenuMac.mm
r213464 r215830 174 174 location = NSMakePoint(NSMinX(r) + popOverHorizontalAdjust, NSMaxY(r) - vertOffset); 175 175 else 176 location = NSMakePoint(NSM inX(r) - popOverHorizontalAdjust, NSMaxY(r) - vertOffset);176 location = NSMakePoint(NSMaxX(r) - popOverHorizontalAdjust, NSMaxY(r) - vertOffset); 177 177 #else 178 178 location = NSMakePoint(NSMinX(r) + popOverHorizontalAdjust, NSMaxY(r) - vertOffset); 179 179 #endif 180 } else 181 location = NSMakePoint(NSMinX(r) + popUnderHorizontalAdjust, NSMaxY(r) + popUnderVerticalAdjust); 182 180 } else { 181 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 182 if (textDirection == LTR) 183 location = NSMakePoint(NSMinX(r) + popUnderHorizontalAdjust, NSMaxY(r) + popUnderVerticalAdjust); 184 else 185 location = NSMakePoint(NSMaxX(r) - popUnderHorizontalAdjust, NSMaxY(r) + popUnderVerticalAdjust); 186 #else 187 location = NSMakePoint(NSMinX(r) + popUnderHorizontalAdjust, NSMaxY(r) + popUnderVerticalAdjust); 188 #endif 189 } 183 190 // Save the current event that triggered the popup, so we can clean up our event 184 191 // state after the NSMenu goes away. … … 189 196 190 197 RetainPtr<NSView> dummyView = adoptNS([[NSView alloc] initWithFrame:r]); 198 [dummyView.get() setUserInterfaceLayoutDirection:textDirection == LTR ? NSUserInterfaceLayoutDirectionLeftToRight : NSUserInterfaceLayoutDirectionRightToLeft]; 191 199 [view addSubview:dummyView.get()]; 192 200 location = [dummyView convertPoint:location fromView:view]; -
trunk/Source/WebKit2/ChangeLog
r215816 r215830 1 2017-04-26 Zalan Bujtas <zalan@apple.com> 2 3 RTL: recent searches popover is displayed in incorrect location 4 https://bugs.webkit.org/show_bug.cgi?id=171338 5 <rdar://problem/31377807> 6 7 Reviewed by Dean Jackson. 8 9 Add RTL support for the pop-under branch. 10 11 * UIProcess/mac/WebPopupMenuProxyMac.mm: 12 (WebKit::WebPopupMenuProxyMac::showPopupMenu): 13 1 14 2017-04-26 Antti Koivisto <antti@apple.com> 2 15 -
trunk/Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.mm
r208455 r215830 139 139 #endif 140 140 141 } else 142 location = NSMakePoint(NSMinX(rect) + popUnderHorizontalAdjust, NSMaxY(rect) + popUnderVerticalAdjust); 143 141 } else { 142 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 143 if (textDirection == LTR) 144 location = NSMakePoint(NSMinX(rect) + popUnderHorizontalAdjust, NSMaxY(rect) + popUnderVerticalAdjust); 145 else 146 location = NSMakePoint(NSMaxX(rect) - popUnderHorizontalAdjust, NSMaxY(rect) + popUnderVerticalAdjust); 147 #else 148 location = NSMakePoint(NSMinX(rect) + popUnderHorizontalAdjust, NSMaxY(rect) + popUnderVerticalAdjust); 149 #endif 150 } 144 151 RetainPtr<NSView> dummyView = adoptNS([[NSView alloc] initWithFrame:rect]); 145 152 [dummyView.get() setUserInterfaceLayoutDirection:textDirection == LTR ? NSUserInterfaceLayoutDirectionLeftToRight : NSUserInterfaceLayoutDirectionRightToLeft];
Note: See TracChangeset
for help on using the changeset viewer.