Changeset 140366 in webkit


Ignore:
Timestamp:
Jan 21, 2013 2:43:56 PM (11 years ago)
Author:
aestes@apple.com
Message:

Add a USE() macro for content filtering code
https://bugs.webkit.org/show_bug.cgi?id=107098

Reviewed by Mark Rowe.

Source/WebCore:

  • WebCore.exp.in: Use USE(CONTENT_FILTERING).
  • loader/MainResourceLoader.cpp:

(WebCore::MainResourceLoader::MainResourceLoader): Ditto.
(WebCore::MainResourceLoader::~MainResourceLoader): Ditto.
(WebCore::MainResourceLoader::cancel): Ditto.
(WebCore::MainResourceLoader::responseReceived): Ditto.
(WebCore::MainResourceLoader::dataReceived): Ditto.
(WebCore::MainResourceLoader::didFinishLoading): Ditto.
(WebCore::MainResourceLoader::notifyFinished): Ditto.

  • loader/MainResourceLoader.h:

(MainResourceLoader): Ditto.

  • platform/mac/WebCoreSystemInterface.h: Ditto.
  • platform/mac/WebCoreSystemInterface.mm: Ditto.

Source/WebKit/mac:

  • WebCoreSupport/WebSystemInterface.mm:

(InitWebCoreSystemInterface): Use USE(CONTENT_FILTERING).

Source/WebKit2:

  • WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:

(InitWebCoreSystemInterface): Use USE(CONTENT_FILTERING).

Source/WTF:

  • wtf/Platform.h: Define WTF_USE_CONTENT_FILTERING on Mac platforms

more recent than Lion.

