Changeset 83909 in webkit
- Timestamp:
- Apr 14, 2011 4:13:35 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r83901 r83909 1 2011-04-14 Brady Eidson <beidson@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 <rdar://problem/8665102> and https://bugs.webkit.org/show_bug.cgi?id=58595 6 Menu is not displayed for <input type=search results="5"> 7 8 * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp: 9 (WebKit::WebSearchPopupMenu::enabled): Return true, like all good search popup menus should. 10 11 * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm: 12 (WebKit::WebPopupMenu::setUpPlatformData): Remember the shouldPopOver-ness. 13 14 * Shared/PlatformPopupMenuData.cpp: 15 (WebKit::PlatformPopupMenuData::encode): Remember the shouldPopOver-ness. 16 (WebKit::PlatformPopupMenuData::decode): Remember the shouldPopOver-ness. 17 * Shared/PlatformPopupMenuData.h: 18 19 * UIProcess/mac/WebPopupMenuProxyMac.mm: 20 (WebKit::WebPopupMenuProxyMac::showPopupMenu): Use the shouldPopOver-ness to adjust display position. 21 1 22 2011-04-14 Anders Carlsson <andersca@apple.com> 2 23 -
trunk/Source/WebKit2/Shared/PlatformPopupMenuData.cpp
r82441 r83909 62 62 #elif PLATFORM(MAC) 63 63 encoder->encode(fontInfo); 64 encoder->encode(shouldPopOver); 64 65 #endif 65 66 } … … 93 94 if (!decoder->decode(data.fontInfo)) 94 95 return false; 96 if (!decoder->decode(data.shouldPopOver)) 97 return false; 95 98 #endif 96 99 -
trunk/Source/WebKit2/Shared/PlatformPopupMenuData.h
r82441 r83909 55 55 #elif PLATFORM(MAC) 56 56 FontInfo fontInfo; 57 bool shouldPopOver; 57 58 #endif 58 59 }; -
trunk/Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.mm
r79886 r83909 109 109 // These values were borrowed from AppKit to match their placement of the menu. 110 110 const int popOverHorizontalAdjust = -10; 111 NSRect titleFrame = [m_popup.get() titleRectForBounds:rect]; 112 if (titleFrame.size.width <= 0 || titleFrame.size.height <= 0) 113 titleFrame = rect; 114 float vertOffset = roundf((NSMaxY(rect) - NSMaxY(titleFrame)) + NSHeight(titleFrame)); 115 NSPoint location = NSMakePoint(NSMinX(rect) + popOverHorizontalAdjust, NSMaxY(rect) - vertOffset); 111 const int popUnderHorizontalAdjust = 6; 112 const int popUnderVerticalAdjust = 6; 113 114 // Menus that pop-over directly obscure the node that generated the popup menu. 115 // Menus that pop-under are offset underneath it. 116 NSPoint location; 117 if (data.shouldPopOver) { 118 NSRect titleFrame = [m_popup.get() titleRectForBounds:rect]; 119 if (titleFrame.size.width <= 0 || titleFrame.size.height <= 0) 120 titleFrame = rect; 121 float vertOffset = roundf((NSMaxY(rect) - NSMaxY(titleFrame)) + NSHeight(titleFrame)); 122 location = NSMakePoint(NSMinX(rect) + popOverHorizontalAdjust, NSMaxY(rect) - vertOffset); 123 } else 124 location = NSMakePoint(NSMinX(rect) + popUnderHorizontalAdjust, NSMaxY(rect) + popUnderVerticalAdjust); 116 125 117 126 RetainPtr<NSView> dummyView(AdoptNS, [[NSView alloc] initWithFrame:rect]); -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp
r76916 r83909 1 1 /* 2 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 * Copyright (C) 2010 Apple Inc. All rights reserved.3 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. 4 4 * 5 5 * This library is free software; you can redistribute it and/or … … 53 53 bool WebSearchPopupMenu::enabled() 54 54 { 55 return false;55 return true; 56 56 } 57 57 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm
r79886 r83909 1 1 /* 2 * Copyright (C) 2010 Apple Inc. All rights reserved.2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 47 47 48 48 data.fontInfo.fontAttributeDictionary = fontDescriptorAttributes; 49 data.shouldPopOver = m_popupClient->shouldPopOver(); 49 50 } 50 51
Note: See TracChangeset
for help on using the changeset viewer.