selam | 27 Aug 13:25 2015
Picon

Customizing webkit for tracing Javascript execution

Hi all,

For my personal project i need to track down javascript executions
(not with inspection feature),  and for doing this i needed to track
XMLHttpRequest.addEventListeners, setTimeout, setInterval,
clearTimeout and clearInterval functions/methods and inside exection
of ScriptElement. and i dont needed other events except onload events
on elements

However I dont want to touch webkit's source code for do this job,
instead very like to extend XMLHttpRequest and other things and use
it. but i coudn't find a proper solution and documentation for this
matter.

So my question is what and how should i do? Any example of code or
documentation will be fine.

I am very stranger to C++ world but i am quick learner.

--

-- 
Saygılar && İyi Çalışmalar
Timu EREN ( a.k.a selam )
_______________________________________________
webkit-help mailing list
webkit-help <at> lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-help
Sharma, Rupali | 26 Aug 20:16 2015

Issue with Web Inspector debugger breakpoint handling (on Wincairo)

Hello,

 

We are seeing an issue with the Web Inspector debugger on latest WinCairo [ using Webkit r188436]. In the wincairo webinpector, whenever a breakpoint is set and then web page reload on a javascript source, the view goes on into some indefinite waiting and never shows up, until we press continue-script-execution or another page-refresh.

 

Here are the simple steps to reproduce it,

1.       Launch WinCairo and go to google.com

2.       Open Web inspector and open the script source of any .js script

3.       Set a breakpoint anywhere

4.       Reload the web page

 

What we see is the spinner spinning and never the script source. However, if one presses continue-script-execution from the debugger controls, we get the view back.

 

Some points of debugging we did at our end,

(i) We did some digging around the breakpoint setting, and do see the flow correctly being going to handlepause() of the ScriptDebugServer. Though I see the vmEntryGlobalObject is not updated with any value or callframe.

I did not see any abnormality in the listener dispatching callback, with the correct pause-reason to pass i.e. Breakpoint. However, I am not sure if its sending the right pause-data to the frontend.

 

(ii)It gets stuck in the infinite eventloop which does look fine to me, as long as it is paused.

 

(iii)Another observation I see is, the message “TimelineRecordingStopped” being sent to the frontend. I believe, this is something newly added and not sure, if at all it’ll effect the debugger scriptsource in any way. [reference : doDispatchMessageOnFrontendPage]

 

(iv)Coming onto the Web inspector UI side of story, I did see one bug, that even though  the method in DebuggerManager.js  “debuggerDidPausegot the right pause-reason from the webkit, its not able to pass on correctly due to an apparent bug in

_pauseReasonFromPayload: function(payload)

Here, the input payload does not match any of the  DebuggerAgent.PausedReason and hence falls to the error of unknown reason. The correct string to match would be “Breakpoint”. However, correcting the flow still doesn’t give us any favorable behavior. Though, I believe it’s good to know.

 

Would you have a better insight as to what exactly is blocking the script source to display in the paused-state of web inspector debugger?

 

The output log looks like:

EAWebKit:Event kLETResourceResponseReceived : The server has responded to a resource request URL - http://www.google.com/ with status = 200

EAWebKit:Event kLETLoadCompletedWithoutErrors : The load is completed without errors

Total Page Loaded                     : 1.139

Total Page Lib Tick Update                                              : 0.604  Slowest:: 0.521

Total Page View Tick Update           : 0.000  Slowest:: 0.000

Total Page Network Tick Update        : 0.000

Total Jobs Loop                       : 0.503  Slowest:: 0.489

Total Page Script                     : 0.000  Slowest:: 0.000

Font Glyph Draw                       : 0.000

Bitmap Image Draw                     : 0.000

Bitmap Image Decoder                  : 0.000

Image Compression                     : 0.000

Font/Image Raster Draw                : 0.000

TH Connect                            : 0.000

TH Transfer                           : 0.000

TH Disconnect                         : 0.000

TH Size                               : 0

TH Files                              : 0

Cached Connect                        : 0.000

Cached Transfer                       : 0.000

Cached Disconnect                     : 0.000

Cached Size                           : 0

Cached files                          : 0

Java Script Parse                     : 0.000

Java Script Execute                   : 0.000

CSS Sheet Parse                       : 0.000

Font Loading Time                     : 0.000

Page user1                            : 0.000

Page user2                            : 0.000

Page user3                            : 0.000

EAWebKit:Event kLETResourceResponseReceived : The server has responded to a resource request URL - http://www.google.com/xjs/_/js/k=xjs.hp.en_US.dipijOltWAk.O/m=sb_he,d/rt=j/d=1/t=zcms/rs=ACT90oGH2j95ix8dWTU-Ejrgyf_E0GhQSQ with status = 200

2015/08/26-10:51:01.462 protoupnp: multicasting discovery request

EAWebKit: JS - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js Line-464 Column-20 Message: DebuggerDidPause called ---->  got some data and reason

EAWebKit: JS - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js Line-465 Column-20 Message: pause reason isBreakpoint

EAWebKit: JS - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js Line-466 Column-20 Message: pause data is[object Object]

EAWebKit: JS - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js Line-628 Column-20 Message: 1. payload to _pauseReasonFrompaylod is Breakpoint

EAWebKit: JS - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js Line-635 Column-23 Message: >>> Payload is Breakpoint? is Breakpoint

EAWebKit: JS - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js Line-478 Column-20 Message: pause reason isbreakpoint

EAWebKit: JS - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js Line-504 Column-20 Message: pause reason isbreakpoint

EAWebKit:Event kLETResourceResponseReceived : The server has responded to a resource request URL - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Images/Exception.svg with status = 0

EAWebKit:Event kLETResourceResponseReceived : The server has responded to a resource request URL - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Images/BreakpointButton.svg with status = 0

EAWebKit:Event kLETResourceResponseReceived : The server has responded to a resource request URL - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Images/ResultLine.svg with status = 0

EAWebKit:Event kLETResourceResponseReceived : The server has responded to a resource request URL - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Images/Resume.svg with status = 0

EAWebKit:Event kLETResourceResponseReceived : The server has responded to a resource request URL - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Images/Function.svg with status = 0

EAWebKit:Event kLETResourceResponseReceived : The server has responded to a resource request URL - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Images/PausedBreakpoint.svg with status = 0

EAWebKit:Event kLETResourceResponseReceived : The server has responded to a resource request URL - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Images/Resume.svg with status = 0

EAWebKit: JS Error - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js Line-267 Column-22 Message: Request with id = 37 failed. {"code":-32601,"message":"'IndexedDB' domain was not found"}

EAWebKit: JS Error - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js Line-454 Column-30 Message: Error while getting the named flows for document 1: Could not find node with given id

2015/08/26-10:51:16.656 protoupnp: multicasting discovery request

The thread 0x2efc has exited with code 0 (0x0).

2015/08/26-10:51:31.656 protoupnp: multicasting discovery request

Thanks,
Rupali

<div>
<div class="WordSection1">
<p class="MsoNormal"><span>Hello,<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>We are seeing an issue with the Web Inspector debugger on latest WinCairo [ using Webkit r188436]. In the wincairo webinpector, whenever a breakpoint is set and then web page reload on a javascript source, the
 view goes on into some indefinite waiting and never shows up, until we press continue-script-execution or another page-refresh.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Here are the simple steps to reproduce it,<p></p></span></p>
<p class="MsoListParagraph"><span><span>1.<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><span>Launch WinCairo and go to google.com<p></p></span></p>
<p class="MsoListParagraph"><span><span>2.<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><span>Open Web inspector and open the script source of any .js script<p></p></span></p>
<p class="MsoListParagraph"><span><span>3.<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><span>Set a breakpoint anywhere<p></p></span></p>
<p class="MsoListParagraph"><span><span>4.<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><span>Reload the web page<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>What we see is the spinner spinning and never the script source. However, if one presses continue-script-execution from the debugger controls, we get the view back.
</span><span><p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Some points of debugging we did at our end,<p></p></span></p>
<p class="MsoNormal"><span>(i) We did some digging around the breakpoint setting, and do see the flow correctly being going to handlepause() of the ScriptDebugServer. Though I see the
</span><span>vmEntryGlobalObject</span><span>
</span><span>is not updated with any value or callframe.<p></p></span></p>
<p class="MsoNormal"><span>I did not see any abnormality in the listener dispatching callback, with the correct pause-reason to pass i.e. Breakpoint. However, I am not sure if its sending the right pause-data to the frontend.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>(ii)It gets stuck in the infinite eventloop which does look fine to me, as long as it is paused.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>(iii)Another observation I see is, the message &ldquo;TimelineRecordingStopped&rdquo; being sent to the frontend. I believe, this is something newly added and not sure, if at all it&rsquo;ll effect the debugger scriptsource in
 any way. [reference : </span><span>doDispatchMessageOnFrontendPage</span><span>]</span><span><p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>(iv)Coming onto the Web inspector UI side of story, I did see one bug, that even though &nbsp;the method in DebuggerManager.js &nbsp;&ldquo;</span><span>debuggerDidPause</span><span>&rdquo;
</span><span>got the right pause-reason from the webkit, its not able to pass on correctly due to an apparent bug in
<p></p></span></p>
<p class="MsoNormal"><span>_pauseReasonFromPayload:
</span><span>function</span><span>(payload)</span><span><p></p></span></p>
<p class="MsoNormal"><span>Here, the input payload does not match any of the &nbsp;</span><span>DebuggerAgent.PausedReason
</span><span>and hence falls to the error of unknown reason. The correct string to match would be &ldquo;Breakpoint&rdquo;. However, correcting the flow still doesn&rsquo;t give us any favorable behavior. Though, I believe it&rsquo;s good to know.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Would you have a better insight as to what exactly is blocking the script source to display in the paused-state of web inspector debugger?<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>The output log looks like:<p></p></span></p>
<p class="MsoNormal"><span>EAWebKit:Event kLETResourceResponseReceived : The server has responded to a resource request URL - http://www.google.com/ with status = 200<p></p></span></p>
<p class="MsoNormal"><span>EAWebKit:Event kLETLoadCompletedWithoutErrors : The load is completed without errors<p></p></span></p>
<p class="MsoNormal"><span>Total Page Loaded&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 1.139<p></p></span></p>
<p class="MsoNormal"><span>Total Page Lib Tick Update&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; : 0.604&nbsp; Slowest:: 0.521<p></p></span></p>
<p class="MsoNormal"><span>Total Page View Tick Update&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000&nbsp; Slowest:: 0.000<p></p></span></p>
<p class="MsoNormal"><span>Total Page Network Tick Update&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000
<p></p></span></p>
<p class="MsoNormal"><span>Total Jobs Loop&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.503&nbsp; Slowest:: 0.489<p></p></span></p>
<p class="MsoNormal"><span>Total Page Script&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000&nbsp; Slowest:: 0.000<p></p></span></p>
<p class="MsoNormal"><span>Font Glyph Draw&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: 0.000<p></p></span></p>
<p class="MsoNormal"><span>Bitmap Image Draw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000<p></p></span></p>
<p class="MsoNormal"><span>Bitmap Image Decoder&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000<p></p></span></p>
<p class="MsoNormal"><span>Image Compression&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000<p></p></span></p>
<p class="MsoNormal"><span>Font/Image Raster Draw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000<p></p></span></p>
<p class="MsoNormal"><span>TH Connect&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000<p></p></span></p>
<p class="MsoNormal"><span>TH Transfer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000<p></p></span></p>
<p class="MsoNormal"><span>TH Disconnect&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000<p></p></span></p>
<p class="MsoNormal"><span>TH Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0<p></p></span></p>
<p class="MsoNormal"><span>TH Files&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0<p></p></span></p>
<p class="MsoNormal"><span>Cached Connect&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000<p></p></span></p>
<p class="MsoNormal"><span>Cached Transfer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;: 0.000<p></p></span></p>
<p class="MsoNormal"><span>Cached Disconnect&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000<p></p></span></p>
<p class="MsoNormal"><span>Cached Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0<p></p></span></p>
<p class="MsoNormal"><span>Cached files&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0<p></p></span></p>
<p class="MsoNormal"><span>Java Script Parse&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000<p></p></span></p>
<p class="MsoNormal"><span>Java Script Execute&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000<p></p></span></p>
<p class="MsoNormal"><span>CSS Sheet Parse&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: 0.000<p></p></span></p>
<p class="MsoNormal"><span>Font Loading Time&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000<p></p></span></p>
<p class="MsoNormal"><span>Page user1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000<p></p></span></p>
<p class="MsoNormal"><span>Page user2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000<p></p></span></p>
<p class="MsoNormal"><span>Page user3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000<p></p></span></p>
<p class="MsoNormal"><span>EAWebKit:Event kLETResourceResponseReceived : The server has responded to a resource request URL - http://www.google.com/xjs/_/js/k=xjs.hp.en_US.dipijOltWAk.O/m=sb_he,d/rt=j/d=1/t=zcms/rs=ACT90oGH2j95ix8dWTU-Ejrgyf_E0GhQSQ
 with status = 200<p></p></span></p>
<p class="MsoNormal"><span>2015/08/26-10:51:01.462 protoupnp: multicasting discovery request<p></p></span></p>
<p class="MsoNormal"><span>EAWebKit: JS - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js Line-464 Column-20 Message: DebuggerDidPause called
 ----&gt;&nbsp; got some data and reason<p></p></span></p>
<p class="MsoNormal"><span>EAWebKit: JS - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js Line-465 Column-20 Message: pause reason isBreakpoint<p></p></span></p>
<p class="MsoNormal"><span>EAWebKit: JS - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js Line-466 Column-20 Message: pause data is[object
 Object]<p></p></span></p>
<p class="MsoNormal"><span>EAWebKit: JS - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js Line-628 Column-20 Message: 1. payload to _pauseReasonFrompaylod
 is Breakpoint<p></p></span></p>
<p class="MsoNormal"><span>EAWebKit: JS - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js Line-635 Column-23 Message: &gt;&gt;&gt; Payload is Breakpoint?
 is Breakpoint<p></p></span></p>
<p class="MsoNormal"><span>EAWebKit: JS - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js Line-478 Column-20 Message: pause reason isbreakpoint<p></p></span></p>
<p class="MsoNormal"><span>EAWebKit: JS - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js Line-504 Column-20 Message: pause reason isbreakpoint<p></p></span></p>
<p class="MsoNormal"><span>EAWebKit:Event kLETResourceResponseReceived : The server has responded to a resource request URL - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Images/Exception.svg
 with status = 0<p></p></span></p>
<p class="MsoNormal"><span>EAWebKit:Event kLETResourceResponseReceived : The server has responded to a resource request URL - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Images/BreakpointButton.svg
 with status = 0<p></p></span></p>
<p class="MsoNormal"><span>EAWebKit:Event kLETResourceResponseReceived : The server has responded to a resource request URL - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Images/ResultLine.svg
 with status = 0<p></p></span></p>
<p class="MsoNormal"><span>EAWebKit:Event kLETResourceResponseReceived : The server has responded to a resource request URL - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Images/Resume.svg
 with status = 0<p></p></span></p>
<p class="MsoNormal"><span>EAWebKit:Event kLETResourceResponseReceived : The server has responded to a resource request URL - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Images/Function.svg
 with status = 0<p></p></span></p>
<p class="MsoNormal"><span>EAWebKit:Event kLETResourceResponseReceived : The server has responded to a resource request URL - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Images/PausedBreakpoint.svg
 with status = 0<p></p></span></p>
<p class="MsoNormal"><span>EAWebKit:Event kLETResourceResponseReceived : The server has responded to a resource request URL - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Images/Resume.svg
 with status = 0<p></p></span></p>
<p class="MsoNormal"><span>EAWebKit: JS Error - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js Line-267 Column-22 Message: Request with id
 = 37 failed. {"code":-32601,"message":"'IndexedDB' domain was not found"}<p></p></span></p>
<p class="MsoNormal"><span>EAWebKit: JS Error - file:///C:/EAOS/EAOS/EAWebKit/SB/InternalTeam/w-179714/EAWebKitDemoUTFWin/dev/data/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js Line-454 Column-30 Message: Error while getting
 the named flows for document 1: Could not find node with given id<p></p></span></p>
<p class="MsoNormal"><span>2015/08/26-10:51:16.656 protoupnp: multicasting discovery request<p></p></span></p>
<p class="MsoNormal"><span>The thread 0x2efc has exited with code 0 (0x0).<p></p></span></p>
<p class="MsoNormal"><span>2015/08/26-10:51:31.656 protoupnp: multicasting discovery request<p></p></span></p>
<p class="MsoNormal"><span>Thanks,<br>
Rupali<p></p></span></p>
</div>
</div>
Bryan Woodruff | 25 Aug 21:34 2015

(Legacy 2.1.1) LLINT: _lline_program_prologue CodeBlock::m_instructions[0] is NULL

Hi all –

 

Caveat: Due to divergence in the code base and the target platform, I’m working with an older port based on v2.1.1.  But, I believe my question is broad enough that someone may be able to help point me in the right area.

 

I’m enabling LLINT which was not enabled for the port we’re working with in this version.   In the dispatch to llint_program_prologue, the CodeBlock.m_instructions[0] points to the value 0 which results into a jmp to 0 and a subsequent access violation.

 

I’m looking to understand what conditions cause CodeBlock.m_instructions[0] to not point to code.   Both JIT and LLINT are enabled.

 

JSC::prepareForExecution builds a CTI stub with programEntryThunkGenerator, the prologue thunk executes and lands in the prologue code.  I verified that the CodeBlock processed in prologue is the CodeBlock set up by this stack:

 

x!JSC::prepareForExecution<JSC::ProgramCodeBlock>(JSC::ExecState *, WTF::OwnPtr<JSC::ProgramCodeBlock> & {...}, JSC::JITCode & {...}, JSC::JITCode::JITType BaselineJIT, unsigned int) executionharness.h line 42

x!JSC::ProgramExecutable::compileInternal(JSC::ExecState *, JSC::JSScope *, JSC::JITCode::JITType BaselineJIT, unsigned int) executable.cpp line 328 + 19 bytes

x!JSC::ProgramExecutable::compile(JSC::ExecState *, JSC::JSScope *) executable.h line 514 + 19 bytes

 

Note that this code path is not taken as the profiler is not enabled, I’m not clear as to the design if this would impact this 0 index of m_instructions or not.

 

        if (exec->vm().m_perBytecodeProfiler)

            exec->vm().m_perBytecodeProfiler->ensureBytecodesFor(codeBlock.get());

 

After the prepareForExecution and going through the thunk, it’s the processing of the CodeBlock that lands the instruction pointer at 0.  The offset of m_instructions looks correct comparing the offset with other assembly generated for other modules (including CodeBlock.cpp itself).   Inspecting the CodeBlock object and m_instructions[0] verifies it has a 0 in this entry.   I am assuming this is unexpected – but I don’t understand where this is supposed to be set up when tracing step-by-step through this code path.

 

Any suggestions/pointers appreciated.

 

Thanks!

 

 

_llint_program_prologue:

    prologue(notFunctionCodeBlockGetter, notFunctionCodeBlockSetter, _llint_entry_osr, _llint_trace_prologue)

    dispatch(0)

 

 

    # Set up the PC.

   if JSVALUE64

        loadp CodeBlock::m_instructions[t1], PB

        move 0, PC

    else

        loadp CodeBlock::m_instructions[t1], PC

    end

 

<div>
<div class="WordSection1">
<p class="MsoNormal">Hi all &ndash;<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Caveat: Due to divergence in the code base and the target platform, I&rsquo;m working with an older port based on v2.1.1.&nbsp; But, I believe my question is broad enough that someone may be able to help point me in the right area.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">I&rsquo;m enabling LLINT which was not enabled for the port we&rsquo;re working with in this version.&nbsp;&nbsp; In the dispatch to llint_program_prologue, the CodeBlock.m_instructions[0] points to the value 0 which results into a jmp to 0 and a subsequent
 access violation.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">I&rsquo;m looking to understand what conditions cause CodeBlock.m_instructions[0] to not point to code.&nbsp;&nbsp; Both JIT and LLINT are enabled.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">JSC::prepareForExecution builds a CTI stub with programEntryThunkGenerator, the prologue thunk executes and lands in the prologue code.&nbsp; I verified that the CodeBlock processed in prologue is the CodeBlock set up by this stack:<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">x!JSC::prepareForExecution&lt;JSC::ProgramCodeBlock&gt;(JSC::ExecState *, WTF::OwnPtr&lt;JSC::ProgramCodeBlock&gt; &amp; {...}, JSC::JITCode &amp; {...}, JSC::JITCode::JITType BaselineJIT, unsigned int) executionharness.h line 42<p></p></p>
<p class="MsoNormal">x!JSC::ProgramExecutable::compileInternal(JSC::ExecState *, JSC::JSScope *, JSC::JITCode::JITType BaselineJIT, unsigned int) executable.cpp line 328 + 19 bytes<p></p></p>
<p class="MsoNormal">x!JSC::ProgramExecutable::compile(JSC::ExecState *, JSC::JSScope *) executable.h line 514 + 19 bytes<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Note that this code path is not taken as the profiler is not enabled, I&rsquo;m not clear as to the design if this would impact this 0 index of m_instructions or not.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (exec-&gt;vm().m_perBytecodeProfiler)<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exec-&gt;vm().m_perBytecodeProfiler-&gt;ensureBytecodesFor(codeBlock.get());<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">After the prepareForExecution and going through the thunk, it&rsquo;s the processing of the CodeBlock that lands the instruction pointer at 0.&nbsp; The offset of m_instructions looks correct comparing the offset with other assembly generated for
 other modules (including CodeBlock.cpp itself).&nbsp;&nbsp; Inspecting the CodeBlock object and m_instructions[0] verifies it has a 0 in this entry.&nbsp;&nbsp; I am assuming this is unexpected &ndash; but I don&rsquo;t understand where this is supposed to be set up when tracing step-by-step
 through this code path.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Any suggestions/pointers appreciated.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Thanks!<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<span>_llint_program_prologue:<p></p></span>
<span>&nbsp;&nbsp;&nbsp; prologue(notFunctionCodeBlockGetter, notFunctionCodeBlockSetter, _llint_entry_osr, _llint_trace_prologue)<p></p></span>
<span>&nbsp;&nbsp;&nbsp; dispatch(</span><span>0</span><span>)<p></p></span>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; # Set up the PC.<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;</span><span>if</span><span>
 JSVALUE64<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; loadp CodeBlock::m_instructions[t1], PB<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; move
</span><span>0</span><span>, PC<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;
</span><span>else</span><span><p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; loadp CodeBlock::m_instructions[t1], PC<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;
</span><span>end</span><span><p></p></span></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
</div>
</div>
Vienneau, Christopher | 21 Aug 20:00 2015

Re: Error running update-webkit script

Alex I have worked around the problem as you have suggested:

·         Setup Dependencies

o   Webkit.org tells us to download  WebKit Support Libraries, and run the scripts ./Tools/Scripts/update-webkit and ./update-webkit –wincairo both scripts claimed I’m not connected to the internet, instead follow the below steps.

§  Download the WebKitSupportLibrary.zip uncompress it to C:\cygwin\home\cvienneau\WebKit-r188436\WebKitLibraries\win

§  View ./Tools/Scripts/update-webkit-auxiliary-libs, from there see that url it downloads https://developer.apple.com/opensource/internet/WebKitAuxiliaryLibrary.zip, uncompress it to C:\cygwin\home\cvienneau\WebKit-r188436\WebKitLibraries\win

§  View ./Tools/Scripts/ update-webkit-wincairo-libs, from there see that url it downloads https://dl.dropboxusercontent.com/u/100779108/WinCairoRequirements.zip, uncompress it to C:\cygwin\home\cvienneau\WebKit-r188436\WebKitLibraries\win

 

Thanks

 

Chris

 

From: Alex Christensen [mailto:achristensen <at> apple.com]
Sent: Wednesday, August 19, 2015 9:55 AM
To: Vienneau, Christopher <cvienneau <at> ea.com>
Cc: webkit-help <at> lists.webkit.org
Subject: Re: [webkit-help] Error running update-webkit script

 

The AppleWin port needs WebKitAuxiliaryLibrary.zip, but the WinCairo port needs WinCairoRequirements.zip.  For WinCairo, you should run Tools/Scripts/update-webkit --wincairo which should run Tools/Scripts/update-webkit-wincairo-libs.  Or you could piece together the barely-obfuscated URL in update-webkit-wincairo-libs to download WinCairoRequirements.zip manually and put its contents in WebKitLibraries/win.  I’m not sure what is causing the script to think it is not connected to the internet.

On Aug 18, 2015, at 2:22 PM, Vienneau, Christopher <cvienneau <at> ea.com> wrote:

 

Hello,

 

I’m trying to setup a new instance of WinCairo with latest on my windows machine (I did it before successfully about 6 months ago). 

 

I’m following the steps outlined on  http://www.webkit.org/building/checkout.html, for windows.  I’ve successfully done steps 1-3,  (run Cygwin, download nightly snapshot, download “WebKit Support Libraries),  the problem comes in at step 4:  “Run the ./Tools/Scripts/update-webkit script to update your source tree.  If you downloaded the tarball, this will bring it up to date. Windows users must always execute this command after first obtaining the code, since it will download additional libraries that are needed to build.”

 

It produces the error:

$ ./update-webkit

Updating OpenSource

Checking Last-Modified date of WebKitAuxiliaryLibrary.zip...

Content-Type: text/plain

Client-Date: Tue, 18 Aug 2015 21:12:46 GMT

Client-Warning: Internal response

 

You may not be connected to the internet. Attempting to build without updating.

