--- old/modules/web/src/main/java/com/sun/webkit/WebPage.java 2015-05-28 15:15:05.972242800 +0300 +++ new/modules/web/src/main/java/com/sun/webkit/WebPage.java 2015-05-28 15:15:05.567691500 +0300 @@ -207,6 +207,9 @@ private List dirtyRects = new LinkedList(); private void addDirtyRect(WCRectangle toPaint) { + if (toPaint.getWidth() <= 0 || toPaint.getHeight() <= 0) { + return; + } for (Iterator it = dirtyRects.iterator(); it.hasNext();) { WCRectangle rect = it.next(); // if already covered @@ -371,11 +374,11 @@ } } - // Add the dirty (not copied) rect - addDirtyRect(new WCRectangle(dx >= 0 ? x : x + w + dx, - dy >= 0 ? y : y + h + dy, - dx == 0 ? w : Math.abs(dx), - dy == 0 ? h : Math.abs(dy))); + // Add the dirty (not copied) rects + addDirtyRect(new WCRectangle(x, dy >= 0 ? y : y + h + dy, + w, Math.abs(dy))); + addDirtyRect(new WCRectangle(dx >= 0 ? x : x + w + dx, y, + Math.abs(dx), h - Math.abs(dy))); } // Instances of this class may not be accessed and modified concurrently