Title: [126498] trunk/Source
- Revision
- 126498
- Author
- jam...@google.com
- Date
- 2012-08-23 16:14:21 -0700 (Thu, 23 Aug 2012)
Log Message
[chromium] Remove WebLayer::setChildren API
https://bugs.webkit.org/show_bug.cgi?id=94749
Reviewed by Adrienne Walker.
Source/Platform:
This is redundant with removeAllChildren() / addChild() and less efficient.
* chromium/public/WebLayer.h:
(WebLayer):
Source/WebCore:
Sets up the child list directly instead of building an intermediate buffer. Covered by compositing/*
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::updateChildList):
Source/WebKit/chromium:
* src/WebLayer.cpp:
Modified Paths
Diff
Modified: trunk/Source/Platform/ChangeLog (126497 => 126498)
--- trunk/Source/Platform/ChangeLog 2012-08-23 23:12:47 UTC (rev 126497)
+++ trunk/Source/Platform/ChangeLog 2012-08-23 23:14:21 UTC (rev 126498)
@@ -1,5 +1,17 @@
2012-08-22 James Robinson <jam...@chromium.org>
+ [chromium] Remove WebLayer::setChildren API
+ https://bugs.webkit.org/show_bug.cgi?id=94749
+
+ Reviewed by Adrienne Walker.
+
+ This is redundant with removeAllChildren() / addChild() and less efficient.
+
+ * chromium/public/WebLayer.h:
+ (WebLayer):
+
+2012-08-22 James Robinson <jam...@chromium.org>
+
[chromium] Change WebLayer from a concrete type to a pure virtual interface
https://bugs.webkit.org/show_bug.cgi?id=94174
Modified: trunk/Source/Platform/chromium/public/WebLayer.h (126497 => 126498)
--- trunk/Source/Platform/chromium/public/WebLayer.h 2012-08-23 23:12:47 UTC (rev 126497)
+++ trunk/Source/Platform/chromium/public/WebLayer.h 2012-08-23 23:14:21 UTC (rev 126498)
@@ -67,7 +67,6 @@
virtual void addChild(WebLayer*) = 0;
virtual void insertChild(WebLayer*, size_t index) = 0;
virtual void replaceChild(WebLayer* reference, WebLayer* newLayer) = 0;
- virtual void setChildren(const WebVector<WebLayer*>&) = 0;
virtual void removeFromParent() = 0;
virtual void removeAllChildren() = 0;
Modified: trunk/Source/WebCore/ChangeLog (126497 => 126498)
--- trunk/Source/WebCore/ChangeLog 2012-08-23 23:12:47 UTC (rev 126497)
+++ trunk/Source/WebCore/ChangeLog 2012-08-23 23:14:21 UTC (rev 126498)
@@ -1,3 +1,15 @@
+2012-08-22 James Robinson <jam...@chromium.org>
+
+ [chromium] Remove WebLayer::setChildren API
+ https://bugs.webkit.org/show_bug.cgi?id=94749
+
+ Reviewed by Adrienne Walker.
+
+ Sets up the child list directly instead of building an intermediate buffer. Covered by compositing/*
+
+ * platform/graphics/chromium/GraphicsLayerChromium.cpp:
+ (WebCore::GraphicsLayerChromium::updateChildList):
+
2012-08-23 Dominic Mazzoni <dmazz...@google.com>
AX: Focusable elements without a role should not be ignored
Modified: trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp (126497 => 126498)
--- trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp 2012-08-23 23:12:47 UTC (rev 126497)
+++ trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp 2012-08-23 23:14:21 UTC (rev 126498)
@@ -597,16 +597,17 @@
void GraphicsLayerChromium::updateChildList()
{
- Vector<WebLayer*> newChildren;
+ WebLayer* childHost = m_transformLayer ? m_transformLayer.get() : m_layer->layer();
+ childHost->removeAllChildren();
if (m_transformLayer) {
// Add the primary layer first. Even if we have negative z-order children, the primary layer always comes behind.
- newChildren.append(m_layer->layer());
+ childHost->addChild(m_layer->layer());
} else if (m_contentsLayer) {
// FIXME: add the contents layer in the correct order with negative z-order children.
// This does not cause visible rendering issues because currently contents layers are only used
// for replaced elements that don't have children.
- newChildren.append(m_contentsLayer);
+ childHost->addChild(m_contentsLayer);
}
const Vector<GraphicsLayer*>& childLayers = children();
@@ -614,29 +615,18 @@
for (size_t i = 0; i < numChildren; ++i) {
GraphicsLayerChromium* curChild = static_cast<GraphicsLayerChromium*>(childLayers[i]);
- newChildren.append(curChild->platformLayer());
+ childHost->addChild(curChild->platformLayer());
}
if (m_linkHighlight)
- newChildren.append(m_linkHighlight->layer());
+ childHost->addChild(m_linkHighlight->layer());
- for (size_t i = 0; i < newChildren.size(); ++i)
- newChildren[i]->removeFromParent();
-
- WebVector<WebLayer*> newWebChildren;
- newWebChildren.assign(newChildren.data(), newChildren.size());
-
- if (m_transformLayer) {
- m_transformLayer->setChildren(newWebChildren);
-
- if (m_contentsLayer) {
- // If we have a transform layer, then the contents layer is parented in the
- // primary layer (which is itself a child of the transform layer).
- m_layer->layer()->removeAllChildren();
- m_layer->layer()->addChild(m_contentsLayer);
- }
- } else
- m_layer->layer()->setChildren(newWebChildren);
+ if (m_transformLayer && m_contentsLayer) {
+ // If we have a transform layer, then the contents layer is parented in the
+ // primary layer (which is itself a child of the transform layer).
+ m_layer->layer()->removeAllChildren();
+ m_layer->layer()->addChild(m_contentsLayer);
+ }
}
void GraphicsLayerChromium::updateLayerPosition()
Modified: trunk/Source/WebKit/chromium/ChangeLog (126497 => 126498)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-08-23 23:12:47 UTC (rev 126497)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-08-23 23:14:21 UTC (rev 126498)
@@ -1,3 +1,12 @@
+2012-08-22 James Robinson <jam...@chromium.org>
+
+ [chromium] Remove WebLayer::setChildren API
+ https://bugs.webkit.org/show_bug.cgi?id=94749
+
+ Reviewed by Adrienne Walker.
+
+ * src/WebLayer.cpp:
+
2012-08-23 Dana Jansens <dan...@chromium.org>
[chromium] Create sharedQuadState at same time as creating quads and give them to the quadSink
Modified: trunk/Source/WebKit/chromium/src/WebLayerImpl.cpp (126497 => 126498)
--- trunk/Source/WebKit/chromium/src/WebLayerImpl.cpp 2012-08-23 23:12:47 UTC (rev 126497)
+++ trunk/Source/WebKit/chromium/src/WebLayerImpl.cpp 2012-08-23 23:14:21 UTC (rev 126498)
@@ -123,14 +123,6 @@
m_layer->replaceChild(static_cast<WebLayerImpl*>(reference)->layer(), static_cast<WebLayerImpl*>(newLayer)->layer());
}
-void WebLayerImpl::setChildren(const WebVector<WebLayer*>& webChildren)
-{
- Vector<RefPtr<LayerChromium> > children(webChildren.size());
- for (size_t i = 0; i < webChildren.size(); ++i)
- children[i] = static_cast<WebLayerImpl*>(webChildren[i])->layer();
- m_layer->setChildren(children);
-}
-
void WebLayerImpl::removeFromParent()
{
m_layer->removeFromParent();
Modified: trunk/Source/WebKit/chromium/src/WebLayerImpl.h (126497 => 126498)
--- trunk/Source/WebKit/chromium/src/WebLayerImpl.h 2012-08-23 23:12:47 UTC (rev 126497)
+++ trunk/Source/WebKit/chromium/src/WebLayerImpl.h 2012-08-23 23:14:21 UTC (rev 126498)
@@ -47,7 +47,6 @@
virtual void addChild(WebLayer*) OVERRIDE;
virtual void insertChild(WebLayer*, size_t index) OVERRIDE;
virtual void replaceChild(WebLayer* reference, WebLayer* newLayer) OVERRIDE;
- virtual void setChildren(const WebVector<WebLayer*>&) OVERRIDE;
virtual void removeFromParent() OVERRIDE;
virtual void removeAllChildren() OVERRIDE;
virtual void setAnchorPoint(const WebFloatPoint&) OVERRIDE;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes