Source/WebCore/ChangeLog

 12011-06-13 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 [Texmap] [Qt] [WK2] Unsync in TextureMapperNode between parent and child lists cause crashes on WK2.
 6 https://bugs.webkit.org/show_bug.cgi?id=62587
 7
 8 Fix unsync between m_parent and m_children list in child and parent texture mapper nodes
 9 in syncCompositingStateSelf.
 10 Unofficially reviewed by Noam Rosenthal (module author).
 11
 12 * platform/graphics/texmap/TextureMapperNode.cpp:
 13 (WebCore::TextureMapperNode::syncCompositingStateSelf):
 14
1152011-06-13 Adam Barth <abarth@webkit.org>
216
317 Reviewed by Darin Adler.

Source/WebCore/platform/graphics/texmap/TextureMapperNode.cpp

@@void TextureMapperNode::syncCompositingStateSelf(GraphicsLayerTextureMapper* gra
585585 return;
586586
587587 if (m_currentContent.contentType == HTMLContentType && (changeMask & ParentChange)) {
588  m_parent = toTextureMapperNode(graphicsLayer->parent());
589 
590  if (!graphicsLayer->parent() && m_parent) {
591  size_t index = m_parent->m_children.find(this);
592  m_parent->m_children.remove(index);
 588 TextureMapperNode* newParent = toTextureMapperNode(graphicsLayer->parent());
 589 if (newParent != m_parent) {
 590 // Remove node from current from child list first.
 591 if (m_parent) {
 592 size_t index = m_parent->m_children.find(this);
 593 m_parent->m_children.remove(index);
 594 m_parent = 0;
 595 }
 596 // Set new node parent and add node to the parents child list.
 597 if (newParent) {
 598 m_parent = newParent;
 599 m_parent->m_children.append(this);
 600 }
593601 }
594602 }
595603
596604 if (changeMask & ChildrenChange) {
 605 // Clear children parent pointer to avoid unsync and crash on node delete.
 606 for (size_t i = 0; i < m_children.size(); i++)
 607 m_children[i]->m_parent = 0;
 608
597609 m_children.clear();
598610 for (size_t i = 0; i < graphicsLayer->children().size(); ++i) {
599611 TextureMapperNode* child = toTextureMapperNode(graphicsLayer->children()[i]);