|
|
@@ -1336,8 +1336,6 @@ void Element::ScrollIntoView(bool align_with_top)
|
|
|
// Appends a child to this element
|
|
|
void Element::AppendChild(Element* child, bool dom_element)
|
|
|
{
|
|
|
- LockLayout(true);
|
|
|
-
|
|
|
child->AddReference();
|
|
|
child->SetParent(this);
|
|
|
if (dom_element)
|
|
|
@@ -1357,8 +1355,6 @@ void Element::AppendChild(Element* child, bool dom_element)
|
|
|
|
|
|
if (dom_element)
|
|
|
DirtyLayout();
|
|
|
-
|
|
|
- LockLayout(false);
|
|
|
}
|
|
|
|
|
|
// Adds a child to this element, directly after the adjacent element. Inherits
|
|
|
@@ -1384,8 +1380,6 @@ void Element::InsertBefore(Element* child, Element* adjacent_element)
|
|
|
|
|
|
if (found_child)
|
|
|
{
|
|
|
- LockLayout(true);
|
|
|
-
|
|
|
child->AddReference();
|
|
|
child->SetParent(this);
|
|
|
|
|
|
@@ -1402,8 +1396,6 @@ void Element::InsertBefore(Element* child, Element* adjacent_element)
|
|
|
child->OnChildAdd(child);
|
|
|
DirtyStackingContext();
|
|
|
DirtyStructure();
|
|
|
-
|
|
|
- LockLayout(false);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -1429,8 +1421,6 @@ bool Element::ReplaceChild(Element* inserted_element, Element* replaced_element)
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- LockLayout(true);
|
|
|
-
|
|
|
children.insert(insertion_point, inserted_element);
|
|
|
RemoveChild(replaced_element);
|
|
|
|
|
|
@@ -1438,8 +1428,6 @@ bool Element::ReplaceChild(Element* inserted_element, Element* replaced_element)
|
|
|
all_properties_dirty = true;
|
|
|
inserted_element->OnChildAdd(inserted_element);
|
|
|
|
|
|
- LockLayout(false);
|
|
|
-
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
@@ -1453,8 +1441,6 @@ bool Element::RemoveChild(Element* child)
|
|
|
// Add the element to the delete list
|
|
|
if ((*itr) == child)
|
|
|
{
|
|
|
- LockLayout(true);
|
|
|
-
|
|
|
// Inform the context of the element's pending removal (if we have a valid context).
|
|
|
Context* context = GetContext();
|
|
|
if (context)
|
|
|
@@ -1496,8 +1482,6 @@ bool Element::RemoveChild(Element* child)
|
|
|
DirtyStackingContext();
|
|
|
DirtyStructure();
|
|
|
|
|
|
- LockLayout(false);
|
|
|
-
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
@@ -1940,14 +1924,6 @@ void Element::DirtyLayout()
|
|
|
document->DirtyLayout();
|
|
|
}
|
|
|
|
|
|
-/// Increment/Decrement the layout lock
|
|
|
-void Element::LockLayout(bool lock)
|
|
|
-{
|
|
|
- ElementDocument* document = GetOwnerDocument();
|
|
|
- if (document != NULL)
|
|
|
- document->LockLayout(lock);
|
|
|
-}
|
|
|
-
|
|
|
// Forces a re-layout of this element, and any other children required.
|
|
|
bool Element::IsLayoutDirty()
|
|
|
{
|