Summary: | [WinCairo] Add WKView and WKAPI | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Yousuke Kimoto <Yousuke.Kimoto> | ||||||||||||||||||||||
Component: | WebKit2 | Assignee: | Fujii Hironori <Hironori.Fujii> | ||||||||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||||||||
Severity: | Normal | CC: | achristensen, ap, bfulgham, darin, don.olmstead, ews-watchlist, Hironori.Fujii, rniwa, webkit-bug-importer | ||||||||||||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||||||||
Bug Depends on: | |||||||||||||||||||||||||
Bug Blocks: | 174003 | ||||||||||||||||||||||||
Attachments: |
|
Description
Yousuke Kimoto
2018-02-16 04:57:55 PST
Created attachment 334031 [details]
bz182869-1.patch
Comment on attachment 334031 [details]
bz182869-1.patch
For wincairo webkit, WKAPICast.h needs to include "WKAPICastWin.h". I'll fix it.
Created attachment 334997 [details]
Patch
Comment on attachment 334997 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=334997&action=review > Source/WebKit/UIProcess/API/C/win/WKView.cpp:65 > +void WKViewSetIsInWindow(WKViewRef viewRef, bool isInWindow) > +{ > + notImplemented(); > +} Let's not add unimplemented API. > Source/WebKit/UIProcess/API/C/win/WKView.cpp:112 > +void WKViewSetDrawsTransparentBackground(WKViewRef viewRef, bool drawsTransparentBackground) > +{ > +} ditto. > Source/WebKit/UIProcess/API/C/win/WKView.cpp:117 > +bool WKViewDrawsTransparentBackground(WKViewRef viewRef) > +{ > + return false; > +} This is also basically unimplemented. > Source/WebKit/UIProcess/API/C/win/WKView.h:76 > + WK_EXPORT void WKViewSetInitialFocus(WKViewRef view, bool forward); forward is probably the wrong name here. Created attachment 335295 [details]
Patch
Thank you for your review. (In reply to Alex Christensen from comment #4) > Comment on attachment 334997 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=334997&action=review > > > Source/WebKit/UIProcess/API/C/win/WKView.cpp:65 > > +void WKViewSetIsInWindow(WKViewRef viewRef, bool isInWindow) > > +{ > > + notImplemented(); > > +} > > Let's not add unimplemented API. Fixed. > > Source/WebKit/UIProcess/API/C/win/WKView.cpp:112 > > +void WKViewSetDrawsTransparentBackground(WKViewRef viewRef, bool drawsTransparentBackground) > > +{ > > +} > > ditto. > > Source/WebKit/UIProcess/API/C/win/WKView.cpp:117 > > +bool WKViewDrawsTransparentBackground(WKViewRef viewRef) > > +{ > > + return false; > > +} > > This is also basically unimplemented. Those two APIs are not used for now, so they were just removed. > > Source/WebKit/UIProcess/API/C/win/WKView.h:76 > > + WK_EXPORT void WKViewSetInitialFocus(WKViewRef view, bool forward); > > forward is probably the wrong name here. "isForward" is used instead by mimicking WKViewSetIsInWindow()'s boolean variable name. Comment on attachment 335295 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=335295&action=review This is adding a file that doesn't compile. Let's not. > Source/WebKit/UIProcess/API/C/win/WKAPICastWin.h:2 > + * Copyright (C) 2010 Apple Inc. All rights reserved. If this is resurrecting old code, please indicate the initial commit this came from. > Source/WebKit/UIProcess/API/C/win/WKAPICastWin.h:38 > +WK_ADD_API_MAPPING(WKViewRef, WebView) Is WebView correct? I think we might want something more like WebPageProxy here. > Source/WebKit/UIProcess/API/C/win/WKView.cpp:32 > +#include "WebView.h" WebView.h doesn't exist in modern WebKit. Does this compile? Created attachment 337690 [details]
Patch
Comment on attachment 337690 [details] Patch Attachment 337690 [details] did not pass win-ews (win): Output: http://webkit-queues.webkit.org/results/7282666 New failing tests: http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html Created attachment 337694 [details]
Archive of layout-test-results from ews200 for win-future
The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews200 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Could anyone review? Comment on attachment 337690 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=337690&action=review > Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp:35 > +const LPCWSTR webKitDLLName = L"WebKit2.dll"; Do we want this name? > Source/WebKit/UIProcess/win/WebContextMenuProxyWin.h:51 > + WebPageProxy* m_page; It looks like this could be a WebPageProxy&. > Source/WebKit/UIProcess/win/WebView.cpp:72 > +SOFT_LINK_LIBRARY(IMM32) Why are we soft linking instead of directly linking? > Source/WebKit/UIProcess/win/WebView.cpp:245 > + , m_toolTipWindow(0) These should be { nullptr } in the header. > Source/WebKit/UIProcess/win/WebView.h:57 > + static WebView* create(RECT rect, const API::PageConfiguration& configuration, HWND parentWindow) This should return a std::unique_ptr or UniqueRef. Comment on attachment 337690 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=337690&action=review Thank you for the review. >> Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp:35 >> +const LPCWSTR webKitDLLName = L"WebKit2.dll"; > > Do we want this name? I will remove the variable. >> Source/WebKit/UIProcess/win/WebView.cpp:72 >> +SOFT_LINK_LIBRARY(IMM32) > > Why are we soft linking instead of directly linking? I don't know the reason. SOFT_LINK was used since Bug 51049. I will link it directly. Comment on attachment 337690 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=337690&action=review >> Source/WebKit/UIProcess/win/WebView.h:57 >> + static WebView* create(RECT rect, const API::PageConfiguration& configuration, HWND parentWindow) > > This should return a std::unique_ptr or UniqueRef. WebView is an APIObject. It needs to be leaked to convert C object. WebProcessPool::create return Ref<WebProcessPool> and using leakRef() to convert C object. > static Ref<WebProcessPool> create(API::ProcessPoolConfiguration&); > WKContextRef WKContextCreate() > { > auto configuration = API::ProcessPoolConfiguration::createWithLegacyOptions(); > return toAPI(&WebProcessPool::create(configuration).leakRef()); > } I will use this style for WebView. Created attachment 338081 [details]
Patch
Comment on attachment 338081 [details] Patch Attachment 338081 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/7340707 New failing tests: animations/needs-layout.html Created attachment 338086 [details]
Archive of layout-test-results from ews103 for mac-sierra
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103 Port: mac-sierra Platform: Mac OS X 10.12.6
Comment on attachment 338081 [details] Patch Attachment 338081 [details] did not pass win-ews (win): Output: http://webkit-queues.webkit.org/results/7341027 New failing tests: http/tests/security/video-poster-cross-origin-crash2.html Created attachment 338091 [details]
Archive of layout-test-results from ews206 for win-future
The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews206 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Could you review again, Alex? Could anyone review this? Created attachment 338632 [details]
Patch
* Removed half-baked IME support to simplify this patch.
Comment on attachment 338632 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=338632&action=review > Source/WebKit/UIProcess/Launcher/ProcessLauncher.h:96 > + HANDLE m_hProcess; You might consider using a Win32Handle here. Created attachment 338701 [details]
Patch for landing
Committed r230982: <https://trac.webkit.org/changeset/230982> |