Bug 128130 - NavigationState should be a PageLoadState::Observer
Summary: NavigationState should be a PageLoadState::Observer
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-03 14:59 PST by Anders Carlsson
Modified: 2014-02-03 15:36 PST (History)
0 users

See Also:


Attachments
Patch (13.21 KB, patch)
2014-02-03 15:03 PST, Anders Carlsson
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2014-02-03 14:59:36 PST
NavigationState should be a PageLoadState::Observer
Comment 1 Anders Carlsson 2014-02-03 15:03:21 PST
Created attachment 223027 [details]
Patch
Comment 2 Darin Adler 2014-02-03 15:22:26 PST
Comment on attachment 223027 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=223027&action=review

> Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h:38
> +#if PLATFORM(IOS)
> +#import "WKContentViewInternal.h"
> +#import <UIKit/UIScrollView_Private.h>
> +#import <UIKit/_UIWebViewportHandler.h>
> +
> +#define WK_WEB_VIEW_PROTOCOLS <UIScrollViewDelegate, WKContentViewDelegate, _UIWebViewportHandlerDelegate>
> +#endif

The paragraphing here is hard to read. I’d almost prefer two separate if statements.

> Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h:42
> +#if PLATFORM(MAC) && !PLATFORM(IOS)
> +#define WK_WEB_VIEW_PROTOCOLS
> +#endif

Maybe just:

#if !defined(WK_WEB_VIEW_PROTOCOLS)
#define WK_WEB_VIEW_PROTOCOLS
#endif

> Source/WebKit2/UIProcess/Cocoa/NavigationState.h:92
> +    // PageLoadState::Observer
> +    virtual void willChangeIsLoading() override;
> +    virtual void didChangeIsLoading() override;

Without a blank line, this comment seems to be grouped with only these first two overrides, so I suggest different formatting.

> Source/WebKit2/UIProcess/Cocoa/NavigationState.mm:340
> +    printf("%s!\n", __PRETTY_FUNCTION__);

Do we really want to land this?

> Source/WebKit2/UIProcess/Cocoa/NavigationState.mm:345
> +    printf("%s!\n", __PRETTY_FUNCTION__);

Do we really want to land this?
Comment 3 Anders Carlsson 2014-02-03 15:28:35 PST
Committed r163332: <http://trac.webkit.org/changeset/163332>
Comment 4 mitz 2014-02-03 15:36:20 PST
Comment on attachment 223027 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=223027&action=review

> Source/WebKit2/UIProcess/Cocoa/NavigationState.mm:34
> +#import "PageLoadState.h"

P < W

> Source/WebKit2/UIProcess/Cocoa/NavigationState.mm:340
> +    printf("%s!\n", __PRETTY_FUNCTION__);

No!

> Source/WebKit2/UIProcess/Cocoa/NavigationState.mm:345
> +    printf("%s!\n", __PRETTY_FUNCTION__);

No!