*************************************************************

Mathematical fonts, such as STIX and MathJax, are needed to

use the MathML feature.  You do not appear to have these fonts

on your system.

 

You can download a suitable set of fonts from the following URL:

*************************************************************

Installed tools are correct for the WebKit build.

Setting the Environment Variable 'MSBUILDDISABLENODEREUSE' to '1'

 

 

SUCCESS: Specified value was saved.

 

-If I copy the url from the command and paste it in my browser the file does download successfully. 

-A colleague of mine attempted the same steps and got the same issue.

-Using http instead of https appears to have made no change.

-Other similar scripts like ./update-webkit-wincairo-libs behaves in a similar way.

 

What are the reasons the scripts might detect me as “may not be connected to the internet”? 

 

 

Thanks

 

Chris

_______________________________________________
webkit-help mailing list
webkit-help <at> lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-help

 

<div>
<div class="WordSection1">
<p class="MsoNormal"><span>Alex I have worked around the problem as you have suggested:<p></p></span></p>
<p class="MsoListParagraph"><span><span>&middot;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span>Setup Dependencies<p></p></p>
<p class="MsoListParagraph">
<span><span>o<span>&nbsp;&nbsp;
</span></span></span>Webkit.org tells us to download &nbsp;<a href="http://developer.apple.com/opensource/internet/webkit_sptlib_agree.html"><span>WebKit Support
 Libraries</span></a>, and run the scripts <span>
./Tools/Scripts/update-webkit</span> and <span>
./update-webkit &ndash;wincairo </span>both scripts claimed I&rsquo;m not connected to the internet, instead follow the below steps.<p></p></p>
<p class="MsoListParagraph">
<span><span>&sect;<span>&nbsp;
</span></span></span>Download the WebKitSupportLibrary.zip uncompress it to C:\cygwin\home\cvienneau\WebKit-r188436\WebKitLibraries\win<p></p></p>
<p class="MsoListParagraph">
<span><span>&sect;<span>&nbsp;
</span></span></span>View <span>
./Tools/Scripts/≤/span>update-webkit-auxiliary-libs, from there see that url it downloads
<a href="https://developer.apple.com/opensource/internet/WebKitAuxiliaryLibrary.zip">
https://developer.apple.com/opensource/internet/WebKitAuxiliaryLibrary.zip</a>, uncompress it to C:\cygwin\home\cvienneau\WebKit-r188436\WebKitLibraries\win<p></p></p>
<p class="MsoListParagraph">
<span><span>&sect;<span>&nbsp;
</span></span></span>View <span>
./Tools/Scripts/≤/span> update-webkit-wincairo-libs, from there see that url it downloads
<a href="https://dl.dropboxusercontent.com/u/100779108/WinCairoRequirements.zip">
https://dl.dropboxusercontent.com/u/100779108/WinCairoRequirements.zip</a>, uncompress it to C:\cygwin\home\cvienneau\WebKit-r188436\WebKitLibraries\win<p></p></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Thanks<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Chris<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<div>
<div>
<p class="MsoNormal"><span>From:</span><span> Alex Christensen [mailto:achristensen <at> apple.com]
<br>Sent: Wednesday, August 19, 2015 9:55 AM<br>To: Vienneau, Christopher &lt;cvienneau <at> ea.com&gt;<br>Cc: webkit-help <at> lists.webkit.org<br>Subject: Re: [webkit-help] Error running update-webkit script<p></p></span></p>
</div>
</div>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">The AppleWin port needs WebKitAuxiliaryLibrary.zip, but the WinCairo port needs WinCairoRequirements.zip. &nbsp;For WinCairo, you should run Tools/Scripts/update-webkit --wincairo which should run Tools/Scripts/update-webkit-wincairo-libs. &nbsp;Or
 you could piece together the barely-obfuscated URL in&nbsp;update-webkit-wincairo-libs to download WinCairoRequirements.zip manually and put its contents in WebKitLibraries/win. &nbsp;I&rsquo;m not sure what is causing the script to think it is not connected to the internet.<p></p></p>
<div>
<blockquote>
<div>
<p class="MsoNormal">On Aug 18, 2015, at 2:22 PM, Vienneau, Christopher &lt;<a href="mailto:cvienneau <at> ea.com">cvienneau <at> ea.com</a>&gt; wrote:<p></p></p>
</div>
<p class="MsoNormal"><p>&nbsp;</p></p>
<div>
<div>
<p class="MsoNormal"><span>Hello,<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>&nbsp;<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>I&rsquo;m trying to setup a new instance of WinCairo with latest on my windows machine (I did it before successfully about 6 months ago).&nbsp;<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>&nbsp;<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>I&rsquo;m following the steps outlined on &nbsp;<a href="http://www.webkit.org/building/checkout.html"><span>http://www.webkit.org/building/checkout.html</span></a>,
 for windows.&nbsp; I&rsquo;ve successfully done steps 1-3, &nbsp;(run Cygwin, download nightly snapshot, download &ldquo;WebKit Support Libraries),&nbsp; the problem comes in at step 4:&nbsp; &ldquo;</span><span>Run the<span class="apple-converted-space">&nbsp;</span></span><span>./Tools/Scripts/update-webkit</span><span class="apple-converted-space"><span>&nbsp;</span></span><span><a href="http://www.webkit.org/coding/scripts.html"><span>script</span></a><span class="apple-converted-space">&nbsp;</span>to
 update your source tree.&nbsp; If you downloaded the tarball, this will bring it up to date. Windows users must always execute this command after first obtaining the code, since it will download additional libraries that are needed to build.&rdquo;</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>&nbsp;<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>It produces the error:<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>$ ./update-webkit</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>Updating OpenSource</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>Checking Last-Modified date of WebKitAuxiliaryLibrary.zip...</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>Could not access<span class="apple-converted-space">&nbsp;</span><a href="https://developer.apple.com/opensource/internet/WebKitAuxiliaryLibrary.zip:"><span>https://developer.apple.com/opensource/internet/WebKitAuxiliaryLibrary.zip:</span></a></span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>Content-Type: text/plain</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>Client-Date: Tue, 18 Aug 2015 21:12:46 GMT</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>Client-Warning: Internal response</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>&nbsp;</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>You may not be connected to the internet. Attempting to build without updating.</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>*************************************************************</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>Mathematical fonts, such as STIX and MathJax, are needed to</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>use the MathML feature.&nbsp; You do not appear to have these fonts</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>on your system.</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>&nbsp;</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>You can download a suitable set of fonts from the following URL:</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span><a href="https://developer.mozilla.org/Mozilla/MathML_Projects/Fonts"><span>https://developer.mozilla.org/Mozilla/MathML_Projects/Fonts</span></a></span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>*************************************************************</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>Installed tools are correct for the WebKit build.</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>Setting the Environment Variable 'MSBUILDDISABLENODEREUSE' to '1'</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>&nbsp;</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>&nbsp;</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>SUCCESS: Specified value was saved.</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>&nbsp;<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>-If I copy the url from the command and paste it in my browser the file does download successfully.&nbsp;<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>-A colleague of mine attempted the same steps and got the same issue.<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>-Using http instead of https appears to have made no change.<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>-Other similar scripts like<span class="apple-converted-space">&nbsp;</span></span><span>./update-webkit-wincairo-libs<span class="apple-converted-space">&nbsp;</span></span><span>behaves
 in a similar way.<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>&nbsp;<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>What are the reasons the scripts might detect me as &ldquo;</span><span>may not be connected to the internet&rdquo;?&nbsp;</span><span><p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>&nbsp;<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>&nbsp;<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>Thanks<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>&nbsp;<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span>Chris<p></p></span></p>
</div>
<p class="MsoNormal"><span>_______________________________________________<br>
webkit-help mailing list<br></span><a href="mailto:webkit-help <at> lists.webkit.org"><span>webkit-help <at> lists.webkit.org</span></a><span><br></span><a href="https://lists.webkit.org/mailman/listinfo/webkit-help"><span>https://lists.webkit.org/mailman/listinfo/webkit-help</span></a><p></p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><p>&nbsp;</p></p>
</div>
</div>
Brent Montrose | 21 Aug 19:28 2015
Picon

Removing / Pausing content blocking in Safari

Alex, Benjamin, or Brian -

I was wondering what is the best way to remove any previously submitted content blocking rules?

This question applies only to Safari 9 on OS X.

More specifically, I thinking that content blocking will be a user enabled option in our extension.  When users disable the Safari 9 content blocking option, I thought I could delete or remove the previous submitted / compiled rules by calling safari.extension.setContentBlocking() with no arguments.  This doesn't seem to work. I also tried safari.extension.setContentBlocking({}) and safari.extension.setContentBlocking([])

Is there a way to delete / remove previous compiled rules by calling safari.extension.setContentBlocking() ?   

-- Brent
<div><div dir="ltr">Alex, Benjamin, or Brian -<div><br></div>
<div>I was wondering what is the best way to remove any previously submitted content blocking rules?</div>
<div><br></div>
<div>This question applies only to Safari 9 on OS X.</div>
<div><br></div>
<div>More specifically, I thinking that content blocking will be a user enabled option in our extension.&nbsp; When users disable the Safari 9 content blocking option, I thought I could delete or remove the previous submitted / compiled rules by calling&nbsp;safari.extension.setContentBlocking()&nbsp;with no arguments.&nbsp; This doesn't seem to work. I also tried&nbsp;safari.extension.setContentBlocking({}) and&nbsp;safari.extension.setContentBlocking([])</div>
<div><div><br></div></div>
<div>Is there a way to delete / remove previous compiled rules by calling&nbsp;safari.extension.setContentBlocking() ?&nbsp; &nbsp;</div>
<div><br></div>
<div>-- Brent</div>
</div></div>
Eugene But | 20 Aug 17:31 2015

Question about WKNavigationDelegate API

Hi,

I would appreciate if someone could answer a question about:
-[WKNavigationDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]

According to method's documentation in WKNavigationDelegate.h:

"If you do not implement this method, the web view will respond to the authentication challenge with the NSURLSessionAuthChallengeRejectProtectionSpace disposition.". 

But according to NSURLSessionAuthChallengeDisposition.NSURLSessionAuthChallengePerformDefaultHandling documentation in NSURLSession.h:

"Default handling for the challenge - as if this delegate were not implemented; the credential parameter is ignored."


So my question is: are these 2 enum values (NSURLSessionAuthChallengePerformDefaultHandling and NSURLSessionAuthChallengeRejectProtectionSpace) identical for the purpose of implementing didReceiveAuthenticationChallenge:?

If I want to implement didReceiveAuthenticationChallenge: and perform its default behavior (as this method was not implemented) which enum value should I use?

Thanks in advance,
Eugene



<div><div dir="ltr">Hi,<div><br></div>
<div>I would appreciate if someone could answer a question about:</div>
<div>-[WKNavigationDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]</div>
<div><br></div>
<div>According to method's documentation in WKNavigationDelegate.h:</div>
<div><br></div>
<div>"If you do not implement this method, the web view will respond to the authentication challenge with the NSURLSessionAuthChallengeRejectProtectionSpace disposition.".&nbsp;</div>

<div><br></div>
<div>But according to NSURLSessionAuthChallengeDisposition.NSURLSessionAuthChallengePerformDefaultHandling documentation in NSURLSession.h:</div>
<div>

<p class="p1"><span class="s1">"Default handling for the challenge - as if this delegate were not implemented; the credential parameter is ignored."</span></p>
</div>

<div><br></div>
<div>So my question is: are these 2 enum values (<span>NSURLSessionAuthChallengePerformDefaultHandling and&nbsp;</span>NSURLSessionAuthChallengeRejectProtectionSpace) identical for the purpose of implementing&nbsp;<span>didReceiveAuthenticationChallenge:</span>?</div>
<div><br></div>
<div>If I want to implement&nbsp;<span>didReceiveAuthenticationChallenge:</span> and perform its default behavior (as this method was not implemented) which enum value should I use?</div>
<div><br></div>
<div>Thanks in advance,</div>
<div>Eugene</div>

<div><br></div>
<div><br></div>
<div><br></div>

</div></div>
Romain Jacquinot | 20 Aug 02:17 2015

More feedback regarding Content Blocking

Hi,

Based on our previous discussions and some additional limitations I encountered recently, here is a summary of my feedback regarding content blocking in Safari:

Much needed (no adequate workarounds currently available):

1) A resource-type for plugin-initiated requests.
2) Ability to add exception rules for a specific page (not just the domain) that applies for all of its content and frames. Same as point 5 below.
3) Ability to add exception rules for a specific page (not just the domain) loaded within another page (frame) that applies for all of its content and frames. I thought "if-domain" and "unless-domain” alone would be sufficient for my use cases, but unfortunately they aren’t.

Desired improvements (workarounds exist but result in a bad user experience):

4) Ability to programmatically enable/disable a previously-manually-enabled content blocker without having to go through the compiler every time.
5) Ability to whitelist/blacklist a full webpage or website for a content blocker without having to go through the compiler for all the rules, for instance by using a separate JSON file as discussed here https://lists.webkit.org/pipermail/webkit-help/2015-August/003954.html

Welcomed improvements (workarounds exist but are not always elegant):

6) A resource-type for plugins (object) like Flash, Java, etc.
7) An additional load-type: the current implementation considers as third-party both content from completely different domains and content from different subdomains but with the same domain. There should be a 3rd available load-type where all subdomains are considered as first-party.
8) Wider support of regular expressions: support for (abc|def), {n}

Thanks.

Romain
<div>Hi,<div class=""><br class=""></div>
<div class="">Based on our previous discussions and some additional limitations I encountered recently, here is a summary of my feedback regarding content blocking in Safari:</div>
<div class=""><br class=""></div>
<div class="">Much needed&nbsp;(no adequate workarounds&nbsp;currently&nbsp;available):</div>
<div class=""><br class=""></div>
<div class="">1) A resource-type for plugin-initiated requests.</div>
<div class="">2)&nbsp;Ability&nbsp;to add exception rules for a specific page (not just the domain) that applies for all of its content and frames. Same as point 5 below.</div>
<div class="">3) Ability&nbsp;to add exception rules for a specific page (not&nbsp;just&nbsp;the domain) loaded within another page (frame) that applies for all of its content and frames.&nbsp;I thought "if-domain" and "unless-domain&rdquo; alone would be sufficient for my use cases, but unfortunately they aren&rsquo;t.</div>
<div class="">
<div class="">
<div class=""><br class=""></div>
<div class="">Desired improvements (workarounds exist but result in a bad user experience):</div>
<div class=""><br class=""></div>
<div class="">4)&nbsp;Ability&nbsp;to programmatically enable/disable a previously-manually-enabled content blocker without having to go through the compiler every time.</div>
<div class="">5) Ability&nbsp;to whitelist/blacklist a full webpage or website for a content blocker without having to go through the compiler for all the rules, for instance by using a separate JSON file as discussed here&nbsp;<a href="https://lists.webkit.org/pipermail/webkit-help/2015-August/003954.html" class="">https://lists.webkit.org/pipermail/webkit-help/2015-August/003954.html</a>
</div>
<div class=""><br class=""></div>
<div class="">Welcomed improvements (workarounds exist but are not always elegant):</div>
<div class=""><br class=""></div>
<div class="">6) A resource-type for plugins (object) like Flash, Java, etc.</div>
<div class="">7) An additional load-type: the current implementation considers as third-party both content from completely different domains and content from different subdomains but with the same domain. There should be a 3rd available load-type where all subdomains are considered as first-party.</div>
<div class="">8) Wider support of regular expressions: support for (abc|def), {n}</div>
<div class=""><br class=""></div>
<div class="">Thanks.</div>
</div>
<div class=""><br class=""></div>
</div>
<div class="">Romain</div>
</div>
Konovalov, Vadim | 19 Aug 08:51 2015

what command used to install compiled webkitgtk?

After 

  build-webkit --gtk --prefix=/foo/bar 

then I want to install so installation goes to the said prefix, how should I do that?
(I've searched but haven't found the answer)

Thanks in advance,
Vadim.
Vienneau, Christopher | 18 Aug 23:22 2015

Error running update-webkit script

Hello,

 

I’m trying to setup a new instance of WinCairo with latest on my windows machine (I did it before successfully about 6 months ago). 

 

I’m following the steps outlined on  http://www.webkit.org/building/checkout.html, for windows.  I’ve successfully done steps 1-3,  (run Cygwin, download nightly snapshot, download “WebKit Support Libraries),  the problem comes in at step 4:  “Run the ./Tools/Scripts/update-webkit script to update your source tree.  If you downloaded the tarball, this will bring it up to date. Windows users must always execute this command after first obtaining the code, since it will download additional libraries that are needed to build.”

 

It produces the error:

$ ./update-webkit

Updating OpenSource

Checking Last-Modified date of WebKitAuxiliaryLibrary.zip...

Could not access https://developer.apple.com/opensource/internet/WebKitAuxiliaryLibrary.zip:

Content-Type: text/plain

Client-Date: Tue, 18 Aug 2015 21:12:46 GMT

Client-Warning: Internal response

 

You may not be connected to the internet. Attempting to build without updating.

*************************************************************

