Title: [91192] trunk/Source/WebCore
- Revision
- 91192
- Author
- [email protected]
- Date
- 2011-07-18 10:04:50 -0700 (Mon, 18 Jul 2011)
Log Message
[Texmap] [Qt] [WK2] Unsync in TextureMapperNode between parent and child lists cause crashes on WK2.
https://bugs.webkit.org/show_bug.cgi?id=62587
Patch by Viatcheslav Ostapenko <[email protected]> on 2011-07-18
Reviewed by Noam Rosenthal.
Fix unsync between m_parent and m_children list in child and parent texture mapper nodes
in syncCompositingStateSelf.
* platform/graphics/texmap/TextureMapperNode.cpp:
(WebCore::TextureMapperNode::syncCompositingStateSelf):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (91191 => 91192)
--- trunk/Source/WebCore/ChangeLog 2011-07-18 17:01:41 UTC (rev 91191)
+++ trunk/Source/WebCore/ChangeLog 2011-07-18 17:04:50 UTC (rev 91192)
@@ -1,3 +1,16 @@
+2011-07-18 Viatcheslav Ostapenko <[email protected]>
+
+ [Texmap] [Qt] [WK2] Unsync in TextureMapperNode between parent and child lists cause crashes on WK2.
+ https://bugs.webkit.org/show_bug.cgi?id=62587
+
+ Reviewed by Noam Rosenthal.
+
+ Fix unsync between m_parent and m_children list in child and parent texture mapper nodes
+ in syncCompositingStateSelf.
+
+ * platform/graphics/texmap/TextureMapperNode.cpp:
+ (WebCore::TextureMapperNode::syncCompositingStateSelf):
+
2011-07-18 Rob Buis <[email protected]>
Stroking of zero-length paths in SVG should change according to erratum
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperNode.cpp (91191 => 91192)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperNode.cpp 2011-07-18 17:01:41 UTC (rev 91191)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperNode.cpp 2011-07-18 17:04:50 UTC (rev 91192)
@@ -585,15 +585,27 @@
return;
if (m_currentContent.contentType == HTMLContentType && (changeMask & ParentChange)) {
- m_parent = toTextureMapperNode(graphicsLayer->parent());
-
- if (!graphicsLayer->parent() && m_parent) {
- size_t index = m_parent->m_children.find(this);
- m_parent->m_children.remove(index);
+ TextureMapperNode* newParent = toTextureMapperNode(graphicsLayer->parent());
+ if (newParent != m_parent) {
+ // Remove node from current from child list first.
+ if (m_parent) {
+ size_t index = m_parent->m_children.find(this);
+ m_parent->m_children.remove(index);
+ m_parent = 0;
+ }
+ // Set new node parent and add node to the parents child list.
+ if (newParent) {
+ m_parent = newParent;
+ m_parent->m_children.append(this);
+ }
}
}
if (changeMask & ChildrenChange) {
+ // Clear children parent pointer to avoid unsync and crash on node delete.
+ for (size_t i = 0; i < m_children.size(); i++)
+ m_children[i]->m_parent = 0;
+
m_children.clear();
for (size_t i = 0; i < graphicsLayer->children().size(); ++i) {
TextureMapperNode* child = toTextureMapperNode(graphicsLayer->children()[i]);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes