Title: [108407] trunk/Source
Revision
108407
Author
noam.rosent...@nokia.com
Date
2012-02-21 15:30:52 -0800 (Tue, 21 Feb 2012)

Log Message

[Qt] Previous web page appears outside content rect
https://bugs.webkit.org/show_bug.cgi?id=78816

Source/WebCore:

Adjust the scissor clipping by -1, as the glScissor() function requires coordinates and
not sizes.

Reviewed by Kenneth Rohde Christiansen.

No new functionality.

* platform/graphics/opengl/TextureMapperGL.cpp:
(WebCore::scissorClip):

Source/WebKit2:

Apply a clip on painted tiles if some of the tiles fall outside of the target rect.

Reviewed by Kenneth Rohde Christiansen.

* UIProcess/qt/LayerBackingStore.cpp:
(WebKit::LayerBackingStore::paintToTextureMapper):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (108406 => 108407)


--- trunk/Source/WebCore/ChangeLog	2012-02-21 23:28:00 UTC (rev 108406)
+++ trunk/Source/WebCore/ChangeLog	2012-02-21 23:30:52 UTC (rev 108407)
@@ -1,3 +1,18 @@
+2012-02-21  No'am Rosenthal  <noam.rosent...@nokia.com>
+
+        [Qt] Previous web page appears outside content rect
+        https://bugs.webkit.org/show_bug.cgi?id=78816
+
+        Adjust the scissor clipping by -1, as the glScissor() function requires coordinates and
+        not sizes.
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        No new functionality.
+
+        * platform/graphics/opengl/TextureMapperGL.cpp:
+        (WebCore::scissorClip):
+
 2012-02-21  Victor Carbune  <vcarb...@adobe.com>
 
         Added support for pause-on-exit flag on a TextTrackCue.

Modified: trunk/Source/WebCore/platform/graphics/opengl/TextureMapperGL.cpp (108406 => 108407)


--- trunk/Source/WebCore/platform/graphics/opengl/TextureMapperGL.cpp	2012-02-21 23:28:00 UTC (rev 108406)
+++ trunk/Source/WebCore/platform/graphics/opengl/TextureMapperGL.cpp	2012-02-21 23:30:52 UTC (rev 108407)
@@ -618,7 +618,7 @@
 {
     GLint viewport[4];
     glGetIntegerv(GL_VIEWPORT, viewport);
-    glScissor(rect.x(), viewport[3] - rect.maxY(), rect.width(), rect.height());
+    glScissor(rect.x(), viewport[3] - rect.maxY() + 1, rect.width() - 1, rect.height() - 1);
 }
 
 bool TextureMapperGL::beginScissorClip(const TransformationMatrix& modelViewMatrix, const FloatRect& targetRect)

Modified: trunk/Source/WebKit2/ChangeLog (108406 => 108407)


--- trunk/Source/WebKit2/ChangeLog	2012-02-21 23:28:00 UTC (rev 108406)
+++ trunk/Source/WebKit2/ChangeLog	2012-02-21 23:30:52 UTC (rev 108407)
@@ -1,5 +1,17 @@
 2012-02-21  No'am Rosenthal  <noam.rosent...@nokia.com>
 
+        [Qt] Previous web page appears outside content rect
+        https://bugs.webkit.org/show_bug.cgi?id=78816
+
+        Apply a clip on painted tiles if some of the tiles fall outside of the target rect.
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * UIProcess/qt/LayerBackingStore.cpp:
+        (WebKit::LayerBackingStore::paintToTextureMapper):
+
+2012-02-21  No'am Rosenthal  <noam.rosent...@nokia.com>
+
         [Qt][WK2] Accelerated animations don't work on Mac
         https://bugs.webkit.org/show_bug.cgi?id=78963
 

Modified: trunk/Source/WebKit2/UIProcess/qt/LayerBackingStore.cpp (108406 => 108407)


--- trunk/Source/WebKit2/UIProcess/qt/LayerBackingStore.cpp	2012-02-21 23:28:00 UTC (rev 108406)
+++ trunk/Source/WebKit2/UIProcess/qt/LayerBackingStore.cpp	2012-02-21 23:30:52 UTC (rev 108407)
@@ -94,7 +94,7 @@
     return PassRefPtr<BitmapTexture>();
 }
 
-void LayerBackingStore::paintToTextureMapper(TextureMapper* textureMapper, const FloatRect&, const TransformationMatrix& transform, float opacity, BitmapTexture* mask)
+void LayerBackingStore::paintToTextureMapper(TextureMapper* textureMapper, const FloatRect& targetRect, const TransformationMatrix& transform, float opacity, BitmapTexture* mask)
 {
     Vector<TextureMapperTile*> tilesToPaint;
 
@@ -115,8 +115,16 @@
             tilesToPaint.prepend(&tile);
     }
 
+    bool shouldClip = !targetRect.contains(coveredRect);
+
+    if (shouldClip)
+        textureMapper->beginClip(transform, targetRect);
+
     for (size_t i = 0; i < tilesToPaint.size(); ++i)
         tilesToPaint[i]->paint(textureMapper, transform, opacity, mask);
+
+    if (shouldClip)
+        textureMapper->endClip();
 }
 
 void LayerBackingStore::swapBuffers(TextureMapper* textureMapper)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to