Mathematical fonts, such as STIX and MathJax, are needed to

use the MathML feature.  You do not appear to have these fonts

on your system.

 

You can download a suitable set of fonts from the following URL:

https://developer.mozilla.org/Mozilla/MathML_Projects/Fonts

*************************************************************

Installed tools are correct for the WebKit build.

Setting the Environment Variable 'MSBUILDDISABLENODEREUSE' to '1'

 

 

SUCCESS: Specified value was saved.

 

-If I copy the url from the command and paste it in my browser the file does download successfully. 

-A colleague of mine attempted the same steps and got the same issue.

-Using http instead of https appears to have made no change.

-Other similar scripts like ./update-webkit-wincairo-libs behaves in a similar way.

 

What are the reasons the scripts might detect me as “may not be connected to the internet”? 

 

 

Thanks

 

Chris

<div>
<div class="WordSection1">
<p class="MsoNormal">Hello,<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">I&rsquo;m trying to setup a new instance of WinCairo with latest on my windows machine (I did it before successfully about 6 months ago).&nbsp;
<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">I&rsquo;m following the steps outlined on &nbsp;<a href="http://www.webkit.org/building/checkout.html">http://www.webkit.org/building/checkout.html</a>, for windows.&nbsp; I&rsquo;ve successfully done steps 1-3, &nbsp;(run Cygwin, download nightly snapshot, download
 &ldquo;WebKit Support Libraries),&nbsp; the problem comes in at step 4:&nbsp; &ldquo;<span>Run the<span class="apple-converted-space">&nbsp;</span></span><span>./Tools/Scripts/update-webkit</span><span class="apple-converted-space"><span>&nbsp;</span></span><span><a href="http://www.webkit.org/coding/scripts.html">script</a><span class="apple-converted-space">&nbsp;</span>to
 update your source tree.&nbsp; If you downloaded the tarball, this will bring it up to date. Windows users must always execute this command after first obtaining the code, since it will download additional libraries that are needed to build.&rdquo;<p></p></span></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">It produces the error:<p></p></p>
<p class="MsoNormal"><span>$ ./update-webkit<p></p></span></p>
<p class="MsoNormal"><span>Updating OpenSource<p></p></span></p>
<p class="MsoNormal"><span>Checking Last-Modified date of WebKitAuxiliaryLibrary.zip...<p></p></span></p>
<p class="MsoNormal"><span>Could not access https://developer.apple.com/opensource/internet/WebKitAuxiliaryLibrary.zip:<p></p></span></p>
<p class="MsoNormal"><span>Content-Type: text/plain<p></p></span></p>
<p class="MsoNormal"><span>Client-Date: Tue, 18 Aug 2015 21:12:46 GMT<p></p></span></p>
<p class="MsoNormal"><span>Client-Warning: Internal response<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>You may not be connected to the internet. Attempting to build without updating.<p></p></span></p>
<p class="MsoNormal"><span>*************************************************************<p></p></span></p>
<p class="MsoNormal"><span>Mathematical fonts, such as STIX and MathJax, are needed to<p></p></span></p>
<p class="MsoNormal"><span>use the MathML feature.&nbsp; You do not appear to have these fonts<p></p></span></p>
<p class="MsoNormal"><span>on your system.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>You can download a suitable set of fonts from the following URL:<p></p></span></p>
<p class="MsoNormal"><span>https://developer.mozilla.org/Mozilla/MathML_Projects/Fonts<p></p></span></p>
<p class="MsoNormal"><span>*************************************************************<p></p></span></p>
<p class="MsoNormal"><span>Installed tools are correct for the WebKit build.<p></p></span></p>
<p class="MsoNormal"><span>Setting the Environment Variable 'MSBUILDDISABLENODEREUSE' to '1'<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>SUCCESS: Specified value was saved.<p></p></span></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">-If I copy the url from the command and paste it in my browser the file does download successfully.&nbsp;
<p></p></p>
<p class="MsoNormal">-A colleague of mine attempted the same steps and got the same issue.<p></p></p>
<p class="MsoNormal">-Using http instead of https appears to have made no change.<p></p></p>
<p class="MsoNormal">-Other similar scripts like <span>
./update-webkit-wincairo-libs </span>behaves in a similar way.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">What are the reasons the scripts might detect me as &ldquo;<span>may not be connected to the internet&rdquo;?&nbsp;
</span><p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Thanks<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Chris<p></p></p>
</div>
</div>
Romain Jacquinot | 17 Aug 20:03 2015

Regular expressions for content blocking

Hi,

For now, the following regular expression features are supported by content blockers:
  • Matching any character with “.”.
  • Matching ranges with the range syntax [a-b].
  • Quantifying expressions with “?”, “+” and “*”.
  • Groups with parenthesis.
  • Beginning of line (“^”) and end of line (“$”) marker
However, there doesn’t seem to be a way to find any of the alternatives specified with “|” or find any character not between the brackets "[^]”.

This is an issue when you want to block addresses like http://www.example.com/, https://example.com/foobar.jpg, http://example.com:8080 but not http://example.com.hk.

With at least one of those features, you could write something like:

    {
        "action" : {
            "type" : "block"
        },
        "trigger" : {
            "url-filter" : "^https?://(www\\.)?example\\.com(/|:|?)+"
        }
    }

or:

    {
        "action" : {
            "type" : "block"
        },
        "trigger" : {
            "url-filter" : "^https?://(www\\.)?example\\.com[^.]"
        }
    }

Please note that in this case, the if-domain field wouldn’t help for embedded content.

Should I write the same rule many times for the different cases (“/", “:", “?”)? (doesn’t feel like a very elegant solution though). Since they share the same prefix, will these rules be optimized? On the webkit blog, it is written "The rules are grouped by the prefix “https?://, and it only counts as one rule with quantifiers.”. Does it mean that it will only count as one rule against the 50,000 rule limit?

Do you see an elegant solution to handle this case? If not, could you please consider adding at least one of those regular expression features for content blockers in Safari?

Thanks.

<div>Hi,<div class=""><br class=""></div>
<div class="">For now, the following regular expression features are supported by content blockers:</div>
<div class=""><div class=""><ul class="">
<li class="">Matching any character with &ldquo;.&rdquo;.</li>
<li class="">Matching ranges with the range syntax [a-b].</li>
<li class="">Quantifying expressions with &ldquo;?&rdquo;, &ldquo;+&rdquo; and &ldquo;*&rdquo;.</li>
<li class="">Groups with parenthesis.</li>
<li class="">Beginning of line (&ldquo;^&rdquo;) and end of line (&ldquo;$&rdquo;) marker</li>
</ul></div></div>
<div class="">However, there doesn&rsquo;t seem to be a way to find any of the alternatives specified with &ldquo;|&rdquo; or find any character not between the brackets "[^]&rdquo;.</div>
<div class=""><br class=""></div>
<div class="">This is an issue when you want to block addresses like <a href="http://www" class="">http://www</a>.<a href="http://example.com" class="">example.com</a>/, <a href="https://example.com" class="">https://example.com</a>/foobar.jpg, <a href="http://example.com" class="">http://example.com</a>:8080 but not <a href="http://example.com" class="">http://example.com</a>.hk.</div>
<div class=""><br class=""></div>
<div class="">With at least one of those features, you could write something like:</div>
<div class=""><br class=""></div>
<div class="">
<div class="">&nbsp; &nbsp;&nbsp;{</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; <span class="">"action"</span> : {</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="">"type"</span> : <span class="">"block"</span>
</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; },</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; <span class="">"trigger"</span> : {</div>
<div class="">
<span class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span>"url-filter"<span class=""> : </span>"^https?://(www\\.)?example\\.com(/|:|?)+"</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; }</div>
<div class="">&nbsp; &nbsp; }</div>
</div>
<div class=""><br class=""></div>
<div class="">or:</div>
<div class=""><br class=""></div>
<div class="">
<div class="">&nbsp; &nbsp; {</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class="">"action"</span>&nbsp;: {</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class="">"type"</span>&nbsp;:&nbsp;<span class="">"block"</span>
</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;},</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class="">"trigger"</span>&nbsp;: {</div>
<div class="">
<span class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span>"url-filter"<span class="">&nbsp;:&nbsp;</span>"^https?://(www\\.)?example\\.com[^.]"</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;}</div>
<div class="">&nbsp; &nbsp; }</div>
</div>
<div class=""><br class=""></div>
<div class="">
<div class="">
<span class="">Please note that in this case, the </span>if-domain&nbsp;field wouldn&rsquo;t help for embedded content.</div>
<div class=""><br class=""></div>
<div class="">Should I write the same rule many times for the different cases (&ldquo;/", &ldquo;:", &ldquo;?&rdquo;)? (doesn&rsquo;t feel like a very elegant solution though). Since they share the same prefix, will these rules be optimized? On the webkit blog, it is written "The rules are grouped by the prefix &ldquo;https?://, and it only counts as one rule with quantifiers.&rdquo;. Does it mean that it will only count as one rule against the 50,000 rule limit?</div>
<div class=""><br class=""></div>
<div class="">Do you see an elegant solution to handle this case? If not, could you please consider adding at least one of those regular expression features for content blockers in Safari?</div>
<div class=""><br class=""></div>
<div class="">Thanks.</div>
<div class=""><br class=""></div>
<div class=""></div>
</div>
</div>
Romain Jacquinot | 14 Aug 01:22 2015

Re: Feedback and questions regarding Content Blocking Extensions

By doing some "refactoring" of the rules, if-domain and unless-domain seem sufficient for my use cases.

There is just one case that can’t be elegantly fulfilled right now: when a user navigates to a given webpage (either through an hyperlink or by typing the webpage’s URL in the address field) and that webpage is in the user’s whitelist for an active content blocker.

First, since the URL won’t always be just a valid domain, there is no easy way to ignore the rules for the given webpage and all its content.
Second, even when the URL is a valid domain, it might be inefficient to use ignore-previous-rules in this case. Please note that I insist on the “might” since I’m quite ignorant about the content blocking implementation.

In both cases, it may be a good idea to have a new action type: “whitelist” (or “ignore-all-rules”). Please note that this wouldn’t be the exact opposite of “ignore-previous-rules” (the exact opposite would be “ignore-next-rules”).

This would be something like this:

    {
        "action": {
            "type"“whitelist"
        },
        "trigger": {
            "url-filter": "apple\\.com/mac"
        }
    }

or for a full website:

    {
        "action": {
            "type"“whitelist"
        },
        "trigger": {
            "url-filter"“.*”,
    “if-domain": “*apple.com
        }
    }

When the user opens a new webpage, the engine should first evaluate the whitelist rules. If the rule activates for the current URL, all the other rules of the current content blocker should be ignored.

It is actually possible to go even further. Indeed, the whitelist rules are frequently updated since they are mostly user-generated — the user decides which websites or webpages he/she doesn’t want to block — and, as stated above, they should always be the first rules to be evaluated and are therefore completely independent from the other rules. Therefore it may be better to create a separate whitelist JSON file for the content blocker. This way, it is no longer necessary to recompile the whole blocker list every time a user adds or remove an URL from the whitelist.

On Aug 13, 2015, at 11:58 PM, Alex Christensen <achristensen-2kanFRK1NckAvxtiuMwx3w@public.gmane.org> wrote:

Right now, if-domain and unless-domain are the only features that query the main document URL.  This is a known limitation, and something we’ve been thinking about.  If you have suggestions of ways to do this that are elegant and perform well with thousands of such rules, we would welcome such input.
On Aug 13, 2015, at 2:54 PM, Romain Jacquinot <rjacquinot-BUHhN+a2lJ4@public.gmane.org> wrote:

Thank you for your quick reply.

The if-domain only solves half the issue. For instance, if I want to whitelist all pages under the apple.com domain, it works with something like this:

    {
        "action": {
            "type": "ignore-previous-rules"
        },
        "trigger": {
            "url-filter": ".*",
            "if-domain": ["*apple.com"]
        }
    }

