Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[Mac] Allow popup menus to override default appearance
https://bugs.webkit.org/show_bug.cgi?id=133129 Reviewed by Tim Horton. Source/WebCore: WebKitSystemInterface's WKPopupMenu has a flag to hide the arrows at the end of a popup-menu (e.g. <select>). Expose that via adding a hasDefaultAppearance flag to PopupMenuStyle, which then passes it on to WKSI. * platform/PopupMenuStyle.h: (WebCore::PopupMenuStyle::PopupMenuStyle): New flag in constructor. (WebCore::PopupMenuStyle::hasDefaultAppearance): New flag. * platform/mac/WebCoreSystemInterface.h: wkPopupMenu signature has changed to accept the new flag. * platform/mac/WebCoreSystemInterface.mm: Ditto. * rendering/RenderMenuList.cpp: (RenderMenuList::itemStyle): Pass in true as default appearance when creating the PopupMenuStyle. We don't need it. (RenderMenuList::menuStyle): In this case we pass in the negated value of style().hasAppearance(), which indicates if we are overriding the built-in drawing. * rendering/RenderSearchField.cpp: (WebCore::RenderSearchField::menuStyle): Use true as the default value. Source/WebKit/mac: Replace the call to wkPopupMenuWithSize with wkPopupMenu, now with extra parameters to indicate the control size and whether or not to draw the arrows at the end. * WebCoreSupport/PopupMenuMac.mm: (PopupMenuMac::show): Source/WebKit2: Add an extra "hideArrows" flag to PlatformPopupMenuData and replace the call to WKPopupMenuWithSize with WKPopupMenu. * Shared/PlatformPopupMenuData.cpp: Encode and decode the new data value. (WebKit::PlatformPopupMenuData::encode): (WebKit::PlatformPopupMenuData::decode): * Shared/PlatformPopupMenuData.h: Add hideArrows boolean. * UIProcess/mac/WebPopupMenuProxyMac.mm: (WebKit::WebPopupMenuProxyMac::showPopupMenu): * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm: (WebKit::WebPopupMenu::setUpPlatformData): The hideArrows flag is true if we don't have the default appearance. Canonical link: https://commits.webkit.org/151157@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169134 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
13 changed files
with
76 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters