Commit d04c0e97 authored by weinig@apple.com's avatar weinig@apple.com

Move PopupMenuMac and SearchPopupMenuMac to Source/WebKit/mac

matching where they are in WebKit2.

Reviewed by Anders Carlsson.

Source/WebCore: 

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/mac/PopupMenuMac.h: Removed.
* platform/mac/PopupMenuMac.mm: Removed.
* platform/mac/SearchPopupMenuMac.h: Removed.
* platform/mac/SearchPopupMenuMac.mm: Removed.

Source/WebKit: 

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac: 

* WebCoreSupport/PopupMenuMac.h: Copied from WebCore/platform/mac/PopupMenuMac.h.
* WebCoreSupport/PopupMenuMac.mm: Copied from WebCore/platform/mac/PopupMenuMac.mm.
* WebCoreSupport/SearchPopupMenuMac.h: Copied from WebCore/platform/mac/SearchPopupMenuMac.h.
* WebCoreSupport/SearchPopupMenuMac.mm: Copied from WebCore/platform/mac/SearchPopupMenuMac.mm.
* WebCoreSupport/WebChromeClient.mm:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ff6bce05
2013-05-04 Sam Weinig <sam@webkit.org>
Move PopupMenuMac and SearchPopupMenuMac to Source/WebKit/mac
matching where they are in WebKit2.
Reviewed by Anders Carlsson.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/mac/PopupMenuMac.h: Removed.
* platform/mac/PopupMenuMac.mm: Removed.
* platform/mac/SearchPopupMenuMac.h: Removed.
* platform/mac/SearchPopupMenuMac.mm: Removed.
2013-05-04 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of special cases in AddIncludesForTypeInImpl
......
This diff is collapsed.
......@@ -77,7 +77,6 @@
065AD4F60B0C2EDA005A2B1D /* ContextMenuController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 065AD4F30B0C2EDA005A2B1D /* ContextMenuController.cpp */; };
065AD4F70B0C2EDA005A2B1D /* ContextMenuController.h in Headers */ = {isa = PBXBuildFile; fileRef = 065AD4F40B0C2EDA005A2B1D /* ContextMenuController.h */; settings = {ATTRIBUTES = (Private, ); }; };
0668E18B0ADD9624004128E0 /* PopupMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 0668E1890ADD9624004128E0 /* PopupMenu.h */; settings = {ATTRIBUTES = (Private, ); }; };
0668E1900ADD9640004128E0 /* PopupMenuMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0668E18E0ADD9640004128E0 /* PopupMenuMac.mm */; };
066C772B0AB603B700238CC4 /* FileChooser.h in Headers */ = {isa = PBXBuildFile; fileRef = 066C772A0AB603B700238CC4 /* FileChooser.h */; settings = {ATTRIBUTES = (Private, ); }; };
066C77300AB603FD00238CC4 /* RenderFileUploadControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 066C772E0AB603FD00238CC4 /* RenderFileUploadControl.cpp */; };
066C77310AB603FD00238CC4 /* RenderFileUploadControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 066C772F0AB603FD00238CC4 /* RenderFileUploadControl.h */; };
......@@ -3920,7 +3919,6 @@
AB67D1A8097F3AE300F9392E /* RenderTextControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB67D1A6097F3AE300F9392E /* RenderTextControl.cpp */; };
AB67D1A9097F3AE300F9392E /* RenderTextControl.h in Headers */ = {isa = PBXBuildFile; fileRef = AB67D1A7097F3AE300F9392E /* RenderTextControl.h */; };
AB7170890B3118080017123E /* SearchPopupMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = AB7170880B3118080017123E /* SearchPopupMenu.h */; settings = {ATTRIBUTES = (Private, ); }; };
AB7170A00B31193B0017123E /* SearchPopupMenuMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB71709F0B31193B0017123E /* SearchPopupMenuMac.mm */; };
ABAF22080C03B1C700B0BCF0 /* ChromeMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABAF22070C03B1C700B0BCF0 /* ChromeMac.mm */; };
ABB5419E0ACDDFE4002820EB /* RenderListBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABB5419C0ACDDFE4002820EB /* RenderListBox.cpp */; };
ABB5419F0ACDDFE4002820EB /* RenderListBox.h in Headers */ = {isa = PBXBuildFile; fileRef = ABB5419D0ACDDFE4002820EB /* RenderListBox.h */; };
......@@ -5317,8 +5315,6 @@
D359D793129CA3C00006E5D2 /* DOMHTMLDetailsElementInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = D359D790129CA3C00006E5D2 /* DOMHTMLDetailsElementInternal.h */; };
D359D8BE129CA55C0006E5D2 /* JSHTMLDetailsElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D359D8BC129CA55C0006E5D2 /* JSHTMLDetailsElement.cpp */; };
D359D8BF129CA55C0006E5D2 /* JSHTMLDetailsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = D359D8BD129CA55C0006E5D2 /* JSHTMLDetailsElement.h */; };
D39D006D11F8E308006041F2 /* PopupMenuMac.h in Headers */ = {isa = PBXBuildFile; fileRef = D39D006C11F8E308006041F2 /* PopupMenuMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
D39D009D11F907E6006041F2 /* SearchPopupMenuMac.h in Headers */ = {isa = PBXBuildFile; fileRef = D39D009C11F907E6006041F2 /* SearchPopupMenuMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
D3A94A38122DABAC00A37BBC /* MediaQueryList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D3A94A31122DABAC00A37BBC /* MediaQueryList.cpp */; };
D3A94A39122DABAC00A37BBC /* MediaQueryList.h in Headers */ = {isa = PBXBuildFile; fileRef = D3A94A32122DABAC00A37BBC /* MediaQueryList.h */; };
D3A94A3B122DABAC00A37BBC /* MediaQueryListListener.h in Headers */ = {isa = PBXBuildFile; fileRef = D3A94A34122DABAC00A37BBC /* MediaQueryListListener.h */; };
......@@ -6298,7 +6294,6 @@
065AD4F30B0C2EDA005A2B1D /* ContextMenuController.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ContextMenuController.cpp; sourceTree = "<group>"; };
065AD4F40B0C2EDA005A2B1D /* ContextMenuController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ContextMenuController.h; sourceTree = "<group>"; };
0668E1890ADD9624004128E0 /* PopupMenu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PopupMenu.h; sourceTree = "<group>"; };
0668E18E0ADD9640004128E0 /* PopupMenuMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = PopupMenuMac.mm; sourceTree = "<group>"; };
066C772A0AB603B700238CC4 /* FileChooser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FileChooser.h; sourceTree = "<group>"; };
066C772E0AB603FD00238CC4 /* RenderFileUploadControl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderFileUploadControl.cpp; sourceTree = "<group>"; };
066C772F0AB603FD00238CC4 /* RenderFileUploadControl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderFileUploadControl.h; sourceTree = "<group>"; };
......@@ -10459,7 +10454,6 @@
AB67D1A6097F3AE300F9392E /* RenderTextControl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTextControl.cpp; sourceTree = "<group>"; };
AB67D1A7097F3AE300F9392E /* RenderTextControl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderTextControl.h; sourceTree = "<group>"; };
AB7170880B3118080017123E /* SearchPopupMenu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SearchPopupMenu.h; sourceTree = "<group>"; };
AB71709F0B31193B0017123E /* SearchPopupMenuMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = SearchPopupMenuMac.mm; sourceTree = "<group>"; };
ABAF22070C03B1C700B0BCF0 /* ChromeMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ChromeMac.mm; sourceTree = "<group>"; };
ABB5419C0ACDDFE4002820EB /* RenderListBox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderListBox.cpp; sourceTree = "<group>"; };
ABB5419D0ACDDFE4002820EB /* RenderListBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderListBox.h; sourceTree = "<group>"; };
......@@ -12105,8 +12099,6 @@
D359D790129CA3C00006E5D2 /* DOMHTMLDetailsElementInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMHTMLDetailsElementInternal.h; sourceTree = "<group>"; };
D359D8BC129CA55C0006E5D2 /* JSHTMLDetailsElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLDetailsElement.cpp; sourceTree = "<group>"; };
D359D8BD129CA55C0006E5D2 /* JSHTMLDetailsElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLDetailsElement.h; sourceTree = "<group>"; };
D39D006C11F8E308006041F2 /* PopupMenuMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PopupMenuMac.h; sourceTree = "<group>"; };
D39D009C11F907E6006041F2 /* SearchPopupMenuMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchPopupMenuMac.h; sourceTree = "<group>"; };
D3A94A31122DABAC00A37BBC /* MediaQueryList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaQueryList.cpp; sourceTree = "<group>"; };
D3A94A32122DABAC00A37BBC /* MediaQueryList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaQueryList.h; sourceTree = "<group>"; };
D3A94A33122DABAC00A37BBC /* MediaQueryList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaQueryList.idl; sourceTree = "<group>"; };
......@@ -14650,8 +14642,6 @@
C5F765BA14E1ECF4006C899B /* PlatformPasteboardMac.mm */,
BC94D1070C274F88006BC617 /* PlatformScreenMac.mm */,
29E4D8E016B0959800C84704 /* PlatformSpeechSynthesizerMac.mm */,
D39D006C11F8E308006041F2 /* PopupMenuMac.h */,
0668E18E0ADD9640004128E0 /* PopupMenuMac.mm */,
0081FEFE16B0A2B6008AAA7A /* PublicSuffixMac.mm */,
E4D687760ED7AE3D006EA978 /* PurgeableBufferMac.cpp */,
BC0B358214C4F9540055E22A /* RunLoopMac.mm */,
......@@ -14662,8 +14652,6 @@
1AA84F03143BA7BD0051D153 /* ScrollElasticityController.h */,
1AA84F02143BA7BD0051D153 /* ScrollElasticityController.mm */,
9353676A09AED88B00D35CD6 /* ScrollViewMac.mm */,
D39D009C11F907E6006041F2 /* SearchPopupMenuMac.h */,
AB71709F0B31193B0017123E /* SearchPopupMenuMac.mm */,
1A4A95510B4EDCFF002D8C3C /* SharedBufferMac.mm */,
93309E9F099EB78C0056E581 /* SharedTimerMac.mm */,
0A4844980CA44CB200B7BD48 /* SoftLinking.h */,
......@@ -23108,7 +23096,6 @@
5174E20A10A1F44F00F95E6F /* PopStateEvent.h in Headers */,
0668E18B0ADD9624004128E0 /* PopupMenu.h in Headers */,
ABC128770B33AA6D00C693D5 /* PopupMenuClient.h in Headers */,
D39D006D11F8E308006041F2 /* PopupMenuMac.h in Headers */,
BC3BE12B0E98092F00835588 /* PopupMenuStyle.h in Headers */,
37F567CE165358F400DDE92B /* PopupOpeningObserver.h in Headers */,
93F199DE08245E59001E9ABC /* Position.h in Headers */,
......@@ -23401,7 +23388,6 @@
BC6D6E2609AF943500F59759 /* ScrollView.h in Headers */,
F55B3DD21251F12D003EF269 /* SearchInputType.h in Headers */,
AB7170890B3118080017123E /* SearchPopupMenu.h in Headers */,
D39D009D11F907E6006041F2 /* SearchPopupMenuMac.h in Headers */,
976F36EB14686225005E93B4 /* SecurityContext.h in Headers */,
BCD0E0FB0E972C3500265DEA /* SecurityOrigin.h in Headers */,
BCD0E0FC0E972C3500265DEA /* SecurityOriginHash.h in Headers */,
......@@ -26248,7 +26234,6 @@
97059977107D975200A50A7C /* PolicyCallback.cpp in Sources */,
97059979107D975200A50A7C /* PolicyChecker.cpp in Sources */,
5189F0DE10B46B0E00F3C739 /* PopStateEvent.cpp in Sources */,
0668E1900ADD9640004128E0 /* PopupMenuMac.mm in Sources */,
93F19AF808245E59001E9ABC /* Position.cpp in Sources */,
37919C230B7D188600A56998 /* PositionIterator.cpp in Sources */,
B776D43D1104527500BEB0EC /* PrintContext.cpp in Sources */,
......@@ -26481,7 +26466,6 @@
BC2441C40E8B65D00055320F /* ScrollView.cpp in Sources */,
9353676B09AED88B00D35CD6 /* ScrollViewMac.mm in Sources */,
F55B3DD11251F12D003EF269 /* SearchInputType.cpp in Sources */,
AB7170A00B31193B0017123E /* SearchPopupMenuMac.mm in Sources */,
976F36EA14686225005E93B4 /* SecurityContext.cpp in Sources */,
BCD0E0FA0E972C3500265DEA /* SecurityOrigin.cpp in Sources */,
974D2DA4146A535D00D51F8B /* SecurityPolicy.cpp in Sources */,
2013-05-04 Sam Weinig <sam@webkit.org>
Move PopupMenuMac and SearchPopupMenuMac to Source/WebKit/mac
matching where they are in WebKit2.
Reviewed by Anders Carlsson.
* WebKit.xcodeproj/project.pbxproj:
2013-05-02 Roger Fong <roger_fong@apple.com>
Following r149463, set Path for WebKit makefile as well.
......
......@@ -131,6 +131,10 @@
65FFB7FC0AD0B7D30048CD05 /* WebDocumentLoaderMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 65FFB7FA0AD0B7D30048CD05 /* WebDocumentLoaderMac.h */; };
65FFB7FD0AD0B7D30048CD05 /* WebDocumentLoaderMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65FFB7FB0AD0B7D30048CD05 /* WebDocumentLoaderMac.mm */; };
7A8FF0D11075024A00A80A08 /* WebInspectorPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A8FF0D01075024A00A80A08 /* WebInspectorPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
7C01CB85173435C900C5D807 /* PopupMenuMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C01CB81173435C900C5D807 /* PopupMenuMac.h */; };
7C01CB86173435C900C5D807 /* PopupMenuMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C01CB82173435C900C5D807 /* PopupMenuMac.mm */; };
7C01CB87173435C900C5D807 /* SearchPopupMenuMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C01CB83173435C900C5D807 /* SearchPopupMenuMac.h */; };
7C01CB88173435C900C5D807 /* SearchPopupMenuMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C01CB84173435C900C5D807 /* SearchPopupMenuMac.mm */; };
7E6FEF0808985A7200C44C3F /* WebScriptDebugDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E6FEF0508985A7200C44C3F /* WebScriptDebugDelegate.h */; settings = {ATTRIBUTES = (Private, ); }; };
7E6FEF0908985A7200C44C3F /* WebScriptDebugDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7E6FEF0608985A7200C44C3F /* WebScriptDebugDelegate.mm */; };
9304B3000B02341500F7850D /* WebIconDatabaseInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 9304B2FF0B02341500F7850D /* WebIconDatabaseInternal.h */; };
......@@ -556,6 +560,10 @@
7082F56F038EADAA00A80180 /* WebKitNSStringExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebKitNSStringExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
7082F570038EADAA00A80180 /* WebKitNSStringExtras.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 30; indentWidth = 4; path = WebKitNSStringExtras.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
7A8FF0D01075024A00A80A08 /* WebInspectorPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorPrivate.h; sourceTree = "<group>"; };
7C01CB81173435C900C5D807 /* PopupMenuMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PopupMenuMac.h; sourceTree = "<group>"; };
7C01CB82173435C900C5D807 /* PopupMenuMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PopupMenuMac.mm; sourceTree = "<group>"; };
7C01CB83173435C900C5D807 /* SearchPopupMenuMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchPopupMenuMac.h; sourceTree = "<group>"; };
7C01CB84173435C900C5D807 /* SearchPopupMenuMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SearchPopupMenuMac.mm; sourceTree = "<group>"; };
7E6FEF0508985A7200C44C3F /* WebScriptDebugDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebScriptDebugDelegate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
7E6FEF0608985A7200C44C3F /* WebScriptDebugDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebScriptDebugDelegate.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
830E81E005853AC000AD0891 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; };
......@@ -1256,6 +1264,10 @@
children = (
B82958D1132707D0000D0E79 /* CorrectionPanel.h */,
B82958D2132707D0000D0E79 /* CorrectionPanel.mm */,
7C01CB81173435C900C5D807 /* PopupMenuMac.h */,
7C01CB82173435C900C5D807 /* PopupMenuMac.mm */,
7C01CB83173435C900C5D807 /* SearchPopupMenuMac.h */,
7C01CB84173435C900C5D807 /* SearchPopupMenuMac.mm */,
CEDA12DA152CBE6800D9E08D /* WebAlternativeTextClient.h */,
CEDA12D9152CBE6800D9E08D /* WebAlternativeTextClient.mm */,
B68049710FFBCEC1009F7F62 /* WebApplicationCache.h */,
......@@ -1559,6 +1571,7 @@
1AA879B611CBE9BF003C664F /* WebPlatformStrategies.h in Headers */,
939810350824BF01008DF038 /* WebPlugin.h in Headers */,
939810360824BF01008DF038 /* WebPluginContainer.h in Headers */,
7C01CB87173435C900C5D807 /* SearchPopupMenuMac.h in Headers */,
939810B10824BF01008DF038 /* WebPluginContainerCheck.h in Headers */,
939810B00824BF01008DF038 /* WebPluginContainerPrivate.h in Headers */,
939810370824BF01008DF038 /* WebPluginController.h in Headers */,
......@@ -1602,6 +1615,7 @@
939810750824BF01008DF038 /* WebUIDelegate.h in Headers */,
939810830824BF01008DF038 /* WebUIDelegatePrivate.h in Headers */,
939810150824BF01008DF038 /* WebURLsWithTitles.h in Headers */,
7C01CB85173435C900C5D807 /* PopupMenuMac.h in Headers */,
C0C5B3EE1177A4A0002B0AEF /* WebUserContentURLPattern.h in Headers */,
939810700824BF01008DF038 /* WebView.h in Headers */,
BC2E464D0FD8A96800A9D9DE /* WebViewData.h in Headers */,
......@@ -1867,6 +1881,7 @@
511F3FD80CECC88F00852565 /* WebDatabaseManagerClient.mm in Sources */,
A5DEFC1011D5343E00885273 /* WebDatabaseQuotaManager.mm in Sources */,
939810ED0824BF01008DF038 /* WebDataSource.mm in Sources */,
7C01CB88173435C900C5D807 /* SearchPopupMenuMac.mm in Sources */,
939810EF0824BF01008DF038 /* WebDefaultContextMenuDelegate.mm in Sources */,
9398111B0824BF01008DF038 /* WebDefaultEditingDelegate.m in Sources */,
939810F00824BF01008DF038 /* WebDefaultPolicyDelegate.m in Sources */,
......@@ -1883,6 +1898,7 @@
4BF99F910AE050BC00815C2B /* WebEditorClient.mm in Sources */,
DD89682109AA87240097E7F0 /* WebElementDictionary.mm in Sources */,
939810FC0824BF01008DF038 /* WebFormDelegate.m in Sources */,
7C01CB86173435C900C5D807 /* PopupMenuMac.mm in Sources */,
939810F20824BF01008DF038 /* WebFrame.mm in Sources */,
931633EF0AEDFFAE0062B92D /* WebFrameLoaderClient.mm in Sources */,
9391F276121B38BD00EBF7E8 /* WebFrameNetworkingContext.mm in Sources */,
......
2013-05-04 Sam Weinig <sam@webkit.org>
Move PopupMenuMac and SearchPopupMenuMac to Source/WebKit/mac
matching where they are in WebKit2.
Reviewed by Anders Carlsson.
* WebCoreSupport/PopupMenuMac.h: Copied from WebCore/platform/mac/PopupMenuMac.h.
* WebCoreSupport/PopupMenuMac.mm: Copied from WebCore/platform/mac/PopupMenuMac.mm.
* WebCoreSupport/SearchPopupMenuMac.h: Copied from WebCore/platform/mac/SearchPopupMenuMac.h.
* WebCoreSupport/SearchPopupMenuMac.mm: Copied from WebCore/platform/mac/SearchPopupMenuMac.mm.
* WebCoreSupport/WebChromeClient.mm:
2013-05-04 Anders Carlsson <andersca@apple.com>
Get rid of -[NSMutableDictionary _webkit_setObject:forUncopiedKey:]
......
......@@ -20,39 +20,31 @@
#ifndef PopupMenuMac_h
#define PopupMenuMac_h
#include "IntRect.h"
#include "PopupMenu.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <WebCore/PopupMenu.h>
#include <wtf/RetainPtr.h>
OBJC_CLASS NSPopUpButtonCell;
@class NSPopUpButtonCell;
namespace WebCore {
class PopupMenuClient;
class FrameView;
class Scrollbar;
}
class PopupMenuMac : public PopupMenu {
class PopupMenuMac : public WebCore::PopupMenu {
public:
PopupMenuMac(PopupMenuClient*);
PopupMenuMac(WebCore::PopupMenuClient*);
~PopupMenuMac();
virtual void show(const IntRect&, FrameView*, int index);
virtual void hide();
virtual void updateFromElement();
virtual void disconnectClient();
virtual void show(const WebCore::IntRect&, WebCore::FrameView*, int index) override;
virtual void hide() override;
virtual void updateFromElement() override;
virtual void disconnectClient() override;
private:
void clear();
void populate();
PopupMenuClient* client() const { return m_popupClient; }
PopupMenuClient* m_popupClient;
WebCore::PopupMenuClient* m_client;
RetainPtr<NSPopUpButtonCell> m_popup;
};
}
#endif // PopupMenuMac_h
......@@ -18,43 +18,35 @@
* Boston, MA 02110-1301, USA.
*/
#import "config.h"
#import "PopupMenuMac.h"
#import "AXObjectCache.h"
#import "Chrome.h"
#import "ChromeClient.h"
#import "EventHandler.h"
#import "Frame.h"
#import "FrameView.h"
#import "HTMLNames.h"
#import "HTMLOptGroupElement.h"
#import "HTMLOptionElement.h"
#import "HTMLSelectElement.h"
#import "Page.h"
#import "PopupMenuClient.h"
#import "SimpleFontData.h"
#import "WebCoreSystemInterface.h"
namespace WebCore {
using namespace HTMLNames;
#import <WebCore/IntRect.h>
#import <WebCore/AXObjectCache.h>
#import <WebCore/Chrome.h>
#import <WebCore/ChromeClient.h>
#import <WebCore/EventHandler.h>
#import <WebCore/Frame.h>
#import <WebCore/FrameView.h>
#import <WebCore/Page.h>
#import <WebCore/PopupMenuClient.h>
#import <WebCore/SimpleFontData.h>
#import <WebCore/WebCoreSystemInterface.h>
using namespace WebCore;
PopupMenuMac::PopupMenuMac(PopupMenuClient* client)
: m_popupClient(client)
: m_client(client)
{
}
PopupMenuMac::~PopupMenuMac()
{
if (m_popup)
[m_popup.get() setControlView:nil];
[m_popup setControlView:nil];
}
void PopupMenuMac::clear()
{
if (m_popup)
[m_popup.get() removeAllItems];
[m_popup removeAllItems];
}
void PopupMenuMac::populate()
......@@ -62,109 +54,107 @@ void PopupMenuMac::populate()
if (m_popup)
clear();
else {
m_popup = [[NSPopUpButtonCell alloc] initTextCell:@"" pullsDown:!client()->shouldPopOver()];
[m_popup.get() release]; // release here since the RetainPtr has retained the object already
[m_popup.get() setUsesItemFromMenu:NO];
[m_popup.get() setAutoenablesItems:NO];
m_popup = adoptNS([[NSPopUpButtonCell alloc] initTextCell:@"" pullsDown:!m_client->shouldPopOver()]);
[m_popup setUsesItemFromMenu:NO];
[m_popup setAutoenablesItems:NO];
}
BOOL messagesEnabled = [[m_popup.get() menu] menuChangedMessagesEnabled];
[[m_popup.get() menu] setMenuChangedMessagesEnabled:NO];
BOOL messagesEnabled = [[m_popup menu] menuChangedMessagesEnabled];
[[m_popup menu] setMenuChangedMessagesEnabled:NO];
// For pullDown menus the first item is hidden.
if (!client()->shouldPopOver())
[m_popup.get() addItemWithTitle:@""];
if (!m_client->shouldPopOver())
[m_popup addItemWithTitle:@""];
TextDirection menuTextDirection = client()->menuStyle().textDirection();
[m_popup.get() setUserInterfaceLayoutDirection:menuTextDirection == LTR ? NSUserInterfaceLayoutDirectionLeftToRight : NSUserInterfaceLayoutDirectionRightToLeft];
TextDirection menuTextDirection = m_client->menuStyle().textDirection();
[m_popup setUserInterfaceLayoutDirection:menuTextDirection == LTR ? NSUserInterfaceLayoutDirectionLeftToRight : NSUserInterfaceLayoutDirectionRightToLeft];
ASSERT(client());
int size = client()->listSize();
ASSERT(m_client);
int size = m_client->listSize();
for (int i = 0; i < size; i++) {
if (client()->itemIsSeparator(i))
[[m_popup.get() menu] addItem:[NSMenuItem separatorItem]];
else {
PopupMenuStyle style = client()->itemStyle(i);
NSMutableDictionary* attributes = [[NSMutableDictionary alloc] init];
if (style.font() != Font()) {
NSFont *font = style.font().primaryFont()->getNSFont();
if (!font) {
CGFloat size = style.font().primaryFont()->platformData().size();
font = style.font().weight() < FontWeightBold ? [NSFont systemFontOfSize:size] : [NSFont boldSystemFontOfSize:size];
}
[attributes setObject:font forKey:NSFontAttributeName];
}
if (m_client->itemIsSeparator(i)) {
[[m_popup menu] addItem:[NSMenuItem separatorItem]];
continue;
}
RetainPtr<NSMutableParagraphStyle> paragraphStyle = adoptNS([[NSParagraphStyle defaultParagraphStyle] mutableCopy]);
[paragraphStyle.get() setAlignment:menuTextDirection == LTR ? NSLeftTextAlignment : NSRightTextAlignment];
NSWritingDirection writingDirection = style.textDirection() == LTR ? NSWritingDirectionLeftToRight : NSWritingDirectionRightToLeft;
[paragraphStyle.get() setBaseWritingDirection:writingDirection];
if (style.hasTextDirectionOverride()) {
RetainPtr<NSNumber> writingDirectionValue = adoptNS([[NSNumber alloc] initWithInteger:writingDirection + NSTextWritingDirectionOverride]);
RetainPtr<NSArray> writingDirectionArray = adoptNS([[NSArray alloc] initWithObjects:writingDirectionValue.get(), nil]);
[attributes setObject:writingDirectionArray.get() forKey:NSWritingDirectionAttributeName];
}
[attributes setObject:paragraphStyle.get() forKey:NSParagraphStyleAttributeName];
// FIXME: Add support for styling the foreground and background colors.
// FIXME: Find a way to customize text color when an item is highlighted.
NSAttributedString *string = [[NSAttributedString alloc] initWithString:client()->itemText(i) attributes:attributes];
[attributes release];
[m_popup.get() addItemWithTitle:@""];
NSMenuItem *menuItem = [m_popup.get() lastItem];
[menuItem setAttributedTitle:string];
// We set the title as well as the attributed title here. The attributed title will be displayed in the menu,
// but typeahead will use the non-attributed string that doesn't contain any leading or trailing whitespace.
[menuItem setTitle:[[string string] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]];
[menuItem setEnabled:client()->itemIsEnabled(i)];
[menuItem setToolTip:client()->itemToolTip(i)];
[string release];
// Allow the accessible text of the item to be overriden if necessary.
if (AXObjectCache::accessibilityEnabled()) {
NSString *accessibilityOverride = client()->itemAccessibilityText(i);
if ([accessibilityOverride length])
[menuItem accessibilitySetOverrideValue:accessibilityOverride forAttribute:NSAccessibilityDescriptionAttribute];
PopupMenuStyle style = m_client->itemStyle(i);
RetainPtr<NSMutableDictionary> attributes = adoptNS([[NSMutableDictionary alloc] init]);
if (style.font() != Font()) {
NSFont *font = style.font().primaryFont()->getNSFont();
if (!font) {
CGFloat size = style.font().primaryFont()->platformData().size();
font = style.font().weight() < FontWeightBold ? [NSFont systemFontOfSize:size] : [NSFont boldSystemFontOfSize:size];
}
[attributes setObject:font forKey:NSFontAttributeName];
}
RetainPtr<NSMutableParagraphStyle> paragraphStyle = adoptNS([[NSParagraphStyle defaultParagraphStyle] mutableCopy]);
[paragraphStyle setAlignment:menuTextDirection == LTR ? NSLeftTextAlignment : NSRightTextAlignment];
NSWritingDirection writingDirection = style.textDirection() == LTR ? NSWritingDirectionLeftToRight : NSWritingDirectionRightToLeft;
[paragraphStyle setBaseWritingDirection:writingDirection];
if (style.hasTextDirectionOverride()) {
RetainPtr<NSNumber> writingDirectionValue = adoptNS([[NSNumber alloc] initWithInteger:writingDirection + NSTextWritingDirectionOverride]);
RetainPtr<NSArray> writingDirectionArray = adoptNS([[NSArray alloc] initWithObjects:writingDirectionValue.get(), nil]);
[attributes setObject:writingDirectionArray.get() forKey:NSWritingDirectionAttributeName];
}
[attributes setObject:paragraphStyle.get() forKey:NSParagraphStyleAttributeName];
// FIXME: Add support for styling the foreground and background colors.
// FIXME: Find a way to customize text color when an item is highlighted.
RetainPtr<NSAttributedString> string = adoptNS([[NSAttributedString alloc] initWithString:m_client->itemText(i) attributes:attributes.get()]);
[m_popup addItemWithTitle:@""];
NSMenuItem *menuItem = [m_popup lastItem];
[menuItem setAttributedTitle:string.get()];
// We set the title as well as the attributed title here. The attributed title will be displayed in the menu,
// but typeahead will use the non-attributed string that doesn't contain any leading or trailing whitespace.
[menuItem setTitle:[[string string] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]];
[menuItem setEnabled:m_client->itemIsEnabled(i)];
[menuItem setToolTip:m_client->itemToolTip(i)];
// Allow the accessible text of the item to be overriden if necessary.
if (AXObjectCache::accessibilityEnabled()) {
NSString *accessibilityOverride = m_client->itemAccessibilityText(i);
if ([accessibilityOverride length])
[menuItem accessibilitySetOverrideValue:accessibilityOverride forAttribute:NSAccessibilityDescriptionAttribute];
}
}
[[m_popup.get() menu] setMenuChangedMessagesEnabled:messagesEnabled];
[[m_popup menu] setMenuChangedMessagesEnabled:messagesEnabled];
}
void PopupMenuMac::show(const IntRect& r, FrameView* v, int index)
{
populate();
int numItems = [m_popup.get() numberOfItems];
int numItems = [m_popup numberOfItems];
if (numItems <= 0) {
if (client())
client()->popupDidHide();
if (m_client)
m_client->popupDidHide();
return;
}
ASSERT(numItems > index);
// Workaround for crazy bug where a selected index of -1 for a menu with only 1 item will cause a blank menu.
if (index == -1 && numItems == 2 && !client()->shouldPopOver() && ![[m_popup.get() itemAtIndex:1] isEnabled])
if (index == -1 && numItems == 2 && !m_client->shouldPopOver() && ![[m_popup itemAtIndex:1] isEnabled])
index = 0;
NSView* view = v->documentView();
[m_popup.get() attachPopUpWithFrame:r inView:view];
[m_popup.get() selectItemAtIndex:index];
[m_popup attachPopUpWithFrame:r inView:view];
[m_popup selectItemAtIndex:index];
NSMenu* menu = [m_popup.get() menu];
NSMenu* menu = [m_popup menu];
NSPoint location;
NSFont* font = client()->menuStyle().font().primaryFont()->getNSFont();
NSFont* font = m_client->menuStyle().font().primaryFont()->getNSFont();
// These values were borrowed from AppKit to match their placement of the menu.
const int popOverHorizontalAdjust = -10;
const int popUnderHorizontalAdjust = 6;
const int popUnderVerticalAdjust = 6;
if (client()->shouldPopOver()) {
NSRect titleFrame = [m_popup.get() titleRectForBounds:r];
if (m_client->shouldPopOver()) {
NSRect titleFrame = [m_popup titleRectForBounds:r];
if (titleFrame.size.width <= 0 || titleFrame.size.height <= 0)
titleFrame = r;
float vertOffset = roundf((NSMaxY(r) - NSMaxY(titleFrame)) + NSHeight(titleFrame));
......@@ -180,43 +170,42 @@ void PopupMenuMac::show(const IntRect& r, FrameView* v, int index)
// Save the current event that triggered the popup, so we can clean up our event
// state after the NSMenu goes away.
RefPtr<Frame> frame = v->frame();
NSEvent* event = [frame->eventHandler()->currentNSEvent() retain];
RetainPtr<NSEvent> event = frame->eventHandler()->currentNSEvent();
RefPtr<PopupMenuMac> protector(this);
RetainPtr<NSView> dummyView = adoptNS([[NSView alloc] initWithFrame:r]);
[view addSubview:dummyView.get()];
location = [dummyView.get() convertPoint:location fromView:view];
location = [dummyView convertPoint:location fromView:view];
if (Page* page = frame->page())
page->chrome()->client()->willPopUpMenu(menu);
wkPopupMenu(menu, location, roundf(NSWidth(r)), dummyView.get(), index, font);
[m_popup.get() dismissPopUp];
[dummyView.get() removeFromSuperview];
[m_popup dismissPopUp];
[dummyView removeFromSuperview];
if (client()) {
int newIndex = [m_popup.get() indexOfSelectedItem];
client()->popupDidHide();
if (!m_client)
return;
// Adjust newIndex for hidden first item.
if (!client()->shouldPopOver())
newIndex--;
int newIndex = [m_popup indexOfSelectedItem];
m_client->popupDidHide();
if (index != newIndex && newIndex >= 0)
client()->valueChanged(newIndex);
// Adjust newIndex for hidden first item.
if (!m_client->shouldPopOver())
newIndex--;
// Give the frame a chance to fix up its event state, since the popup eats all the
// events during tracking.
frame->eventHandler()->sendFakeEventsAfterWidgetTracking(event);
}
if (index != newIndex && newIndex >= 0)
m_client->valueChanged(newIndex);
[event release];
// Give the frame a chance to fix up its event state, since the popup eats all the
// events during tracking.
frame->eventHandler()->sendFakeEventsAfterWidgetTracking(event.get());
}
void PopupMenuMac::hide()
{
[m_popup.get() dismissPopUp];
[m_popup dismissPopUp];
}
void PopupMenuMac::updateFromElement()
......@@ -225,7 +214,5 @@ void PopupMenuMac::updateFromElement()
void PopupMenuMac::disconnectClient()
{
m_popupClient = 0;
}
m_client = 0;
}
......@@ -21,24 +21,27 @@
#ifndef SearchPopupMenuMac_h
#define SearchPopupMenuMac_h
#include "PopupMenuMac.h"
#include "SearchPopupMenu.h"
#include <WebCore/SearchPopupMenu.h>
namespace WebCore {
class PopupMenuClient;
}
class PopupMenuMac;
class SearchPopupMenuMac : public SearchPopupMenu {
class SearchPopupMenuMac : public WebCore::SearchPopupMenu {
public:
SearchPopupMenuMac(PopupMenuClient*);
SearchPopupMenuMac(WebCore::PopupMenuClient*);
~SearchPopupMenuMac();
virtual PopupMenu* popupMenu();
virtual void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems);
virtual void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems);
virtual bool enabled();
virtual WebCore::PopupMenu* popupMenu() override;
virtual void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems) override;
virtual void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems) override;
virtual bool enabled() override;
private:
RefPtr<PopupMenuMac> m_popup;
};
}
#endif // SearchPopupMenuMac_h