Changeset 164079 in webkit


Ignore:
Timestamp:
Feb 13, 2014 5:24:09 PM (10 years ago)
Author:
andersca@apple.com
Message:

Add -[WKWebView activeURL]
https://bugs.webkit.org/show_bug.cgi?id=128777

Reviewed by Dan Bernstein.

  • UIProcess/API/Cocoa/WKWebView.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView activeURL]):

  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::willChangeActiveURL):
(WebKit::NavigationState::didChangeActiveURL):

Location:
trunk/Source/WebKit2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r164067 r164079  
     12014-02-13  Anders Carlsson  <andersca@apple.com>
     2
     3        Add -[WKWebView activeURL]
     4        https://bugs.webkit.org/show_bug.cgi?id=128777
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * UIProcess/API/Cocoa/WKWebView.h:
     9        * UIProcess/API/Cocoa/WKWebView.mm:
     10        (-[WKWebView activeURL]):
     11        * UIProcess/Cocoa/NavigationState.mm:
     12        (WebKit::NavigationState::willChangeActiveURL):
     13        (WebKit::NavigationState::didChangeActiveURL):
     14
    1152014-02-13  Anders Carlsson  <andersca@apple.com>
    216
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h

    r164067 r164079  
    8989@property (nonatomic, readonly) NSString *title;
    9090
     91/*! @abstract The active URL. @link WKWebView @/link is KVO-compliant for this property.
     92 @discussion This is the URL that should be reflected in the user interface.
     93 */
     94@property (nonatomic, readonly) NSURL *activeURL;
     95
    9196/*! @abstract Whether the view is loading content. @link WKWebView @/link is KVO-compliant for this
    9297 property. */
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm

    r164067 r164079  
    3030
    3131#import "NavigationState.h"
     32#import "RemoteLayerTreeTransaction.h"
    3233#import "RemoteObjectRegistry.h"
    3334#import "RemoteObjectRegistryMessages.h"
     
    4445#import "WebPageProxy.h"
    4546#import "WebProcessProxy.h"
    46 #import <WebKit2/RemoteLayerTreeTransaction.h>
     47#import "WKNSURLExtras.h"
    4748#import <wtf/RetainPtr.h>
    4849
     
    192193}
    193194
     195- (NSURL *)activeURL
     196{
     197    return [NSURL _web_URLWithWTFString:_page->pageLoadState().activeURL()];
     198}
     199
    194200- (BOOL)isLoading
    195201{
  • trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm

    r164049 r164079  
    395395void NavigationState::willChangeActiveURL()
    396396{
     397    [m_webView willChangeValueForKey:@"activeURL"];
    397398}
    398399
    399400void NavigationState::didChangeActiveURL()
    400401{
     402    [m_webView didChangeValueForKey:@"activeURL"];
    401403}
    402404
Note: See TracChangeset for help on using the changeset viewer.