Changeset 163358 in webkit


Ignore:
Timestamp:
Feb 3, 2014 7:10:15 PM (10 years ago)
Author:
andersca@apple.com
Message:

Add title and hasOnlySecureContent properties to WKWebView
https://bugs.webkit.org/show_bug.cgi?id=128152

Reviewed by Dan Bernstein.

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

(-[WKWebView title]):
(-[WKWebView hasOnlySecureContent]):

  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::didChangeIsLoading):
(WebKit::NavigationState::willChangeTitle):
(WebKit::NavigationState::didChangeTitle):
(WebKit::NavigationState::willChangeHasOnlySecureContent):
(WebKit::NavigationState::didChangeHasOnlySecureContent):

Location:
trunk/Source/WebKit2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r163355 r163358  
     12014-02-03  Anders Carlsson  <andersca@apple.com>
     2
     3        Add title and hasOnlySecureContent properties to WKWebView
     4        https://bugs.webkit.org/show_bug.cgi?id=128152
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * UIProcess/API/Cocoa/WKWebView.h:
     9        * UIProcess/API/Cocoa/WKWebView.mm:
     10        (-[WKWebView title]):
     11        (-[WKWebView hasOnlySecureContent]):
     12        * UIProcess/Cocoa/NavigationState.mm:
     13        (WebKit::NavigationState::didChangeIsLoading):
     14        (WebKit::NavigationState::willChangeTitle):
     15        (WebKit::NavigationState::didChangeTitle):
     16        (WebKit::NavigationState::willChangeHasOnlySecureContent):
     17        (WebKit::NavigationState::didChangeHasOnlySecureContent):
     18
    1192014-02-03  Sam Weinig  <sam@webkit.org>
    220
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h

    r163350 r163358  
    7474- (WKNavigation *)loadRequest:(NSURLRequest *)request;
    7575
     76@property (nonatomic, readonly) NSString *title;
     77
    7678/*! @abstract Whether the view is loading content. @link WKWebView @/link is KVO-compliant for this
    7779 property. */
    7880@property (nonatomic, readonly, getter=isLoading) BOOL loading;
    7981
     82@property (nonatomic, readonly) BOOL hasOnlySecureContent;
     83
    8084@end
    8185
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm

    r163350 r163358  
    141141}
    142142
     143- (NSString *)title
     144{
     145    return _page->pageLoadState().title();
     146}
     147
    143148- (BOOL)isLoading
    144149{
    145150    return _page->pageLoadState().isLoading();
     151}
     152
     153- (BOOL)hasOnlySecureContent
     154{
     155    return _page->pageLoadState().hasOnlySecureContent();
    146156}
    147157
  • trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm

    r163350 r163358  
    311311void NavigationState::didChangeIsLoading()
    312312{
    313     [m_webView willChangeValueForKey:@"loading"];
     313    [m_webView didChangeValueForKey:@"loading"];
    314314}
    315315
    316316void NavigationState::willChangeTitle()
    317317{
     318    [m_webView willChangeValueForKey:@"title"];
    318319}
    319320
    320321void NavigationState::didChangeTitle()
    321322{
     323    [m_webView didChangeValueForKey:@"title"];
    322324}
    323325
     
    332334void NavigationState::willChangeHasOnlySecureContent()
    333335{
     336    [m_webView willChangeValueForKey:@"hasOnlySecureContent"];
    334337}
    335338
    336339void NavigationState::didChangeHasOnlySecureContent()
    337340{
     341    [m_webView didChangeValueForKey:@"hasOnlySecureContent"];
    338342}
    339343
Note: See TracChangeset for help on using the changeset viewer.