[BlackBerry] Poor rendering opening a Google map short link
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Sep 2013 17:07:07 +0000 (17:07 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Sep 2013 17:07:07 +0000 (17:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=121687

Patch by Jacky Jiang <zhajiang@blackberry.com> on 2013-09-20
Reviewed by Yong Li.
Internally reviewed by Arvid Nilsson.

JIRA 495023
Route lines on google map were shown even they were on a hidden canvas.
Include visibility on LayerWebKitThread if it's a canvas layer and respect
the visibility when compositing layers in LayerRenderer.

* platform/graphics/blackberry/LayerData.h:
(WebCore::LayerData::isCanvasLayer):
(WebCore::LayerData::isVisible):
(WebCore::LayerData::includeVisibility):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::compositeLayersRecursive):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156174 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/blackberry/LayerData.h
Source/WebCore/platform/graphics/blackberry/LayerRenderer.cpp

index 25e5d9f63920dabbe6a8de7f3b6d497569f5ec65..e7b0a3b6324ea3c5b63c76908fece539b752bada 100644 (file)
@@ -1,3 +1,23 @@
+2013-09-20  Jacky Jiang  <zhajiang@blackberry.com>
+
+        [BlackBerry] Poor rendering opening a Google map short link
+        https://bugs.webkit.org/show_bug.cgi?id=121687
+
+        Reviewed by Yong Li.
+        Internally reviewed by Arvid Nilsson.
+
+        JIRA 495023
+        Route lines on google map were shown even they were on a hidden canvas.
+        Include visibility on LayerWebKitThread if it's a canvas layer and respect
+        the visibility when compositing layers in LayerRenderer.
+
+        * platform/graphics/blackberry/LayerData.h:
+        (WebCore::LayerData::isCanvasLayer):
+        (WebCore::LayerData::isVisible):
+        (WebCore::LayerData::includeVisibility):
+        * platform/graphics/blackberry/LayerRenderer.cpp:
+        (WebCore::LayerRenderer::compositeLayersRecursive):
+
 2013-09-20  Sam White  <samuel_white@apple.com>
 
         AX: WebArea claims to have a subrole, but always returns nil.
index 6402f6e46c16050830e998b5246a8eda60a0cd1d..63f0e169a79fd25b5813b741f7c8be2b3749f58e 100644 (file)
@@ -178,6 +178,16 @@ public:
 
     LayerType layerType() const { return m_layerType; }
 
+    bool isCanvasLayer() const
+    {
+        return m_layerType == CanvasLayer;
+    }
+
+    bool isVisible() const
+    {
+        return m_isVisible;
+    }
+
     bool includeVisibility() const
     {
         if (pluginView())
@@ -188,6 +198,9 @@ public:
             return true;
 #endif
 
+        if (isCanvasLayer())
+            return true;
+
         return false;
     }
 
index 23bb5f5310362b0a7c7e2aea91dbf1d1bb3034e4..c9c01e62e1e3932bc6ae128d238c31f72821d40c 100644 (file)
@@ -890,6 +890,9 @@ void LayerRenderer::compositeLayersRecursive(LayerCompositingThread* layer, int
     bool layerVisible = clipRect.intersects(rect);
 #endif
 
+    if (layer->isCanvasLayer())
+        layerVisible = layerVisible && layer->isVisible();
+
     layer->setVisible(layerVisible);
 
     // Note that there are two types of layers: