A formatting nit - "if" is not a function, it is a control statement and so there should always be a space between it and the condition being tested:

"if(foo)" => "if (foo)"

Just to make sure we are on the same page, ResourceFactory.getMaxTextureSize() is clamped by an arbitrary limit we use for tiling ImageView images. It's not actually the limit enforced by hardware and can be less than that.

As to the correctness of the fix - if w,h are clipped to the maximum texture size, where is the code that then tiles the content of the page so that it doesn't get clipped out? I experimented with a very large web page (I just cut and pasted 20 paragraphs of "Lorem ipsum dolor" text created by a generator into an HTML file and loaded it into the WebView's engine) and it seems that what happens is that your clipping of the WebPage makes it smaller than the indicated size and the WebView rendering somehow then manages to tile that image into the requested space. In other words, you get multiple horizontal copies of the page to fill out the horizontal space. This doesn't "fix" the problem, it simply avoids an exception. To adequately fix the problem we'd have to detect that the corresponding WebPage object was created smaller than the indicated size and tile the content into multiple WebPage objects - but WebPage is not set up for that.

There is tiling support for the page itself at a lower level - we should rework WebPage so that instead of creating a single texture for all of the webkit tiles, it creates one per webkit tile and so ties naturally into the existing tiling at the lower levels of webkit...

                        ...jim

On 12/15/15 3:38 PM, Guru Hb wrote:
Hi Kevin,  Jim,  Alexander

Please provide your review comments for

JBS : https://bugs.openjdk.java.net/browse/JDK-8139842

Webrev : http://cr.openjdk.java.net/~ghb/8139842/webrev.00/

Tested on Windows , Linux and Mac.

Thanks,

Guru

Reply via email to