Bug 196727

Summary: [WinCairo][MiniBrowser] Pull down menu "Disable JavaScript" doesn't work.
Product: WebKit Reporter: Takashi Komori <takashi.komori>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: Basuke.Suzuki, commit-queue, don.olmstead, Hironori.Fujii, lforschler, ross.kirsling, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Takashi Komori 2019-04-09 00:43:55 PDT
On WinCairo MiniBrowser, some of pull down menu doesn't work.
We can't disabling JavaScript by clicking Develop menu->Disable JavaScript.

This is because page group and preference are not register properly.
Comment 1 Takashi Komori 2019-04-09 00:49:27 PDT
Created attachment 367033 [details]
Patch
Comment 2 Fujii Hironori 2019-04-09 02:23:44 PDT
Comment on attachment 367033 [details]
Patch

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

> Tools/MiniBrowser/win/WebKitBrowserWindow.cpp:113
> +    auto pageGroup = WKPageGroupCreateWithIdentifier(createWKString("WinCairoMiniBrowser").get());

WebKitBrowserWindow is used only for WinCairo at the memoment, but also for AppleWin in the future (hopefully). Should be renamed.
Nit: pageGroup is leaked.
auto pageGroup = adoptWK(...);
And conf, prefs and context are also leaked.
Comment 3 Takashi Komori 2019-04-09 21:48:06 PDT
Created attachment 367099 [details]
Patch
Comment 4 Takashi Komori 2019-04-09 21:52:16 PDT
(In reply to Fujii Hironori from comment #2)
> Comment on attachment 367033 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=367033&action=review
> 
> > Tools/MiniBrowser/win/WebKitBrowserWindow.cpp:113
> > +    auto pageGroup = WKPageGroupCreateWithIdentifier(createWKString("WinCairoMiniBrowser").get());
> WebKitBrowserWindow is used only for WinCairo at the memoment, but also for
> AppleWin in the future (hopefully). Should be renamed.

Changed to "WinMiniBrowser". If more apropriate one exists, I'll change.

> Nit: pageGroup is leaked.
> auto pageGroup = adoptWK(...);
> And conf, prefs and context are also leaked.

Fixed.
Comment 5 Takashi Komori 2019-04-09 22:58:08 PDT
Created attachment 367105 [details]
Patch
Comment 6 WebKit Commit Bot 2019-04-10 01:00:46 PDT
Comment on attachment 367105 [details]
Patch

Clearing flags on attachment: 367105

Committed r244106: <https://trac.webkit.org/changeset/244106>
Comment 7 WebKit Commit Bot 2019-04-10 01:00:48 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-04-10 01:01:26 PDT
<rdar://problem/49766482>