Location:
trunk/Source
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r140238 r140366  
     12013-01-17  Andy Estes  <aestes@apple.com>
     2
     3        Add a USE() macro for content filtering code
     4        https://bugs.webkit.org/show_bug.cgi?id=107098
     5
     6        Reviewed by Mark Rowe.
     7
     8        * wtf/Platform.h: Define WTF_USE_CONTENT_FILTERING on Mac platforms
     9        more recent than Lion.
     10
    1112013-01-18  Laszlo Gombos  <l.gombos@samsung.com>
    212
  • trunk/Source/WTF/wtf/Platform.h

    r140238 r140366  
    12101210#endif
    12111211
     1212#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
     1213#define WTF_USE_CONTENT_FILTERING 1
     1214#endif
     1215
    12121216#endif /* WTF_Platform_h */
  • trunk/Source/WebCore/ChangeLog

    r140365 r140366  
     12013-01-17  Andy Estes  <aestes@apple.com>
     2
     3        Add a USE() macro for content filtering code
     4        https://bugs.webkit.org/show_bug.cgi?id=107098
     5
     6        Reviewed by Mark Rowe.
     7
     8        * WebCore.exp.in: Use USE(CONTENT_FILTERING).
     9        * loader/MainResourceLoader.cpp:
     10        (WebCore::MainResourceLoader::MainResourceLoader): Ditto.
     11        (WebCore::MainResourceLoader::~MainResourceLoader): Ditto.
     12        (WebCore::MainResourceLoader::cancel): Ditto.
     13        (WebCore::MainResourceLoader::responseReceived): Ditto.
     14        (WebCore::MainResourceLoader::dataReceived): Ditto.
     15        (WebCore::MainResourceLoader::didFinishLoading): Ditto.
     16        (WebCore::MainResourceLoader::notifyFinished): Ditto.
     17        * loader/MainResourceLoader.h:
     18        (MainResourceLoader): Ditto.
     19        * platform/mac/WebCoreSystemInterface.h: Ditto.
     20        * platform/mac/WebCoreSystemInterface.mm: Ditto.
     21
    1222013-01-21  Bem Jones-Bey  <bjonesbe@adobe.com>
    223
  • trunk/Source/WebCore/WebCore.exp.in

    r140265 r140366  
    21512151#endif
    21522152
    2153 #if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
    2154 _wkExecutableWasLinkedOnOrBeforeLion
     2153#if USE(CONTENT_FILTERING)
    21552154_wkFilterAddData
    21562155_wkFilterCreateInstance
     
    21592158_wkFilterRelease
    21602159_wkFilterWasBlocked
     2160#endif
     2161
     2162#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     2163_wkExecutableWasLinkedOnOrBeforeLion
    21612164_wkNSElasticDeltaForReboundDelta
    21622165_wkNSElasticDeltaForTimeDelta
  • trunk/Source/WebCore/loader/MainResourceLoader.cpp

    r140105 r140366  
    6262#endif
    6363
    64 #if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     64#if USE(CONTENT_FILTERING)
    6565#include "WebCoreSystemInterface.h"
    6666#endif
     
    7575    , m_timeOfLastDataReceived(0.0)
    7676    , m_substituteDataLoadIdentifier(0)
    77 #if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     77#if USE(CONTENT_FILTERING)
    7878    , m_filter(0)
    7979#endif
     
    8484{
    8585    clearResource();
    86 #if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     86#if USE(CONTENT_FILTERING)
    8787    ASSERT(!m_filter);
    8888#endif
     
    137137    receivedError(resourceError);
    138138
    139 #if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     139#if USE(CONTENT_FILTERING)
    140140    if (m_filter) {
    141141        wkFilterRelease(m_filter);
     
    454454#endif
    455455
    456 #if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     456#if USE(CONTENT_FILTERING)
    457457    if (r.url().protocolIs("https") && wkFilterIsManagedSession())
    458458        m_filter = wkFilterCreateInstance(r.nsURLResponse());
     
    484484#endif
    485485
    486 #if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     486#if USE(CONTENT_FILTERING)
    487487    if (m_filter) {
    488488        ASSERT(!wkFilterWasBlocked(m_filter));
     
    512512    documentLoader()->receivedData(data, length);
    513513
    514 #if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     514#if USE(CONTENT_FILTERING)
    515515    if (WebFilterEvaluator *filter = m_filter) {
    516516        // If we got here, it means we know if we were blocked or not. If we were blocked, we're
     
    544544    }
    545545
    546 #if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     546#if USE(CONTENT_FILTERING)
    547547    if (m_filter) {
    548548        int length;
     
    580580    }
    581581
    582 #if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     582#if USE(CONTENT_FILTERING)
    583583    if (m_filter) {
    584584        wkFilterRelease(m_filter);
  • trunk/Source/WebCore/loader/MainResourceLoader.h

    r140105 r140366  
    3737#include <wtf/Forward.h>
    3838
    39 #if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     39#if USE(CONTENT_FILTERING)
    4040OBJC_CLASS WebFilterEvaluator;
    4141#endif
     
    131131    unsigned long m_substituteDataLoadIdentifier;
    132132
    133 #if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     133#if USE(CONTENT_FILTERING)
    134134    WebFilterEvaluator *m_filter;
    135135#endif
  • trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h

    r138553 r140366  
    337337#endif
    338338
    339 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
     339#if USE(CONTENT_FILTERING)
    340340extern BOOL (*wkFilterIsManagedSession)(void);
    341341extern WebFilterEvaluator *(*wkFilterCreateInstance)(NSURLResponse *);
     
    344344extern const char* (*wkFilterAddData)(WebFilterEvaluator *, const char* data, int* length);
    345345extern const char* (*wkFilterDataComplete)(WebFilterEvaluator *, int* length);
    346 
     346#endif
     347
     348#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
    347349extern CGFloat (*wkNSElasticDeltaForTimeDelta)(CGFloat initialPosition, CGFloat initialVelocity, CGFloat elapsedTime);
    348350extern CGFloat (*wkNSElasticDeltaForReboundDelta)(CGFloat delta);
  • trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm

    r138553 r140366  
    209209#endif
    210210
    211 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
     211#if USE(CONTENT_FILTERING)
    212212BOOL (*wkFilterIsManagedSession)(void);
    213213WebFilterEvaluator *(*wkFilterCreateInstance)(NSURLResponse *);
     
    216216const char* (*wkFilterAddData)(WebFilterEvaluator *, const char* data, int* length);
    217217const char* (*wkFilterDataComplete)(WebFilterEvaluator *, int* length);
    218 
     218#endif
     219
     220#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
    219221CGFloat (*wkNSElasticDeltaForTimeDelta)(CGFloat initialPosition, CGFloat initialVelocity, CGFloat elapsedTime);
    220222CGFloat (*wkNSElasticDeltaForReboundDelta)(CGFloat delta);
  • trunk/Source/WebKit/mac/ChangeLog

    r140265 r140366  
     12013-01-17  Andy Estes  <aestes@apple.com>
     2
     3        Add a USE() macro for content filtering code
     4        https://bugs.webkit.org/show_bug.cgi?id=107098
     5
     6        Reviewed by Mark Rowe.
     7
     8        * WebCoreSupport/WebSystemInterface.mm:
     9        (InitWebCoreSystemInterface): Use USE(CONTENT_FILTERING).
     10
    1112013-01-19  Philip Rogers  <pdr@google.com>
    212
  • trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm

    r138553 r140366  
    206206#endif
    207207
    208 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
     208#if USE(CONTENT_FILTERING)
    209209    INIT(FilterIsManagedSession);
    210210    INIT(FilterCreateInstance);
     
    213213    INIT(FilterAddData);
    214214    INIT(FilterDataComplete);
    215 
     215#endif
     216
     217#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
    216218    INIT(NSElasticDeltaForTimeDelta);
    217219    INIT(NSElasticDeltaForReboundDelta);
  • trunk/Source/WebKit2/ChangeLog

    r140351 r140366  
     12013-01-17  Andy Estes  <aestes@apple.com>
     2
     3        Add a USE() macro for content filtering code
     4        https://bugs.webkit.org/show_bug.cgi?id=107098
     5
     6        Reviewed by Mark Rowe.
     7
     8        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
     9        (InitWebCoreSystemInterface): Use USE(CONTENT_FILTERING).
     10
    1112013-01-21  Anders Carlsson  <andersca@apple.com>
    212
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm

    r138553 r140366  
    169169        INIT(CFURLRequestAllowAllPostCaching);
    170170
    171 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
     171#if USE(CONTENT_FILTERING)
    172172        INIT(FilterIsManagedSession);
    173173        INIT(FilterCreateInstance);
     
    176176        INIT(FilterAddData);
    177177        INIT(FilterDataComplete);
     178#endif
    178179
     180#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
    179181        INIT(NSElasticDeltaForTimeDelta);
    180182        INIT(NSElasticDeltaForReboundDelta);
Note: See TracChangeset for help on using the changeset viewer.