wkdev911 | 4 Jan 2012 01:05
Picon

Disabling rendering changes processing behavior in WebCore

Hi,
 
I am currently fighting with a problem that disabling rendering in WebKit may change the final content of a web page.
 
All I need is the final HTML after JS is executed (main page plus any secondary frames/iframes), so I thought that disabling creation of renderers may be a valid way to improve performance a little bit.
So, I am using an option in Document class (WebKit\Source\WebCore\dom\Document.h) to disable renderers: Document::setShouldCreateRenderers(false).
 
When comparing output HTML for the cases when renderers are enabled and when disabled, I see that in certain rare cases disabling rendering also causes some frames being missed. This looks like the main frame is missing, but a secondary frame become the main frame (i.e. the pointer to the secondary frame is returned instead of the pointer to the main frame, when the top level IWebFrame object is asked for IDOMHTMLDocument). As a result if we dump DOM in HTML, we get only partial content and without the main frame.
 
Have anyone faced such problem before? Any suggestions how to fix this are appreciated.
 
-Luc
 
P.S. I don't this this is port-specific but just in case I am using WinCairo port.
 
<div>
<div>Hi,</div>
<div>&nbsp;</div>
<div>I am currently fighting with a problem that disabling rendering in WebKit may change the final content of a web page. </div>
<div>&nbsp;</div>
<div>All I need is the final HTML&nbsp;after JS is executed (main page plus any secondary frames/iframes), so I thought that disabling creation of renderers may be a valid way to improve performance a little bit. </div>
<div>So, I am using an option in Document class (WebKit\Source\WebCore\dom\Document.h) to disable renderers: Document::setShouldCreateRenderers(false).</div>
<div>&nbsp;</div>
<div>When comparing output HTML&nbsp;for the cases when renderers are enabled and when disabled, I see that in certain rare cases disabling rendering also causes some frames being missed. This looks like the main frame is missing, but a secondary frame become the main frame (i.e. the pointer to the secondary frame is returned instead of the pointer to the main frame, when the top level IWebFrame object is asked for IDOMHTMLDocument). As a result if we dump DOM in HTML, we get only partial content and without the main frame.</div>
<div>&nbsp;</div>
<div>Have anyone faced such problem before? Any suggestions how to fix this are appreciated.</div>
<div>&nbsp;</div>
<div>-Luc</div>
<div>&nbsp;</div>
<div>
<div>P.S. I don't this this is port-specific but just in case I am using WinCairo port. </div>
<div>&nbsp;</div>
</div>
</div>
Ryosuke Niwa | 4 Jan 2012 01:11
Favicon
Gravatar

Re: Disabling rendering changes processing behavior in WebCore

The last time I checked, renderers were required to load some resources so you can't just stop generating renderers. Also, if JavaScript queries values that depends on layout (e.g. offsetWidth), then that also requires renderers. Given that JavaScript can behave differently depending on such values, I don't think obtaining the identical DOM without creating renderer is possible.


- Ryosuke

On Tue, Jan 3, 2012 at 4:05 PM, wkdev911 <wkdev911-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi,
 
I am currently fighting with a problem that disabling rendering in WebKit may change the final content of a web page.
 
All I need is the final HTML after JS is executed (main page plus any secondary frames/iframes), so I thought that disabling creation of renderers may be a valid way to improve performance a little bit.
So, I am using an option in Document class (WebKit\Source\WebCore\dom\Document.h) to disable renderers: Document::setShouldCreateRenderers(false).
 
When comparing output HTML for the cases when renderers are enabled and when disabled, I see that in certain rare cases disabling rendering also causes some frames being missed. This looks like the main frame is missing, but a secondary frame become the main frame (i.e. the pointer to the secondary frame is returned instead of the pointer to the main frame, when the top level IWebFrame object is asked for IDOMHTMLDocument). As a result if we dump DOM in HTML, we get only partial content and without the main frame.
 
Have anyone faced such problem before? Any suggestions how to fix this are appreciated.
 
-Luc
 
P.S. I don't this this is port-specific but just in case I am using WinCairo port.
 

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


<div>
<p>The last time I checked, renderers were required to load some resources so you can't just stop generating renderers. Also, if JavaScript queries values that depends on layout (e.g. offsetWidth), then that also requires renderers. Given that JavaScript can behave differently depending on such values, I don't think obtaining the identical DOM without creating renderer is possible.</p>
<div>

<br>
</div>
<div>- Ryosuke<br><br><div class="gmail_quote">On Tue, Jan 3, 2012 at 4:05 PM, wkdev911 <span dir="ltr">&lt;<a href="mailto:wkdev911 <at> gmail.com" target="_blank">wkdev911@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">

<div>Hi,</div>
<div>&nbsp;</div>
<div>I am currently fighting with a problem that disabling rendering in WebKit may change the final content of a web page. </div>
<div>&nbsp;</div>
<div>All I need is the final HTML&nbsp;after JS is executed (main page plus any secondary frames/iframes), so I thought that disabling creation of renderers may be a valid way to improve performance a little bit. </div>

<div>So, I am using an option in Document class (WebKit\Source\WebCore\dom\Document.h) to disable renderers: Document::setShouldCreateRenderers(false).</div>
<div>

&nbsp;</div>
<div>When comparing output HTML&nbsp;for the cases when renderers are enabled and when disabled, I see that in certain rare cases disabling rendering also causes some frames being missed. This looks like the main frame is missing, but a secondary frame become the main frame (i.e. the pointer to the secondary frame is returned instead of the pointer to the main frame, when the top level IWebFrame object is asked for IDOMHTMLDocument). As a result if we dump DOM in HTML, we get only partial content and without the main frame.</div>

<div>&nbsp;</div>
<div>Have anyone faced such problem before? Any suggestions how to fix this are appreciated.</div>

<div>&nbsp;</div>
<div>-Luc</div>
<div>&nbsp;</div>
<div>
<div>P.S. I don't this this is port-specific but just in case I am using WinCairo port. </div>

<div>&nbsp;</div>
</div>
<br>_______________________________________________<br>
webkit-help mailing list<br><a href="mailto:webkit-help@..." target="_blank">webkit-help@...</a><br><a href="http://lists.webkit.org/mailman/listinfo.cgi/webkit-help" target="_blank">http://lists.webkit.org/mailman/listinfo.cgi/webkit-help</a><br><br>
</blockquote>
</div>
<br>
</div>
</div>
Sangsoo Lee | 6 Jan 2012 01:45
Picon

Want to join help mailing list

Thanks I'd like to join webkit mailing list

나의 iPad에서 보냄
_______________________________________________
webkit-help mailing list
webkit-help <at> lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
Mike Fairlamb | 6 Jan 2012 18:59
Favicon

Windows Webkit Build - EventListeners

Hi,

Successfully built and using Windows Webkit build in our application. I am 
trying to implement Event Listeners in C++ to handler the mouse clicks 
events from the loaded page.

I have implemented the SimpleEventListener from WinLauncher and get the 
target element when the mouse is click on the page. 

In the handler, I then try and determine what element was click by using 
the code below:

   CComPtr<IDOMEventTarget> target = 0;
   HRESULT hr = evt->target(&target);

The return value is E_NOTIMPL, not implemented. 

This is not being implemented (obviously ) or I have not built webkit 
correctly and have missed out a chunk of code.

Can anyone shred some light on this problem or do I just keep digging!!

Thanks in advanced

Mike

Adam Roben | 6 Jan 2012 19:10
Picon
Favicon

Re: Windows Webkit Build - EventListeners

On Jan 6, 2012, at 12:59 PM, Mike Fairlamb wrote:

> Successfully built and using Windows Webkit build in our application. I am 
> trying to implement Event Listeners in C++ to handler the mouse clicks 
> events from the loaded page.
> 
> I have implemented the SimpleEventListener from WinLauncher and get the 
> target element when the mouse is click on the page. 
> 
> In the handler, I then try and determine what element was click by using 
> the code below:
> 
>   CComPtr<IDOMEventTarget> target = 0;
>   HRESULT hr = evt->target(&target);
> 
> The return value is E_NOTIMPL, not implemented. 
> 
> This is not being implemented (obviously ) or I have not built webkit 
> correctly and have missed out a chunk of code.
> 
> Can anyone shred some light on this problem or do I just keep digging!!

Many parts of the WebKit COM API are unimplemented. We've basically only implemented what's needed by
Safari and our test tools. Feel free to submit a patch to implement the parts you're interested in!

-Adam

Laurence Mclister | 6 Jan 2012 19:59
Picon
Favicon
Gravatar

generate-coverage-data on Lion?

Hi All,
When attempting to run code coverage on Lion I am getting the error below.  Has anyone successfully gotten generate-coverage-data to work on Lion or have insight into the error?  Any tips would be greatly appreciated.

Thanks,
-Larry

/WebKit/WebKitBuild/Debug/JavaScriptCore.framework/Versions/A/JavaScriptCore
ld: library not found for -lgcov
Command /Developer/usr/bin/clang++ failed with exit code 1
** BUILD FAILED **
The following build commands failed:
Ld /Users/xyz/WebKit/WebKitBuild/Debug/JavaScriptCore.framework/Versions/A/JavaScriptCore normal x86_64
(1 failure)
Died at /Users/xyz/WebKit/Tools/Scripts/generate-coverage-data line 62.

<div>
<div>Hi All,</div>
<div>When attempting to run code coverage on Lion I am getting the error below. &nbsp;Has anyone successfully gotten generate-coverage-data to work on Lion or have insight into the error? &nbsp;Any tips would be greatly appreciated.</div>
<div><br></div>
<div>Thanks,</div>
<div>-Larry</div>
<div><br></div>
<div>&hellip;</div>
<div>
<div>/WebKit/WebKitBuild/Debug/JavaScriptCore.framework/Versions/A/JavaScriptCore</div>
<div>ld: library not found for -lgcov</div>
<div>Command /Developer/usr/bin/clang++ failed with exit code 1</div>
<div>** BUILD FAILED **≤/div>
<div>The following build commands failed:</div>
<div>
<span class="Apple-style-span"><span class="Apple-tab-span">	</span>Ld /Users/≤/span>xyz<span class="Apple-style-span">/WebKit/WebKitBuild/Debug/JavaScriptCore.framework/Versions/A/JavaScriptCore normal x86_64</span>
</div>
<div>(1 failure)</div>
<div>Died at /Users/xyz/WebKit/Tools/Scripts/generate-coverage-data line 62.</div>
</div>
<div><br></div>
</div>
Jerry Evans | 6 Jan 2012 20:34
Favicon

Re: Windows Webkit Build - EventListeners

Hi Mike

Congrats on the build. How did you do it?

ATB

On 06/01/2012 17:59, Mike Fairlamb wrote:
> Hi,
>
> Successfully built and using Windows Webkit build in our application. I am
> trying to implement Event Listeners in C++ to handler the mouse clicks
> events from the loaded page.
>
> I have implemented the SimpleEventListener from WinLauncher and get the
> target element when the mouse is click on the page.
>
> In the handler, I then try and determine what element was click by using
> the code below:
>
>     CComPtr<IDOMEventTarget>  target = 0;
>     HRESULT hr = evt->target(&target);
>
> The return value is E_NOTIMPL, not implemented.
>
> This is not being implemented (obviously ) or I have not built webkit
> correctly and have missed out a chunk of code.
>
> Can anyone shred some light on this problem or do I just keep digging!!
>
> Thanks in advanced
>
>
> Mike
>
>
> _______________________________________________
> webkit-help mailing list
> webkit-help@...
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
>

Mike Fairlamb | 9 Jan 2012 10:52
Favicon

Re: Windows Webkit Build - EventListeners

Jerry Evans <jerry <at> ...> writes:

> 
> Hi Mike
> 
> Congrats on the build. How did you do it?
> 
> ATB
> 
> On 06/01/2012 17:59, Mike Fairlamb wrote:
> > Hi,
> >
> > Successfully built and using Windows Webkit build in our application. I am
> > trying to implement Event Listeners in C++ to handler the mouse clicks
> > events from the loaded page.
> >
> > I have implemented the SimpleEventListener from WinLauncher and get the
> > target element when the mouse is click on the page.
> >
> > In the handler, I then try and determine what element was click by using
> > the code below:
> >
> >     CComPtr<IDOMEventTarget>  target = 0;
> >     HRESULT hr = evt->target(&target);
> >
> > The return value is E_NOTIMPL, not implemented.
> >
> > This is not being implemented (obviously ) or I have not built webkit
> > correctly and have missed out a chunk of code.
> >
> > Can anyone shred some light on this problem or do I just keep digging!!
> >
> > Thanks in advanced
> >
> >
> > Mike
> >
> >
> > _______________________________________________
> > webkit-help mailing list
> > webkit-help <at> ...
> > http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
> >
> 
> 

Hi Jerry,

It took a long time to get to this point. Along with help from Chris Waldron, I 
eventually got something that seems to work. I have tried getting down the 
latest source from svn and this does not build with out tweaking 

I initially had problems with cygwin (space in my login name really pissed me 
off!!). So I built webkit in a separate directory and not in the cygwin home 
directory, using vs2008. When I did manage to build the library and start 
testing my build everything was fine. Move to a new machine and then I started 
to hit problems of missing vs runtime libraries. This was down to the 
WinCairoRequirment libraries requiring specific versions of the runtime.

Found the source for this libraries and rebuilt, removing the manifest flag, 
which was pointing to the version of the libraries to use. Also had to do this 
with the webkit projects as well.

Hope this helps

Mike Fairlamb | 9 Jan 2012 12:42
Favicon

Re: Windows Webkit Build - EventListeners

Adam Roben <aroben <at> ...> writes:

> 
> On Jan 6, 2012, at 12:59 PM, Mike Fairlamb wrote:
> 
> > Successfully built and using Windows Webkit build in our application. I am 
> > trying to implement Event Listeners in C++ to handler the mouse clicks 
> > events from the loaded page.
> > 
> > I have implemented the SimpleEventListener from WinLauncher and get the 
> > target element when the mouse is click on the page. 
> > 
> > In the handler, I then try and determine what element was click by using 
> > the code below:
> > 
> >   CComPtr<IDOMEventTarget> target = 0;
> >   HRESULT hr = evt->target(&target);
> > 
> > The return value is E_NOTIMPL, not implemented. 
> > 
> > This is not being implemented (obviously ) or I have not built webkit 
> > correctly and have missed out a chunk of code.
> > 
> > Can anyone shred some light on this problem or do I just keep digging!!
> 
> Many parts of the WebKit COM API are unimplemented. We've basically only 
implemented what's needed by
> Safari and our test tools. Feel free to submit a patch to implement the parts 
you're interested in!
> 
> -Adam
> 
> 

Hi Adam,

Ok, can you give some advice/pointers where to look to implement either picking 
up the target element or just to see what button was pressed (to ignore right 
mouse click). I do find the lack of information in expand webkit very 
frustrating. There is no overall plan or how the classes and interface fit 
together.

Any help would be gratefully received.

Mike

Dave Benson | 9 Jan 2012 22:46
Picon

Multichannel output from the Web Audio API?

Hi there,


Does anyone know what the state of play is with multichannel output from the Web Audio API?  At the moment the implementation only seems to support 2 channels of output ("stereo"), but the W3C proposal and the source code suggest an intention to eventually support larger channel counts.


Is anyone currently working on implementing multichannel?  If so, is there any timeline for when a working build might be available?


I'm interested in writing a web app that interfaces with a 5.1 channel loudspeaker array. Just curious whether anyone's working on this functionality, and whether they can share any information regarding when it might be usable (even in a rough alpha build).


(BTW, many kudos to Chris Rogers and everyone who's been involved in Web Audio API.  It's brilliant work and I'm looking forward to using it!)


Cheers & thanks,



Dave Benson

PhD Candidate, Sound Recording Area

McGill University



<div>
<p>Hi there,</p>
<p>

<br></p>
<p>Does anyone know what the state of play is with multichannel output from the Web Audio API? &nbsp;At the moment the implementation only seems to support 2 channels of output ("stereo"), but the W3C proposal and the source code suggest an intention to eventually support larger channel counts.</p>

<p><br></p>
<p>

Is anyone currently working on implementing multichannel? &nbsp;If so, is there any timeline for when a working build might be available?</p>
<p>

<br></p>
<p>I'm interested in writing a web app that interfaces with a 5.1 channel loudspeaker array. Just curious whether anyone's working on this functionality, and whether they can share any information regarding when it might be usable (even in a rough alpha build).</p>

<p><br></p>
<p>

(BTW, many kudos to Chris Rogers and everyone who's been involved in Web Audio API. &nbsp;It's brilliant work and I'm looking forward to using it!)</p>
<p>

<br></p>
<p>

Cheers &amp; thanks,</p>
<p><br></p>
<p>

<br>Dave Benson</p>
<p>PhD Candidate, Sound Recording Area</p>
<p>

McGill University</p>
<p><br></p>
<p>

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

Gmane