Changeset 250549 in webkit
- Timestamp:
- Sep 30, 2019, 11:17:53 PM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/PAL/ChangeLog
r250522 r250549 1 2019-09-30 Alex Christensen <achristensen@webkit.org> 2 3 Unify more WebKitLegacy sources 4 https://bugs.webkit.org/show_bug.cgi?id=202390 5 6 Reviewed by Tim Horton. 7 8 * pal/spi/mac/QuickLookMacSPI.h: 9 1 10 2019-09-27 Keith Rollin <krollin@apple.com> 2 11 -
trunk/Source/WebCore/PAL/pal/spi/mac/QuickLookMacSPI.h
r240211 r250549 26 26 #import <Quartz/Quartz.h> 27 27 28 #if USE(APPLE_INTERNAL_SDK) 29 30 #import <Quartz/QuartzPrivate.h> 31 32 #else 33 28 34 @protocol QLPreviewMenuItemDelegate <NSObject> 29 35 @optional … … 52 58 @property QLPreviewStyle previewStyle; 53 59 @end 60 61 #endif // USE(APPLE_INTERNAL_SDK) -
trunk/Source/WebKitLegacy/ChangeLog
r249750 r250549 1 2019-09-30 Alex Christensen <achristensen@webkit.org> 2 3 Unify more WebKitLegacy sources 4 https://bugs.webkit.org/show_bug.cgi?id=202390 5 6 Reviewed by Tim Horton. 7 8 These files were causing problems with the CMake build, but only if not unified. 9 So I unified them and sped up the build too, without changing any behavior. 10 11 * SourcesCocoa.txt: 12 * UnifiedSources-output.xcfilelist: 13 * WebKitLegacy.xcodeproj/project.pbxproj: 14 * scripts/generate-unified-sources.sh: 15 1 16 2019-09-10 Fujii Hironori <Hironori.Fujii@sony.com> 2 17 -
trunk/Source/WebKitLegacy/SourcesCocoa.txt
r247570 r250549 156 156 mac/DOM/WebDOMOperations.mm 157 157 158 mac/DefaultDelegates/WebDefaultContextMenuDelegate.mm 159 160 mac/Misc/WebSharingServicePickerController.mm 161 162 mac/Plugins/WebBasePluginPackage.mm 163 mac/Plugins/WebPluginContainerCheck.mm 164 mac/Plugins/WebPluginController.mm 165 mac/Plugins/WebPluginDatabase.mm 166 167 mac/History/WebBackForwardList.mm 168 158 169 mac/WebCoreSupport/WebApplicationCache.mm 159 170 mac/WebCoreSupport/WebApplicationCacheQuotaManager.mm 171 mac/WebCoreSupport/WebFrameLoaderClient.mm 172 173 mac/WebInspector/WebInspector.mm 174 175 mac/WebView/WebClipView.mm 176 mac/WebView/WebDataSource.mm 177 mac/WebView/WebFrame.mm 178 mac/WebView/WebFrameView.mm 179 mac/WebView/WebFullScreenController.mm 180 mac/WebView/WebHTMLView.mm 181 mac/WebView/WebImmediateActionController.mm 182 mac/WebView/WebPDFRepresentation.mm 183 mac/WebView/WebPDFView.mm 184 mac/WebView/WebScriptDebugger.mm 185 mac/WebView/WebScriptDebugDelegate.mm 186 mac/WebView/WebScriptWorld.mm 187 mac/WebView/WebView.mm -
trunk/Source/WebKitLegacy/UnifiedSources-output.xcfilelist
r248051 r250549 11 11 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/unified-sources/UnifiedSource17-mm.mm 12 12 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/unified-sources/UnifiedSource18-mm.mm 13 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/unified-sources/UnifiedSource19-mm.mm 13 14 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/unified-sources/UnifiedSource2-mm.mm 14 15 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/unified-sources/UnifiedSource2.cpp 16 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/unified-sources/UnifiedSource20-mm.mm 15 17 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/unified-sources/UnifiedSource3-mm.mm 16 18 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/unified-sources/UnifiedSource3.cpp -
trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj
r248498 r250549 115 115 29AEF960134C76FB00FE5096 /* OutlookQuirksUserScript.js in Resources */ = {isa = PBXBuildFile; fileRef = 29AEF95D134C755400FE5096 /* OutlookQuirksUserScript.js */; }; 116 116 2D25396618CE85C200270222 /* WebSharingServicePickerController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D25396418CE85C200270222 /* WebSharingServicePickerController.h */; }; 117 2D25396718CE85C200270222 /* WebSharingServicePickerController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D25396518CE85C200270222 /* WebSharingServicePickerController.mm */; };118 117 2DD632C219E5D1F0002E9C7B /* WebSelectionServiceController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DD632C019E5D1F0002E9C7B /* WebSelectionServiceController.h */; }; 119 118 2DD632C319E5D1F0002E9C7B /* WebSelectionServiceController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DD632C119E5D1F0002E9C7B /* WebSelectionServiceController.mm */; }; … … 190 189 5C7E787522D95FE20006A230 /* UnifiedSource12-mm.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C7E786822D95FE20006A230 /* UnifiedSource12-mm.mm */; }; 191 190 5C7E787622D95FE20006A230 /* UnifiedSource11-mm.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C7E786922D95FE20006A230 /* UnifiedSource11-mm.mm */; }; 191 5C97EF632342C534006020D4 /* UnifiedSource19-mm.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C97EF612342C534006020D4 /* UnifiedSource19-mm.mm */; }; 192 5C97EF642342C534006020D4 /* UnifiedSource20-mm.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C97EF622342C534006020D4 /* UnifiedSource20-mm.mm */; }; 192 193 5C9A4E5322DE4627007DB353 /* DOMUIKitExtensions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93D436371D57ABEE00AB85EA /* DOMUIKitExtensions.mm */; }; 193 194 5C9D925A22D7E8AD008E9266 /* Sources.txt in Resources */ = {isa = PBXBuildFile; fileRef = 5C9D925822D7E8AD008E9266 /* Sources.txt */; }; … … 206 207 5CE44F4A206D70EA003EFD01 /* PingHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CE44F49206D70E9003EFD01 /* PingHandle.h */; }; 207 208 5D7BF8140C2A1D90008CE06D /* WebInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D7BF8120C2A1D90008CE06D /* WebInspector.h */; settings = {ATTRIBUTES = (Private, ); }; }; 208 5D7BF8150C2A1D90008CE06D /* WebInspector.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5D7BF8130C2A1D90008CE06D /* WebInspector.mm */; };209 209 5DE83A7A0D0F7F9400CAD12A /* WebJavaScriptTextInputPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5DE83A740D0F7F9400CAD12A /* WebJavaScriptTextInputPanel.xib */; }; 210 210 65488DA1084FBCCB00831AD0 /* WebNSDictionaryExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 65488D9F084FBCCB00831AD0 /* WebNSDictionaryExtras.h */; }; … … 225 225 7C1FB3C21846E8E1001A03D8 /* WebAllowDenyPolicyListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C1FB3C11846E8E1001A03D8 /* WebAllowDenyPolicyListener.h */; settings = {ATTRIBUTES = (Private, ); }; }; 226 226 7E6FEF0808985A7200C44C3F /* WebScriptDebugDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E6FEF0508985A7200C44C3F /* WebScriptDebugDelegate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 227 7E6FEF0908985A7200C44C3F /* WebScriptDebugDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7E6FEF0608985A7200C44C3F /* WebScriptDebugDelegate.mm */; };228 227 931633EB0AEDFF930062B92D /* WebFrameLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 931633EA0AEDFF930062B92D /* WebFrameLoaderClient.h */; }; 229 931633EF0AEDFFAE0062B92D /* WebFrameLoaderClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 931633EE0AEDFFAE0062B92D /* WebFrameLoaderClient.mm */; };230 228 9321D5921A391DC3008052BE /* WebImmediateActionController.h in Headers */ = {isa = PBXBuildFile; fileRef = 9321D5911A391DB8008052BE /* WebImmediateActionController.h */; }; 231 9321D5941A391DF9008052BE /* WebImmediateActionController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9321D5931A391DF9008052BE /* WebImmediateActionController.mm */; };232 229 934C11670D8710BB00C32ABD /* WebDynamicScrollBarsViewInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 934C11660D8710BB00C32ABD /* WebDynamicScrollBarsViewInternal.h */; }; 233 230 934C4A910F01406C009372C0 /* WebNSObjectExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 934C4A900F01406C009372C0 /* WebNSObjectExtras.mm */; }; … … 327 324 939810B50824BF01008DF038 /* WebAuthenticationPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9345D17B0365BF35008635CE /* WebAuthenticationPanel.xib */; }; 328 325 939810B70824BF01008DF038 /* url_icon.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5B67130023EDF8901C1A525 /* url_icon.tiff */; }; 329 939810BC0824BF01008DF038 /* WebBackForwardList.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3944607E020F50ED0ECA1767 /* WebBackForwardList.mm */; };330 326 939810BD0824BF01008DF038 /* WebHistoryItem.mm in Sources */ = {isa = PBXBuildFile; fileRef = 39446080020F50ED0ECA1767 /* WebHistoryItem.mm */; }; 331 327 939810BE0824BF01008DF038 /* WebURLsWithTitles.m in Sources */ = {isa = PBXBuildFile; fileRef = F5E0A76F02B8FEE401C1A525 /* WebURLsWithTitles.m */; }; … … 344 340 939810D00824BF01008DF038 /* WebPanelAuthenticationHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 93154EF203A41270008635CE /* WebPanelAuthenticationHandler.m */; }; 345 341 939810D10824BF01008DF038 /* WebNetscapePluginStream.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5A672BA0263866E01000102 /* WebNetscapePluginStream.mm */; }; 346 939810D30824BF01008DF038 /* WebBasePluginPackage.mm in Sources */ = {isa = PBXBuildFile; fileRef = 83E4AF47036652150000E506 /* WebBasePluginPackage.mm */; };347 342 939810D60824BF01008DF038 /* WebNetscapePluginPackage.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5F7171F0288493C018635CA /* WebNetscapePluginPackage.mm */; }; 348 939810DA0824BF01008DF038 /* WebPluginController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8467275D0367158500CA2ACA /* WebPluginController.mm */; };349 939810DB0824BF01008DF038 /* WebPluginDatabase.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5F717210288493C018635CA /* WebPluginDatabase.mm */; };350 343 939810DC0824BF01008DF038 /* WebPluginPackage.mm in Sources */ = {isa = PBXBuildFile; fileRef = 83E4AF4C036659440000E506 /* WebPluginPackage.mm */; }; 351 344 939810DD0824BF01008DF038 /* npapi.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5F717230288493C018635CA /* npapi.mm */; }; 352 345 939810E40824BF01008DF038 /* WebJavaScriptTextInputPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9345D4EB0365C5B2008635CE /* WebJavaScriptTextInputPanel.m */; }; 353 939810EB0824BF01008DF038 /* WebClipView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 933D659A03413FF2008635CE /* WebClipView.mm */; };354 939810ED0824BF01008DF038 /* WebDataSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 39446071020F50ED0ECA1767 /* WebDataSource.mm */; };355 939810EF0824BF01008DF038 /* WebDefaultContextMenuDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5152FADE033FC50400CA2ACD /* WebDefaultContextMenuDelegate.mm */; };356 346 939810F00824BF01008DF038 /* WebDefaultPolicyDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5152FAE0033FC50400CA2ACD /* WebDefaultPolicyDelegate.m */; }; 357 347 939810F10824BF01008DF038 /* WebDynamicScrollBarsView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3944606C020F50ED0ECA1767 /* WebDynamicScrollBarsView.mm */; }; 358 939810F20824BF01008DF038 /* WebFrame.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5143A370221DCCE01A80181 /* WebFrame.mm */; };359 348 939810F30824BF01008DF038 /* WebHTMLRepresentation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35081D9302B6D4D80ACA2ACA /* WebHTMLRepresentation.mm */; }; 360 939810F40824BF01008DF038 /* WebHTMLView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35081D9502B6D4D80ACA2ACA /* WebHTMLView.mm */; };361 349 939810F80824BF01008DF038 /* WebPreferences.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5AEBB3D024A527601C1A526 /* WebPreferences.mm */; }; 362 350 939810FC0824BF01008DF038 /* WebFormDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D81DAB303EB0B2D00A80166 /* WebFormDelegate.m */; }; 363 351 939811030824BF01008DF038 /* WebKitErrors.m in Sources */ = {isa = PBXBuildFile; fileRef = 83730F9803FB1E660004736E /* WebKitErrors.m */; }; 364 939811060824BF01008DF038 /* WebFrameView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51A8B52F04282B5900CA2D3A /* WebFrameView.mm */; };365 939811070824BF01008DF038 /* WebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51A8B57A042834F700CA2D3A /* WebView.mm */; };366 352 939811080824BF01008DF038 /* WebPolicyDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51443F9B0429392B00CA2D3A /* WebPolicyDelegate.mm */; }; 367 353 9398110A0824BF01008DF038 /* WebDefaultUIDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 515E27D00458CA4B00CA2D3A /* WebDefaultUIDelegate.mm */; }; … … 374 360 9398111B0824BF01008DF038 /* WebDefaultEditingDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BE95BEE505FD0805006E1513 /* WebDefaultEditingDelegate.m */; }; 375 361 9398111D0824BF01008DF038 /* WebArchive.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8373435B0624EE0D00F3B289 /* WebArchive.mm */; }; 376 9398111E0824BF01008DF038 /* WebPDFView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E94C3506C0321200A9B09E /* WebPDFView.mm */; };377 9398111F0824BF01008DF038 /* WebPDFRepresentation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E94C6906C0347500A9B09E /* WebPDFRepresentation.mm */; };378 939811260824BF01008DF038 /* WebPluginContainerCheck.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65E1150407EFFEBF009B8BF7 /* WebPluginContainerCheck.mm */; };379 362 93D4364D1D57ABEE00AB85EA /* DOM.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D434FB1D57ABEE00AB85EA /* DOM.h */; settings = {ATTRIBUTES = (Private, ); }; }; 380 363 93D4364F1D57ABEE00AB85EA /* DOMAbstractView.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D434FD1D57ABEE00AB85EA /* DOMAbstractView.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 675 658 BC7F88A510C9D88B00D6133D /* WebGeolocationPositionInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7F88A410C9D88B00D6133D /* WebGeolocationPositionInternal.h */; }; 676 659 C0167BF80D7F5DD00028696E /* WebScriptDebugger.h in Headers */ = {isa = PBXBuildFile; fileRef = C0167BF60D7F5DD00028696E /* WebScriptDebugger.h */; }; 677 C0167BF90D7F5DD00028696E /* WebScriptDebugger.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0167BF70D7F5DD00028696E /* WebScriptDebugger.mm */; };678 660 C0B1F7E810AC8E3100C925D9 /* WebScriptWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = C0B1F7E510AC8E3100C925D9 /* WebScriptWorld.h */; settings = {ATTRIBUTES = (Private, ); }; }; 679 C0B1F7E910AC8E3100C925D9 /* WebScriptWorld.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0B1F7E610AC8E3100C925D9 /* WebScriptWorld.mm */; };680 661 C0B1F7EA10AC8E3100C925D9 /* WebScriptWorldInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = C0B1F7E710AC8E3100C925D9 /* WebScriptWorldInternal.h */; }; 681 662 C0B88E8B10A08F3D00FBB3F5 /* WebFrameLoadDelegatePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = C0B88E8A10A08F3D00FBB3F5 /* WebFrameLoadDelegatePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 690 671 CD8BFCE815531224005AFB25 /* WebKitFullScreenListener.h in Headers */ = {isa = PBXBuildFile; fileRef = CD8BFCE615531224005AFB25 /* WebKitFullScreenListener.h */; }; 691 672 CDA62AE2125F87C2007FD118 /* WebFullScreenController.h in Headers */ = {isa = PBXBuildFile; fileRef = CDA62AE0125F87C2007FD118 /* WebFullScreenController.h */; }; 692 CDA62AE3125F87C2007FD118 /* WebFullScreenController.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDA62AE1125F87C2007FD118 /* WebFullScreenController.mm */; };693 673 CEDA12DB152CBE6800D9E08D /* WebAlternativeTextClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = CEDA12D9152CBE6800D9E08D /* WebAlternativeTextClient.mm */; }; 694 674 CEDA12DC152CBE6800D9E08D /* WebAlternativeTextClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CEDA12DA152CBE6800D9E08D /* WebAlternativeTextClient.h */; }; … … 716 696 filePatterns = "*.h"; 717 697 fileType = pattern.proxy; 698 inputFiles = ( 699 ); 718 700 isEditable = 1; 719 701 outputFiles = ( … … 954 936 5C7E786822D95FE20006A230 /* UnifiedSource12-mm.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UnifiedSource12-mm.mm"; sourceTree = "<group>"; }; 955 937 5C7E786922D95FE20006A230 /* UnifiedSource11-mm.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UnifiedSource11-mm.mm"; sourceTree = "<group>"; }; 938 5C97EF612342C534006020D4 /* UnifiedSource19-mm.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = "UnifiedSource19-mm.mm"; path = "UnifiedSource19-mm.mm"; sourceTree = "<group>"; }; 939 5C97EF622342C534006020D4 /* UnifiedSource20-mm.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = "UnifiedSource20-mm.mm"; path = "UnifiedSource20-mm.mm"; sourceTree = "<group>"; }; 956 940 5C9D925822D7E8AD008E9266 /* Sources.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Sources.txt; sourceTree = "<group>"; }; 957 941 5C9D925922D7E8AD008E9266 /* SourcesCocoa.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SourcesCocoa.txt; sourceTree = "<group>"; }; … … 1936 1920 5C7E786422D95FE20006A230 /* UnifiedSource17-mm.mm */, 1937 1921 5C7E785E22D95FE10006A230 /* UnifiedSource18-mm.mm */, 1922 5C97EF612342C534006020D4 /* UnifiedSource19-mm.mm */, 1923 5C97EF622342C534006020D4 /* UnifiedSource20-mm.mm */, 1938 1924 ); 1939 1925 path = "unified-sources"; … … 3459 3445 5C7E787122D95FE20006A230 /* UnifiedSource17-mm.mm in Sources */, 3460 3446 5C7E786B22D95FE20006A230 /* UnifiedSource18-mm.mm in Sources */, 3447 5C97EF632342C534006020D4 /* UnifiedSource19-mm.mm in Sources */, 3448 5C97EF642342C534006020D4 /* UnifiedSource20-mm.mm in Sources */, 3461 3449 CEDA12DB152CBE6800D9E08D /* WebAlternativeTextClient.mm in Sources */, 3462 3450 9398111D0824BF01008DF038 /* WebArchive.mm in Sources */, 3463 3451 939810CF0824BF01008DF038 /* WebAuthenticationPanel.m in Sources */, 3464 939810BC0824BF01008DF038 /* WebBackForwardList.mm in Sources */,3465 3452 1A4DF5E50EC8D104006BD4B4 /* WebBaseNetscapePluginView.mm in Sources */, 3466 939810D30824BF01008DF038 /* WebBasePluginPackage.mm in Sources */,3467 3453 5241ADF60B1BC48A004012BD /* WebCache.mm in Sources */, 3468 3454 14D825300AF955090004F057 /* WebChromeClient.mm in Sources */, 3469 3455 A10C1D651820300E0036883A /* WebChromeClientIOS.mm in Sources */, 3470 939810EB0824BF01008DF038 /* WebClipView.mm in Sources */,3471 3456 065AD5A40B0C32C7005A2B1D /* WebContextMenuClient.mm in Sources */, 3472 3457 939810BF0824BF01008DF038 /* WebCoreStatistics.mm in Sources */, … … 3477 3462 512BDB531C471591006494DF /* WebDatabaseProvider.mm in Sources */, 3478 3463 A5DEFC1011D5343E00885273 /* WebDatabaseQuotaManager.mm in Sources */, 3479 939810ED0824BF01008DF038 /* WebDataSource.mm in Sources */,3480 939810EF0824BF01008DF038 /* WebDefaultContextMenuDelegate.mm in Sources */,3481 3464 9398111B0824BF01008DF038 /* WebDefaultEditingDelegate.m in Sources */, 3482 3465 A10C1D1918202F9C0036883A /* WebDefaultFormDelegate.m in Sources */, … … 3498 3481 A10C1D691820300E0036883A /* WebFixedPositionContent.mm in Sources */, 3499 3482 939810FC0824BF01008DF038 /* WebFormDelegate.m in Sources */, 3500 939810F20824BF01008DF038 /* WebFrame.mm in Sources */,3501 3483 A10C1D6C1820300E0036883A /* WebFrameIOS.mm in Sources */, 3502 931633EF0AEDFFAE0062B92D /* WebFrameLoaderClient.mm in Sources */,3503 3484 9391F276121B38BD00EBF7E8 /* WebFrameNetworkingContext.mm in Sources */, 3504 939811060824BF01008DF038 /* WebFrameView.mm in Sources */,3505 3485 A10C1D7F1820303D0036883A /* WebFrameViewWAKCompatibility.m in Sources */, 3506 CDA62AE3125F87C2007FD118 /* WebFullScreenController.mm in Sources */,3507 3486 A10C1D6E1820300E0036883A /* WebGeolocation.mm in Sources */, 3508 3487 BC7F884C10C8775A00D6133D /* WebGeolocationClient.mm in Sources */, … … 3514 3493 1AAF5FC00EDE3A92008D883D /* WebHostedNetscapePluginView.mm in Sources */, 3515 3494 939810F30824BF01008DF038 /* WebHTMLRepresentation.mm in Sources */, 3516 939810F40824BF01008DF038 /* WebHTMLView.mm in Sources */,3517 3495 939810C10824BF01008DF038 /* WebIconDatabase.mm in Sources */, 3518 9321D5941A391DF9008052BE /* WebImmediateActionController.mm in Sources */,3519 3496 A560946714D8AD2600799A8A /* WebIndicateLayer.mm in Sources */, 3520 5D7BF8150C2A1D90008CE06D /* WebInspector.mm in Sources */,3521 3497 06693DDD0BFBA85200216072 /* WebInspectorClient.mm in Sources */, 3522 3498 1C7B0C660EB2464D00A28502 /* WebInspectorClientCF.cpp in Sources */, … … 3568 3544 1AB1F76F1D1B260B007C9BD1 /* WebPaymentCoordinatorClient.mm in Sources */, 3569 3545 37B6FB4F1063530C000FDB3B /* WebPDFDocumentExtras.mm in Sources */, 3570 9398111F0824BF01008DF038 /* WebPDFRepresentation.mm in Sources */,3571 9398111E0824BF01008DF038 /* WebPDFView.mm in Sources */,3572 3546 A10C1D8B1820305E0036883A /* WebPDFViewIOS.mm in Sources */, 3573 3547 A10C1D8E1820305E0036883A /* WebPDFViewPlaceholder.mm in Sources */, 3574 3548 A10C1D821820303D0036883A /* WebPlainWhiteView.mm in Sources */, 3575 3549 1AA879B711CBE9BF003C664F /* WebPlatformStrategies.mm in Sources */, 3576 939811260824BF01008DF038 /* WebPluginContainerCheck.mm in Sources */,3577 939810DA0824BF01008DF038 /* WebPluginController.mm in Sources */,3578 939810DB0824BF01008DF038 /* WebPluginDatabase.mm in Sources */,3579 3550 1A08FEE01D59376E008BA8CB /* WebPluginInfoProvider.mm in Sources */, 3580 3551 939810DC0824BF01008DF038 /* WebPluginPackage.mm in Sources */, … … 3584 3555 1A6A208D1886154600E50F5F /* WebProgressTrackerClient.mm in Sources */, 3585 3556 9398111A0824BF01008DF038 /* WebResource.mm in Sources */, 3586 7E6FEF0908985A7200C44C3F /* WebScriptDebugDelegate.mm in Sources */,3587 C0167BF90D7F5DD00028696E /* WebScriptDebugger.mm in Sources */,3588 C0B1F7E910AC8E3100C925D9 /* WebScriptWorld.mm in Sources */,3589 3557 A5DEFC0A11D5331C00885273 /* WebSecurityOrigin.mm in Sources */, 3590 3558 A10C1D751820300E0036883A /* WebSelectionRect.m in Sources */, 3591 3559 2DD632C319E5D1F0002E9C7B /* WebSelectionServiceController.mm in Sources */, 3592 2D25396718CE85C200270222 /* WebSharingServicePickerController.mm in Sources */,3593 3560 3AB02AF612C1319B00FBB694 /* WebStorageManager.mm in Sources */, 3594 3561 1A591D451A2E91BB000907C4 /* WebStorageNamespaceProvider.cpp in Sources */, … … 3605 3572 C1D81128202CD80000EE74F9 /* WebVideoFullscreenController.mm in Sources */, 3606 3573 C1D8112B202CDCC400EE74F9 /* WebVideoFullscreenHUDWindowController.mm in Sources */, 3607 939811070824BF01008DF038 /* WebView.mm in Sources */,3608 3574 BC2E464E0FD8A96800A9D9DE /* WebViewData.mm in Sources */, 3609 3575 1430C12C1B2C5DF700DEA01D /* WebViewGroup.cpp in Sources */, -
trunk/Source/WebKitLegacy/mac/ChangeLog
r250365 r250549 1 2019-09-30 Alex Christensen <achristensen@webkit.org> 2 3 Unify more WebKitLegacy sources 4 https://bugs.webkit.org/show_bug.cgi?id=202390 5 6 Reviewed by Tim Horton. 7 8 * WebCoreSupport/WebFrameLoaderClient.mm: 9 (dataSource): 10 (WebFrameLoaderClient::pageID const): 11 (WebFrameLoaderClient::frameID const): 12 (WebFrameLoaderClient::makeRepresentation): 13 (WebFrameLoaderClient::forceLayoutOnRestoreFromPageCache): 14 (WebFrameLoaderClient::convertMainResourceLoadToDownload): 15 (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache): 16 (WebFrameLoaderClient::assignIdentifierToInitialRequest): 17 (WebFrameLoaderClient::dispatchWillSendRequest): 18 (WebFrameLoaderClient::shouldUseCredentialStorage): 19 (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge): 20 (WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace): 21 (WebFrameLoaderClient::connectionProperties): 22 (WebFrameLoaderClient::dispatchDidReceiveResponse): 23 (WebFrameLoaderClient::willCacheResponse const): 24 (WebFrameLoaderClient::dispatchDidReceiveContentLength): 25 (WebFrameLoaderClient::dispatchDidFinishLoading): 26 (WebFrameLoaderClient::dispatchDidFailLoading): 27 (WebFrameLoaderClient::dispatchWillPerformClientRedirect): 28 (WebFrameLoaderClient::dispatchDidReceiveTitle): 29 (WebFrameLoaderClient::dispatchDidCommitLoad): 30 (WebFrameLoaderClient::dispatchDidFailProvisionalLoad): 31 (WebFrameLoaderClient::dispatchDidFailLoad): 32 (WebFrameLoaderClient::dispatchDidReachLayoutMilestone): 33 (WebFrameLoaderClient::dispatchCreatePage): 34 (WebFrameLoaderClient::dispatchDecidePolicyForResponse): 35 (shouldTryAppLink): 36 (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): 37 (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): 38 (WebFrameLoaderClient::dispatchUnableToImplementPolicy): 39 (makeFormFieldValuesDictionary): 40 (WebFrameLoaderClient::dispatchWillSubmitForm): 41 (WebFrameLoaderClient::revertToProvisionalState): 42 (WebFrameLoaderClient::setMainDocumentError): 43 (WebFrameLoaderClient::startDownload): 44 (WebFrameLoaderClient::willChangeTitle): 45 (WebFrameLoaderClient::didChangeTitle): 46 (WebFrameLoaderClient::didReplaceMultipartContent): 47 (WebFrameLoaderClient::committedLoad): 48 (WebFrameLoaderClient::finishedLoading): 49 (WebFrameLoaderClient::updateGlobalHistory): 50 (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks): 51 (WebFrameLoaderClient::shouldGoToHistoryItem const): 52 (WebFrameLoaderClient::didDisplayInsecureContent): 53 (WebFrameLoaderClient::didRunInsecureContent): 54 (WebFrameLoaderClient::cancelledError): 55 (WebFrameLoaderClient::blockedError): 56 (WebFrameLoaderClient::blockedByContentBlockerError): 57 (WebFrameLoaderClient::cannotShowURLError): 58 (WebFrameLoaderClient::interruptedForPolicyChangeError): 59 (WebFrameLoaderClient::blockedByContentFilterError): 60 (WebFrameLoaderClient::cannotShowMIMETypeError): 61 (WebFrameLoaderClient::fileDoesNotExistError): 62 (WebFrameLoaderClient::pluginWillHandleLoadError): 63 (WebFrameLoaderClient::shouldFallBack): 64 (WebFrameLoaderClient::canHandleRequest const): 65 (WebFrameLoaderClient::saveViewStateToItem): 66 (WebFrameLoaderClient::restoreViewState): 67 (WebFrameLoaderClient::createDocumentLoader): 68 (WebFrameLoaderClient::setTitle): 69 (WebFrameLoaderClient::savePlatformDataToCachedFrame): 70 (WebFrameLoaderClient::transitionToCommittedFromCachedFrame): 71 (WebFrameLoaderClient::transitionToCommittedForNewPage): 72 (WebFrameLoaderClient::setUpPolicyListener): 73 (WebFrameLoaderClient::actionDictionary const): 74 (WebFrameLoaderClient::canCachePage const): 75 (WebFrameLoaderClient::createFrame): 76 (WebFrameLoaderClient::objectContentType): 77 (PluginWidget::PluginWidget): 78 (PluginWidget::invalidateRect): 79 (NetscapePluginWidget::handleEvent): 80 (NetscapePluginWidget::notifyWidget): 81 (shouldBlockPlugin): 82 (WebFrameLoaderClient::createPlugin): 83 (WebFrameLoaderClient::redirectDataToPlugin): 84 (WebFrameLoaderClient::createJavaAppletWidget): 85 (shouldBlockWebGL): 86 (WebFrameLoaderClient::webGLPolicyForURL const): 87 (WebFrameLoaderClient::resolveWebGLPolicyForURL const): 88 (WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld): 89 (WebFrameLoaderClient::createNetworkingContext): 90 (WebFrameLoaderClient::createPreviewLoaderClient): 91 (WebFrameLoaderClient::getLoadDecisionForIcons): 92 (webGetNSImage): 93 (WebFrameLoaderClient::finishedLoadingIcon): 94 (-[WebFramePolicyListener initWithFrame:identifier:policyFunction:defaultPolicy:]): 95 (-[WebFramePolicyListener initWithFrame:identifier:policyFunction:defaultPolicy:appLinkURL:]): 96 (-[WebFramePolicyListener invalidate]): 97 (-[WebFramePolicyListener receivedPolicyDecision:]): 98 (-[WebFramePolicyListener ignore]): 99 (-[WebFramePolicyListener download]): 100 (-[WebFramePolicyListener use]): 101 (-[WebFramePolicyListener continue]): 102 * WebInspector/WebInspector.mm: 103 (-[WebInspector showWindow]): 104 (-[WebInspector evaluateInFrontend:script:]): 105 * WebView/WebClipView.mm: 106 (-[WebClipView visibleRect]): 107 (-[WebClipView _immediateScrollToPoint:]): 108 * WebView/WebDataSource.mm: 109 (-[WebDataSource _documentFragmentWithArchive:]): 110 (-[WebDataSource _documentLoader]): 111 (-[WebDataSource initWithRequest:]): 112 (-[WebDataSource dealloc]): 113 (-[WebDataSource data]): 114 (-[WebDataSource webFrame]): 115 (-[WebDataSource initialRequest]): 116 (-[WebDataSource request]): 117 (-[WebDataSource webArchive]): 118 * WebView/WebFrame.mm: 119 (core): 120 (kit): 121 (getWebView): 122 (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]): 123 (+[WebFrame _createMainFrameWithPage:frameName:frameView:]): 124 (+[WebFrame _createSubframeWithOwnerElement:frameName:frameView:]): 125 (+[WebFrame _createMainFrameWithSimpleHTMLDocumentWithPage:frameView:style:]): 126 (-[WebFrame _attachScriptDebugger]): 127 (-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]): 128 (-[WebFrame _unmarkAllBadGrammar]): 129 (-[WebFrame _unmarkAllMisspellings]): 130 (-[WebFrame _hasSelection]): 131 (-[WebFrame _atMostOneFrameHasSelection]): 132 (-[WebFrame _findFrameWithSelection]): 133 (-[WebFrame _nodesFromList:]): 134 (-[WebFrame _stringForRange:]): 135 (-[WebFrame _paintBehaviorForDestinationContext:]): 136 (-[WebFrame _drawRect:contentsOnly:]): 137 (-[WebFrame _getVisibleRect:]): 138 (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): 139 (-[WebFrame _caretRectAtPosition:affinity:]): 140 (-[WebFrame _scrollDOMRangeToVisible:]): 141 (-[WebFrame _scrollDOMRangeToVisible:withInset:]): 142 (-[WebFrame _rangeByAlteringCurrentSelection:direction:granularity:]): 143 (-[WebFrame _selectionGranularity]): 144 (-[WebFrame _convertToNSRange:]): 145 (-[WebFrame _convertToDOMRange:]): 146 (-[WebFrame _convertToDOMRange:rangeIsRelativeTo:]): 147 (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]): 148 (-[WebFrame _documentFragmentWithNodesAsParagraphs:]): 149 (-[WebFrame _visiblePositionForPoint:]): 150 (-[WebFrame _characterRangeAtPoint:]): 151 (-[WebFrame _typingStyle]): 152 (-[WebFrame _setTypingStyle:withUndoAction:]): 153 (-[WebFrame _dragSourceEndedAt:operation:]): 154 (-[WebFrame _canProvideDocumentSource]): 155 (-[WebFrame _commitData:]): 156 (-[WebFrame _isDescendantOfFrame:]): 157 (-[WebFrame _bodyBackgroundColor]): 158 (-[WebFrame _isFrameSet]): 159 (-[WebFrame _isVisuallyNonEmpty]): 160 (toWebFrameLoadType): 161 (-[WebFrame _rectsForRange:]): 162 (-[WebFrame _selectionRangeForFirstPoint:secondPoint:]): 163 (-[WebFrame _selectionRangeForPoint:]): 164 (-[WebFrame _selectNSRange:]): 165 (-[WebFrame _isDisplayingStandaloneImage]): 166 (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]): 167 (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]): 168 (-[WebFrame setTimeoutsPaused:]): 169 (-[WebFrame prepareForPause]): 170 (-[WebFrame resumeFromPause]): 171 (-[WebFrame selectWithoutClosingTypingNSRange:]): 172 (-[WebFrame _saveViewState]): 173 (-[WebFrame deviceOrientationChanged]): 174 (-[WebFrame renderedSizeOfNode:constrainedToWidth:]): 175 (-[WebFrame deepestNodeAtViewportLocation:]): 176 (-[WebFrame scrollableNodeAtViewportLocation:]): 177 (-[WebFrame approximateNodeAtViewportLocation:]): 178 (-[WebFrame revealSelectionAtExtent:]): 179 (-[WebFrame setCaretColor:]): 180 (-[WebFrame isTelephoneNumberParsingAllowed]): 181 (-[WebFrame isTelephoneNumberParsingEnabled]): 182 (-[WebFrame setSelectedDOMRange:affinity:closeTyping:]): 183 (-[WebFrame selectNSRange:onElement:]): 184 (-[WebFrame setMarkedText:selectedRange:]): 185 (-[WebFrame setMarkedText:forCandidates:]): 186 (-[WebFrame getDictationResultRanges:andMetadatas:]): 187 (-[WebFrame dictationResultMetadataForRange:]): 188 (+[WebFrame stringWithData:textEncodingName:]): 189 (-[WebFrame fontForSelection:]): 190 (-[WebFrame _userScrolled]): 191 (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:matchStyle:]): 192 (-[WebFrame resetTextAutosizingBeforeLayout]): 193 (-[WebFrame _setTextAutosizingWidth:]): 194 (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): 195 (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]): 196 (-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]): 197 (-[WebFrame _cacheabilityDictionary]): 198 (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]): 199 (-[WebFrame _globalContextForScriptWorld:]): 200 (-[WebFrame setAccessibleName:]): 201 (-[WebFrame enhancedAccessibilityEnabled]): 202 (-[WebFrame setEnhancedAccessibility:]): 203 (-[WebFrame _layerTreeAsText]): 204 (-[WebFrame accessibilityRoot]): 205 (-[WebFrame _clearOpener]): 206 (-[WebFrame _computePageRectsWithPrintScaleFactor:pageSize:]): 207 (-[WebFrame focusedNodeHasContent]): 208 (-[WebFrame _dispatchDidReceiveTitle:]): 209 (-[WebFrame jsWrapperForNode:inScriptWorld:]): 210 (-[WebFrame elementAtPoint:]): 211 (-[WebFrame name]): 212 (needsMicrosoftMessengerDOMDocumentWorkaround): 213 (-[WebFrame DOMDocument]): 214 (-[WebFrame frameElement]): 215 (-[WebFrame provisionalDataSource]): 216 (-[WebFrame dataSource]): 217 (-[WebFrame loadRequest:]): 218 (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): 219 (-[WebFrame findFrameNamed:]): 220 (-[WebFrame parentFrame]): 221 (-[WebFrame childFrames]): 222 (-[WebFrame windowObject]): 223 (-[WebFrame globalContext]): 224 (-[WebFrame javaScriptContext]): 225 (dataSource): Deleted. 226 * WebView/WebFrameView.mm: 227 (-[WebFrameView _web_frame]): 228 (-[WebFrameView _setDocumentView:]): 229 (-[WebFrameView _verticalPageScrollDistance]): 230 (-[WebFrameView _install]): 231 (-[WebFrameView _frameSizeChanged]): 232 (-[WebFrameView initWithFrame:]): 233 (-[WebFrameView drawRect:]): 234 (-[WebFrameView _scrollOverflowInDirection:granularity:]): 235 (-[WebFrameView _isVerticalDocument]): 236 (-[WebFrameView _isFlippedDocument]): 237 (-[WebFrameView _scrollToBeginningOfDocument]): 238 (-[WebFrameView _scrollToEndOfDocument]): 239 (-[WebFrameView _horizontalPageScrollDistance]): 240 (-[WebFrameView _pageVertically:]): 241 (-[WebFrameView _pageHorizontally:]): 242 (-[WebFrameView _scrollLineVertically:]): 243 (-[WebFrameView _scrollLineHorizontally:]): 244 (-[WebFrameView keyDown:keyDown:]): 245 (addTypesFromClass): Deleted. 246 * WebView/WebFullScreenController.mm: 247 (screenRectOfContents): 248 (-[WebFullScreenController element]): 249 (-[WebFullScreenController setElement:]): 250 (-[WebFullScreenController _document]): 251 (-[WebFullScreenController _manager]): 252 * WebView/WebHTMLView.mm: 253 (toAction): 254 (toTag): 255 (-[NSView _web_setNeedsDisplayInRect:]): 256 (promisedDataClient): 257 (+[WebHTMLView _excludedElementsForAttributedStringConversion]): 258 (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]): 259 (-[WebHTMLView _plainTextFromPasteboard:]): 260 (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): 261 (-[WebHTMLView readSelectionFromPasteboard:]): 262 (-[WebHTMLView _selectedRange]): 263 (-[WebHTMLView _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]): 264 (-[WebHTMLView _frameOrBoundsChanged]): 265 (-[WebHTMLView _updateMouseoverWithEvent:]): 266 (+[WebHTMLView _insertablePasteboardTypes]): 267 (+[WebHTMLView _selectionPasteboardTypes]): 268 (-[WebHTMLView pasteboard:provideDataForType:]): 269 (-[WebHTMLView setScale:]): 270 (-[WebHTMLView _canEdit]): 271 (-[WebHTMLView _canEditRichly]): 272 (-[WebHTMLView _hasSelection]): 273 (-[WebHTMLView _hasSelectionOrInsertionPoint]): 274 (-[WebHTMLView _hasInsertionPoint]): 275 (-[WebHTMLView _isEditable]): 276 (-[WebHTMLView _selectionDraggingImage]): 277 (-[WebHTMLView _insertOrderedList]): 278 (-[WebHTMLView _insertUnorderedList]): 279 (-[WebHTMLView _canIncreaseSelectionListLevel]): 280 (-[WebHTMLView _canDecreaseSelectionListLevel]): 281 (-[WebHTMLView _increaseSelectionListLevel]): 282 (-[WebHTMLView _increaseSelectionListLevelOrdered]): 283 (-[WebHTMLView _increaseSelectionListLevelUnordered]): 284 (-[WebHTMLView _decreaseSelectionListLevel]): 285 (-[WebHTMLView _writeSelectionToPasteboard:]): 286 (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]): 287 (-[WebHTMLView _beginPrintModeWithMinimumPageWidth:height:maximumPageWidth:]): 288 (-[WebHTMLView _beginPrintModeWithPageWidth:height:shrinkToFit:]): 289 (-[WebHTMLView _beginScreenPaginationModeWithPageSize:shrinkToFit:]): 290 (-[WebHTMLView _adjustedBottomOfPageWithTop:bottom:limit:]): 291 (-[WebHTMLView coreCommandBySelector:]): 292 (-[WebHTMLView coreCommandByName:]): 293 (-[WebHTMLView validRequestorForSendType:returnType:]): 294 (-[WebHTMLView jumpToSelection:]): 295 (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): 296 (-[WebHTMLView maintainsInactiveSelection]): 297 (-[WebHTMLView reapplyStyles]): 298 (-[WebHTMLView layoutToMinimumPageWidth:height:originalPageWidth:originalPageHeight:maximumShrinkRatio:adjustingViewSize:]): 299 (-[WebHTMLView rightMouseUp:]): 300 (fixMenusReceivedFromOldClients): 301 (createShareMenuItem): 302 (createMenuItem): 303 (createMenuItems): 304 (customMenuFromDefaultItems): 305 (-[WebHTMLView menuForEvent:]): 306 (-[WebHTMLView clearFocus]): 307 (-[WebHTMLView setLayer:]): 308 (-[WebHTMLView setNeedsLayout:]): 309 (-[WebHTMLView setNeedsToApplyStyles:]): 310 (-[WebHTMLView _invalidateGStatesForTree]): 311 (-[WebHTMLView scrollWheel:]): 312 (-[WebHTMLView acceptsFirstMouse:]): 313 (-[WebHTMLView shouldDelayWindowOrderingForEvent:]): 314 (-[WebHTMLView mouseDown:]): 315 (-[WebHTMLView touch:]): 316 (-[WebHTMLView mouseDragged:]): 317 (-[WebHTMLView draggingSourceOperationMaskForLocal:]): 318 (-[WebHTMLView draggedImage:endedAt:operation:]): 319 (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): 320 (-[WebHTMLView draggingSession:sourceOperationMaskForDraggingContext:]): 321 (-[WebHTMLView draggingSession:endedAtPoint:operation:]): 322 (-[WebHTMLView mouseUp:]): 323 (-[WebHTMLView pressureChangeWithEvent:]): 324 (isTextInput): 325 (isInPasswordField): 326 (currentKeyboardEvent): 327 (-[WebHTMLView becomeFirstResponder]): 328 (-[WebHTMLView resignFirstResponder]): 329 (-[WebHTMLView _setPrinting:minimumPageLogicalWidth:logicalHeight:originalPageWidth:originalPageHeight:maximumShrinkRatio:adjustViewSize:paginateScreenContent:]): 330 (-[WebHTMLView _scaleFactorForPrintOperation:]): 331 (-[WebHTMLView keyDown:]): 332 (-[WebHTMLView keyUp:]): 333 (-[WebHTMLView flagsChanged:]): 334 (-[WebHTMLView centerSelectionInVisibleArea:]): 335 (-[WebHTMLView _selectionStartFontAttributesAsRTF]): 336 (-[WebHTMLView _fontAttributesFromFontPasteboard]): 337 (-[WebHTMLView _applyStyleToSelection:withUndoAction:]): 338 (-[WebHTMLView _applyEditingStyleToSelection:withUndoAction:]): 339 (-[WebHTMLView performKeyEquivalent:]): 340 (-[WebHTMLView copyFont:]): 341 (-[WebHTMLView pasteFont:]): 342 (-[WebHTMLView changeFont:]): 343 (-[WebHTMLView changeAttributes:]): 344 (-[WebHTMLView _undoActionFromColorPanelWithSelector:]): 345 (-[WebHTMLView _changeCSSColorUsingSelector:inRange:]): 346 (-[WebHTMLView changeColor:]): 347 (-[WebHTMLView checkSpelling:]): 348 (-[WebHTMLView showGuessPanel:]): 349 (-[WebHTMLView toggleBaseWritingDirection:]): 350 (-[WebHTMLView changeBaseWritingDirection:]): 351 (-[WebHTMLView _changeBaseWritingDirectionTo:]): 352 (-[WebHTMLView _updateControlTints]): 353 (-[WebHTMLView _selectionChanged]): 354 (-[WebHTMLView _updateFontPanel]): 355 (-[WebHTMLView _canSmartCopyOrDelete]): 356 (-[WebHTMLView _lookUpInDictionaryFromMenu:]): 357 (-[WebHTMLView quickLookWithEvent:]): 358 (-[WebHTMLView _executeSavedKeypressCommands]): 359 (-[WebHTMLView _interpretKeyEvent:savingCommands:]): 360 (-[WebHTMLView _handleEditingKeyEvent:]): 361 (-[WebHTMLView _web_updateLayoutAndStyleIfNeededRecursive]): 362 (-[WebHTMLView ALLOW_DEPRECATED_IMPLEMENTATIONS_END]): 363 (-[WebHTMLView attributedSubstringFromRange:]): 364 (-[WebHTMLView hasMarkedText]): 365 (extractUnderlines): 366 (-[WebHTMLView setMarkedText:selectedRange:]): 367 (-[WebHTMLView doCommandBySelector:]): 368 (-[WebHTMLView insertText:]): 369 (-[WebHTMLView _updateSecureInputState]): 370 (-[WebHTMLView _updateSelectionForInputManager]): 371 (-[WebHTMLView selectionTextRects]): 372 (imageFromRect): 373 (selectionImage): 374 (-[WebHTMLView selectionImageForcingBlackText:selectionImageForcingBlackText:]): 375 (-[WebHTMLView selectAll]): 376 (-[WebHTMLView deselectAll]): 377 (-[WebHTMLView _legacyAttributedStringFrom:offset:to:offset:]): 378 (-[WebHTMLView attributedString]): 379 (-[WebHTMLView selectedAttributedString]): 380 (-[WebHTMLView elementAtPoint:allowShadowContent:]): 381 (-[WebHTMLView countMatchesForText:inDOMRange:options:limit:markMatches:]): 382 (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]): 383 (-[WebHTMLView markedTextMatchesAreHighlighted]): 384 (-[WebHTMLView unmarkAllTextMatches]): 385 (-[WebHTMLView rectsForTextMatches]): 386 (-[WebHTMLView _findString:options:]): 387 * WebView/WebImmediateActionController.mm: 388 (-[WebImmediateActionController webView:didHandleScrollWheel:]): 389 (-[WebImmediateActionController _cancelImmediateAction]): 390 (-[WebImmediateActionController performHitTestAtPoint:]): 391 (-[WebImmediateActionController immediateActionRecognizerDidUpdateAnimation:]): 392 (-[WebImmediateActionController immediateActionRecognizerDidCancelAnimation:]): 393 (-[WebImmediateActionController immediateActionRecognizerDidCompleteAnimation:]): 394 (-[WebImmediateActionController _defaultAnimationController]): 395 (-[WebImmediateActionController _updateImmediateActionItem]): 396 (-[WebImmediateActionController menuItemDidClose:]): 397 (elementBoundingBoxInWindowCoordinatesFromNode): 398 (-[WebImmediateActionController menuItem:itemFrameForPoint:]): 399 (-[WebImmediateActionController menuItem:maxSizeForPoint:]): 400 (-[WebImmediateActionController _animationControllerForDataDetectedText]): 401 (-[WebImmediateActionController _animationControllerForDataDetectedLink]): 402 (+[WebImmediateActionController _dictionaryPopupInfoForRange:inFrame:withLookupOptions:indicatorOptions:transition:]): 403 (-[WebImmediateActionController _animationControllerForText]): 404 * WebView/WebPDFView.mm: 405 (isFrameInRange): 406 (-[WebPDFView pasteboardTypesForSelection]): 407 (-[WebPDFView writeSelectionWithPasteboardTypes:toPasteboard:]): 408 (-[WebPDFView PDFViewWillClickOnLink:withURL:]): 409 * WebView/WebScriptDebugDelegate.mm: 410 (-[WebScriptCallFrame _convertValueToObjcValue:]): 411 * WebView/WebScriptDebugger.mm: 412 (toNSString): 413 (toWebFrame): 414 (WebScriptDebugger::WebScriptDebugger): 415 (WebScriptDebugger::sourceParsed): 416 (WebScriptDebugger::handlePause): 417 * WebView/WebScriptWorld.mm: 418 (-[WebScriptWorld initWithWorld:]): 419 (-[WebScriptWorld init]): 420 (+[WebScriptWorld standardWorld]): 421 (+[WebScriptWorld scriptWorldForGlobalContext:]): 422 (core): 423 (+[WebScriptWorld findOrCreateWorld:]): 424 * WebView/WebView.mm: 425 (coreOptions): 426 (coreLayoutMilestones): 427 (kitLayoutMilestones): 428 (kit): 429 (WebKit::DeferredPageDestructor::createDeferredPageDestructor): 430 (WebKit::DeferredPageDestructor::DeferredPageDestructor): 431 (-[WebUITextIndicatorData initWithImage:textIndicatorData:scale:]): 432 (+[WebView _standardUserAgentWithApplicationName:]): 433 (+[WebView _reportException:inContext:]): 434 (shouldEnableLoadDeferring): 435 (shouldRestrictWindowFocus): 436 (needsOutlookQuirksScript): 437 (-[WebView _injectOutlookQuirksScript]): 438 (shouldUseLegacyBackgroundSizeShorthandBehavior): 439 (shouldAllowWindowOpenWithoutUserGesture): 440 (WebKitInitializeGamepadProviderIfNecessary): 441 (-[WebView _commonInitializationWithFrameName:groupName:]): 442 (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]): 443 (-[WebView _replaceCurrentHistoryItem:]): 444 (-[WebView updateLayoutIgnorePendingStyleSheets]): 445 (-[WebView _requestStartDataInteraction:globalPosition:]): 446 (-[WebView _startDrag:]): 447 (-[WebView dragDataForSession:client:global:operation:]): 448 (-[WebView _didConcludeEditDrag]): 449 (+[WebView _setAlwaysUsesComplexTextCodePath:]): 450 (+[WebView canCloseAllWebViews]): 451 (+[WebView closeAllWebViews]): 452 (-[WebView _dispatchUnloadEvent]): 453 (-[WebView styleAtSelectionStart]): 454 (-[WebView _didFinishScrollingOrZooming]): 455 (-[WebView _close]): 456 (-[WebView _isProcessingUserGesture]): 457 (+[WebView _enableRemoteInspector]): 458 (+[WebView _disableRemoteInspector]): 459 (+[WebView _disableAutoStartRemoteInspector]): 460 (+[WebView _isRemoteInspectorEnabled]): 461 (+[WebView _hasRemoteInspectorSession]): 462 (-[WebView _setHostApplicationProcessIdentifier:auditToken:]): 463 (-[WebView _loadBackForwardListFromOtherView:]): 464 (-[WebView _needsKeyboardEventDisambiguationQuirks]): 465 (needsSelfRetainWhileLoadingQuirk): 466 (-[WebView _needsPreHTML5ParserQuirks]): 467 (-[WebView _preferencesChanged:]): 468 (-[WebView _cacheFrameLoadDelegateImplementations]): 469 (+[WebView _unregisterViewClassAndRepresentationClassForMIMEType:]): 470 (+[WebView _registerViewClass:representationClass:forURLScheme:]): 471 (+[WebView _decodeData:]): 472 (-[WebView _didStartProvisionalLoadForFrame:]): 473 (-[WebView _checkDidPerformFirstNavigation]): 474 (-[WebView _cachedResponseForURL:]): 475 (+[WebView _setShouldUseFontSmoothing:]): 476 (+[WebView _shouldUseFontSmoothing]): 477 (+[WebView _setUsesTestModeFocusRingColor:]): 478 (+[WebView _usesTestModeFocusRingColor]): 479 (-[WebView setAlwaysShowVerticalScroller:]): 480 (-[WebView alwaysShowVerticalScroller]): 481 (-[WebView setAlwaysShowHorizontalScroller:]): 482 (-[WebView setProhibitsMainFrameScrolling:]): 483 (-[WebView alwaysShowHorizontalScroller]): 484 (-[WebView _setMediaLayer:forPluginView:]): 485 (-[WebView _attachScriptDebuggerToAllFrames]): 486 (-[WebView _detachScriptDebuggerFromAllFrames]): 487 (+[WebView _productivityDocumentMIMETypes]): 488 (-[WebView _setFixedLayoutSize:]): 489 (-[WebView _synchronizeCustomFixedPositionLayoutRect]): 490 (-[WebView _viewGeometryDidChange]): 491 (-[WebView _overflowScrollPositionChangedTo:forNode:isUserScroll:]): 492 (+[WebView _doNotStartObservingNetworkReachability]): 493 (-[WebView _touchEventRegions]): 494 (-[WebView textIteratorForRect:]): 495 (-[WebView _executeCoreCommandByName:value:]): 496 (-[WebView _isUsingAcceleratedCompositing]): 497 (-[WebView _isSoftwareRenderable]): 498 (-[WebView setTracksRepaints:]): 499 (-[WebView isTrackingRepaints]): 500 (-[WebView resetTrackedRepaints]): 501 (-[WebView trackedRepaintRects]): 502 (+[WebView _addOriginAccessWhitelistEntryWithSourceOrigin:destinationProtocol:destinationHost:allowDestinationSubdomains:]): 503 (+[WebView _removeOriginAccessWhitelistEntryWithSourceOrigin:destinationProtocol:destinationHost:allowDestinationSubdomains:]): 504 (+[WebView _resetOriginAccessWhitelists]): 505 (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]): 506 (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]): 507 (-[WebView allowsNewCSSAnimationsWhileSuspended]): 508 (-[WebView setAllowsNewCSSAnimationsWhileSuspended:]): 509 (-[WebView cssAnimationsSuspended]): 510 (-[WebView setCSSAnimationsSuspended:]): 511 (+[WebView _setDomainRelaxationForbidden:forURLScheme:]): 512 (+[WebView _registerURLSchemeAsSecure:]): 513 (+[WebView _registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing:]): 514 (-[WebView _scaleWebView:atOrigin:]): 515 (-[WebView _setUseFixedLayout:]): 516 (-[WebView _useFixedLayout]): 517 (-[WebView _fixedLayoutSize]): 518 (-[WebView _setPaginationMode:]): 519 (-[WebView _paginationMode]): 520 (-[WebView _listenForLayoutMilestones:]): 521 (-[WebView _layoutMilestones]): 522 (-[WebView _setPaginationBehavesLikeColumns:]): 523 (-[WebView _paginationBehavesLikeColumns]): 524 (-[WebView _setPageLength:]): 525 (-[WebView _pageLength]): 526 (-[WebView _setGapBetweenPages:]): 527 (-[WebView _gapBetweenPages]): 528 (-[WebView _setPaginationLineGridEnabled:]): 529 (-[WebView _paginationLineGridEnabled]): 530 (-[WebView _pageCount]): 531 (+[WebView _HTTPPipeliningEnabled]): 532 (+[WebView _setHTTPPipeliningEnabled:]): 533 (-[WebView shouldRequestCandidates]): 534 (-[WebView removePluginInstanceViewsFor:]): 535 (+[WebView registerURLSchemeAsLocal:]): 536 (-[WebView doWindowDidChangeScreen]): 537 (-[WebView _updateScreenScaleFromWindow]): 538 (-[WebView goToBackForwardItem:]): 539 (-[WebView _setZoomMultiplier:isTextOnly:]): 540 (-[WebView setCustomTextEncodingName:]): 541 (-[WebView windowScriptObject]): 542 (-[WebView setHostWindow:]): 543 (-[WebView applicationFlags:]): 544 (-[WebView actionMaskForDraggingInfo:]): 545 (-[WebView draggingEntered:]): 546 (-[WebView draggingUpdated:]): 547 (-[WebView draggingExited:]): 548 (-[WebView performDragOperation:]): 549 (incrementFrame): 550 (+[WebView registerViewClass:representationClass:forMIMEType:]): 551 (-[WebView moveDragCaretToPoint:]): 552 (-[WebView removeDragCaret]): 553 (-[WebView mainFrameIconURL]): 554 (coreTextCheckingType): 555 (textCheckingResultFromNSTextCheckingResult): 556 (-[WebView candidateListTouchBarItem:endSelectingCandidateAtIndex:]): 557 (-[WebView candidateListTouchBarItem:changedCandidateListVisibility:]): 558 (-[WebView shouldClose]): 559 (aeDescFromJSValue): 560 (-[WebView aeDescByEvaluatingJavaScriptFromString:]): 561 (-[WebView editableDOMRangeForPoint:]): 562 (-[WebView setSelectedDOMRange:affinity:]): 563 (-[WebView selectedDOMRange]): 564 (-[WebView selectionAffinity]): 565 (-[WebView setEditable:]): 566 (-[WebView setTypingStyle:]): 567 (-[WebView deleteSelection]): 568 (-[WebView applyStyle:]): 569 (-[WebView insertDictationPhrases:metadata:]): 570 (-[WebView _selectionIsCaret]): 571 (-[WebView _selectionIsAll]): 572 (-[WebView _simplifyMarkup:endNode:]): 573 (+[WebView _setCacheModel:]): 574 (-[WebView _searchWithGoogleFromMenu:]): 575 (-[WebView _retrieveKeyboardUIModeFromPreferences:]): 576 (-[WebView _keyboardUIMode]): 577 (-[WebView _mainCoreFrame]): 578 (-[WebView _clearCredentials]): 579 (-[WebView _flushCompositingChanges]): 580 (-[WebView _scheduleLayerFlushForPendingTileCacheRepaint]): 581 (-[WebView _hasActiveVideoForControlsInterface]): 582 (-[WebView _setUpPlaybackControlsManagerForMediaElement:]): 583 (-[WebView handleAcceptedAlternativeText:]): 584 (-[WebView _getWebCoreDictationAlternatives:fromTextAlternatives:]): 585 (-[WebView _animationControllerForDictionaryLookupPopupInfo:]): 586 (-[WebView _setTextIndicator:]): 587 (-[WebView _setTextIndicator:withLifetime:]): 588 (-[WebView _clearTextIndicatorWithAnimation:]): 589 (-[WebView _showDictionaryLookupPopup:]): 590 (-[WebView _dictionaryLookupPopoverWillClose:]): 591 (-[WebView showFormValidationMessage:withAnchorRect:]): 592 (-[WebView textTouchBar]): 593 (nsTextAlignmentFromRenderStyle): 594 (-[WebView updateTextTouchBar]): 595 (-[WebView updateTouchBar]): 596 (-[WebView candidateList]): 597 (-[WebView _geolocationDidFailWithMessage:]): 598 (-[WebView _resetAllGeolocationPermission]): 599 (-[WebView _notificationIDForTesting:]): 600 1 601 2019-09-25 Megan Gardner <megan_gardner@apple.com> 2 602 -
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
r250196 r250549 167 167 #endif 168 168 169 using namespace WebCore;170 using namespace HTMLNames;171 172 169 #if PLATFORM(IOS_FAMILY) 173 170 @interface WebHTMLView (Init) … … 182 179 183 180 @interface WebFramePolicyListener : NSObject <WebPolicyDecisionListener, WebFormSubmissionListener> { 184 RefPtr< Frame> _frame;185 PolicyCheckIdentifier _identifier;186 FramePolicyFunction _policyFunction;181 RefPtr<WebCore::Frame> _frame; 182 WebCore::PolicyCheckIdentifier _identifier; 183 WebCore::FramePolicyFunction _policyFunction; 187 184 #if HAVE(APP_LINKS) 188 185 RetainPtr<NSURL> _appLinkURL; 189 186 #endif 190 PolicyAction _defaultPolicy;191 } 192 193 - (id)initWithFrame:( Frame*)frame identifier:(PolicyCheckIdentifier)identifier policyFunction:(FramePolicyFunction&&)policyFunction defaultPolicy:(PolicyAction)defaultPolicy;187 WebCore::PolicyAction _defaultPolicy; 188 } 189 190 - (id)initWithFrame:(WebCore::Frame*)frame identifier:(WebCore::PolicyCheckIdentifier)identifier policyFunction:(WebCore::FramePolicyFunction&&)policyFunction defaultPolicy:(WebCore::PolicyAction)defaultPolicy; 194 191 #if HAVE(APP_LINKS) 195 - (id)initWithFrame:( Frame*)frame identifier:(PolicyCheckIdentifier)identifier policyFunction:(FramePolicyFunction&&)policyFunction defaultPolicy:(PolicyAction)defaultPolicy appLinkURL:(NSURL *)url;192 - (id)initWithFrame:(WebCore::Frame*)frame identifier:(WebCore::PolicyCheckIdentifier)identifier policyFunction:(WebCore::FramePolicyFunction&&)policyFunction defaultPolicy:(WebCore::PolicyAction)defaultPolicy appLinkURL:(NSURL *)url; 196 193 #endif 197 194 … … 200 197 @end 201 198 202 static inline WebDataSource *dataSource( DocumentLoader* loader)199 static inline WebDataSource *dataSource(WebCore::DocumentLoader* loader) 203 200 { 204 201 return loader ? static_cast<WebDocumentLoaderMac*>(loader)->dataSource() : nil; … … 210 207 } 211 208 212 Optional< PageIdentifier> WebFrameLoaderClient::pageID() const209 Optional<WebCore::PageIdentifier> WebFrameLoaderClient::pageID() const 213 210 { 214 211 return WTF::nullopt; 215 212 } 216 213 217 Optional< FrameIdentifier> WebFrameLoaderClient::frameID() const214 Optional<WebCore::FrameIdentifier> WebFrameLoaderClient::frameID() const 218 215 { 219 216 return WTF::nullopt; … … 231 228 } 232 229 233 void WebFrameLoaderClient::makeRepresentation( DocumentLoader* loader)230 void WebFrameLoaderClient::makeRepresentation(WebCore::DocumentLoader* loader) 234 231 { 235 232 [dataSource(loader) _makeRepresentation]; … … 251 248 WebView* webView = getWebView(m_webFrame.get()); 252 249 bool isMainFrame = [webView mainFrame] == m_webFrame.get(); 253 Frame* coreFrame = core(m_webFrame.get());250 auto* coreFrame = core(m_webFrame.get()); 254 251 if (isMainFrame && coreFrame->view()) { 255 IntSize newSize([webView _fixedLayoutSize]);252 WebCore::IntSize newSize([webView _fixedLayoutSize]); 256 253 coreFrame->view()->setFixedLayoutSize(newSize); 257 254 coreFrame->view()->setUseFixedLayout(!newSize.isEmpty()); … … 303 300 } 304 301 305 void WebFrameLoaderClient::convertMainResourceLoadToDownload( DocumentLoader* documentLoader, const ResourceRequest& request, constResourceResponse& response)306 { 307 WebView *webView = getWebView(m_webFrame.get()); 308 SubresourceLoader* mainResourceLoader = documentLoader->mainResourceLoader();302 void WebFrameLoaderClient::convertMainResourceLoadToDownload(WebCore::DocumentLoader* documentLoader, const WebCore::ResourceRequest& request, const WebCore::ResourceResponse& response) 303 { 304 WebView *webView = getWebView(m_webFrame.get()); 305 auto* mainResourceLoader = documentLoader->mainResourceLoader(); 309 306 310 307 if (!mainResourceLoader) { 311 308 // The resource has already been cached, or the conversion is being attmpted when not calling SubresourceLoader::didReceiveResponse(). 312 309 ALLOW_DEPRECATED_DECLARATIONS_BEGIN 313 WebDownload *webDownload = [[WebDownload alloc] initWithRequest:request.nsURLRequest( HTTPBodyUpdatePolicy::UpdateHTTPBody) delegate:[webView downloadDelegate]];310 WebDownload *webDownload = [[WebDownload alloc] initWithRequest:request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody) delegate:[webView downloadDelegate]]; 314 311 ALLOW_DEPRECATED_DECLARATIONS_END 315 312 [webDownload autorelease]; … … 317 314 } 318 315 319 ResourceHandle* handle = mainResourceLoader->handle();316 auto* handle = mainResourceLoader->handle(); 320 317 321 318 ALLOW_DEPRECATED_DECLARATIONS_BEGIN 322 [WebDownload _downloadWithLoadingConnection:handle->connection() request:request.nsURLRequest( HTTPBodyUpdatePolicy::UpdateHTTPBody) response:response.nsURLResponse() delegate:[webView downloadDelegate] proxy:nil];319 [WebDownload _downloadWithLoadingConnection:handle->connection() request:request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody) response:response.nsURLResponse() delegate:[webView downloadDelegate] proxy:nil]; 323 320 ALLOW_DEPRECATED_DECLARATIONS_END 324 321 } 325 322 326 bool WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache( DocumentLoader* loader, const ResourceRequest& request, constResourceResponse& response, int length)323 bool WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader* loader, const WebCore::ResourceRequest& request, const WebCore::ResourceResponse& response, int length) 327 324 { 328 325 WebView *webView = getWebView(m_webFrame.get()); … … 330 327 #if PLATFORM(IOS_FAMILY) 331 328 if (implementations->webThreadDidLoadResourceFromMemoryCacheFunc) { 332 CallResourceLoadDelegateInWebThread(implementations->webThreadDidLoadResourceFromMemoryCacheFunc, webView, @selector(webThreadWebView:didLoadResourceFromMemoryCache:response:length:fromDataSource:), request.nsURLRequest( HTTPBodyUpdatePolicy::UpdateHTTPBody), response.nsURLResponse(), length, dataSource(loader));329 CallResourceLoadDelegateInWebThread(implementations->webThreadDidLoadResourceFromMemoryCacheFunc, webView, @selector(webThreadWebView:didLoadResourceFromMemoryCache:response:length:fromDataSource:), request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody), response.nsURLResponse(), length, dataSource(loader)); 333 330 return true; 334 331 } … … 337 334 return false; 338 335 339 CallResourceLoadDelegate(implementations->didLoadResourceFromMemoryCacheFunc, webView, @selector(webView:didLoadResourceFromMemoryCache:response:length:fromDataSource:), request.nsURLRequest( HTTPBodyUpdatePolicy::UpdateHTTPBody), response.nsURLResponse(), length, dataSource(loader));336 CallResourceLoadDelegate(implementations->didLoadResourceFromMemoryCacheFunc, webView, @selector(webView:didLoadResourceFromMemoryCache:response:length:fromDataSource:), request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody), response.nsURLResponse(), length, dataSource(loader)); 340 337 return true; 341 338 } 342 339 343 void WebFrameLoaderClient::assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader* loader, constResourceRequest& request)340 void WebFrameLoaderClient::assignIdentifierToInitialRequest(unsigned long identifier, WebCore::DocumentLoader* loader, const WebCore::ResourceRequest& request) 344 341 { 345 342 WebView *webView = getWebView(m_webFrame.get()); … … 350 347 #if PLATFORM(IOS_FAMILY) 351 348 if (implementations->webThreadIdentifierForRequestFunc) { 352 object = CallResourceLoadDelegateInWebThread(implementations->webThreadIdentifierForRequestFunc, webView, @selector(webThreadWebView:identifierForInitialRequest:fromDataSource:), request.nsURLRequest( HTTPBodyUpdatePolicy::UpdateHTTPBody), dataSource(loader));349 object = CallResourceLoadDelegateInWebThread(implementations->webThreadIdentifierForRequestFunc, webView, @selector(webThreadWebView:identifierForInitialRequest:fromDataSource:), request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody), dataSource(loader)); 353 350 } else 354 351 #endif 355 352 if (implementations->identifierForRequestFunc) 356 object = CallResourceLoadDelegate(implementations->identifierForRequestFunc, webView, @selector(webView:identifierForInitialRequest:fromDataSource:), request.nsURLRequest( HTTPBodyUpdatePolicy::UpdateHTTPBody), dataSource(loader));353 object = CallResourceLoadDelegate(implementations->identifierForRequestFunc, webView, @selector(webView:identifierForInitialRequest:fromDataSource:), request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody), dataSource(loader)); 357 354 else 358 355 object = adoptNS([[NSObject alloc] init]); … … 361 358 } 362 359 363 void WebFrameLoaderClient::dispatchWillSendRequest( DocumentLoader* loader, unsigned long identifier, ResourceRequest& request, constResourceResponse& redirectResponse)360 void WebFrameLoaderClient::dispatchWillSendRequest(WebCore::DocumentLoader* loader, unsigned long identifier, WebCore::ResourceRequest& request, const WebCore::ResourceResponse& redirectResponse) 364 361 { 365 362 WebView *webView = getWebView(m_webFrame.get()); … … 369 366 static_cast<WebDocumentLoaderMac*>(loader)->increaseLoadCount(identifier); 370 367 371 NSURLRequest *currentURLRequest = request.nsURLRequest( HTTPBodyUpdatePolicy::UpdateHTTPBody);368 NSURLRequest *currentURLRequest = request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody); 372 369 373 370 #if PLATFORM(MAC) 374 if ( MacApplication::isAppleMail() && loader->substituteData().isValid()) {371 if (WebCore::MacApplication::isAppleMail() && loader->substituteData().isValid()) { 375 372 // Mail.app checks for this property to detect data / archive loads. 376 373 [NSURLProtocol setProperty:@"" forKey:@"WebDataRequest" inRequest:(NSMutableURLRequest *)currentURLRequest]; … … 388 385 389 386 if (newURLRequest != currentURLRequest) 390 request.updateFromDelegatePreservingOldProperties( ResourceRequest(newURLRequest));391 } 392 393 bool WebFrameLoaderClient::shouldUseCredentialStorage( DocumentLoader* loader, unsigned long identifier)387 request.updateFromDelegatePreservingOldProperties(WebCore::ResourceRequest(newURLRequest)); 388 } 389 390 bool WebFrameLoaderClient::shouldUseCredentialStorage(WebCore::DocumentLoader* loader, unsigned long identifier) 394 391 { 395 392 WebView *webView = getWebView(m_webFrame.get()); … … 404 401 } 405 402 406 void WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge( DocumentLoader* loader, unsigned long identifier, constAuthenticationChallenge& challenge)403 void WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge(WebCore::DocumentLoader* loader, unsigned long identifier, const WebCore::AuthenticationChallenge& challenge) 407 404 { 408 405 WebView *webView = getWebView(m_webFrame.get()); … … 425 422 426 423 #if USE(PROTECTION_SPACE_AUTH_CALLBACK) 427 bool WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace( DocumentLoader* loader, unsigned long identifier, constProtectionSpace& protectionSpace)424 bool WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace(WebCore::DocumentLoader* loader, unsigned long identifier, const WebCore::ProtectionSpace& protectionSpace) 428 425 { 429 426 WebView *webView = getWebView(m_webFrame.get()); … … 441 438 // challenges for pre-iOS-3.0, pre-10.6 protection spaces. This is the same as the default implementation 442 439 // in CFNetwork. 443 return (protectionSpace.authenticationScheme() < ProtectionSpaceAuthenticationSchemeClientCertificateRequested);444 } 445 #endif 446 447 #if PLATFORM(IOS_FAMILY) 448 RetainPtr<CFDictionaryRef> WebFrameLoaderClient::connectionProperties( DocumentLoader* loader, unsigned long identifier)440 return (protectionSpace.authenticationScheme() < WebCore::ProtectionSpaceAuthenticationSchemeClientCertificateRequested); 441 } 442 #endif 443 444 #if PLATFORM(IOS_FAMILY) 445 RetainPtr<CFDictionaryRef> WebFrameLoaderClient::connectionProperties(WebCore::DocumentLoader* loader, unsigned long identifier) 449 446 { 450 447 WebView *webView = getWebView(m_webFrame.get()); … … 473 470 } 474 471 475 void WebFrameLoaderClient::dispatchDidReceiveResponse( DocumentLoader* loader, unsigned long identifier, constResourceResponse& response)472 void WebFrameLoaderClient::dispatchDidReceiveResponse(WebCore::DocumentLoader* loader, unsigned long identifier, const WebCore::ResourceResponse& response) 476 473 { 477 474 WebView *webView = getWebView(m_webFrame.get()); … … 491 488 } 492 489 493 void WebFrameLoaderClient::willCacheResponse( DocumentLoader* loader, unsigned long identifier, NSCachedURLResponse* response, CompletionHandler<void(NSCachedURLResponse *)>&& completionHandler) const490 void WebFrameLoaderClient::willCacheResponse(WebCore::DocumentLoader* loader, unsigned long identifier, NSCachedURLResponse* response, CompletionHandler<void(NSCachedURLResponse *)>&& completionHandler) const 494 491 { 495 492 WebView *webView = getWebView(m_webFrame.get()); … … 511 508 } 512 509 513 void WebFrameLoaderClient::dispatchDidReceiveContentLength( DocumentLoader* loader, unsigned long identifier, int dataLength)510 void WebFrameLoaderClient::dispatchDidReceiveContentLength(WebCore::DocumentLoader* loader, unsigned long identifier, int dataLength) 514 511 { 515 512 WebView *webView = getWebView(m_webFrame.get()); … … 533 530 #endif 534 531 535 void WebFrameLoaderClient::dispatchDidFinishLoading( DocumentLoader* loader, unsigned long identifier)532 void WebFrameLoaderClient::dispatchDidFinishLoading(WebCore::DocumentLoader* loader, unsigned long identifier) 536 533 { 537 534 WebView *webView = getWebView(m_webFrame.get()); … … 555 552 } 556 553 557 void WebFrameLoaderClient::dispatchDidFailLoading( DocumentLoader* loader, unsigned long identifier, constResourceError& error)554 void WebFrameLoaderClient::dispatchDidFailLoading(WebCore::DocumentLoader* loader, unsigned long identifier, const WebCore::ResourceError& error) 558 555 { 559 556 WebView *webView = getWebView(m_webFrame.get()); … … 602 599 } 603 600 604 void WebFrameLoaderClient::dispatchWillPerformClientRedirect(const URL& url, double delay, WallTime fireDate, LockBackForwardList)601 void WebFrameLoaderClient::dispatchWillPerformClientRedirect(const URL& url, double delay, WallTime fireDate, WebCore::LockBackForwardList) 605 602 { 606 603 WebView *webView = getWebView(m_webFrame.get()); … … 687 684 static constexpr unsigned maxTitleLength = 1000; // Closest power of 10 above the W3C recommendation for Title length. 688 685 689 void WebFrameLoaderClient::dispatchDidReceiveTitle(const StringWithDirection& title)686 void WebFrameLoaderClient::dispatchDidReceiveTitle(const WebCore::StringWithDirection& title) 690 687 { 691 688 auto truncatedTitle = truncateFromEnd(title, maxTitleLength); … … 699 696 } 700 697 701 void WebFrameLoaderClient::dispatchDidCommitLoad(Optional< HasInsecureContent>)698 void WebFrameLoaderClient::dispatchDidCommitLoad(Optional<WebCore::HasInsecureContent>) 702 699 { 703 700 // Tell the client we've committed this URL. … … 719 716 } 720 717 721 void WebFrameLoaderClient::dispatchDidFailProvisionalLoad(const ResourceError& error,WillContinueLoading)718 void WebFrameLoaderClient::dispatchDidFailProvisionalLoad(const WebCore::ResourceError& error, WebCore::WillContinueLoading) 722 719 { 723 720 m_webFrame->_private->provisionalURL = nullptr; … … 735 732 } 736 733 737 void WebFrameLoaderClient::dispatchDidFailLoad(const ResourceError& error)734 void WebFrameLoaderClient::dispatchDidFailLoad(const WebCore::ResourceError& error) 738 735 { 739 736 ASSERT(!m_webFrame->_private->provisionalURL); … … 806 803 #endif 807 804 808 if (milestones & DidFirstLayout) {805 if (milestones & WebCore::DidFirstLayout) { 809 806 // FIXME: We should consider removing the old didFirstLayout API since this is doing double duty with the 810 807 // new didLayout API. … … 826 823 } 827 824 828 if (milestones & DidFirstVisuallyNonEmptyLayout) {825 if (milestones & WebCore::DidFirstVisuallyNonEmptyLayout) { 829 826 // FIXME: We should consider removing the old didFirstVisuallyNonEmptyLayoutForFrame API since this is doing 830 827 // double duty with the new didLayout API. … … 838 835 } 839 836 840 Frame* WebFrameLoaderClient::dispatchCreatePage(constNavigationAction&)837 WebCore::Frame* WebFrameLoaderClient::dispatchCreatePage(const WebCore::NavigationAction&) 841 838 { 842 839 WebView *currentWebView = getWebView(m_webFrame.get()); … … 861 858 } 862 859 863 void WebFrameLoaderClient::dispatchDecidePolicyForResponse(const ResourceResponse& response, const ResourceRequest& request, WebCore::PolicyCheckIdentifier identifier, const String&,FramePolicyFunction&& function)860 void WebFrameLoaderClient::dispatchDecidePolicyForResponse(const WebCore::ResourceResponse& response, const WebCore::ResourceRequest& request, WebCore::PolicyCheckIdentifier identifier, const String&, WebCore::FramePolicyFunction&& function) 864 861 { 865 862 WebView *webView = getWebView(m_webFrame.get()); 866 863 867 864 [[webView _policyDelegateForwarder] webView:webView 868 869 request:request.nsURLRequest(HTTPBodyUpdatePolicy::UpdateHTTPBody)870 871 decisionListener:setUpPolicyListener(identifier, WTFMove(function),PolicyAction::Use).get()];872 } 873 874 875 static BOOL shouldTryAppLink(WebView *webView, const NavigationAction& action,Frame* targetFrame)865 decidePolicyForMIMEType:response.mimeType() 866 request:request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody) 867 frame:m_webFrame.get() 868 decisionListener:setUpPolicyListener(identifier, WTFMove(function), WebCore::PolicyAction::Use).get()]; 869 } 870 871 872 static BOOL shouldTryAppLink(WebView *webView, const WebCore::NavigationAction& action, WebCore::Frame* targetFrame) 876 873 { 877 874 #if HAVE(APP_LINKS) … … 892 889 } 893 890 894 void WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction(const NavigationAction& action, const ResourceRequest& request, FormState* formState, const String& frameName, WebCore::PolicyCheckIdentifier identifier,FramePolicyFunction&& function)891 void WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction(const WebCore::NavigationAction& action, const WebCore::ResourceRequest& request, WebCore::FormState* formState, const String& frameName, WebCore::PolicyCheckIdentifier identifier, WebCore::FramePolicyFunction&& function) 895 892 { 896 893 WebView *webView = getWebView(m_webFrame.get()); … … 898 895 899 896 [[webView _policyDelegateForwarder] webView:webView 900 901 request:request.nsURLRequest(HTTPBodyUpdatePolicy::UpdateHTTPBody)902 903 decisionListener:setUpPolicyListener(identifier, WTFMove(function),PolicyAction::Ignore, tryAppLink ? (NSURL *)request.url() : nil).get()];904 } 905 906 void WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(const NavigationAction& action, const ResourceRequest& request, const ResourceResponse&, FormState* formState, PolicyDecisionMode, WebCore::PolicyCheckIdentifier identifier,FramePolicyFunction&& function)897 decidePolicyForNewWindowAction:actionDictionary(action, formState) 898 request:request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody) 899 newFrameName:frameName 900 decisionListener:setUpPolicyListener(identifier, WTFMove(function), WebCore::PolicyAction::Ignore, tryAppLink ? (NSURL *)request.url() : nil).get()]; 901 } 902 903 void WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(const WebCore::NavigationAction& action, const WebCore::ResourceRequest& request, const WebCore::ResourceResponse&, WebCore::FormState* formState, WebCore::PolicyDecisionMode, WebCore::PolicyCheckIdentifier identifier, WebCore::FramePolicyFunction&& function) 907 904 { 908 905 WebView *webView = getWebView(m_webFrame.get()); … … 910 907 911 908 [[webView _policyDelegateForwarder] webView:webView 912 913 request:request.nsURLRequest(HTTPBodyUpdatePolicy::UpdateHTTPBody)914 915 decisionListener:setUpPolicyListener(identifier, WTFMove(function),PolicyAction::Ignore, tryAppLink ? (NSURL *)request.url() : nil).get()];909 decidePolicyForNavigationAction:actionDictionary(action, formState) 910 request:request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody) 911 frame:m_webFrame.get() 912 decisionListener:setUpPolicyListener(identifier, WTFMove(function), WebCore::PolicyAction::Ignore, tryAppLink ? (NSURL *)request.url() : nil).get()]; 916 913 } 917 914 … … 925 922 } 926 923 927 void WebFrameLoaderClient::dispatchUnableToImplementPolicy(const ResourceError& error)924 void WebFrameLoaderClient::dispatchUnableToImplementPolicy(const WebCore::ResourceError& error) 928 925 { 929 926 WebView *webView = getWebView(m_webFrame.get()); … … 931 928 } 932 929 933 static NSDictionary *makeFormFieldValuesDictionary( FormState& formState)930 static NSDictionary *makeFormFieldValuesDictionary(WebCore::FormState& formState) 934 931 { 935 932 auto& textFieldValues = formState.textFieldValues(); … … 952 949 } 953 950 954 void WebFrameLoaderClient::dispatchWillSubmitForm( FormState& formState, CompletionHandler<void()>&& completionHandler)951 void WebFrameLoaderClient::dispatchWillSubmitForm(WebCore::FormState& formState, CompletionHandler<void()>&& completionHandler) 955 952 { 956 953 id <WebFormDelegate> formDelegate = [getWebView(m_webFrame.get()) _formDelegate]; … … 961 958 962 959 NSDictionary *values = makeFormFieldValuesDictionary(formState); 963 CallFormDelegate(getWebView(m_webFrame.get()), @selector(frame:sourceFrame:willSubmitForm:withValues:submissionListener:), m_webFrame.get(), kit(formState.sourceDocument().frame()), kit(&formState.form()), values, setUpPolicyListener( PolicyCheckIdentifier { },964 [completionHandler = WTFMove(completionHandler)]( PolicyAction,PolicyCheckIdentifier) mutable { completionHandler(); },965 PolicyAction::Ignore).get());966 } 967 968 void WebFrameLoaderClient::revertToProvisionalState( DocumentLoader* loader)960 CallFormDelegate(getWebView(m_webFrame.get()), @selector(frame:sourceFrame:willSubmitForm:withValues:submissionListener:), m_webFrame.get(), kit(formState.sourceDocument().frame()), kit(&formState.form()), values, setUpPolicyListener(WebCore::PolicyCheckIdentifier { }, 961 [completionHandler = WTFMove(completionHandler)](WebCore::PolicyAction, WebCore::PolicyCheckIdentifier) mutable { completionHandler(); }, 962 WebCore::PolicyAction::Ignore).get()); 963 } 964 965 void WebFrameLoaderClient::revertToProvisionalState(WebCore::DocumentLoader* loader) 969 966 { 970 967 [dataSource(loader) _revertToProvisionalState]; 971 968 } 972 969 973 void WebFrameLoaderClient::setMainDocumentError( DocumentLoader* loader, constResourceError& error)970 void WebFrameLoaderClient::setMainDocumentError(WebCore::DocumentLoader* loader, const WebCore::ResourceError& error) 974 971 { 975 972 [dataSource(loader) _setMainDocumentError:error]; … … 981 978 } 982 979 983 void WebFrameLoaderClient::startDownload(const ResourceRequest& request, const String& /* suggestedName */)980 void WebFrameLoaderClient::startDownload(const WebCore::ResourceRequest& request, const String& /* suggestedName */) 984 981 { 985 982 // FIXME: Should download full request. … … 987 984 } 988 985 989 void WebFrameLoaderClient::willChangeTitle( DocumentLoader* loader)986 void WebFrameLoaderClient::willChangeTitle(WebCore::DocumentLoader* loader) 990 987 { 991 988 #if !PLATFORM(IOS_FAMILY) … … 995 992 } 996 993 997 void WebFrameLoaderClient::didChangeTitle( DocumentLoader* loader)994 void WebFrameLoaderClient::didChangeTitle(WebCore::DocumentLoader* loader) 998 995 { 999 996 #if !PLATFORM(IOS_FAMILY) … … 1006 1003 { 1007 1004 #if PLATFORM(IOS_FAMILY) 1008 if ( FrameView *view = core(m_webFrame.get())->view())1005 if (WebCore::FrameView *view = core(m_webFrame.get())->view()) 1009 1006 view->didReplaceMultipartContent(); 1010 1007 #endif 1011 1008 } 1012 1009 1013 void WebFrameLoaderClient::committedLoad( DocumentLoader* loader, const char* data, int length)1010 void WebFrameLoaderClient::committedLoad(WebCore::DocumentLoader* loader, const char* data, int length) 1014 1011 { 1015 1012 NSData *nsData = [[NSData alloc] initWithBytesNoCopy:(void*)data length:length freeWhenDone:NO]; … … 1018 1015 } 1019 1016 1020 void WebFrameLoaderClient::finishedLoading( DocumentLoader* loader)1017 void WebFrameLoaderClient::finishedLoading(WebCore::DocumentLoader* loader) 1021 1018 { 1022 1019 [dataSource(loader) _finishedLoading]; … … 1033 1030 { 1034 1031 WebView* view = getWebView(m_webFrame.get()); 1035 DocumentLoader* loader = core(m_webFrame.get())->loader().documentLoader();1032 auto* loader = core(m_webFrame.get())->loader().documentLoader(); 1036 1033 #if PLATFORM(IOS_FAMILY) 1037 1034 if (loader->urlForHistory() == WTF::blankURL()) … … 1043 1040 if (implementations->navigatedFunc) { 1044 1041 WebNavigationData *data = [[WebNavigationData alloc] initWithURLString:loader->url() 1045 1046 originalRequest:loader->originalRequestCopy().nsURLRequest(HTTPBodyUpdatePolicy::UpdateHTTPBody)1047 1048 1049 1042 title:nilOrNSString(loader->title().string) 1043 originalRequest:loader->originalRequestCopy().nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody) 1044 response:loader->response().nsURLResponse() 1045 hasSubstituteData:loader->substituteData().isValid() 1046 clientRedirectSource:loader->clientRedirectSourceForHistory()]; 1050 1047 1051 1048 CallHistoryDelegate(implementations->navigatedFunc, view, @selector(webView:didNavigateWithNavigationData:inFrame:), data, m_webFrame.get()); … … 1075 1072 WebHistoryDelegateImplementationCache* implementations = [view historyDelegate] ? WebViewGetHistoryDelegateImplementations(view) : 0; 1076 1073 1077 DocumentLoader* loader = core(m_webFrame.get())->loader().documentLoader();1074 auto* loader = core(m_webFrame.get())->loader().documentLoader(); 1078 1075 ASSERT(loader->unreachableURL().isEmpty()); 1079 1076 … … 1099 1096 } 1100 1097 1101 bool WebFrameLoaderClient::shouldGoToHistoryItem( HistoryItem& item) const1098 bool WebFrameLoaderClient::shouldGoToHistoryItem(WebCore::HistoryItem& item) const 1102 1099 { 1103 1100 WebView* view = getWebView(m_webFrame.get()); … … 1107 1104 void WebFrameLoaderClient::didDisplayInsecureContent() 1108 1105 { 1109 WebView *webView = getWebView(m_webFrame.get()); 1106 WebView *webView = getWebView(m_webFrame.get()); 1110 1107 WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(webView); 1111 1108 if (implementations->didDisplayInsecureContentFunc) … … 1113 1110 } 1114 1111 1115 void WebFrameLoaderClient::didRunInsecureContent( SecurityOrigin& origin, const URL& insecureURL)1112 void WebFrameLoaderClient::didRunInsecureContent(WebCore::SecurityOrigin& origin, const URL& insecureURL) 1116 1113 { 1117 1114 WebView *webView = getWebView(m_webFrame.get()); … … 1134 1131 } 1135 1132 1136 ResourceError WebFrameLoaderClient::cancelledError(constResourceRequest& request)1133 WebCore::ResourceError WebFrameLoaderClient::cancelledError(const WebCore::ResourceRequest& request) 1137 1134 { 1138 1135 return [NSError _webKitErrorWithDomain:NSURLErrorDomain code:NSURLErrorCancelled URL:request.url()]; 1139 1136 } 1140 1137 1141 ResourceError WebFrameLoaderClient::blockedError(constResourceRequest& request)1138 WebCore::ResourceError WebFrameLoaderClient::blockedError(const WebCore::ResourceRequest& request) 1142 1139 { 1143 1140 return [NSError _webKitErrorWithDomain:WebKitErrorDomain code:WebKitErrorCannotUseRestrictedPort URL:request.url()]; 1144 1141 } 1145 1142 1146 ResourceError WebFrameLoaderClient::blockedByContentBlockerError(constResourceRequest& request)1143 WebCore::ResourceError WebFrameLoaderClient::blockedByContentBlockerError(const WebCore::ResourceRequest& request) 1147 1144 { 1148 1145 RELEASE_ASSERT_NOT_REACHED(); // Content blockers are not enabled in WebKit1. 1149 1146 } 1150 1147 1151 ResourceError WebFrameLoaderClient::cannotShowURLError(constResourceRequest& request)1148 WebCore::ResourceError WebFrameLoaderClient::cannotShowURLError(const WebCore::ResourceRequest& request) 1152 1149 { 1153 1150 return [NSError _webKitErrorWithDomain:WebKitErrorDomain code:WebKitErrorCannotShowURL URL:request.url()]; 1154 1151 } 1155 1152 1156 ResourceError WebFrameLoaderClient::interruptedForPolicyChangeError(constResourceRequest& request)1153 WebCore::ResourceError WebFrameLoaderClient::interruptedForPolicyChangeError(const WebCore::ResourceRequest& request) 1157 1154 { 1158 1155 return [NSError _webKitErrorWithDomain:WebKitErrorDomain code:WebKitErrorFrameLoadInterruptedByPolicyChange URL:request.url()]; … … 1160 1157 1161 1158 #if ENABLE(CONTENT_FILTERING) 1162 ResourceError WebFrameLoaderClient::blockedByContentFilterError(constResourceRequest& request)1159 WebCore::ResourceError WebFrameLoaderClient::blockedByContentFilterError(const WebCore::ResourceRequest& request) 1163 1160 { 1164 1161 return [NSError _webKitErrorWithDomain:WebKitErrorDomain code:WebKitErrorFrameLoadBlockedByContentFilter URL:request.url()]; … … 1166 1163 #endif 1167 1164 1168 ResourceError WebFrameLoaderClient::cannotShowMIMETypeError(constResourceResponse& response)1165 WebCore::ResourceError WebFrameLoaderClient::cannotShowMIMETypeError(const WebCore::ResourceResponse& response) 1169 1166 { 1170 1167 return [NSError _webKitErrorWithDomain:NSURLErrorDomain code:WebKitErrorCannotShowMIMEType URL:response.url()]; 1171 1168 } 1172 1169 1173 ResourceError WebFrameLoaderClient::fileDoesNotExistError(constResourceResponse& response)1170 WebCore::ResourceError WebFrameLoaderClient::fileDoesNotExistError(const WebCore::ResourceResponse& response) 1174 1171 { 1175 1172 return [NSError _webKitErrorWithDomain:NSURLErrorDomain code:NSURLErrorFileDoesNotExist URL:response.url()]; 1176 1173 } 1177 1174 1178 ResourceError WebFrameLoaderClient::pluginWillHandleLoadError(constResourceResponse& response)1175 WebCore::ResourceError WebFrameLoaderClient::pluginWillHandleLoadError(const WebCore::ResourceResponse& response) 1179 1176 { 1180 1177 NSError *error = [[NSError alloc] _initWithPluginErrorCode:WebKitErrorPlugInWillHandleLoad … … 1186 1183 } 1187 1184 1188 bool WebFrameLoaderClient::shouldFallBack(const ResourceError& error)1185 bool WebFrameLoaderClient::shouldFallBack(const WebCore::ResourceError& error) 1189 1186 { 1190 1187 // FIXME: Needs to check domain. … … 1194 1191 } 1195 1192 1196 bool WebFrameLoaderClient::canHandleRequest(const ResourceRequest& request) const1197 { 1198 return [WebView _canHandleRequest:request.nsURLRequest( HTTPBodyUpdatePolicy::UpdateHTTPBody) forMainFrame:core(m_webFrame.get())->isMainFrame()];1193 bool WebFrameLoaderClient::canHandleRequest(const WebCore::ResourceRequest& request) const 1194 { 1195 return [WebView _canHandleRequest:request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody) forMainFrame:core(m_webFrame.get())->isMainFrame()]; 1199 1196 } 1200 1197 … … 1228 1225 } 1229 1226 1230 void WebFrameLoaderClient::saveViewStateToItem( HistoryItem& item)1227 void WebFrameLoaderClient::saveViewStateToItem(WebCore::HistoryItem& item) 1231 1228 { 1232 1229 #if PLATFORM(IOS_FAMILY) … … 1250 1247 void WebFrameLoaderClient::restoreViewState() 1251 1248 { 1252 HistoryItem* currentItem = core(m_webFrame.get())->loader().history().currentItem();1249 WebCore::HistoryItem* currentItem = core(m_webFrame.get())->loader().history().currentItem(); 1253 1250 ASSERT(currentItem); 1254 1251 … … 1334 1331 } 1335 1332 1336 Ref< DocumentLoader> WebFrameLoaderClient::createDocumentLoader(const ResourceRequest& request, constSubstituteData& substituteData)1333 Ref<WebCore::DocumentLoader> WebFrameLoaderClient::createDocumentLoader(const WebCore::ResourceRequest& request, const WebCore::SubstituteData& substituteData) 1337 1334 { 1338 1335 auto loader = WebDocumentLoaderMac::create(request, substituteData); … … 1345 1342 } 1346 1343 1347 void WebFrameLoaderClient::setTitle(const StringWithDirection& title, const URL& url)1344 void WebFrameLoaderClient::setTitle(const WebCore::StringWithDirection& title, const URL& url) 1348 1345 { 1349 1346 WebView* view = getWebView(m_webFrame.get()); … … 1373 1370 } 1374 1371 1375 void WebFrameLoaderClient::savePlatformDataToCachedFrame( CachedFrame* cachedFrame)1372 void WebFrameLoaderClient::savePlatformDataToCachedFrame(WebCore::CachedFrame* cachedFrame) 1376 1373 { 1377 1374 cachedFrame->setCachedFramePlatformData(makeUnique<WebCachedFramePlatformData>(m_webFrame->_private->webFrameView.documentView)); … … 1384 1381 } 1385 1382 1386 void WebFrameLoaderClient::transitionToCommittedFromCachedFrame( CachedFrame* cachedFrame)1383 void WebFrameLoaderClient::transitionToCommittedFromCachedFrame(WebCore::CachedFrame* cachedFrame) 1387 1384 { 1388 1385 WebCachedFramePlatformData* platformData = static_cast<WebCachedFramePlatformData*>(cachedFrame->cachedFramePlatformData()); … … 1460 1457 1461 1458 // If we own the view, delete the old one - otherwise the render m_frame will take care of deleting the view. 1462 Frame* coreFrame = core(m_webFrame.get());1463 Page* page = coreFrame->page();1459 auto* coreFrame = core(m_webFrame.get()); 1460 auto* page = coreFrame->page(); 1464 1461 bool isMainFrame = coreFrame->isMainFrame(); 1465 1462 if (isMainFrame && coreFrame->view()) 1466 1463 coreFrame->view()->setParentVisible(false); 1467 1464 coreFrame->setView(nullptr); 1468 auto coreView = FrameView::create(*coreFrame);1465 auto coreView = WebCore::FrameView::create(*coreFrame); 1469 1466 coreFrame->setView(coreView.copyRef()); 1470 1467 … … 1487 1484 // will get the proper title. 1488 1485 if (auto* documentLoader = [dataSource _documentLoader]) 1489 documentLoader->setTitle({ [dataSource pageTitle], TextDirection::LTR });1486 documentLoader->setTitle({ [dataSource pageTitle], WebCore::TextDirection::LTR }); 1490 1487 1491 1488 if (auto* ownerElement = coreFrame->ownerElement()) 1492 coreFrame->view()->setCanHaveScrollbars(ownerElement->scrollingMode() != ScrollbarAlwaysOff);1489 coreFrame->view()->setCanHaveScrollbars(ownerElement->scrollingMode() != WebCore::ScrollbarAlwaysOff); 1493 1490 1494 1491 // If the document view implicitly became first responder, make sure to set the focused frame properly. … … 1516 1513 } 1517 1514 1518 RetainPtr<WebFramePolicyListener> WebFrameLoaderClient::setUpPolicyListener( PolicyCheckIdentifier identifier, FramePolicyFunction&& function,PolicyAction defaultPolicy, NSURL *appLinkURL)1515 RetainPtr<WebFramePolicyListener> WebFrameLoaderClient::setUpPolicyListener(WebCore::PolicyCheckIdentifier identifier, WebCore::FramePolicyFunction&& function, WebCore::PolicyAction defaultPolicy, NSURL *appLinkURL) 1519 1516 { 1520 1517 // FIXME: <rdar://5634381> We need to support multiple active policy listeners. … … 1549 1546 } 1550 1547 1551 NSDictionary *WebFrameLoaderClient::actionDictionary(const NavigationAction& action,FormState* formState) const1548 NSDictionary *WebFrameLoaderClient::actionDictionary(const WebCore::NavigationAction& action, WebCore::FormState* formState) const 1552 1549 { 1553 1550 unsigned modifierFlags = 0; … … 1579 1576 if (auto mouseEventData = action.mouseEventData()) { 1580 1577 WebElementDictionary *element = [[WebElementDictionary alloc] 1581 initWithHitTestResult:core(m_webFrame.get())->eventHandler().hitTestResultAtPoint(mouseEventData->absoluteLocation, HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::DisallowUserAgentShadowContent |HitTestRequest::AllowChildFrameContent)];1578 initWithHitTestResult:core(m_webFrame.get())->eventHandler().hitTestResultAtPoint(mouseEventData->absoluteLocation, WebCore::HitTestRequest::ReadOnly | WebCore::HitTestRequest::Active | WebCore::HitTestRequest::DisallowUserAgentShadowContent | WebCore::HitTestRequest::AllowChildFrameContent)]; 1582 1579 [result setObject:element forKey:WebActionElementKey]; 1583 1580 [element release]; … … 1602 1599 1603 1600 // We only cache pages if the back forward list is enabled and has a non-zero capacity. 1604 Page* page = core(m_webFrame.get())->page();1601 auto* page = core(m_webFrame.get())->page(); 1605 1602 if (!page) 1606 1603 return false; 1607 1604 1608 BackForwardList& backForwardList = static_cast<BackForwardList&>(page->backForward().client());1605 auto& backForwardList = static_cast<BackForwardList&>(page->backForward().client()); 1609 1606 if (!backForwardList.enabled()) 1610 1607 return false; … … 1616 1613 } 1617 1614 1618 RefPtr< Frame> WebFrameLoaderClient::createFrame(const URL& url, const String& name,HTMLFrameOwnerElement& ownerElement,1615 RefPtr<WebCore::Frame> WebFrameLoaderClient::createFrame(const URL& url, const String& name, WebCore::HTMLFrameOwnerElement& ownerElement, 1619 1616 const String& referrer) 1620 1617 { … … 1625 1622 WebFrameView *childView = [[WebFrameView alloc] init]; 1626 1623 1627 RefPtr< Frame> result = [WebFrame _createSubframeWithOwnerElement:&ownerElement frameName:name frameView:childView];1624 RefPtr<WebCore::Frame> result = [WebFrame _createSubframeWithOwnerElement:&ownerElement frameName:name frameView:childView]; 1628 1625 [childView release]; 1629 1626 … … 1650 1647 } 1651 1648 1652 ObjectContentType WebFrameLoaderClient::objectContentType(const URL& url, const String& mimeType)1649 WebCore::ObjectContentType WebFrameLoaderClient::objectContentType(const URL& url, const String& mimeType) 1653 1650 { 1654 1651 BEGIN_BLOCK_OBJC_EXCEPTIONS; … … 1665 1662 // If no MIME type is specified, use a plug-in if we have one that can handle the extension. 1666 1663 if ([getWebView(m_webFrame.get()) _pluginForExtension:extension]) 1667 return ObjectContentType::PlugIn;1664 return WebCore::ObjectContentType::PlugIn; 1668 1665 } 1669 1666 } … … 1671 1668 1672 1669 if (type.isEmpty()) 1673 return ObjectContentType::Frame; // Go ahead and hope that we can display the content.1674 1675 ObjectContentType plugInType =ObjectContentType::None;1670 return WebCore::ObjectContentType::Frame; // Go ahead and hope that we can display the content. 1671 1672 WebCore::ObjectContentType plugInType = WebCore::ObjectContentType::None; 1676 1673 if ([getWebView(m_webFrame.get()) _pluginForMIMEType:type]) 1677 plugInType = ObjectContentType::PlugIn;1678 1679 if ( MIMETypeRegistry::isSupportedImageMIMEType(type))1680 return ObjectContentType::Image;1681 1682 if (plugInType != ObjectContentType::None)1674 plugInType = WebCore::ObjectContentType::PlugIn; 1675 1676 if (WebCore::MIMETypeRegistry::isSupportedImageMIMEType(type)) 1677 return WebCore::ObjectContentType::Image; 1678 1679 if (plugInType != WebCore::ObjectContentType::None) 1683 1680 return plugInType; 1684 1681 1685 1682 if ([m_webFrame->_private->webFrameView _viewClassForMIMEType:type]) 1686 return ObjectContentType::Frame;1687 1688 return ObjectContentType::None;1683 return WebCore::ObjectContentType::Frame; 1684 1685 return WebCore::ObjectContentType::None; 1689 1686 1690 1687 END_BLOCK_OBJC_EXCEPTIONS; 1691 1688 1692 return ObjectContentType::None;1689 return WebCore::ObjectContentType::None; 1693 1690 } 1694 1691 … … 1759 1756 } 1760 1757 1761 class PluginWidget : public PluginViewBase {1758 class PluginWidget : public WebCore::PluginViewBase { 1762 1759 public: 1763 PluginWidget(NSView *view = 0)1764 : PluginViewBase(view)1760 PluginWidget(NSView *view = nil) 1761 : WebCore::PluginViewBase(view) 1765 1762 { 1766 1763 } 1767 1764 1768 1765 private: 1769 virtual void invalidateRect(const IntRect& rect)1766 virtual void invalidateRect(const WebCore::IntRect& rect) 1770 1767 { 1771 1768 [platformWidget() setNeedsDisplayInRect:rect]; … … 1843 1840 } 1844 1841 1845 virtual void handleEvent( Event& event)1842 virtual void handleEvent(WebCore::Event& event) 1846 1843 { 1847 Frame* frame =Frame::frameForWidget(*this);1844 auto* frame = WebCore::Frame::frameForWidget(*this); 1848 1845 if (!frame) 1849 1846 return; 1850 1847 1851 1848 NSEvent* currentNSEvent = frame->eventHandler().currentNSEvent(); 1852 if (event.type() == eventNames().mousemoveEvent)1849 if (event.type() == WebCore::eventNames().mousemoveEvent) 1853 1850 [(WebBaseNetscapePluginView *)platformWidget() handleMouseMoved:currentNSEvent]; 1854 else if (event.type() == eventNames().mouseoverEvent)1851 else if (event.type() == WebCore::eventNames().mouseoverEvent) 1855 1852 [(WebBaseNetscapePluginView *)platformWidget() handleMouseEntered:currentNSEvent]; 1856 else if (event.type() == eventNames().mouseoutEvent)1853 else if (event.type() == WebCore::eventNames().mouseoutEvent) 1857 1854 [(WebBaseNetscapePluginView *)platformWidget() handleMouseExited:currentNSEvent]; 1858 else if (event.type() == eventNames().contextmenuEvent)1855 else if (event.type() == WebCore::eventNames().contextmenuEvent) 1859 1856 event.setDefaultHandled(); // We don't know if the plug-in has handled mousedown event by displaying a context menu, so we never want WebKit to show a default one. 1860 1857 } … … 1867 1864 1868 1865 private: 1869 virtual void notifyWidget(W idgetNotification notification)1866 virtual void notifyWidget(WebCore::WidgetNotification notification) 1870 1867 { 1871 1868 switch (notification) { 1872 case W illPaintFlattened: {1869 case WebCore::WillPaintFlattened: { 1873 1870 BEGIN_BLOCK_OBJC_EXCEPTIONS; 1874 1871 [(WebBaseNetscapePluginView *)platformWidget() cacheSnapshot]; … … 1876 1873 break; 1877 1874 } 1878 case DidPaintFlattened: {1875 case WebCore::DidPaintFlattened: { 1879 1876 BEGIN_BLOCK_OBJC_EXCEPTIONS; 1880 1877 [(WebBaseNetscapePluginView *)platformWidget() clearCachedSnapshot]; … … 1897 1894 { 1898 1895 #if PLATFORM(MAC) 1899 auto loadPolicy = PluginBlacklist::loadPolicyForPluginVersion(pluginPackage.bundleIdentifier, pluginPackage.bundleVersion);1900 return loadPolicy == PluginBlacklist::LoadPolicy::BlockedForSecurity || loadPolicy ==PluginBlacklist::LoadPolicy::BlockedForCompatibility;1896 auto loadPolicy = WebCore::PluginBlacklist::loadPolicyForPluginVersion(pluginPackage.bundleIdentifier, pluginPackage.bundleVersion); 1897 return loadPolicy == WebCore::PluginBlacklist::LoadPolicy::BlockedForSecurity || loadPolicy == WebCore::PluginBlacklist::LoadPolicy::BlockedForCompatibility; 1901 1898 #else 1902 1899 UNUSED_PARAM(pluginPackage); … … 1905 1902 } 1906 1903 1907 RefPtr<W idget> WebFrameLoaderClient::createPlugin(const IntSize& size,HTMLPlugInElement& element, const URL& url,1904 RefPtr<WebCore::Widget> WebFrameLoaderClient::createPlugin(const WebCore::IntSize& size, WebCore::HTMLPlugInElement& element, const URL& url, 1908 1905 const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually) 1909 1906 { … … 1915 1912 1916 1913 WebView *webView = getWebView(m_webFrame.get()); 1917 Document* document = core(m_webFrame.get())->document();1914 auto* document = core(m_webFrame.get())->document(); 1918 1915 NSURL *baseURL = document->baseURL(); 1919 1916 NSURL *pluginURL = url; … … 1974 1971 if (shouldBlockPlugin(pluginPackage)) { 1975 1972 errorCode = WebKitErrorBlockedPlugInVersion; 1976 if (is< RenderEmbeddedObject>(element.renderer()))1977 downcast< RenderEmbeddedObject>(*element.renderer()).setPluginUnavailabilityReason(RenderEmbeddedObject::InsecurePluginVersion);1973 if (is<WebCore::RenderEmbeddedObject>(element.renderer())) 1974 downcast<WebCore::RenderEmbeddedObject>(*element.renderer()).setPluginUnavailabilityReason(WebCore::RenderEmbeddedObject::InsecurePluginVersion); 1978 1975 } else { 1979 1976 if ([pluginPackage isKindOfClass:[WebPluginPackage class]]) … … 2005 2002 WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView); 2006 2003 if (implementations->plugInFailedWithErrorFunc) { 2007 URL pluginPageURL = document->completeURL( stripLeadingAndTrailingHTMLSpaces(parameterValue(paramNames, paramValues, "pluginspage")));2004 URL pluginPageURL = document->completeURL(WebCore::stripLeadingAndTrailingHTMLSpaces(parameterValue(paramNames, paramValues, "pluginspage"))); 2008 2005 if (!pluginPageURL.protocolIsInHTTPFamily()) 2009 2006 pluginPageURL = URL(); … … 2032 2029 } 2033 2030 2034 void WebFrameLoaderClient::redirectDataToPlugin(W idget& pluginWidget)2031 void WebFrameLoaderClient::redirectDataToPlugin(WebCore::Widget& pluginWidget) 2035 2032 { 2036 2033 BEGIN_BLOCK_OBJC_EXCEPTIONS; … … 2054 2051 } 2055 2052 2056 RefPtr<W idget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& size,HTMLAppletElement& element, const URL& baseURL,2053 RefPtr<WebCore::Widget> WebFrameLoaderClient::createJavaAppletWidget(const WebCore::IntSize& size, WebCore::HTMLAppletElement& element, const URL& baseURL, 2057 2054 const Vector<String>& paramNames, const Vector<String>& paramValues) 2058 2055 { … … 2072 2069 if (shouldBlockPlugin(pluginPackage)) { 2073 2070 errorCode = WebKitErrorBlockedPlugInVersion; 2074 if (is< RenderEmbeddedObject>(element.renderer()))2075 downcast< RenderEmbeddedObject>(*element.renderer()).setPluginUnavailabilityReason(RenderEmbeddedObject::InsecurePluginVersion);2071 if (is<WebCore::RenderEmbeddedObject>(element.renderer())) 2072 downcast<WebCore::RenderEmbeddedObject>(*element.renderer()).setPluginUnavailabilityReason(WebCore::RenderEmbeddedObject::InsecurePluginVersion); 2076 2073 } else { 2077 2074 #if ENABLE(NETSCAPE_PLUGIN_API) … … 2121 2118 { 2122 2119 #if PLATFORM(MAC) 2123 return Web GLBlacklist::shouldBlockWebGL();2120 return WebCore::WebGLBlacklist::shouldBlockWebGL(); 2124 2121 #else 2125 2122 return false; … … 2129 2126 WebCore::WebGLLoadPolicy WebFrameLoaderClient::webGLPolicyForURL(const URL&) const 2130 2127 { 2131 return shouldBlockWebGL() ? Web GLBlockCreation :WebGLAllowCreation;2128 return shouldBlockWebGL() ? WebCore::WebGLBlockCreation : WebCore::WebGLAllowCreation; 2132 2129 } 2133 2130 2134 2131 WebCore::WebGLLoadPolicy WebFrameLoaderClient::resolveWebGLPolicyForURL(const URL&) const 2135 2132 { 2136 return shouldBlockWebGL() ? Web GLBlockCreation :WebGLAllowCreation;2133 return shouldBlockWebGL() ? WebCore::WebGLBlockCreation : WebCore::WebGLAllowCreation; 2137 2134 } 2138 2135 #endif // ENABLE(WEBGL) 2139 2136 2140 void WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld( DOMWrapperWorld& world)2137 void WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld& world) 2141 2138 { 2142 2139 WebView *webView = getWebView(m_webFrame.get()); … … 2149 2146 } 2150 2147 2151 if (&world != & mainThreadNormalWorld())2148 if (&world != &WebCore::mainThreadNormalWorld()) 2152 2149 return; 2153 2150 2154 Frame *frame = core(m_webFrame.get());2155 ScriptController& script = frame->script();2151 auto* frame = core(m_webFrame.get()); 2152 auto& script = frame->script(); 2156 2153 2157 2154 #if JSC_OBJC_API_ENABLED … … 2175 2172 } 2176 2173 2177 Ref< FrameNetworkingContext> WebFrameLoaderClient::createNetworkingContext()2174 Ref< WebCore::FrameNetworkingContext> WebFrameLoaderClient::createNetworkingContext() 2178 2175 { 2179 2176 return WebFrameNetworkingContext::create(core(m_webFrame.get())); … … 2194 2191 2195 2192 #if USE(QUICK_LOOK) 2196 RefPtr< PreviewLoaderClient> WebFrameLoaderClient::createPreviewLoaderClient(const String& fileName, const String& uti)2193 RefPtr<WebCore::PreviewLoaderClient> WebFrameLoaderClient::createPreviewLoaderClient(const String& fileName, const String& uti) 2197 2194 { 2198 2195 class QuickLookDocumentWriter : public WebCore::PreviewLoaderClient { … … 2234 2231 return nullptr; 2235 2232 2236 NSString *filePath = createTemporaryFileForQuickLook(fileName);2233 NSString *filePath = WebCore::createTemporaryFileForQuickLook(fileName); 2237 2234 if (!filePath) 2238 2235 return nullptr; … … 2261 2258 { 2262 2259 auto* frame = core(m_webFrame.get()); 2263 DocumentLoader* documentLoader = frame->loader().documentLoader();2260 auto* documentLoader = frame->loader().documentLoader(); 2264 2261 ASSERT(documentLoader); 2265 2262 … … 2290 2287 // To preserve that behavior we walk the list backwards. 2291 2288 for (auto icon = icons.rbegin(); icon != icons.rend(); ++icon) { 2292 if (icon->first.type != LinkIconType::Favicon || m_activeIconLoadCallbackID) {2289 if (icon->first.type != WebCore::LinkIconType::Favicon || m_activeIconLoadCallbackID) { 2293 2290 documentLoader->didGetLoadDecisionForIcon(false, icon->second, 0); 2294 2291 continue; … … 2306 2303 2307 2304 #if !PLATFORM(IOS_FAMILY) 2308 static NSImage *webGetNSImage( Image* image, NSSize size)2305 static NSImage *webGetNSImage(WebCore::Image* image, NSSize size) 2309 2306 { 2310 2307 ASSERT(size.width); … … 2329 2326 #endif // !PLATFORM(IOS_FAMILY) 2330 2327 2331 void WebFrameLoaderClient::finishedLoadingIcon(uint64_t callbackID, SharedBuffer* iconData)2328 void WebFrameLoaderClient::finishedLoadingIcon(uint64_t callbackID, WebCore::SharedBuffer* iconData) 2332 2329 { 2333 2330 #if !PLATFORM(IOS_FAMILY) … … 2340 2337 return; 2341 2338 2342 auto image = BitmapImage::create();2343 if (image->setData(iconData, true) < EncodedDataStatus::SizeAvailable)2339 auto image = WebCore::BitmapImage::create(); 2340 if (image->setData(iconData, true) < WebCore::EncodedDataStatus::SizeAvailable) 2344 2341 return; 2345 2342 … … 2364 2361 } 2365 2362 2366 - (id)initWithFrame:( Frame*)frame identifier:(PolicyCheckIdentifier)identifier policyFunction:(FramePolicyFunction&&)policyFunction defaultPolicy:(PolicyAction)defaultPolicy2363 - (id)initWithFrame:(WebCore::Frame*)frame identifier:(WebCore::PolicyCheckIdentifier)identifier policyFunction:(WebCore::FramePolicyFunction&&)policyFunction defaultPolicy:(WebCore::PolicyAction)defaultPolicy 2367 2364 { 2368 2365 self = [self init]; … … 2379 2376 2380 2377 #if HAVE(APP_LINKS) 2381 - (id)initWithFrame:( Frame*)frame identifier:(PolicyCheckIdentifier)identifier policyFunction:(FramePolicyFunction&&)policyFunction defaultPolicy:(PolicyAction)defaultPolicy appLinkURL:(NSURL *)appLinkURL2378 - (id)initWithFrame:(WebCore::Frame*)frame identifier:(WebCore::PolicyCheckIdentifier)identifier policyFunction:(WebCore::FramePolicyFunction&&)policyFunction defaultPolicy:(WebCore::PolicyAction)defaultPolicy appLinkURL:(NSURL *)appLinkURL 2382 2379 { 2383 2380 self = [self initWithFrame:frame identifier:identifier policyFunction:WTFMove(policyFunction) defaultPolicy:defaultPolicy]; … … 2395 2392 _frame = nullptr; 2396 2393 if (auto policyFunction = std::exchange(_policyFunction, nullptr)) 2397 policyFunction( PolicyAction::Ignore, _identifier);2394 policyFunction(WebCore::PolicyAction::Ignore, _identifier); 2398 2395 } 2399 2396 … … 2414 2411 } 2415 2412 2416 - (void)receivedPolicyDecision:( PolicyAction)action2413 - (void)receivedPolicyDecision:(WebCore::PolicyAction)action 2417 2414 { 2418 2415 auto frame = WTFMove(_frame); … … 2426 2423 - (void)ignore 2427 2424 { 2428 [self receivedPolicyDecision: PolicyAction::Ignore];2425 [self receivedPolicyDecision:WebCore::PolicyAction::Ignore]; 2429 2426 } 2430 2427 2431 2428 - (void)download 2432 2429 { 2433 [self receivedPolicyDecision: PolicyAction::Download];2430 [self receivedPolicyDecision:WebCore::PolicyAction::Download]; 2434 2431 } 2435 2432 … … 2441 2438 WebThreadRun(^{ 2442 2439 if (success) 2443 [self receivedPolicyDecision: PolicyAction::Ignore];2440 [self receivedPolicyDecision:WebCore::PolicyAction::Ignore]; 2444 2441 else 2445 [self receivedPolicyDecision: PolicyAction::Use];2442 [self receivedPolicyDecision:WebCore::PolicyAction::Use]; 2446 2443 }); 2447 2444 }]; … … 2450 2447 #endif 2451 2448 2452 [self receivedPolicyDecision: PolicyAction::Use];2449 [self receivedPolicyDecision:WebCore::PolicyAction::Use]; 2453 2450 } 2454 2451 2455 2452 - (void)continue 2456 2453 { 2457 [self receivedPolicyDecision: PolicyAction::Use];2454 [self receivedPolicyDecision:WebCore::PolicyAction::Use]; 2458 2455 } 2459 2456 -
trunk/Source/WebKitLegacy/mac/WebInspector/WebInspector.mm
r189970 r250549 38 38 #include <WebCore/Page.h> 39 39 40 using namespace WebCore;41 42 40 NSString *WebInspectorDidStartSearchingForNode = @"WebInspectorDidStartSearchingForNode"; 43 41 NSString *WebInspectorDidStopSearchingForNode = @"WebInspectorDidStopSearchingForNode"; … … 67 65 - (void)showWindow 68 66 { 69 if ( Page* inspectedPage = core(_inspectedWebView))67 if (auto* inspectedPage = core(_inspectedWebView)) 70 68 inspectedPage->inspectorController().show(); 71 69 } … … 174 172 - (void)evaluateInFrontend:(id)sender script:(NSString *)script 175 173 { 176 if ( Page* inspectedPage = core(_inspectedWebView))174 if (auto* inspectedPage = core(_inspectedWebView)) 177 175 inspectedPage->inspectorController().evaluateForTestInFrontend(script); 178 176 } -
trunk/Source/WebKitLegacy/mac/WebView/WebClipView.mm
r246285 r250549 29 29 #import "WebClipView.h" 30 30 31 #if !PLATFORM(IOS_FAMILY) 32 31 33 #import "WebFrameInternal.h" 32 34 #import "WebFrameView.h" … … 42 44 43 45 // FIXME: Change terminology from "additional clip" to "focus ring clip". 44 45 using namespace WebCore;46 46 47 47 @interface NSView (WebViewMethod) … … 92 92 return [super visibleRect]; 93 93 94 if ( Frame* coreFrame = core([webFrameView webFrame])) {95 if ( FrameView* frameView = coreFrame->view()) {94 if (auto* coreFrame = core([webFrameView webFrame])) { 95 if (auto* frameView = coreFrame->view()) { 96 96 if (frameView->isEnclosedInCompositingLayer()) 97 97 return [self bounds]; … … 115 115 // We may hit this immediate scrolling code during a layout operation trigged by an AppKit call. When 116 116 // this happens, WebCore will not paint. So, we need to mark this region dirty so that it paints properly. 117 WebFrameView*webFrameView = (WebFrameView *)[[self superview] superview];117 auto *webFrameView = (WebFrameView *)[[self superview] superview]; 118 118 if ([webFrameView isKindOfClass:[WebFrameView class]]) { 119 if ( Frame* coreFrame = core([webFrameView webFrame])) {120 if ( FrameView* frameView = coreFrame->view()) {119 if (auto* coreFrame = core([webFrameView webFrame])) { 120 if (auto* frameView = coreFrame->view()) { 121 121 if (!frameView->layoutContext().inPaintableState()) 122 122 [self setNeedsDisplay:YES]; … … 172 172 173 173 @end 174 175 #endif -
trunk/Source/WebKitLegacy/mac/WebView/WebDataSource.mm
r243471 r250549 76 76 #endif 77 77 78 using namespace WebCore;79 80 78 class WebDataSourcePrivate 81 79 { … … 321 319 [markupString release]; 322 320 return fragment; 323 } else if ( MIMETypeRegistry::isSupportedImageMIMEType(MIMEType)) {321 } else if (WebCore::MIMETypeRegistry::isSupportedImageMIMEType(MIMEType)) { 324 322 return [self _documentFragmentWithImageResource:mainResource]; 325 323 … … 398 396 } 399 397 400 - ( DocumentLoader*)_documentLoader398 - (WebCore::DocumentLoader*)_documentLoader 401 399 { 402 400 return toPrivate(_private)->loader.ptr(); … … 442 440 - (instancetype)initWithRequest:(NSURLRequest *)request 443 441 { 444 return [self _initWithDocumentLoader:WebDocumentLoaderMac::create(request, SubstituteData())];442 return [self _initWithDocumentLoader:WebDocumentLoaderMac::create(request, WebCore::SubstituteData())]; 445 443 } 446 444 … … 456 454 // Added in -[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]. 457 455 if (NSURL *url = [[self response] URL]) 458 removeQLPreviewConverterForURL(url);456 WebCore::removeQLPreviewConverterForURL(url); 459 457 #endif 460 458 … … 466 464 - (NSData *)data 467 465 { 468 RefPtr< SharedBuffer> mainResourceData = toPrivate(_private)->loader->mainResourceData();466 RefPtr<WebCore::SharedBuffer> mainResourceData = toPrivate(_private)->loader->mainResourceData(); 469 467 if (!mainResourceData) 470 468 return nil; … … 479 477 - (WebFrame *)webFrame 480 478 { 481 if ( Frame* frame = toPrivate(_private)->loader->frame())479 if (auto* frame = toPrivate(_private)->loader->frame()) 482 480 return kit(frame); 483 481 … … 487 485 - (NSURLRequest *)initialRequest 488 486 { 489 return toPrivate(_private)->loader->originalRequest().nsURLRequest( HTTPBodyUpdatePolicy::UpdateHTTPBody);487 return toPrivate(_private)->loader->originalRequest().nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody); 490 488 } 491 489 492 490 - (NSMutableURLRequest *)request 493 491 { 494 FrameLoader* frameLoader = toPrivate(_private)->loader->frameLoader();492 auto* frameLoader = toPrivate(_private)->loader->frameLoader(); 495 493 if (!frameLoader || !frameLoader->frameHasLoaded()) 496 494 return nil; 497 495 498 496 // FIXME: this cast is dubious 499 return (NSMutableURLRequest *)toPrivate(_private)->loader->request().nsURLRequest( HTTPBodyUpdatePolicy::UpdateHTTPBody);497 return (NSMutableURLRequest *)toPrivate(_private)->loader->request().nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody); 500 498 } 501 499 … … 538 536 return nil; 539 537 540 return [[[WebArchive alloc] _initWithCoreLegacyWebArchive: LegacyWebArchive::create(*core([self webFrame]))] autorelease];538 return [[[WebArchive alloc] _initWithCoreLegacyWebArchive:WebCore::LegacyWebArchive::create(*core([self webFrame]))] autorelease]; 541 539 } 542 540 -
trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm
r249175 r250549 129 129 #endif 130 130 131 using namespace WebCore;132 using namespace HTMLNames;133 134 131 using JSC::JSGlobalObject; 135 132 using JSC::JSLock; … … 200 197 @end 201 198 202 EditableLinkBehavior core(WebKitEditableLinkBehavior editableLinkBehavior) 203 { 199 WebCore::EditableLinkBehavior core(WebKitEditableLinkBehavior editableLinkBehavior) 200 { 201 using namespace WebCore; 204 202 switch (editableLinkBehavior) { 205 203 case WebKitEditableLinkDefaultBehavior: … … 218 216 } 219 217 220 TextDirectionSubmenuInclusionBehavior core(WebTextDirectionSubmenuInclusionBehavior behavior) 221 { 218 WebCore::TextDirectionSubmenuInclusionBehavior core(WebTextDirectionSubmenuInclusionBehavior behavior) 219 { 220 using namespace WebCore; 222 221 switch (behavior) { 223 222 case WebTextDirectionSubmenuNeverIncluded: … … 256 255 @implementation WebFrame (WebInternal) 257 256 258 Frame* core(WebFrame *frame)257 WebCore::Frame* core(WebFrame *frame) 259 258 { 260 259 return frame ? frame->_private->coreFrame : 0; 261 260 } 262 261 263 WebFrame *kit( Frame* frame)262 WebFrame *kit(WebCore::Frame* frame) 264 263 { 265 264 if (!frame) 266 265 return nil; 267 266 268 FrameLoaderClient& frameLoaderClient = frame->loader().client();267 WebCore::FrameLoaderClient& frameLoaderClient = frame->loader().client(); 269 268 if (frameLoaderClient.isEmptyFrameLoaderClient()) 270 269 return nil; … … 273 272 } 274 273 275 Page* core(WebView *webView)274 WebCore::Page* core(WebView *webView) 276 275 { 277 276 return [webView page]; 278 277 } 279 278 280 WebView *kit( Page* page)279 WebView *kit(WebCore::Page* page) 281 280 { 282 281 if (!page) … … 291 290 WebView *getWebView(WebFrame *webFrame) 292 291 { 293 Frame* coreFrame = core(webFrame);292 auto* coreFrame = core(webFrame); 294 293 if (!coreFrame) 295 294 return nil; … … 297 296 } 298 297 299 + (Ref<WebCore::Frame>)_createFrameWithPage:( Page*)page frameName:(const String&)name frameView:(WebFrameView *)frameView ownerElement:(HTMLFrameOwnerElement*)ownerElement298 + (Ref<WebCore::Frame>)_createFrameWithPage:(WebCore::Page*)page frameName:(const String&)name frameView:(WebFrameView *)frameView ownerElement:(WebCore::HTMLFrameOwnerElement*)ownerElement 300 299 { 301 300 WebView *webView = kit(page); 302 301 303 302 WebFrame *frame = [[self alloc] _initWithWebFrameView:frameView webView:webView]; 304 auto coreFrame = Frame::create(page, ownerElement, new WebFrameLoaderClient(frame));303 auto coreFrame = WebCore::Frame::create(page, ownerElement, new WebFrameLoaderClient(frame)); 305 304 [frame release]; 306 305 frame->_private->coreFrame = coreFrame.ptr(); … … 319 318 } 320 319 321 + (void)_createMainFrameWithPage:( Page*)page frameName:(const String&)name frameView:(WebFrameView *)frameView320 + (void)_createMainFrameWithPage:(WebCore::Page*)page frameName:(const String&)name frameView:(WebFrameView *)frameView 322 321 { 323 322 WebView *webView = kit(page); … … 334 333 } 335 334 336 + (Ref<WebCore::Frame>)_createSubframeWithOwnerElement:( HTMLFrameOwnerElement*)ownerElement frameName:(const String&)name frameView:(WebFrameView *)frameView335 + (Ref<WebCore::Frame>)_createSubframeWithOwnerElement:(WebCore::HTMLFrameOwnerElement*)ownerElement frameName:(const String&)name frameView:(WebFrameView *)frameView 337 336 { 338 337 return [self _createFrameWithPage:ownerElement->document().frame()->page() frameName:name frameView:frameView ownerElement:ownerElement]; … … 347 346 static NSURL *createUniqueWebDataURL(); 348 347 349 + (void)_createMainFrameWithSimpleHTMLDocumentWithPage:( Page*)page frameView:(WebFrameView *)frameView style:(NSString *)style348 + (void)_createMainFrameWithSimpleHTMLDocumentWithPage:(WebCore::Page*)page frameView:(WebFrameView *)frameView style:(NSString *)style 350 349 { 351 350 WebView *webView = kit(page); … … 367 366 // if the script debugger is attached before a document is created. These calls use the debuggerWorld(), we will need to pass a world 368 367 // to be able to debug isolated worlds. 369 if (!windowProxy.existingJSWindowProxy( debuggerWorld()))370 return; 371 372 auto* globalObject = windowProxy.globalObject( debuggerWorld());368 if (!windowProxy.existingJSWindowProxy(WebCore::debuggerWorld())) 369 return; 370 371 auto* globalObject = windowProxy.globalObject(WebCore::debuggerWorld()); 373 372 if (!globalObject) 374 373 return; … … 431 430 #endif 432 431 433 Frame* coreFrame = _private->coreFrame;434 for ( Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {432 auto* coreFrame = _private->coreFrame; 433 for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) { 435 434 // Don't call setDrawsBackground:YES here because it may be NO because of a load 436 435 // in progress; WebFrameLoaderClient keeps it set to NO during the load process. … … 442 441 #endif 443 442 444 if ( FrameView* view = frame->view()) {443 if (auto* view = frame->view()) { 445 444 view->setTransparent(!drawsBackground); 446 445 #if !PLATFORM(IOS_FAMILY) 447 446 ALLOW_DEPRECATED_DECLARATIONS_BEGIN 448 Color color =colorFromNSColor([backgroundColor colorUsingColorSpaceName:NSDeviceRGBColorSpace]);447 WebCore::Color color = WebCore::colorFromNSColor([backgroundColor colorUsingColorSpaceName:NSDeviceRGBColorSpace]); 449 448 ALLOW_DEPRECATED_DECLARATIONS_END 450 449 #else 451 Color color =Color(backgroundColor);450 WebCore::Color color = WebCore::Color(backgroundColor); 452 451 #endif 453 452 view->setBaseBackgroundColor(color); … … 469 468 - (void)_unmarkAllBadGrammar 470 469 { 471 Frame* coreFrame = _private->coreFrame;472 for ( Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {473 if ( Document* document = frame->document())474 document->markers().removeMarkers( DocumentMarker::Grammar);470 auto* coreFrame = _private->coreFrame; 471 for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) { 472 if (auto* document = frame->document()) 473 document->markers().removeMarkers(WebCore::DocumentMarker::Grammar); 475 474 } 476 475 } … … 479 478 { 480 479 #if !PLATFORM(IOS_FAMILY) 481 Frame* coreFrame = _private->coreFrame;482 for ( Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {483 if ( Document* document = frame->document())484 document->markers().removeMarkers( DocumentMarker::Spelling);480 auto* coreFrame = _private->coreFrame; 481 for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) { 482 if (auto* document = frame->document()) 483 document->markers().removeMarkers(WebCore::DocumentMarker::Spelling); 485 484 } 486 485 #endif … … 493 492 // optimization for common case to avoid creating potentially large selection string 494 493 if ([documentView isKindOfClass:[WebHTMLView class]]) 495 if ( Frame* coreFrame = _private->coreFrame)494 if (auto* coreFrame = _private->coreFrame) 496 495 return coreFrame->selection().isRange(); 497 496 … … 514 513 // FIXME: 4186050 is one known case that makes this debug check fail. 515 514 BOOL found = NO; 516 Frame* coreFrame = _private->coreFrame;517 for ( Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame))515 auto* coreFrame = _private->coreFrame; 516 for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) { 518 517 if ([kit(frame) _hasSelection]) { 519 518 if (found) … … 521 520 found = YES; 522 521 } 522 } 523 523 return YES; 524 524 } … … 527 527 - (WebFrame *)_findFrameWithSelection 528 528 { 529 Frame* coreFrame = _private->coreFrame;530 for ( Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {529 auto* coreFrame = _private->coreFrame; 530 for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) { 531 531 WebFrame *webFrame = kit(frame); 532 532 if ([webFrame _hasSelection]) … … 549 549 } 550 550 551 static inline WebDataSource *dataSource(DocumentLoader* loader)552 {553 return loader ? static_cast<WebDocumentLoaderMac*>(loader)->dataSource() : nil;554 }555 556 551 - (WebDataSource *)_dataSource 557 552 { … … 573 568 #endif 574 569 575 - (NSArray *)_nodesFromList:(Vector< Node*> *)nodesVector570 - (NSArray *)_nodesFromList:(Vector<WebCore::Node*> *)nodesVector 576 571 { 577 572 size_t size = nodesVector->size(); … … 589 584 - (NSString *)_stringForRange:(DOMRange *)range 590 585 { 591 return plainText(core(range), TextIteratorDefaultBehavior, true);592 } 593 594 - (OptionSet< PaintBehavior>)_paintBehaviorForDestinationContext:(CGContextRef)context586 return plainText(core(range), WebCore::TextIteratorDefaultBehavior, true); 587 } 588 589 - (OptionSet<WebCore::PaintBehavior>)_paintBehaviorForDestinationContext:(CGContextRef)context 595 590 { 596 591 #if PLATFORM(MAC) … … 598 593 BOOL isPrinting = ![NSGraphicsContext currentContextDrawingToScreen]; 599 594 if (isPrinting) 600 return OptionSet< PaintBehavior>(PaintBehavior::FlattenCompositingLayers) |PaintBehavior::Snapshotting;595 return OptionSet<WebCore::PaintBehavior>(WebCore::PaintBehavior::FlattenCompositingLayers) | WebCore::PaintBehavior::Snapshotting; 601 596 #endif 602 597 603 598 if (CGContextGetType(context) != kCGContextTypeBitmap) 604 return PaintBehavior::Normal;599 return WebCore::PaintBehavior::Normal; 605 600 606 601 // If we're drawing into a bitmap, we could be snapshotting or drawing into a layer-backed view. 607 602 if (WebHTMLView *documentView = [self _webHTMLDocumentView]) { 608 603 #if PLATFORM(IOS_FAMILY) 609 return [[documentView window] isInSnapshottingPaint] ? PaintBehavior::Snapshotting :PaintBehavior::Normal;604 return [[documentView window] isInSnapshottingPaint] ? WebCore::PaintBehavior::Snapshotting : WebCore::PaintBehavior::Normal; 610 605 #endif 611 606 #if PLATFORM(MAC) 612 607 if ([documentView _web_isDrawingIntoLayer]) 613 return PaintBehavior::Normal;614 #endif 615 } 616 617 return OptionSet< PaintBehavior>(PaintBehavior::FlattenCompositingLayers) |PaintBehavior::Snapshotting;608 return WebCore::PaintBehavior::Normal; 609 #endif 610 } 611 612 return OptionSet<WebCore::PaintBehavior>(WebCore::PaintBehavior::FlattenCompositingLayers) | WebCore::PaintBehavior::Snapshotting; 618 613 } 619 614 … … 629 624 CGContextRef ctx = WKGetCurrentGraphicsContext(); 630 625 #endif 631 GraphicsContext context(ctx);626 WebCore::GraphicsContext context(ctx); 632 627 633 628 #if PLATFORM(IOS_FAMILY) … … 640 635 #endif 641 636 642 FrameView* view = _private->coreFrame->view();643 644 OptionSet< PaintBehavior> oldBehavior = view->paintBehavior();645 OptionSet< PaintBehavior> paintBehavior = oldBehavior;646 647 if ( Frame* parentFrame = _private->coreFrame->tree().parent()) {637 auto* view = _private->coreFrame->view(); 638 639 OptionSet<WebCore::PaintBehavior> oldBehavior = view->paintBehavior(); 640 OptionSet<WebCore::PaintBehavior> paintBehavior = oldBehavior; 641 642 if (auto* parentFrame = _private->coreFrame->tree().parent()) { 648 643 // For subframes, we need to inherit the paint behavior from our parent 649 if ( FrameView* parentView = parentFrame ? parentFrame->view() : nullptr) {650 if (parentView->paintBehavior().contains( PaintBehavior::FlattenCompositingLayers))651 paintBehavior.add( PaintBehavior::FlattenCompositingLayers);644 if (auto* parentView = parentFrame ? parentFrame->view() : nullptr) { 645 if (parentView->paintBehavior().contains(WebCore::PaintBehavior::FlattenCompositingLayers)) 646 paintBehavior.add(WebCore::PaintBehavior::FlattenCompositingLayers); 652 647 653 if (parentView->paintBehavior().contains( PaintBehavior::Snapshotting))654 paintBehavior.add( PaintBehavior::Snapshotting);648 if (parentView->paintBehavior().contains(WebCore::PaintBehavior::Snapshotting)) 649 paintBehavior.add(WebCore::PaintBehavior::Snapshotting); 655 650 656 if (parentView->paintBehavior().contains( PaintBehavior::TileFirstPaint))657 paintBehavior.add( PaintBehavior::TileFirstPaint);651 if (parentView->paintBehavior().contains(WebCore::PaintBehavior::TileFirstPaint)) 652 paintBehavior.add(WebCore::PaintBehavior::TileFirstPaint); 658 653 } 659 654 } else … … 663 658 664 659 if (contentsOnly) 665 view->paintContents(context, enclosingIntRect(rect));660 view->paintContents(context, WebCore::enclosingIntRect(rect)); 666 661 else 667 view->paint(context, enclosingIntRect(rect));662 view->paint(context, WebCore::enclosingIntRect(rect)); 668 663 669 664 view->setPaintBehavior(oldBehavior); … … 673 668 { 674 669 ASSERT_ARG(rect, rect); 675 if ( RenderWidget* ownerRenderer = _private->coreFrame->ownerRenderer()) {670 if (auto* ownerRenderer = _private->coreFrame->ownerRenderer()) { 676 671 if (ownerRenderer->needsLayout()) 677 672 return NO; … … 700 695 #if PLATFORM(IOS_FAMILY) 701 696 ASSERT(WebThreadIsLockedOrDisabled()); 702 JSC::ExecState* exec = _private->coreFrame->script().globalObject( mainThreadNormalWorld())->globalExec();697 JSC::ExecState* exec = _private->coreFrame->script().globalObject(WebCore::mainThreadNormalWorld())->globalExec(); 703 698 JSC::JSLockHolder jscLock(exec); 704 699 #endif … … 716 711 717 712 #if !PLATFORM(IOS_FAMILY) 718 JSC::ExecState* exec = _private->coreFrame->script().globalObject( mainThreadNormalWorld())->globalExec();713 JSC::ExecState* exec = _private->coreFrame->script().globalObject(WebCore::mainThreadNormalWorld())->globalExec(); 719 714 JSC::JSLockHolder lock(exec); 720 715 #endif … … 722 717 } 723 718 724 - (NSRect)_caretRectAtPosition:(const Position&)pos affinity:(NSSelectionAffinity)affinity725 { 726 VisiblePosition visiblePosition(pos, static_cast<EAffinity>(affinity));719 - (NSRect)_caretRectAtPosition:(const WebCore::Position&)pos affinity:(NSSelectionAffinity)affinity 720 { 721 WebCore::VisiblePosition visiblePosition(pos, static_cast<WebCore::EAffinity>(affinity)); 727 722 return visiblePosition.absoluteCaretBounds(); 728 723 } … … 737 732 bool insideFixed = false; // FIXME: get via firstRectForRange(). 738 733 NSRect rangeRect = [self _firstRectForDOMRange:range]; 739 Node *startNode = core([range startContainer]);734 auto* startNode = core([range startContainer]); 740 735 741 736 if (startNode && startNode->renderer()) { 742 737 #if !PLATFORM(IOS_FAMILY) 743 startNode->renderer()->scrollRectToVisible( enclosingIntRect(rangeRect), insideFixed, { SelectionRevealMode::Reveal, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded,ShouldAllowCrossOriginScrolling::Yes });738 startNode->renderer()->scrollRectToVisible(WebCore::enclosingIntRect(rangeRect), insideFixed, { WebCore::SelectionRevealMode::Reveal, WebCore::ScrollAlignment::alignToEdgeIfNeeded, WebCore::ScrollAlignment::alignToEdgeIfNeeded, WebCore::ShouldAllowCrossOriginScrolling::Yes }); 744 739 #else 745 RenderLayer* layer = startNode->renderer()->enclosingLayer();740 auto* layer = startNode->renderer()->enclosingLayer(); 746 741 if (layer) { 747 742 layer->setAdjustForIOSCaretWhenScrolling(true); 748 startNode->renderer()->scrollRectToVisible( enclosingIntRect(rangeRect), insideFixed, { SelectionRevealMode::Reveal, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded,ShouldAllowCrossOriginScrolling::Yes });743 startNode->renderer()->scrollRectToVisible(WebCore::enclosingIntRect(rangeRect), insideFixed, { WebCore::SelectionRevealMode::Reveal, WebCore::ScrollAlignment::alignToEdgeIfNeeded, WebCore::ScrollAlignment::alignToEdgeIfNeeded, WebCore::ShouldAllowCrossOriginScrolling::Yes }); 749 744 layer->setAdjustForIOSCaretWhenScrolling(false); 750 745 _private->coreFrame->selection().setCaretRectNeedsUpdate(); … … 760 755 bool insideFixed = false; // FIXME: get via firstRectForRange(). 761 756 NSRect rangeRect = NSInsetRect([self _firstRectForDOMRange:range], inset, inset); 762 Node *startNode = core([range startContainer]);757 auto* startNode = core([range startContainer]); 763 758 764 759 if (startNode && startNode->renderer()) { 765 RenderLayer* layer = startNode->renderer()->enclosingLayer();760 auto* layer = startNode->renderer()->enclosingLayer(); 766 761 if (layer) { 767 762 layer->setAdjustForIOSCaretWhenScrolling(true); 768 startNode->renderer()->scrollRectToVisible( enclosingIntRect(rangeRect), insideFixed, { SelectionRevealMode::Reveal, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded,ShouldAllowCrossOriginScrolling::Yes});763 startNode->renderer()->scrollRectToVisible(WebCore::enclosingIntRect(rangeRect), insideFixed, { WebCore::SelectionRevealMode::Reveal, WebCore::ScrollAlignment::alignToEdgeIfNeeded, WebCore::ScrollAlignment::alignToEdgeIfNeeded, WebCore::ShouldAllowCrossOriginScrolling::Yes}); 769 764 layer->setAdjustForIOSCaretWhenScrolling(false); 770 765 771 Frame *coreFrame = core(self);766 auto* coreFrame = core(self); 772 767 if (coreFrame) { 773 FrameSelection& frameSelection = coreFrame->selection();768 auto& frameSelection = coreFrame->selection(); 774 769 frameSelection.setCaretRectNeedsUpdate(); 775 770 frameSelection.updateAppearance(); … … 786 781 787 782 #if !PLATFORM(IOS_FAMILY) 788 - (DOMRange *)_rangeByAlteringCurrentSelection:( FrameSelection::EAlteration)alteration direction:(SelectionDirection)direction granularity:(TextGranularity)granularity783 - (DOMRange *)_rangeByAlteringCurrentSelection:(WebCore::FrameSelection::EAlteration)alteration direction:(WebCore::SelectionDirection)direction granularity:(WebCore::TextGranularity)granularity 789 784 { 790 785 if (_private->coreFrame->selection().isNone()) 791 786 return nil; 792 787 793 FrameSelection selection;788 WebCore::FrameSelection selection; 794 789 selection.setSelection(_private->coreFrame->selection().selection()); 795 790 selection.modify(alteration, direction, granularity); … … 798 793 #endif 799 794 800 - ( TextGranularity)_selectionGranularity795 - (WebCore::TextGranularity)_selectionGranularity 801 796 { 802 797 return _private->coreFrame->selection().granularity(); 803 798 } 804 799 805 - (NSRange)_convertToNSRange:( Range *)range800 - (NSRange)_convertToNSRange:(WebCore::Range *)range 806 801 { 807 802 if (!range) … … 810 805 size_t location; 811 806 size_t length; 812 if (! TextIterator::getLocationAndLengthFromRange(_private->coreFrame->selection().rootEditableElementOrDocumentElement(), range, location, length))807 if (!WebCore::TextIterator::getLocationAndLengthFromRange(_private->coreFrame->selection().rootEditableElementOrDocumentElement(), range, location, length)) 813 808 return NSMakeRange(NSNotFound, 0); 814 809 … … 816 811 } 817 812 818 - (RefPtr< Range>)_convertToDOMRange:(NSRange)nsrange813 - (RefPtr<WebCore::Range>)_convertToDOMRange:(NSRange)nsrange 819 814 { 820 815 return [self _convertToDOMRange:nsrange rangeIsRelativeTo:WebRangeIsRelativeTo::EditableRoot]; 821 816 } 822 817 823 - (RefPtr< Range>)_convertToDOMRange:(NSRange)nsrange rangeIsRelativeTo:(WebRangeIsRelativeTo)rangeIsRelativeTo818 - (RefPtr<WebCore::Range>)_convertToDOMRange:(NSRange)nsrange rangeIsRelativeTo:(WebRangeIsRelativeTo)rangeIsRelativeTo 824 819 { 825 820 if (nsrange.location > INT_MAX) … … 835 830 // to use the root editable element of the selection start as the positional base. 836 831 // That fits with AppKit's idea of an input context. 837 Element* element = _private->coreFrame->selection().rootEditableElementOrDocumentElement();832 auto* element = _private->coreFrame->selection().rootEditableElementOrDocumentElement(); 838 833 if (!element) 839 834 return nil; 840 return TextIterator::rangeFromLocationAndLength(element, nsrange.location, nsrange.length);835 return WebCore::TextIterator::rangeFromLocationAndLength(element, nsrange.location, nsrange.length); 841 836 } 842 837 843 838 ASSERT(rangeIsRelativeTo == WebRangeIsRelativeTo::Paragraph); 844 839 845 const VisibleSelection& selection = _private->coreFrame->selection().selection();846 RefPtr< Range> selectedRange = selection.toNormalizedRange();840 const auto& selection = _private->coreFrame->selection().selection(); 841 RefPtr<WebCore::Range> selectedRange = selection.toNormalizedRange(); 847 842 if (!selectedRange) 848 843 return nullptr; 849 844 850 RefPtr< Range> paragraphRange = makeRange(startOfParagraph(selection.visibleStart()), selection.visibleEnd());845 RefPtr<WebCore::Range> paragraphRange = makeRange(startOfParagraph(selection.visibleStart()), selection.visibleEnd()); 851 846 if (!paragraphRange) 852 847 return nullptr; 853 848 854 ContainerNode& rootNode = paragraphRange.get()->startContainer().treeScope().rootNode();855 int paragraphStartIndex = TextIterator::rangeLength(Range::create(rootNode.document(), &rootNode, 0, ¶graphRange->startContainer(), paragraphRange->startOffset()).ptr());856 return TextIterator::rangeFromLocationAndLength(&rootNode, paragraphStartIndex + static_cast<int>(nsrange.location), nsrange.length);849 auto& rootNode = paragraphRange.get()->startContainer().treeScope().rootNode(); 850 int paragraphStartIndex = WebCore::TextIterator::rangeLength(WebCore::Range::create(rootNode.document(), &rootNode, 0, ¶graphRange->startContainer(), paragraphRange->startOffset()).ptr()); 851 return WebCore::TextIterator::rangeFromLocationAndLength(&rootNode, paragraphStartIndex + static_cast<int>(nsrange.location), nsrange.length); 857 852 } 858 853 … … 874 869 - (DOMDocumentFragment *)_documentFragmentWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString 875 870 { 876 Frame* frame = _private->coreFrame;871 auto* frame = _private->coreFrame; 877 872 if (!frame) 878 873 return nil; 879 874 880 Document* document = frame->document();875 auto* document = frame->document(); 881 876 if (!document) 882 877 return nil; 883 878 884 return kit(createFragmentFromMarkup(*document, markupString, baseURLString, DisallowScriptingContent).ptr());879 return kit(createFragmentFromMarkup(*document, markupString, baseURLString, WebCore::DisallowScriptingContent).ptr()); 885 880 } 886 881 887 882 - (DOMDocumentFragment *)_documentFragmentWithNodesAsParagraphs:(NSArray *)nodes 888 883 { 889 Frame* frame = _private->coreFrame;884 auto* frame = _private->coreFrame; 890 885 if (!frame) 891 886 return nil; 892 887 893 Document* document = frame->document();888 auto* document = frame->document(); 894 889 if (!document) 895 890 return nil; 896 891 897 892 NSEnumerator *nodeEnum = [nodes objectEnumerator]; 898 Vector< Node*> nodesVector;893 Vector<WebCore::Node*> nodesVector; 899 894 DOMNode *node; 900 895 while ((node = [nodeEnum nextObject])) … … 927 922 } 928 923 929 - ( VisiblePosition)_visiblePositionForPoint:(NSPoint)point924 - (WebCore::VisiblePosition)_visiblePositionForPoint:(NSPoint)point 930 925 { 931 926 // FIXME: Someone with access to Apple's sources could remove this needless wrapper call. 932 return _private->coreFrame->visiblePositionForPoint( IntPoint(point));927 return _private->coreFrame->visiblePositionForPoint(WebCore::IntPoint(point)); 933 928 } 934 929 935 930 - (DOMRange *)_characterRangeAtPoint:(NSPoint)point 936 931 { 937 return kit(_private->coreFrame->rangeForPoint( IntPoint(point)).get());932 return kit(_private->coreFrame->rangeForPoint(WebCore::IntPoint(point)).get()); 938 933 } 939 934 … … 942 937 if (!_private->coreFrame) 943 938 return nil; 944 RefPtr< MutableStyleProperties> typingStyle = _private->coreFrame->selection().copyTypingStyle();939 RefPtr<WebCore::MutableStyleProperties> typingStyle = _private->coreFrame->selection().copyTypingStyle(); 945 940 if (!typingStyle) 946 941 return nil; … … 948 943 } 949 944 950 - (void)_setTypingStyle:(DOMCSSStyleDeclaration *)style withUndoAction:( EditAction)undoAction945 - (void)_setTypingStyle:(DOMCSSStyleDeclaration *)style withUndoAction:(WebCore::EditAction)undoAction 951 946 { 952 947 if (!_private->coreFrame || !style) 953 948 return; 954 949 // FIXME: We shouldn't have to create a copy here. 955 Ref< MutableStyleProperties> properties(core(style)->copyProperties());950 Ref<WebCore::MutableStyleProperties> properties(core(style)->copyProperties()); 956 951 _private->coreFrame->editor().computeAndSetTypingStyle(properties.get(), undoAction); 957 952 } … … 962 957 if (!_private->coreFrame) 963 958 return; 964 FrameView* view = _private->coreFrame->view();959 auto* view = _private->coreFrame->view(); 965 960 if (!view) 966 961 return; 967 962 // FIXME: These are fake modifier keys here, but they should be real ones instead. 968 PlatformMouseEvent event(IntPoint(windowLoc), IntPoint(globalPoint(windowLoc, [view->platformWidget() window])),969 LeftButton,PlatformEvent::MouseMoved, 0, false, false, false, false, WallTime::now(), WebCore::ForceAtClick, WebCore::NoTap);970 _private->coreFrame->eventHandler().dragSourceEndedAt(event, ( DragOperation)operation);963 WebCore::PlatformMouseEvent event(WebCore::IntPoint(windowLoc), WebCore::IntPoint(WebCore::globalPoint(windowLoc, [view->platformWidget() window])), 964 WebCore::LeftButton, WebCore::PlatformEvent::MouseMoved, 0, false, false, false, false, WallTime::now(), WebCore::ForceAtClick, WebCore::NoTap); 965 _private->coreFrame->eventHandler().dragSourceEndedAt(event, (WebCore::DragOperation)operation); 971 966 } 972 967 #endif // ENABLE(DRAG_SUPPORT) && PLATFORM(MAC) … … 974 969 - (BOOL)_canProvideDocumentSource 975 970 { 976 Frame* frame = _private->coreFrame;971 auto* frame = _private->coreFrame; 977 972 String mimeType = frame->document()->loader()->writer().mimeType(); 978 PluginData* pluginData = frame->page() ? &frame->page()->pluginData() : 0;973 auto* pluginData = frame->page() ? &frame->page()->pluginData() : 0; 979 974 980 975 if (WebCore::MIMETypeRegistry::isTextMIMEType(mimeType) 981 || Image::supportsType(mimeType)982 || (pluginData && pluginData->supportsWebVisibleMimeType(mimeType, PluginData::AllPlugins) && frame->loader().subframeLoader().allowPlugins())983 || (pluginData && pluginData->supportsWebVisibleMimeType(mimeType, PluginData::OnlyApplicationPlugins)))976 || WebCore::Image::supportsType(mimeType) 977 || (pluginData && pluginData->supportsWebVisibleMimeType(mimeType, WebCore::PluginData::AllPlugins) && frame->loader().subframeLoader().allowPlugins()) 978 || (pluginData && pluginData->supportsWebVisibleMimeType(mimeType, WebCore::PluginData::OnlyApplicationPlugins))) 984 979 return NO; 985 980 … … 997 992 { 998 993 // FIXME: This really should be a setting. 999 Document* document = _private->coreFrame->document();994 auto* document = _private->coreFrame->document(); 1000 995 document->setShouldCreateRenderers(_private->shouldCreateRenderers); 1001 996 … … 1010 1005 - (BOOL)_isDescendantOfFrame:(WebFrame *)ancestor 1011 1006 { 1012 Frame* coreFrame = _private->coreFrame;1007 auto* coreFrame = _private->coreFrame; 1013 1008 return coreFrame && coreFrame->tree().isDescendantOf(core(ancestor)); 1014 1009 } … … 1025 1020 #endif 1026 1021 { 1027 Document* document = _private->coreFrame->document();1022 auto* document = _private->coreFrame->document(); 1028 1023 if (!document) 1029 1024 return nil; … … 1031 1026 if (!body) 1032 1027 return nil; 1033 RenderObject* bodyRenderer = body->renderer();1028 auto* bodyRenderer = body->renderer(); 1034 1029 if (!bodyRenderer) 1035 1030 return nil; 1036 Color color = bodyRenderer->style().visitedDependentColorWithColorFilter(CSSPropertyBackgroundColor);1031 WebCore::Color color = bodyRenderer->style().visitedDependentColorWithColorFilter(WebCore::CSSPropertyBackgroundColor); 1037 1032 if (!color.isValid()) 1038 1033 return nil; … … 1046 1041 - (BOOL)_isFrameSet 1047 1042 { 1048 Document* document = _private->coreFrame->document();1043 auto* document = _private->coreFrame->document(); 1049 1044 return document && document->isFrameSet(); 1050 1045 } … … 1057 1052 - (BOOL)_isVisuallyNonEmpty 1058 1053 { 1059 if ( FrameView* view = _private->coreFrame->view())1054 if (auto* view = _private->coreFrame->view()) 1060 1055 return view->isVisuallyNonEmpty(); 1061 1056 return NO; 1062 1057 } 1063 1058 1064 static WebFrameLoadType toWebFrameLoadType(FrameLoadType frameLoadType) 1065 { 1059 static WebFrameLoadType toWebFrameLoadType(WebCore::FrameLoadType frameLoadType) 1060 { 1061 using namespace WebCore; 1066 1062 switch (frameLoadType) { 1067 1063 case FrameLoadType::Standard: … … 1115 1111 - (NSArray *)_rectsForRange:(DOMRange *)domRange 1116 1112 { 1117 Range *range = core(domRange); 1118 1119 1120 Vector<IntRect> intRects; 1113 auto* range = core(domRange); 1114 1115 Vector<WebCore::IntRect> intRects; 1121 1116 range->absoluteTextRects(intRects, NO); 1122 1117 unsigned size = intRects.size(); … … 1132 1127 - (DOMRange *)_selectionRangeForFirstPoint:(CGPoint)first secondPoint:(CGPoint)second 1133 1128 { 1134 VisiblePosition firstPos = [self _visiblePositionForPoint:first];1135 VisiblePosition secondPos = [self _visiblePositionForPoint:second];1136 VisibleSelection selection(firstPos, secondPos);1129 WebCore::VisiblePosition firstPos = [self _visiblePositionForPoint:first]; 1130 WebCore::VisiblePosition secondPos = [self _visiblePositionForPoint:second]; 1131 WebCore::VisibleSelection selection(firstPos, secondPos); 1137 1132 DOMRange *range = kit(selection.toNormalizedRange().get()); 1138 1133 return range; … … 1141 1136 - (DOMRange *)_selectionRangeForPoint:(CGPoint)point 1142 1137 { 1143 VisiblePosition pos = [self _visiblePositionForPoint:point];1144 VisibleSelection selection(pos);1138 WebCore::VisiblePosition pos = [self _visiblePositionForPoint:point]; 1139 WebCore::VisibleSelection selection(pos); 1145 1140 DOMRange *range = kit(selection.toNormalizedRange().get()); 1146 1141 return range; … … 1156 1151 - (void)_selectNSRange:(NSRange)range 1157 1152 { 1158 RefPtr< Range> domRange = [self _convertToDOMRange:range];1153 RefPtr<WebCore::Range> domRange = [self _convertToDOMRange:range]; 1159 1154 if (domRange) 1160 _private->coreFrame->selection().setSelection( VisibleSelection(*domRange,SEL_DEFAULT_AFFINITY));1155 _private->coreFrame->selection().setSelection(WebCore::VisibleSelection(*domRange, WebCore::SEL_DEFAULT_AFFINITY)); 1161 1156 } 1162 1157 1163 1158 - (BOOL)_isDisplayingStandaloneImage 1164 1159 { 1165 Document* document = _private->coreFrame->document();1160 auto* document = _private->coreFrame->document(); 1166 1161 return document && document->isImageDocument(); 1167 1162 } … … 1175 1170 - (void)_recursive_resumeNullEventsForAllNetscapePlugins 1176 1171 { 1177 Frame* coreFrame = core(self);1178 for ( Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {1172 auto* coreFrame = core(self); 1173 for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) { 1179 1174 NSView <WebDocumentView> *documentView = [[kit(frame) frameView] documentView]; 1180 1175 if ([documentView isKindOfClass:[WebHTMLView class]]) … … 1185 1180 - (void)_recursive_pauseNullEventsForAllNetscapePlugins 1186 1181 { 1187 Frame* coreFrame = core(self);1188 for ( Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {1182 auto* coreFrame = core(self); 1183 for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) { 1189 1184 NSView <WebDocumentView> *documentView = [[kit(frame) frameView] documentView]; 1190 1185 if ([documentView isKindOfClass:[WebHTMLView class]]) … … 1204 1199 { 1205 1200 if ([self _webHTMLDocumentView]) { 1206 if ( Frame* coreFrame = _private->coreFrame)1201 if (auto* coreFrame = _private->coreFrame) 1207 1202 coreFrame->setTimersPaused(flag); 1208 1203 } … … 1224 1219 { 1225 1220 if ([self _webHTMLDocumentView]) { 1226 if ( Frame* coreFrame = _private->coreFrame)1221 if (auto* coreFrame = _private->coreFrame) 1227 1222 coreFrame->dispatchPageHideEventBeforePause(); 1228 1223 } … … 1232 1227 { 1233 1228 if ([self _webHTMLDocumentView]) { 1234 if ( Frame* coreFrame = _private->coreFrame)1229 if (auto* coreFrame = _private->coreFrame) 1235 1230 coreFrame->dispatchPageShowEventBeforeResume(); 1236 1231 } … … 1244 1239 - (void)selectWithoutClosingTypingNSRange:(NSRange)range 1245 1240 { 1246 RefPtr< Range> domRange = [self _convertToDOMRange:range];1241 RefPtr<WebCore::Range> domRange = [self _convertToDOMRange:range]; 1247 1242 if (domRange) { 1248 const VisibleSelection& newSelection = VisibleSelection(*domRange,SEL_DEFAULT_AFFINITY);1243 const auto& newSelection = WebCore::VisibleSelection(*domRange, WebCore::SEL_DEFAULT_AFFINITY); 1249 1244 _private->coreFrame->selection().setSelection(newSelection, { }); 1250 1245 … … 1289 1284 { 1290 1285 ASSERT(!WebThreadIsEnabled() || WebThreadIsLocked()); 1291 FrameLoader& frameLoader = _private->coreFrame->loader();1286 auto& frameLoader = _private->coreFrame->loader(); 1292 1287 auto* item = frameLoader.history().currentItem(); 1293 1288 if (item) … … 1302 1297 [webView _setDeviceOrientation:[[webView _UIKitDelegateForwarder] deviceOrientation]]; 1303 1298 #endif 1304 if ( WebCore::Frame* frame = core(self))1299 if (auto* frame = core(self)) 1305 1300 frame->orientationChanged(); 1306 1301 }); … … 1316 1311 - (CGSize)renderedSizeOfNode:(DOMNode *)node constrainedToWidth:(float)width 1317 1312 { 1318 Node* n = core(node);1319 RenderObject* renderer = n ? n->renderer() : nullptr;1313 WebCore::Node* n = core(node); 1314 auto* renderer = n ? n->renderer() : nullptr; 1320 1315 float w = std::min((float)renderer->maxPreferredLogicalWidth(), width); 1321 return is< RenderBox>(renderer) ? CGSizeMake(w, downcast<RenderBox>(*renderer).height()) : CGSizeMake(0, 0);1316 return is<WebCore::RenderBox>(renderer) ? CGSizeMake(w, downcast<WebCore::RenderBox>(*renderer).height()) : CGSizeMake(0, 0); 1322 1317 } 1323 1318 … … 1325 1320 { 1326 1321 WebCore::Frame *frame = core(self); 1327 return kit(frame->deepestNodeAtLocation( FloatPoint(aViewportLocation)));1322 return kit(frame->deepestNodeAtLocation(WebCore::FloatPoint(aViewportLocation))); 1328 1323 } 1329 1324 … … 1331 1326 { 1332 1327 WebCore::Frame *frame = core(self); 1333 WebCore::Node *node = frame->nodeRespondingToScrollWheelEvents( FloatPoint(aViewportLocation));1328 WebCore::Node *node = frame->nodeRespondingToScrollWheelEvents(WebCore::FloatPoint(aViewportLocation)); 1334 1329 return kit(node); 1335 1330 } … … 1338 1333 { 1339 1334 WebCore::Frame *frame = core(self); 1340 FloatPoint viewportLocation(*aViewportLocation);1341 FloatPoint adjustedLocation;1335 WebCore::FloatPoint viewportLocation(*aViewportLocation); 1336 WebCore::FloatPoint adjustedLocation; 1342 1337 WebCore::Node *node = frame->approximateNodeAtViewportLocationLegacy(viewportLocation, adjustedLocation); 1343 1338 *aViewportLocation = adjustedLocation; … … 1363 1358 { 1364 1359 WebCore::Frame *frame = core(self); 1365 RevealExtentOption revealExtentOption = revealExtent ? RevealExtent :DoNotRevealExtent;1366 frame->selection().revealSelection( SelectionRevealMode::Reveal,ScrollAlignment::alignToEdgeIfNeeded, revealExtentOption);1360 WebCore::RevealExtentOption revealExtentOption = revealExtent ? WebCore::RevealExtent : WebCore::DoNotRevealExtent; 1361 frame->selection().revealSelection(WebCore::SelectionRevealMode::Reveal, WebCore::ScrollAlignment::alignToEdgeIfNeeded, revealExtentOption); 1367 1362 } 1368 1363 … … 1429 1424 - (void)setCaretColor:(CGColorRef)color 1430 1425 { 1431 Color qColor = color ? Color(color) :Color::black;1426 WebCore::Color qColor = color ? WebCore::Color(color) : WebCore::Color::black; 1432 1427 WebCore::Frame *frame = core(self); 1433 1428 frame->selection().setCaretColor(qColor); … … 1450 1445 - (BOOL)isTelephoneNumberParsingAllowed 1451 1446 { 1452 Document *document = core(self)->document();1447 auto* document = core(self)->document(); 1453 1448 return document->isTelephoneNumberParsingAllowed(); 1454 1449 } … … 1456 1451 - (BOOL)isTelephoneNumberParsingEnabled 1457 1452 { 1458 Document *document = core(self)->document();1453 auto* document = core(self)->document(); 1459 1454 return document->isTelephoneNumberParsingEnabled(); 1460 1455 } … … 1474 1469 // This does not happen automatically on iOS because we don't forward 1475 1470 // all the click events to WebKit. 1476 if ( FrameView* frameView = frame->view()) {1471 if (auto* frameView = frame->view()) { 1477 1472 if (NSView *documentView = frameView->documentView()) { 1478 Page* page = frame->page();1473 auto* page = frame->page(); 1479 1474 if (!page) 1480 1475 return; … … 1483 1478 } 1484 1479 1485 frame->selection().setSelectedRange(core(range), ( EAffinity)affinity, closeTyping ? FrameSelection::ShouldCloseTyping::Yes :FrameSelection::ShouldCloseTyping::No);1480 frame->selection().setSelectedRange(core(range), (WebCore::EAffinity)affinity, closeTyping ? WebCore::FrameSelection::ShouldCloseTyping::Yes : WebCore::FrameSelection::ShouldCloseTyping::No); 1486 1481 if (!closeTyping) 1487 1482 frame->editor().ensureLastEditCommandHasCurrentSelectionIfOpenForMoreTyping(); … … 1617 1612 WebCore::Frame *frame = core(self); 1618 1613 1619 Document *doc = frame->document();1614 WebCore::Document* doc = frame->document(); 1620 1615 if (!doc) 1621 1616 return; 1622 1617 1623 Node* node = core(element);1618 auto* node = core(element); 1624 1619 if (!node->isConnected()) 1625 1620 return; … … 1643 1638 return; 1644 1639 1645 Vector< CompositionUnderline> underlines;1640 Vector<WebCore::CompositionUnderline> underlines; 1646 1641 frame->page()->chrome().client().suppressFormNotifications(); 1647 1642 frame->editor().setComposition(text, underlines, newSelRange.location, NSMaxRange(newSelRange)); … … 1655 1650 return; 1656 1651 1657 Vector< CompositionUnderline> underlines;1652 Vector<WebCore::CompositionUnderline> underlines; 1658 1653 frame->editor().setComposition(text, underlines, 0, [text length]); 1659 1654 } … … 1724 1719 NSMutableArray *metadatas = [NSMutableArray array]; 1725 1720 1726 Frame* frame = core(self);1727 Document* document = frame->document();1728 1729 const VisibleSelection& selection = frame->selection().selection();1730 Element* root = selection.selectionType() ==VisibleSelection::NoSelection ? frame->document()->bodyOrFrameset() : selection.rootEditableElement();1721 auto* frame = core(self); 1722 auto* document = frame->document(); 1723 1724 const auto& selection = frame->selection().selection(); 1725 WebCore::Element* root = selection.selectionType() == WebCore::VisibleSelection::NoSelection ? frame->document()->bodyOrFrameset() : selection.rootEditableElement(); 1731 1726 1732 1727 DOMRange *previousDOMRange = nil; 1733 1728 id previousMetadata = nil; 1734 1729 1735 for ( Node* node = root; node; node =NodeTraversal::next(*node)) {1730 for (WebCore::Node* node = root; node; node = WebCore::NodeTraversal::next(*node)) { 1736 1731 auto markers = document->markers().markersFor(*node); 1737 1732 for (auto* marker : markers) { 1738 1733 1739 if (marker->type() != DocumentMarker::DictationResult)1734 if (marker->type() != WebCore::DocumentMarker::DictationResult) 1740 1735 continue; 1741 1736 … … 1747 1742 continue; 1748 1743 1749 auto range = Range::create(*document, node, marker->startOffset(), node, marker->endOffset());1744 auto range = WebCore::Range::create(*document, node, marker->startOffset(), node, marker->endOffset()); 1750 1745 DOMRange *domRange = kit(range.ptr()); 1751 1746 … … 1781 1776 return nil; 1782 1777 1783 auto markers = core(self)->document()->markers().markersInRange(*core(range), DocumentMarker::DictationResult);1778 auto markers = core(self)->document()->markers().markersInRange(*core(range), WebCore::DocumentMarker::DictationResult); 1784 1779 1785 1780 // UIKit should only ever give us a DOMRange for a phrase with alternatives, which should not be part of more than one result. … … 1805 1800 WebCore::TextEncoding encoding(textEncodingName); 1806 1801 if (!encoding.isValid()) 1807 encoding = W indowsLatin1Encoding();1802 encoding = WebCore::WindowsLatin1Encoding(); 1808 1803 return encoding.decode(reinterpret_cast<const char*>([data bytes]), [data length]); 1809 1804 } … … 1839 1834 CTFontRef font = nil; 1840 1835 if (_private->coreFrame) { 1841 const Font 1842 * fd = _private->coreFrame->editor().fontForSelection(multipleFonts); 1836 const WebCore::Font* fd = _private->coreFrame->editor().fontForSelection(multipleFonts); 1843 1837 if (fd) 1844 1838 font = fd->getCTFont(); … … 1859 1853 { 1860 1854 ASSERT(WebThreadIsLockedOrDisabled()); 1861 if ( FrameView* view = _private->coreFrame->view())1855 if (auto* view = _private->coreFrame->view()) 1862 1856 view->setWasScrolledByUser(true); 1863 1857 } … … 1886 1880 - (void)_replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle 1887 1881 { 1888 RefPtr< Range> range = _private->coreFrame->selection().toNormalizedRange();1882 RefPtr<WebCore::Range> range = _private->coreFrame->selection().toNormalizedRange(); 1889 1883 1890 1884 DOMDocumentFragment* fragment = range ? kit(createFragmentFromText(*range, text).ptr()) : nil; … … 1912 1906 return; 1913 1907 1914 Frame* coreFrame = core(self);1915 for ( Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {1916 Document *doc = frame->document();1908 auto* coreFrame = core(self); 1909 for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) { 1910 WebCore::Document* doc = frame->document(); 1917 1911 if (!doc || !doc->renderView()) 1918 1912 continue; … … 1928 1922 - (void)_setTextAutosizingWidth:(CGFloat)width 1929 1923 { 1930 WebCore::Frame* frame = core(self);1931 Page* page = frame->page();1924 auto* frame = core(self); 1925 auto* page = frame->page(); 1932 1926 if (!page) 1933 1927 return; … … 1953 1947 if (_private->coreFrame->selection().isNone() || !fragment) 1954 1948 return; 1955 _private->coreFrame->editor().replaceSelectionWithFragment(*core(fragment), selectReplacement ? Editor::SelectReplacement::Yes : Editor::SelectReplacement::No, smartReplace ? Editor::SmartReplace::Yes : Editor::SmartReplace::No, matchStyle ? Editor::MatchStyle::Yes :Editor::MatchStyle::No);1949 _private->coreFrame->editor().replaceSelectionWithFragment(*core(fragment), selectReplacement ? WebCore::Editor::SelectReplacement::Yes : WebCore::Editor::SelectReplacement::No, smartReplace ? WebCore::Editor::SmartReplace::Yes : WebCore::Editor::SmartReplace::No, matchStyle ? WebCore::Editor::MatchStyle::Yes : WebCore::Editor::MatchStyle::No); 1956 1950 } 1957 1951 … … 1970 1964 - (void)_replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace 1971 1965 { 1972 RefPtr< Range> range = _private->coreFrame->selection().toNormalizedRange();1966 RefPtr<WebCore::Range> range = _private->coreFrame->selection().toNormalizedRange(); 1973 1967 1974 1968 DOMDocumentFragment* fragment = range ? kit(createFragmentFromText(*range, text).ptr()) : nil; … … 1996 1990 1997 1991 // inspect destination 1998 Node *startContainer = core([rangeToReplace startContainer]);1999 Node *endContainer = core([rangeToReplace endContainer]);2000 2001 Position startPos(startContainer, [rangeToReplace startOffset],Position::PositionIsOffsetInAnchor);2002 Position endPos(endContainer, [rangeToReplace endOffset],Position::PositionIsOffsetInAnchor);2003 2004 VisiblePosition startVisiblePos = VisiblePosition(startPos,VP_DEFAULT_AFFINITY);2005 VisiblePosition endVisiblePos = VisiblePosition(endPos,VP_DEFAULT_AFFINITY);1992 WebCore::Node *startContainer = core([rangeToReplace startContainer]); 1993 WebCore::Node *endContainer = core([rangeToReplace endContainer]); 1994 1995 WebCore::Position startPos(startContainer, [rangeToReplace startOffset], WebCore::Position::PositionIsOffsetInAnchor); 1996 WebCore::Position endPos(endContainer, [rangeToReplace endOffset], WebCore::Position::PositionIsOffsetInAnchor); 1997 1998 WebCore::VisiblePosition startVisiblePos = WebCore::VisiblePosition(startPos, WebCore::VP_DEFAULT_AFFINITY); 1999 WebCore::VisiblePosition endVisiblePos = WebCore::VisiblePosition(endPos, WebCore::VP_DEFAULT_AFFINITY); 2006 2000 2007 2001 // this check also ensures startContainer, startPos, endContainer, and endPos are non-null … … 2009 2003 return; 2010 2004 2011 bool addLeadingSpace = startPos.leadingWhitespacePosition( VP_DEFAULT_AFFINITY, true).isNull() && !isStartOfParagraph(startVisiblePos);2005 bool addLeadingSpace = startPos.leadingWhitespacePosition(WebCore::VP_DEFAULT_AFFINITY, true).isNull() && !isStartOfParagraph(startVisiblePos); 2012 2006 if (addLeadingSpace) 2013 2007 if (UChar previousChar = startVisiblePos.previous().characterAfter()) 2014 addLeadingSpace = ! isCharacterSmartReplaceExempt(previousChar, true);2015 2016 bool addTrailingSpace = endPos.trailingWhitespacePosition( VP_DEFAULT_AFFINITY, true).isNull() && !isEndOfParagraph(endVisiblePos);2008 addLeadingSpace = !WebCore::isCharacterSmartReplaceExempt(previousChar, true); 2009 2010 bool addTrailingSpace = endPos.trailingWhitespacePosition(WebCore::VP_DEFAULT_AFFINITY, true).isNull() && !isEndOfParagraph(endVisiblePos); 2017 2011 if (addTrailingSpace) 2018 2012 if (UChar thisChar = endVisiblePos.characterAfter()) 2019 addTrailingSpace = ! isCharacterSmartReplaceExempt(thisChar, false);2013 addTrailingSpace = !WebCore::isCharacterSmartReplaceExempt(thisChar, false); 2020 2014 2021 2015 // inspect source … … 2046 2040 NSMutableDictionary *result = [NSMutableDictionary dictionary]; 2047 2041 2048 FrameLoader& frameLoader = _private->coreFrame->loader();2049 DocumentLoader* documentLoader = frameLoader.documentLoader();2042 auto& frameLoader = _private->coreFrame->loader(); 2043 auto* documentLoader = frameLoader.documentLoader(); 2050 2044 if (documentLoader && !documentLoader->mainDocumentError().isNull()) 2051 2045 [result setObject:(NSError *)documentLoader->mainDocumentError() forKey:WebFrameMainDocumentError]; … … 2054 2048 [result setObject:@YES forKey:WebFrameHasPlugins]; 2055 2049 2056 if ( DOMWindow* domWindow = _private->coreFrame->document()->domWindow()) {2057 if (domWindow->hasEventListeners( eventNames().unloadEvent))2050 if (WebCore::DOMWindow* domWindow = _private->coreFrame->document()->domWindow()) { 2051 if (domWindow->hasEventListeners(WebCore::eventNames().unloadEvent)) 2058 2052 [result setObject:@YES forKey:WebFrameHasUnloadListener]; 2059 2053 if (domWindow->optionalApplicationCache()) … … 2061 2055 } 2062 2056 2063 if ( Document* document = _private->coreFrame->document()) {2064 if ( DatabaseManager::singleton().hasOpenDatabases(*document))2057 if (auto* document = _private->coreFrame->document()) { 2058 if (WebCore::DatabaseManager::singleton().hasOpenDatabases(*document)) 2065 2059 [result setObject:@YES forKey:WebFrameUsesDatabases]; 2066 2060 if (!document->canSuspendActiveDOMObjectsForDocumentSuspension()) … … 2087 2081 2088 2082 // Start off with some guess at a frame and a global object, we'll try to do better...! 2089 JSDOMWindow* anyWorldGlobalObject = _private->coreFrame->script().globalObject(mainThreadNormalWorld());2083 auto* anyWorldGlobalObject = _private->coreFrame->script().globalObject(WebCore::mainThreadNormalWorld()); 2090 2084 2091 2085 // The global object is probably a proxy object? - if so, we know how to use this! … … 2093 2087 JSC::VM& vm = globalObjectObj->vm(); 2094 2088 if (!strcmp(globalObjectObj->classInfo(vm)->className, "JSWindowProxy")) 2095 anyWorldGlobalObject = JSC::jsDynamicCast< JSDOMWindow*>(vm, static_cast<JSWindowProxy*>(globalObjectObj)->window());2089 anyWorldGlobalObject = JSC::jsDynamicCast<WebCore::JSDOMWindow*>(vm, static_cast<WebCore::JSWindowProxy*>(globalObjectObj)->window()); 2096 2090 2097 2091 if (!anyWorldGlobalObject) … … 2099 2093 2100 2094 // Get the frame frome the global object we've settled on. 2101 Frame* frame = anyWorldGlobalObject->wrapped().frame();2095 auto* frame = anyWorldGlobalObject->wrapped().frame(); 2102 2096 ASSERT(frame->document()); 2103 2097 RetainPtr<WebFrame> webFrame(kit(frame)); // Running arbitrary JavaScript can destroy the frame. … … 2121 2115 - (JSGlobalContextRef)_globalContextForScriptWorld:(WebScriptWorld *)world 2122 2116 { 2123 Frame* coreFrame = _private->coreFrame;2117 auto* coreFrame = _private->coreFrame; 2124 2118 if (!coreFrame) 2125 2119 return 0; 2126 DOMWrapperWorld* coreWorld = core(world);2120 auto* coreWorld = core(world); 2127 2121 if (!coreWorld) 2128 2122 return 0; … … 2162 2156 { 2163 2157 #if ENABLE(ACCESSIBILITY) 2164 if (! AXObjectCache::accessibilityEnabled())2158 if (!WebCore::AXObjectCache::accessibilityEnabled()) 2165 2159 return; 2166 2160 … … 2168 2162 return; 2169 2163 2170 AccessibilityObject* rootObject = _private->coreFrame->document()->axObjectCache()->rootObject();2164 auto* rootObject = _private->coreFrame->document()->axObjectCache()->rootObject(); 2171 2165 if (rootObject) { 2172 2166 String strName(name); … … 2179 2173 { 2180 2174 #if ENABLE(ACCESSIBILITY) 2181 return AXObjectCache::accessibilityEnhancedUserInterfaceEnabled();2175 return WebCore::AXObjectCache::accessibilityEnhancedUserInterfaceEnabled(); 2182 2176 #else 2183 2177 return NO; … … 2188 2182 { 2189 2183 #if ENABLE(ACCESSIBILITY) 2190 AXObjectCache::setEnhancedUserInterfaceAccessibility(enable);2184 WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility(enable); 2191 2185 #endif 2192 2186 } … … 2194 2188 - (NSString*)_layerTreeAsText 2195 2189 { 2196 Frame* coreFrame = _private->coreFrame;2190 auto* coreFrame = _private->coreFrame; 2197 2191 if (!coreFrame) 2198 2192 return @""; … … 2204 2198 { 2205 2199 #if ENABLE(ACCESSIBILITY) 2206 if (! AXObjectCache::accessibilityEnabled()) {2207 AXObjectCache::enableAccessibility();2200 if (!WebCore::AXObjectCache::accessibilityEnabled()) { 2201 WebCore::AXObjectCache::enableAccessibility(); 2208 2202 #if !PLATFORM(IOS_FAMILY) 2209 2203 ALLOW_DEPRECATED_DECLARATIONS_BEGIN 2210 AXObjectCache::setEnhancedUserInterfaceAccessibility([[NSApp accessibilityAttributeValue:NSAccessibilityEnhancedUserInterfaceAttribute] boolValue]);2204 WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility([[NSApp accessibilityAttributeValue:NSAccessibilityEnhancedUserInterfaceAttribute] boolValue]); 2211 2205 ALLOW_DEPRECATED_DECLARATIONS_END 2212 2206 #endif … … 2216 2210 return nil; 2217 2211 2218 Document* document = _private->coreFrame->document();2212 auto* document = _private->coreFrame->document(); 2219 2213 if (!document || !document->axObjectCache()) 2220 2214 return nil; 2221 2215 2222 AccessibilityObject* rootObject = document->axObjectCache()->rootObjectForFrame(_private->coreFrame);2216 auto* rootObject = document->axObjectCache()->rootObjectForFrame(_private->coreFrame); 2223 2217 if (!rootObject) 2224 2218 return nil; … … 2237 2231 - (void)_clearOpener 2238 2232 { 2239 Frame* coreFrame = _private->coreFrame;2233 auto* coreFrame = _private->coreFrame; 2240 2234 if (coreFrame) 2241 2235 coreFrame->loader().setOpener(0); … … 2266 2260 return [NSArray array]; 2267 2261 2268 RenderView* root = _private->coreFrame->document()->renderView();2262 auto* root = _private->coreFrame->document()->renderView(); 2269 2263 if (!root) 2270 2264 return [NSArray array]; 2271 2265 2272 const LayoutRect& documentRect = root->documentRect();2266 const auto& documentRect = root->documentRect(); 2273 2267 float printWidth = root->style().isHorizontalWritingMode() ? static_cast<float>(documentRect.width()) / printScaleFactor : pageSize.width; 2274 2268 float printHeight = root->style().isHorizontalWritingMode() ? pageSize.height : static_cast<float>(documentRect.height()) / printScaleFactor; 2275 2269 2276 PrintContext printContext(_private->coreFrame);2277 printContext.computePageRectsWithPageSize( FloatSize(printWidth, printHeight), true);2278 const Vector< IntRect>& pageRects = printContext.pageRects();2270 WebCore::PrintContext printContext(_private->coreFrame); 2271 printContext.computePageRectsWithPageSize(WebCore::FloatSize(printWidth, printHeight), true); 2272 const Vector<WebCore::IntRect>& pageRects = printContext.pageRects(); 2279 2273 2280 2274 size_t size = pageRects.size(); … … 2311 2305 - (BOOL)focusedNodeHasContent 2312 2306 { 2313 Frame* coreFrame = _private->coreFrame;2307 auto* coreFrame = _private->coreFrame; 2314 2308 2315 Element* root;2316 const VisibleSelection& selection = coreFrame->selection().selection();2309 WebCore::Element* root; 2310 const auto& selection = coreFrame->selection().selection(); 2317 2311 if (selection.isNone() || !selection.isContentEditable()) 2318 2312 root = coreFrame->document()->bodyOrFrameset(); … … 2326 2320 return NO; 2327 2321 2328 VisiblePosition first(createLegacyEditingPosition(root, 0));2329 VisiblePosition last(createLegacyEditingPosition(root, root->countChildNodes()));2322 WebCore::VisiblePosition first(createLegacyEditingPosition(root, 0)); 2323 WebCore::VisiblePosition last(createLegacyEditingPosition(root, root->countChildNodes())); 2330 2324 return first != last; 2331 2325 } … … 2333 2327 - (void)_dispatchDidReceiveTitle:(NSString *)title 2334 2328 { 2335 Frame* coreFrame = _private->coreFrame;2329 auto* coreFrame = _private->coreFrame; 2336 2330 if (!coreFrame) 2337 2331 return; 2338 coreFrame->loader().client().dispatchDidReceiveTitle({ title, TextDirection::LTR });2332 coreFrame->loader().client().dispatchDidReceiveTitle({ title, WebCore::TextDirection::LTR }); 2339 2333 } 2340 2334 … … 2343 2337 - (JSValueRef)jsWrapperForNode:(DOMNode *)node inScriptWorld:(WebScriptWorld *)world 2344 2338 { 2345 Frame* coreFrame = _private->coreFrame;2339 auto* coreFrame = _private->coreFrame; 2346 2340 if (!coreFrame) 2347 2341 return 0; … … 2350 2344 return 0; 2351 2345 2352 JSDOMWindow* globalObject = coreFrame->script().globalObject(*core(world));2346 WebCore::JSDOMWindow* globalObject = coreFrame->script().globalObject(*core(world)); 2353 2347 JSC::ExecState* exec = globalObject->globalExec(); 2354 2348 … … 2359 2353 - (NSDictionary *)elementAtPoint:(NSPoint)point 2360 2354 { 2361 Frame* coreFrame = _private->coreFrame;2355 auto* coreFrame = _private->coreFrame; 2362 2356 if (!coreFrame) 2363 2357 return nil; 2364 return [[[WebElementDictionary alloc] initWithHitTestResult:coreFrame->eventHandler().hitTestResultAtPoint( IntPoint(point), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::IgnoreClipping | HitTestRequest::DisallowUserAgentShadowContent |HitTestRequest::AllowChildFrameContent)] autorelease];2358 return [[[WebElementDictionary alloc] initWithHitTestResult:coreFrame->eventHandler().hitTestResultAtPoint(WebCore::IntPoint(point), WebCore::HitTestRequest::ReadOnly | WebCore::HitTestRequest::Active | WebCore::HitTestRequest::IgnoreClipping | WebCore::HitTestRequest::DisallowUserAgentShadowContent | WebCore::HitTestRequest::AllowChildFrameContent)] autorelease]; 2365 2359 } 2366 2360 … … 2397 2391 - (NSString *)name 2398 2392 { 2399 Frame* coreFrame = _private->coreFrame;2393 auto* coreFrame = _private->coreFrame; 2400 2394 if (!coreFrame) 2401 2395 return nil; … … 2418 2412 return false; 2419 2413 #else 2420 static bool needsWorkaround = MacApplication::isMicrosoftMessenger() && [[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey] compare:@"7.1" options:NSNumericSearch] == NSOrderedAscending;2414 static bool needsWorkaround = WebCore::MacApplication::isMicrosoftMessenger() && [[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey] compare:@"7.1" options:NSNumericSearch] == NSOrderedAscending; 2421 2415 return needsWorkaround; 2422 2416 #endif … … 2428 2422 return nil; 2429 2423 2430 Frame* coreFrame = _private->coreFrame;2424 auto* coreFrame = _private->coreFrame; 2431 2425 if (!coreFrame) 2432 2426 return nil; … … 2438 2432 return nil; 2439 2433 2440 Document* document = coreFrame->document();2434 auto* document = coreFrame->document(); 2441 2435 2442 2436 // According to the documentation, we should return nil if the frame doesn't have a document. … … 2451 2445 - (DOMHTMLElement *)frameElement 2452 2446 { 2453 Frame* coreFrame = _private->coreFrame;2447 auto* coreFrame = _private->coreFrame; 2454 2448 if (!coreFrame) 2455 2449 return nil; … … 2459 2453 - (WebDataSource *)provisionalDataSource 2460 2454 { 2461 Frame* coreFrame = _private->coreFrame;2455 auto* coreFrame = _private->coreFrame; 2462 2456 return coreFrame ? dataSource(coreFrame->loader().provisionalDocumentLoader()) : nil; 2463 2457 } … … 2465 2459 - (WebDataSource *)dataSource 2466 2460 { 2467 Frame* coreFrame = _private->coreFrame;2461 auto* coreFrame = _private->coreFrame; 2468 2462 return coreFrame && coreFrame->loader().frameHasLoaded() ? [self _dataSource] : nil; 2469 2463 } … … 2471 2465 - (void)loadRequest:(NSURLRequest *)request 2472 2466 { 2473 Frame* coreFrame = _private->coreFrame;2467 auto* coreFrame = _private->coreFrame; 2474 2468 if (!coreFrame) 2475 2469 return; 2476 2470 2477 ResourceRequest resourceRequest(request);2471 WebCore::ResourceRequest resourceRequest(request); 2478 2472 2479 2473 // Some users of WebKit API incorrectly use "file path as URL" style requests which are invalid. … … 2485 2479 resourceRequest.setURL([NSURL URLWithString:[@"file:" stringByAppendingString:[[request URL] absoluteString]]]); 2486 2480 2487 coreFrame->loader().load( FrameLoadRequest(*coreFrame, resourceRequest,ShouldOpenExternalURLsPolicy::ShouldNotAllow));2481 coreFrame->loader().load(WebCore::FrameLoadRequest(*coreFrame, resourceRequest, WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow)); 2488 2482 } 2489 2483 … … 2514 2508 2515 2509 #if USE(QUICK_LOOK) 2516 if ( shouldUseQuickLookForMIMEType(MIMEType)) {2510 if (WebCore::shouldUseQuickLookForMIMEType(MIMEType)) { 2517 2511 NSURL *quickLookURL = responseURL ? responseURL : baseURL; 2518 if (auto request = registerQLPreviewConverterIfNeeded(quickLookURL, MIMEType, data)) {2519 _private->coreFrame->loader().load( FrameLoadRequest(*_private->coreFrame, request.get(),ShouldOpenExternalURLsPolicy::ShouldNotAllow));2512 if (auto request = WebCore::registerQLPreviewConverterIfNeeded(quickLookURL, MIMEType, data)) { 2513 _private->coreFrame->loader().load(WebCore::FrameLoadRequest(*_private->coreFrame, request.get(), WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow)); 2520 2514 return; 2521 2515 } … … 2523 2517 #endif 2524 2518 2525 ResourceRequest request(baseURL);2526 2527 ResourceResponse response(responseURL, MIMEType, [data length], encodingName);2528 SubstituteData substituteData(WebCore::SharedBuffer::create(data), [unreachableURL absoluteURL], response,SubstituteData::SessionHistoryVisibility::Hidden);2529 2530 _private->coreFrame->loader().load( FrameLoadRequest(*_private->coreFrame, request,ShouldOpenExternalURLsPolicy::ShouldNotAllow, substituteData));2519 WebCore::ResourceRequest request(baseURL); 2520 2521 WebCore::ResourceResponse response(responseURL, MIMEType, [data length], encodingName); 2522 WebCore::SubstituteData substituteData(WebCore::SharedBuffer::create(data), [unreachableURL absoluteURL], response, WebCore::SubstituteData::SessionHistoryVisibility::Hidden); 2523 2524 _private->coreFrame->loader().load(WebCore::FrameLoadRequest(*_private->coreFrame, request, WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow, substituteData)); 2531 2525 } 2532 2526 … … 2585 2579 - (WebFrame *)findFrameNamed:(NSString *)name 2586 2580 { 2587 Frame* coreFrame = _private->coreFrame;2581 auto* coreFrame = _private->coreFrame; 2588 2582 if (!coreFrame) 2589 2583 return nil; … … 2593 2587 - (WebFrame *)parentFrame 2594 2588 { 2595 Frame* coreFrame = _private->coreFrame;2589 auto* coreFrame = _private->coreFrame; 2596 2590 if (!coreFrame) 2597 2591 return nil; … … 2601 2595 - (NSArray *)childFrames 2602 2596 { 2603 Frame* coreFrame = _private->coreFrame;2597 auto* coreFrame = _private->coreFrame; 2604 2598 if (!coreFrame) 2605 2599 return [NSArray array]; 2606 2600 NSMutableArray *children = [NSMutableArray arrayWithCapacity:coreFrame->tree().childCount()]; 2607 for ( Frame* child = coreFrame->tree().firstChild(); child; child = child->tree().nextSibling())2601 for (WebCore::Frame* child = coreFrame->tree().firstChild(); child; child = child->tree().nextSibling()) 2608 2602 [children addObject:kit(child)]; 2609 2603 return children; … … 2612 2606 - (WebScriptObject *)windowObject 2613 2607 { 2614 Frame* coreFrame = _private->coreFrame;2608 auto* coreFrame = _private->coreFrame; 2615 2609 if (!coreFrame) 2616 2610 return 0; … … 2620 2614 - (JSGlobalContextRef)globalContext 2621 2615 { 2622 Frame* coreFrame = _private->coreFrame;2616 auto* coreFrame = _private->coreFrame; 2623 2617 if (!coreFrame) 2624 2618 return 0; 2625 return toGlobalRef(coreFrame->script().globalObject( mainThreadNormalWorld())->globalExec());2619 return toGlobalRef(coreFrame->script().globalObject(WebCore::mainThreadNormalWorld())->globalExec()); 2626 2620 } 2627 2621 … … 2629 2623 - (JSContext *)javaScriptContext 2630 2624 { 2631 Frame* coreFrame = _private->coreFrame;2625 auto* coreFrame = _private->coreFrame; 2632 2626 if (!coreFrame) 2633 2627 return 0; -
trunk/Source/WebKitLegacy/mac/WebView/WebFrameView.mm
r239088 r250549 83 83 #endif 84 84 85 using namespace WebCore;86 87 85 #if !PLATFORM(IOS_FAMILY) 88 86 @interface NSWindow (WindowPrivate) … … 136 134 } 137 135 138 - ( Frame*)_web_frame136 - (WebCore::Frame*)_web_frame 139 137 { 140 138 return core(_private->webFrame); … … 182 180 ASSERT(_private->webFrame); 183 181 184 Frame* frame = core(_private->webFrame);182 auto* frame = core(_private->webFrame); 185 183 186 184 ASSERT(frame); … … 246 244 { 247 245 float height = [[self _contentView] bounds].size.height; 248 return std::max<float>(height * Scrollbar::minFractionToStepWhenPaging(), height - Scrollbar::maxOverlapBetweenPages()); 249 } 250 251 static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCClass, NSArray *supportTypes) 252 { 253 NSEnumerator *enumerator = [supportTypes objectEnumerator]; 254 ASSERT(enumerator != nil); 255 NSString *mime = nil; 256 while ((mime = [enumerator nextObject]) != nil) { 257 // Don't clobber previously-registered classes. 258 if ([allTypes objectForKey:mime] == nil) 259 [allTypes setObject:objCClass forKey:mime]; 260 } 246 return std::max<float>(height * WebCore::Scrollbar::minFractionToStepWhenPaging(), height - WebCore::Scrollbar::maxOverlapBetweenPages()); 261 247 } 262 248 … … 319 305 ASSERT(_private->frameScrollView); 320 306 321 Frame* frame = core(_private->webFrame);307 auto* frame = core(_private->webFrame); 322 308 323 309 ASSERT(frame); … … 328 314 ASSERT(frame->isMainFrame() || frame->ownerElement()); 329 315 330 FrameView* view = frame->view();316 auto* view = frame->view(); 331 317 332 318 view->setPlatformWidget(_private->frameScrollView); 333 319 334 320 // FIXME: Frame tries to do this too. Is this code needed? 335 if ( RenderWidget* owner = frame->ownerRenderer()) {321 if (WebCore::RenderWidget* owner = frame->ownerRenderer()) { 336 322 owner->setWidget(view); 337 323 // Now the RenderWidget owns the view, so we don't any more. … … 346 332 if ([[[self webFrame] webView] drawsBackground]) 347 333 [[self _scrollView] setDrawsBackground:YES]; 348 if ( Frame* coreFrame = [self _web_frame]) {349 if ( FrameView* coreFrameView = coreFrame->view())350 coreFrameView->availableContentSizeChanged( ScrollableArea::AvailableSizeChangeReason::AreaSizeChanged);334 if (auto* coreFrame = [self _web_frame]) { 335 if (auto* coreFrameView = coreFrame->view()) 336 coreFrameView->availableContentSizeChanged(WebCore::ScrollableArea::AvailableSizeChangeReason::AreaSizeChanged); 351 337 } 352 338 } … … 372 358 #if !PLATFORM(IOS_FAMILY) 373 359 if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_MAIN_THREAD_EXCEPTIONS)) 374 setDefaultThreadViolationBehavior( LogOnFirstThreadViolation,ThreadViolationRoundOne);360 setDefaultThreadViolationBehavior(WebCore::LogOnFirstThreadViolation, WebCore::ThreadViolationRoundOne); 375 361 376 362 bool throwExceptionsForRoundTwo = WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_ROUND_TWO_MAIN_THREAD_EXCEPTIONS); 377 363 if (!throwExceptionsForRoundTwo) 378 setDefaultThreadViolationBehavior( LogOnFirstThreadViolation,ThreadViolationRoundTwo);364 setDefaultThreadViolationBehavior(WebCore::LogOnFirstThreadViolation, WebCore::ThreadViolationRoundTwo); 379 365 380 366 bool throwExceptionsForRoundThree = WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_ROUND_THREE_MAIN_THREAD_EXCEPTIONS); 381 367 if (!throwExceptionsForRoundThree) 382 setDefaultThreadViolationBehavior( LogOnFirstThreadViolation,ThreadViolationRoundThree);368 setDefaultThreadViolationBehavior(WebCore::LogOnFirstThreadViolation, WebCore::ThreadViolationRoundThree); 383 369 #endif 384 370 } … … 397 383 [scrollView setHasHorizontalScroller:NO]; 398 384 [scrollView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; 399 [scrollView setLineScroll: Scrollbar::pixelsPerLineStep()];385 [scrollView setLineScroll:WebCore::Scrollbar::pixelsPerLineStep()]; 400 386 [self addSubview:scrollView]; 401 387 … … 518 504 #else 519 505 CGContextRef cgContext = WKGetCurrentGraphicsContext(); 520 CGContextSetFillColorWithColor(cgContext, cachedCGColor(Color::white));506 CGContextSetFillColorWithColor(cgContext, WebCore::cachedCGColor(WebCore::Color::white)); 521 507 WKRectFill(cgContext, rect); 522 508 #endif … … 530 516 #else 531 517 CGContextRef cgContext = WKGetCurrentGraphicsContext(); 532 CGContextSetFillColorWithColor(cgContext, cachedCGColor(Color::cyan));518 CGContextSetFillColorWithColor(cgContext, WebCore::cachedCGColor(WebCore::Color::cyan)); 533 519 WKRectFill(cgContext, rect); 534 520 #endif … … 614 600 } 615 601 616 - (BOOL)_scrollOverflowInDirection:( ScrollDirection)direction granularity:(ScrollGranularity)granularity602 - (BOOL)_scrollOverflowInDirection:(WebCore::ScrollDirection)direction granularity:(WebCore::ScrollGranularity)granularity 617 603 { 618 604 // scrolling overflows is only applicable if we're dealing with an WebHTMLView 619 605 if (![[self documentView] isKindOfClass:[WebHTMLView class]]) 620 606 return NO; 621 Frame* frame = core([self webFrame]);607 auto* frame = core([self webFrame]); 622 608 if (!frame) 623 609 return NO; … … 628 614 - (BOOL)_isVerticalDocument 629 615 { 630 Frame* coreFrame = [self _web_frame];616 auto* coreFrame = [self _web_frame]; 631 617 if (!coreFrame) 632 618 return YES; 633 Document* document = coreFrame->document();619 auto* document = coreFrame->document(); 634 620 if (!document) 635 621 return YES; 636 RenderView* renderView = document->renderView();622 auto* renderView = document->renderView(); 637 623 if (!renderView) 638 624 return YES; … … 642 628 - (BOOL)_isFlippedDocument 643 629 { 644 Frame* coreFrame = [self _web_frame];630 auto* coreFrame = [self _web_frame]; 645 631 if (!coreFrame) 646 632 return NO; 647 Document* document = coreFrame->document();633 auto* document = coreFrame->document(); 648 634 if (!document) 649 635 return NO; 650 RenderView* renderView = document->renderView();636 auto* renderView = document->renderView(); 651 637 if (!renderView) 652 638 return NO; … … 656 642 - (BOOL)_scrollToBeginningOfDocument 657 643 { 658 if ([self _scrollOverflowInDirection: ScrollUp granularity:ScrollByDocument])644 if ([self _scrollOverflowInDirection:WebCore::ScrollUp granularity:WebCore::ScrollByDocument]) 659 645 return YES; 660 646 if (![self _isScrollable]) … … 668 654 - (BOOL)_scrollToEndOfDocument 669 655 { 670 if ([self _scrollOverflowInDirection: ScrollDown granularity:ScrollByDocument])656 if ([self _scrollOverflowInDirection:WebCore::ScrollDown granularity:WebCore::ScrollByDocument]) 671 657 return YES; 672 658 if (![self _isScrollable]) … … 760 746 { 761 747 float width = [[self _contentView] bounds].size.width; 762 return std::max<float>(width * Scrollbar::minFractionToStepWhenPaging(), width -Scrollbar::maxOverlapBetweenPages());748 return std::max<float>(width * WebCore::Scrollbar::minFractionToStepWhenPaging(), width - WebCore::Scrollbar::maxOverlapBetweenPages()); 763 749 } 764 750 765 751 - (BOOL)_pageVertically:(BOOL)up 766 752 { 767 if ([self _scrollOverflowInDirection:up ? ScrollUp : ScrollDown granularity:ScrollByPage])753 if ([self _scrollOverflowInDirection:up ? WebCore::ScrollUp : WebCore::ScrollDown granularity:WebCore::ScrollByPage]) 768 754 return YES; 769 755 … … 777 763 - (BOOL)_pageHorizontally:(BOOL)left 778 764 { 779 if ([self _scrollOverflowInDirection:left ? ScrollLeft : ScrollRight granularity:ScrollByPage])765 if ([self _scrollOverflowInDirection:left ? WebCore::ScrollLeft : WebCore::ScrollRight granularity:WebCore::ScrollByPage]) 780 766 return YES; 781 767 … … 799 785 - (BOOL)_scrollLineVertically:(BOOL)up 800 786 { 801 if ([self _scrollOverflowInDirection:up ? ScrollUp : ScrollDown granularity:ScrollByLine])787 if ([self _scrollOverflowInDirection:up ? WebCore::ScrollUp : WebCore::ScrollDown granularity:WebCore::ScrollByLine]) 802 788 return YES; 803 789 … … 811 797 - (BOOL)_scrollLineHorizontally:(BOOL)left 812 798 { 813 if ([self _scrollOverflowInDirection:left ? ScrollLeft : ScrollRight granularity:ScrollByLine])799 if ([self _scrollOverflowInDirection:left ? WebCore::ScrollLeft : WebCore::ScrollRight granularity:WebCore::ScrollByLine]) 814 800 return YES; 815 801 … … 910 896 int index, count; 911 897 BOOL callSuper = YES; 912 Frame* coreFrame = [self _web_frame];898 auto* coreFrame = [self _web_frame]; 913 899 BOOL maintainsBackForwardList = coreFrame && static_cast<BackForwardList&>(coreFrame->page()->backForward().client()).enabled() ? YES : NO; 914 900 -
trunk/Source/WebKitLegacy/mac/WebView/WebFullScreenController.mm
r244440 r250549 48 48 #import <wtf/SoftLinking.h> 49 49 50 using namespace WebCore;51 52 50 static const CFTimeInterval defaultAnimationDuration = 0.5; 53 51 54 static IntRect screenRectOfContents(Element* element)52 static WebCore::IntRect screenRectOfContents(WebCore::Element* element) 55 53 { 56 54 ASSERT(element); 57 55 if (element->renderer() && element->renderer()->hasLayer() && element->renderer()->enclosingLayer()->isComposited()) { 58 FloatQuad contentsBox = static_cast<FloatRect>(element->renderer()->enclosingLayer()->backing()->contentsBox());56 WebCore::FloatQuad contentsBox = static_cast<WebCore::FloatRect>(element->renderer()->enclosingLayer()->backing()->contentsBox()); 59 57 contentsBox = element->renderer()->localToAbsoluteQuad(contentsBox); 60 58 return element->renderer()->view().frameView().contentsToScreen(contentsBox.enclosingBoundingBox()); … … 66 64 - (void)_updateMenuAndDockForFullScreen; 67 65 - (void)_swapView:(NSView*)view with:(NSView*)otherView; 68 - ( Document*)_document;69 - ( FullscreenManager*)_manager;66 - (WebCore::Document*)_document; 67 - (WebCore::FullscreenManager*)_manager; 70 68 - (void)_startEnterFullScreenAnimationWithDuration:(NSTimeInterval)duration; 71 69 - (void)_startExitFullScreenAnimationWithDuration:(NSTimeInterval)duration; … … 135 133 } 136 134 137 - ( Element*)element135 - (WebCore::Element*)element 138 136 { 139 137 return _element.get(); 140 138 } 141 139 142 - (void)setElement:(RefPtr< Element>&&)element140 - (void)setElement:(RefPtr<WebCore::Element>&&)element 143 141 { 144 142 _element = WTFMove(element); … … 453 451 #pragma mark Utility Functions 454 452 455 - ( Document*)_document453 - (WebCore::Document*)_document 456 454 { 457 455 return &_element->document(); 458 456 } 459 457 460 - ( FullscreenManager*)_manager458 - (WebCore::FullscreenManager*)_manager 461 459 { 462 460 return &_element->document().fullscreenManager(); -
trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
r250142 r250549 171 171 #endif 172 172 173 using namespace WebCore;174 using namespace HTMLNames;175 using namespace WTF;176 177 173 #if PLATFORM(IOS_FAMILY) 178 174 … … 249 245 @end 250 246 251 static Optional<ContextMenuAction> toAction(NSInteger tag) 252 { 247 static Optional<WebCore::ContextMenuAction> toAction(NSInteger tag) 248 { 249 using namespace WebCore; 253 250 if (tag >= ContextMenuItemBaseCustomTag && tag <= ContextMenuItemLastCustomTag) { 254 251 // Just pass these through. … … 427 424 } 428 425 429 static Optional<NSInteger> toTag(ContextMenuAction action) 430 { 426 static Optional<NSInteger> toTag(WebCore::ContextMenuAction action) 427 { 428 using namespace WebCore; 431 429 switch (action) { 432 430 case ContextMenuItemTagNoAction: … … 769 767 } 770 768 771 Frame* coreFrame = core([enclosingWebFrameView webFrame]);772 FrameView* frameView = coreFrame ? coreFrame->view() : 0;769 auto* coreFrame = core([enclosingWebFrameView webFrame]); 770 auto* frameView = coreFrame ? coreFrame->view() : 0; 773 771 if (!frameView || !frameView->isEnclosedInCompositingLayer()) { 774 772 [self _web_setNeedsDisplayInRect:invalidRect]; … … 777 775 778 776 NSRect invalidRectInWebFrameViewCoordinates = [enclosingWebFrameView convertRect:invalidRect fromView:self]; 779 IntRect invalidRectInFrameViewCoordinates(invalidRectInWebFrameViewCoordinates);777 WebCore::IntRect invalidRectInFrameViewCoordinates(invalidRectInWebFrameViewCoordinates); 780 778 if (![enclosingWebFrameView isFlipped]) 781 779 invalidRectInFrameViewCoordinates.setY(frameView->frameRect().size().height() - invalidRectInFrameViewCoordinates.maxY()); … … 788 786 #endif // PLATFORM(MAC) 789 787 790 const float _WebHTMLViewPrintingMinimumShrinkFactor = PrintContext::minimumShrinkFactor();791 const float _WebHTMLViewPrintingMaximumShrinkFactor = PrintContext::maximumShrinkFactor();788 const float _WebHTMLViewPrintingMinimumShrinkFactor = WebCore::PrintContext::minimumShrinkFactor(); 789 const float _WebHTMLViewPrintingMaximumShrinkFactor = WebCore::PrintContext::maximumShrinkFactor(); 792 790 793 791 // Any non-zero value will do, but using something recognizable might help us debug some day. … … 812 810 813 811 // We need this to be able to safely reference the CachedImage for the promised drag data 814 static CachedImageClient& promisedDataClient()815 { 816 static NeverDestroyed< CachedImageClient> staticCachedResourceClient;812 static WebCore::CachedImageClient& promisedDataClient() 813 { 814 static NeverDestroyed<WebCore::CachedImageClient> staticCachedResourceClient; 817 815 return staticCachedResourceClient.get(); 818 816 } … … 917 915 918 916 struct WebHTMLViewInterpretKeyEventsParameters { 919 KeyboardEvent* event;917 WebCore::KeyboardEvent* event; 920 918 bool eventInterpretationHadSideEffects; 921 919 bool shouldSaveCommands; … … 1156 1154 1157 1155 #if ENABLE(ATTACHMENT_ELEMENT) 1158 if (! RuntimeEnabledFeatures::sharedFeatures().attachmentElementEnabled())1156 if (!WebCore::RuntimeEnabledFeatures::sharedFeatures().attachmentElementEnabled()) 1159 1157 [elements addObject:@"object"]; 1160 1158 #endif … … 1165 1163 - (DOMDocumentFragment *)_documentFragmentFromPasteboard:(NSPasteboard *)pasteboard inContext:(DOMRange *)context allowPlainText:(BOOL)allowPlainText 1166 1164 { 1165 using namespace WebCore; 1167 1166 NSArray *types = [pasteboard types]; 1168 1167 DOMDocumentFragment *fragment = nil; … … 1171 1170 return fragment; 1172 1171 1173 if ([types containsObject: legacyFilenamesPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:legacyFilenamesPasteboardType() inContext:context subresources:0]))1172 if ([types containsObject:WebCore::legacyFilenamesPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:WebCore::legacyFilenamesPasteboardType() inContext:context subresources:0])) 1174 1173 return fragment; 1175 1174 1176 if ([types containsObject: legacyHTMLPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:legacyHTMLPasteboardType() inContext:context subresources:0]))1175 if ([types containsObject:WebCore::legacyHTMLPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:WebCore::legacyHTMLPasteboardType() inContext:context subresources:0])) 1177 1176 return fragment; 1178 1177 1179 if ([types containsObject: legacyRTFDPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:legacyRTFDPasteboardType() inContext:context subresources:0]))1178 if ([types containsObject:WebCore::legacyRTFDPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:WebCore::legacyRTFDPasteboardType() inContext:context subresources:0])) 1180 1179 return fragment; 1181 1180 1182 if ([types containsObject: legacyRTFPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:legacyRTFPasteboardType() inContext:context subresources:0]))1181 if ([types containsObject:WebCore::legacyRTFPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:WebCore::legacyRTFPasteboardType() inContext:context subresources:0])) 1183 1182 return fragment; 1184 1183 1185 if ([types containsObject: legacyTIFFPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:legacyTIFFPasteboardType() inContext:context subresources:0]))1184 if ([types containsObject:WebCore::legacyTIFFPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:WebCore::legacyTIFFPasteboardType() inContext:context subresources:0])) 1186 1185 return fragment; 1187 1186 1188 if ([types containsObject: legacyPDFPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:legacyPDFPasteboardType() inContext:context subresources:0]))1187 if ([types containsObject:WebCore::legacyPDFPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:WebCore::legacyPDFPasteboardType() inContext:context subresources:0])) 1189 1188 return fragment; 1190 1189 … … 1192 1191 return fragment; 1193 1192 1194 if ([types containsObject: legacyURLPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:legacyURLPasteboardType() inContext:context subresources:0]))1193 if ([types containsObject:WebCore::legacyURLPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:WebCore::legacyURLPasteboardType() inContext:context subresources:0])) 1195 1194 return fragment; 1196 1195 1197 if (allowPlainText && [types containsObject: legacyStringPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:legacyStringPasteboardType() inContext:context subresources:0]))1196 if (allowPlainText && [types containsObject:WebCore::legacyStringPasteboardType()] && (fragment = [self _documentFragmentFromPasteboard:pasteboard forType:WebCore::legacyStringPasteboardType() inContext:context subresources:0])) 1198 1197 return fragment; 1199 1198 … … 1205 1204 NSArray *types = [pasteboard types]; 1206 1205 1207 if ([types containsObject: legacyStringPasteboardType()])1208 return [[pasteboard stringForType: legacyStringPasteboardType()] precomposedStringWithCanonicalMapping];1206 if ([types containsObject:WebCore::legacyStringPasteboardType()]) 1207 return [[pasteboard stringForType:WebCore::legacyStringPasteboardType()] precomposedStringWithCanonicalMapping]; 1209 1208 1210 1209 RetainPtr<NSAttributedString> attributedString; 1211 if ([types containsObject: legacyRTFDPasteboardType()])1212 attributedString = adoptNS([[NSAttributedString alloc] initWithRTFD:[pasteboard dataForType: legacyRTFDPasteboardType()] documentAttributes:NULL]);1213 if (attributedString == nil && [types containsObject: legacyRTFPasteboardType()])1214 attributedString = adoptNS([[NSAttributedString alloc] initWithRTF:[pasteboard dataForType: legacyRTFPasteboardType()] documentAttributes:NULL]);1210 if ([types containsObject:WebCore::legacyRTFDPasteboardType()]) 1211 attributedString = adoptNS([[NSAttributedString alloc] initWithRTFD:[pasteboard dataForType:WebCore::legacyRTFDPasteboardType()] documentAttributes:NULL]); 1212 if (attributedString == nil && [types containsObject:WebCore::legacyRTFPasteboardType()]) 1213 attributedString = adoptNS([[NSAttributedString alloc] initWithRTF:[pasteboard dataForType:WebCore::legacyRTFPasteboardType()] documentAttributes:NULL]); 1215 1214 if (attributedString) 1216 1215 return [[[attributedString string] copy] autorelease]; 1217 1216 1218 if ([types containsObject: legacyFilenamesPasteboardType()]) {1219 if (NSString *string = [[pasteboard propertyListForType: legacyFilenamesPasteboardType()] componentsJoinedByString:@"\n"])1217 if ([types containsObject:WebCore::legacyFilenamesPasteboardType()]) { 1218 if (NSString *string = [[pasteboard propertyListForType:WebCore::legacyFilenamesPasteboardType()] componentsJoinedByString:@"\n"]) 1220 1219 return string; 1221 1220 } … … 1236 1235 1237 1236 DOMRange *range = [self _selectedRange]; 1238 Frame* coreFrame = core([self _frame]);1237 auto* coreFrame = core([self _frame]); 1239 1238 1240 1239 DOMDocumentFragment *fragment = [self _documentFragmentFromPasteboard:pasteboard inContext:range allowPlainText:allowPlainText]; … … 1268 1267 - (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pasteboard 1269 1268 { 1270 Frame* coreFrame = core([self _frame]);1269 auto* coreFrame = core([self _frame]); 1271 1270 if (!coreFrame) 1272 1271 return NO; … … 1335 1334 - (DOMRange *)_selectedRange 1336 1335 { 1337 Frame* coreFrame = core([self _frame]);1336 auto* coreFrame = core([self _frame]); 1338 1337 return coreFrame ? kit(coreFrame->selection().toNormalizedRange().get()) : nil; 1339 1338 } … … 1345 1344 // Put HTML on the pasteboard. 1346 1345 if ([types containsObject:WebArchivePboardType]) { 1347 if (auto coreArchive = LegacyWebArchive::createFromSelection(core([self _frame]))) {1346 if (auto coreArchive = WebCore::LegacyWebArchive::createFromSelection(core([self _frame]))) { 1348 1347 if (RetainPtr<CFDataRef> data = coreArchive ? coreArchive->rawDataRepresentation() : 0) 1349 1348 [pasteboard setData:(__bridge NSData *)data.get() forType:WebArchivePboardType]; … … 1352 1351 1353 1352 // Put the attributed string on the pasteboard (RTF/RTFD format). 1354 if ([types containsObject: legacyRTFDPasteboardType()]) {1353 if ([types containsObject:WebCore::legacyRTFDPasteboardType()]) { 1355 1354 if (attributedString == nil) { 1356 1355 attributedString = [self selectedAttributedString]; 1357 1356 } 1358 1357 NSData *RTFDData = [attributedString RTFDFromRange:NSMakeRange(0, [attributedString length]) documentAttributes:@{ }]; 1359 [pasteboard setData:RTFDData forType: legacyRTFDPasteboardType()];1358 [pasteboard setData:RTFDData forType:WebCore::legacyRTFDPasteboardType()]; 1360 1359 } 1361 if ([types containsObject: legacyRTFPasteboardType()]) {1360 if ([types containsObject:WebCore::legacyRTFPasteboardType()]) { 1362 1361 if (!attributedString) 1363 1362 attributedString = [self selectedAttributedString]; 1364 1363 if ([attributedString containsAttachments]) 1365 attributedString = attributedStringByStrippingAttachmentCharacters(attributedString);1364 attributedString = WebCore::attributedStringByStrippingAttachmentCharacters(attributedString); 1366 1365 NSData *RTFData = [attributedString RTFFromRange:NSMakeRange(0, [attributedString length]) documentAttributes:@{ }]; 1367 [pasteboard setData:RTFData forType: legacyRTFPasteboardType()];1366 [pasteboard setData:RTFData forType:WebCore::legacyRTFPasteboardType()]; 1368 1367 } 1369 1368 1370 1369 // Put plain string on the pasteboard. 1371 if ([types containsObject: legacyStringPasteboardType()]) {1370 if ([types containsObject:WebCore::legacyStringPasteboardType()]) { 1372 1371 // Map to a plain old space because this is better for source code, other browsers do it, and 1373 1372 // because HTML forces content creators and editors to use this character any time they want two spaces in a row. 1374 [pasteboard setString:[[self selectedString] stringByReplacingOccurrencesOfString:@"\u00A0" withString:@" "] forType: legacyStringPasteboardType()];1373 [pasteboard setString:[[self selectedString] stringByReplacingOccurrencesOfString:@"\u00A0" withString:@" "] forType:WebCore::legacyStringPasteboardType()]; 1375 1374 } 1376 1375 … … 1527 1526 NSPoint origin = [[self superview] bounds].origin; 1528 1527 if (!NSEqualPoints(_private->lastScrollPosition, origin) && ![scrollView inProgrammaticScroll]) { 1529 if ( Frame* coreFrame = core([self _frame])) {1530 if ( FrameView* coreView = coreFrame->view()) {1528 if (auto* coreFrame = core([self _frame])) { 1529 if (auto* coreView = coreFrame->view()) { 1531 1530 _private->inScrollPositionChanged = YES; 1532 coreView->scrollOffsetChangedViaPlatformWidget( IntPoint(_private->lastScrollPosition),IntPoint(origin));1531 coreView->scrollOffsetChangedViaPlatformWidget(WebCore::IntPoint(_private->lastScrollPosition), WebCore::IntPoint(origin)); 1533 1532 _private->inScrollPositionChanged = NO; 1534 1533 } … … 1949 1948 eventNumber:0 clickCount:0 pressure:0]; 1950 1949 1951 if ( Frame* lastHitCoreFrame = core([lastHitView _frame]))1950 if (auto* lastHitCoreFrame = core([lastHitView _frame])) 1952 1951 lastHitCoreFrame->eventHandler().mouseMoved(event, [[self _webView] _pressureEvent]); 1953 1952 } … … 1956 1955 1957 1956 if (view) { 1958 if ( Frame* coreFrame = core([view _frame])) {1957 if (auto* coreFrame = core([view _frame])) { 1959 1958 // We need to do a full, normal hit test during this mouse event if the page is active or if a mouse 1960 1959 // button is currently pressed. It is possible that neither of those things will be true on Lion and … … 1984 1983 static NSArray *types = nil; 1985 1984 if (!types) { 1986 types = [[NSArray alloc] initWithObjects:WebArchivePboardType, legacyHTMLPasteboardType(), legacyFilenamesPasteboardType(), legacyTIFFPasteboardType(),legacyPDFPasteboardType(),1987 legacyURLPasteboardType(), legacyRTFDPasteboardType(), legacyRTFPasteboardType(), legacyStringPasteboardType(),legacyColorPasteboardType(), kUTTypePNG, nil];1985 types = [[NSArray alloc] initWithObjects:WebArchivePboardType, WebCore::legacyHTMLPasteboardType(), WebCore::legacyFilenamesPasteboardType(), WebCore::legacyTIFFPasteboardType(), WebCore::legacyPDFPasteboardType(), 1986 WebCore::legacyURLPasteboardType(), WebCore::legacyRTFDPasteboardType(), WebCore::legacyRTFPasteboardType(), WebCore::legacyStringPasteboardType(), WebCore::legacyColorPasteboardType(), kUTTypePNG, nil]; 1988 1987 CFRetain(types); 1989 1988 } … … 1994 1993 { 1995 1994 // FIXME: We should put data for NSHTMLPboardType on the pasteboard but Microsoft Excel doesn't like our format of HTML (3640423). 1996 return [NSArray arrayWithObjects:WebArchivePboardType, legacyRTFDPasteboardType(), legacyRTFPasteboardType(),legacyStringPasteboardType(), nil];1995 return [NSArray arrayWithObjects:WebArchivePboardType, WebCore::legacyRTFDPasteboardType(), WebCore::legacyRTFPasteboardType(), WebCore::legacyStringPasteboardType(), nil]; 1997 1996 } 1998 1997 … … 2004 2003 - (void)pasteboard:(NSPasteboard *)pasteboard provideDataForType:(NSString *)type 2005 2004 { 2006 if ([type isEqualToString: legacyRTFDPasteboardType()] && [[pasteboard types] containsObject:WebArchivePboardType]) {2005 if ([type isEqualToString:WebCore::legacyRTFDPasteboardType()] && [[pasteboard types] containsObject:WebArchivePboardType]) { 2007 2006 auto archive = adoptNS([[WebArchive alloc] initWithData:[pasteboard dataForType:WebArchivePboardType]]); 2008 [pasteboard _web_writePromisedRTFDFromArchive:archive.get() containsImage:[[pasteboard types] containsObject: legacyTIFFPasteboardType()]];2009 } else if ([type isEqualToString: legacyTIFFPasteboardType()] && _private->promisedDragTIFFDataSource) {2007 [pasteboard _web_writePromisedRTFDFromArchive:archive.get() containsImage:[[pasteboard types] containsObject:WebCore::legacyTIFFPasteboardType()]]; 2008 } else if ([type isEqualToString:WebCore::legacyTIFFPasteboardType()] && _private->promisedDragTIFFDataSource) { 2010 2009 if (auto* image = _private->promisedDragTIFFDataSource->image()) 2011 [pasteboard setData:(__bridge NSData *)image->tiffRepresentation() forType: legacyTIFFPasteboardType()];2010 [pasteboard setData:(__bridge NSData *)image->tiffRepresentation() forType:WebCore::legacyTIFFPasteboardType()]; 2012 2011 [self setPromisedDragTIFFDataSource:nullptr]; 2013 2012 } … … 2034 2033 { 2035 2034 [super setScale:scale]; 2036 Frame* coreFrame = core([self _frame]);2035 auto* coreFrame = core([self _frame]); 2037 2036 if (!coreFrame) 2038 2037 return; 2039 2038 2040 if ( Page* page = coreFrame->page())2041 page->setPageScaleFactor(scale, IntPoint());2039 if (auto* page = coreFrame->page()) 2040 page->setPageScaleFactor(scale, WebCore::IntPoint()); 2042 2041 2043 2042 [[self _webView] _documentScaleChanged]; … … 2115 2114 - (BOOL)_canEdit 2116 2115 { 2117 Frame* coreFrame = core([self _frame]);2116 auto* coreFrame = core([self _frame]); 2118 2117 return coreFrame && coreFrame->editor().canEdit(); 2119 2118 } … … 2121 2120 - (BOOL)_canEditRichly 2122 2121 { 2123 Frame* coreFrame = core([self _frame]);2122 auto* coreFrame = core([self _frame]); 2124 2123 return coreFrame && coreFrame->editor().canEditRichly(); 2125 2124 } … … 2132 2131 - (BOOL)_hasSelection 2133 2132 { 2134 Frame* coreFrame = core([self _frame]);2133 auto* coreFrame = core([self _frame]); 2135 2134 return coreFrame && coreFrame->selection().selection().isRange(); 2136 2135 } … … 2138 2137 - (BOOL)_hasSelectionOrInsertionPoint 2139 2138 { 2140 Frame* coreFrame = core([self _frame]);2139 auto* coreFrame = core([self _frame]); 2141 2140 return coreFrame && coreFrame->selection().selection().isCaretOrRange(); 2142 2141 } … … 2144 2143 - (BOOL)_hasInsertionPoint 2145 2144 { 2146 Frame* coreFrame = core([self _frame]);2145 auto* coreFrame = core([self _frame]); 2147 2146 return coreFrame && coreFrame->selection().selection().isCaret(); 2148 2147 } … … 2150 2149 - (BOOL)_isEditable 2151 2150 { 2152 Frame* coreFrame = core([self _frame]);2151 auto* coreFrame = core([self _frame]); 2153 2152 return coreFrame && coreFrame->selection().selection().isContentEditable(); 2154 2153 } … … 2171 2170 return nil; 2172 2171 2173 Frame* coreFrame = core([self _frame]);2172 auto* coreFrame = core([self _frame]); 2174 2173 if (!coreFrame) 2175 2174 return nil; 2176 2175 2177 Ref< Frame> protectedCoreFrame(*coreFrame);2178 2179 TextIndicatorData textIndicator;2176 Ref<WebCore::Frame> protectedCoreFrame(*coreFrame); 2177 2178 WebCore::TextIndicatorData textIndicator; 2180 2179 auto dragImage = createDragImageForSelection(*coreFrame, textIndicator); 2181 2180 [dragImage _web_dissolveToFraction:WebDragImageAlpha]; … … 2194 2193 - (DOMNode *)_insertOrderedList 2195 2194 { 2196 Frame* coreFrame = core([self _frame]);2195 auto* coreFrame = core([self _frame]); 2197 2196 return coreFrame ? kit(coreFrame->editor().insertOrderedList().get()) : nil; 2198 2197 } … … 2200 2199 - (DOMNode *)_insertUnorderedList 2201 2200 { 2202 Frame* coreFrame = core([self _frame]);2201 auto* coreFrame = core([self _frame]); 2203 2202 return coreFrame ? kit(coreFrame->editor().insertUnorderedList().get()) : nil; 2204 2203 } … … 2206 2205 - (BOOL)_canIncreaseSelectionListLevel 2207 2206 { 2208 Frame* coreFrame = core([self _frame]);2207 auto* coreFrame = core([self _frame]); 2209 2208 return coreFrame && coreFrame->editor().canIncreaseSelectionListLevel(); 2210 2209 } … … 2212 2211 - (BOOL)_canDecreaseSelectionListLevel 2213 2212 { 2214 Frame* coreFrame = core([self _frame]);2213 auto* coreFrame = core([self _frame]); 2215 2214 return coreFrame && coreFrame->editor().canDecreaseSelectionListLevel(); 2216 2215 } … … 2218 2217 - (DOMNode *)_increaseSelectionListLevel 2219 2218 { 2220 Frame* coreFrame = core([self _frame]);2219 auto* coreFrame = core([self _frame]); 2221 2220 return coreFrame ? kit(coreFrame->editor().increaseSelectionListLevel().get()) : nil; 2222 2221 } … … 2224 2223 - (DOMNode *)_increaseSelectionListLevelOrdered 2225 2224 { 2226 Frame* coreFrame = core([self _frame]);2225 auto* coreFrame = core([self _frame]); 2227 2226 return coreFrame ? kit(coreFrame->editor().increaseSelectionListLevelOrdered().get()) : nil; 2228 2227 } … … 2230 2229 - (DOMNode *)_increaseSelectionListLevelUnordered 2231 2230 { 2232 Frame* coreFrame = core([self _frame]);2231 auto* coreFrame = core([self _frame]); 2233 2232 return coreFrame ? kit(coreFrame->editor().increaseSelectionListLevelUnordered().get()) : nil; 2234 2233 } … … 2236 2235 - (void)_decreaseSelectionListLevel 2237 2236 { 2238 Frame* coreFrame = core([self _frame]);2237 auto* coreFrame = core([self _frame]); 2239 2238 if (coreFrame) 2240 2239 coreFrame->editor().decreaseSelectionListLevel(); … … 2253 2252 if (![attributedString containsAttachments]) { 2254 2253 mutableTypes = adoptNS([types mutableCopy]); 2255 [mutableTypes removeObject: legacyRTFDPasteboardType()];2254 [mutableTypes removeObject:WebCore::legacyRTFDPasteboardType()]; 2256 2255 types = mutableTypes.get(); 2257 2256 } … … 2318 2317 } 2319 2318 2320 if ([pboardType isEqualToString: legacyFilenamesPasteboardType()])2321 return [self _documentFragmentWithPaths:[pasteboard propertyListForType: legacyFilenamesPasteboardType()]];2322 2323 if ([pboardType isEqualToString: legacyHTMLPasteboardType()]) {2324 NSString *HTMLString = [pasteboard stringForType: legacyHTMLPasteboardType()];2319 if ([pboardType isEqualToString:WebCore::legacyFilenamesPasteboardType()]) 2320 return [self _documentFragmentWithPaths:[pasteboard propertyListForType:WebCore::legacyFilenamesPasteboardType()]]; 2321 2322 if ([pboardType isEqualToString:WebCore::legacyHTMLPasteboardType()]) { 2323 NSString *HTMLString = [pasteboard stringForType:WebCore::legacyHTMLPasteboardType()]; 2325 2324 // This is a hack to make Microsoft's HTML pasteboard data work. See 3778785. 2326 2325 if ([HTMLString hasPrefix:@"Version:"]) { … … 2334 2333 } 2335 2334 2336 if ([pboardType isEqualToString: legacyRTFPasteboardType()] || [pboardType isEqualToString:legacyRTFDPasteboardType()]) {2335 if ([pboardType isEqualToString:WebCore::legacyRTFPasteboardType()] || [pboardType isEqualToString:WebCore::legacyRTFDPasteboardType()]) { 2337 2336 RetainPtr<NSAttributedString> string; 2338 if ([pboardType isEqualToString: legacyRTFDPasteboardType()])2339 string = adoptNS([[NSAttributedString alloc] initWithRTFD:[pasteboard dataForType: legacyRTFDPasteboardType()] documentAttributes:NULL]);2337 if ([pboardType isEqualToString:WebCore::legacyRTFDPasteboardType()]) 2338 string = adoptNS([[NSAttributedString alloc] initWithRTFD:[pasteboard dataForType:WebCore::legacyRTFDPasteboardType()] documentAttributes:NULL]); 2340 2339 if (!string) 2341 string = adoptNS([[NSAttributedString alloc] initWithRTF:[pasteboard dataForType: legacyRTFPasteboardType()] documentAttributes:NULL]);2340 string = adoptNS([[NSAttributedString alloc] initWithRTF:[pasteboard dataForType:WebCore::legacyRTFPasteboardType()] documentAttributes:NULL]); 2342 2341 if (!string) 2343 2342 return nil; … … 2367 2366 } 2368 2367 2369 if ([pboardType isEqualToString: legacyTIFFPasteboardType()])2370 return [self _web_documentFragmentFromPasteboard:pasteboard pasteboardType: legacyTIFFPasteboardType() imageMIMEType:@"image/tiff"];2371 if ([pboardType isEqualToString: legacyPDFPasteboardType()])2372 return [self _web_documentFragmentFromPasteboard:pasteboard pasteboardType: legacyPDFPasteboardType() imageMIMEType:@"application/pdf"];2368 if ([pboardType isEqualToString:WebCore::legacyTIFFPasteboardType()]) 2369 return [self _web_documentFragmentFromPasteboard:pasteboard pasteboardType:WebCore::legacyTIFFPasteboardType() imageMIMEType:@"image/tiff"]; 2370 if ([pboardType isEqualToString:WebCore::legacyPDFPasteboardType()]) 2371 return [self _web_documentFragmentFromPasteboard:pasteboard pasteboardType:WebCore::legacyPDFPasteboardType() imageMIMEType:@"application/pdf"]; 2373 2372 if ([pboardType isEqualToString:(NSString *)kUTTypePNG]) 2374 2373 return [self _web_documentFragmentFromPasteboard:pasteboard pasteboardType:(NSString *)kUTTypePNG imageMIMEType:@"image/png"]; 2375 2374 2376 if ([pboardType isEqualToString: legacyURLPasteboardType()]) {2375 if ([pboardType isEqualToString:WebCore::legacyURLPasteboardType()]) { 2377 2376 NSURL *URL = [NSURL URLFromPasteboard:pasteboard]; 2378 2377 DOMDocument* document = [[self _frame] DOMDocument]; … … 2393 2392 } 2394 2393 2395 if ([pboardType isEqualToString: legacyStringPasteboardType()]) {2394 if ([pboardType isEqualToString:WebCore::legacyStringPasteboardType()]) { 2396 2395 if (!context) 2397 2396 return nil; 2398 return kit(createFragmentFromText(*core(context), [[pasteboard stringForType: legacyStringPasteboardType()] precomposedStringWithCanonicalMapping]).ptr());2397 return kit(createFragmentFromText(*core(context), [[pasteboard stringForType:WebCore::legacyStringPasteboardType()] precomposedStringWithCanonicalMapping]).ptr()); 2399 2398 } 2400 2399 … … 2435 2434 - (BOOL)_beginPrintModeWithMinimumPageWidth:(CGFloat)minimumPageWidth height:(CGFloat)minimumPageHeight maximumPageWidth:(CGFloat)maximumPageWidth 2436 2435 { 2437 Frame* frame = core([self _frame]);2436 auto* frame = core([self _frame]); 2438 2437 if (!frame) 2439 2438 return NO; … … 2454 2453 - (BOOL)_beginPrintModeWithPageWidth:(float)pageWidth height:(float)pageHeight shrinkToFit:(BOOL)shrinkToFit 2455 2454 { 2456 Frame* frame = core([self _frame]);2455 auto* frame = core([self _frame]); 2457 2456 if (!frame) 2458 2457 return NO; 2459 2458 2460 Document* document = frame->document();2459 auto* document = frame->document(); 2461 2460 bool isHorizontal = !document || !document->renderView() || document->renderView()->style().isHorizontalWritingMode(); 2462 2461 2463 2462 float pageLogicalWidth = isHorizontal ? pageWidth : pageHeight; 2464 2463 float pageLogicalHeight = isHorizontal ? pageHeight : pageWidth; 2465 FloatSize minLayoutSize(pageLogicalWidth, pageLogicalHeight);2464 WebCore::FloatSize minLayoutSize(pageLogicalWidth, pageLogicalHeight); 2466 2465 float maximumShrinkRatio = 1; 2467 2466 … … 2469 2468 // according to the page width. 2470 2469 if (shrinkToFit && (!frame->document() || !frame->document()->isFrameSet())) { 2471 minLayoutSize = frame->resizePageRectsKeepingRatio( FloatSize(pageLogicalWidth, pageLogicalHeight),FloatSize(pageLogicalWidth * _WebHTMLViewPrintingMinimumShrinkFactor, pageLogicalHeight * _WebHTMLViewPrintingMinimumShrinkFactor));2470 minLayoutSize = frame->resizePageRectsKeepingRatio(WebCore::FloatSize(pageLogicalWidth, pageLogicalHeight), WebCore::FloatSize(pageLogicalWidth * _WebHTMLViewPrintingMinimumShrinkFactor, pageLogicalHeight * _WebHTMLViewPrintingMinimumShrinkFactor)); 2472 2471 maximumShrinkRatio = _WebHTMLViewPrintingMaximumShrinkFactor / _WebHTMLViewPrintingMinimumShrinkFactor; 2473 2472 } … … 2490 2489 - (BOOL)_beginScreenPaginationModeWithPageSize:(CGSize)pageSize shrinkToFit:(BOOL)shrinkToFit 2491 2490 { 2492 Frame* frame = core([self _frame]);2491 auto* frame = core([self _frame]); 2493 2492 if (!frame) 2494 2493 return NO; 2495 2494 2496 Document* document = frame->document();2495 auto* document = frame->document(); 2497 2496 bool isHorizontal = !document || !document->renderView() || document->renderView()->style().isHorizontalWritingMode(); 2498 2497 2499 2498 float pageLogicalWidth = isHorizontal ? pageSize.width : pageSize.height; 2500 2499 float pageLogicalHeight = isHorizontal ? pageSize.height : pageSize.width; 2501 FloatSize minLayoutSize(pageLogicalWidth, pageLogicalHeight);2500 WebCore::FloatSize minLayoutSize(pageLogicalWidth, pageLogicalHeight); 2502 2501 float maximumShrinkRatio = 1; 2503 2502 … … 2505 2504 // according to the page width. 2506 2505 if (shrinkToFit && (!frame->document() || !frame->document()->isFrameSet())) { 2507 minLayoutSize = frame->resizePageRectsKeepingRatio( FloatSize(pageLogicalWidth, pageLogicalHeight),FloatSize(pageLogicalWidth * _WebHTMLViewPrintingMinimumShrinkFactor, pageLogicalHeight * _WebHTMLViewPrintingMinimumShrinkFactor));2506 minLayoutSize = frame->resizePageRectsKeepingRatio(WebCore::FloatSize(pageLogicalWidth, pageLogicalHeight), WebCore::FloatSize(pageLogicalWidth * _WebHTMLViewPrintingMinimumShrinkFactor, pageLogicalHeight * _WebHTMLViewPrintingMinimumShrinkFactor)); 2508 2507 maximumShrinkRatio = _WebHTMLViewPrintingMaximumShrinkFactor / _WebHTMLViewPrintingMinimumShrinkFactor; 2509 2508 } … … 2521 2520 - (CGFloat)_adjustedBottomOfPageWithTop:(CGFloat)top bottom:(CGFloat)bottom limit:(CGFloat)bottomLimit 2522 2521 { 2523 Frame* frame = core([self _frame]);2522 auto* frame = core([self _frame]); 2524 2523 if (!frame) 2525 2524 return bottom; 2526 2525 2527 FrameView* view = frame->view();2526 auto* view = frame->view(); 2528 2527 if (!view) 2529 2528 return bottom; … … 2691 2690 } 2692 2691 2693 - ( Editor::Command)coreCommandBySelector:(SEL)selector2694 { 2695 Frame* coreFrame = core([self _frame]);2692 - (WebCore::Editor::Command)coreCommandBySelector:(SEL)selector 2693 { 2694 auto* coreFrame = core([self _frame]); 2696 2695 if (!coreFrame) 2697 return Editor::Command();2696 return WebCore::Editor::Command(); 2698 2697 return coreFrame->editor().command(commandNameForSelector(selector)); 2699 2698 } 2700 2699 2701 - ( Editor::Command)coreCommandByName:(const char*)name2702 { 2703 Frame* coreFrame = core([self _frame]);2700 - (WebCore::Editor::Command)coreCommandByName:(const char*)name 2701 { 2702 auto* coreFrame = core([self _frame]); 2704 2703 if (!coreFrame) 2705 return Editor::Command();2704 return WebCore::Editor::Command(); 2706 2705 return coreFrame->editor().command(name); 2707 2706 } … … 2865 2864 else if ([[[self class] _insertablePasteboardTypes] containsObject:returnType] && [self _isEditable]) { 2866 2865 // We can insert strings in any editable context. We can insert other types, like images, only in rich edit contexts. 2867 isReturnTypeOK = [returnType isEqualToString: legacyStringPasteboardType()] || [self _canEditRichly];2866 isReturnTypeOK = [returnType isEqualToString:WebCore::legacyStringPasteboardType()] || [self _canEditRichly]; 2868 2867 } 2869 2868 if (isSendTypeOK && isReturnTypeOK) … … 2883 2882 COMMAND_PROLOGUE 2884 2883 2885 if ( Frame* coreFrame = core([self _frame]))2886 coreFrame->selection().revealSelection( SelectionRevealMode::Reveal,ScrollAlignment::alignCenterAlways);2884 if (auto* coreFrame = core([self _frame])) 2885 coreFrame->selection().revealSelection(WebCore::SelectionRevealMode::Reveal, WebCore::ScrollAlignment::alignCenterAlways); 2887 2886 } 2888 2887 … … 2892 2891 { 2893 2892 SEL action = [item action]; 2894 RefPtr< Frame> frame = core([self _frame]);2893 RefPtr<WebCore::Frame> frame = core([self _frame]); 2895 2894 2896 2895 if (!frame) 2897 2896 return NO; 2898 2897 2899 if ( Document* doc = frame->document()) {2898 if (WebCore::Document* doc = frame->document()) { 2900 2899 if (doc->isPluginDocument()) 2901 2900 return NO; … … 2943 2942 if ([menuItem isKindOfClass:[NSMenuItem class]]) { 2944 2943 String direction = writingDirection == NSWritingDirectionLeftToRight ? "ltr" : "rtl"; 2945 [menuItem setState:frame->editor().selectionHasStyle( CSSPropertyDirection, direction)];2944 [menuItem setState:frame->editor().selectionHasStyle(WebCore::CSSPropertyDirection, direction)]; 2946 2945 } 2947 2946 return [self _canEdit]; … … 2960 2959 // Take control of the title of the menu item instead of just checking/unchecking it because 2961 2960 // a check would be ambiguous. 2962 [menuItem setTitle:frame->editor().selectionHasStyle( CSSPropertyDirection, "rtl")2961 [menuItem setTitle:frame->editor().selectionHasStyle(WebCore::CSSPropertyDirection, "rtl") 2963 2962 ? UI_STRING_INTERNAL("Left to Right", "Left to Right context menu item") 2964 2963 : UI_STRING_INTERNAL("Right to Left", "Right to Left context menu item")]; … … 3125 3124 return YES; 3126 3125 3127 Frame* coreFrame = core([self _frame]);3126 auto* coreFrame = core([self _frame]); 3128 3127 return coreFrame && coreFrame->selection().selection().isContentEditable(); 3129 3128 #else … … 3156 3155 return YES; 3157 3156 3158 Frame* coreFrame = core([self _frame]);3157 auto* coreFrame = core([self _frame]); 3159 3158 bool selectionIsEditable = coreFrame && coreFrame->selection().selection().isContentEditable(); 3160 3159 bool nextResponderIsInWebView = [nextResponder isKindOfClass:[NSView class]] … … 3327 3326 #endif 3328 3327 3329 if ( Frame* coreFrame = core([self _frame])) {3328 if (auto* coreFrame = core([self _frame])) { 3330 3329 coreFrame->document()->styleScope().didChangeStyleSheetEnvironment(); 3331 3330 coreFrame->document()->updateStyleIfNeeded(); … … 3342 3341 - (void)layoutToMinimumPageWidth:(float)minPageLogicalWidth height:(float)minPageLogicalHeight originalPageWidth:(float)originalPageWidth originalPageHeight:(float)originalPageHeight maximumShrinkRatio:(float)maximumShrinkRatio adjustingViewSize:(BOOL)adjustViewSize 3343 3342 { 3344 Frame* coreFrame = core([self _frame]);3343 auto* coreFrame = core([self _frame]); 3345 3344 if (!coreFrame) 3346 3345 return; 3347 3346 if (coreFrame->document()) { 3348 if (coreFrame->document()->pageCacheState() != Document::NotInPageCache)3347 if (coreFrame->document()->pageCacheState() != WebCore::Document::NotInPageCache) 3349 3348 return; 3350 3349 coreFrame->document()->updateStyleIfNeeded(); … … 3360 3359 LOG(View, "%@ doing layout", self); 3361 3360 3362 if ( FrameView* coreView = coreFrame->view()) {3361 if (auto* coreView = coreFrame->view()) { 3363 3362 if (minPageLogicalWidth > 0.0) { 3364 FloatSize pageSize(minPageLogicalWidth, minPageLogicalHeight);3365 FloatSize originalPageSize(originalPageWidth, originalPageHeight);3363 WebCore::FloatSize pageSize(minPageLogicalWidth, minPageLogicalHeight); 3364 WebCore::FloatSize originalPageSize(originalPageWidth, originalPageHeight); 3366 3365 if (coreFrame->document() && coreFrame->document()->renderView() && !coreFrame->document()->renderView()->style().isHorizontalWritingMode()) { 3367 pageSize = FloatSize(minPageLogicalHeight, minPageLogicalWidth);3368 originalPageSize = FloatSize(originalPageHeight, originalPageWidth);3366 pageSize = WebCore::FloatSize(minPageLogicalHeight, minPageLogicalWidth); 3367 originalPageSize = WebCore::FloatSize(originalPageHeight, originalPageWidth); 3369 3368 } 3370 coreView->forceLayoutForPagination(pageSize, originalPageSize, maximumShrinkRatio, adjustViewSize ? AdjustViewSize :DoNotAdjustViewSize);3369 coreView->forceLayoutForPagination(pageSize, originalPageSize, maximumShrinkRatio, adjustViewSize ? WebCore::AdjustViewSize : WebCore::DoNotAdjustViewSize); 3371 3370 } else { 3372 3371 coreView->forceLayout(!adjustViewSize); … … 3399 3398 [super rightMouseUp:event]; 3400 3399 3401 if ( Frame* coreframe = core([self _frame]))3402 core frame->eventHandler().mouseUp(event, [[self _webView] _pressureEvent]);3400 if (auto* coreFrame = core([self _frame])) 3401 coreFrame->eventHandler().mouseUp(event, [[self _webView] _pressureEvent]); 3403 3402 } 3404 3403 … … 3486 3485 static RetainPtr<NSArray> fixMenusReceivedFromOldClients(NSArray *delegateSuppliedItems, NSArray *savedItems) 3487 3486 { 3487 using namespace WebCore; 3488 3488 auto newMenuItems = adoptNS([delegateSuppliedItems mutableCopy]); 3489 3489 … … 3605 3605 } 3606 3606 3607 static RetainPtr<NSMenuItem> createShareMenuItem(const HitTestResult& hitTestResult)3607 static RetainPtr<NSMenuItem> createShareMenuItem(const WebCore::HitTestResult& hitTestResult) 3608 3608 { 3609 3609 auto items = adoptNS([[NSMutableArray alloc] init]); … … 3619 3619 } 3620 3620 3621 if ( Image* image = hitTestResult.image()) {3622 if (RefPtr< SharedBuffer> buffer = image->data())3621 if (auto* image = hitTestResult.image()) { 3622 if (RefPtr<WebCore::SharedBuffer> buffer = image->data()) 3623 3623 [items addObject:adoptNS([[NSImage alloc] initWithData:[NSData dataWithBytes:buffer->data() length:buffer->size()]]).get()]; 3624 3624 } … … 3635 3635 } 3636 3636 3637 static RetainPtr<NSMutableArray> createMenuItems(const HitTestResult&, const Vector<ContextMenuItem>&);3638 3639 static RetainPtr<NSMenuItem> createMenuItem(const HitTestResult& hitTestResult, constContextMenuItem& item)3640 { 3641 if (item.action() == ContextMenuItemTagShareMenu)3637 static RetainPtr<NSMutableArray> createMenuItems(const WebCore::HitTestResult&, const Vector<WebCore::ContextMenuItem>&); 3638 3639 static RetainPtr<NSMenuItem> createMenuItem(const WebCore::HitTestResult& hitTestResult, const WebCore::ContextMenuItem& item) 3640 { 3641 if (item.action() == WebCore::ContextMenuItemTagShareMenu) 3642 3642 return createShareMenuItem(hitTestResult); 3643 3643 … … 3656 3656 } 3657 3657 3658 case SeparatorType:3658 case WebCore::SeparatorType: 3659 3659 return [NSMenuItem separatorItem]; 3660 3660 3661 case SubmenuType: {3661 case WebCore::SubmenuType: { 3662 3662 auto menu = adoptNS([[NSMenu alloc] init]); 3663 3663 … … 3678 3678 } 3679 3679 3680 static RetainPtr<NSMutableArray> createMenuItems(const HitTestResult& hitTestResult, const Vector<ContextMenuItem>& items)3680 static RetainPtr<NSMutableArray> createMenuItems(const WebCore::HitTestResult& hitTestResult, const Vector<WebCore::ContextMenuItem>& items) 3681 3681 { 3682 3682 auto menuItems = adoptNS([[NSMutableArray alloc] init]); … … 3690 3690 } 3691 3691 3692 static RetainPtr<NSArray> customMenuFromDefaultItems(WebView *webView, const ContextMenu& defaultMenu)3692 static RetainPtr<NSArray> customMenuFromDefaultItems(WebView *webView, const WebCore::ContextMenu& defaultMenu) 3693 3693 { 3694 3694 const auto& hitTestResult = webView.page->contextMenuController().hitTestResult(); … … 3732 3732 [_private->completionController endRevertingChange:NO moveLeft:NO]; 3733 3733 3734 RefPtr< Frame> coreFrame = core([self _frame]);3734 RefPtr<WebCore::Frame> coreFrame = core([self _frame]); 3735 3735 if (!coreFrame) 3736 3736 return nil; 3737 3737 3738 Page* page = coreFrame->page();3738 auto* page = coreFrame->page(); 3739 3739 if (!page) 3740 3740 return nil; … … 3744 3744 page->contextMenuController().clearContextMenu(); 3745 3745 coreFrame->eventHandler().mouseDown(event, [[self _webView] _pressureEvent]); 3746 BOOL handledEvent = coreFrame->eventHandler().sendContextMenuEvent( PlatformEventFactory::createPlatformMouseEvent(event, [[self _webView] _pressureEvent], page->chrome().platformPageClient()));3746 BOOL handledEvent = coreFrame->eventHandler().sendContextMenuEvent(WebCore::PlatformEventFactory::createPlatformMouseEvent(event, [[self _webView] _pressureEvent], page->chrome().platformPageClient())); 3747 3747 _private->handlingMouseDownEvent = NO; 3748 3748 … … 3755 3755 return nil; 3756 3756 3757 ContextMenu* contextMenu = page->contextMenuController().contextMenu();3757 auto* contextMenu = page->contextMenuController().contextMenu(); 3758 3758 if (!contextMenu) 3759 3759 return nil; … … 3768 3768 [menu addItem:item]; 3769 3769 3770 if (item.tag == ContextMenuItemTagShareMenu) {3770 if (item.tag == WebCore::ContextMenuItemTagShareMenu) { 3771 3771 ASSERT([item.representedObject isKindOfClass:[NSSharingServicePicker class]]); 3772 3772 #if ENABLE(SERVICE_CONTROLS) … … 3790 3790 - (void)clearFocus 3791 3791 { 3792 Frame* coreFrame = core([self _frame]);3792 auto* coreFrame = core([self _frame]); 3793 3793 if (!coreFrame) 3794 3794 return; 3795 Document* document = coreFrame->document();3795 auto* document = coreFrame->document(); 3796 3796 if (!document) 3797 3797 return; … … 3809 3809 - (void)setLayer:(CALayer *)layer 3810 3810 { 3811 if ( Frame* frame = core([self _frame])) {3812 if ( FrameView* view = frame->view())3811 if (auto* frame = core([self _frame])) { 3812 if (auto* view = frame->view()) 3813 3813 view->setPaintsEntireContents(layer); 3814 3814 } … … 3856 3856 if (!flag) 3857 3857 return; // There's no way to say you don't need a layout. 3858 if ( Frame* frame = core([self _frame])) {3859 if (frame->document() && frame->document()->pageCacheState() != Document::NotInPageCache)3858 if (auto* frame = core([self _frame])) { 3859 if (frame->document() && frame->document()->pageCacheState() != WebCore::Document::NotInPageCache) 3860 3860 return; 3861 if ( FrameView* view = frame->view())3861 if (auto* view = frame->view()) 3862 3862 view->setNeedsLayoutAfterViewConfigurationChange(); 3863 3863 } … … 3869 3869 if (!flag) 3870 3870 return; // There's no way to say you don't need a style recalc. 3871 if ( Frame* frame = core([self _frame])) {3872 if (frame->document() && frame->document()->pageCacheState() != Document::NotInPageCache)3871 if (auto* frame = core([self _frame])) { 3872 if (frame->document() && frame->document()->pageCacheState() != WebCore::Document::NotInPageCache) 3873 3873 return; 3874 3874 frame->document()->scheduleFullStyleRebuild(); … … 4032 4032 // WebCore via JavaScript, which could normally mutate the NSView tree while it is being traversed. 4033 4033 // Defer those mutations while descendants are being traveresed. 4034 W idgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;4034 WebCore::WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates; 4035 4035 [super _invalidateGStatesForTree]; 4036 4036 } … … 4092 4092 #endif 4093 4093 4094 Frame* frame = core([self _frame]);4094 auto* frame = core([self _frame]); 4095 4095 if (!frame || !frame->eventHandler().wheelEvent(event)) { 4096 4096 #if PLATFORM(MAC) … … 4136 4136 if (hitHTMLView) { 4137 4137 bool result = false; 4138 if ( Frame* coreFrame = core([hitHTMLView _frame])) {4138 if (auto* coreFrame = core([hitHTMLView _frame])) { 4139 4139 coreFrame->eventHandler().setActivationEventNumber([event eventNumber]); 4140 4140 [hitHTMLView _setMouseDownEvent:event]; 4141 4141 if ([hitHTMLView _isSelectionEvent:event]) { 4142 4142 #if ENABLE(DRAG_SUPPORT) 4143 if ( Page* page = coreFrame->page())4144 result = coreFrame->eventHandler().eventMayStartDrag( PlatformEventFactory::createPlatformMouseEvent(event, [[self _webView] _pressureEvent], page->chrome().platformPageClient()));4143 if (auto* page = coreFrame->page()) 4144 result = coreFrame->eventHandler().eventMayStartDrag(WebCore::PlatformEventFactory::createPlatformMouseEvent(event, [[self _webView] _pressureEvent], page->chrome().platformPageClient())); 4145 4145 #endif 4146 4146 } else if ([hitHTMLView _isScrollBarEvent:event]) … … 4167 4167 [hitHTMLView _setMouseDownEvent:event]; 4168 4168 #if ENABLE(DRAG_SUPPORT) 4169 if ( Frame* coreFrame = core([hitHTMLView _frame])) {4170 if ( Page* page = coreFrame->page())4171 result = coreFrame->eventHandler().eventMayStartDrag( PlatformEventFactory::createPlatformMouseEvent(event, [[self _webView] _pressureEvent], page->chrome().platformPageClient()));4169 if (auto* coreFrame = core([hitHTMLView _frame])) { 4170 if (auto* page = coreFrame->page()) 4171 result = coreFrame->eventHandler().eventMayStartDrag(WebCore::PlatformEventFactory::createPlatformMouseEvent(event, [[self _webView] _pressureEvent], page->chrome().platformPageClient())); 4172 4172 } 4173 4173 #endif … … 4214 4214 // Let WebCore get a chance to deal with the event. This will call back to us 4215 4215 // to start the autoscroll timer if appropriate. 4216 if ( Frame* coreframe = core([self _frame]))4217 core frame->eventHandler().mouseDown(event);4216 if (auto* coreFrame = core([self _frame])) 4217 coreFrame->eventHandler().mouseDown(event); 4218 4218 #else 4219 4219 ALLOW_DEPRECATED_DECLARATIONS_BEGIN … … 4231 4231 // Let WebCore get a chance to deal with the event. This will call back to us 4232 4232 // to start the autoscroll timer if appropriate. 4233 if ( Frame* coreframe = core([self _frame]))4234 core frame->eventHandler().mouseDown(event, [[self _webView] _pressureEvent]);4233 if (auto* coreFrame = core([self _frame])) 4234 coreFrame->eventHandler().mouseDown(event, [[self _webView] _pressureEvent]); 4235 4235 } 4236 4236 } … … 4248 4248 // Let WebCore get a chance to deal with the event. This will call back to us 4249 4249 // to start the autoscroll timer if appropriate. 4250 if ( Frame* coreframe = core([self _frame]))4251 core frame->eventHandler().touchEvent(event);4250 if (auto* coreFrame = core([self _frame])) 4251 coreFrame->eventHandler().touchEvent(event); 4252 4252 } 4253 4253 … … 4287 4287 4288 4288 if (!_private->ignoringMouseDraggedEvents) { 4289 if ( Frame* frame = core([self _frame])) {4290 if ( Page* page = frame->page())4289 if (auto* frame = core([self _frame])) { 4290 if (auto* page = frame->page()) 4291 4291 page->mainFrame().eventHandler().mouseDragged(event, [[self _webView] _pressureEvent]); 4292 4292 } … … 4302 4302 ASSERT(![self _webView] || [self _isTopHTMLView]); 4303 4303 4304 Page* page = core([self _webView]);4304 auto* page = core([self _webView]); 4305 4305 if (!page) 4306 4306 return NSDragOperationNone; … … 4318 4318 NSPoint windowMouseLoc = windowImageLoc; 4319 4319 4320 if ( Page* page = core([self _webView])) {4320 if (auto* page = core([self _webView])) { 4321 4321 windowMouseLoc = NSMakePoint(windowImageLoc.x + page->dragController().dragOffset().x(), windowImageLoc.y + page->dragController().dragOffset().y()); 4322 4322 page->dragController().dragEnded(); … … 4370 4370 if (!wrapper) { 4371 4371 ASSERT(![self _webView] || [self _isTopHTMLView]); 4372 Page* page = core([self _webView]);4372 auto* page = core([self _webView]); 4373 4373 4374 4374 //If a load occurs midway through a drag, the view may be detached, which gives … … 4408 4408 ASSERT(![self _webView] || [self _isTopHTMLView]); 4409 4409 4410 Page* page = core([self _webView]);4410 auto* page = core([self _webView]); 4411 4411 if (!page) 4412 4412 return NSDragOperationNone; … … 4421 4421 NSPoint windowLocation = [self.window convertRectFromScreen:{ screenPoint, NSZeroSize }].origin; 4422 4422 4423 if ( Page* page = core([self _webView]))4423 if (auto* page = core([self _webView])) 4424 4424 page->dragController().dragEnded(); 4425 4425 … … 4463 4463 4464 4464 [self _stopAutoscrollTimer]; 4465 if ( Frame* frame = core([self _frame])) {4466 if ( Page* page = frame->page()) {4465 if (auto* frame = core([self _frame])) { 4466 if (auto* page = frame->page()) { 4467 4467 #if PLATFORM(IOS_FAMILY) 4468 4468 page->mainFrame().eventHandler().mouseUp(event); … … 4496 4496 return; 4497 4497 4498 RefPtr< Frame> coreFrame = core([self _frame]);4498 RefPtr<WebCore::Frame> coreFrame = core([self _frame]); 4499 4499 if (!coreFrame) 4500 4500 return; … … 4518 4518 // Utility function to make sure we don't return anything through the NSTextInput 4519 4519 // API when an editable region is not currently focused. 4520 static BOOL isTextInput( Frame* coreFrame)4520 static BOOL isTextInput(WebCore::Frame* coreFrame) 4521 4521 { 4522 4522 if (!coreFrame) 4523 4523 return NO; 4524 const VisibleSelection& selection = coreFrame->selection().selection();4524 const auto& selection = coreFrame->selection().selection(); 4525 4525 return !selection.isNone() && selection.isContentEditable(); 4526 4526 } … … 4528 4528 #if PLATFORM(MAC) 4529 4529 4530 static BOOL isInPasswordField( Frame* coreFrame)4530 static BOOL isInPasswordField(WebCore::Frame* coreFrame) 4531 4531 { 4532 4532 return coreFrame && coreFrame->selection().selection().isInPasswordField(); … … 4535 4535 #endif 4536 4536 4537 static RefPtr< KeyboardEvent> currentKeyboardEvent(Frame* coreFrame)4537 static RefPtr<WebCore::KeyboardEvent> currentKeyboardEvent(WebCore::Frame* coreFrame) 4538 4538 { 4539 4539 #if PLATFORM(MAC) … … 4544 4544 switch ([event type]) { 4545 4545 case NSEventTypeKeyDown: { 4546 PlatformKeyboardEvent platformEvent =PlatformEventFactory::createPlatformKeyboardEvent(event);4547 platformEvent.disambiguateKeyDownEvent( PlatformEvent::RawKeyDown);4548 return KeyboardEvent::create(platformEvent, &coreFrame->windowProxy());4546 WebCore::PlatformKeyboardEvent platformEvent = WebCore::PlatformEventFactory::createPlatformKeyboardEvent(event); 4547 platformEvent.disambiguateKeyDownEvent(WebCore::PlatformEvent::RawKeyDown); 4548 return WebCore::KeyboardEvent::create(platformEvent, &coreFrame->windowProxy()); 4549 4549 } 4550 4550 case NSEventTypeKeyUp: 4551 return KeyboardEvent::create(PlatformEventFactory::createPlatformKeyboardEvent(event), &coreFrame->windowProxy());4551 return WebCore::KeyboardEvent::create(WebCore::PlatformEventFactory::createPlatformKeyboardEvent(event), &coreFrame->windowProxy()); 4552 4552 default: 4553 4553 return nullptr; … … 4559 4559 WebEventType type = event.type; 4560 4560 if (type == WebEventKeyDown || type == WebEventKeyUp) { 4561 Document* document = coreFrame->document();4562 return KeyboardEvent::create(PlatformEventFactory::createPlatformKeyboardEvent(event), document ? document->windowProxy() : 0);4561 auto* document = coreFrame->document(); 4562 return WebCore::KeyboardEvent::create(WebCore::PlatformEventFactory::createPlatformKeyboardEvent(event), document ? document->windowProxy() : 0); 4563 4563 } 4564 4564 return nullptr; … … 4576 4576 #endif 4577 4577 4578 Frame* frame = core([self _frame]);4578 auto* frame = core([self _frame]); 4579 4579 if (!frame) 4580 4580 return YES; … … 4595 4595 frame->editor().setStartNewKillRingSequence(true); 4596 4596 4597 Page* page = frame->page();4597 auto* page = frame->page(); 4598 4598 if (!page) 4599 4599 return YES; … … 4607 4607 return YES; 4608 4608 4609 if ( Document* document = frame->document())4609 if (auto* document = frame->document()) 4610 4610 document->setFocusedElement(0); 4611 page->focusController().setInitialFocus(direction == NSSelectingNext ? FocusDirectionForward :FocusDirectionBackward,4611 page->focusController().setInitialFocus(direction == NSSelectingNext ? WebCore::FocusDirectionForward : WebCore::FocusDirectionBackward, 4612 4612 currentKeyboardEvent(frame).get()); 4613 4613 return YES; … … 4625 4625 [_private->completionController endRevertingChange:NO moveLeft:NO]; 4626 4626 #endif 4627 Frame* coreFrame = core([self _frame]);4627 auto* coreFrame = core([self _frame]); 4628 4628 if (!coreFrame) 4629 4629 return resign; 4630 4630 4631 4631 #if PLATFORM(IOS_FAMILY) 4632 if ( Document* document = coreFrame->document()) {4633 document->markers().removeMarkers( DocumentMarker::DictationPhraseWithAlternatives);4634 document->markers().removeMarkers( DocumentMarker::DictationResult);4632 if (auto* document = coreFrame->document()) { 4633 document->markers().removeMarkers(WebCore::DocumentMarker::DictationPhraseWithAlternatives); 4634 document->markers().removeMarkers(WebCore::DocumentMarker::DictationResult); 4635 4635 } 4636 4636 #endif 4637 4637 4638 Page* page = coreFrame->page();4638 auto* page = coreFrame->page(); 4639 4639 if (!page) 4640 4640 return resign; … … 4712 4712 _private->paginateScreenContent = paginateScreenContent; 4713 4713 4714 Frame* coreFrame = core([self _frame]);4714 auto* coreFrame = core([self _frame]); 4715 4715 if (coreFrame) { 4716 if ( FrameView* coreView = coreFrame->view())4716 if (auto* coreView = coreFrame->view()) 4717 4717 coreView->setMediaType(_private->printing ? "print" : "screen"); 4718 if ( Document* document = coreFrame->document()) {4718 if (auto* document = coreFrame->document()) { 4719 4719 // In setting printing, we should not validate resources already cached for the document. 4720 4720 // See https://bugs.webkit.org/show_bug.cgi?id=43704 4721 ResourceCacheValidationSuppressor validationSuppressor(document->cachedResourceLoader());4721 WebCore::ResourceCacheValidationSuppressor validationSuppressor(document->cachedResourceLoader()); 4722 4722 4723 4723 document->setPaginatedForScreen(_private->paginateScreenContent); … … 4768 4768 { 4769 4769 bool useViewWidth = true; 4770 Frame* coreFrame = core([self _frame]);4770 auto* coreFrame = core([self _frame]); 4771 4771 if (coreFrame) { 4772 Document* document = coreFrame->document();4772 auto* document = coreFrame->document(); 4773 4773 if (document && document->renderView()) 4774 4774 useViewWidth = document->renderView()->style().isHorizontalWritingMode(); … … 4940 4940 #if PLATFORM(MAC) 4941 4941 BOOL completionPopupWasOpen = _private->completionController && [_private->completionController popupWindowIsOpen]; 4942 Frame* coreFrame = core([self _frame]);4942 auto* coreFrame = core([self _frame]); 4943 4943 if (!eventWasSentToWebCore && coreFrame && coreFrame->eventHandler().keyEvent(event)) { 4944 4944 // WebCore processed a key event, bail on any preexisting complete: UI … … 4951 4951 } 4952 4952 #else 4953 Frame *coreFrame = core([self _frame]);4953 auto* coreFrame = core([self _frame]); 4954 4954 if (!eventWasSentToWebCore && coreFrame) 4955 4955 coreFrame->eventHandler().keyEvent(event); … … 4977 4977 4978 4978 RetainPtr<WebHTMLView> selfProtector = self; 4979 Frame* coreFrame = core([self _frame]);4979 auto* coreFrame = core([self _frame]); 4980 4980 if (coreFrame && !eventWasSentToWebCore) 4981 4981 coreFrame->eventHandler().keyEvent(event); … … 4995 4995 RetainPtr<WebHTMLView> selfProtector = self; 4996 4996 4997 Frame* coreFrame = core([self _frame]);4997 auto* coreFrame = core([self _frame]); 4998 4998 unsigned short keyCode = [event keyCode]; 4999 4999 5000 5000 // Don't make an event from the num lock and function keys. 5001 5001 if (coreFrame && keyCode != 0 && keyCode != 10 && keyCode != 63) { 5002 coreFrame->eventHandler().keyEvent( PlatformEventFactory::createPlatformKeyboardEvent(event));5002 coreFrame->eventHandler().keyEvent(WebCore::PlatformEventFactory::createPlatformKeyboardEvent(event)); 5003 5003 return; 5004 5004 } … … 5061 5061 COMMAND_PROLOGUE 5062 5062 5063 if ( Frame* coreFrame = core([self _frame]))5064 coreFrame->selection().revealSelection( SelectionRevealMode::Reveal,ScrollAlignment::alignCenterAlways);5063 if (auto* coreFrame = core([self _frame])) 5064 coreFrame->selection().revealSelection(WebCore::SelectionRevealMode::Reveal, WebCore::ScrollAlignment::alignCenterAlways); 5065 5065 } 5066 5066 … … 5069 5069 - (NSData *)_selectionStartFontAttributesAsRTF 5070 5070 { 5071 Frame* coreFrame = core([self _frame]);5071 auto* coreFrame = core([self _frame]); 5072 5072 auto string = adoptNS([[NSAttributedString alloc] initWithString:@"x" 5073 5073 attributes:coreFrame ? coreFrame->editor().fontAttributesAtSelectionStart().createDictionary().get() : nil]); … … 5082 5082 if (fontPasteboard == nil) 5083 5083 return nil; 5084 NSData *data = [fontPasteboard dataForType: legacyFontPasteboardType()];5084 NSData *data = [fontPasteboard dataForType:WebCore::legacyFontPasteboardType()]; 5085 5085 if (data == nil || [data length] == 0) 5086 5086 return nil; … … 5203 5203 #endif // PLATFORM(MAC) 5204 5204 5205 - (void)_applyStyleToSelection:(DOMCSSStyleDeclaration *)style withUndoAction:( EditAction)undoAction5206 { 5207 [self _applyEditingStyleToSelection: EditingStyle::create(core(style)) withUndoAction:undoAction];5208 } 5209 5210 - (void)_applyEditingStyleToSelection:(Ref< EditingStyle>&&)editingStyle withUndoAction:(EditAction)undoAction5211 { 5212 if ( Frame* coreFrame = core([self _frame]))5213 coreFrame->editor().applyStyleToSelection(WTFMove(editingStyle), undoAction, Editor::ColorFilterMode::InvertColor);5205 - (void)_applyStyleToSelection:(DOMCSSStyleDeclaration *)style withUndoAction:(WebCore::EditAction)undoAction 5206 { 5207 [self _applyEditingStyleToSelection:WebCore::EditingStyle::create(core(style)) withUndoAction:undoAction]; 5208 } 5209 5210 - (void)_applyEditingStyleToSelection:(Ref<WebCore::EditingStyle>&&)editingStyle withUndoAction:(WebCore::EditAction)undoAction 5211 { 5212 if (auto* coreFrame = core([self _frame])) 5213 coreFrame->editor().applyStyleToSelection(WTFMove(editingStyle), undoAction, WebCore::Editor::ColorFilterMode::InvertColor); 5214 5214 } 5215 5215 … … 5263 5263 // Pressing Esc results in a fake event being sent - don't pass it to WebCore. 5264 5264 if (!eventWasSentToWebCore && event == [NSApp currentEvent] && self == [[self window] firstResponder]) 5265 if ( Frame* frame = core([self _frame]))5265 if (auto* frame = core([self _frame])) 5266 5266 ret = frame->eventHandler().keyEvent(event); 5267 5267 … … 5287 5287 NSPasteboard *fontPasteboard = [NSPasteboard pasteboardWithName:NSFontPboard]; 5288 5288 ALLOW_DEPRECATED_DECLARATIONS_END 5289 [fontPasteboard declareTypes:[NSArray arrayWithObject: legacyFontPasteboardType()] owner:nil];5290 [fontPasteboard setData:[self _selectionStartFontAttributesAsRTF] forType: legacyFontPasteboardType()];5289 [fontPasteboard declareTypes:[NSArray arrayWithObject:WebCore::legacyFontPasteboardType()] owner:nil]; 5290 [fontPasteboard setData:[self _selectionStartFontAttributesAsRTF] forType:WebCore::legacyFontPasteboardType()]; 5291 5291 } 5292 5292 … … 5297 5297 // Read RTF with font attributes from the pasteboard. 5298 5298 // Maybe later we should add a pasteboard type that contains CSS text for "native" copy and paste font. 5299 [self _applyStyleToSelection:[self _styleFromFontAttributes:[self _fontAttributesFromFontPasteboard]] withUndoAction: EditAction::PasteFont];5299 [self _applyStyleToSelection:[self _styleFromFontAttributes:[self _fontAttributesFromFontPasteboard]] withUndoAction:WebCore::EditAction::PasteFont]; 5300 5300 } 5301 5301 … … 5313 5313 COMMAND_PROLOGUE 5314 5314 5315 [self _applyEditingStyleToSelection: computedFontChanges(NSFontManager.sharedFontManager).createEditingStyle() withUndoAction:EditAction::SetFont];5315 [self _applyEditingStyleToSelection:WebCore::computedFontChanges(NSFontManager.sharedFontManager).createEditingStyle() withUndoAction:WebCore::EditAction::SetFont]; 5316 5316 } 5317 5317 … … 5320 5320 COMMAND_PROLOGUE 5321 5321 5322 [self _applyEditingStyleToSelection: computedFontAttributeChanges(NSFontManager.sharedFontManager, sender).createEditingStyle() withUndoAction:EditAction::ChangeAttributes];5322 [self _applyEditingStyleToSelection:WebCore::computedFontAttributeChanges(NSFontManager.sharedFontManager, sender).createEditingStyle() withUndoAction:WebCore::EditAction::ChangeAttributes]; 5323 5323 } 5324 5324 … … 5333 5333 } 5334 5334 5335 - ( EditAction)_undoActionFromColorPanelWithSelector:(SEL)selector5335 - (WebCore::EditAction)_undoActionFromColorPanelWithSelector:(SEL)selector 5336 5336 { 5337 5337 if (selector == @selector(setBackgroundColor:)) 5338 return EditAction::SetBackgroundColor;5339 return EditAction::SetColor;5338 return WebCore::EditAction::SetBackgroundColor; 5339 return WebCore::EditAction::SetColor; 5340 5340 } 5341 5341 … … 5345 5345 WebView *webView = [self _webView]; 5346 5346 if ([[webView _editingDelegateForwarder] webView:webView shouldApplyStyle:style toElementsInDOMRange:range]) { 5347 if ( Frame* coreFrame = core([self _frame])) {5347 if (auto* coreFrame = core([self _frame])) { 5348 5348 // FIXME: We shouldn't have to make a copy here. 5349 Ref< MutableStyleProperties> properties(core(style)->copyProperties());5349 Ref<WebCore::MutableStyleProperties> properties(core(style)->copyProperties()); 5350 5350 coreFrame->editor().applyStyle(properties.ptr(), [self _undoActionFromColorPanelWithSelector:selector]); 5351 5351 } … … 5381 5381 // NSTextView. However, this might not be required for Tiger, since the background-color 5382 5382 // changing box in the font panel doesn't work in Mail (3674481), though it does in TextEdit. 5383 [self _applyStyleToSelection:[self _styleFromColorPanelWithSelector:@selector(setColor:)] withUndoAction: EditAction::SetColor];5383 [self _applyStyleToSelection:[self _styleFromColorPanelWithSelector:@selector(setColor:)] withUndoAction:WebCore::EditAction::SetColor]; 5384 5384 } 5385 5385 … … 5437 5437 COMMAND_PROLOGUE 5438 5438 5439 if ( Frame* coreFrame = core([self _frame]))5439 if (auto* coreFrame = core([self _frame])) 5440 5440 coreFrame->editor().advanceToNextMisspelling(); 5441 5441 } … … 5457 5457 } 5458 5458 5459 if ( Frame* coreFrame = core([self _frame]))5459 if (auto* coreFrame = core([self _frame])) 5460 5460 coreFrame->editor().advanceToNextMisspelling(true); 5461 5461 [spellingPanel orderFront:sender]; … … 5503 5503 return; 5504 5504 5505 Frame* coreFrame = core([self _frame]);5505 auto* coreFrame = core([self _frame]); 5506 5506 if (!coreFrame) 5507 5507 return; 5508 5508 5509 auto direction = W ritingDirection::RightToLeft;5509 auto direction = WebCore::WritingDirection::RightToLeft; 5510 5510 switch (coreFrame->editor().baseWritingDirectionForSelectionStart()) { 5511 case W ritingDirection::LeftToRight:5511 case WebCore::WritingDirection::LeftToRight: 5512 5512 break; 5513 case W ritingDirection::RightToLeft:5514 direction = W ritingDirection::LeftToRight;5513 case WebCore::WritingDirection::RightToLeft: 5514 direction = WebCore::WritingDirection::LeftToRight; 5515 5515 break; 5516 5516 // The writingDirectionForSelectionStart method will never return "natural". It 5517 5517 // will always return a concrete direction. So, keep the compiler happy, and assert not reached. 5518 case W ritingDirection::Natural:5518 case WebCore::WritingDirection::Natural: 5519 5519 ASSERT_NOT_REACHED(); 5520 5520 break; 5521 5521 } 5522 5522 5523 if ( Frame* coreFrame = core([self _frame]))5523 if (auto* coreFrame = core([self _frame])) 5524 5524 coreFrame->editor().setBaseWritingDirection(direction); 5525 5525 } … … 5538 5538 ASSERT(writingDirection != NSWritingDirectionNatural); 5539 5539 5540 if ( Frame* coreFrame = core([self _frame]))5541 coreFrame->editor().setBaseWritingDirection(writingDirection == NSWritingDirectionLeftToRight ? W ritingDirection::LeftToRight :WritingDirection::RightToLeft);5540 if (auto* coreFrame = core([self _frame])) 5541 coreFrame->editor().setBaseWritingDirection(writingDirection == NSWritingDirectionLeftToRight ? WebCore::WritingDirection::LeftToRight : WebCore::WritingDirection::RightToLeft); 5542 5542 } 5543 5543 … … 5559 5559 } 5560 5560 5561 if ( Frame* coreFrame = core([self _frame]))5562 coreFrame->editor().setBaseWritingDirection(direction == NSWritingDirectionLeftToRight ? W ritingDirection::LeftToRight :WritingDirection::RightToLeft);5561 if (auto* coreFrame = core([self _frame])) 5562 coreFrame->editor().setBaseWritingDirection(direction == NSWritingDirectionLeftToRight ? WebCore::WritingDirection::LeftToRight : WebCore::WritingDirection::RightToLeft); 5563 5563 } 5564 5564 … … 5632 5632 - (void)_updateControlTints 5633 5633 { 5634 Frame* frame = core([self _frame]);5634 auto* frame = core([self _frame]); 5635 5635 if (!frame) 5636 5636 return; 5637 FrameView* view = frame->view();5637 auto* view = frame->view(); 5638 5638 if (!view) 5639 5639 return; … … 5701 5701 [self _updateSelectionForInputManager]; 5702 5702 [self _updateFontPanel]; 5703 if ( Frame* coreFrame = core([self _frame])) {5703 if (auto* coreFrame = core([self _frame])) { 5704 5704 if (!coreFrame->editor().isHandlingAcceptedCandidate()) 5705 5705 _private->softSpaceRange = NSMakeRange(NSNotFound, 0); … … 5726 5726 NSFont *font = nil; 5727 5727 RetainPtr<NSDictionary> attributes; 5728 if ( Frame* coreFrame = core([self _frame])) {5729 if (const Font* fd = coreFrame->editor().fontForSelection(multipleFonts))5728 if (auto* coreFrame = core([self _frame])) { 5729 if (const WebCore::Font* fd = coreFrame->editor().fontForSelection(multipleFonts)) 5730 5730 font = (NSFont *)fd->platformData().registeredFont(); 5731 5731 attributes = coreFrame->editor().fontAttributesAtSelectionStart().createDictionary(); … … 5754 5754 if (![[self _webView] smartInsertDeleteEnabled]) 5755 5755 return NO; 5756 Frame* coreFrame = core([self _frame]);5757 return coreFrame && coreFrame->selection().granularity() == W ordGranularity;5756 auto* coreFrame = core([self _frame]); 5757 return coreFrame && coreFrame->selection().granularity() == WebCore::WordGranularity; 5758 5758 } 5759 5759 … … 5920 5920 - (void)_lookUpInDictionaryFromMenu:(id)sender 5921 5921 { 5922 Frame* coreFrame = core([self _frame]);5922 auto* coreFrame = core([self _frame]); 5923 5923 if (!coreFrame) 5924 5924 return; 5925 5925 5926 RefPtr< Range> selectionRange = coreFrame->selection().selection().firstRange();5926 RefPtr<WebCore::Range> selectionRange = coreFrame->selection().selection().firstRange(); 5927 5927 if (!selectionRange) 5928 5928 return; 5929 5929 5930 [[self _webView] _showDictionaryLookupPopup:[WebImmediateActionController _dictionaryPopupInfoForRange:*selectionRange inFrame:coreFrame withLookupOptions:nil indicatorOptions: TextIndicatorOptionIncludeSnapshotWithSelectionHighlight transition:TextIndicatorPresentationTransition::BounceAndCrossfade]];5930 [[self _webView] _showDictionaryLookupPopup:[WebImmediateActionController _dictionaryPopupInfoForRange:*selectionRange inFrame:coreFrame withLookupOptions:nil indicatorOptions:WebCore::TextIndicatorOptionIncludeSnapshotWithSelectionHighlight transition:WebCore::TextIndicatorPresentationTransition::BounceAndCrossfade]]; 5931 5931 } 5932 5932 5933 5933 - (void)quickLookWithEvent:(NSEvent *)event 5934 5934 { 5935 [[self _webView] _clearTextIndicatorWithAnimation: TextIndicatorWindowDismissalAnimation::FadeOut];5935 [[self _webView] _clearTextIndicatorWithAnimation:WebCore::TextIndicatorWindowDismissalAnimation::FadeOut]; 5936 5936 [super quickLookWithEvent:event]; 5937 5937 } … … 5957 5957 parameters->executingSavedKeypressCommands = true; 5958 5958 5959 const Vector< KeypressCommand>& commands = parameters->event->keypressCommands();5959 const Vector<WebCore::KeypressCommand>& commands = parameters->event->keypressCommands(); 5960 5960 5961 5961 for (size_t i = 0; i < commands.size(); ++i) { … … 5976 5976 #if PLATFORM(MAC) 5977 5977 5978 - (BOOL)_interpretKeyEvent:( KeyboardEvent*)event savingCommands:(BOOL)savingCommands5979 { 5980 ASSERT(core([self _frame]) == downcast< Node>(event->target())->document().frame());5978 - (BOOL)_interpretKeyEvent:(WebCore::KeyboardEvent*)event savingCommands:(BOOL)savingCommands 5979 { 5980 ASSERT(core([self _frame]) == downcast<WebCore::Node>(event->target())->document().frame()); 5981 5981 ASSERT(!savingCommands || event->keypressCommands().isEmpty()); // Save commands once for each event. 5982 5982 … … 6003 6003 parameters.event = event; 6004 6004 _private->interpretKeyEventsParameters = ¶meters; 6005 const Vector< KeypressCommand>& commands = event->keypressCommands();6005 const Vector<WebCore::KeypressCommand>& commands = event->keypressCommands(); 6006 6006 6007 6007 if (savingCommands) { … … 6027 6027 // If there are no text insertion commands, default keydown handler is the right time to execute the commands. 6028 6028 // Keypress (Char event) handler is the latest opportunity to execute. 6029 if (!haveTextInsertionCommands || platformEvent->type() == PlatformEvent::Char)6029 if (!haveTextInsertionCommands || platformEvent->type() == WebCore::PlatformEvent::Char) 6030 6030 [self _executeSavedKeypressCommands]; 6031 6031 } … … 6051 6051 #if PLATFORM(IOS_FAMILY) 6052 6052 6053 - (BOOL)_handleEditingKeyEvent:( KeyboardEvent *)wcEvent6053 - (BOOL)_handleEditingKeyEvent:(WebCore::KeyboardEvent *)wcEvent 6054 6054 { 6055 6055 // Use the isEditable state to determine whether or not to process tab key events. … … 6069 6069 return NO; 6070 6070 6071 bool isCharEvent = platformEvent->type() == PlatformKeyboardEvent::Char;6071 bool isCharEvent = platformEvent->type() == WebCore::PlatformKeyboardEvent::Char; 6072 6072 6073 6073 if (!isCharEvent && [webView._UIKitDelegateForwarder handleKeyTextCommandForCurrentEvent]) … … 6130 6130 { 6131 6131 WebFrame *webFrame = [self _frame]; 6132 Frame* coreFrame = core(webFrame);6132 auto* coreFrame = core(webFrame); 6133 6133 if (coreFrame && coreFrame->view()) 6134 6134 coreFrame->view()->updateLayoutAndStyleIfNeededRecursive(); … … 6393 6393 6394 6394 WebFrame *webFrame = [self _frame]; 6395 Frame* coreFrame = core(webFrame);6395 auto* coreFrame = core(webFrame); 6396 6396 if (!coreFrame) 6397 6397 return NSMakeRange(0, 0); … … 6411 6411 6412 6412 WebFrame *frame = [self _frame]; 6413 Frame* coreFrame = core(frame);6413 auto* coreFrame = core(frame); 6414 6414 if (!isTextInput(coreFrame) || isInPasswordField(coreFrame)) { 6415 6415 LOG(TextInput, "attributedSubstringFromRange:(%u, %u) -> nil", nsRange.location, nsRange.length); 6416 6416 return nil; 6417 6417 } 6418 RefPtr< Range> range = [frame _convertToDOMRange:nsRange];6418 RefPtr<WebCore::Range> range = [frame _convertToDOMRange:nsRange]; 6419 6419 if (!range) { 6420 6420 LOG(TextInput, "attributedSubstringFromRange:(%u, %u) -> nil", nsRange.location, nsRange.length); … … 6447 6447 - (BOOL)hasMarkedText 6448 6448 { 6449 Frame* coreFrame = core([self _frame]);6449 auto* coreFrame = core([self _frame]); 6450 6450 BOOL result = coreFrame && coreFrame->editor().hasComposition(); 6451 6451 … … 6476 6476 } 6477 6477 6478 if ( Frame* coreFrame = core([self _frame]))6478 if (auto* coreFrame = core([self _frame])) 6479 6479 coreFrame->editor().confirmComposition(); 6480 6480 } … … 6482 6482 #if PLATFORM(MAC) 6483 6483 6484 static void extractUnderlines(NSAttributedString *string, Vector< CompositionUnderline>& result)6484 static void extractUnderlines(NSAttributedString *string, Vector<WebCore::CompositionUnderline>& result) 6485 6485 { 6486 6486 int length = [[string string] length]; … … 6492 6492 6493 6493 if (NSNumber *style = [attrs objectForKey:NSUnderlineStyleAttributeName]) { 6494 Color color =Color::black;6495 CompositionUnderlineColor compositionUnderlineColor =CompositionUnderlineColor::TextColor;6494 WebCore::Color color = WebCore::Color::black; 6495 auto compositionUnderlineColor = WebCore::CompositionUnderlineColor::TextColor; 6496 6496 if (NSColor *colorAttr = [attrs objectForKey:NSUnderlineColorAttributeName]) { 6497 color = colorFromNSColor(colorAttr);6498 compositionUnderlineColor = CompositionUnderlineColor::GivenColor;6497 color = WebCore::colorFromNSColor(colorAttr); 6498 compositionUnderlineColor = WebCore::CompositionUnderlineColor::GivenColor; 6499 6499 } 6500 result.append( CompositionUnderline(range.location, NSMaxRange(range), compositionUnderlineColor, color, [style intValue] > 1));6500 result.append(WebCore::CompositionUnderline(range.location, NSMaxRange(range), compositionUnderlineColor, color, [style intValue] > 1)); 6501 6501 } 6502 6502 … … 6528 6528 } 6529 6529 6530 Frame* coreFrame = core([self _frame]);6530 auto* coreFrame = core([self _frame]); 6531 6531 if (!coreFrame) 6532 6532 return; … … 6535 6535 return; 6536 6536 6537 Vector< CompositionUnderline> underlines;6537 Vector<WebCore::CompositionUnderline> underlines; 6538 6538 NSString *text; 6539 6539 NSRange replacementRange = { NSNotFound, 0 }; … … 6553 6553 } else { 6554 6554 text = string; 6555 underlines.append( CompositionUnderline(0, [text length], CompositionUnderlineColor::TextColor,Color::black, false));6555 underlines.append(WebCore::CompositionUnderline(0, [text length], WebCore::CompositionUnderlineColor::TextColor, WebCore::Color::black, false)); 6556 6556 } 6557 6557 #else … … 6577 6577 parameters->consumedByIM = false; 6578 6578 6579 KeyboardEvent* event = parameters ? parameters->event : 0;6579 auto* event = parameters ? parameters->event : 0; 6580 6580 bool shouldSaveCommand = parameters && parameters->shouldSaveCommands; 6581 6581 6582 6582 // As in insertText:, we assume that the call comes from an input method if there is marked text. 6583 RefPtr< Frame> coreFrame = core([self _frame]);6583 RefPtr<WebCore::Frame> coreFrame = core([self _frame]); 6584 6584 bool isFromInputMethod = coreFrame && coreFrame->editor().hasComposition(); 6585 6585 6586 6586 if (event && shouldSaveCommand && !isFromInputMethod) 6587 event->keypressCommands().append( KeypressCommand(NSStringFromSelector(selector)));6587 event->keypressCommands().append(WebCore::KeypressCommand(NSStringFromSelector(selector))); 6588 6588 else { 6589 6589 // Make sure that only direct calls to doCommandBySelector: see the parameters by setting to 0. … … 6596 6596 eventWasHandled = true; 6597 6597 else { 6598 Editor::Command command = [self coreCommandBySelector:selector];6598 WebCore::Editor::Command command = [self coreCommandBySelector:selector]; 6599 6599 if (command.isSupported()) 6600 6600 eventWasHandled = command.execute(event); … … 6640 6640 parameters->consumedByIM = false; 6641 6641 6642 RefPtr< Frame> coreFrame = core([self _frame]);6642 RefPtr<WebCore::Frame> coreFrame = core([self _frame]); 6643 6643 NSString *text; 6644 6644 NSRange replacementRange = { NSNotFound, 0 }; … … 6648 6648 #endif 6649 6649 6650 Vector< DictationAlternative> dictationAlternativeLocations;6650 Vector<WebCore::DictationAlternative> dictationAlternativeLocations; 6651 6651 #if PLATFORM(MAC) 6652 6652 if (isAttributedString) { … … 6658 6658 #endif 6659 6659 #if USE(INSERTION_UNDO_GROUPING) 6660 registerUndoGroup = shouldRegisterInsertionUndoGroup(string);6660 registerUndoGroup = WebCore::shouldRegisterInsertionUndoGroup(string); 6661 6661 #endif 6662 6662 // FIXME: We ignore most attributes from the string, so for example inserting from Character Palette loses font and glyph variation data. … … 6673 6673 text = string; 6674 6674 6675 KeyboardEvent* event = parameters ? parameters->event : 0;6675 auto* event = parameters ? parameters->event : 0; 6676 6676 6677 6677 // insertText can be called for several reasons: … … 6683 6683 bool shouldSaveCommand = parameters && parameters->shouldSaveCommands; 6684 6684 if (event && shouldSaveCommand && !isFromInputMethod) { 6685 event->keypressCommands().append( KeypressCommand("insertText:", text));6685 event->keypressCommands().append(WebCore::KeypressCommand("insertText:", text)); 6686 6686 return; 6687 6687 } … … 6703 6703 WebRangeIsRelativeTo rangeIsRelativeTo = needToRemoveSoftSpace ? WebRangeIsRelativeTo::Paragraph : WebRangeIsRelativeTo::EditableRoot; 6704 6704 if (auto domRange = [[self _frame] _convertToDOMRange:replacementRange rangeIsRelativeTo:rangeIsRelativeTo]) { 6705 coreFrame->selection().setSelection( VisibleSelection(*domRange,SEL_DEFAULT_AFFINITY));6705 coreFrame->selection().setSelection(WebCore::VisibleSelection(*domRange, WebCore::SEL_DEFAULT_AFFINITY)); 6706 6706 replacesText = replacementRange.length; 6707 6707 } … … 6718 6718 eventHandled = coreFrame->editor().insertDictatedText(eventText, dictationAlternativeLocations, event); 6719 6719 else 6720 eventHandled = coreFrame->editor().insertText(eventText, event, replacesText ? TextEventInputAutocompletion :TextEventInputKeyboard);6720 eventHandled = coreFrame->editor().insertText(eventText, event, replacesText ? WebCore::TextEventInputAutocompletion : WebCore::TextEventInputKeyboard); 6721 6721 6722 6722 #if USE(INSERTION_UNDO_GROUPING) 6723 6723 if (registerUndoGroup) 6724 registerInsertionUndoGroupingWithUndoManager([[self _webView] undoManager]);6724 WebCore::registerInsertionUndoGroupingWithUndoManager([[self _webView] undoManager]); 6725 6725 #endif 6726 6726 } else { … … 6745 6745 } 6746 6746 6747 Frame* coreFrame = core([self _frame]);6747 auto* coreFrame = core([self _frame]); 6748 6748 if (!coreFrame) 6749 6749 return; … … 6768 6768 - (void)_updateSelectionForInputManager 6769 6769 { 6770 Frame* coreFrame = core([self _frame]);6770 auto* coreFrame = core([self _frame]); 6771 6771 if (!coreFrame) 6772 6772 return; … … 6825 6825 return nil; 6826 6826 6827 Vector< FloatRect> list;6828 if ( Frame* coreFrame = core([self _frame]))6827 Vector<WebCore::FloatRect> list; 6828 if (auto* coreFrame = core([self _frame])) 6829 6829 coreFrame->selection().getClippedVisibleTextRectangles(list); 6830 6830 … … 6846 6846 #if PLATFORM(IOS_FAMILY) 6847 6847 6848 static CGImageRef imageFromRect( Frame* frame, CGRect rect)6849 { 6850 Page* page = frame->page();6848 static CGImageRef imageFromRect(WebCore::Frame* frame, CGRect rect) 6849 { 6850 auto* page = frame->page(); 6851 6851 if (!page) 6852 6852 return nil; … … 6859 6859 WebHTMLView *view = (WebHTMLView *)documentView; 6860 6860 6861 OptionSet< PaintBehavior> oldPaintBehavior = frame->view()->paintBehavior();6862 frame->view()->setPaintBehavior(oldPaintBehavior | PaintBehavior::FlattenCompositingLayers |PaintBehavior::Snapshotting);6861 OptionSet<WebCore::PaintBehavior> oldPaintBehavior = frame->view()->paintBehavior(); 6862 frame->view()->setPaintBehavior(oldPaintBehavior | WebCore::PaintBehavior::FlattenCompositingLayers | WebCore::PaintBehavior::Snapshotting); 6863 6863 6864 6864 BEGIN_BLOCK_OBJC_EXCEPTIONS; … … 6881 6881 size_t bitsPerPixel = 4 * bitsPerComponent; 6882 6882 size_t bytesPerRow = ((bitsPerPixel + 7) / 8) * width; 6883 RetainPtr<CGContextRef> context = adoptCF(CGBitmapContextCreate(NULL, width, height, bitsPerComponent, bytesPerRow, sRGBColorSpaceRef(), kCGImageAlphaPremultipliedLast));6883 RetainPtr<CGContextRef> context = adoptCF(CGBitmapContextCreate(NULL, width, height, bitsPerComponent, bytesPerRow, WebCore::sRGBColorSpaceRef(), kCGImageAlphaPremultipliedLast)); 6884 6884 if (!context) 6885 6885 return nil; … … 6912 6912 } 6913 6913 6914 static CGImageRef selectionImage( Frame* frame, bool forceBlackText)6914 static CGImageRef selectionImage(WebCore::Frame* frame, bool forceBlackText) 6915 6915 { 6916 6916 ASSERT(!WebThreadIsEnabled() || WebThreadIsLocked()); 6917 frame->view()->setPaintBehavior( PaintBehavior::SelectionOnly | (forceBlackText ? OptionSet<PaintBehavior>(PaintBehavior::ForceBlackText) : OptionSet<PaintBehavior>()));6917 frame->view()->setPaintBehavior(WebCore::PaintBehavior::SelectionOnly | (forceBlackText ? OptionSet<WebCore::PaintBehavior>(WebCore::PaintBehavior::ForceBlackText) : OptionSet<WebCore::PaintBehavior>())); 6918 6918 frame->document()->updateLayout(); 6919 6919 CGImageRef result = imageFromRect(frame, frame->selection().selectionBounds()); 6920 frame->view()->setPaintBehavior( PaintBehavior::Normal);6920 frame->view()->setPaintBehavior(WebCore::PaintBehavior::Normal); 6921 6921 return result; 6922 6922 } … … 6933 6933 return nil; 6934 6934 6935 Frame* coreFrame = core([self _frame]);6935 auto* coreFrame = core([self _frame]); 6936 6936 if (!coreFrame) 6937 6937 return nil; 6938 6938 6939 Ref< Frame> protectedCoreFrame(*coreFrame);6939 Ref<WebCore::Frame> protectedCoreFrame(*coreFrame); 6940 6940 6941 6941 #if PLATFORM(IOS_FAMILY) 6942 6942 return selectionImage(coreFrame, forceBlackText); 6943 6943 #else 6944 TextIndicatorData textIndicator;6944 WebCore::TextIndicatorData textIndicator; 6945 6945 return createDragImageForSelection(*coreFrame, textIndicator, forceBlackText).autorelease(); 6946 6946 #endif … … 6975 6975 - (void)selectAll 6976 6976 { 6977 Frame* coreFrame = core([self _frame]);6977 auto* coreFrame = core([self _frame]); 6978 6978 if (coreFrame) 6979 6979 coreFrame->selection().selectAll(); … … 6982 6982 - (void)deselectAll 6983 6983 { 6984 Frame* coreFrame = core([self _frame]);6984 auto* coreFrame = core([self _frame]); 6985 6985 if (!coreFrame) 6986 6986 return; … … 7014 7014 { 7015 7015 return attributedStringBetweenStartAndEnd( 7016 Position { core(startContainer), startOffset,Position::PositionIsOffsetInAnchor },7017 Position { core(endContainer), endOffset,Position::PositionIsOffsetInAnchor });7016 WebCore::Position { core(startContainer), startOffset, WebCore::Position::PositionIsOffsetInAnchor }, 7017 WebCore::Position { core(endContainer), endOffset, WebCore::Position::PositionIsOffsetInAnchor }); 7018 7018 } 7019 7019 … … 7023 7023 NSAttributedString *attributedString = [self _attributedStringFromDOMRange:[document _documentRange]]; 7024 7024 if (!attributedString) { 7025 Document* coreDocument = core(document);7026 attributedString = editingAttributedStringFromRange( Range::create(*coreDocument, coreDocument, 0, coreDocument, coreDocument->countChildNodes()));7025 auto* coreDocument = core(document); 7026 attributedString = editingAttributedStringFromRange(WebCore::Range::create(*coreDocument, coreDocument, 0, coreDocument, coreDocument->countChildNodes())); 7027 7027 } 7028 7028 return attributedString; … … 7033 7033 NSAttributedString *attributedString = [self _attributedStringFromDOMRange:[self _selectedRange]]; 7034 7034 if (!attributedString) { 7035 Frame* coreFrame = core([self _frame]);7035 auto* coreFrame = core([self _frame]); 7036 7036 if (coreFrame) { 7037 RefPtr< Range> range = coreFrame->selection().selection().toNormalizedRange();7037 RefPtr<WebCore::Range> range = coreFrame->selection().selection().toNormalizedRange(); 7038 7038 if (range) 7039 7039 attributedString = editingAttributedStringFromRange(*range); … … 7073 7073 - (NSDictionary *)elementAtPoint:(NSPoint)point allowShadowContent:(BOOL)allow 7074 7074 { 7075 Frame* coreFrame = core([self _frame]);7075 auto* coreFrame = core([self _frame]); 7076 7076 if (!coreFrame) 7077 7077 return nil; 7078 HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active |HitTestRequest::AllowChildFrameContent7079 | (allow ? 0 : HitTestRequest::DisallowUserAgentShadowContent);7080 return [[[WebElementDictionary alloc] initWithHitTestResult:coreFrame->eventHandler().hitTestResultAtPoint( IntPoint(point), hitType)] autorelease];7078 WebCore::HitTestRequest::HitTestRequestType hitType = WebCore::HitTestRequest::ReadOnly | WebCore::HitTestRequest::Active | WebCore::HitTestRequest::AllowChildFrameContent 7079 | (allow ? 0 : WebCore::HitTestRequest::DisallowUserAgentShadowContent); 7080 return [[[WebElementDictionary alloc] initWithHitTestResult:coreFrame->eventHandler().hitTestResultAtPoint(WebCore::IntPoint(point), hitType)] autorelease]; 7081 7081 } 7082 7082 7083 7083 - (NSUInteger)countMatchesForText:(NSString *)string inDOMRange:(DOMRange *)range options:(WebFindOptions)options limit:(NSUInteger)limit markMatches:(BOOL)markMatches 7084 7084 { 7085 Frame* coreFrame = core([self _frame]);7085 auto* coreFrame = core([self _frame]); 7086 7086 if (!coreFrame) 7087 7087 return 0; … … 7092 7092 - (void)setMarkedTextMatchesAreHighlighted:(BOOL)newValue 7093 7093 { 7094 Frame* coreFrame = core([self _frame]);7094 auto* coreFrame = core([self _frame]); 7095 7095 if (!coreFrame) 7096 7096 return; … … 7100 7100 - (BOOL)markedTextMatchesAreHighlighted 7101 7101 { 7102 Frame* coreFrame = core([self _frame]);7102 auto* coreFrame = core([self _frame]); 7103 7103 return coreFrame && coreFrame->editor().markedTextMatchesAreHighlighted(); 7104 7104 } … … 7106 7106 - (void)unmarkAllTextMatches 7107 7107 { 7108 Frame* coreFrame = core([self _frame]);7108 auto* coreFrame = core([self _frame]); 7109 7109 if (!coreFrame) 7110 7110 return; 7111 Document* document = coreFrame->document();7111 auto* document = coreFrame->document(); 7112 7112 if (!document) 7113 7113 return; 7114 document->markers().removeMarkers( DocumentMarker::TextMatch);7114 document->markers().removeMarkers(WebCore::DocumentMarker::TextMatch); 7115 7115 } 7116 7116 7117 7117 - (NSArray *)rectsForTextMatches 7118 7118 { 7119 Frame* coreFrame = core([self _frame]);7119 auto* coreFrame = core([self _frame]); 7120 7120 if (!coreFrame) 7121 7121 return [NSArray array]; 7122 Document* document = coreFrame->document();7122 auto* document = coreFrame->document(); 7123 7123 if (!document) 7124 7124 return [NSArray array]; 7125 7125 7126 Vector< FloatRect> rects = document->markers().renderedRectsForMarkers(DocumentMarker::TextMatch);7126 Vector<WebCore::FloatRect> rects = document->markers().renderedRectsForMarkers(WebCore::DocumentMarker::TextMatch); 7127 7127 unsigned count = rects.size(); 7128 7128 NSMutableArray *result = [NSMutableArray arrayWithCapacity:count]; … … 7136 7136 if (![string length]) 7137 7137 return NO; 7138 Frame* coreFrame = core([self _frame]);7138 auto* coreFrame = core([self _frame]); 7139 7139 return coreFrame && coreFrame->editor().findString(string, coreOptions(options)); 7140 7140 } -
trunk/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm
r247416 r250549 73 73 @end 74 74 75 using namespace WebCore;76 77 75 @implementation WebImmediateActionController 78 76 … … 107 105 [_currentQLPreviewMenuItem close]; 108 106 [self _clearImmediateActionState]; 109 [_webView _clearTextIndicatorWithAnimation: TextIndicatorWindowDismissalAnimation::None];107 [_webView _clearTextIndicatorWithAnimation:WebCore::TextIndicatorWindowDismissalAnimation::None]; 110 108 } 111 109 … … 122 120 123 121 [self _clearImmediateActionState]; 124 [_webView _clearTextIndicatorWithAnimation: TextIndicatorWindowDismissalAnimation::FadeOut];122 [_webView _clearTextIndicatorWithAnimation:WebCore::TextIndicatorWindowDismissalAnimation::FadeOut]; 125 123 } 126 124 … … 146 144 - (void)performHitTestAtPoint:(NSPoint)viewPoint 147 145 { 148 Frame* coreFrame = core([_webView _selectedOrMainFrame]);146 WebCore::Frame* coreFrame = core([_webView _selectedOrMainFrame]); 149 147 if (!coreFrame) 150 148 return; 151 149 152 _hitTestResult = coreFrame->eventHandler().hitTestResultAtPoint( IntPoint(viewPoint), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::DisallowUserAgentShadowContent |HitTestRequest::AllowChildFrameContent);153 coreFrame->mainFrame().eventHandler().setImmediateActionStage( ImmediateActionStage::PerformedHitTest);154 155 if ( Element* element = _hitTestResult.targetElement())150 _hitTestResult = coreFrame->eventHandler().hitTestResultAtPoint(WebCore::IntPoint(viewPoint), WebCore::HitTestRequest::ReadOnly | WebCore::HitTestRequest::Active | WebCore::HitTestRequest::DisallowUserAgentShadowContent | WebCore::HitTestRequest::AllowChildFrameContent); 151 coreFrame->mainFrame().eventHandler().setImmediateActionStage(WebCore::ImmediateActionStage::PerformedHitTest); 152 153 if (auto* element = _hitTestResult.targetElement()) 156 154 _contentPreventsDefault = element->dispatchMouseForceWillBegin(); 157 155 } … … 207 205 return; 208 206 209 if ( Frame* coreFrame = [_webView _mainCoreFrame])210 coreFrame->eventHandler().setImmediateActionStage( ImmediateActionStage::ActionUpdated);207 if (WebCore::Frame* coreFrame = [_webView _mainCoreFrame]) 208 coreFrame->eventHandler().setImmediateActionStage(WebCore::ImmediateActionStage::ActionUpdated); 211 209 212 210 if (_contentPreventsDefault) … … 221 219 return; 222 220 223 if ( Frame* coreFrame = [_webView _mainCoreFrame]) {224 ImmediateActionStage lastStage = coreFrame->eventHandler().immediateActionStage();225 if (lastStage == ImmediateActionStage::ActionUpdated)226 coreFrame->eventHandler().setImmediateActionStage( ImmediateActionStage::ActionCancelledAfterUpdate);221 if (WebCore::Frame* coreFrame = [_webView _mainCoreFrame]) { 222 WebCore::ImmediateActionStage lastStage = coreFrame->eventHandler().immediateActionStage(); 223 if (lastStage == WebCore::ImmediateActionStage::ActionUpdated) 224 coreFrame->eventHandler().setImmediateActionStage(WebCore::ImmediateActionStage::ActionCancelledAfterUpdate); 227 225 else 228 coreFrame->eventHandler().setImmediateActionStage( ImmediateActionStage::ActionCancelledWithoutUpdate);226 coreFrame->eventHandler().setImmediateActionStage(WebCore::ImmediateActionStage::ActionCancelledWithoutUpdate); 229 227 } 230 228 231 229 [_webView _setTextIndicatorAnimationProgress:0]; 232 230 [self _clearImmediateActionState]; 233 [_webView _clearTextIndicatorWithAnimation: TextIndicatorWindowDismissalAnimation::None];231 [_webView _clearTextIndicatorWithAnimation:WebCore::TextIndicatorWindowDismissalAnimation::None]; 234 232 [_webView _setMaintainsInactiveSelection:NO]; 235 233 } … … 240 238 return; 241 239 242 if ( Frame* coreFrame = [_webView _mainCoreFrame])243 coreFrame->eventHandler().setImmediateActionStage( ImmediateActionStage::ActionCompleted);240 if (WebCore::Frame* coreFrame = [_webView _mainCoreFrame]) 241 coreFrame->eventHandler().setImmediateActionStage(WebCore::ImmediateActionStage::ActionCompleted); 244 242 245 243 [_webView _setTextIndicatorAnimationProgress:1]; … … 270 268 _type = WebImmediateActionLinkPreview; 271 269 272 RefPtr< Range> linkRange = rangeOfContents(*_hitTestResult.URLElement());273 auto indicator = TextIndicator::createWithRange(*linkRange, TextIndicatorOptionUseBoundingRectAndPaintAllContentForComplexRanges,TextIndicatorPresentationTransition::FadeIn);270 RefPtr<WebCore::Range> linkRange = rangeOfContents(*_hitTestResult.URLElement()); 271 auto indicator = WebCore::TextIndicator::createWithRange(*linkRange, WebCore::TextIndicatorOptionUseBoundingRectAndPaintAllContentForComplexRanges, WebCore::TextIndicatorPresentationTransition::FadeIn); 274 272 if (indicator) 275 [_webView _setTextIndicator:*indicator withLifetime: TextIndicatorWindowLifetime::Permanent];273 [_webView _setTextIndicator:*indicator withLifetime:WebCore::TextIndicatorWindowLifetime::Permanent]; 276 274 277 275 QLPreviewMenuItem *item = [NSMenuItem standardQuickLookMenuItem]; … … 283 281 } 284 282 285 Node* node = _hitTestResult.innerNode();283 WebCore::Node* node = _hitTestResult.innerNode(); 286 284 if ((node && node->isTextNode()) || _hitTestResult.isOverTextInsideFormControlElement()) { 287 285 if (auto animationController = [self _animationControllerForDataDetectedText]) { … … 324 322 #if PLATFORM(MAC) 325 323 // FIXME: We should not permanently disable this for iTunes. rdar://problem/19461358 326 if ( MacApplication::isITunes()) {324 if (WebCore::MacApplication::isITunes()) { 327 325 [self _cancelImmediateAction]; 328 326 return; … … 359 357 { 360 358 [self _clearImmediateActionState]; 361 [_webView _clearTextIndicatorWithAnimation: TextIndicatorWindowDismissalAnimation::FadeOut];362 } 363 364 static IntRect elementBoundingBoxInWindowCoordinatesFromNode(Node* node)359 [_webView _clearTextIndicatorWithAnimation:WebCore::TextIndicatorWindowDismissalAnimation::FadeOut]; 360 } 361 362 static WebCore::IntRect elementBoundingBoxInWindowCoordinatesFromNode(WebCore::Node* node) 365 363 { 366 364 if (!node) 367 return IntRect();368 369 Frame* frame = node->document().frame();365 return { }; 366 367 WebCore::Frame* frame = node->document().frame(); 370 368 if (!frame) 371 return IntRect();372 373 FrameView* view = frame->view();369 return { }; 370 371 WebCore::FrameView* view = frame->view(); 374 372 if (!view) 375 return IntRect();376 377 RenderObject* renderer = node->renderer();373 return { }; 374 375 WebCore::RenderObject* renderer = node->renderer(); 378 376 if (!renderer) 379 return IntRect();377 return { }; 380 378 381 379 return view->contentsToWindow(renderer->absoluteBoundingBoxRect()); … … 387 385 return NSZeroRect; 388 386 389 Node* node = _hitTestResult.innerNode();387 WebCore::Node* node = _hitTestResult.innerNode(); 390 388 if (!node) 391 389 return NSZeroRect; … … 400 398 401 399 NSSize screenSize = _webView.window.screen.frame.size; 402 FloatRect largestRect =largestRectWithAspectRatioInsideRect(screenSize.width / screenSize.height, _webView.bounds);400 WebCore::FloatRect largestRect = WebCore::largestRectWithAspectRatioInsideRect(screenSize.width / screenSize.height, _webView.bounds); 403 401 return NSMakeSize(largestRect.width() * 0.75, largestRect.height() * 0.75); 404 402 } … … 411 409 return nil; 412 410 413 RefPtr< Range> detectedDataRange;414 FloatRect detectedDataBoundingBox;411 RefPtr<WebCore::Range> detectedDataRange; 412 WebCore::FloatRect detectedDataBoundingBox; 415 413 RetainPtr<DDActionContext> actionContext; 416 414 … … 427 425 // If the client didn't give us an action context, try to scan around the hit point. 428 426 if (!actionContext || !detectedDataRange) 429 actionContext = DataDetection::detectItemAroundHitTestResult(_hitTestResult, detectedDataBoundingBox, detectedDataRange);427 actionContext = WebCore::DataDetection::detectItemAroundHitTestResult(_hitTestResult, detectedDataBoundingBox, detectedDataRange); 430 428 431 429 if (!actionContext || !detectedDataRange) … … 437 435 return nil; 438 436 439 auto indicator = TextIndicator::createWithRange(*detectedDataRange, TextIndicatorOptionDefault,TextIndicatorPresentationTransition::FadeIn);437 auto indicator = WebCore::TextIndicator::createWithRange(*detectedDataRange, WebCore::TextIndicatorOptionDefault, WebCore::TextIndicatorPresentationTransition::FadeIn); 440 438 441 439 _currentActionContext = [actionContext contextForView:_webView altMode:YES interactionStartedHandler:^() { 442 440 } interactionChangedHandler:^() { 443 441 if (indicator) 444 [_webView _setTextIndicator:*indicator withLifetime: TextIndicatorWindowLifetime::Permanent];442 [_webView _setTextIndicator:*indicator withLifetime:WebCore::TextIndicatorWindowLifetime::Permanent]; 445 443 } interactionStoppedHandler:^() { 446 [_webView _clearTextIndicatorWithAnimation: TextIndicatorWindowDismissalAnimation::FadeOut];444 [_webView _clearTextIndicatorWithAnimation:WebCore::TextIndicatorWindowDismissalAnimation::FadeOut]; 447 445 }]; 448 446 … … 469 467 [actionContext setImmediate:YES]; 470 468 471 RefPtr< Range> linkRange = rangeOfContents(*_hitTestResult.URLElement());469 RefPtr<WebCore::Range> linkRange = rangeOfContents(*_hitTestResult.URLElement()); 472 470 if (!linkRange) 473 471 return nullptr; 474 auto indicator = TextIndicator::createWithRange(*linkRange, TextIndicatorOptionDefault,TextIndicatorPresentationTransition::FadeIn);472 auto indicator = WebCore::TextIndicator::createWithRange(*linkRange, WebCore::TextIndicatorOptionDefault, WebCore::TextIndicatorPresentationTransition::FadeIn); 475 473 476 474 _currentActionContext = [actionContext contextForView:_webView altMode:YES interactionStartedHandler:^() { 477 475 } interactionChangedHandler:^() { 478 476 if (indicator) 479 [_webView _setTextIndicator:*indicator withLifetime: TextIndicatorWindowLifetime::Permanent];477 [_webView _setTextIndicator:*indicator withLifetime:WebCore::TextIndicatorWindowLifetime::Permanent]; 480 478 } interactionStoppedHandler:^() { 481 [_webView _clearTextIndicatorWithAnimation: TextIndicatorWindowDismissalAnimation::FadeOut];479 [_webView _clearTextIndicatorWithAnimation:WebCore::TextIndicatorWindowDismissalAnimation::FadeOut]; 482 480 }]; 483 481 … … 493 491 #pragma mark Text action 494 492 495 + ( DictionaryPopupInfo)_dictionaryPopupInfoForRange:(Range&)range inFrame:(Frame*)frame withLookupOptions:(NSDictionary *)lookupOptions indicatorOptions:(TextIndicatorOptions)indicatorOptions transition:(TextIndicatorPresentationTransition)presentationTransition496 { 497 Editor& editor = frame->editor();493 + (WebCore::DictionaryPopupInfo)_dictionaryPopupInfoForRange:(WebCore::Range&)range inFrame:(WebCore::Frame*)frame withLookupOptions:(NSDictionary *)lookupOptions indicatorOptions:(WebCore::TextIndicatorOptions)indicatorOptions transition:(WebCore::TextIndicatorPresentationTransition)presentationTransition 494 { 495 WebCore::Editor& editor = frame->editor(); 498 496 editor.setIsGettingDictionaryPopupInfo(true); 499 497 500 498 // Dictionary API will accept a whitespace-only string and display UI as if it were real text, 501 499 // so bail out early to avoid that. 502 DictionaryPopupInfo popupInfo;500 WebCore::DictionaryPopupInfo popupInfo; 503 501 if (range.text().stripWhiteSpace().isEmpty()) { 504 502 editor.setIsGettingDictionaryPopupInfo(false); … … 506 504 } 507 505 508 const RenderStyle* style = range.startContainer().renderStyle();506 const WebCore::RenderStyle* style = range.startContainer().renderStyle(); 509 507 float scaledDescent = style ? style->fontMetrics().descent() * frame->page()->pageScaleFactor() : 0; 510 508 511 Vector< FloatQuad> quads;509 Vector<WebCore::FloatQuad> quads; 512 510 range.absoluteTextQuads(quads); 513 511 if (quads.isEmpty()) { … … 516 514 } 517 515 518 IntRect rangeRect = frame->view()->contentsToWindow(quads[0].enclosingBoundingBox());516 WebCore::IntRect rangeRect = frame->view()->contentsToWindow(quads[0].enclosingBoundingBox()); 519 517 520 518 popupInfo.origin = NSMakePoint(rangeRect.x(), rangeRect.y() + scaledDescent); 521 519 popupInfo.options = lookupOptions; 522 520 523 NSAttributedString *nsAttributedString = editingAttributedStringFromRange(range, IncludeImagesInAttributedString::No);521 NSAttributedString *nsAttributedString = editingAttributedStringFromRange(range, WebCore::IncludeImagesInAttributedString::No); 524 522 RetainPtr<NSMutableAttributedString> scaledNSAttributedString = adoptNS([[NSMutableAttributedString alloc] initWithString:[nsAttributedString string]]); 525 523 NSFontManager *fontManager = [NSFontManager sharedFontManager]; … … 539 537 popupInfo.attributedString = scaledNSAttributedString.get(); 540 538 541 if (auto textIndicator = TextIndicator::createWithRange(range, indicatorOptions, presentationTransition))539 if (auto textIndicator = WebCore::TextIndicator::createWithRange(range, indicatorOptions, presentationTransition)) 542 540 popupInfo.textIndicator = textIndicator->data(); 543 541 … … 551 549 return nil; 552 550 553 Node* node = _hitTestResult.innerNode();551 WebCore::Node* node = _hitTestResult.innerNode(); 554 552 if (!node) 555 553 return nil; 556 554 557 Frame* frame = node->document().frame();555 WebCore::Frame* frame = node->document().frame(); 558 556 if (!frame) 559 557 return nil; 560 558 561 auto [dictionaryRange, options] = DictionaryLookup::rangeAtHitTestResult(_hitTestResult);559 auto [dictionaryRange, options] = WebCore::DictionaryLookup::rangeAtHitTestResult(_hitTestResult); 562 560 if (!dictionaryRange) 563 561 return nil; 564 562 565 auto dictionaryPopupInfo = [WebImmediateActionController _dictionaryPopupInfoForRange:*dictionaryRange inFrame:frame withLookupOptions:options indicatorOptions: TextIndicatorOptionDefault transition:TextIndicatorPresentationTransition::FadeIn];563 auto dictionaryPopupInfo = [WebImmediateActionController _dictionaryPopupInfoForRange:*dictionaryRange inFrame:frame withLookupOptions:options indicatorOptions:WebCore::TextIndicatorOptionDefault transition: WebCore::TextIndicatorPresentationTransition::FadeIn]; 566 564 if (!dictionaryPopupInfo.attributedString) 567 565 return nil; -
trunk/Source/WebKitLegacy/mac/WebView/WebPDFView.mm
r246103 r250549 72 72 } 73 73 74 using namespace WebCore;75 76 74 // Redeclarations of PDFKit notifications. We can't use the API since we use a weak link to the framework. 77 75 #define _webkit_PDFViewDisplayModeChangedNotification @"PDFViewDisplayModeChanged" … … 650 648 { 651 649 BOOL inRange = NO; 652 for ( HTMLFrameOwnerElement* ownerElement = core(frame)->ownerElement(); ownerElement; ownerElement = ownerElement->document().frame()->ownerElement()) {650 for (auto* ownerElement = core(frame)->ownerElement(); ownerElement; ownerElement = ownerElement->document().frame()->ownerElement()) { 653 651 if (&ownerElement->document() == &core(range)->ownerDocument()) { 654 652 inRange = [range intersectsNode:kit(ownerElement)]; … … 928 926 - (NSArray *)pasteboardTypesForSelection 929 927 { 930 return [NSArray arrayWithObjects: legacyRTFDPasteboardType(), legacyRTFPasteboardType(),legacyStringPasteboardType(), nil];928 return [NSArray arrayWithObjects:WebCore::legacyRTFDPasteboardType(), WebCore::legacyRTFPasteboardType(), WebCore::legacyStringPasteboardType(), nil]; 931 929 } 932 930 … … 935 933 NSAttributedString *attributedString = [self selectedAttributedString]; 936 934 937 if ([types containsObject: legacyRTFDPasteboardType()]) {935 if ([types containsObject:WebCore::legacyRTFDPasteboardType()]) { 938 936 NSData *RTFDData = [attributedString RTFDFromRange:NSMakeRange(0, [attributedString length]) documentAttributes:@{ }]; 939 [pasteboard setData:RTFDData forType: legacyRTFDPasteboardType()];937 [pasteboard setData:RTFDData forType:WebCore::legacyRTFDPasteboardType()]; 940 938 } 941 939 942 if ([types containsObject: legacyRTFPasteboardType()]) {940 if ([types containsObject:WebCore::legacyRTFPasteboardType()]) { 943 941 if ([attributedString containsAttachments]) 944 attributedString = attributedStringByStrippingAttachmentCharacters(attributedString);942 attributedString = WebCore::attributedStringByStrippingAttachmentCharacters(attributedString); 945 943 946 944 NSData *RTFData = [attributedString RTFFromRange:NSMakeRange(0, [attributedString length]) documentAttributes:@{ }]; 947 [pasteboard setData:RTFData forType: legacyRTFPasteboardType()];948 } 949 950 if ([types containsObject: legacyStringPasteboardType()])951 [pasteboard setString:[self selectedString] forType: legacyStringPasteboardType()];945 [pasteboard setData:RTFData forType:WebCore::legacyRTFPasteboardType()]; 946 } 947 948 if ([types containsObject:WebCore::legacyStringPasteboardType()]) 949 [pasteboard setString:[self selectedString] forType:WebCore::legacyStringPasteboardType()]; 952 950 } 953 951 … … 963 961 const int noButton = -2; 964 962 int button = noButton; 965 RefPtr< Event> event;963 RefPtr<WebCore::Event> event; 966 964 switch ([nsEvent type]) { 967 965 case NSEventTypeLeftMouseUp: … … 975 973 break; 976 974 case NSEventTypeKeyDown: { 977 PlatformKeyboardEvent pe =PlatformEventFactory::createPlatformKeyboardEvent(nsEvent);978 pe.disambiguateKeyDownEvent( PlatformEvent::RawKeyDown);979 event = KeyboardEvent::create(pe, nullptr);975 auto pe = WebCore::PlatformEventFactory::createPlatformKeyboardEvent(nsEvent); 976 pe.disambiguateKeyDownEvent(WebCore::PlatformEvent::RawKeyDown); 977 event = WebCore::KeyboardEvent::create(pe, nullptr); 980 978 break; 981 979 } … … 985 983 if (button != noButton) { 986 984 // FIXME: Use createPlatformMouseEvent instead. 987 event = MouseEvent::create(eventNames().clickEvent, Event::CanBubble::Yes, Event::IsCancelable::Yes,Event::IsComposed::Yes,988 MonotonicTime::now(), nullptr, [nsEvent clickCount], { }, { }, { }, modifiersForEvent(nsEvent),989 button, [NSEvent pressedMouseButtons], nullptr, WebCore::ForceAtClick, 0, nullptr, MouseEvent::IsSimulated::Yes);985 event = WebCore::MouseEvent::create(WebCore::eventNames().clickEvent, WebCore::Event::CanBubble::Yes, WebCore::Event::IsCancelable::Yes, WebCore::Event::IsComposed::Yes, 986 MonotonicTime::now(), nullptr, [nsEvent clickCount], { }, { }, { }, WebCore::modifiersForEvent(nsEvent), 987 button, [NSEvent pressedMouseButtons], nullptr, WebCore::ForceAtClick, 0, nullptr, WebCore::MouseEvent::IsSimulated::Yes); 990 988 } 991 989 992 990 // Call to the frame loader because this is where our security checks are made. 993 Frame* frame = core([dataSource webFrame]);994 FrameLoadRequest frameLoadRequest { *frame->document(), frame->document()->securityOrigin(), { URL }, { }, LockHistory::No, LockBackForwardList::No, NeverSendReferrer, AllowNavigationToInvalidURL::Yes, NewFrameOpenerPolicy::Allow, ShouldOpenExternalURLsPolicy::ShouldNotAllow,InitiatedByMainFrame::Unknown };991 auto* frame = core([dataSource webFrame]); 992 WebCore::FrameLoadRequest frameLoadRequest { *frame->document(), frame->document()->securityOrigin(), { URL }, { }, WebCore::LockHistory::No, WebCore::LockBackForwardList::No, WebCore::NeverSendReferrer, WebCore::AllowNavigationToInvalidURL::Yes, WebCore::NewFrameOpenerPolicy::Allow, WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow, WebCore::InitiatedByMainFrame::Unknown }; 995 993 frame->loader().loadFrameRequest(WTFMove(frameLoadRequest), event.get(), nullptr); 996 994 } -
trunk/Source/WebKitLegacy/mac/WebView/WebScriptDebugDelegate.mm
r228218 r250549 44 44 #import <WebCore/runtime_root.h> 45 45 46 using namespace JSC;47 using namespace WebCore;48 49 46 // FIXME: these error strings should be public for future use by WebScriptObject and in WebScriptObject.h 50 47 NSString * const WebScriptErrorDomain = @"WebScriptErrorDomain"; … … 52 49 NSString * const WebScriptErrorLineNumberKey = @"WebScriptErrorLineNumber"; 53 50 54 @interface WebScriptCallFrame (WebScriptDebugDelegateInternal )51 @interface WebScriptCallFrame (WebScriptDebugDelegateInternalForDelegate) 55 52 56 53 - (id)_convertValueToObjcValue:(JSC::JSValue)value; … … 104 101 return globalObject; 105 102 106 Bindings::RootObject* root1 = [globalObject _originRootObject];103 JSC::Bindings::RootObject* root1 = [globalObject _originRootObject]; 107 104 if (!root1) 108 105 return nil; 109 106 110 Bindings::RootObject* root2 = [globalObject _rootObject];107 JSC::Bindings::RootObject* root2 = [globalObject _rootObject]; 111 108 if (!root2) 112 109 return nil; -
trunk/Source/WebKitLegacy/mac/WebView/WebScriptDebugger.mm
r238771 r250549 43 43 #import <wtf/URL.h> 44 44 45 using namespace JSC; 46 using namespace WebCore; 47 48 @interface WebScriptCallFrame (WebScriptDebugDelegateInternal) 45 @interface WebScriptCallFrame (WebScriptDebugDelegateInternalForDebugger) 49 46 - (WebScriptCallFrame *)_initWithGlobalObject:(WebScriptObject *)globalObj functionName:(String)functionName exceptionValue:(JSC::JSValue)exceptionValue; 50 47 @end 51 48 52 static NSString *toNSString( SourceProvider* sourceProvider)49 static NSString *toNSString(JSC::SourceProvider* sourceProvider) 53 50 { 54 51 const String& sourceString = sourceProvider->source().toString(); … … 66 63 } 67 64 68 static WebFrame *toWebFrame(JS GlobalObject* globalObject)65 static WebFrame *toWebFrame(JSC::JSGlobalObject* globalObject) 69 66 { 70 JSDOMWindow* window = static_cast<JSDOMWindow*>(globalObject);67 WebCore::JSDOMWindow* window = static_cast<WebCore::JSDOMWindow*>(globalObject); 71 68 return kit(window->wrapped().frame()); 72 69 } 73 70 74 WebScriptDebugger::WebScriptDebugger(JS GlobalObject* globalObject)71 WebScriptDebugger::WebScriptDebugger(JSC::JSGlobalObject* globalObject) 75 72 : Debugger(globalObject->vm()) 76 73 , m_callingDelegate(false) … … 83 80 84 81 // callbacks - relay to delegate 85 void WebScriptDebugger::sourceParsed( ExecState* exec,SourceProvider* sourceProvider, int errorLine, const String& errorMsg)82 void WebScriptDebugger::sourceParsed(JSC::ExecState* exec, JSC::SourceProvider* sourceProvider, int errorLine, const String& errorMsg) 86 83 { 87 84 if (m_callingDelegate) … … 94 91 int firstLine = sourceProvider->startPosition().m_line.oneBasedInt(); 95 92 96 VM& vm = exec->vm();93 JSC::VM& vm = exec->vm(); 97 94 WebFrame *webFrame = toWebFrame(vm.vmEntryGlobalObject(exec)); 98 95 WebView *webView = [webFrame webView]; … … 121 118 } 122 119 123 void WebScriptDebugger::handlePause(JS GlobalObject* globalObject, Debugger::ReasonForPause reason)120 void WebScriptDebugger::handlePause(JSC::JSGlobalObject* globalObject, Debugger::ReasonForPause reason) 124 121 { 125 122 if (m_callingDelegate) … … 133 130 WebFrame *webFrame = toWebFrame(globalObject); 134 131 WebView *webView = [webFrame webView]; 135 DebuggerCallFrame& debuggerCallFrame = currentDebuggerCallFrame();136 JS Value exceptionValue = currentException();132 JSC::DebuggerCallFrame& debuggerCallFrame = currentDebuggerCallFrame(); 133 JSC::JSValue exceptionValue = currentException(); 137 134 String functionName = debuggerCallFrame.functionName(); 138 135 RetainPtr<WebScriptCallFrame> webCallFrame = adoptNS([[WebScriptCallFrame alloc] _initWithGlobalObject:core(webFrame)->script().windowScriptObject() functionName:functionName exceptionValue:exceptionValue]); -
trunk/Source/WebKitLegacy/mac/WebView/WebScriptWorld.mm
r228260 r250549 30 30 #import <JavaScriptCore/APICast.h> 31 31 #import <JavaScriptCore/JSContextInternal.h> 32 33 32 #import <wtf/RefPtr.h> 34 35 using namespace WebCore;36 33 37 34 @interface WebScriptWorldPrivate : NSObject { 38 35 @public 39 RefPtr< DOMWrapperWorld> world;36 RefPtr<WebCore::DOMWrapperWorld> world; 40 37 } 41 38 @end … … 44 41 @end 45 42 46 typedef HashMap< DOMWrapperWorld*, WebScriptWorld*> WorldMap;43 typedef HashMap<WebCore::DOMWrapperWorld*, WebScriptWorld*> WorldMap; 47 44 static WorldMap& allWorlds() 48 45 { … … 53 50 @implementation WebScriptWorld 54 51 55 - (id)initWithWorld:(Ref< DOMWrapperWorld>&&)world52 - (id)initWithWorld:(Ref<WebCore::DOMWrapperWorld>&&)world 56 53 { 57 54 self = [super init]; … … 70 67 - (id)init 71 68 { 72 return [self initWithWorld: ScriptController::createWorld()];69 return [self initWithWorld:WebCore::ScriptController::createWorld()]; 73 70 } 74 71 … … 90 87 + (WebScriptWorld *)standardWorld 91 88 { 92 static WebScriptWorld *world = [[WebScriptWorld alloc] initWithWorld: mainThreadNormalWorld()];89 static WebScriptWorld *world = [[WebScriptWorld alloc] initWithWorld:WebCore::mainThreadNormalWorld()]; 93 90 return world; 94 91 } … … 101 98 + (WebScriptWorld *)scriptWorldForGlobalContext:(JSGlobalContextRef)context 102 99 { 103 return [self findOrCreateWorld: currentWorld(*toJS(context))];100 return [self findOrCreateWorld:WebCore::currentWorld(*toJS(context))]; 104 101 } 105 102 … … 115 112 @implementation WebScriptWorld (WebInternal) 116 113 117 DOMWrapperWorld* core(WebScriptWorld *world)114 WebCore::DOMWrapperWorld* core(WebScriptWorld *world) 118 115 { 119 116 return world ? world->_private->world.get() : 0; 120 117 } 121 118 122 + (WebScriptWorld *)findOrCreateWorld:( DOMWrapperWorld&)world119 + (WebScriptWorld *)findOrCreateWorld:(WebCore::DOMWrapperWorld&)world 123 120 { 124 if (&world == & mainThreadNormalWorld())121 if (&world == &WebCore::mainThreadNormalWorld()) 125 122 return [self standardWorld]; 126 123 -
trunk/Source/WebKitLegacy/mac/WebView/WebView.mm
r250333 r250549 371 371 #endif 372 372 373 using namespace JSC;374 using namespace Inspector;375 using namespace WebCore;376 377 373 #define FOR_EACH_RESPONDER_SELECTOR(macro) \ 378 374 macro(alignCenter) \ … … 569 565 @end 570 566 571 FindOptions coreOptions(WebFindOptions options)572 { 573 FindOptions findOptions;567 WebCore::FindOptions coreOptions(WebFindOptions options) 568 { 569 WebCore::FindOptions findOptions; 574 570 if (options & WebFindOptionsCaseInsensitive) 575 findOptions.add( CaseInsensitive);571 findOptions.add(WebCore::CaseInsensitive); 576 572 if (options & WebFindOptionsAtWordStarts) 577 findOptions.add( AtWordStarts);573 findOptions.add(WebCore::AtWordStarts); 578 574 if (options & WebFindOptionsTreatMedialCapitalAsWordStart) 579 findOptions.add( TreatMedialCapitalAsWordStart);575 findOptions.add(WebCore::TreatMedialCapitalAsWordStart); 580 576 if (options & WebFindOptionsBackwards) 581 findOptions.add( Backwards);577 findOptions.add(WebCore::Backwards); 582 578 if (options & WebFindOptionsWrapAround) 583 findOptions.add(W rapAround);579 findOptions.add(WebCore::WrapAround); 584 580 if (options & WebFindOptionsStartInSelection) 585 findOptions.add( StartInSelection);581 findOptions.add(WebCore::StartInSelection); 586 582 return findOptions; 587 583 } … … 591 587 OptionSet<WebCore::LayoutMilestone> layoutMilestone; 592 588 if (milestones & WebDidFirstLayout) 593 layoutMilestone.add( DidFirstLayout);589 layoutMilestone.add(WebCore::DidFirstLayout); 594 590 if (milestones & WebDidFirstVisuallyNonEmptyLayout) 595 layoutMilestone.add( DidFirstVisuallyNonEmptyLayout);591 layoutMilestone.add(WebCore::DidFirstVisuallyNonEmptyLayout); 596 592 if (milestones & WebDidHitRelevantRepaintedObjectsAreaThreshold) 597 layoutMilestone.add( DidHitRelevantRepaintedObjectsAreaThreshold);593 layoutMilestone.add(WebCore::DidHitRelevantRepaintedObjectsAreaThreshold); 598 594 return layoutMilestone; 599 595 } … … 601 597 WebLayoutMilestones kitLayoutMilestones(OptionSet<WebCore::LayoutMilestone> milestones) 602 598 { 603 return (milestones & DidFirstLayout ? WebDidFirstLayout : 0)604 | (milestones & DidFirstVisuallyNonEmptyLayout ? WebDidFirstVisuallyNonEmptyLayout : 0)605 | (milestones & DidHitRelevantRepaintedObjectsAreaThreshold ? WebDidHitRelevantRepaintedObjectsAreaThreshold : 0);606 } 607 608 static WebPageVisibilityState kit( VisibilityState visibilityState)599 return (milestones & WebCore::DidFirstLayout ? WebDidFirstLayout : 0) 600 | (milestones & WebCore::DidFirstVisuallyNonEmptyLayout ? WebDidFirstVisuallyNonEmptyLayout : 0) 601 | (milestones & WebCore::DidHitRelevantRepaintedObjectsAreaThreshold ? WebDidHitRelevantRepaintedObjectsAreaThreshold : 0); 602 } 603 604 static WebPageVisibilityState kit(WebCore::VisibilityState visibilityState) 609 605 { 610 606 switch (visibilityState) { 611 case VisibilityState::Visible:607 case WebCore::VisibilityState::Visible: 612 608 return WebPageVisibilityStateVisible; 613 case VisibilityState::Hidden:609 case WebCore::VisibilityState::Hidden: 614 610 return WebPageVisibilityStateHidden; 615 case VisibilityState::Prerender:611 case WebCore::VisibilityState::Prerender: 616 612 return WebPageVisibilityStatePrerender; 617 613 } … … 625 621 class DeferredPageDestructor { 626 622 public: 627 static void createDeferredPageDestructor(std::unique_ptr< Page> page)623 static void createDeferredPageDestructor(std::unique_ptr<WebCore::Page> page) 628 624 { 629 625 new DeferredPageDestructor(WTFMove(page)); … … 631 627 632 628 private: 633 DeferredPageDestructor(std::unique_ptr< Page> page)629 DeferredPageDestructor(std::unique_ptr<WebCore::Page> page) 634 630 : m_page(WTFMove(page)) 635 631 { … … 648 644 } 649 645 650 std::unique_ptr< Page> m_page;646 std::unique_ptr<WebCore::Page> m_page; 651 647 }; 652 648 … … 683 679 @implementation WebUITextIndicatorData (WebUITextIndicatorInternal) 684 680 685 - (WebUITextIndicatorData *)initWithImage:(CGImageRef)image textIndicatorData:(const TextIndicatorData&)indicatorData scale:(CGFloat)scale681 - (WebUITextIndicatorData *)initWithImage:(CGImageRef)image textIndicatorData:(const WebCore::TextIndicatorData&)indicatorData scale:(CGFloat)scale 686 682 { 687 683 if (!(self = [super init])) … … 710 706 } 711 707 712 if (indicatorData.options & TextIndicatorOptionComputeEstimatedBackgroundColor)708 if (indicatorData.options & WebCore::TextIndicatorOptionComputeEstimatedBackgroundColor) 713 709 _estimatedBackgroundColor = [PAL::allocUIColorInstance() initWithCGColor:cachedCGColor(indicatorData.estimatedBackgroundColor)]; 714 710 … … 1140 1136 + (NSString *)_standardUserAgentWithApplicationName:(NSString *)applicationName 1141 1137 { 1142 return standardUserAgentWithApplicationName(applicationName);1138 return WebCore::standardUserAgentWithApplicationName(applicationName); 1143 1139 } 1144 1140 … … 1164 1160 1165 1161 JSC::ExecState* execState = toJS(context); 1166 JS LockHolder lock(execState);1162 JSC::JSLockHolder lock(execState); 1167 1163 1168 1164 // Make sure the context has a DOMWindow global object, otherwise this context didn't originate from a WebView. 1169 1165 JSC::JSGlobalObject* globalObject = execState->lexicalGlobalObject(); 1170 if (! toJSDOMWindow(globalObject->vm(), globalObject))1171 return; 1172 1173 reportException(execState, toJS(execState, exception));1166 if (!WebCore::toJSDOMWindow(globalObject->vm(), globalObject)) 1167 return; 1168 1169 WebCore::reportException(execState, toJS(execState, exception)); 1174 1170 } 1175 1171 … … 1179 1175 return true; 1180 1176 #else 1181 return ! MacApplication::isAdobeInstaller();1177 return !WebCore::MacApplication::isAdobeInstaller(); 1182 1178 #endif 1183 1179 } … … 1188 1184 return true; 1189 1185 #else 1190 return ! MacApplication::isHRBlock();1186 return !WebCore::MacApplication::isHRBlock(); 1191 1187 #endif 1192 1188 } … … 1213 1209 { 1214 1210 static bool isOutlookNeedingQuirksScript = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_HTML5_PARSER) 1215 && MacApplication::isMicrosoftOutlook();1211 && WebCore::MacApplication::isMicrosoftOutlook(); 1216 1212 return isOutlookNeedingQuirksScript; 1217 1213 } … … 1227 1223 { 1228 1224 static NSString *outlookQuirksScriptContents = leakOutlookQuirksUserScriptContents(); 1229 _private->group->userContentController().addUserScript(*core([WebScriptWorld world]), makeUnique< UserScript>(outlookQuirksScriptContents, URL(), Vector<String>(), Vector<String>(), InjectAtDocumentEnd,InjectInAllFrames));1225 _private->group->userContentController().addUserScript(*core([WebScriptWorld world]), makeUnique<WebCore::UserScript>(outlookQuirksScriptContents, URL(), Vector<String>(), Vector<String>(), WebCore::InjectAtDocumentEnd, WebCore::InjectInAllFrames)); 1230 1226 1231 1227 } … … 1258 1254 static bool shouldUseLegacyBackgroundSizeShorthandBehavior = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_LEGACY_BACKGROUNDSIZE_SHORTHAND_BEHAVIOR); 1259 1255 #else 1260 static bool shouldUseLegacyBackgroundSizeShorthandBehavior = MacApplication::isVersions()1256 static bool shouldUseLegacyBackgroundSizeShorthandBehavior = WebCore::MacApplication::isVersions() 1261 1257 && !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_LEGACY_BACKGROUNDSIZE_SHORTHAND_BEHAVIOR); 1262 1258 #endif … … 1293 1289 { 1294 1290 #if PLATFORM(IOS_FAMILY) 1295 static bool shouldAllowWindowOpenWithoutUserGesture = IOSApplication::isTheSecretSocietyHiddenMystery() && dyld_get_program_sdk_version() < DYLD_IOS_VERSION_10_0;1291 static bool shouldAllowWindowOpenWithoutUserGesture = WebCore::IOSApplication::isTheSecretSocietyHiddenMystery() && dyld_get_program_sdk_version() < DYLD_IOS_VERSION_10_0; 1296 1292 return shouldAllowWindowOpenWithoutUserGesture; 1297 1293 #else … … 1331 1327 1332 1328 #if PLATFORM(MAC) 1333 GamepadProvider::singleton().setSharedProvider(HIDGamepadProvider::singleton());1329 WebCore::GamepadProvider::singleton().setSharedProvider(WebCore::HIDGamepadProvider::singleton()); 1334 1330 #else 1335 GamepadProvider::singleton().setSharedProvider(GameControllerGamepadProvider::singleton());1331 WebCore::GamepadProvider::singleton().setSharedProvider(WebCore::GameControllerGamepadProvider::singleton()); 1336 1332 #endif 1337 1333 … … 1357 1353 _private->backgroundColor = [[NSColor colorWithDeviceWhite:1 alpha:1] retain]; 1358 1354 #else 1359 _private->backgroundColor = CGColorRetain( cachedCGColor(Color::white));1355 _private->backgroundColor = CGColorRetain(WebCore::cachedCGColor(WebCore::Color::white)); 1360 1356 #endif 1361 1357 … … 1398 1394 #if PLATFORM(IOS_FAMILY) 1399 1395 // Set the WebSQLiteDatabaseTrackerClient. 1400 SQLiteDatabaseTracker::setClient(&WebSQLiteDatabaseTrackerClient::sharedWebSQLiteDatabaseTrackerClient());1396 WebCore::SQLiteDatabaseTracker::setClient(&WebCore::WebSQLiteDatabaseTrackerClient::sharedWebSQLiteDatabaseTrackerClient()); 1401 1397 1402 1398 if ([standardPreferences databasesEnabled]) … … 1415 1411 WebCore::SwitchingGPUClient::setSingleton(WebKit::WebSwitchingGPUClient::singleton()); 1416 1412 #endif 1417 DeprecatedGlobalSettings::setShouldRespectPriorityInCSSAttributeSetters(shouldRespectPriorityInCSSAttributeSetters());1418 1419 #if PLATFORM(IOS_FAMILY) 1420 if ( IOSApplication::isMobileSafari())1421 DeprecatedGlobalSettings::setShouldManageAudioSessionCategory(true);1413 WebCore::DeprecatedGlobalSettings::setShouldRespectPriorityInCSSAttributeSetters(shouldRespectPriorityInCSSAttributeSetters()); 1414 1415 #if PLATFORM(IOS_FAMILY) 1416 if (WebCore::IOSApplication::isMobileSafari()) 1417 WebCore::DeprecatedGlobalSettings::setShouldManageAudioSessionCategory(true); 1422 1418 #endif 1423 1419 1424 1420 if ([[NSUserDefaults standardUserDefaults] boolForKey:@"WebKitEnableLegacyTLS"]) 1425 SocketStreamHandleImpl::setLegacyTLSEnabled(true);1421 WebCore::SocketStreamHandleImpl::setLegacyTLSEnabled(true); 1426 1422 1427 1423 didOneTimeInitialization = true; … … 1432 1428 1433 1429 auto storageProvider = PageStorageSessionProvider::create(); 1434 PageConfiguration pageConfiguration(1430 WebCore::PageConfiguration pageConfiguration( 1435 1431 [[self preferences] privateBrowsingEnabled] ? PAL::SessionID::legacyPrivateSessionID() : PAL::SessionID::defaultSessionID(), 1436 1432 makeUniqueRef<WebEditorClient>(self), 1437 SocketProvider::create(),1438 LibWebRTCProvider::create(),1433 WebCore::SocketProvider::create(), 1434 WebCore::LibWebRTCProvider::create(), 1439 1435 WebCore::CacheStorageProvider::create(), 1440 1436 BackForwardList::create(self), 1441 CookieJar::create(storageProvider.copyRef())1437 WebCore::CookieJar::create(storageProvider.copyRef()) 1442 1438 ); 1443 1439 #if !PLATFORM(IOS_FAMILY) … … 1469 1465 pageConfiguration.userContentProvider = &_private->group->userContentController(); 1470 1466 pageConfiguration.visitedLinkStore = &_private->group->visitedLinkStore(); 1471 _private->page = new Page(WTFMove(pageConfiguration));1467 _private->page = new WebCore::Page(WTFMove(pageConfiguration)); 1472 1468 storageProvider->setPage(*_private->page); 1473 1469 … … 1572 1568 if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_LOCAL_RESOURCE_SECURITY_RESTRICTION)) { 1573 1569 // Originally, we allowed all local loads. 1574 SecurityPolicy::setLocalLoadPolicy(SecurityPolicy::AllowLocalLoadsForAll);1570 WebCore::SecurityPolicy::setLocalLoadPolicy(WebCore::SecurityPolicy::AllowLocalLoadsForAll); 1575 1571 } else if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_MORE_STRICT_LOCAL_RESOURCE_SECURITY_RESTRICTION)) { 1576 1572 // Later, we allowed local loads for local URLs and documents loaded 1577 1573 // with substitute data. 1578 SecurityPolicy::setLocalLoadPolicy(SecurityPolicy::AllowLocalLoadsForLocalAndSubstituteData);1574 WebCore::SecurityPolicy::setLocalLoadPolicy(WebCore::SecurityPolicy::AllowLocalLoadsForLocalAndSubstituteData); 1579 1575 } 1580 1576 #endif … … 1582 1578 #if PLATFORM(MAC) 1583 1579 if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_CONTENT_SNIFFING_FOR_FILE_URLS)) 1584 ResourceHandle::forceContentSniffing();1580 WebCore::ResourceHandle::forceContentSniffing(); 1585 1581 1586 1582 _private->page->setDeviceScaleFactor([self _deviceScaleFactor]); … … 1689 1685 _private->mainFrameDocumentReady = NO; 1690 1686 _private->drawsBackground = YES; 1691 _private->backgroundColor = CGColorRetain( cachedCGColor(Color::white));1687 _private->backgroundColor = CGColorRetain(WebCore::cachedCGColor(WebCore::Color::white)); 1692 1688 1693 1689 WebFrameView *frameView = nil; … … 1701 1697 1702 1698 auto storageProvider = PageStorageSessionProvider::create(); 1703 PageConfiguration pageConfiguration(1699 WebCore::PageConfiguration pageConfiguration( 1704 1700 [[self preferences] privateBrowsingEnabled] ? PAL::SessionID::legacyPrivateSessionID() : PAL::SessionID::defaultSessionID(), 1705 1701 makeUniqueRef<WebEditorClient>(self), 1706 SocketProvider::create(),1707 LibWebRTCProvider::create(),1702 WebCore::SocketProvider::create(), 1703 WebCore::LibWebRTCProvider::create(), 1708 1704 WebCore::CacheStorageProvider::create(), 1709 1705 BackForwardList::create(self), 1710 CookieJar::create(storageProvider.copyRef())1706 WebCore::CookieJar::create(storageProvider.copyRef()) 1711 1707 ); 1712 1708 pageConfiguration.chromeClient = new WebChromeClientIOS(self); … … 1729 1725 pageConfiguration.pluginInfoProvider = &WebPluginInfoProvider::singleton(); 1730 1726 1731 _private->page = new Page(WTFMove(pageConfiguration));1727 _private->page = new WebCore::Page(WTFMove(pageConfiguration)); 1732 1728 storageProvider->setPage(*_private->page); 1733 1729 … … 1775 1771 ++WebViewCount; 1776 1772 1777 SecurityPolicy::setLocalLoadPolicy(SecurityPolicy::AllowLocalLoadsForLocalAndSubstituteData);1773 WebCore::SecurityPolicy::setLocalLoadPolicy(WebCore::SecurityPolicy::AllowLocalLoadsForLocalAndSubstituteData); 1778 1774 1779 RuntimeEnabledFeatures::sharedFeatures().setAttachmentElementEnabled(self.preferences.attachmentElementEnabled);1775 WebCore::RuntimeEnabledFeatures::sharedFeatures().setAttachmentElementEnabled(self.preferences.attachmentElementEnabled); 1780 1776 1781 1777 return self; … … 1791 1787 - (void)_replaceCurrentHistoryItem:(WebHistoryItem *)item 1792 1788 { 1793 Frame* frame = [self _mainCoreFrame];1789 auto* frame = [self _mainCoreFrame]; 1794 1790 if (frame) 1795 1791 frame->loader().history().replaceCurrentItem(core(item)); … … 1812 1808 { 1813 1809 WebThreadRun(^{ 1814 for ( Frame* frame = [self _mainCoreFrame]; frame; frame = frame->tree().traverseNext()) {1815 Document*document = frame->document();1810 for (auto* frame = [self _mainCoreFrame]; frame; frame = frame->tree().traverseNext()) { 1811 auto *document = frame->document(); 1816 1812 if (document) 1817 1813 document->updateLayoutIgnorePendingStylesheets(); … … 1828 1824 { 1829 1825 WebThreadLock(); 1830 return _private->page->mainFrame().eventHandler().tryToBeginDragAtPoint( IntPoint(clientPosition),IntPoint(globalPosition));1831 } 1832 1833 - (void)_startDrag:(const DragItem&)dragItem1826 return _private->page->mainFrame().eventHandler().tryToBeginDragAtPoint(WebCore::IntPoint(clientPosition), WebCore::IntPoint(globalPosition)); 1827 } 1828 1829 - (void)_startDrag:(const WebCore::DragItem&)dragItem 1834 1830 { 1835 1831 auto& dragImage = dragItem.image; … … 1891 1887 } 1892 1888 1893 - ( DragData)dragDataForSession:(id <UIDropSession>)session client:(CGPoint)clientPosition global:(CGPoint)globalPosition operation:(uint64_t)operation1894 { 1895 auto dragOperationMask = static_cast< DragOperation>(operation);1896 auto dragDestinationMask = static_cast< DragDestinationAction>([self dragDestinationActionMaskForSession:session]);1897 return { session, roundedIntPoint(clientPosition), roundedIntPoint(globalPosition), dragOperationMask,DragApplicationNone, dragDestinationMask };1889 - (WebCore::DragData)dragDataForSession:(id <UIDropSession>)session client:(CGPoint)clientPosition global:(CGPoint)globalPosition operation:(uint64_t)operation 1890 { 1891 auto dragOperationMask = static_cast<WebCore::DragOperation>(operation); 1892 auto dragDestinationMask = static_cast<WebCore::DragDestinationAction>([self dragDestinationActionMaskForSession:session]); 1893 return { session, WebCore::roundedIntPoint(clientPosition), WebCore::roundedIntPoint(globalPosition), dragOperationMask, WebCore::DragApplicationNone, dragDestinationMask }; 1898 1894 } 1899 1895 … … 1947 1943 return; 1948 1944 1949 static auto defaultEditDragTextIndicatorOptions = TextIndicatorOptionIncludeSnapshotOfAllVisibleContentWithoutSelection | TextIndicatorOptionExpandClipBeyondVisibleRect | TextIndicatorOptionPaintAllContent | TextIndicatorOptionIncludeMarginIfRangeMatchesSelection | TextIndicatorOptionPaintBackgrounds | TextIndicatorOptionUseSelectionRectForSizing | TextIndicatorOptionIncludeSnapshotWithSelectionHighlight |TextIndicatorOptionRespectTextColor;1945 static auto defaultEditDragTextIndicatorOptions = WebCore::TextIndicatorOptionIncludeSnapshotOfAllVisibleContentWithoutSelection | WebCore::TextIndicatorOptionExpandClipBeyondVisibleRect | WebCore::TextIndicatorOptionPaintAllContent | WebCore::TextIndicatorOptionIncludeMarginIfRangeMatchesSelection | WebCore::TextIndicatorOptionPaintBackgrounds | WebCore::TextIndicatorOptionUseSelectionRectForSizing | WebCore::TextIndicatorOptionIncludeSnapshotWithSelectionHighlight | WebCore::TextIndicatorOptionRespectTextColor; 1950 1946 auto& frame = page->focusController().focusedOrMainFrame(); 1951 1947 if (auto range = frame.selection().selection().toNormalizedRange()) { 1952 if (auto textIndicator = TextIndicator::createWithRange(*range, defaultEditDragTextIndicatorOptions, TextIndicatorPresentationTransition::None,FloatSize()))1948 if (auto textIndicator = WebCore::TextIndicator::createWithRange(*range, defaultEditDragTextIndicatorOptions, WebCore::TextIndicatorPresentationTransition::None, WebCore::FloatSize())) 1953 1949 _private->dataOperationTextIndicator = adoptNS([[WebUITextIndicatorData alloc] initWithImage:nil textIndicatorData:textIndicator->data() scale:page->deviceScaleFactor()]); 1954 1950 } … … 2118 2114 + (void)_setAlwaysUsesComplexTextCodePath:(BOOL)f 2119 2115 { 2120 FontCascade::setCodePath(f ? FontCascade::Complex :FontCascade::Auto);2116 WebCore::FontCascade::setCodePath(f ? WebCore::FontCascade::Complex : WebCore::FontCascade::Auto); 2121 2117 } 2122 2118 2123 2119 + (BOOL)canCloseAllWebViews 2124 2120 { 2125 return DOMWindow::dispatchAllPendingBeforeUnloadEvents();2121 return WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents(); 2126 2122 } 2127 2123 2128 2124 + (void)closeAllWebViews 2129 2125 { 2130 DOMWindow::dispatchAllPendingUnloadEvents();2126 WebCore::DOMWindow::dispatchAllPendingUnloadEvents(); 2131 2127 2132 2128 // This will close the WebViews in a random order. Change this if close order is important. … … 2158 2154 WebThreadRun(^{ 2159 2155 WebFrame *mainFrame = [self mainFrame]; 2160 Frame *coreMainFrame = core(mainFrame);2156 auto* coreMainFrame = core(mainFrame); 2161 2157 if (coreMainFrame) { 2162 Document *document = coreMainFrame->document();2158 auto* document = coreMainFrame->document(); 2163 2159 if (document) 2164 document->dispatchWindowEvent( Event::create(eventNames().unloadEvent, Event::CanBubble::No,Event::IsCancelable::No));2160 document->dispatchWindowEvent(WebCore::Event::create(WebCore::eventNames().unloadEvent, WebCore::Event::CanBubble::No, WebCore::Event::IsCancelable::No)); 2165 2161 } 2166 2162 }); … … 2172 2168 if (!mainFrame) 2173 2169 return nil; 2174 RefPtr< EditingStyle> editingStyle =EditingStyle::styleAtSelectionStart(mainFrame->selection().selection());2170 RefPtr<WebCore::EditingStyle> editingStyle = WebCore::EditingStyle::styleAtSelectionStart(mainFrame->selection().selection()); 2175 2171 if (!editingStyle) 2176 2172 return nil; … … 2230 2226 [self setDefersCallbacks:NO]; 2231 2227 [[self mainFrame] setTimeoutsPaused:NO]; 2232 if ( FrameView* view = [self _mainCoreFrame]->view())2228 if (auto* view = [self _mainCoreFrame]->view()) 2233 2229 view->resumeVisibleImageAnimationsIncludingSubframes(); 2234 2230 } … … 2344 2340 #endif 2345 2341 2346 if ( Frame* mainFrame = [self _mainCoreFrame])2342 if (auto* mainFrame = [self _mainCoreFrame]) 2347 2343 mainFrame->loader().detachFromParent(); 2348 2344 … … 2374 2370 // all the plug-ins in the page cache to break any retain cycles. 2375 2371 // See comment in HistoryItem::releaseAllPendingPageCaches() for more information. 2376 Page* page = _private->page;2372 auto* page = _private->page; 2377 2373 _private->page = nullptr; 2378 WebKit::DeferredPageDestructor::createDeferredPageDestructor(std::unique_ptr< Page>(page));2374 WebKit::DeferredPageDestructor::createDeferredPageDestructor(std::unique_ptr<WebCore::Page>(page)); 2379 2375 2380 2376 #if !PLATFORM(IOS_FAMILY) … … 2429 2425 - (BOOL)_isProcessingUserGesture 2430 2426 { 2431 return UserGestureIndicator::processingUserGesture();2427 return WebCore::UserGestureIndicator::processingUserGesture(); 2432 2428 } 2433 2429 … … 2550 2546 + (void)_enableRemoteInspector 2551 2547 { 2552 RemoteInspector::singleton().start();2548 Inspector::RemoteInspector::singleton().start(); 2553 2549 } 2554 2550 2555 2551 + (void)_disableRemoteInspector 2556 2552 { 2557 RemoteInspector::singleton().stop();2553 Inspector::RemoteInspector::singleton().stop(); 2558 2554 } 2559 2555 2560 2556 + (void)_disableAutoStartRemoteInspector 2561 2557 { 2562 RemoteInspector::startDisabled();2558 Inspector::RemoteInspector::startDisabled(); 2563 2559 } 2564 2560 2565 2561 + (BOOL)_isRemoteInspectorEnabled 2566 2562 { 2567 return RemoteInspector::singleton().enabled();2563 return Inspector::RemoteInspector::singleton().enabled(); 2568 2564 } 2569 2565 2570 2566 + (BOOL)_hasRemoteInspectorSession 2571 2567 { 2572 return RemoteInspector::singleton().hasActiveDebugSession();2568 return Inspector::RemoteInspector::singleton().hasActiveDebugSession(); 2573 2569 } 2574 2570 … … 2608 2604 { 2609 2605 RetainPtr<CFDataRef> auditData = adoptCF(CFDataCreate(nullptr, (const UInt8*)&auditToken, sizeof(auditToken))); 2610 RemoteInspector::singleton().setParentProcessInformation(pid, auditData);2606 Inspector::RemoteInspector::singleton().setParentProcessInformation(pid, auditData); 2611 2607 } 2612 2608 #endif // PLATFORM(IOS_FAMILY) … … 2667 2663 // in the back forward list, and go to the current one. 2668 2664 2669 BackForwardController& backForward = _private->page->backForward();2665 auto& backForward = _private->page->backForward(); 2670 2666 ASSERT(!backForward.currentItem()); // destination list should be empty 2671 2667 2672 BackForwardController& otherBackForward = otherView->_private->page->backForward();2668 auto& otherBackForward = otherView->_private->page->backForward(); 2673 2669 if (!otherBackForward.currentItem()) 2674 2670 return; // empty back forward list, bail 2675 2671 2676 HistoryItem* newItemToGoTo = nullptr;2672 WebCore::HistoryItem* newItemToGoTo = nullptr; 2677 2673 2678 2674 int lastItemIndex = otherBackForward.forwardCount(); … … 2684 2680 otherView->_private->page->mainFrame().loader().history().saveDocumentAndScrollState(); 2685 2681 } 2686 Ref< HistoryItem> newItem = otherBackForward.itemAtIndex(i)->copy();2682 Ref<WebCore::HistoryItem> newItem = otherBackForward.itemAtIndex(i)->copy(); 2687 2683 if (i == 0) 2688 2684 newItemToGoTo = newItem.ptr(); … … 2691 2687 2692 2688 ASSERT(newItemToGoTo); 2693 _private->page->goToItem(*newItemToGoTo, FrameLoadType::IndexedBackForward,ShouldTreatAsContinuingLoad::No);2689 _private->page->goToItem(*newItemToGoTo, WebCore::FrameLoadType::IndexedBackForward, WebCore::ShouldTreatAsContinuingLoad::No); 2694 2690 } 2695 2691 … … 2773 2769 - (BOOL)_needsKeyboardEventDisambiguationQuirks 2774 2770 { 2775 static BOOL needsQuirks = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_IE_COMPATIBLE_KEYBOARD_EVENT_DISPATCH) && ! MacApplication::isSafari();2771 static BOOL needsQuirks = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_IE_COMPATIBLE_KEYBOARD_EVENT_DISPATCH) && !WebCore::MacApplication::isSafari(); 2776 2772 return needsQuirks; 2777 2773 } … … 2785 2781 static bool needsSelfRetainWhileLoadingQuirk() 2786 2782 { 2787 static bool needsQuirk = MacApplication::isAperture();2783 static bool needsQuirk = WebCore::MacApplication::isAperture(); 2788 2784 return needsQuirk; 2789 2785 } … … 2800 2796 // <https://bugs.webkit.org/show_bug.cgi?id=46334>. 2801 2797 static bool isApplicationNeedingParserQuirks = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_HTML5_PARSER) 2802 && ( MacApplication::isAOLInstantMessenger() ||MacApplication::isMicrosoftMyDay());2798 && (WebCore::MacApplication::isAOLInstantMessenger() || WebCore::MacApplication::isMicrosoftMyDay()); 2803 2799 2804 2800 // Mail.app must continue to display HTML email that contains quirky markup. 2805 static bool isAppleMail = MacApplication::isAppleMail();2801 static bool isAppleMail = WebCore::MacApplication::isAppleMail(); 2806 2802 2807 2803 return isApplicationNeedingParserQuirks || isAppleMail || [[self preferences] usePreHTML5ParserQuirks]; … … 2840 2836 2841 2837 - (void)_preferencesChanged:(WebPreferences *)preferences 2842 { 2838 { 2839 using namespace WebCore; 2843 2840 ASSERT(preferences == [self preferences]); 2844 2841 if (!_private->userAgentOverridden) … … 2869 2866 #endif 2870 2867 2871 Settings& settings = _private->page->settings();2868 auto& settings = _private->page->settings(); 2872 2869 2873 2870 settings.setCursiveFontFamily([preferences cursiveFontFamily]); … … 2972 2969 settings.setBackspaceKeyNavigationEnabled([preferences backspaceKeyNavigationEnabled]); 2973 2970 settings.setWantsBalancedSetDefersLoadingBehavior([preferences wantsBalancedSetDefersLoadingBehavior]); 2974 DeprecatedGlobalSettings::setMockScrollbarsEnabled([preferences mockScrollbarsEnabled]);2971 WebCore::DeprecatedGlobalSettings::setMockScrollbarsEnabled([preferences mockScrollbarsEnabled]); 2975 2972 2976 2973 settings.setShouldRespectImageOrientation([preferences shouldRespectImageOrientation]); … … 2978 2975 settings.setRequestAnimationFrameEnabled([preferences requestAnimationFrameEnabled]); 2979 2976 settings.setDiagnosticLoggingEnabled([preferences diagnosticLoggingEnabled]); 2980 DeprecatedGlobalSettings::setLowPowerVideoAudioBufferSizeEnabled([preferences lowPowerVideoAudioBufferSizeEnabled]);2977 WebCore::DeprecatedGlobalSettings::setLowPowerVideoAudioBufferSizeEnabled([preferences lowPowerVideoAudioBufferSizeEnabled]); 2981 2978 2982 2979 settings.setUseLegacyTextAlignPositionedElementBehavior([preferences useLegacyTextAlignPositionedElementBehavior]); … … 2997 2994 switch ([preferences storageBlockingPolicy]) { 2998 2995 case WebAllowAllStorage: 2999 settings.setStorageBlockingPolicy( SecurityOrigin::AllowAllStorage);2996 settings.setStorageBlockingPolicy(WebCore::SecurityOrigin::AllowAllStorage); 3000 2997 break; 3001 2998 case WebBlockThirdPartyStorage: 3002 settings.setStorageBlockingPolicy( SecurityOrigin::BlockThirdPartyStorage);2999 settings.setStorageBlockingPolicy(WebCore::SecurityOrigin::BlockThirdPartyStorage); 3003 3000 break; 3004 3001 case WebBlockAllStorage: 3005 settings.setStorageBlockingPolicy( SecurityOrigin::BlockAllStorage);3002 settings.setStorageBlockingPolicy(WebCore::SecurityOrigin::BlockAllStorage); 3006 3003 break; 3007 3004 } … … 3034 3031 settings.setAlwaysUseAcceleratedOverflowScroll([preferences _alwaysUseAcceleratedOverflowScroll]); 3035 3032 settings.setContentChangeObserverEnabled([preferences contentChangeObserverEnabled]); 3036 DeprecatedGlobalSettings::setAudioSessionCategoryOverride([preferences audioSessionCategoryOverride]);3037 DeprecatedGlobalSettings::setNetworkDataUsageTrackingEnabled([preferences networkDataUsageTrackingEnabled]);3038 DeprecatedGlobalSettings::setNetworkInterfaceName([preferences networkInterfaceName]);3033 WebCore::DeprecatedGlobalSettings::setAudioSessionCategoryOverride([preferences audioSessionCategoryOverride]); 3034 WebCore::DeprecatedGlobalSettings::setNetworkDataUsageTrackingEnabled([preferences networkDataUsageTrackingEnabled]); 3035 WebCore::DeprecatedGlobalSettings::setNetworkInterfaceName([preferences networkInterfaceName]); 3039 3036 #if HAVE(AVKIT) 3040 DeprecatedGlobalSettings::setAVKitEnabled([preferences avKitEnabled]);3037 WebCore::DeprecatedGlobalSettings::setAVKitEnabled([preferences avKitEnabled]); 3041 3038 #endif 3042 3039 … … 3092 3089 3093 3090 #if USE(AVFOUNDATION) 3094 DeprecatedGlobalSettings::setAVFoundationEnabled([preferences isAVFoundationEnabled]);3095 DeprecatedGlobalSettings::setAVFoundationNSURLSessionEnabled([preferences isAVFoundationNSURLSessionEnabled]);3091 WebCore::DeprecatedGlobalSettings::setAVFoundationEnabled([preferences isAVFoundationEnabled]); 3092 WebCore::DeprecatedGlobalSettings::setAVFoundationNSURLSessionEnabled([preferences isAVFoundationNSURLSessionEnabled]); 3096 3093 #endif 3097 3094 … … 3124 3121 settings.setHiddenPageCSSAnimationSuspensionEnabled([preferences hiddenPageCSSAnimationSuspensionEnabled]); 3125 3122 3126 DeprecatedGlobalSettings::setResourceLoadStatisticsEnabled([preferences resourceLoadStatisticsEnabled]);3123 WebCore::DeprecatedGlobalSettings::setResourceLoadStatisticsEnabled([preferences resourceLoadStatisticsEnabled]); 3127 3124 3128 3125 settings.setViewportFitEnabled([preferences viewportFitEnabled]); … … 3354 3351 // didFirstLayoutInFrame and didFirstVisuallyNonEmptyLayoutInFrame. In the meantime, this is required 3355 3352 // for backwards compatibility. 3356 Page* page = core(self);3353 auto* page = core(self); 3357 3354 if (page) { 3358 OptionSet<WebCore::LayoutMilestone> milestones { DidFirstLayout };3359 #if PLATFORM(IOS_FAMILY) 3360 milestones.add( DidFirstVisuallyNonEmptyLayout);3355 OptionSet<WebCore::LayoutMilestone> milestones { WebCore::DidFirstLayout }; 3356 #if PLATFORM(IOS_FAMILY) 3357 milestones.add(WebCore::DidFirstVisuallyNonEmptyLayout); 3361 3358 #else 3362 3359 if (cache->didFirstVisuallyNonEmptyLayoutInFrameFunc) 3363 milestones.add( DidFirstVisuallyNonEmptyLayout);3360 milestones.add(WebCore::DidFirstVisuallyNonEmptyLayout); 3364 3361 #endif 3365 3362 page->addLayoutMilestones(milestones); … … 3477 3474 // in the WebCore MIMEType registry. For now we're doing this in a safe, limited manner 3478 3475 // to fix <rdar://problem/5372989> - a future revamping of the entire system is neccesary for future robustness 3479 MIMETypeRegistry::supportedNonImageMIMETypes().remove(MIMEType);3476 WebCore::MIMETypeRegistry::supportedNonImageMIMETypes().remove(MIMEType); 3480 3477 } 3481 3478 … … 3489 3486 // to fix <rdar://problem/5372989> - a future revamping of the entire system is neccesary for future robustness 3490 3487 if ([viewClass class] == [WebHTMLView class]) 3491 MIMETypeRegistry::supportedNonImageMIMETypes().add(MIMEType);3488 WebCore::MIMETypeRegistry::supportedNonImageMIMETypes().add(MIMEType); 3492 3489 3493 3490 // This is used to make _representationExistsForURLScheme faster. … … 3540 3537 + (NSString *)_decodeData:(NSData *)data 3541 3538 { 3542 HTMLNames::init(); // this method is used for importing bookmarks at startup, so HTMLNames are likely to be uninitialized yet3543 return TextResourceDecoder::create("text/html")->decodeAndFlush(static_cast<const char*>([data bytes]), [data length]); // bookmark files are HTML3539 WebCore::HTMLNames::init(); // this method is used for importing bookmarks at startup, so HTMLNames are likely to be uninitialized yet 3540 return WebCore::TextResourceDecoder::create("text/html")->decodeAndFlush(static_cast<const char*>([data bytes]), [data length]); // bookmark files are HTML 3544 3541 } 3545 3542 … … 3622 3619 3623 3620 #if ENABLE(FULLSCREEN_API) 3624 Document* document = core([frame DOMDocument]);3625 if ( Element* element = document ? document->fullscreenManager().currentFullscreenElement() : 0) {3621 auto* document = core([frame DOMDocument]); 3622 if (auto* element = document ? document->fullscreenManager().currentFullscreenElement() : 0) { 3626 3623 SEL selector = @selector(webView:closeFullScreenWithListener:); 3627 3624 if ([_private->UIDelegate respondsToSelector:selector]) { … … 3641 3638 return; 3642 3639 3643 Page* page = _private->page;3640 auto* page = _private->page; 3644 3641 if (!page) 3645 3642 return; … … 3720 3717 3721 3718 if (auto storageSession = _private->page->mainFrame().loader().networkingContext()->storageSession()->platformSession()) 3722 cachedResponse = cachedResponseForRequest(storageSession, request.get());3719 cachedResponse = WebCore::cachedResponseForRequest(storageSession, request.get()); 3723 3720 else 3724 3721 cachedResponse = [[NSURLCache sharedURLCache] cachedResponseForRequest:request.get()]; … … 3792 3789 + (void)_setShouldUseFontSmoothing:(BOOL)f 3793 3790 { 3794 FontCascade::setShouldUseSmoothing(f);3791 WebCore::FontCascade::setShouldUseSmoothing(f); 3795 3792 } 3796 3793 3797 3794 + (BOOL)_shouldUseFontSmoothing 3798 3795 { 3799 return FontCascade::shouldUseSmoothing();3796 return WebCore::FontCascade::shouldUseSmoothing(); 3800 3797 } 3801 3798 … … 3803 3800 + (void)_setUsesTestModeFocusRingColor:(BOOL)f 3804 3801 { 3805 setUsesTestModeFocusRingColor(f);3802 WebCore::setUsesTestModeFocusRingColor(f); 3806 3803 } 3807 3804 3808 3805 + (BOOL)_usesTestModeFocusRingColor 3809 3806 { 3810 return usesTestModeFocusRingColor();3807 return WebCore::usesTestModeFocusRingColor(); 3811 3808 } 3812 3809 #endif … … 3919 3916 WebDynamicScrollBarsView *scrollview = [[[self mainFrame] frameView] _scrollView]; 3920 3917 if (flag) { 3921 [scrollview setVerticalScrollingMode: ScrollbarAlwaysOn andLock:YES];3918 [scrollview setVerticalScrollingMode:WebCore::ScrollbarAlwaysOn andLock:YES]; 3922 3919 } else { 3923 3920 [scrollview setVerticalScrollingModeLocked:NO]; 3924 [scrollview setVerticalScrollingMode: ScrollbarAuto andLock:NO];3921 [scrollview setVerticalScrollingMode:WebCore::ScrollbarAuto andLock:NO]; 3925 3922 } 3926 3923 } … … 3929 3926 { 3930 3927 WebDynamicScrollBarsView *scrollview = [[[self mainFrame] frameView] _scrollView]; 3931 return [scrollview verticalScrollingModeLocked] && [scrollview verticalScrollingMode] == ScrollbarAlwaysOn;3928 return [scrollview verticalScrollingModeLocked] && [scrollview verticalScrollingMode] == WebCore::ScrollbarAlwaysOn; 3932 3929 } 3933 3930 … … 3936 3933 WebDynamicScrollBarsView *scrollview = [[[self mainFrame] frameView] _scrollView]; 3937 3934 if (flag) { 3938 [scrollview setHorizontalScrollingMode: ScrollbarAlwaysOn andLock:YES];3935 [scrollview setHorizontalScrollingMode:WebCore::ScrollbarAlwaysOn andLock:YES]; 3939 3936 } else { 3940 3937 [scrollview setHorizontalScrollingModeLocked:NO]; 3941 [scrollview setHorizontalScrollingMode: ScrollbarAuto andLock:NO];3938 [scrollview setHorizontalScrollingMode:WebCore::ScrollbarAuto andLock:NO]; 3942 3939 } 3943 3940 } … … 3945 3942 - (void)setProhibitsMainFrameScrolling:(BOOL)prohibits 3946 3943 { 3947 if ( Frame* mainFrame = [self _mainCoreFrame])3944 if (auto* mainFrame = [self _mainCoreFrame]) 3948 3945 mainFrame->view()->setProhibitsScrolling(prohibits); 3949 3946 } … … 3952 3949 { 3953 3950 WebDynamicScrollBarsView *scrollview = [[[self mainFrame] frameView] _scrollView]; 3954 return [scrollview horizontalScrollingModeLocked] && [scrollview horizontalScrollingMode] == ScrollbarAlwaysOn;3951 return [scrollview horizontalScrollingModeLocked] && [scrollview horizontalScrollingMode] == WebCore::ScrollbarAlwaysOn; 3955 3952 } 3956 3953 #endif // !PLATFORM(IOS_FAMILY) … … 4073 4070 WebThreadLock(); 4074 4071 4075 Frame* mainCoreFrame = [self _mainCoreFrame];4076 for ( Frame* frame = mainCoreFrame; frame; frame = frame->tree().traverseNext()) {4077 FrameView* coreView = frame ? frame->view() : 0;4072 auto* mainCoreFrame = [self _mainCoreFrame]; 4073 for (auto* frame = mainCoreFrame; frame; frame = frame->tree().traverseNext()) { 4074 auto* coreView = frame ? frame->view() : 0; 4078 4075 if (!coreView) 4079 4076 continue; 4080 4077 4081 4078 // Get the GraphicsLayer for this widget. 4082 GraphicsLayer* layerForWidget = coreView->graphicsLayerForPlatformWidget(pluginView);4079 WebCore::GraphicsLayer* layerForWidget = coreView->graphicsLayerForPlatformWidget(pluginView); 4083 4080 if (!layerForWidget) 4084 4081 continue; 4085 4082 4086 4083 if (layerForWidget->contentsLayerForMedia() != layer) { 4087 layerForWidget->setContentsToPlatformLayer(layer, GraphicsLayer::ContentsLayerPurpose::Media);4084 layerForWidget->setContentsToPlatformLayer(layer, WebCore::GraphicsLayer::ContentsLayerPurpose::Media); 4088 4085 // We need to make sure the layer hierarchy change is applied immediately. 4089 4086 if (mainCoreFrame->view()) … … 4105 4102 - (void)_attachScriptDebuggerToAllFrames 4106 4103 { 4107 for ( Frame* frame = [self _mainCoreFrame]; frame; frame = frame->tree().traverseNext())4104 for (auto* frame = [self _mainCoreFrame]; frame; frame = frame->tree().traverseNext()) 4108 4105 [kit(frame) _attachScriptDebugger]; 4109 4106 } … … 4111 4108 - (void)_detachScriptDebuggerFromAllFrames 4112 4109 { 4113 for ( Frame* frame = [self _mainCoreFrame]; frame; frame = frame->tree().traverseNext())4110 for (auto* frame = [self _mainCoreFrame]; frame; frame = frame->tree().traverseNext()) 4114 4111 [kit(frame) _detachScriptDebugger]; 4115 4112 } … … 4197 4194 { 4198 4195 #if USE(QUICK_LOOK) 4199 return [ QLPreviewGetSupportedMIMETypesSet() allObjects];4196 return [WebCore::QLPreviewGetSupportedMIMETypesSet() allObjects]; 4200 4197 #else 4201 4198 return nil; … … 4217 4214 ASSERT(WebThreadIsLocked()); 4218 4215 _private->fixedLayoutSize = size; 4219 if ( Frame* mainFrame = core([self mainFrame])) {4220 IntSize newSize(size);4216 if (auto* mainFrame = core([self mainFrame])) { 4217 WebCore::IntSize newSize(size); 4221 4218 mainFrame->view()->setFixedLayoutSize(newSize); 4222 4219 mainFrame->view()->setUseFixedLayout(!newSize.isEmpty()); … … 4234 4231 ASSERT(WebThreadIsLocked()); 4235 4232 4236 IntRect newRect;4233 WebCore::IntRect newRect; 4237 4234 { 4238 4235 LockHolder locker(_private->pendingFixedPositionLayoutRectMutex); 4239 4236 if (CGRectIsNull(_private->pendingFixedPositionLayoutRect)) 4240 4237 return; 4241 newRect = enclosingIntRect(_private->pendingFixedPositionLayoutRect);4238 newRect = WebCore::enclosingIntRect(_private->pendingFixedPositionLayoutRect); 4242 4239 _private->pendingFixedPositionLayoutRect = CGRectNull; 4243 4240 } 4244 4241 4245 if ( Frame* mainFrame = core([self mainFrame]))4242 if (auto* mainFrame = core([self mainFrame])) 4246 4243 mainFrame->view()->setCustomFixedPositionLayoutRect(newRect); 4247 4244 } … … 4285 4282 ASSERT(WebThreadIsLocked()); 4286 4283 4287 if ( Frame* coreFrame = [self _mainCoreFrame])4288 coreFrame->viewportOffsetChanged( Frame::IncrementalScrollOffset);4284 if (auto* coreFrame = [self _mainCoreFrame]) 4285 coreFrame->viewportOffsetChanged(WebCore::Frame::IncrementalScrollOffset); 4289 4286 } 4290 4287 … … 4292 4289 { 4293 4290 // Find the frame 4294 Node* node = core(domNode);4295 Frame* frame = node->document().frame();4291 auto* node = core(domNode); 4292 auto* frame = node->document().frame(); 4296 4293 if (!frame) 4297 4294 return; 4298 4295 4299 frame->overflowScrollPositionChangedForNode( roundedIntPoint(offset), node, userScroll);4296 frame->overflowScrollPositionChangedForNode(WebCore::roundedIntPoint(offset), node, userScroll); 4300 4297 } 4301 4298 4302 4299 + (void)_doNotStartObservingNetworkReachability 4303 4300 { 4304 DeprecatedGlobalSettings::setShouldOptOutOfNetworkStateObservation(true);4301 WebCore::DeprecatedGlobalSettings::setShouldOptOutOfNetworkStateObservation(true); 4305 4302 } 4306 4303 #endif // PLATFORM(IOS_FAMILY) … … 4309 4306 - (NSArray *)_touchEventRegions 4310 4307 { 4311 Frame* frame = [self _mainCoreFrame];4308 auto* frame = [self _mainCoreFrame]; 4312 4309 if (!frame) 4313 4310 return nil; 4314 4311 4315 Document* document = frame->document();4312 auto* document = frame->document(); 4316 4313 if (!document) 4317 4314 return nil; 4318 4315 4319 Vector< IntRect> rects;4316 Vector<WebCore::IntRect> rects; 4320 4317 document->getTouchRects(rects); 4321 4318 … … 4326 4323 4327 4324 NSView <WebDocumentView> *documentView = [[[self mainFrame] frameView] documentView]; 4328 Vector< IntRect>::const_iterator end = rects.end();4329 for (Vector< IntRect>::const_iterator it = rects.begin(); it != end; ++it) {4330 const IntRect& rect = *it;4325 Vector<WebCore::IntRect>::const_iterator end = rects.end(); 4326 for (Vector<WebCore::IntRect>::const_iterator it = rects.begin(); it != end; ++it) { 4327 const WebCore::IntRect& rect = *it; 4331 4328 if (rect.isEmpty()) 4332 4329 continue; … … 4335 4332 // the same as the coordinate system of the WebView. UIWebView currently expects view coordinates, so we'll 4336 4333 // convert them here now. 4337 IntRect viewRect =IntRect([documentView convertRect:rect toView:self]);4334 WebCore::IntRect viewRect = WebCore::IntRect([documentView convertRect:rect toView:self]); 4338 4335 4339 4336 // The event region wants this points in this order: … … 4342 4339 // p1------p4 4343 4340 // 4344 WebEventRegion *eventRegion = [[WebEventRegion alloc] initWithPoints:FloatPoint(viewRect.x(), viewRect.maxY()) 4345 :FloatPoint(viewRect.x(), viewRect.y()) 4346 :FloatPoint(viewRect.maxX(), viewRect.y()) 4347 :FloatPoint(viewRect.maxX(), viewRect.maxY())]; 4341 WebEventRegion *eventRegion = [[WebEventRegion alloc] initWithPoints:WebCore::FloatPoint(viewRect.x(), viewRect.maxY()) 4342 : WebCore::FloatPoint(viewRect.x(), viewRect.y()) : WebCore::FloatPoint(viewRect.maxX(), viewRect.y()) : WebCore::FloatPoint(viewRect.maxX(), viewRect.maxY())]; 4348 4343 if (eventRegion) { 4349 4344 [eventRegionArray addObject:eventRegion]; … … 4375 4370 - (WebTextIterator *)textIteratorForRect:(NSRect)rect 4376 4371 { 4377 IntPoint rectStart(rect.origin.x, rect.origin.y);4378 IntPoint rectEnd(rect.origin.x + rect.size.width, rect.origin.y + rect.size.height);4372 WebCore::IntPoint rectStart(rect.origin.x, rect.origin.y); 4373 WebCore::IntPoint rectEnd(rect.origin.x + rect.size.width, rect.origin.y + rect.size.height); 4379 4374 4380 Frame* coreFrame = [self _mainCoreFrame];4375 auto* coreFrame = [self _mainCoreFrame]; 4381 4376 if (!coreFrame) 4382 4377 return nil; 4383 4378 4384 VisibleSelection selectionInsideRect(coreFrame->visiblePositionForPoint(rectStart), coreFrame->visiblePositionForPoint(rectEnd));4379 WebCore::VisibleSelection selectionInsideRect(coreFrame->visiblePositionForPoint(rectStart), coreFrame->visiblePositionForPoint(rectEnd)); 4385 4380 4386 4381 return [[[WebTextIterator alloc] initWithRange:kit(selectionInsideRect.toNormalizedRange().get())] autorelease]; … … 4398 4393 - (void)_executeCoreCommandByName:(NSString *)name value:(NSString *)value 4399 4394 { 4400 Frame* coreFrame = [self _mainCoreFrame];4395 auto* coreFrame = [self _mainCoreFrame]; 4401 4396 if (!coreFrame) 4402 4397 return; … … 4443 4438 - (BOOL)_isUsingAcceleratedCompositing 4444 4439 { 4445 Frame* coreFrame = [self _mainCoreFrame];4446 for ( Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {4440 auto* coreFrame = [self _mainCoreFrame]; 4441 for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) { 4447 4442 NSView *documentView = [[kit(frame) frameView] documentView]; 4448 4443 if ([documentView isKindOfClass:[WebHTMLView class]] && [(WebHTMLView *)documentView _isUsingAcceleratedCompositing]) … … 4492 4487 - (BOOL)_isSoftwareRenderable 4493 4488 { 4494 Frame* coreFrame = [self _mainCoreFrame];4495 for ( Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) {4496 if ( FrameView* view = frame->view()) {4489 auto* coreFrame = [self _mainCoreFrame]; 4490 for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) { 4491 if (auto* view = frame->view()) { 4497 4492 if (!view->isSoftwareRenderable()) 4498 4493 return NO; … … 4505 4500 - (void)setTracksRepaints:(BOOL)flag 4506 4501 { 4507 Frame* coreFrame = [self _mainCoreFrame];4508 if ( FrameView* view = coreFrame->view())4502 auto* coreFrame = [self _mainCoreFrame]; 4503 if (auto* view = coreFrame->view()) 4509 4504 view->setTracksRepaints(flag); 4510 4505 } … … 4512 4507 - (BOOL)isTrackingRepaints 4513 4508 { 4514 Frame* coreFrame = [self _mainCoreFrame];4515 if ( FrameView* view = coreFrame->view())4509 auto* coreFrame = [self _mainCoreFrame]; 4510 if (auto* view = coreFrame->view()) 4516 4511 return view->isTrackingRepaints(); 4517 4512 … … 4521 4516 - (void)resetTrackedRepaints 4522 4517 { 4523 Frame* coreFrame = [self _mainCoreFrame];4524 if ( FrameView* view = coreFrame->view())4518 auto* coreFrame = [self _mainCoreFrame]; 4519 if (auto* view = coreFrame->view()) 4525 4520 view->resetTrackedRepaints(); 4526 4521 } … … 4528 4523 - (NSArray*)trackedRepaintRects 4529 4524 { 4530 Frame* coreFrame = [self _mainCoreFrame];4531 FrameView* view = coreFrame->view();4525 auto* coreFrame = [self _mainCoreFrame]; 4526 auto* view = coreFrame->view(); 4532 4527 if (!view || !view->isTrackingRepaints()) 4533 4528 return nil; 4534 4529 4535 const Vector< FloatRect>& repaintRects = view->trackedRepaintRects();4530 const Vector<WebCore::FloatRect>& repaintRects = view->trackedRepaintRects(); 4536 4531 NSMutableArray* rectsArray = [[NSMutableArray alloc] initWithCapacity:repaintRects.size()]; 4537 4532 4538 4533 for (unsigned i = 0; i < repaintRects.size(); ++i) 4539 [rectsArray addObject:[NSValue valueWithRect:snappedIntRect( LayoutRect(repaintRects[i]))]];4534 [rectsArray addObject:[NSValue valueWithRect:snappedIntRect(WebCore::LayoutRect(repaintRects[i]))]]; 4540 4535 4541 4536 return [rectsArray autorelease]; … … 4551 4546 + (void)_addOriginAccessWhitelistEntryWithSourceOrigin:(NSString *)sourceOrigin destinationProtocol:(NSString *)destinationProtocol destinationHost:(NSString *)destinationHost allowDestinationSubdomains:(BOOL)allowDestinationSubdomains 4552 4547 { 4553 SecurityPolicy::addOriginAccessWhitelistEntry(SecurityOrigin::createFromString(sourceOrigin).get(), destinationProtocol, destinationHost, allowDestinationSubdomains);4548 WebCore::SecurityPolicy::addOriginAccessWhitelistEntry(WebCore::SecurityOrigin::createFromString(sourceOrigin).get(), destinationProtocol, destinationHost, allowDestinationSubdomains); 4554 4549 } 4555 4550 4556 4551 + (void)_removeOriginAccessWhitelistEntryWithSourceOrigin:(NSString *)sourceOrigin destinationProtocol:(NSString *)destinationProtocol destinationHost:(NSString *)destinationHost allowDestinationSubdomains:(BOOL)allowDestinationSubdomains 4557 4552 { 4558 SecurityPolicy::removeOriginAccessWhitelistEntry(SecurityOrigin::createFromString(sourceOrigin).get(), destinationProtocol, destinationHost, allowDestinationSubdomains);4553 WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry(WebCore::SecurityOrigin::createFromString(sourceOrigin).get(), destinationProtocol, destinationHost, allowDestinationSubdomains); 4559 4554 } 4560 4555 4561 4556 + (void)_resetOriginAccessWhitelists 4562 4557 { 4563 SecurityPolicy::resetOriginAccessWhitelists();4558 WebCore::SecurityPolicy::resetOriginAccessWhitelists(); 4564 4559 } 4565 4560 … … 4637 4632 return; 4638 4633 4639 auto userScript = makeUnique< UserScript>(source, url, toStringVector(whitelist), toStringVector(blacklist), injectionTime == WebInjectAtDocumentStart ? InjectAtDocumentStart : InjectAtDocumentEnd, injectedFrames == WebInjectInAllFrames ? InjectInAllFrames :InjectInTopFrameOnly);4634 auto userScript = makeUnique<WebCore::UserScript>(source, url, toStringVector(whitelist), toStringVector(blacklist), injectionTime == WebInjectAtDocumentStart ? WebCore::InjectAtDocumentStart : WebCore::InjectAtDocumentEnd, injectedFrames == WebInjectInAllFrames ? WebCore::InjectInAllFrames : WebCore::InjectInTopFrameOnly); 4640 4635 viewGroup->userContentController().addUserScript(*core(world), WTFMove(userScript)); 4641 4636 } … … 4660 4655 return; 4661 4656 4662 auto styleSheet = makeUnique< UserStyleSheet>(source, url, toStringVector(whitelist), toStringVector(blacklist), injectedFrames == WebInjectInAllFrames ? InjectInAllFrames : InjectInTopFrameOnly,UserStyleUserLevel);4663 viewGroup->userContentController().addUserStyleSheet(*core(world), WTFMove(styleSheet), InjectInExistingDocuments);4657 auto styleSheet = makeUnique<WebCore::UserStyleSheet>(source, url, toStringVector(whitelist), toStringVector(blacklist), injectedFrames == WebInjectInAllFrames ? WebCore::InjectInAllFrames : WebCore::InjectInTopFrameOnly, WebCore::UserStyleUserLevel); 4658 viewGroup->userContentController().addUserStyleSheet(*core(world), WTFMove(styleSheet), WebCore::InjectInExistingDocuments); 4664 4659 } 4665 4660 … … 4743 4738 - (BOOL)allowsNewCSSAnimationsWhileSuspended 4744 4739 { 4745 Frame* frame = core([self mainFrame]);4740 auto* frame = core([self mainFrame]); 4746 4741 if (frame) 4747 4742 return frame->animation().allowsNewAnimationsWhileSuspended(); … … 4752 4747 - (void)setAllowsNewCSSAnimationsWhileSuspended:(BOOL)allowed 4753 4748 { 4754 Frame* frame = core([self mainFrame]);4749 auto* frame = core([self mainFrame]); 4755 4750 if (frame) 4756 4751 frame->animation().setAllowsNewAnimationsWhileSuspended(allowed); … … 4760 4755 { 4761 4756 // should ask the page! 4762 Frame* frame = core([self mainFrame]);4757 auto* frame = core([self mainFrame]); 4763 4758 if (frame) 4764 4759 return frame->animation().isSuspended(); … … 4769 4764 - (void)setCSSAnimationsSuspended:(BOOL)suspended 4770 4765 { 4771 Frame* frame = core([self mainFrame]);4766 auto* frame = core([self mainFrame]); 4772 4767 if (suspended == frame->animation().isSuspended()) 4773 4768 return; … … 4781 4776 + (void)_setDomainRelaxationForbidden:(BOOL)forbidden forURLScheme:(NSString *)scheme 4782 4777 { 4783 SchemeRegistry::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme);4778 WebCore::SchemeRegistry::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme); 4784 4779 } 4785 4780 4786 4781 + (void)_registerURLSchemeAsSecure:(NSString *)scheme 4787 4782 { 4788 SchemeRegistry::registerURLSchemeAsSecure(scheme);4783 WebCore::SchemeRegistry::registerURLSchemeAsSecure(scheme); 4789 4784 } 4790 4785 … … 4795 4790 + (void)_registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing:(NSString *)scheme 4796 4791 { 4797 SchemeRegistry::registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing(scheme);4792 WebCore::SchemeRegistry::registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing(scheme); 4798 4793 } 4799 4794 … … 4802 4797 [self hideFormValidationMessage]; 4803 4798 4804 _private->page->setPageScaleFactor(scale, IntPoint(origin));4799 _private->page->setPageScaleFactor(scale, WebCore::IntPoint(origin)); 4805 4800 } 4806 4801 … … 4812 4807 - (void)_setUseFixedLayout:(BOOL)fixed 4813 4808 { 4814 Frame* coreFrame = [self _mainCoreFrame];4809 auto* coreFrame = [self _mainCoreFrame]; 4815 4810 if (!coreFrame) 4816 4811 return; 4817 4812 4818 FrameView* view = coreFrame->view();4813 auto* view = coreFrame->view(); 4819 4814 if (!view) 4820 4815 return; … … 4822 4817 view->setUseFixedLayout(fixed); 4823 4818 if (!fixed) 4824 view->setFixedLayoutSize( IntSize());4819 view->setFixedLayoutSize(WebCore::IntSize()); 4825 4820 } 4826 4821 … … 4828 4823 - (void)_setFixedLayoutSize:(NSSize)size 4829 4824 { 4830 Frame* coreFrame = [self _mainCoreFrame];4825 auto* coreFrame = [self _mainCoreFrame]; 4831 4826 if (!coreFrame) 4832 4827 return; 4833 4828 4834 FrameView* view = coreFrame->view();4829 auto* view = coreFrame->view(); 4835 4830 if (!view) 4836 4831 return; 4837 4832 4838 view->setFixedLayoutSize( IntSize(size));4833 view->setFixedLayoutSize(WebCore::IntSize(size)); 4839 4834 view->forceLayout(); 4840 4835 } … … 4843 4838 - (BOOL)_useFixedLayout 4844 4839 { 4845 Frame* coreFrame = [self _mainCoreFrame];4840 auto* coreFrame = [self _mainCoreFrame]; 4846 4841 if (!coreFrame) 4847 4842 return NO; 4848 4843 4849 FrameView* view = coreFrame->view();4844 auto* view = coreFrame->view(); 4850 4845 if (!view) 4851 4846 return NO; … … 4857 4852 - (NSSize)_fixedLayoutSize 4858 4853 { 4859 Frame* coreFrame = [self _mainCoreFrame];4854 auto* coreFrame = [self _mainCoreFrame]; 4860 4855 if (!coreFrame) 4861 return IntSize();4856 return WebCore::IntSize(); 4862 4857 4863 FrameView* view = coreFrame->view();4858 auto* view = coreFrame->view(); 4864 4859 if (!view) 4865 return IntSize();4860 return WebCore::IntSize(); 4866 4861 4867 4862 return view->fixedLayoutSize(); … … 4871 4866 - (void)_setPaginationMode:(WebPaginationMode)paginationMode 4872 4867 { 4873 Page* page = core(self);4868 auto* page = core(self); 4874 4869 if (!page) 4875 4870 return; 4876 4871 4877 Paginationpagination = page->pagination();4872 auto pagination = page->pagination(); 4878 4873 switch (paginationMode) { 4879 4874 case WebPaginationModeUnpaginated: 4880 pagination.mode = Pagination::Unpaginated;4875 pagination.mode = WebCore::Pagination::Unpaginated; 4881 4876 break; 4882 4877 case WebPaginationModeLeftToRight: 4883 pagination.mode = Pagination::LeftToRightPaginated;4878 pagination.mode = WebCore::Pagination::LeftToRightPaginated; 4884 4879 break; 4885 4880 case WebPaginationModeRightToLeft: 4886 pagination.mode = Pagination::RightToLeftPaginated;4881 pagination.mode = WebCore::Pagination::RightToLeftPaginated; 4887 4882 break; 4888 4883 case WebPaginationModeTopToBottom: 4889 pagination.mode = Pagination::TopToBottomPaginated;4884 pagination.mode = WebCore::Pagination::TopToBottomPaginated; 4890 4885 break; 4891 4886 case WebPaginationModeBottomToTop: 4892 pagination.mode = Pagination::BottomToTopPaginated;4887 pagination.mode = WebCore::Pagination::BottomToTopPaginated; 4893 4888 break; 4894 4889 default: … … 4901 4896 - (WebPaginationMode)_paginationMode 4902 4897 { 4903 Page* page = core(self);4898 auto* page = core(self); 4904 4899 if (!page) 4905 4900 return WebPaginationModeUnpaginated; 4906 4901 4907 4902 switch (page->pagination().mode) { 4908 case Pagination::Unpaginated:4903 case WebCore::Pagination::Unpaginated: 4909 4904 return WebPaginationModeUnpaginated; 4910 case Pagination::LeftToRightPaginated:4905 case WebCore::Pagination::LeftToRightPaginated: 4911 4906 return WebPaginationModeLeftToRight; 4912 case Pagination::RightToLeftPaginated:4907 case WebCore::Pagination::RightToLeftPaginated: 4913 4908 return WebPaginationModeRightToLeft; 4914 case Pagination::TopToBottomPaginated:4909 case WebCore::Pagination::TopToBottomPaginated: 4915 4910 return WebPaginationModeTopToBottom; 4916 case Pagination::BottomToTopPaginated:4911 case WebCore::Pagination::BottomToTopPaginated: 4917 4912 return WebPaginationModeBottomToTop; 4918 4913 } … … 4924 4919 - (void)_listenForLayoutMilestones:(WebLayoutMilestones)layoutMilestones 4925 4920 { 4926 Page* page = core(self);4921 auto* page = core(self); 4927 4922 if (!page) 4928 4923 return; … … 4933 4928 - (WebLayoutMilestones)_layoutMilestones 4934 4929 { 4935 Page* page = core(self);4930 auto* page = core(self); 4936 4931 if (!page) 4937 4932 return 0; … … 4978 4973 - (void)_setPaginationBehavesLikeColumns:(BOOL)behavesLikeColumns 4979 4974 { 4980 Page* page = core(self);4975 auto* page = core(self); 4981 4976 if (!page) 4982 4977 return; 4983 4978 4984 Paginationpagination = page->pagination();4979 auto pagination = page->pagination(); 4985 4980 pagination.behavesLikeColumns = behavesLikeColumns; 4986 4981 … … 4990 4985 - (BOOL)_paginationBehavesLikeColumns 4991 4986 { 4992 Page* page = core(self);4987 auto* page = core(self); 4993 4988 if (!page) 4994 4989 return NO; … … 4999 4994 - (void)_setPageLength:(CGFloat)pageLength 5000 4995 { 5001 Page* page = core(self);4996 auto* page = core(self); 5002 4997 if (!page) 5003 4998 return; 5004 4999 5005 Paginationpagination = page->pagination();5000 auto pagination = page->pagination(); 5006 5001 pagination.pageLength = pageLength; 5007 5002 … … 5011 5006 - (CGFloat)_pageLength 5012 5007 { 5013 Page* page = core(self);5008 auto* page = core(self); 5014 5009 if (!page) 5015 5010 return 1; … … 5020 5015 - (void)_setGapBetweenPages:(CGFloat)pageGap 5021 5016 { 5022 Page* page = core(self);5017 auto* page = core(self); 5023 5018 if (!page) 5024 5019 return; 5025 5020 5026 Paginationpagination = page->pagination();5021 auto pagination = page->pagination(); 5027 5022 pagination.gap = pageGap; 5028 5023 page->setPagination(pagination); … … 5031 5026 - (CGFloat)_gapBetweenPages 5032 5027 { 5033 Page* page = core(self);5028 auto* page = core(self); 5034 5029 if (!page) 5035 5030 return 0; … … 5040 5035 - (void)_setPaginationLineGridEnabled:(BOOL)lineGridEnabled 5041 5036 { 5042 Page* page = core(self);5037 auto* page = core(self); 5043 5038 if (!page) 5044 5039 return; … … 5049 5044 - (BOOL)_paginationLineGridEnabled 5050 5045 { 5051 Page* page = core(self);5046 auto* page = core(self); 5052 5047 if (!page) 5053 5048 return NO; … … 5058 5053 - (NSUInteger)_pageCount 5059 5054 { 5060 Page* page = core(self);5055 auto* page = core(self); 5061 5056 if (!page) 5062 5057 return 0; … … 5106 5101 + (BOOL)_HTTPPipeliningEnabled 5107 5102 { 5108 return ResourceRequest::httpPipeliningEnabled();5103 return WebCore::ResourceRequest::httpPipeliningEnabled(); 5109 5104 } 5110 5105 5111 5106 + (void)_setHTTPPipeliningEnabled:(BOOL)enabled 5112 5107 { 5113 ResourceRequest::setHTTPPipeliningEnabled(enabled);5108 WebCore::ResourceRequest::setHTTPPipeliningEnabled(enabled); 5114 5109 } 5115 5110 … … 5257 5252 - (BOOL)shouldRequestCandidates 5258 5253 { 5259 Frame* coreFrame = core([self _selectedOrMainFrame]);5254 auto* coreFrame = core([self _selectedOrMainFrame]); 5260 5255 if (!coreFrame) 5261 5256 return NO; … … 5592 5587 } 5593 5588 5594 - (void)removePluginInstanceViewsFor:(WebFrame*)webFrame 5589 - (void)removePluginInstanceViewsFor:(WebFrame*)webFrame 5595 5590 { 5596 5591 if (_private->pluginDatabase) … … 5674 5669 + (void)registerURLSchemeAsLocal:(NSString *)protocol 5675 5670 { 5676 SchemeRegistry::registerURLSchemeAsLocal(protocol);5671 WebCore::SchemeRegistry::registerURLSchemeAsLocal(protocol); 5677 5672 } 5678 5673 … … 6046 6041 { 6047 6042 if (_private && _private->page) 6048 _private->page->chrome().windowScreenDidChange(( PlatformDisplayID)[[[[[self window] screen] deviceDescription] objectForKey:@"NSScreenNumber"] intValue]);6043 _private->page->chrome().windowScreenDidChange((WebCore::PlatformDisplayID)[[[[[self window] screen] deviceDescription] objectForKey:@"NSScreenNumber"] intValue]); 6049 6044 } 6050 6045 … … 6136 6131 scaleFactor = [window screenScale]; 6137 6132 else 6138 scaleFactor = screenScaleFactor();6133 scaleFactor = WebCore::screenScaleFactor(); 6139 6134 6140 6135 _private->page->setDeviceScaleFactor(scaleFactor); … … 6376 6371 6377 6372 ASSERT(item); 6378 _private->page->goToItem(*core(item), FrameLoadType::IndexedBackForward,ShouldTreatAsContinuingLoad::No);6373 _private->page->goToItem(*core(item), WebCore::FrameLoadType::IndexedBackForward, WebCore::ShouldTreatAsContinuingLoad::No); 6379 6374 return YES; 6380 6375 } … … 6400 6395 // FIXME: It might be nice to rework this code so that _private->zoomMultiplier doesn't exist 6401 6396 // and instead the zoom factors stored in Frame are used. 6402 Frame* coreFrame = [self _mainCoreFrame];6397 auto* coreFrame = [self _mainCoreFrame]; 6403 6398 if (coreFrame) { 6404 6399 if (_private->zoomsTextOnly) … … 6564 6559 if (encoding == oldEncoding || [encoding isEqualToString:oldEncoding]) 6565 6560 return; 6566 if ( Frame* mainFrame = [self _mainCoreFrame])6561 if (auto* mainFrame = [self _mainCoreFrame]) 6567 6562 mainFrame->loader().reloadWithOverrideEncoding(encoding); 6568 6563 } … … 6611 6606 WebCoreThreadViolationCheckRoundThree(); 6612 6607 6613 Frame* coreFrame = [self _mainCoreFrame];6608 auto* coreFrame = [self _mainCoreFrame]; 6614 6609 if (!coreFrame) 6615 6610 return nil; … … 6638 6633 return; 6639 6634 6640 Frame* coreFrame = [self _mainCoreFrame];6635 auto* coreFrame = [self _mainCoreFrame]; 6641 6636 #if !PLATFORM(IOS_FAMILY) 6642 for ( Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame))6637 for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) 6643 6638 [[[kit(frame) frameView] documentView] viewWillMoveToHostWindow:hostWindow]; 6644 6639 if (_private->hostWindow && [self window] != _private->hostWindow) … … 6649 6644 [_private->hostWindow release]; 6650 6645 _private->hostWindow = [hostWindow retain]; 6651 for ( Frame* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame))6646 for (auto* frame = coreFrame; frame; frame = frame->tree().traverseNext(coreFrame)) 6652 6647 [[[kit(frame) frameView] documentView] viewDidMoveToHostWindow]; 6653 6648 #if !PLATFORM(IOS_FAMILY) … … 6706 6701 } 6707 6702 6708 - ( DragApplicationFlags)applicationFlags:(id <NSDraggingInfo>)draggingInfo6703 - (WebCore::DragApplicationFlags)applicationFlags:(id <NSDraggingInfo>)draggingInfo 6709 6704 { 6710 6705 uint32_t flags = 0; 6711 6706 if ([NSApp modalWindow]) 6712 flags = DragApplicationIsModal;6707 flags = WebCore::DragApplicationIsModal; 6713 6708 if ([[self window] attachedSheet]) 6714 flags |= DragApplicationHasAttachedSheet;6709 flags |= WebCore::DragApplicationHasAttachedSheet; 6715 6710 if ([draggingInfo draggingSource] == self) 6716 flags |= DragApplicationIsSource;6711 flags |= WebCore::DragApplicationIsSource; 6717 6712 if ([[NSApp currentEvent] modifierFlags] & NSEventModifierFlagOption) 6718 flags |= DragApplicationIsCopyKeyDown;6719 return static_cast< DragApplicationFlags>(flags);6720 } 6721 6722 - ( DragDestinationAction)actionMaskForDraggingInfo:(id <NSDraggingInfo>)draggingInfo6723 { 6724 return ( DragDestinationAction)[[self _UIDelegateForwarder] webView:self dragDestinationActionMaskForDraggingInfo:draggingInfo];6713 flags |= WebCore::DragApplicationIsCopyKeyDown; 6714 return static_cast<WebCore::DragApplicationFlags>(flags); 6715 } 6716 6717 - (WebCore::DragDestinationAction)actionMaskForDraggingInfo:(id <NSDraggingInfo>)draggingInfo 6718 { 6719 return (WebCore::DragDestinationAction)[[self _UIDelegateForwarder] webView:self dragDestinationActionMaskForDraggingInfo:draggingInfo]; 6725 6720 } 6726 6721 6727 6722 - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)draggingInfo 6728 6723 { 6729 IntPoint client([draggingInfo draggingLocation]);6730 IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));6731 6732 DragData dragData(draggingInfo, client, global, static_cast<DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo], [self actionMaskForDraggingInfo:draggingInfo]);6724 WebCore::IntPoint client([draggingInfo draggingLocation]); 6725 WebCore::IntPoint global(WebCore::globalPoint([draggingInfo draggingLocation], [self window])); 6726 6727 WebCore::DragData dragData(draggingInfo, client, global, static_cast<WebCore::DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo], [self actionMaskForDraggingInfo:draggingInfo]); 6733 6728 return core(self)->dragController().dragEntered(dragData); 6734 6729 } … … 6736 6731 - (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)draggingInfo 6737 6732 { 6738 Page* page = core(self);6733 auto* page = core(self); 6739 6734 if (!page) 6740 6735 return NSDragOperationNone; 6741 6736 6742 IntPoint client([draggingInfo draggingLocation]);6743 IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));6744 6745 DragData dragData(draggingInfo, client, global, static_cast<DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo], [self actionMaskForDraggingInfo:draggingInfo]);6737 WebCore::IntPoint client([draggingInfo draggingLocation]); 6738 WebCore::IntPoint global(WebCore::globalPoint([draggingInfo draggingLocation], [self window])); 6739 6740 WebCore::DragData dragData(draggingInfo, client, global, static_cast<WebCore::DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo], [self actionMaskForDraggingInfo:draggingInfo]); 6746 6741 return page->dragController().dragUpdated(dragData); 6747 6742 } … … 6749 6744 - (void)draggingExited:(id <NSDraggingInfo>)draggingInfo 6750 6745 { 6751 Page* page = core(self);6746 auto* page = core(self); 6752 6747 if (!page) 6753 6748 return; 6754 6749 6755 IntPoint client([draggingInfo draggingLocation]);6756 IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));6757 DragData dragData(draggingInfo, client, global, static_cast<DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]);6750 WebCore::IntPoint client([draggingInfo draggingLocation]); 6751 WebCore::IntPoint global(WebCore::globalPoint([draggingInfo draggingLocation], [self window])); 6752 WebCore::DragData dragData(draggingInfo, client, global, static_cast<WebCore::DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]); 6758 6753 page->dragController().dragExited(dragData); 6759 6754 } … … 6766 6761 - (BOOL)performDragOperation:(id <NSDraggingInfo>)draggingInfo 6767 6762 { 6768 IntPoint client([draggingInfo draggingLocation]);6769 IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));6770 DragData *dragData = new DragData(draggingInfo, client, global, static_cast<DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]);6763 WebCore::IntPoint client([draggingInfo draggingLocation]); 6764 WebCore::IntPoint global(WebCore::globalPoint([draggingInfo draggingLocation], [self window])); 6765 auto* dragData = new WebCore::DragData(draggingInfo, client, global, static_cast<WebCore::DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]); 6771 6766 6772 6767 NSArray* types = draggingInfo.draggingPasteboard.types; 6773 if (![types containsObject:WebArchivePboardType] && [types containsObject: legacyFilesPromisePasteboardType()]) {6768 if (![types containsObject:WebArchivePboardType] && [types containsObject:WebCore::legacyFilesPromisePasteboardType()]) { 6774 6769 6775 6770 // FIXME: legacyFilesPromisePasteboardType() contains UTIs, not path names. Also, it's not 6776 6771 // guaranteed that the count of UTIs equals the count of files, since some clients only write 6777 6772 // unique UTIs. 6778 NSArray *files = [draggingInfo.draggingPasteboard propertyListForType: legacyFilesPromisePasteboardType()];6773 NSArray *files = [draggingInfo.draggingPasteboard propertyListForType:WebCore::legacyFilesPromisePasteboardType()]; 6779 6774 if (![files isKindOfClass:[NSArray class]]) { 6780 6775 delete dragData; … … 6906 6901 static WebFrame *incrementFrame(WebFrame *frame, WebFindOptions options = 0) 6907 6902 { 6908 Frame* coreFrame = core(frame);6909 CanWrap canWrap = options & WebFindOptionsWrapAround ? CanWrap::Yes :CanWrap::No;6903 auto* coreFrame = core(frame); 6904 WebCore::CanWrap canWrap = options & WebFindOptionsWrapAround ? WebCore::CanWrap::Yes : WebCore::CanWrap::No; 6910 6905 return kit((options & WebFindOptionsBackwards) 6911 6906 ? coreFrame->tree().traversePrevious(canWrap) … … 6927 6922 // to fix <rdar://problem/5372989> - a future revamping of the entire system is neccesary for future robustness 6928 6923 if ([viewClass class] == [WebHTMLView class]) 6929 MIMETypeRegistry::supportedNonImageMIMETypes().add(MIMEType);6924 WebCore::MIMETypeRegistry::supportedNonImageMIMETypes().add(MIMEType); 6930 6925 } 6931 6926 … … 7008 7003 { 7009 7004 #if ENABLE(DRAG_SUPPORT) 7010 if ( Page* page = core(self))7011 page->dragController().placeDragCaret( IntPoint([self convertPoint:point toView:nil]));7005 if (auto* page = core(self)) 7006 page->dragController().placeDragCaret(WebCore::IntPoint([self convertPoint:point toView:nil])); 7012 7007 #endif 7013 7008 } … … 7016 7011 { 7017 7012 #if ENABLE(DRAG_SUPPORT) 7018 if ( Page* page = core(self))7013 if (auto* page = core(self)) 7019 7014 page->dragController().dragEnded(); 7020 7015 #endif … … 7090 7085 { 7091 7086 WebFrame *mainFrame = [self mainFrame]; 7092 Frame *coreMainFrame = core(mainFrame);7087 auto* coreMainFrame = core(mainFrame); 7093 7088 if (!coreMainFrame) 7094 7089 return nil; … … 7211 7206 } 7212 7207 7213 constexpr TextCheckingType coreTextCheckingType(NSTextCheckingType type)7208 constexpr WebCore::TextCheckingType coreTextCheckingType(NSTextCheckingType type) 7214 7209 { 7215 7210 switch (type) { 7216 7211 case NSTextCheckingTypeCorrection: 7217 return TextCheckingType::Correction;7212 return WebCore::TextCheckingType::Correction; 7218 7213 case NSTextCheckingTypeReplacement: 7219 return TextCheckingType::Replacement;7214 return WebCore::TextCheckingType::Replacement; 7220 7215 case NSTextCheckingTypeSpelling: 7221 return TextCheckingType::Spelling;7216 return WebCore::TextCheckingType::Spelling; 7222 7217 default: 7223 return TextCheckingType::None;7224 } 7225 } 7226 7227 static TextCheckingResult textCheckingResultFromNSTextCheckingResult(NSTextCheckingResult *nsResult)7218 return WebCore::TextCheckingType::None; 7219 } 7220 } 7221 7222 static WebCore::TextCheckingResult textCheckingResultFromNSTextCheckingResult(NSTextCheckingResult *nsResult) 7228 7223 { 7229 7224 NSRange resultRange = nsResult.range; 7230 7225 7231 TextCheckingResult result;7226 WebCore::TextCheckingResult result; 7232 7227 result.type = coreTextCheckingType(nsResult.resultType); 7233 7228 result.location = resultRange.location; … … 7252 7247 ASSERT([candidate isKindOfClass:[NSTextCheckingResult class]]); 7253 7248 7254 if ( Frame* coreFrame = core(self._selectedOrMainFrame))7249 if (auto* coreFrame = core(self._selectedOrMainFrame)) 7255 7250 coreFrame->editor().client()->handleAcceptedCandidateWithSoftSpaces(textCheckingResultFromNSTextCheckingResult((NSTextCheckingResult *)candidate)); 7256 7251 } … … 7262 7257 7263 7258 if (isVisible) { 7264 if ( Frame* coreFrame = core([self _selectedOrMainFrame]))7259 if (auto* coreFrame = core([self _selectedOrMainFrame])) 7265 7260 coreFrame->editor().client()->requestCandidatesForSelection(coreFrame->selection().selection()); 7266 7261 } … … 7822 7817 - (BOOL)shouldClose 7823 7818 { 7824 Frame* coreFrame = [self _mainCoreFrame];7819 auto* coreFrame = [self _mainCoreFrame]; 7825 7820 if (!coreFrame) 7826 7821 return YES; … … 7829 7824 7830 7825 #if !PLATFORM(IOS_FAMILY) 7831 static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSC::JSValue jsValue) 7832 { 7826 static NSAppleEventDescriptor* aeDescFromJSValue(JSC::ExecState* exec, JSC::JSValue jsValue) 7827 { 7828 using namespace JSC; 7833 7829 VM& vm = exec->vm(); 7834 7830 auto scope = DECLARE_CATCH_SCOPE(vm); … … 7884 7880 - (NSAppleEventDescriptor *)aeDescByEvaluatingJavaScriptFromString:(NSString *)script 7885 7881 { 7886 Frame* coreFrame = [self _mainCoreFrame];7882 auto* coreFrame = [self _mainCoreFrame]; 7887 7883 if (!coreFrame) 7888 7884 return nil; … … 7892 7888 if (!result) // FIXME: pass errors 7893 7889 return 0; 7894 JS LockHolder lock(coreFrame->script().globalObject(mainThreadNormalWorld())->globalExec());7895 return aeDescFromJSValue(coreFrame->script().globalObject( mainThreadNormalWorld())->globalExec(), result);7890 JSC::JSLockHolder lock(coreFrame->script().globalObject(WebCore::mainThreadNormalWorld())->globalExec()); 7891 return aeDescFromJSValue(coreFrame->script().globalObject(WebCore::mainThreadNormalWorld())->globalExec(), result); 7896 7892 } 7897 7893 #endif … … 8246 8242 - (DOMRange *)editableDOMRangeForPoint:(NSPoint)point 8247 8243 { 8248 Page* page = core(self);8244 auto* page = core(self); 8249 8245 if (!page) 8250 8246 return nil; 8251 return kit(page->mainFrame().editor().rangeForPoint( IntPoint([self convertPoint:point toView:nil])).get());8247 return kit(page->mainFrame().editor().rangeForPoint(WebCore::IntPoint([self convertPoint:point toView:nil])).get()); 8252 8248 } 8253 8249 … … 8274 8270 - (void)setSelectedDOMRange:(DOMRange *)range affinity:(NSSelectionAffinity)selectionAffinity 8275 8271 { 8276 Frame* coreFrame = core([self _selectedOrMainFrame]);8272 auto* coreFrame = core([self _selectedOrMainFrame]); 8277 8273 if (!coreFrame) 8278 8274 return; … … 8294 8290 - (DOMRange *)selectedDOMRange 8295 8291 { 8296 Frame* coreFrame = core([self _selectedOrMainFrame]);8292 auto* coreFrame = core([self _selectedOrMainFrame]); 8297 8293 if (!coreFrame) 8298 8294 return nil; … … 8302 8298 - (NSSelectionAffinity)selectionAffinity 8303 8299 { 8304 Frame* coreFrame = core([self _selectedOrMainFrame]);8300 auto* coreFrame = core([self _selectedOrMainFrame]); 8305 8301 if (!coreFrame) 8306 8302 return NSSelectionAffinityDownstream; … … 8321 8317 } 8322 8318 #endif 8323 Frame* mainFrame = [self _mainCoreFrame];8319 auto* mainFrame = [self _mainCoreFrame]; 8324 8320 if (mainFrame) { 8325 8321 if (flag) { … … 8342 8338 // We don't know enough at thls level to pass in a relevant WebUndoAction; we'd have to 8343 8339 // change the API to allow this. 8344 [[self _selectedOrMainFrame] _setTypingStyle:style withUndoAction: EditAction::Unspecified];8340 [[self _selectedOrMainFrame] _setTypingStyle:style withUndoAction:WebCore::EditAction::Unspecified]; 8345 8341 } 8346 8342 … … 8642 8638 { 8643 8639 WebFrame *webFrame = [self _selectedOrMainFrame]; 8644 Frame* coreFrame = core(webFrame);8640 auto* coreFrame = core(webFrame); 8645 8641 if (coreFrame) 8646 8642 coreFrame->editor().deleteSelectionWithSmartDelete([(WebHTMLView *)[[webFrame frameView] documentView] _canSmartCopyOrDelete]); … … 8652 8648 // change the API to allow this. 8653 8649 WebFrame *webFrame = [self _selectedOrMainFrame]; 8654 if ( Frame* coreFrame = core(webFrame)) {8650 if (auto* coreFrame = core(webFrame)) { 8655 8651 // FIXME: We shouldn't have to make a copy here. 8656 Ref< MutableStyleProperties> properties(core(style)->copyProperties());8652 Ref<WebCore::MutableStyleProperties> properties(core(style)->copyProperties()); 8657 8653 coreFrame->editor().applyStyle(properties.ptr()); 8658 8654 } … … 8702 8698 - (void)insertDictationPhrases:(NSArray *)dictationPhrases metadata:(id)metadata 8703 8699 { 8704 Frame* coreFrame = core([self _selectedOrMainFrame]);8700 auto* coreFrame = core([self _selectedOrMainFrame]); 8705 8701 if (!coreFrame) 8706 8702 return; … … 8739 8735 - (BOOL)_selectionIsCaret 8740 8736 { 8741 Frame* coreFrame = core([self _selectedOrMainFrame]);8737 auto* coreFrame = core([self _selectedOrMainFrame]); 8742 8738 if (!coreFrame) 8743 8739 return NO; … … 8747 8743 - (BOOL)_selectionIsAll 8748 8744 { 8749 Frame* coreFrame = core([self _selectedOrMainFrame]);8745 auto* coreFrame = core([self _selectedOrMainFrame]); 8750 8746 if (!coreFrame) 8751 8747 return NO; 8752 return coreFrame->selection().isAll( CanCrossEditingBoundary);8748 return coreFrame->selection().isAll(WebCore::CanCrossEditingBoundary); 8753 8749 } 8754 8750 8755 8751 - (void)_simplifyMarkup:(DOMNode *)startNode endNode:(DOMNode *)endNode 8756 8752 { 8757 Frame* coreFrame = core([self mainFrame]);8753 auto* coreFrame = core([self mainFrame]); 8758 8754 if (!coreFrame || !startNode) 8759 8755 return; 8760 Node* coreStartNode= core(startNode);8756 auto* coreStartNode= core(startNode); 8761 8757 if (&coreStartNode->document() != coreFrame->document()) 8762 8758 return; … … 8961 8957 nsurlCacheDiskCapacity = std::max(nsurlCacheDiskCapacity, [nsurlCache diskCapacity]); 8962 8958 8963 auto& memoryCache = MemoryCache::singleton();8959 auto& memoryCache = WebCore::MemoryCache::singleton(); 8964 8960 memoryCache.setCapacities(cacheMinDeadCapacity, cacheMaxDeadCapacity, cacheTotalCapacity); 8965 8961 memoryCache.setDeadDecodedDataDeletionInterval(deadDecodedDataDeletionInterval); 8966 8962 8967 auto& pageCache = PageCache::singleton();8963 auto& pageCache = WebCore::PageCache::singleton(); 8968 8964 pageCache.setMaxSize(pageCacheSize); 8969 8965 #if PLATFORM(IOS_FAMILY) … … 9021 9017 9022 9018 NSPasteboard *pasteboard = [NSPasteboard pasteboardWithUniqueName]; 9023 [pasteboard declareTypes:[NSArray arrayWithObject: legacyStringPasteboardType()] owner:nil];9019 [pasteboard declareTypes:[NSArray arrayWithObject:WebCore::legacyStringPasteboardType()] owner:nil]; 9024 9020 NSMutableString *s = [selectedString mutableCopy]; 9025 9021 const unichar nonBreakingSpaceCharacter = 0xA0; 9026 9022 NSString *nonBreakingSpaceString = [NSString stringWithCharacters:&nonBreakingSpaceCharacter length:1]; 9027 9023 [s replaceOccurrencesOfString:nonBreakingSpaceString withString:@" " options:0 range:NSMakeRange(0, [s length])]; 9028 [pasteboard setString:s forType: legacyStringPasteboardType()];9024 [pasteboard setString:s forType:WebCore::legacyStringPasteboardType()]; 9029 9025 [s release]; 9030 9026 … … 9101 9097 // Bit 0 is set if user can set the focus to menus, the dock, and various windows using the keyboard. 9102 9098 // Bit 1 is set if controls other than text fields are included in the tab order (WebKit also always includes lists). 9103 _private->_keyboardUIMode = (mode & 0x2) ? KeyboardAccessFull :KeyboardAccessDefault;9099 _private->_keyboardUIMode = (mode & 0x2) ? WebCore::KeyboardAccessFull : WebCore::KeyboardAccessDefault; 9104 9100 #if !PLATFORM(IOS_FAMILY) 9105 9101 // check for tabbing to links 9106 9102 if ([_private->preferences tabsToLinks]) 9107 _private->_keyboardUIMode = ( KeyboardUIMode)(_private->_keyboardUIMode |KeyboardAccessTabsToLinks);9108 #endif 9109 } 9110 9111 - ( KeyboardUIMode)_keyboardUIMode9103 _private->_keyboardUIMode = (WebCore::KeyboardUIMode)(_private->_keyboardUIMode | WebCore::KeyboardAccessTabsToLinks); 9104 #endif 9105 } 9106 9107 - (WebCore::KeyboardUIMode)_keyboardUIMode 9112 9108 { 9113 9109 if (!_private->_keyboardUIModeAccessed) { … … 9136 9132 #endif 9137 9133 9138 - ( Frame*)_mainCoreFrame9134 - (WebCore::Frame*)_mainCoreFrame 9139 9135 { 9140 9136 return (_private && _private->page) ? &_private->page->mainFrame() : 0; … … 9151 9147 - (void)_clearCredentials 9152 9148 { 9153 Frame* frame = [self _mainCoreFrame];9149 auto* frame = [self _mainCoreFrame]; 9154 9150 if (!frame) 9155 9151 return; 9156 9152 9157 NetworkingContext* networkingContext = frame->loader().networkingContext();9153 auto* networkingContext = frame->loader().networkingContext(); 9158 9154 if (!networkingContext) 9159 9155 return; … … 9254 9250 - (BOOL)_flushCompositingChanges 9255 9251 { 9256 Frame* frame = [self _mainCoreFrame];9252 auto* frame = [self _mainCoreFrame]; 9257 9253 if (frame && frame->view()) 9258 9254 return frame->view()->flushCompositingStateIncludingSubframes(); … … 9264 9260 - (void)_scheduleLayerFlushForPendingTileCacheRepaint 9265 9261 { 9266 Frame* coreFrame = [self _mainCoreFrame];9267 if ( FrameView* view = coreFrame->view())9262 auto* coreFrame = [self _mainCoreFrame]; 9263 if (auto* view = coreFrame->view()) 9268 9264 view->scheduleLayerFlushAllowingThrottling(); 9269 9265 } … … 9315 9311 return false; 9316 9312 9317 HTMLMediaElement* mediaElement = _private->playbackSessionModel->mediaElement();9313 auto* mediaElement = _private->playbackSessionModel->mediaElement(); 9318 9314 if (!mediaElement) 9319 9315 return false; … … 9328 9324 9329 9325 if (!_private->playbackSessionModel) 9330 _private->playbackSessionModel = PlaybackSessionModelMediaElement::create();9326 _private->playbackSessionModel = WebCore::PlaybackSessionModelMediaElement::create(); 9331 9327 _private->playbackSessionModel->setMediaElement(&mediaElement); 9332 9328 9333 9329 if (!_private->playbackSessionInterface) 9334 _private->playbackSessionInterface = PlaybackSessionInterfaceMac::create(*_private->playbackSessionModel);9330 _private->playbackSessionInterface = WebCore::PlaybackSessionInterfaceMac::create(*_private->playbackSessionModel); 9335 9331 9336 9332 [self updateTouchBar]; … … 9383 9379 { 9384 9380 WebFrame *webFrame = [self _selectedOrMainFrame]; 9385 Frame* coreFrame = core(webFrame);9381 auto* coreFrame = core(webFrame); 9386 9382 if (coreFrame) 9387 9383 coreFrame->editor().handleAlternativeTextUIResult(text); … … 9390 9386 9391 9387 #if USE(DICTATION_ALTERNATIVES) 9392 - (void)_getWebCoreDictationAlternatives:(Vector< DictationAlternative>&)alternatives fromTextAlternatives:(const Vector<TextAlternativeWithRange>&)alternativesWithRange9388 - (void)_getWebCoreDictationAlternatives:(Vector<WebCore::DictationAlternative>&)alternatives fromTextAlternatives:(const Vector<WebCore::TextAlternativeWithRange>&)alternativesWithRange 9393 9389 { 9394 9390 for (size_t i = 0; i < alternativesWithRange.size(); ++i) { 9395 const TextAlternativeWithRange& alternativeWithRange = alternativesWithRange[i];9391 const WebCore::TextAlternativeWithRange& alternativeWithRange = alternativesWithRange[i]; 9396 9392 uint64_t dictationContext = _private->m_alternativeTextUIController->addAlternatives(alternativeWithRange.alternatives); 9397 9393 if (dictationContext) 9398 alternatives.append( DictationAlternative(alternativeWithRange.range.location, alternativeWithRange.range.length, dictationContext));9394 alternatives.append(WebCore::DictationAlternative(alternativeWithRange.range.location, alternativeWithRange.range.length, dictationContext)); 9399 9395 } 9400 9396 } … … 9447 9443 } 9448 9444 9449 - (id)_animationControllerForDictionaryLookupPopupInfo:(const DictionaryPopupInfo&)dictionaryPopupInfo9445 - (id)_animationControllerForDictionaryLookupPopupInfo:(const WebCore::DictionaryPopupInfo&)dictionaryPopupInfo 9450 9446 { 9451 9447 if (!dictionaryPopupInfo.attributedString) … … 9454 9450 [self _prepareForDictionaryLookup]; 9455 9451 9456 return DictionaryLookup::animationControllerForPopup(dictionaryPopupInfo, self, [self](TextIndicator& textIndicator) {9457 [self _setTextIndicator:textIndicator withLifetime: TextIndicatorWindowLifetime::Permanent];9458 }, [self]( FloatRect rectInRootViewCoordinates) {9452 return WebCore::DictionaryLookup::animationControllerForPopup(dictionaryPopupInfo, self, [self](WebCore::TextIndicator& textIndicator) { 9453 [self _setTextIndicator:textIndicator withLifetime:WebCore::TextIndicatorWindowLifetime::Permanent]; 9454 }, [self](WebCore::FloatRect rectInRootViewCoordinates) { 9459 9455 return [self _convertRectFromRootView:rectInRootViewCoordinates]; 9460 9456 }, [self]() { 9461 [self _clearTextIndicatorWithAnimation: TextIndicatorWindowDismissalAnimation::FadeOut];9457 [self _clearTextIndicatorWithAnimation:WebCore::TextIndicatorWindowDismissalAnimation::FadeOut]; 9462 9458 }); 9463 9459 } … … 9473 9469 } 9474 9470 9475 - (void)_setTextIndicator:( TextIndicator&)textIndicator9476 { 9477 [self _setTextIndicator:textIndicator withLifetime: TextIndicatorWindowLifetime::Permanent];9478 } 9479 9480 - (void)_setTextIndicator:( TextIndicator&)textIndicator withLifetime:(TextIndicatorWindowLifetime)lifetime9471 - (void)_setTextIndicator:(WebCore::TextIndicator&)textIndicator 9472 { 9473 [self _setTextIndicator:textIndicator withLifetime:WebCore::TextIndicatorWindowLifetime::Permanent]; 9474 } 9475 9476 - (void)_setTextIndicator:(WebCore::TextIndicator&)textIndicator withLifetime:(WebCore::TextIndicatorWindowLifetime)lifetime 9481 9477 { 9482 9478 if (!_private->textIndicatorWindow) 9483 _private->textIndicatorWindow = makeUnique< TextIndicatorWindow>(self);9479 _private->textIndicatorWindow = makeUnique<WebCore::TextIndicatorWindow>(self); 9484 9480 9485 9481 NSRect textBoundingRectInWindowCoordinates = [self convertRect:[self _convertRectFromRootView:textIndicator.textBoundingRectInRootViewCoordinates()] toView:nil]; … … 9488 9484 } 9489 9485 9490 - (void)_clearTextIndicatorWithAnimation:( TextIndicatorWindowDismissalAnimation)animation9486 - (void)_clearTextIndicatorWithAnimation:(WebCore::TextIndicatorWindowDismissalAnimation)animation 9491 9487 { 9492 9488 if (_private->textIndicatorWindow) 9493 _private->textIndicatorWindow->clearTextIndicator( TextIndicatorWindowDismissalAnimation::FadeOut);9489 _private->textIndicatorWindow->clearTextIndicator(WebCore::TextIndicatorWindowDismissalAnimation::FadeOut); 9494 9490 _private->textIndicatorWindow = nullptr; 9495 9491 } … … 9515 9511 } 9516 9512 9517 - (void)_showDictionaryLookupPopup:(const DictionaryPopupInfo&)dictionaryPopupInfo9513 - (void)_showDictionaryLookupPopup:(const WebCore::DictionaryPopupInfo&)dictionaryPopupInfo 9518 9514 { 9519 9515 if (!dictionaryPopupInfo.attributedString) … … 9522 9518 [self _prepareForDictionaryLookup]; 9523 9519 9524 DictionaryLookup::showPopup(dictionaryPopupInfo, self, [self](TextIndicator& textIndicator) {9525 [self _setTextIndicator:textIndicator withLifetime: TextIndicatorWindowLifetime::Permanent];9526 }, [self]( FloatRect rectInRootViewCoordinates) {9520 WebCore::DictionaryLookup::showPopup(dictionaryPopupInfo, self, [self](WebCore::TextIndicator& textIndicator) { 9521 [self _setTextIndicator:textIndicator withLifetime:WebCore::TextIndicatorWindowLifetime::Permanent]; 9522 }, [self](WebCore::FloatRect rectInRootViewCoordinates) { 9527 9523 return [self _convertRectFromRootView:rectInRootViewCoordinates]; 9528 9524 }, [weakSelf = WeakObjCPtr<WebView>(self)]() { 9529 [weakSelf.get() _clearTextIndicatorWithAnimation: TextIndicatorWindowDismissalAnimation::FadeOut];9525 [weakSelf.get() _clearTextIndicatorWithAnimation:WebCore::TextIndicatorWindowDismissalAnimation::FadeOut]; 9530 9526 }); 9531 9527 } … … 9534 9530 - (void)_dictionaryLookupPopoverWillClose:(NSNotification *)notification 9535 9531 { 9536 [self _clearTextIndicatorWithAnimation: TextIndicatorWindowDismissalAnimation::FadeOut];9532 [self _clearTextIndicatorWithAnimation:WebCore::TextIndicatorWindowDismissalAnimation::FadeOut]; 9537 9533 } 9538 9534 #endif // ENABLE(REVEAL) … … 9545 9541 #if PLATFORM(MAC) 9546 9542 double minimumFontSize = _private->page ? _private->page->settings().minimumFontSize() : 0; 9547 _private->formValidationBubble = ValidationBubble::create(self, message, { minimumFontSize });9548 _private->formValidationBubble->showRelativeTo( enclosingIntRect([self _convertRectFromRootView:anchorRect]));9543 _private->formValidationBubble = WebCore::ValidationBubble::create(self, message, { minimumFontSize }); 9544 _private->formValidationBubble->showRelativeTo(WebCore::enclosingIntRect([self _convertRectFromRootView:anchorRect])); 9549 9545 #else 9550 9546 UNUSED_PARAM(message); … … 9712 9708 - (NSTouchBar *)textTouchBar 9713 9709 { 9714 Frame* coreFrame = core([self _selectedOrMainFrame]);9710 auto* coreFrame = core([self _selectedOrMainFrame]); 9715 9711 if (!coreFrame) 9716 9712 return nil; … … 9722 9718 } 9723 9719 9724 static NSTextAlignment nsTextAlignmentFromRenderStyle(const RenderStyle* style)9720 static NSTextAlignment nsTextAlignmentFromRenderStyle(const WebCore::RenderStyle* style) 9725 9721 { 9726 9722 NSTextAlignment textAlignment; 9727 9723 switch (style->textAlign()) { 9728 case TextAlignMode::Right:9729 case TextAlignMode::WebKitRight:9724 case WebCore::TextAlignMode::Right: 9725 case WebCore::TextAlignMode::WebKitRight: 9730 9726 textAlignment = NSTextAlignmentRight; 9731 9727 break; 9732 case TextAlignMode::Left:9733 case TextAlignMode::WebKitLeft:9728 case WebCore::TextAlignMode::Left: 9729 case WebCore::TextAlignMode::WebKitLeft: 9734 9730 textAlignment = NSTextAlignmentLeft; 9735 9731 break; 9736 case TextAlignMode::Center:9737 case TextAlignMode::WebKitCenter:9732 case WebCore::TextAlignMode::Center: 9733 case WebCore::TextAlignMode::WebKitCenter: 9738 9734 textAlignment = NSTextAlignmentCenter; 9739 9735 break; 9740 case TextAlignMode::Justify:9736 case WebCore::TextAlignMode::Justify: 9741 9737 textAlignment = NSTextAlignmentJustified; 9742 9738 break; 9743 case TextAlignMode::Start:9739 case WebCore::TextAlignMode::Start: 9744 9740 textAlignment = style->isLeftToRightDirection() ? NSTextAlignmentLeft : NSTextAlignmentRight; 9745 9741 break; 9746 case TextAlignMode::End:9742 case WebCore::TextAlignMode::End: 9747 9743 textAlignment = style->isLeftToRightDirection() ? NSTextAlignmentRight : NSTextAlignmentLeft; 9748 9744 break; … … 9756 9752 - (void)updateTextTouchBar 9757 9753 { 9754 using namespace WebCore; 9758 9755 BOOL touchBarsRequireInitialization = !_private->_richTextTouchBar || !_private->_plainTextTouchBar; 9759 9756 if (_private->_isDeferringTextTouchBarUpdates && !touchBarsRequireInitialization) { … … 9770 9767 return; 9771 9768 9772 Frame* coreFrame = core([self _selectedOrMainFrame]);9769 auto* coreFrame = core([self _selectedOrMainFrame]); 9773 9770 if (!coreFrame) 9774 9771 return; … … 9895 9892 return; 9896 9893 9897 Frame* coreFrame = core([self _selectedOrMainFrame]);9894 auto* coreFrame = core([self _selectedOrMainFrame]); 9898 9895 if (!coreFrame) 9899 9896 return; … … 9947 9944 - (NSCandidateListTouchBarItem *)candidateList 9948 9945 { 9949 Frame* coreFrame = core([self _selectedOrMainFrame]);9946 auto* coreFrame = core([self _selectedOrMainFrame]); 9950 9947 if (!coreFrame) 9951 9948 return nil; … … 10033 10030 #if ENABLE(GEOLOCATION) 10034 10031 if (_private && _private->page) { 10035 auto geolocatioError = GeolocationError::create(GeolocationError::PositionUnavailable, errorMessage);10032 auto geolocatioError = WebCore::GeolocationError::create(WebCore::GeolocationError::PositionUnavailable, errorMessage); 10036 10033 WebCore::GeolocationController::from(_private->page)->errorOccurred(geolocatioError.get()); 10037 10034 } … … 10043 10040 { 10044 10041 #if ENABLE(GEOLOCATION) 10045 Frame* frame = [self _mainCoreFrame];10042 auto* frame = [self _mainCoreFrame]; 10046 10043 if (frame) 10047 10044 frame->resetAllGeolocationPermission(); … … 10090 10087 return 0; 10091 10088 JSContextRef context = [[self mainFrame] globalContext]; 10092 auto* notification = JSNotification::toWrapped(toJS(context)->vm(), toJS(toJS(context), jsNotification));10093 return static_cast<WebNotificationClient*>( NotificationController::clientFrom(*page))->notificationIDForTesting(notification);10089 auto* notification = WebCore::JSNotification::toWrapped(toJS(context)->vm(), toJS(toJS(context), jsNotification)); 10090 return static_cast<WebNotificationClient*>(WebCore::NotificationController::clientFrom(*page))->notificationIDForTesting(notification); 10094 10091 #else 10095 10092 return 0; -
trunk/Source/WebKitLegacy/scripts/generate-unified-sources.sh
r247570 r250549 16 16 17 17 UnifiedSourceCppFileCount=5 18 UnifiedSourceMmFileCount= 1818 UnifiedSourceMmFileCount=20 19 19 20 20 if [ $# -eq 0 ]; then
Note:
See TracChangeset
for help on using the changeset viewer.