Title: [102457] trunk/Source/WebKit2
- Revision
- 102457
- Author
- [email protected]
- Date
- 2011-12-09 09:40:53 -0800 (Fri, 09 Dec 2011)
Log Message
[Qt] Update WebGraphicLayer's child content scale in all child binding method.
https://bugs.webkit.org/show_bug.cgi?id=74101
Reviewed by Noam Rosenthal.
setChildren is currently the only method propagating the parent layer's content
scale to its children. This need to be done for addChild* as well.
This fixes the overlay layer not being rendered with the right scale when created
until the contents scale is modified again.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::setChildren):
(WebCore::WebGraphicsLayer::addChild):
(WebCore::WebGraphicsLayer::addChildAtIndex):
(WebCore::WebGraphicsLayer::addChildAbove):
(WebCore::WebGraphicsLayer::addChildBelow):
(WebCore::WebGraphicsLayer::replaceChild):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (102456 => 102457)
--- trunk/Source/WebKit2/ChangeLog 2011-12-09 17:38:17 UTC (rev 102456)
+++ trunk/Source/WebKit2/ChangeLog 2011-12-09 17:40:53 UTC (rev 102457)
@@ -1,3 +1,24 @@
+2011-12-08 Jocelyn Turcotte <[email protected]>
+
+ [Qt] Update WebGraphicLayer's child content scale in all child binding method.
+ https://bugs.webkit.org/show_bug.cgi?id=74101
+
+ Reviewed by Noam Rosenthal.
+
+ setChildren is currently the only method propagating the parent layer's content
+ scale to its children. This need to be done for addChild* as well.
+
+ This fixes the overlay layer not being rendered with the right scale when created
+ until the contents scale is modified again.
+
+ * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
+ (WebCore::WebGraphicsLayer::setChildren):
+ (WebCore::WebGraphicsLayer::addChild):
+ (WebCore::WebGraphicsLayer::addChildAtIndex):
+ (WebCore::WebGraphicsLayer::addChildAbove):
+ (WebCore::WebGraphicsLayer::addChildBelow):
+ (WebCore::WebGraphicsLayer::replaceChild):
+
2011-12-09 Michael BrĂ¼ning <[email protected]>
[Qt][WK2] Fix tst_QQuickWebView::scrollRequest() API test
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp (102456 => 102457)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp 2011-12-09 17:38:17 UTC (rev 102456)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp 2011-12-09 17:40:53 UTC (rev 102457)
@@ -117,6 +117,7 @@
void WebGraphicsLayer::addChild(GraphicsLayer* layer)
{
GraphicsLayer::addChild(layer);
+ toWebGraphicsLayer(layer)->setContentsScale(m_contentsScale);
toWebGraphicsLayer(layer)->notifyChange();
notifyChange();
}
@@ -124,6 +125,7 @@
void WebGraphicsLayer::addChildAtIndex(GraphicsLayer* layer, int index)
{
GraphicsLayer::addChildAtIndex(layer, index);
+ toWebGraphicsLayer(layer)->setContentsScale(m_contentsScale);
toWebGraphicsLayer(layer)->notifyChange();
notifyChange();
}
@@ -131,6 +133,7 @@
void WebGraphicsLayer::addChildAbove(GraphicsLayer* layer, GraphicsLayer* sibling)
{
GraphicsLayer::addChildAbove(layer, sibling);
+ toWebGraphicsLayer(layer)->setContentsScale(m_contentsScale);
toWebGraphicsLayer(layer)->notifyChange();
notifyChange();
}
@@ -138,6 +141,7 @@
void WebGraphicsLayer::addChildBelow(GraphicsLayer* layer, GraphicsLayer* sibling)
{
GraphicsLayer::addChildBelow(layer, sibling);
+ toWebGraphicsLayer(layer)->setContentsScale(m_contentsScale);
toWebGraphicsLayer(layer)->notifyChange();
notifyChange();
}
@@ -149,6 +153,7 @@
return false;
notifyChange();
toWebGraphicsLayer(oldChild)->notifyChange();
+ toWebGraphicsLayer(newChild)->setContentsScale(m_contentsScale);
toWebGraphicsLayer(newChild)->notifyChange();
return true;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes