WTF should know about Language
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 May 2016 19:38:51 +0000 (19:38 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 May 2016 19:38:51 +0000 (19:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=157756

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

Teach our scripts that a ObjC class beginning with WTF is totally cool.

* JavaScriptCore.xcodeproj/project.pbxproj:

Source/WebCore:

Reviewed by Geoffrey Garen.

No new tests because this does not change behavior.

This change is all about moving some language functionality to WTF. Quoting the WTF
ChangeLog, this contains two changes:

- Move everything that WebCore's logic for getting the platform user preferred language
  depended on into WTF. This means CFBundleSPI.h and BlockObjCExceptions.h|cpp.

- Move WebCore::platformUserPreferredLanguages() to WTF::platformUserPreferredLanguages().
  This is needed by https://bugs.webkit.org/show_bug.cgi?id=157755, which will make JSC
  use this to detect the platform user preferred language when running standalone.

The changes in WebCore are mostly about rewiring #includes and #imports and removing the
code that we moved to WTF. But there is one logic change: previously,
platformUserPreferredLanguages() would call WebCore::languageDidChange(). It can't do that
directly anymore, but WTF gives WebCore some API for registering the callback. So in
Language.cpp we now register languageDidChange anytime we do something that would
necessitate it, like calling platformUserPreferredLanguages(). This also registers the
callback inside addLanguageChangeObserver(), since it's possible for that to be called
after JSC had called platformUserPreferredLanguages() but before WebCore does so.

* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* PlatformWin.cmake:
* WebCore.xcodeproj/project.pbxproj:
* bindings/objc/DOMCustomXPathNSResolver.mm:
* editing/ios/EditorIOS.mm:
* editing/mac/DictionaryLookup.mm:
* editing/mac/EditorMac.mm:
* page/CaptionUserPreferencesMediaAF.cpp:
* page/ios/EventHandlerIOS.mm:
* page/ios/FrameIOS.mm:
* page/mac/ChromeMac.mm:
* page/mac/EventHandlerMac.mm:
* platform/Language.cpp:
(WebCore::registerLanguageDidChangeCallbackIfNecessary):
(WebCore::observerMap):
(WebCore::addLanguageChangeObserver):
(WebCore::overrideUserPreferredLanguages):
(WebCore::userPreferredLanguages):
* platform/Language.h:
* platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
* platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
* platform/graphics/cocoa/FontCocoa.mm:
* platform/graphics/mac/ColorMac.mm:
* platform/graphics/mac/GraphicsContext3DMac.mm:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
* platform/ios/PlatformSpeechSynthesizerIOS.mm:
* platform/ios/ScrollViewIOS.mm:
* platform/ios/WidgetIOS.mm:
* platform/mac/BlockExceptions.h: Removed.
* platform/mac/BlockExceptions.mm: Removed.
* platform/mac/CursorMac.mm:
* platform/mac/Language.mm: Removed.
* platform/mac/ScrollAnimatorMac.mm:
* platform/mac/ScrollViewMac.mm:
* platform/mac/ScrollbarThemeMac.mm:
* platform/mac/ThemeMac.mm:
* platform/mac/WidgetMac.mm:
* platform/mediastream/mac/AVVideoCaptureSource.mm:
* platform/network/mac/CookieJarMac.mm:
* platform/network/mac/ResourceErrorMac.mm:
* platform/network/mac/ResourceHandleMac.mm:
* platform/spi/cf/CFBundleSPI.h: Removed.
* platform/unix/LanguageUnix.cpp: Removed.
* platform/win/LanguageWin.cpp: Removed.

Source/WebKit/mac:

Reviewed by Geoffrey Garen.

Rewires a bunch of includes/imports.

* WebCoreSupport/PopupMenuMac.mm:
* WebCoreSupport/WebChromeClient.mm:
* WebCoreSupport/WebFrameLoaderClient.mm:
* WebCoreSupport/WebGeolocationClient.mm:
* WebCoreSupport/WebNotificationClient.mm:
* WebCoreSupport/WebPlatformStrategies.mm:
* WebCoreSupport/WebUserMediaClient.mm:
* WebCoreSupport/WebVisitedLinkStore.mm:
* WebView/WebHTMLView.mm:

Source/WebKit2:

Reviewed by Geoffrey Garen and Alexey Proskuryakov.

Rewires a bunch of includes/imports.

* Shared/mac/RemoteLayerTreePropertyApplier.mm:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:

Source/WTF:

Reviewed by Geoffrey Garen.

This contains two changes:

- Move everything that WebCore's logic for getting the platform user preferred language
  depended on into WTF. This means CFBundleSPI.h and BlockObjCExceptions.h|cpp.

- Move WebCore::platformUserPreferredLanguages() to WTF::platformUserPreferredLanguages().
  This is needed by https://bugs.webkit.org/show_bug.cgi?id=157755, which will make JSC
  use this to detect the platform user preferred language when running standalone.

Moving the dependencies accounts for a huge chunk of this change, since we have to rewire
all of the references to those headers in all of WebKit.

Moving platformUserPreferredLanguages() is mostly easy except for the weird callback.
That function would call languageDidChange(), which needs to stay in WebCore. So, this
gives WebCore the ability to register a languageDidChange callback. Other than this new
logic, the code being added to WTF is just being lifted out of WebCore.

* WTF.xcodeproj/project.pbxproj:
* wtf/BlockObjCExceptions.h: Added.
* wtf/BlockObjCExceptions.mm: Added.
(ReportBlockedObjCException):
* wtf/PlatformEfl.cmake:
* wtf/PlatformGTK.cmake:
* wtf/PlatformJSCOnly.cmake:
* wtf/PlatformMac.cmake:
* wtf/PlatformUserPreferredLanguages.h: Added.
* wtf/PlatformUserPreferredLanguagesMac.mm: Added.
(WTF::setPlatformUserPreferredLanguagesChangedCallback):
(WTF::preferredLanguages):
(+[WTFLanguageChangeObserver languagePreferencesDidChange:]):
(WTF::httpStyleLanguageCode):
(WTF::isValidICUCountryCode):
(WTF::platformUserPreferredLanguages):
* wtf/PlatformUserPreferredLanguagesUnix.cpp: Added.
(WTF::setPlatformUserPreferredLanguagesChangedCallback):
(WTF::platformLanguage):
(WTF::platformUserPreferredLanguages):
* wtf/PlatformUserPreferredLanguagesWin.cpp: Added.
(WTF::setPlatformUserPreferredLanguagesChangedCallback):
(WTF::localeInfo):
(WTF::platformLanguage):
(WTF::platformUserPreferredLanguages):
* wtf/PlatformWin.cmake:
* wtf/spi/cf: Added.
* wtf/spi/cf/CFBundleSPI.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201038 268f45cc-cd09-0410-ab3c-d52691b4dbfc

71 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/WTF/ChangeLog
Source/WTF/WTF.xcodeproj/project.pbxproj
Source/WTF/wtf/BlockObjCExceptions.h [moved from Source/WebCore/platform/mac/BlockExceptions.h with 90% similarity]
Source/WTF/wtf/BlockObjCExceptions.mm [moved from Source/WebCore/platform/mac/BlockExceptions.mm with 83% similarity]
Source/WTF/wtf/PlatformEfl.cmake
Source/WTF/wtf/PlatformGTK.cmake
Source/WTF/wtf/PlatformJSCOnly.cmake
Source/WTF/wtf/PlatformMac.cmake
Source/WTF/wtf/PlatformUserPreferredLanguages.h [new file with mode: 0644]
Source/WTF/wtf/PlatformUserPreferredLanguagesMac.mm [moved from Source/WebCore/platform/mac/Language.mm with 91% similarity]
Source/WTF/wtf/PlatformUserPreferredLanguagesUnix.cpp [moved from Source/WebCore/platform/unix/LanguageUnix.cpp with 88% similarity]
Source/WTF/wtf/PlatformUserPreferredLanguagesWin.cpp [moved from Source/WebCore/platform/win/LanguageWin.cpp with 92% similarity]
Source/WTF/wtf/PlatformWin.cmake
Source/WTF/wtf/spi/cf/CFBundleSPI.h [moved from Source/WebCore/platform/spi/cf/CFBundleSPI.h with 100% similarity]
Source/WebCore/ChangeLog
Source/WebCore/PlatformEfl.cmake
Source/WebCore/PlatformGTK.cmake
Source/WebCore/PlatformMac.cmake
Source/WebCore/PlatformWin.cmake
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/objc/DOMCustomXPathNSResolver.mm
Source/WebCore/editing/ios/EditorIOS.mm
Source/WebCore/editing/mac/DictionaryLookup.mm
Source/WebCore/editing/mac/EditorMac.mm
Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp
Source/WebCore/page/ios/EventHandlerIOS.mm
Source/WebCore/page/ios/FrameIOS.mm
Source/WebCore/page/mac/ChromeMac.mm
Source/WebCore/page/mac/EventHandlerMac.mm
Source/WebCore/platform/Language.cpp
Source/WebCore/platform/Language.h
Source/WebCore/platform/cocoa/ContentFilterUnblockHandlerCocoa.mm
Source/WebCore/platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm
Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm
Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
Source/WebCore/platform/graphics/cocoa/FontCocoa.mm
Source/WebCore/platform/graphics/mac/ColorMac.mm
Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm
Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm
Source/WebCore/platform/ios/ScrollViewIOS.mm
Source/WebCore/platform/ios/WidgetIOS.mm
Source/WebCore/platform/mac/CursorMac.mm
Source/WebCore/platform/mac/ScrollAnimatorMac.mm
Source/WebCore/platform/mac/ScrollViewMac.mm
Source/WebCore/platform/mac/ScrollbarThemeMac.mm
Source/WebCore/platform/mac/ThemeMac.mm
Source/WebCore/platform/mac/WidgetMac.mm
Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm
Source/WebCore/platform/network/mac/CookieJarMac.mm
Source/WebCore/platform/network/mac/ResourceErrorMac.mm
Source/WebCore/platform/network/mac/ResourceHandleMac.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/PopupMenuMac.mm
Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
Source/WebKit/mac/WebCoreSupport/WebGeolocationClient.mm
Source/WebKit/mac/WebCoreSupport/WebNotificationClient.mm
Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm
Source/WebKit/mac/WebCoreSupport/WebUserMediaClient.mm
Source/WebKit/mac/WebCoreSupport/WebVisitedLinkStore.mm
Source/WebKit/mac/WebView/WebHTMLView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm
Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm
Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm
Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm

index 3882e24..4aab592 100644 (file)
@@ -1,3 +1,14 @@
+2016-05-17  Filip Pizlo  <fpizlo@apple.com>
+
+        WTF should know about Language
+        https://bugs.webkit.org/show_bug.cgi?id=157756
+
+        Reviewed by Geoffrey Garen.
+
+        Teach our scripts that a ObjC class beginning with WTF is totally cool.
+
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+
 2016-05-17  Joseph Pecoraro  <pecoraro@apple.com>
 
         console namespace breaks putting properties on console.__proto__
index cbc2150..684cded 100644 (file)
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                        shellPath = /bin/sh;
-                       shellScript = "set -e\n\nif [ \"${ACTION}\" = \"installhdrs\" ]; then\n    exit 0;\nfi\n\nif [ -f ../../Tools/Scripts/check-for-inappropriate-objc-class-names ]; then\n    ../../Tools/Scripts/check-for-inappropriate-objc-class-names JS\nfi";
+                       shellScript = "set -e\n\nif [ \"${ACTION}\" = \"installhdrs\" ]; then\n    exit 0;\nfi\n\nif [ -f ../../Tools/Scripts/check-for-inappropriate-objc-class-names ]; then\n    ../../Tools/Scripts/check-for-inappropriate-objc-class-names JS WTF\nfi";
                };
                3732811A17FCD235004AD519 /* Postprocess Headers */ = {
                        isa = PBXShellScriptBuildPhase;
index 52f69d7..b4e7851 100644 (file)
@@ -1,3 +1,56 @@
+2016-05-17  Filip Pizlo  <fpizlo@apple.com>
+
+        WTF should know about Language
+        https://bugs.webkit.org/show_bug.cgi?id=157756
+
+        Reviewed by Geoffrey Garen.
+
+        This contains two changes:
+
+        - Move everything that WebCore's logic for getting the platform user preferred language
+          depended on into WTF. This means CFBundleSPI.h and BlockObjCExceptions.h|cpp.
+
+        - Move WebCore::platformUserPreferredLanguages() to WTF::platformUserPreferredLanguages().
+          This is needed by https://bugs.webkit.org/show_bug.cgi?id=157755, which will make JSC
+          use this to detect the platform user preferred language when running standalone.
+
+        Moving the dependencies accounts for a huge chunk of this change, since we have to rewire
+        all of the references to those headers in all of WebKit.
+
+        Moving platformUserPreferredLanguages() is mostly easy except for the weird callback.
+        That function would call languageDidChange(), which needs to stay in WebCore. So, this
+        gives WebCore the ability to register a languageDidChange callback. Other than this new
+        logic, the code being added to WTF is just being lifted out of WebCore.
+
+        * WTF.xcodeproj/project.pbxproj:
+        * wtf/BlockObjCExceptions.h: Added.
+        * wtf/BlockObjCExceptions.mm: Added.
+        (ReportBlockedObjCException):
+        * wtf/PlatformEfl.cmake:
+        * wtf/PlatformGTK.cmake:
+        * wtf/PlatformJSCOnly.cmake:
+        * wtf/PlatformMac.cmake:
+        * wtf/PlatformUserPreferredLanguages.h: Added.
+        * wtf/PlatformUserPreferredLanguagesMac.mm: Added.
+        (WTF::setPlatformUserPreferredLanguagesChangedCallback):
+        (WTF::preferredLanguages):
+        (+[WTFLanguageChangeObserver languagePreferencesDidChange:]):
+        (WTF::httpStyleLanguageCode):
+        (WTF::isValidICUCountryCode):
+        (WTF::platformUserPreferredLanguages):
+        * wtf/PlatformUserPreferredLanguagesUnix.cpp: Added.
+        (WTF::setPlatformUserPreferredLanguagesChangedCallback):
+        (WTF::platformLanguage):
+        (WTF::platformUserPreferredLanguages):
+        * wtf/PlatformUserPreferredLanguagesWin.cpp: Added.
+        (WTF::setPlatformUserPreferredLanguagesChangedCallback):
+        (WTF::localeInfo):
+        (WTF::platformLanguage):
+        (WTF::platformUserPreferredLanguages):
+        * wtf/PlatformWin.cmake:
+        * wtf/spi/cf: Added.
+        * wtf/spi/cf/CFBundleSPI.h: Added.
+
 2016-05-17  Youenn Fablet  <youenn.fablet@crf.canon.fr>
 
         DOMPromise should only restrict the resolution type
index 4e4022d..69050ae 100644 (file)
                CD5497AD15857D0300B5BC30 /* MediaTime.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5497AB15857D0300B5BC30 /* MediaTime.h */; };
                CE46516E19DB1FB4003ECA05 /* NSMapTableSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CE46516D19DB1FB4003ECA05 /* NSMapTableSPI.h */; };
                CE73E02519DCB7AB00580D5C /* XPCSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CE73E02419DCB7AB00580D5C /* XPCSPI.h */; };
+               DCEE21FB1CEA7538000C2396 /* CFBundleSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = DCEE21FA1CEA7538000C2396 /* CFBundleSPI.h */; };
+               DCEE22001CEA7551000C2396 /* BlockObjCExceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = DCEE21FC1CEA7551000C2396 /* BlockObjCExceptions.h */; };
+               DCEE22011CEA7551000C2396 /* BlockObjCExceptions.mm in Sources */ = {isa = PBXBuildFile; fileRef = DCEE21FD1CEA7551000C2396 /* BlockObjCExceptions.mm */; };
+               DCEE22021CEA7551000C2396 /* PlatformUserPreferredLanguages.h in Headers */ = {isa = PBXBuildFile; fileRef = DCEE21FE1CEA7551000C2396 /* PlatformUserPreferredLanguages.h */; };
+               DCEE22031CEA7551000C2396 /* PlatformUserPreferredLanguagesMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = DCEE21FF1CEA7551000C2396 /* PlatformUserPreferredLanguagesMac.mm */; };
                DE5A09FC1BA36992003D4424 /* CommonCryptoSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = DE5A09FB1BA36992003D4424 /* CommonCryptoSPI.h */; };
                E15556F518A0CC18006F48FB /* CryptographicUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E15556F318A0CC18006F48FB /* CryptographicUtilities.cpp */; };
                E15556F618A0CC18006F48FB /* CryptographicUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = E15556F418A0CC18006F48FB /* CryptographicUtilities.h */; };
                CD5497AB15857D0300B5BC30 /* MediaTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaTime.h; sourceTree = "<group>"; };
                CE46516D19DB1FB4003ECA05 /* NSMapTableSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSMapTableSPI.h; sourceTree = "<group>"; };
                CE73E02419DCB7AB00580D5C /* XPCSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPCSPI.h; sourceTree = "<group>"; };
+               DCEE21FA1CEA7538000C2396 /* CFBundleSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFBundleSPI.h; path = cf/CFBundleSPI.h; sourceTree = "<group>"; };
+               DCEE21FC1CEA7551000C2396 /* BlockObjCExceptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlockObjCExceptions.h; sourceTree = "<group>"; };
+               DCEE21FD1CEA7551000C2396 /* BlockObjCExceptions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BlockObjCExceptions.mm; sourceTree = "<group>"; };
+               DCEE21FE1CEA7551000C2396 /* PlatformUserPreferredLanguages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformUserPreferredLanguages.h; sourceTree = "<group>"; };
+               DCEE21FF1CEA7551000C2396 /* PlatformUserPreferredLanguagesMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformUserPreferredLanguagesMac.mm; sourceTree = "<group>"; };
                DE5A09FB1BA36992003D4424 /* CommonCryptoSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommonCryptoSPI.h; sourceTree = "<group>"; };
                E15556F318A0CC18006F48FB /* CryptographicUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CryptographicUtilities.cpp; sourceTree = "<group>"; };
                E15556F418A0CC18006F48FB /* CryptographicUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptographicUtilities.h; sourceTree = "<group>"; };
                                A8A4725F151A825A004123FF /* Bitmap.h */,
                                A8A47260151A825A004123FF /* BitVector.cpp */,
                                A8A47261151A825A004123FF /* BitVector.h */,
+                               DCEE21FC1CEA7551000C2396 /* BlockObjCExceptions.h */,
+                               DCEE21FD1CEA7551000C2396 /* BlockObjCExceptions.mm */,
                                1A944F461C3D8814005BD28C /* BlockPtr.h */,
                                A8A47264151A825A004123FF /* BlockStack.h */,
                                A8A47265151A825A004123FF /* BloomFilter.h */,
                                0F824A651B7443A0002E345D /* ParkingLot.h */,
                                A8A472ED151A825B004123FF /* PassRefPtr.h */,
                                A876DBD7151816E500DADB95 /* Platform.h */,
+                               DCEE21FE1CEA7551000C2396 /* PlatformUserPreferredLanguages.h */,
+                               DCEE21FF1CEA7551000C2396 /* PlatformUserPreferredLanguagesMac.mm */,
                                0FF860941BCCBD740045127F /* PointerComparison.h */,
                                0F9D335D165DBA73005AD387 /* PrintStream.cpp */,
                                0F9D335E165DBA73005AD387 /* PrintStream.h */,
                CEF4820C19DA347600CC04B8 /* spi */ = {
                        isa = PBXGroup;
                        children = (
+                               DCEE21F91CEA752F000C2396 /* cf */,
                                CE46516C19DB1FB4003ECA05 /* cocoa */,
                                CE73E02319DCB7AB00580D5C /* darwin */,
                        );
                        path = spi;
                        sourceTree = "<group>";
                };
+               DCEE21F91CEA752F000C2396 /* cf */ = {
+                       isa = PBXGroup;
+                       children = (
+                               DCEE21FA1CEA7538000C2396 /* CFBundleSPI.h */,
+                       );
+                       name = cf;
+                       sourceTree = "<group>";
+               };
                E4A0AD3B1A96251900536DF6 /* cocoa */ = {
                        isa = PBXGroup;
                        children = (
                                9BD8F40B176C2B470002D865 /* AtomicStringTable.h in Headers */,
                                1469419C16EAB10A0024E146 /* AutodrainedPool.h in Headers */,
                                0FB14E19180FA218009B6B4D /* Bag.h in Headers */,
+                               DCEE22001CEA7551000C2396 /* BlockObjCExceptions.h in Headers */,
                                0FB14E1B1810E1DC009B6B4D /* BagToHashMap.h in Headers */,
                                8134013915B092FD001FF0B8 /* Base64.h in Headers */,
                                A8A473A9151A825B004123FF /* bignum-dtoa.h in Headers */,
                                A8A4743F151A825B004123FF /* StringHash.h in Headers */,
                                A748745417A0BDAE00FA04CB /* StringHashDumpContext.h in Headers */,
                                A8A47441151A825B004123FF /* StringImpl.h in Headers */,
+                               DCEE21FB1CEA7538000C2396 /* CFBundleSPI.h in Headers */,
                                A8A47442151A825B004123FF /* StringOperators.h in Headers */,
                                0FDDBFA81666DFA300C55FEF /* StringPrintStream.h in Headers */,
                                1A6EB1E0187D0BD30030126F /* StringView.h in Headers */,
                                A8A47455151A825B004123FF /* ThreadSpecific.h in Headers */,
                                553071CA1C40427200384898 /* TinyLRUCache.h in Headers */,
                                0FED67B61B22D4D80066CE15 /* TinyPtrSet.h in Headers */,
+                               DCEE22021CEA7551000C2396 /* PlatformUserPreferredLanguages.h in Headers */,
                                149EF16316BBFE0D000A4331 /* TriState.h in Headers */,
                                83FBA93219DF459700F30ADB /* TypeCasts.h in Headers */,
                                1AFDE648195201C300C48FFA /* TypeCastsCF.h in Headers */,
                                A8A473B3151A825B004123FF /* fast-dtoa.cc in Sources */,
                                0F885E0F1845AEA900F1E3FA /* FastBitVector.cpp in Sources */,
                                A8A473C3151A825B004123FF /* FastMalloc.cpp in Sources */,
+                               DCEE22011CEA7551000C2396 /* BlockObjCExceptions.mm in Sources */,
                                0F9D3360165DBA73005AD387 /* FilePrintStream.cpp in Sources */,
                                A8A473B5151A825B004123FF /* fixed-dtoa.cc in Sources */,
                                1A1D8B9E1731879800141DA4 /* FunctionDispatcher.cpp in Sources */,
                                A8A47469151A825B004123FF /* UTF8.cpp in Sources */,
                                1FA47C8A152502DA00568D1B /* WebCoreThread.cpp in Sources */,
                                0FE4479C1B7AAA03009498EB /* WordLock.cpp in Sources */,
+                               DCEE22031CEA7551000C2396 /* PlatformUserPreferredLanguagesMac.mm in Sources */,
                                E4A0AD391A96245500536DF6 /* WorkQueue.cpp in Sources */,
                                E4A0AD3D1A96253C00536DF6 /* WorkQueueCocoa.cpp in Sources */,
                                A8A47445151A825B004123FF /* WTFString.cpp in Sources */,
similarity index 90%
rename from Source/WebCore/platform/mac/BlockExceptions.h
rename to Source/WTF/wtf/BlockObjCExceptions.h
index 00449ed..271bf6d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2003 Apple Inc.  All rights reserved.
+ * Copyright (C) 2003, 2016 Apple Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -25,7 +25,7 @@
 
 #import <Foundation/NSException.h>
 
-WEBCORE_EXPORT NO_RETURN_DUE_TO_ASSERT void ReportBlockedObjCException(NSException *);
+WTF_EXPORT_PRIVATE NO_RETURN_DUE_TO_ASSERT void ReportBlockedObjCException(NSException *);
 
 #define BEGIN_BLOCK_OBJC_EXCEPTIONS @try {
 #define END_BLOCK_OBJC_EXCEPTIONS } @catch(NSException *localException) { ReportBlockedObjCException(localException); }
similarity index 83%
rename from Source/WebCore/platform/mac/BlockExceptions.mm
rename to Source/WTF/wtf/BlockObjCExceptions.mm
index 0a3620f..031b65d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2003, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2003, 2007, 2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  */
 
 #import "config.h"
-#import "BlockExceptions.h"
+#import "BlockObjCExceptions.h"
 
 #import <wtf/Assertions.h>
 
 void ReportBlockedObjCException(NSException *exception)
 {
+    // FIXME: This is probably going to be confusing when JavaScriptCore is used standalone. JSC
+    // will call this code as part of default locale detection.
+    // https://bugs.webkit.org/show_bug.cgi?id=157804
 #if ASSERT_DISABLED
     NSLog(@"*** WebKit discarding exception: <%@> %@", [exception name], [exception reason]);
 #else
index 66a1077..71a52ae 100644 (file)
@@ -1,4 +1,6 @@
 list(APPEND WTF_SOURCES
+    PlatformUserPreferredLanguagesUnix.cpp
+
     efl/DispatchQueueEfl.cpp
     efl/MainThreadEfl.cpp
     efl/RunLoopEfl.cpp
index 1115904..20b9b99 100644 (file)
@@ -7,6 +7,7 @@ list(APPEND WTF_SOURCES
     glib/GRefPtr.cpp
     glib/MainThreadGLib.cpp
     glib/RunLoopGLib.cpp
+    PlatformUserPreferredLanguagesUnix.cpp
 )
 
 list(APPEND WTF_LIBRARIES
index 9c0a10c..ecd6a4f 100644 (file)
@@ -1,3 +1,7 @@
+list(APPEND WTF_SOURCES
+    PlatformUserPreferredLanguagesUnix.cpp
+)
+
 if (LOWERCASE_EVENT_LOOP_TYPE STREQUAL "glib")
     list(APPEND WTF_SOURCES
         glib/GRefPtr.cpp
index 94ad367..ce3ddbc 100644 (file)
@@ -12,6 +12,8 @@ list(APPEND WTF_LIBRARIES
 
 list(APPEND WTF_SOURCES
     AutodrainedPoolMac.mm
+    BlockObjCExceptions.mm
+    PlatformUserPreferredLanguagesMac.mm
     RunLoopTimerCF.cpp
     SchedulePairCF.cpp
     SchedulePairMac.mm
diff --git a/Source/WTF/wtf/PlatformUserPreferredLanguages.h b/Source/WTF/wtf/PlatformUserPreferredLanguages.h
new file mode 100644 (file)
index 0000000..63f695d
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PlatformUserPreferredLanguages_h
+#define PlatformUserPreferredLanguages_h
+
+#include <wtf/Vector.h>
+#include <wtf/text/WTFString.h>
+
+namespace WTF {
+
+WTF_EXPORT_PRIVATE void setPlatformUserPreferredLanguagesChangedCallback(void (*)());
+
+WTF_EXPORT_PRIVATE Vector<String> platformUserPreferredLanguages();
+
+} // namespace WTF
+
+using WTF::setPlatformUserPreferredLanguagesChangedCallback;
+using WTF::platformUserPreferredLanguages;
+
+#endif // PlatformUserPreferredLanguages_h
+
  */
 
 #import "config.h"
-#import "Language.h"
+#import "PlatformUserPreferredLanguages.h"
 
-#import "BlockExceptions.h"
-#import "CFBundleSPI.h"
-#import "WebCoreNSStringExtras.h"
+#import "BlockObjCExceptions.h"
 #import <mutex>
 #import <unicode/uloc.h>
 #import <wtf/Assertions.h>
 #import <wtf/Lock.h>
 #import <wtf/NeverDestroyed.h>
 #import <wtf/RetainPtr.h>
+#import <wtf/spi/cf/CFBundleSPI.h>
 #import <wtf/text/WTFString.h>
 
-namespace WebCore {
+namespace WTF {
+
+static void (*callback)();
+
+void setPlatformUserPreferredLanguagesChangedCallback(void (*passedCallback)())
+{
+    callback = passedCallback;
+}
 
 static StaticLock preferredLanguagesMutex;
 
@@ -49,26 +55,27 @@ static Vector<String>& preferredLanguages()
 
 }
 
-@interface WebLanguageChangeObserver : NSObject
+@interface WTFLanguageChangeObserver : NSObject
 @end
 
-@implementation WebLanguageChangeObserver
+@implementation WTFLanguageChangeObserver
 
 + (void)languagePreferencesDidChange:(NSNotification *)notification
 {
     UNUSED_PARAM(notification);
 
     {
-        std::lock_guard<StaticLock> lock(WebCore::preferredLanguagesMutex);
-        WebCore::preferredLanguages().clear();
+        std::lock_guard<StaticLock> lock(WTF::preferredLanguagesMutex);
+        WTF::preferredLanguages().clear();
     }
-
-    WebCore::languageDidChange();
+    
+    if (WTF::callback)
+        WTF::callback();
 }
 
 @end
 
-namespace WebCore {
+namespace WTF {
 
 static String httpStyleLanguageCode(NSString *language, NSString *country)
 {
@@ -130,7 +137,7 @@ Vector<String> platformUserPreferredLanguages()
 #if PLATFORM(MAC)
     static dispatch_once_t onceToken;
     dispatch_once(&onceToken, ^{
-        [[NSDistributedNotificationCenter defaultCenter] addObserver:[WebLanguageChangeObserver self] selector:@selector(languagePreferencesDidChange:) name:@"AppleLanguagePreferencesChangedNotification" object:nil];
+        [[NSDistributedNotificationCenter defaultCenter] addObserver:[WTFLanguageChangeObserver self] selector:@selector(languagePreferencesDidChange:) name:@"AppleLanguagePreferencesChangedNotification" object:nil];
     });
 #endif
 
@@ -169,4 +176,4 @@ Vector<String> platformUserPreferredLanguages()
     return Vector<String>();
 }
 
-}
+} // namespace WTF
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2007 Alp Toker <alp@atoker.com>
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
  */
 
 #include "config.h"
-#include "Language.h"
+#include "PlatformUserPreferredLanguages.h"
 
 #include <locale.h>
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
 
-namespace WebCore {
+namespace WTF {
+
+void setPlatformUserPreferredLanguagesChangedCallback(void (*)()) { }
 
 // Using pango_language_get_default() here is not an option, because
 // it doesn't support changing the locale in runtime, so it returns
@@ -46,4 +49,4 @@ Vector<String> platformUserPreferredLanguages()
     return { platformLanguage() };
 }
 
-}
+} // namespace WTF
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007 Apple Inc.  All rights reserved.
+ * Copyright (C) 2007, 2016 Apple Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  */
 
 #include "config.h"
-#include "Language.h"
+#include "PlatformUserPreferredLanguages.h"
 
 #include <windows.h>
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
 
-namespace WebCore {
+namespace WTF {
+
+void setPlatformUserPreferredLanguagesChangedCallback(void (*)()) { }
 
 static String localeInfo(LCTYPE localeType, const String& fallback)
 {
@@ -74,4 +76,4 @@ Vector<String> platformUserPreferredLanguages()
     return userPreferredLanguages;
 }
 
-}
+} // namespace WTF
index 15b39cb..f4f207b 100644 (file)
@@ -1,4 +1,6 @@
 list(APPEND WTF_SOURCES
+    PLatformUserPreferredLanguagesWin.cpp
+
     text/cf/AtomicStringImplCF.cpp
     text/cf/StringCF.cpp
     text/cf/StringImplCF.cpp
index 3699676..68933cd 100644 (file)
@@ -1,3 +1,82 @@
+2016-05-17  Filip Pizlo  <fpizlo@apple.com>
+
+        WTF should know about Language
+        https://bugs.webkit.org/show_bug.cgi?id=157756
+
+        Reviewed by Geoffrey Garen.
+
+        No new tests because this does not change behavior.
+
+        This change is all about moving some language functionality to WTF. Quoting the WTF
+        ChangeLog, this contains two changes:
+
+        - Move everything that WebCore's logic for getting the platform user preferred language
+          depended on into WTF. This means CFBundleSPI.h and BlockObjCExceptions.h|cpp.
+
+        - Move WebCore::platformUserPreferredLanguages() to WTF::platformUserPreferredLanguages().
+          This is needed by https://bugs.webkit.org/show_bug.cgi?id=157755, which will make JSC
+          use this to detect the platform user preferred language when running standalone.
+
+        The changes in WebCore are mostly about rewiring #includes and #imports and removing the
+        code that we moved to WTF. But there is one logic change: previously,
+        platformUserPreferredLanguages() would call WebCore::languageDidChange(). It can't do that
+        directly anymore, but WTF gives WebCore some API for registering the callback. So in
+        Language.cpp we now register languageDidChange anytime we do something that would
+        necessitate it, like calling platformUserPreferredLanguages(). This also registers the
+        callback inside addLanguageChangeObserver(), since it's possible for that to be called
+        after JSC had called platformUserPreferredLanguages() but before WebCore does so.
+
+        * PlatformEfl.cmake:
+        * PlatformGTK.cmake:
+        * PlatformMac.cmake:
+        * PlatformWin.cmake:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/objc/DOMCustomXPathNSResolver.mm:
+        * editing/ios/EditorIOS.mm:
+        * editing/mac/DictionaryLookup.mm:
+        * editing/mac/EditorMac.mm:
+        * page/CaptionUserPreferencesMediaAF.cpp:
+        * page/ios/EventHandlerIOS.mm:
+        * page/ios/FrameIOS.mm:
+        * page/mac/ChromeMac.mm:
+        * page/mac/EventHandlerMac.mm:
+        * platform/Language.cpp:
+        (WebCore::registerLanguageDidChangeCallbackIfNecessary):
+        (WebCore::observerMap):
+        (WebCore::addLanguageChangeObserver):
+        (WebCore::overrideUserPreferredLanguages):
+        (WebCore::userPreferredLanguages):
+        * platform/Language.h:
+        * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
+        * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
+        * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
+        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
+        * platform/graphics/cocoa/FontCocoa.mm:
+        * platform/graphics/mac/ColorMac.mm:
+        * platform/graphics/mac/GraphicsContext3DMac.mm:
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+        * platform/ios/PlatformSpeechSynthesizerIOS.mm:
+        * platform/ios/ScrollViewIOS.mm:
+        * platform/ios/WidgetIOS.mm:
+        * platform/mac/BlockExceptions.h: Removed.
+        * platform/mac/BlockExceptions.mm: Removed.
+        * platform/mac/CursorMac.mm:
+        * platform/mac/Language.mm: Removed.
+        * platform/mac/ScrollAnimatorMac.mm:
+        * platform/mac/ScrollViewMac.mm:
+        * platform/mac/ScrollbarThemeMac.mm:
+        * platform/mac/ThemeMac.mm:
+        * platform/mac/WidgetMac.mm:
+        * platform/mediastream/mac/AVVideoCaptureSource.mm:
+        * platform/network/mac/CookieJarMac.mm:
+        * platform/network/mac/ResourceErrorMac.mm:
+        * platform/network/mac/ResourceHandleMac.mm:
+        * platform/spi/cf/CFBundleSPI.h: Removed.
+        * platform/unix/LanguageUnix.cpp: Removed.
+        * platform/win/LanguageWin.cpp: Removed.
+
 2016-05-16  Dean Jackson  <dino@apple.com>
 
         Tidy unused parameters with build flags in isValidKeywordPropertyAndValue
index 32944f5..329a160 100644 (file)
@@ -218,7 +218,6 @@ list(APPEND WebCore_SOURCES
 
     platform/text/hyphen/HyphenationLibHyphen.cpp
 
-    platform/unix/LanguageUnix.cpp
     platform/unix/LoggingUnix.cpp
 
     rendering/RenderThemeEfl.cpp
index 4177446..d71ceee 100644 (file)
@@ -183,7 +183,6 @@ list(APPEND WebCore_SOURCES
 
     platform/text/hyphen/HyphenationLibHyphen.cpp
 
-    platform/unix/LanguageUnix.cpp
     platform/unix/LoggingUnix.cpp
 )
 
index 5fd161a..4159d9a 100644 (file)
@@ -461,7 +461,6 @@ list(APPEND WebCore_SOURCES
     platform/graphics/opentype/OpenTypeCG.cpp
     platform/graphics/opentype/OpenTypeMathData.cpp
 
-    platform/mac/BlockExceptions.mm
     platform/mac/CursorMac.mm
     platform/mac/DragDataMac.mm
     platform/mac/DragImageMac.mm
@@ -471,7 +470,6 @@ list(APPEND WebCore_SOURCES
     platform/mac/HIDGamepadProvider.cpp
     platform/mac/KeyEventMac.mm
     platform/mac/KillRingMac.mm
-    platform/mac/Language.mm
     platform/mac/LocalCurrentGraphicsContext.mm
     platform/mac/LoggingMac.mm
     platform/mac/NSScrollerImpDetails.mm
index bfab417..0c34e97 100644 (file)
@@ -123,7 +123,6 @@ list(APPEND WebCore_SOURCES
     platform/win/GDIObjectCounter.cpp
     platform/win/GDIUtilities.cpp
     platform/win/KeyEventWin.cpp
-    platform/win/LanguageWin.cpp
     platform/win/LocalizedStringsWin.cpp
     platform/win/LoggingWin.cpp
     platform/win/MemoryPressureHandlerWin.cpp
index fd52842..22181ca 100644 (file)
                934FE9E50B5CA539003E4A73 /* FileChooser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 934FE9E40B5CA539003E4A73 /* FileChooser.cpp */; };
                93500F3213FDE3BE0099EC24 /* NSScrollerImpDetails.h in Headers */ = {isa = PBXBuildFile; fileRef = 93500F3113FDE3BE0099EC24 /* NSScrollerImpDetails.h */; };
                935207BE09BD410A00F2038D /* LocalizedStrings.h in Headers */ = {isa = PBXBuildFile; fileRef = 935207BD09BD410A00F2038D /* LocalizedStrings.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               9352084509BD43B900F2038D /* Language.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9352084409BD43B900F2038D /* Language.mm */; };
                9353676B09AED88B00D35CD6 /* ScrollViewMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9353676A09AED88B00D35CD6 /* ScrollViewMac.mm */; };
                935C476309AC4CE600A6AAB4 /* MouseEventWithHitTestResults.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C476209AC4CE600A6AAB4 /* MouseEventWithHitTestResults.h */; };
                935C476809AC4D4300A6AAB4 /* PlatformKeyboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C476609AC4D4300A6AAB4 /* PlatformKeyboardEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93F199A808245E59001E9ABC /* WebCoreFrameView.h in Headers */ = {isa = PBXBuildFile; fileRef = F587854C02DE375901EA4122 /* WebCoreFrameView.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93F199B808245E59001E9ABC /* Scrollbar.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7B2AF80450824100A8000F /* Scrollbar.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93F199BB08245E59001E9ABC /* WebCoreKeyboardUIMode.h in Headers */ = {isa = PBXBuildFile; fileRef = BE983D95052A2E0A00892D85 /* WebCoreKeyboardUIMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               93F199BE08245E59001E9ABC /* BlockExceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 65A640F00533BB1F0085E777 /* BlockExceptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93F199DE08245E59001E9ABC /* Position.h in Headers */ = {isa = PBXBuildFile; fileRef = BE91FC8B06133666005E3790 /* Position.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93F199E508245E59001E9ABC /* HTMLCanvasElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F6A3D60663BF04004D2919 /* HTMLCanvasElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93F199EC08245E59001E9ABC /* XSLStyleSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = BC06F24A06D18A7E004A6FA3 /* XSLStyleSheet.h */; };
                93F19A9D08245E59001E9ABC /* TextResourceDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D27802DE43D7018635CA /* TextResourceDecoder.cpp */; };
                93F19AB908245E59001E9ABC /* Range.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D30302DE4476018635CA /* Range.cpp */; };
                93F19AD508245E59001E9ABC /* RenderTreeAsText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93955A4203D72932008635CE /* RenderTreeAsText.cpp */; };
-               93F19AE108245E59001E9ABC /* BlockExceptions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65F80697054D9F86008BF776 /* BlockExceptions.mm */; };
                93F19AE608245E59001E9ABC /* SSLKeyGeneratorMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B2B24F056BF15F00D2B771 /* SSLKeyGeneratorMac.cpp */; };
                93F19AF808245E59001E9ABC /* Position.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE91FC8C06133666005E3790 /* Position.cpp */; };
                93F19AFD08245E59001E9ABC /* HTMLCanvasElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F6A3D50663BF04004D2919 /* HTMLCanvasElement.cpp */; };
                E0FEF372B47C53EAC1C1FBEE /* JSEventSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E0FEF371B47C53EAC1C1FBEE /* JSEventSource.cpp */; };
                E107400D0E77BDC00033AF24 /* JSMessageChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E107400B0E77BDC00033AF24 /* JSMessageChannel.cpp */; };
                E107400E0E77BDC00033AF24 /* JSMessageChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = E107400C0E77BDC00033AF24 /* JSMessageChannel.h */; };
-               E10A39E21AE84E7100A29AE3 /* CFBundleSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E10A39E11AE84E7100A29AE3 /* CFBundleSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E10B937C0B73C00A003ED890 /* JSCustomXPathNSResolver.h in Headers */ = {isa = PBXBuildFile; fileRef = E10B937B0B73C00A003ED890 /* JSCustomXPathNSResolver.h */; };
                E10B93C30B73C291003ED890 /* JSCustomXPathNSResolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E10B93C20B73C291003ED890 /* JSCustomXPathNSResolver.cpp */; };
                E10B9B6C0B747599003ED890 /* NativeXPathNSResolver.h in Headers */ = {isa = PBXBuildFile; fileRef = E10B9B6A0B747599003ED890 /* NativeXPathNSResolver.h */; };
                65A21467097A329100B9050A /* Page.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Page.h; sourceTree = "<group>"; };
                65A21482097A3F5300B9050A /* FrameTree.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FrameTree.cpp; sourceTree = "<group>"; };
                65A21483097A3F5300B9050A /* FrameTree.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FrameTree.h; sourceTree = "<group>"; };
-               65A640F00533BB1F0085E777 /* BlockExceptions.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = BlockExceptions.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                65BF02290974816300C43196 /* Frame.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Frame.cpp; sourceTree = "<group>"; };
                65BF022A0974816300C43196 /* Frame.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Frame.h; sourceTree = "<group>"; };
                65C97AF208EA908800ACD273 /* config.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
                65DF323609D1DE65000BE325 /* JSCanvasPattern.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSCanvasPattern.h; sourceTree = "<group>"; };
                65DF323609D1DE65001BE325 /* JSCanvasProxy.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSCanvasProxy.h; sourceTree = "<group>"; };
                65E0E9431133C89F00B4CB10 /* JSDOMWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMWrapper.h; sourceTree = "<group>"; };
-               65F80697054D9F86008BF776 /* BlockExceptions.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BlockExceptions.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                65FEA86809833ADE00BED4AB /* Page.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Page.cpp; sourceTree = "<group>"; };
                697101071C6BE1550018C7F1 /* AccessibilitySVGElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilitySVGElement.cpp; sourceTree = "<group>"; };
                697101081C6BE1550018C7F1 /* AccessibilitySVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilitySVGElement.h; sourceTree = "<group>"; };
                934FE9E40B5CA539003E4A73 /* FileChooser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileChooser.cpp; sourceTree = "<group>"; };
                93500F3113FDE3BE0099EC24 /* NSScrollerImpDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSScrollerImpDetails.h; sourceTree = "<group>"; };
                935207BD09BD410A00F2038D /* LocalizedStrings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalizedStrings.h; sourceTree = "<group>"; };
-               9352084409BD43B900F2038D /* Language.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Language.mm; sourceTree = "<group>"; };
                9353676A09AED88B00D35CD6 /* ScrollViewMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollViewMac.mm; sourceTree = "<group>"; };
                935C476209AC4CE600A6AAB4 /* MouseEventWithHitTestResults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MouseEventWithHitTestResults.h; sourceTree = "<group>"; };
                935C476609AC4D4300A6AAB4 /* PlatformKeyboardEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformKeyboardEvent.h; sourceTree = "<group>"; };
                E0FEF371B47C53EAC1C1FBEE /* JSEventSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEventSource.cpp; sourceTree = "<group>"; };
                E107400B0E77BDC00033AF24 /* JSMessageChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMessageChannel.cpp; sourceTree = "<group>"; };
                E107400C0E77BDC00033AF24 /* JSMessageChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMessageChannel.h; sourceTree = "<group>"; };
-               E10A39E11AE84E7100A29AE3 /* CFBundleSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFBundleSPI.h; sourceTree = "<group>"; };
                E10B937B0B73C00A003ED890 /* JSCustomXPathNSResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCustomXPathNSResolver.h; sourceTree = "<group>"; };
                E10B93C20B73C291003ED890 /* JSCustomXPathNSResolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCustomXPathNSResolver.cpp; sourceTree = "<group>"; };
                E10B9B6A0B747599003ED890 /* NativeXPathNSResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeXPathNSResolver.h; sourceTree = "<group>"; };
                65086DA619AC1719009AF46B /* cf */ = {
                        isa = PBXGroup;
                        children = (
-                               E10A39E11AE84E7100A29AE3 /* CFBundleSPI.h */,
                                65086DA719AC1719009AF46B /* CFLocaleSPI.h */,
                                A10D7FEB1C2676D100C6C115 /* CFNetworkConnectionCacheSPI.h */,
                                CE12525A1A1C018200864480 /* CFNetworkSPI.h */,
                6582A14809999D6C00BEEB6D /* mac */ = {
                        isa = PBXGroup;
                        children = (
-                               65A640F00533BB1F0085E777 /* BlockExceptions.h */,
-                               65F80697054D9F86008BF776 /* BlockExceptions.mm */,
                                F58784F002DE375901EA4122 /* CursorMac.mm */,
                                A795463D0B5C4C80007B438F /* DragDataMac.mm */,
                                A7CFB3D40B7ED1180070C32D /* DragImageMac.mm */,
                                5179CE35195CAC7E0019C198 /* HIDGamepadProvider.h */,
                                935C476E09AC4D7300A6AAB4 /* KeyEventMac.mm */,
                                521D46F511AEC98100514613 /* KillRingMac.mm */,
-                               9352084409BD43B900F2038D /* Language.mm */,
                                06E81ED60AB5D5E900C87837 /* LocalCurrentGraphicsContext.h */,
                                06E81EEB0AB5DA9700C87837 /* LocalCurrentGraphicsContext.mm */,
                                1402645D0AFDC19B005919E2 /* LoggingMac.mm */,
                                2EDEF1F7121B0EFC00726DB2 /* BlobRegistryImpl.h in Headers */,
                                2EB4BCD3121F03E300EC4885 /* BlobResourceHandle.h in Headers */,
                                976D6C7F122B8A3D001FD1F7 /* BlobURL.h in Headers */,
-                               93F199BE08245E59001E9ABC /* BlockExceptions.h in Headers */,
                                BC5EB5E10E81BE8700B25965 /* BorderData.h in Headers */,
                                589556ED18D4A44000764B03 /* BorderEdge.h in Headers */,
                                BC5EB5DB0E81B7EA00B25965 /* BorderValue.h in Headers */,
                                CDE8B5F11A69778B00B4B66A /* CDMSessionClearKey.h in Headers */,
                                CDE595971BF26E2100A1CBE8 /* CDMSessionMediaSourceAVFObjC.h in Headers */,
                                5FA904CA178E61F5004C8A2D /* CertificateInfo.h in Headers */,
-                               E10A39E21AE84E7100A29AE3 /* CFBundleSPI.h in Headers */,
                                A10D7FEC1C2676D100C6C115 /* CFNetworkConnectionCacheSPI.h in Headers */,
                                CE12525B1A1C018200864480 /* CFNetworkSPI.h in Headers */,
                                E1A8E56717552B2A007488E7 /* CFURLExtras.h in Headers */,
                                2EDEF1F6121B0EFC00726DB2 /* BlobRegistryImpl.cpp in Sources */,
                                2EB4BCD2121F03E300EC4885 /* BlobResourceHandle.cpp in Sources */,
                                976D6C7E122B8A3D001FD1F7 /* BlobURL.cpp in Sources */,
-                               93F19AE108245E59001E9ABC /* BlockExceptions.mm in Sources */,
                                58AEE2F418D4BCCF0022E7FE /* BorderEdge.cpp in Sources */,
                                6ED8C379183BFF8C009E53BD /* BoxShape.cpp in Sources */,
                                BCEA4854097D93020094C9E4 /* break_lines.cpp in Sources */,
                                450CEBF015073BBE002BB149 /* LabelableElement.cpp in Sources */,
                                A456FA2611AD4A830020B420 /* LabelsNodeList.cpp in Sources */,
                                E18772F1126E2629003DD586 /* Language.cpp in Sources */,
-                               9352084509BD43B900F2038D /* Language.mm in Sources */,
                                2917B5611473496C0052C9D0 /* LayerFlushScheduler.cpp in Sources */,
                                2917B566147349950052C9D0 /* LayerFlushSchedulerMac.cpp in Sources */,
                                7AA3A69F194B59B6001CBD24 /* LayerPool.cpp in Sources */,
index 5fdb8ee..e5dc547 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "DOMCustomXPathNSResolver.h"
 
-#include "BlockExceptions.h"
+#include <wtf/BlockObjCExceptions.h>
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
index 1fa145b..9ea8385 100644 (file)
@@ -26,7 +26,6 @@
 #include "config.h"
 #include "Editor.h"
 
-#include "BlockExceptions.h"
 #include "CachedImage.h"
 #include "CSSComputedStyleDeclaration.h"
 #include "CSSPrimitiveValueMappings.h"
@@ -58,6 +57,7 @@
 #include "WAKAppKitStubs.h"
 #include "htmlediting.h"
 #include "markup.h"
+#include <wtf/BlockObjCExceptions.h>
 
 SOFT_LINK_FRAMEWORK(AppSupport)
 SOFT_LINK(AppSupport, CPSharedResourcesDirectory, CFStringRef, (void), ())
index 215756e..e28d1f7 100644 (file)
@@ -28,7 +28,6 @@
 
 #if PLATFORM(MAC)
 
-#import "BlockExceptions.h"
 #import "Document.h"
 #import "FocusController.h"
 #import "Frame.h"
@@ -47,6 +46,7 @@
 #import "WebCoreSystemInterface.h"
 #import "htmlediting.h"
 #import <PDFKit/PDFKit.h>
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/RefPtr.h>
 
 SOFT_LINK_CONSTANT_MAY_FAIL(Lookup, LUTermOptionDisableSearchTermIndicator, NSString *)
index 733e194..9e835d7 100644 (file)
@@ -26,7 +26,6 @@
 #import "config.h"
 #import "Editor.h"
 
-#import "BlockExceptions.h"
 #import "CSSPrimitiveValueMappings.h"
 #import "CSSValuePool.h"
 #import "CachedResourceLoader.h"
@@ -65,6 +64,7 @@
 #import "WebNSAttributedStringExtras.h"
 #import "htmlediting.h"
 #import "markup.h"
+#import <wtf/BlockObjCExceptions.h>
 
 namespace WebCore {
 
index be36b9a..65d2445 100644 (file)
@@ -42,6 +42,7 @@
 #include "UserStyleSheetTypes.h"
 #include "VTTCue.h"
 #include <wtf/NeverDestroyed.h>
+#include <wtf/PlatformUserPreferredLanguages.h>
 #include <wtf/RetainPtr.h>
 #include <wtf/text/CString.h>
 #include <wtf/text/StringBuilder.h>
index 9906105..23bd5ec 100644 (file)
@@ -27,7 +27,6 @@
 #import "EventHandler.h"
 
 #import "AXObjectCache.h"
-#import "BlockExceptions.h"
 #import "Chrome.h"
 #import "ChromeClient.h"
 #import "FocusController.h"
@@ -42,6 +41,7 @@
 #import "WAKView.h"
 #import "WAKWindow.h"
 #import "WebEvent.h"
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/NeverDestroyed.h>
 #import <wtf/Noncopyable.h>
 
index b43f01a..d18f226 100644 (file)
@@ -28,7 +28,6 @@
 #if PLATFORM(IOS)
 
 #import "AnimationController.h"
-#import "BlockExceptions.h"
 #import "DOMCSSStyleDeclarationInternal.h"
 #import "DOMCore.h"
 #import "DOMInternal.h"
@@ -70,6 +69,7 @@
 #import "WAKWindow.h"
 #import "WebCoreSystemInterface.h"
 #import <runtime/JSLock.h>
+#import <wtf/BlockObjCExceptions.h>
 
 using namespace WebCore::HTMLNames;
 using namespace WTF::Unicode;
index 1d67236..93e87fe 100644 (file)
@@ -20,8 +20,8 @@
 #import "config.h"
 #import "Chrome.h"
 
-#import "BlockExceptions.h"
 #import "ChromeClient.h"
+#import <wtf/BlockObjCExceptions.h>
 
 #if PLATFORM(IOS)
 #include "WAKResponder.h"
index a29fd57..1a78b57 100644 (file)
@@ -27,7 +27,6 @@
 #include "EventHandler.h"
 
 #include "AXObjectCache.h"
-#include "BlockExceptions.h"
 #include "Chrome.h"
 #include "ChromeClient.h"
 #include "DataTransfer.h"
@@ -61,6 +60,7 @@
 #include "ShadowRoot.h"
 #include "WebCoreSystemInterface.h"
 #include "WheelEventTestTrigger.h"
+#include <wtf/BlockObjCExceptions.h>
 #include <wtf/MainThread.h>
 #include <wtf/NeverDestroyed.h>
 #include <wtf/ObjcRuntimeExtras.h>
index a8ae8e3..e2f04fd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2013, 2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -28,6 +28,7 @@
 
 #include <wtf/HashMap.h>
 #include <wtf/NeverDestroyed.h>
+#include <wtf/PlatformUserPreferredLanguages.h>
 #include <wtf/RetainPtr.h>
 #include <wtf/text/WTFString.h>
 
 
 namespace WebCore {
 
+static void registerLanguageDidChangeCallbackIfNecessary()
+{
+    static std::once_flag once;
+    std::call_once(
+        once,
+        [] {
+            setPlatformUserPreferredLanguagesChangedCallback(languageDidChange);
+        });
+}
+
 typedef HashMap<void*, LanguageChangeObserverFunction> ObserverMap;
 static ObserverMap& observerMap()
 {
@@ -46,6 +57,7 @@ static ObserverMap& observerMap()
 
 void addLanguageChangeObserver(void* context, LanguageChangeObserverFunction customObserver)
 {
+    registerLanguageDidChangeCallbackIfNecessary();
     observerMap().set(context, customObserver);
 }
 
@@ -87,13 +99,14 @@ void overrideUserPreferredLanguages(const Vector<String>& override)
     preferredLanguagesOverride() = override;
     languageDidChange();
 }
-    
+
 Vector<String> userPreferredLanguages()
 {
     Vector<String>& override = preferredLanguagesOverride();
     if (!override.isEmpty())
         return override;
     
+    registerLanguageDidChangeCallbackIfNecessary();
     return platformUserPreferredLanguages();
 }
 
index 4edbe7e..7ae5407 100644 (file)
@@ -42,8 +42,6 @@ typedef void (*LanguageChangeObserverFunction)(void* context);
 WEBCORE_EXPORT void addLanguageChangeObserver(void* context, LanguageChangeObserverFunction);
 WEBCORE_EXPORT void removeLanguageChangeObserver(void* context);
 
-Vector<String> platformUserPreferredLanguages();
-
 String displayNameForLanguageLocale(const String&);
 
 // Called from platform specific code when the user's preferred language(s) change.
index 1114bd6..d10166f 100644 (file)
 
 #if ENABLE(CONTENT_FILTERING)
 
-#import "BlockExceptions.h"
 #import "ContentFilter.h"
 #import "Logging.h"
 #import "ResourceRequest.h"
+#import <wtf/BlockObjCExceptions.h>
 
 #if !LOG_DISABLED
 #import <wtf/text/CString.h>
index fd2e3e5..28d0acb 100644 (file)
@@ -29,7 +29,6 @@
 
 #import "InbandTextTrackPrivateAVFObjC.h"
 
-#import "BlockExceptions.h"
 #import "FloatConversion.h"
 #import "InbandTextTrackPrivate.h"
 #import "InbandTextTrackPrivateAVF.h"
@@ -37,6 +36,7 @@
 #import "SoftLinking.h"
 #import <AVFoundation/AVFoundation.h>
 #import <objc/runtime.h>
+#import <wtf/BlockObjCExceptions.h>
 
 SOFT_LINK_FRAMEWORK_OPTIONAL(AVFoundation)
 
index d631202..7cb0266 100644 (file)
@@ -33,7 +33,6 @@
 #import "AudioSourceProviderAVFObjC.h"
 #import "AudioTrackPrivateAVFObjC.h"
 #import "AuthenticationChallenge.h"
-#import "BlockExceptions.h"
 #import "CDMSessionAVFoundationObjC.h"
 #import "Cookie.h"
 #import "ExceptionCodePlaceholder.h"
@@ -78,6 +77,7 @@
 #import <runtime/Uint16Array.h>
 #import <runtime/Uint32Array.h>
 #import <runtime/Uint8Array.h>
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/CurrentTime.h>
 #import <wtf/ListHashSet.h>
 #import <wtf/NeverDestroyed.h>
index 815d140..c56f21f 100644 (file)
@@ -28,7 +28,6 @@
 
 #if ENABLE(MEDIA_SOURCE) && USE(AVFOUNDATION)
 
-#import "BlockExceptions.h"
 #import "CDMSessionAVContentKeySession.h"
 #import "CDMSessionMediaSourceAVFObjC.h"
 #import "ExceptionCodePlaceholder.h"
@@ -50,6 +49,7 @@
 #import <objc/runtime.h>
 #import <wtf/text/AtomicString.h>
 #import <wtf/text/CString.h>
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/HashCountedSet.h>
 #import <wtf/MainThread.h>
 #import <wtf/WeakPtr.h>
index b5d394f..0165fd9 100644 (file)
 #include "config.h"
 #import "PlatformCAFilters.h"
 
-#import "BlockExceptions.h"
 #import "FloatConversion.h"
 #import "LengthFunctions.h" // This is a layering violation.
 #import "PlatformCALayerCocoa.h"
 #import "QuartzCoreSPI.h"
 #import <QuartzCore/QuartzCore.h>
+#import <wtf/BlockObjCExceptions.h>
 
 using namespace WebCore;
 
index c8e0fb5..6219ccd 100644 (file)
@@ -27,7 +27,6 @@
 #import "PlatformCALayerCocoa.h"
 
 #import "AnimationUtilities.h"
-#import "BlockExceptions.h"
 #import "GraphicsContext.h"
 #import "GraphicsLayerCA.h"
 #import "LengthFunctions.h"
@@ -48,6 +47,7 @@
 #import <AVFoundation/AVFoundation.h>
 #import <QuartzCore/QuartzCore.h>
 #import <objc/runtime.h>
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/CurrentTime.h>
 #import <wtf/RetainPtr.h>
 
index bcdaf9b..b0394c6 100644 (file)
@@ -27,7 +27,6 @@
 #import "config.h"
 #import "Font.h"
 
-#import "BlockExceptions.h"
 #import "Color.h"
 #import "CoreGraphicsSPI.h"
 #import "CoreTextSPI.h"
@@ -40,6 +39,7 @@
 #import <float.h>
 #import <unicode/uchar.h>
 #import <wtf/Assertions.h>
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/NeverDestroyed.h>
 #import <wtf/RetainPtr.h>
 #import <wtf/StdLibExtras.h>
index 5bbc6b3..393b3c6 100644 (file)
@@ -26,7 +26,7 @@
 #import "config.h"
 #import "ColorMac.h"
 
-#import <WebCore/BlockExceptions.h>
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/RetainPtr.h>
 #import <wtf/StdLibExtras.h>
 
index 7e8e425..37d49d1 100644 (file)
@@ -32,7 +32,7 @@
 #include "GraphicsContext3DIOS.h"
 #endif
 
-#import "BlockExceptions.h"
+#import <wtf/BlockObjCExceptions.h>
 
 #include "CanvasRenderingContext.h"
 #include <CoreGraphics/CGBitmapContext.h>
index c46cc11..9b6180a 100644 (file)
@@ -29,7 +29,6 @@
 
 #import "MediaPlayerPrivateQTKit.h"
 
-#import "BlockExceptions.h"
 #import "DocumentLoader.h"
 #import "GraphicsContext.h"
 #import "URL.h"
@@ -43,6 +42,7 @@
 #import "WebCoreSystemInterface.h"
 #import <QTKit/QTKit.h>
 #import <objc/runtime.h>
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/NeverDestroyed.h>
 
 SOFT_LINK_FRAMEWORK(QTKit)
index cf84994..668b152 100644 (file)
 
 #if ENABLE(SPEECH_SYNTHESIS)
 
-#include "BlockExceptions.h"
 #include "PlatformSpeechSynthesisUtterance.h"
 #include "PlatformSpeechSynthesisVoice.h"
 #include "SoftLinking.h"
 #include <AVFoundation/AVSpeechSynthesis.h>
+#include <wtf/BlockObjCExceptions.h>
 #include <wtf/RetainPtr.h>
 
 SOFT_LINK_FRAMEWORK(AVFoundation)
index c851184..3a3b9f9 100644 (file)
@@ -26,7 +26,6 @@
 #import "config.h"
 #import "ScrollView.h"
 
-#import "BlockExceptions.h"
 #import "FloatRect.h"
 #import "IntRect.h"
 #import "Logging.h"
@@ -38,6 +37,7 @@
 #import "WAKWindow.h"
 #import "WKViewPrivate.h"
 #import "WebCoreFrameView.h"
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/CurrentTime.h>
 
 using namespace std;
index 0e365ef..c3dd0cc 100644 (file)
@@ -26,7 +26,6 @@
 #import "config.h"
 #import "Widget.h"
 
-#import "BlockExceptions.h"
 #import "Cursor.h"
 #import "Document.h"
 #import "FontCascade.h"
@@ -40,6 +39,7 @@
 #import "WAKWindow.h"
 #import "WebCoreFrameView.h"
 #import "WebCoreView.h"
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/RetainPtr.h>
 
 @interface NSView (WebSetSelectedMethods)
index c8cb20f..2cc4024 100644 (file)
@@ -26,8 +26,8 @@
 #import "config.h"
 #import "Cursor.h"
 
-#import "BlockExceptions.h"
 #import "WebCoreSystemInterface.h"
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/StdLibExtras.h>
 
 @interface WebCoreCursorBundle : NSObject { }
index 45951a2..ac7f4fd 100644 (file)
@@ -29,7 +29,6 @@
 
 #include "ScrollAnimatorMac.h"
 
-#include "BlockExceptions.h"
 #include "FloatPoint.h"
 #include "GraphicsLayer.h"
 #include "Logging.h"
@@ -42,6 +41,7 @@
 #include "ScrollbarThemeMac.h"
 #include "TextStream.h"
 #include "WebCoreSystemInterface.h"
+#include <wtf/BlockObjCExceptions.h>
 
 using namespace WebCore;
 
index 24c6ab9..1290311 100644 (file)
 #import "config.h"
 #import "ScrollView.h"
 
-#import "BlockExceptions.h"
 #import "FloatRect.h"
 #import "FloatSize.h"
 #import "IntRect.h"
 #import "Logging.h"
 #import "NotImplemented.h"
 #import "WebCoreFrameView.h"
+#import <wtf/BlockObjCExceptions.h>
 
 @interface NSScrollView ()
 - (NSEdgeInsets)contentInsets;
index 99e02ae..91cbedd 100644 (file)
@@ -26,7 +26,6 @@
 #include "config.h"
 #include "ScrollbarThemeMac.h"
 
-#include "BlockExceptions.h"
 #include "ColorMac.h"
 #include "GraphicsLayer.h"
 #include "ImageBuffer.h"
@@ -38,6 +37,7 @@
 #include "ScrollView.h"
 #include "WebCoreSystemInterface.h"
 #include <Carbon/Carbon.h>
+#include <wtf/BlockObjCExceptions.h>
 #include <wtf/HashMap.h>
 #include <wtf/NeverDestroyed.h>
 #include <wtf/StdLibExtras.h>
index 4aafd30..323a152 100644 (file)
@@ -27,7 +27,6 @@
 #import "ThemeMac.h"
 
 #import "AXObjectCache.h"
-#import "BlockExceptions.h"
 #import "GraphicsContext.h"
 #import "ImageBuffer.h"
 #import "LocalCurrentGraphicsContext.h"
@@ -35,6 +34,7 @@
 #import "ScrollView.h"
 #import "WebCoreSystemInterface.h"
 #import <Carbon/Carbon.h>
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/NeverDestroyed.h>
 #import <wtf/StdLibExtras.h>
 
index 0e7787d..4315ccc 100644 (file)
@@ -26,8 +26,6 @@
 #import "config.h"
 #import "Widget.h"
 
-
-#import "BlockExceptions.h"
 #import "Chrome.h"
 #import "Cursor.h"
 #import "Document.h"
@@ -40,6 +38,7 @@
 #import "RuntimeApplicationChecks.h"
 #import "WebCoreFrameView.h"
 #import "WebCoreView.h"
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/Ref.h>
 #import <wtf/RetainPtr.h>
 
index 9f4c435..d87cbc4 100644 (file)
@@ -29,7 +29,6 @@
 #if ENABLE(MEDIA_STREAM) && USE(AVFOUNDATION)
 
 #import "AVCaptureDeviceManager.h"
-#import "BlockExceptions.h"
 #import "GraphicsContextCG.h"
 #import "ImageBuffer.h"
 #import "IntRect.h"
@@ -41,6 +40,7 @@
 #import "RealtimeMediaSourceSettings.h"
 #import <AVFoundation/AVFoundation.h>
 #import <objc/runtime.h>
+#import <wtf/BlockObjCExceptions.h>
 
 #import "CoreMediaSoftLink.h"
 #import "CoreVideoSoftLink.h"
index a424cc3..5ec9980 100644 (file)
 #import "config.h"
 #import "PlatformCookieJar.h"
 
-#import "BlockExceptions.h"
 #import "CFNetworkSPI.h"
 #import "NetworkStorageSession.h"
 #import "WebCoreSystemInterface.h"
+#import <wtf/BlockObjCExceptions.h>
 
 namespace WebCore {
 static NSHTTPCookieStorage *cookieStorage(const NetworkStorageSession&);
index 6418938..60b0dff 100644 (file)
 #import "config.h"
 #import "ResourceError.h"
 
-#import "BlockExceptions.h"
 #import "URL.h"
 #import <CoreFoundation/CFError.h>
 #import <Foundation/Foundation.h>
+#import <wtf/BlockObjCExceptions.h>
 
 #if PLATFORM(IOS) && USE(CFNETWORK)
 #import <CFNetwork/CFSocketStreamPriv.h>
index be436da..366a969 100644 (file)
@@ -28,7 +28,6 @@
 
 #import "AuthenticationChallenge.h"
 #import "AuthenticationMac.h"
-#import "BlockExceptions.h"
 #import "CFNetworkSPI.h"
 #import "CookieStorage.h"
 #import "CredentialStorage.h"
@@ -53,6 +52,7 @@
 #import "SynchronousLoaderClient.h"
 #import "WebCoreSystemInterface.h"
 #import "WebCoreURLResponse.h"
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/Ref.h>
 #import <wtf/SchedulePair.h>
 #import <wtf/text/Base64.h>
index 9631d7c..b881e90 100644 (file)
@@ -1,3 +1,22 @@
+2016-05-17  Filip Pizlo  <fpizlo@apple.com>
+
+        WTF should know about Language
+        https://bugs.webkit.org/show_bug.cgi?id=157756
+
+        Reviewed by Geoffrey Garen.
+
+        Rewires a bunch of includes/imports.
+
+        * WebCoreSupport/PopupMenuMac.mm:
+        * WebCoreSupport/WebChromeClient.mm:
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        * WebCoreSupport/WebGeolocationClient.mm:
+        * WebCoreSupport/WebNotificationClient.mm:
+        * WebCoreSupport/WebPlatformStrategies.mm:
+        * WebCoreSupport/WebUserMediaClient.mm:
+        * WebCoreSupport/WebVisitedLinkStore.mm:
+        * WebView/WebHTMLView.mm:
+
 2016-05-13  Enrica Casucci  <enrica@apple.com>
 
         Remove unused initializer for WebEvent on iOS.
index fce80bc..f399742 100644 (file)
@@ -24,7 +24,6 @@
 #import "WebFrameInternal.h"
 #import <WebCore/IntRect.h>
 #import <WebCore/AXObjectCache.h>
-#import <WebCore/BlockExceptions.h>
 #import <WebCore/Chrome.h>
 #import <WebCore/ChromeClient.h>
 #import <WebCore/EventHandler.h>
@@ -34,6 +33,7 @@
 #import <WebCore/Page.h>
 #import <WebCore/PopupMenuClient.h>
 #import <WebKitSystemInterface.h>
+#import <wtf/BlockObjCExceptions.h>
 
 using namespace WebCore;
 
index a09359a..05927b7 100644 (file)
@@ -54,7 +54,6 @@
 #import "WebView.h"
 #import "WebViewInternal.h"
 #import <Foundation/Foundation.h>
-#import <WebCore/BlockExceptions.h>
 #import <WebCore/ColorChooser.h>
 #import <WebCore/ContextMenu.h>
 #import <WebCore/ContextMenuController.h>
@@ -82,6 +81,7 @@
 #import <WebCore/SerializedCryptoKeyWrap.h>
 #import <WebCore/Widget.h>
 #import <WebCore/WindowFeatures.h>
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/PassRefPtr.h>
 #import <wtf/Vector.h>
 #import <wtf/text/WTFString.h>
index c6c2802..5884c12 100644 (file)
@@ -76,7 +76,6 @@
 #import <WebCore/AuthenticationMac.h>
 #import <WebCore/BackForwardController.h>
 #import <WebCore/BackForwardList.h>
-#import <WebCore/BlockExceptions.h>
 #import <WebCore/CachedFrame.h>
 #import <WebCore/Chrome.h>
 #import <WebCore/DNS.h>
 #import <WebKitLegacy/DOMHTMLFormElement.h>
 #import <WebKitSystemInterface.h>
 #import <runtime/InitializeThreading.h>
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/MainThread.h>
 #import <wtf/PassRefPtr.h>
 #import <wtf/RunLoop.h>
index a6239ff..ec1b827 100644 (file)
 #import "WebSecurityOriginInternal.h"
 #import "WebUIDelegatePrivate.h"
 #import "WebViewInternal.h"
-#import <WebCore/BlockExceptions.h>
 #import <WebCore/Document.h>
 #import <WebCore/Frame.h>
 #import <WebCore/Geolocation.h>
+#import <wtf/BlockObjCExceptions.h>
 
 #if PLATFORM(IOS)
 #import <WebCore/WAKResponder.h>
index f55298c..fe47dbe 100644 (file)
@@ -32,9 +32,9 @@
 #import "WebSecurityOriginInternal.h"
 #import "WebUIDelegatePrivate.h"
 #import "WebViewInternal.h"
-#import <WebCore/BlockExceptions.h>
 #import <WebCore/Page.h>
 #import <WebCore/ScriptExecutionContext.h>
+#import <wtf/BlockObjCExceptions.h>
 #endif
 
 #if ENABLE(NOTIFICATIONS)
index d5b08fd..ab0695f 100644 (file)
@@ -30,7 +30,6 @@
 #import "WebPluginPackage.h"
 #import "WebResourceLoadScheduler.h"
 #import <WebCore/BlobRegistryImpl.h>
-#import <WebCore/BlockExceptions.h>
 #import <WebCore/Color.h>
 #import <WebCore/MainFrame.h>
 #import <WebCore/Page.h>
@@ -40,6 +39,7 @@
 #import <WebCore/SharedBuffer.h>
 #import <WebCore/SubframeLoader.h>
 #import <WebKitSystemInterface.h>
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/NeverDestroyed.h>
 
 using namespace WebCore;
index bfb282a..7783ea3 100644 (file)
 #import "WebSecurityOriginInternal.h"
 #import "WebUIDelegatePrivate.h"
 #import "WebViewInternal.h"
-#import <WebCore/BlockExceptions.h>
 #import <WebCore/Page.h>
 #import <WebCore/ScriptExecutionContext.h>
 #import <WebCore/UserMediaPermissionCheck.h>
 #import <WebCore/UserMediaRequest.h>
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/HashMap.h>
 #import <wtf/NeverDestroyed.h>
 #import <wtf/RefPtr.h>
index f3fdf39..a152933 100644 (file)
@@ -29,8 +29,8 @@
 #import "WebFrameInternal.h"
 #import "WebHistoryInternal.h"
 #import "WebViewInternal.h"
-#import <WebCore/BlockExceptions.h>
 #import <WebCore/PageCache.h>
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/NeverDestroyed.h>
 
 using namespace WebCore;
index db097ae..8c8e971 100644 (file)
@@ -72,7 +72,6 @@
 #import "WebTypesInternal.h"
 #import "WebUIDelegatePrivate.h"
 #import "WebViewInternal.h"
-#import <WebCore/BlockExceptions.h>
 #import <WebCore/CSSStyleDeclaration.h>
 #import <WebCore/CachedImage.h>
 #import <WebCore/CachedResourceClient.h>
 #import <dlfcn.h>
 #import <limits>
 #import <runtime/InitializeThreading.h>
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/MainThread.h>
 #import <wtf/MathExtras.h>
 #import <wtf/ObjcRuntimeExtras.h>
index c5dc53f..68f7a5b 100644 (file)
@@ -1,3 +1,17 @@
+2016-05-17  Filip Pizlo  <fpizlo@apple.com>
+
+        WTF should know about Language
+        https://bugs.webkit.org/show_bug.cgi?id=157756
+
+        Reviewed by Geoffrey Garen and Alexey Proskuryakov.
+
+        Rewires a bunch of includes/imports.
+
+        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
+        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
+        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
+        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
+
 2016-05-17  Jer Noble  <jer.noble@apple.com>
 
         Unreviewed GTK+ and EFL bulid fix; make the audio playback user gesture requirement
index c218fbd..6f0f164 100644 (file)
 #import "PlatformCALayerRemote.h"
 #import "RemoteLayerTreeHost.h"
 #import <QuartzCore/QuartzCore.h>
-#import <WebCore/BlockExceptions.h>
 #import <WebCore/PlatformCAFilters.h>
 #import <WebCore/QuartzCoreSPI.h>
 #import <WebCore/ScrollbarThemeMac.h>
+#import <wtf/BlockObjCExceptions.h>
 
 #if PLATFORM(IOS)
 #import <UIKit/UIView.h>
index 53ec5de..83d0594 100644 (file)
@@ -26,7 +26,6 @@
 #import "config.h"
 #import "ProcessLauncher.h"
 
-#import <WebCore/CFBundleSPI.h>
 #import <WebCore/ServersSPI.h>
 #import <WebCore/SoftLinking.h>
 #import <WebCore/WebCoreNSStringExtras.h>
@@ -41,6 +40,7 @@
 #import <wtf/RunLoop.h>
 #import <wtf/Threading.h>
 #import <wtf/spi/darwin/XPCSPI.h>
+#import <wtf/spi/cf/CFBundleSPI.h>
 #import <wtf/text/CString.h>
 #import <wtf/text/WTFString.h>
 
index ac35ba2..e0ac80e 100644 (file)
 #if ENABLE(ASYNC_SCROLLING)
 
 #import <QuartzCore/QuartzCore.h>
-#import <WebCore/BlockExceptions.h>
 #import <WebCore/ScrollingStateOverflowScrollingNode.h>
 #import <WebCore/ScrollingTree.h>
 #import <UIKit/UIPanGestureRecognizer.h>
 #import <UIKit/UIScrollView.h>
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/TemporaryChange.h>
 
 #if ENABLE(CSS_SCROLL_SNAP)
index d35e6bb..82231ce 100644 (file)
 #import "ArgumentCoders.h"
 #import "RemoteLayerTreeHost.h"
 #import "WebCoreArgumentCoders.h"
-#import <WebCore/BlockExceptions.h>
 #import <WebCore/GraphicsLayer.h>
 #import <WebCore/PlatformCAAnimationCocoa.h>
 #import <WebCore/PlatformCAFilters.h>
 #import <WebCore/QuartzCoreSPI.h>
 #import <WebCore/TextStream.h>
 #import <WebCore/TimingFunction.h>
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/CurrentTime.h>
 #import <wtf/RetainPtr.h>
 #import <QuartzCore/QuartzCore.h>