Changeset 166613 in webkit


Ignore:
Timestamp:
Apr 1, 2014 2:35:54 PM (10 years ago)
Author:
andersca@apple.com
Message:

Demote WKBackForwardListDidChangeNotification to SPI
https://bugs.webkit.org/show_bug.cgi?id=131059

Reviewed by Dan Bernstein.

  • UIProcess/API/Cocoa/WKBackForwardList.h:
  • UIProcess/API/Cocoa/WKBackForwardList.mm:
  • UIProcess/API/Cocoa/WKBackForwardListInternal.h:
  • UIProcess/API/Cocoa/WKBackForwardListPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListInternal.h.
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::LoaderClient::didChangeBackForwardList):

  • WebKit2.xcodeproj/project.pbxproj:
Location:
trunk/Source/WebKit2
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r166612 r166613  
     12014-04-01  Anders Carlsson  <andersca@apple.com>
     2
     3        Demote WKBackForwardListDidChangeNotification to SPI
     4        https://bugs.webkit.org/show_bug.cgi?id=131059
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * UIProcess/API/Cocoa/WKBackForwardList.h:
     9        * UIProcess/API/Cocoa/WKBackForwardList.mm:
     10        * UIProcess/API/Cocoa/WKBackForwardListInternal.h:
     11        * UIProcess/API/Cocoa/WKBackForwardListPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListInternal.h.
     12        * UIProcess/Cocoa/NavigationState.mm:
     13        (WebKit::NavigationState::LoaderClient::didChangeBackForwardList):
     14        * WebKit2.xcodeproj/project.pbxproj:
     15
    1162014-04-01  Andy Estes  <aestes@apple.com>
    217
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardList.h

    r166602 r166613  
    3030#import <WebKit2/WKBackForwardListItem.h>
    3131
    32 /*! Posted when a back-forward list changes. The notification object is the WKBackForwardList
    33         that changed. The <code>userInfo</code> dictionary may contain the
    34         @link WKBackForwardListAddedItemKey @/link and @link WKBackForwardListRemovedItemsKey @/link
    35         keys.
    36 */
    37 WK_EXTERN NSString * const WKBackForwardListDidChangeNotification;
    38 
    39 /*! A key in the <code>userInfo</code> dictionary of a
    40         @link WKBackForwardListDidChangeNotification @/link, whose value is the
    41         @link WKBackForwardListItem @/link that was appended to the list.
    42 */
    43 WK_EXTERN NSString * const WKBackForwardListAddedItemKey;
    44 
    45 
    46 /*! A key in the <code>userInfo</code> dictionary of a
    47         @link WKBackForwardListDidChangeNotification @/link, whose value is an NSArray of
    48         @link WKBackForwardListItem@/link instances that were removed from the list.
    49 */
    50 WK_EXTERN NSString * const WKBackForwardListRemovedItemsKey;
    5132
    5233WK_API_CLASS
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardList.mm

    r166602 r166613  
    3232#import "WKNSArray.h"
    3333
    34 NSString * const WKBackForwardListDidChangeNotification = @"WKBackForwardListDidChangeNotification";
    35 NSString * const WKBackForwardListAddedItemKey = @"WKBackForwardListAddedItemKey";
    36 NSString * const WKBackForwardListRemovedItemsKey = @"WKBackForwardListRemovedItemsKey";
     34// FIXME: Remove this when nobody depends on it.
     35WK_EXTERN NSString * const WKBackForwardListDidChangeNotification;
     36NSString * const WKBackForwardListDidChangeNotification = @"_WKBackForwardListDidChangeNotification";
     37
     38NSString * const _WKBackForwardListDidChangeNotification = @"_WKBackForwardListDidChangeNotification";
    3739
    3840using namespace WebKit;
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListInternal.h

    r158324 r166613  
    2424 */
    2525
    26 #import "WKBackForwardList.h"
     26#import "WKBackForwardListPrivate.h"
    2727
    2828#if WK_API_ENABLED
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListPrivate.h

    r166612 r166613  
    11/*
    2  * Copyright (C) 2013 Apple Inc. All rights reserved.
     2 * Copyright (C) 2014 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 #import "WKBackForwardList.h"
     26#import <WebKit2/WKBackForwardList.h>
    2727
    2828#if WK_API_ENABLED
    2929
    30 #import "WKObject.h"
    31 #import "WebBackForwardList.h"
     30WK_EXTERN NSString * const _WKBackForwardListDidChangeNotification;
    3231
    33 namespace WebKit {
    34 inline WKBackForwardList *wrapper(WebBackForwardList& list) { ASSERT([list.wrapper() isKindOfClass:[WKBackForwardList class]]); return (WKBackForwardList *)list.wrapper(); }
    35 }
    36 
    37 @interface WKBackForwardList () <WKObject>
    38 @end
    39 
    40 #endif // WK_API_ENABLED
     32#endif
  • trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm

    r166560 r166613  
    518518void NavigationState::LoaderClient::didChangeBackForwardList(WebKit::WebPageProxy*, WebKit::WebBackForwardListItem* addedItem, Vector<RefPtr<WebKit::WebBackForwardListItem>> removedItems)
    519519{
    520     auto userInfo = adoptNS([[NSMutableDictionary alloc] init]);
    521 
    522     if (addedItem)
    523         [userInfo setObject:wrapper(*addedItem) forKey:WKBackForwardListAddedItemKey];
    524 
    525     if (!removedItems.isEmpty()) {
    526         Vector<id> removed;
    527         removed.reserveInitialCapacity(removedItems.size());
    528 
    529         for (const auto& removedItem : removedItems)
    530             removed.uncheckedAppend(wrapper(*removedItem));
    531 
    532         [userInfo setObject:adoptNS([[NSArray alloc] initWithObjects:removed.data() count:removed.size()]).get() forKey:WKBackForwardListRemovedItemsKey];
    533     }
    534 
    535     [[NSNotificationCenter defaultCenter] postNotificationName:WKBackForwardListDidChangeNotification object:wrapper(m_navigationState.m_webView->_page->backForwardList()) userInfo:userInfo.get()];
     520    [[NSNotificationCenter defaultCenter] postNotificationName:_WKBackForwardListDidChangeNotification object:wrapper(m_navigationState.m_webView->_page->backForwardList())];
    536521}
    537522
  • trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

    r166598 r166613  
    252252                1A7865B916CAC71500ACE83A /* PluginProcessConnectionManagerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A7865B716CAC71500ACE83A /* PluginProcessConnectionManagerMessageReceiver.cpp */; };
    253253                1A7865BA16CAC71500ACE83A /* PluginProcessConnectionManagerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A7865B816CAC71500ACE83A /* PluginProcessConnectionManagerMessages.h */; };
     254                1A79D9F218EB5EF100914CC5 /* WKBackForwardListPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A79D9F118EB5EF100914CC5 /* WKBackForwardListPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
    254255                1A7C6CDA1378950800B9C04D /* EnvironmentVariables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A7C6CD81378950800B9C04D /* EnvironmentVariables.cpp */; };
    255256                1A7C6CDB1378950800B9C04D /* EnvironmentVariables.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A7C6CD91378950800B9C04D /* EnvironmentVariables.h */; };
     
    20162017                1A7865B716CAC71500ACE83A /* PluginProcessConnectionManagerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginProcessConnectionManagerMessageReceiver.cpp; sourceTree = "<group>"; };
    20172018                1A7865B816CAC71500ACE83A /* PluginProcessConnectionManagerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginProcessConnectionManagerMessages.h; sourceTree = "<group>"; };
     2019                1A79D9F118EB5EF100914CC5 /* WKBackForwardListPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBackForwardListPrivate.h; sourceTree = "<group>"; };
    20182020                1A7C6CD81378950800B9C04D /* EnvironmentVariables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EnvironmentVariables.cpp; sourceTree = "<group>"; };
    20192021                1A7C6CD91378950800B9C04D /* EnvironmentVariables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EnvironmentVariables.h; sourceTree = "<group>"; };
     
    37893791                                37C4C08A1814AC5C003688B9 /* WKBackForwardList.mm */,
    37903792                                37C4C08E1814AF3A003688B9 /* WKBackForwardListInternal.h */,
     3793                                1A79D9F118EB5EF100914CC5 /* WKBackForwardListPrivate.h */,
    37913794                                37C4C08518149C5B003688B9 /* WKBackForwardListItem.h */,
    37923795                                37C4C08418149C5B003688B9 /* WKBackForwardListItem.mm */,
     
    67036706                                512C06891638F67E00ABB911 /* HostRecord.h in Headers */,
    67046707                                37F90DE31376560E0051CF68 /* HTTPCookieAcceptPolicy.h in Headers */,
     6708                                1A79D9F218EB5EF100914CC5 /* WKBackForwardListPrivate.h in Headers */,
    67056709                                BCCF6B2512C93E7A008F9C35 /* ImageOptions.h in Headers */,
    67066710                                1A1E093418861D3800D2DC49 /* WebProgressTrackerClient.h in Headers */,
Note: See TracChangeset for help on using the changeset viewer.