It also works with subdomains, like appleid.apple.com:

    {
        "action": {
            "type""ignore-previous-rules"
        },
        "trigger": {
            "url-filter"".*",
            "if-domain": [“*appleid.apple.com"]
        }
    }

However, if I only want to whitelist a given webpage like apple.com/mac, this doesn’t work:

    {
        "action": {
            "type": "ignore-previous-rules"
        },
        "trigger": {
            "url-filter": "apple\\.com/mac",
            "if-domain": ["*apple.com"]
        }
    }

This also doesn’t work since this is not a valid domain:

    {
        "action": {
            "type": "ignore-previous-rules"
        },
        "trigger": {
            "url-filter": ".*",
            "if-domain": ["*apple.com/mac"]
        }
    }

Is there currently some way to only whitelist a given webpage and have all its resources loaded?

On Aug 13, 2015, at 11:24 PM, Alex Christensen <achristensen-2kanFRK1NckAvxtiuMwx3w@public.gmane.org> wrote:

Thank you for your bug reports.  Feedback like this helps improve our development.
On Aug 13, 2015, at 9:49 AM, Romain Jacquinot <rjacquinot-BUHhN+a2lJ4@public.gmane.org> wrote:

Hi,

After a few days experimenting with Content Blocking in Safari, I have a few questions / some feedback:

1) There are currently no recursive exception rules. It is therefore not possible to whitelist a full website or webpage, i.e. ignoring all rules regardless of where the content comes from. I've filed a bug report at bugreport.apple.com: #22268224. Are there any plans to add this feature before the release of iOS 9.0 and OS X 10.11?
This is what if-domain and unless-domain are for.  Sometimes a website needs a very specific rule that would break other websites, or a common rule would break a certain website.  Try something like this:
{"action": {"type": "ignore-previous-rules"},"trigger": {"url-filter": ".*","if-domain”:”*example.com”}}

2) Enabling content blockers from Safari Settings may be complicated for some non-tech-savvy users. It would be great to be able to open Safari Settings directly (or even better Content Blockers' Settings) from a third-party app using URL-schemes. Bug report: #22217664

3) With iOS 9.0 (13A4325c), content blocking doesn’t work on iPad, only in the simulator. I've filed a bug report at bugreport.apple.com: #22217578. Is it a known bug?

4) There doesn’t seem to be a way to programmatically enable/disable a previously-enabled content blocker without having to go through the compiler again when re-enabling it. I’ve filed a bug report at bugreport.apple.com (#22270848) with an example of use case.
Thanks.

Romain
_______________________________________________
webkit-help mailing list
webkit-help-L0Ma0HqZfWZ4ORXrvDxdwA@public.gmane.org
https://lists.webkit.org/mailman/listinfo/webkit-help




<div>By doing some "refactoring" of the rules, if-domain and unless-domain seem sufficient for my use cases.<div class=""><br class=""></div>
<div class="">There is just one case that can&rsquo;t be elegantly fulfilled right now: when a user navigates to a given webpage (either through an hyperlink or by typing the webpage&rsquo;s URL in the address field) and that webpage is in the user&rsquo;s whitelist for an active content blocker.</div>
<div class="">
<div class=""><br class=""></div>
<div class="">First, since the URL won&rsquo;t always be just a valid domain, there is no easy way to ignore the rules for the given webpage and all its content.</div>
<div class="">Second, even when the URL is a valid domain, it might be inefficient to use&nbsp;ignore-previous-rules in this case. Please note that I insist on the &ldquo;might&rdquo; since I&rsquo;m quite ignorant about the content blocking implementation.</div>
<div class=""><br class=""></div>
<div class="">In both cases, it may be a good idea to have a new action type: &ldquo;whitelist&rdquo; (or &ldquo;ignore-all-rules&rdquo;). Please note that this wouldn&rsquo;t be the exact opposite of &ldquo;ignore-previous-rules&rdquo; (the exact opposite would be &ldquo;ignore-next-rules&rdquo;).</div>
<div class=""><br class=""></div>
<div class="">This would be something like this:</div>
<div class=""><br class=""></div>
<div class="">
<div class="">&nbsp; &nbsp;&nbsp;{</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; <span class="">"action"</span>: {</div>
<div class="">
<span class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="">"type"</span><span class="">:&nbsp;</span><span class="">&ldquo;whitelist"</span>
</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; },</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; <span class="">"trigger"</span>: {</div>
<div class="">
<span class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span>"url-filter"<span class="">: </span>"apple\\.com/mac"</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; }</div>
<div class="">&nbsp; &nbsp; }</div>
</div>
<div class=""><br class=""></div>
<div class=""><span class="">or for a full website:</span></div>
<div class=""><br class=""></div>
<div class="">
<div class="">&nbsp; &nbsp; {</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class="">"action"</span>: {</div>
<div class="">
<span class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="">"type"</span><span class="">:&nbsp;</span><span class="">&ldquo;whitelist"</span>
</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;},</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class="">"trigger"</span>: {</div>
<div class="">
<span class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span>"url-filter"<span class="">:&nbsp;</span>&ldquo;.*&rdquo;,</div>
<div class="">
<span class="Apple-tab-span">	</span>&nbsp; &nbsp; &ldquo;if-domain":&nbsp;&ldquo;*<a href="http://apple.com" class="">apple.com</a>&rdquo;</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;}</div>
<div class="">&nbsp; &nbsp; }</div>
</div>
<div class=""><br class=""></div>
<div class="">When the user opens a new webpage, the engine should first evaluate the whitelist rules. If the rule activates for the current URL, all the other rules of the current content blocker should be ignored.</div>
<div class=""><br class=""></div>
<div class="">It is actually possible to go even further. Indeed, the whitelist rules are frequently updated since they are mostly user-generated &mdash; the user decides which websites or webpages he/she doesn&rsquo;t want to block &mdash; and, as stated above, they should always be the first rules to be evaluated and are therefore completely independent from the other rules. Therefore it may be better to create a separate whitelist JSON file for the content blocker. This way, it is no longer necessary to recompile the whole blocker list every time a user adds or remove an URL from the whitelist.</div>
<div class="">
<br class=""><div><blockquote type="cite" class="">
<div class="">On Aug 13, 2015, at 11:58 PM, Alex Christensen &lt;<a href="mailto:achristensen@..." class="">achristensen@...</a>&gt; wrote:</div>
<br class="Apple-interchange-newline"><div class=""><div class="">Right now, if-domain and unless-domain are the only features that query the main document URL. &nbsp;This is a known limitation, and something we&rsquo;ve been thinking about. &nbsp;If you have suggestions of ways to do this that are elegant and perform well with thousands of such rules, we would welcome such input.<br class=""><div class=""><blockquote type="cite" class="">
<div class="">On Aug 13, 2015, at 2:54 PM, Romain Jacquinot &lt;<a href="mailto:rjacquinot@..." class="">rjacquinot@...</a>&gt; wrote:</div>
<br class="Apple-interchange-newline"><div class=""><div class="">Thank you for your quick reply.<div class=""><br class=""></div>
<div class="">The if-domain only solves half the issue. For instance, if I want to whitelist all pages under the&nbsp;<a href="http://apple.com/" class="">apple.com</a>&nbsp;domain, it works with something like this:<br class=""><div class=""><br class=""></div>
<div class="">
<div class="">&nbsp; &nbsp;&nbsp;{</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; <span class="">"action"</span>: {</div>
<div class="">
<span class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span>"type"<span class="">: </span>"ignore-previous-rules"</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; },</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; <span class="">"trigger"</span>: {</div>
<div class="">
<span class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span>"url-filter"<span class="">: </span>".*"<span class="">,</span>
</div>
<div class="">
<span class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span>"if-domain"<span class="">: [</span>"*<a href="http://apple.com/" class="">apple.com</a>"<span class="">]</span>
</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; }</div>
<div class="">&nbsp; &nbsp; }</div>
</div>
<div class=""><br class=""></div>
<div class="">
<span class="">It also works with sub</span>domains, like&nbsp;<a href="http://appleid.apple.com/" class="">appleid.apple.com</a>:</div>
<div class=""><br class=""></div>
<div class="">
<div class="">&nbsp; &nbsp; {</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class="">"action"</span>: {</div>
<div class="">
<span class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span>"type"<span class="">:&nbsp;</span>"ignore-previous-rules"</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;},</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class="">"trigger"</span>: {</div>
<div class="">
<span class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span>"url-filter"<span class="">:&nbsp;</span>".*"<span class="">,</span>
</div>
<div class="">
<span class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span>"if-domain"<span class="">: [</span>&ldquo;*<a href="http://appleid.apple.com/" class="">appleid.apple.com</a>"<span class="">]</span>
</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;}</div>
<div class="">&nbsp; &nbsp; }</div>
</div>
<div class=""><span class=""><br class=""></span></div>
<div class="">However, if I only want to whitelist a given webpage like&nbsp;<a href="http://apple.com/mac" class="">apple.com/mac</a>, this doesn&rsquo;t work:</div>
<div class=""><br class=""></div>
<div class="">
<div class="">&nbsp; &nbsp;&nbsp;{</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; <span class="">"action"</span>: {</div>
<div class="">
<span class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span>"type"<span class="">: </span>"ignore-previous-rules"</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; },</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; <span class="">"trigger"</span>: {</div>
<div class="">
<span class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span>"url-filter"<span class="">: </span>"apple\\.com/mac"<span class="">,</span>
</div>
<div class="">
<span class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span>"if-domain"<span class="">: [</span>"*<a href="http://apple.com/" class="">apple.com</a>"<span class="">]</span>
</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; }</div>
<div class="">&nbsp; &nbsp; }</div>
<div class=""><br class=""></div>
<div class="">This also doesn&rsquo;t work since this is not a valid domain:</div>
<div class=""><br class=""></div>
<div class="">
<div class="">&nbsp; &nbsp;&nbsp;{</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; <span class="">"action"</span>: {</div>
<div class="">
<span class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span>"type"<span class="">: </span>"ignore-previous-rules"</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; },</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; <span class="">"trigger"</span>: {</div>
<div class="">
<span class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span>"url-filter"<span class="">: </span>".*"<span class="">,</span>
</div>
<div class="">
<span class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span>"if-domain"<span class="">: [</span>"*<a href="http://apple.com/mac" class="">apple.com/mac</a>"<span class="">]</span>
</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; }</div>
<div class="">&nbsp; &nbsp; }</div>
<div class=""><br class=""></div>
<div class="">
<span class="">Is there currently some&nbsp;</span>way to only whitelist a given webpage and have all its resources loaded?</div>
</div>
</div>
<div class="">
<br class=""><div class=""><blockquote type="cite" class="">
<div class="">On Aug 13, 2015, at 11:24 PM, Alex Christensen &lt;<a href="mailto:achristensen@..." class="">achristensen@...</a>&gt; wrote:</div>
<br class="Apple-interchange-newline"><div class=""><div class="">Thank you for your bug reports. &nbsp;Feedback like this helps improve our development.<br class=""><div class="">
<blockquote type="cite" class="">
<div class="">On Aug 13, 2015, at 9:49 AM, Romain Jacquinot &lt;<a href="mailto:rjacquinot@..." class="">rjacquinot@...</a>&gt; wrote:</div>
<br class="Apple-interchange-newline"><div class=""><div class="">Hi,<br class=""><br class="">After a few days experimenting with Content Blocking in Safari, I have a few questions / some feedback:<br class=""><br class="">1) There are currently no recursive exception rules. It is therefore not possible to whitelist a full website or webpage, i.e. ignoring all rules regardless of where the content comes from. I've filed a bug report at <a href="http://bugreport.apple.com/" class="">bugreport.apple.com</a>: #22268224. Are there any plans to add this feature before the release of iOS 9.0 and OS X 10.11?<br class="">
</div></div>
</blockquote>This is what if-domain and unless-domain are for. &nbsp;Sometimes a website needs a very specific rule that would break other websites, or a common rule would break a certain website. &nbsp;Try something like this:</div>
<div class="">{"action": {"type": "ignore-previous-rules"},"trigger": {"url-filter": ".*","if-domain&rdquo;:&rdquo;*<a href="http://example.com/" class="">example.com</a>&rdquo;}}</div>
<div class="">
<blockquote type="cite" class=""><div class=""><div class="">
<br class="">2) Enabling content blockers from Safari Settings may be complicated for some non-tech-savvy users. It would be great to be able to open Safari Settings directly (or even better Content Blockers' Settings) from a third-party app using URL-schemes. Bug report: #22217664</div></div></blockquote>
<blockquote type="cite" class=""><div class=""><div class="">
<br class="">3) With iOS 9.0 (13A4325c), content blocking doesn&rsquo;t work on iPad, only in the simulator. I've filed a bug report at <a href="http://bugreport.apple.com/" class="">bugreport.apple.com</a>: #22217578. Is it a known bug?<br class=""><br class=""><span class="">4) There doesn&rsquo;t seem to be a way to programmatically enable/disable a previously-enabled content blocker without having to go through the compiler again when re-enabling it. I&rsquo;ve filed a bug report at&nbsp;</span><a href="http://bugreport.apple.com/" class="">bugreport.apple.com</a><span class="">&nbsp;(#22270848) with an example of use case.</span>
</div></div></blockquote>
<blockquote type="cite" class=""><div class=""><div class="">Thanks.<br class=""><br class="">Romain<br class="">_______________________________________________<br class="">webkit-help mailing list<br class=""><a href="mailto:webkit-help@..." class="">webkit-help@...</a><br class=""><a href="https://lists.webkit.org/mailman/listinfo/webkit-help" class="">https://lists.webkit.org/mailman/listinfo/webkit-help</a><br class="">
</div></div></blockquote>
</div>
<br class="">
</div></div>
</blockquote></div>
<br class="">
</div>
</div>
</div></div>
</blockquote></div>
<br class="">
</div></div>
</blockquote></div>
<br class="">
</div>
</div>
</div>

Gmane