Commit ed93ca74 authored by hyatt's avatar hyatt

Fixes for 3150561 (blog articles vanish on stylesheet switch) and

        and 3150560 (crash changing fixed positioned element to normal
        positioning dynamically).

        This change makes layers able to deal with dynamic changes in
        position that cause you to have to either remove a layer from
        the hierarchy while preserving the children or to insert a
        layer into the hierarchy in between a parent and its descendants.

	This patch also rewrites :hover/:active so that they can actually
	be used in selectors other than the rightmost selector (e.g., so you
	can write a rule like "li:hover > a").

	Also, layers will now properly clear out their hover/active state
	when the mouse is no longer inside them.

	With these fixes, Eric Meyer's "Pure CSS Menus" work (perfectly)
	and the repainting problems on sites like brainjar.com and
	diveintomark.org and wired.com are fixed.

        Reviewed by mjs and john.

        * khtml/css/css_stylesheetimpl.h:
        * khtml/css/cssparser.cpp:
        (StyleBaseImpl::parseSelector):
        * khtml/css/cssparser.h:
        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssstyleselector.h:
        * khtml/dom/html_head.cpp:
        (HTMLLinkElement::setDisabled):
        * khtml/rendering/render_box.cpp:
        (RenderBox::setStyle):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_container.cpp:
        (RenderContainer::appendChildNode):
        (RenderContainer::insertChildNode):
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::setStyle):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::addChild):
        (RenderLayer::removeOnlyThisLayer):
        (RenderLayer::insertOnlyThisLayer):
        (RenderLayer::clearOtherLayersHoverActiveState):
        (RenderLayer::clearHoverAndActiveState):
        (RenderLayer::nodeAtPoint):
        (RenderLayer::constructZTree):
        * khtml/rendering/render_layer.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::addLayers):
        (RenderObject::moveLayers):
        (RenderObject::findNextLayer):
        (RenderObject::setStyle):
        (RenderObject::setHoverAndActive):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_style.cpp:
        (RenderStyle::diff):
        * khtml/rendering/render_style.h:
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::DocumentImpl):
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::recalcStyle):
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeBaseImpl::setActive):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3356 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 48a4a372
2003-01-19 David Hyatt <hyatt@apple.com>
Fixes for 3150561 (blog articles vanish on stylesheet switch) and
and 3150560 (crash changing fixed positioned element to normal
positioning dynamically).
This change makes layers able to deal with dynamic changes in
position that cause you to have to either remove a layer from
the hierarchy while preserving the children or to insert a
layer into the hierarchy in between a parent and its descendants.
This patch also rewrites :hover/:active so that they can actually
be used in selectors other than the rightmost selector (e.g., so you
can write a rule like "li:hover > a").
Also, layers will now properly clear out their hover/active state
when the mouse is no longer inside them.
With these fixes, Eric Meyer's "Pure CSS Menus" work (perfectly)
and the repainting problems on sites like brainjar.com and
diveintomark.org and wired.com are fixed.
Reviewed by mjs and john.
* khtml/css/css_stylesheetimpl.h:
* khtml/css/cssparser.cpp:
(StyleBaseImpl::parseSelector):
* khtml/css/cssparser.h:
* khtml/css/cssstyleselector.cpp:
* khtml/css/cssstyleselector.h:
* khtml/dom/html_head.cpp:
(HTMLLinkElement::setDisabled):
* khtml/rendering/render_box.cpp:
(RenderBox::setStyle):
* khtml/rendering/render_box.h:
* khtml/rendering/render_container.cpp:
(RenderContainer::appendChildNode):
(RenderContainer::insertChildNode):
* khtml/rendering/render_flow.cpp:
(RenderFlow::setStyle):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_layer.cpp:
(RenderLayer::addChild):
(RenderLayer::removeOnlyThisLayer):
(RenderLayer::insertOnlyThisLayer):
(RenderLayer::clearOtherLayersHoverActiveState):
(RenderLayer::clearHoverAndActiveState):
(RenderLayer::nodeAtPoint):
(RenderLayer::constructZTree):
* khtml/rendering/render_layer.h:
* khtml/rendering/render_object.cpp:
(RenderObject::addLayers):
(RenderObject::moveLayers):
(RenderObject::findNextLayer):
(RenderObject::setStyle):
(RenderObject::setHoverAndActive):
* khtml/rendering/render_object.h:
* khtml/rendering/render_style.cpp:
(RenderStyle::diff):
* khtml/rendering/render_style.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::DocumentImpl):
* khtml/xml/dom_docimpl.h:
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::recalcStyle):
* khtml/xml/dom_nodeimpl.cpp:
(NodeBaseImpl::setActive):
2003-01-17 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
......
2003-01-19 David Hyatt <hyatt@apple.com>
Fixes for 3150561 (blog articles vanish on stylesheet switch) and
and 3150560 (crash changing fixed positioned element to normal
positioning dynamically).
This change makes layers able to deal with dynamic changes in
position that cause you to have to either remove a layer from
the hierarchy while preserving the children or to insert a
layer into the hierarchy in between a parent and its descendants.
This patch also rewrites :hover/:active so that they can actually
be used in selectors other than the rightmost selector (e.g., so you
can write a rule like "li:hover > a").
Also, layers will now properly clear out their hover/active state
when the mouse is no longer inside them.
With these fixes, Eric Meyer's "Pure CSS Menus" work (perfectly)
and the repainting problems on sites like brainjar.com and
diveintomark.org and wired.com are fixed.
Reviewed by mjs and john.
* khtml/css/css_stylesheetimpl.h:
* khtml/css/cssparser.cpp:
(StyleBaseImpl::parseSelector):
* khtml/css/cssparser.h:
* khtml/css/cssstyleselector.cpp:
* khtml/css/cssstyleselector.h:
* khtml/dom/html_head.cpp:
(HTMLLinkElement::setDisabled):
* khtml/rendering/render_box.cpp:
(RenderBox::setStyle):
* khtml/rendering/render_box.h:
* khtml/rendering/render_container.cpp:
(RenderContainer::appendChildNode):
(RenderContainer::insertChildNode):
* khtml/rendering/render_flow.cpp:
(RenderFlow::setStyle):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_layer.cpp:
(RenderLayer::addChild):
(RenderLayer::removeOnlyThisLayer):
(RenderLayer::insertOnlyThisLayer):
(RenderLayer::clearOtherLayersHoverActiveState):
(RenderLayer::clearHoverAndActiveState):
(RenderLayer::nodeAtPoint):
(RenderLayer::constructZTree):
* khtml/rendering/render_layer.h:
* khtml/rendering/render_object.cpp:
(RenderObject::addLayers):
(RenderObject::moveLayers):
(RenderObject::findNextLayer):
(RenderObject::setStyle):
(RenderObject::setHoverAndActive):
* khtml/rendering/render_object.h:
* khtml/rendering/render_style.cpp:
(RenderStyle::diff):
* khtml/rendering/render_style.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::DocumentImpl):
* khtml/xml/dom_docimpl.h:
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::recalcStyle):
* khtml/xml/dom_nodeimpl.cpp:
(NodeBaseImpl::setActive):
2003-01-17 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
......
......@@ -689,6 +689,27 @@ StyleBaseImpl::parseSelector(const QChar *curP, const QChar *endP)
slist->setAutoDelete(true);
}
slist->append(selector);
if (!sawDescendantRule &&
(selector->relation == CSSSelector::Descendant ||
selector->relation == CSSSelector::Child)) {
// We encountered a descendant rule. Get our document and set its
// descendant rule flag to true.
sawDescendantRule = true;
StyleBaseImpl *b = this;
StyleBaseImpl *root = this;
while (b) {
root = b;
b = b->m_parent;
}
if (root && root->isStyleSheet()) {
StyleSheetImpl *sheet = static_cast<StyleSheetImpl *>(root);
if (sheet->ownerNode()) {
DocumentImpl *doc = sheet->ownerNode()->getDocument();
doc->setUsesDescendantRules(true);
}
}
}
}
else
{
......
......@@ -142,8 +142,8 @@ private:
class StyleBaseImpl : public khtml::TreeShared<StyleBaseImpl>
{
public:
StyleBaseImpl() { m_parent = 0; hasInlinedDecl = false; strictParsing = true; }
StyleBaseImpl(StyleBaseImpl *p) { m_parent = p; hasInlinedDecl = false; strictParsing = (m_parent ? m_parent->useStrictParsing() : true); }
StyleBaseImpl() { m_parent = 0; hasInlinedDecl = false; strictParsing = true; sawDescendantRule = false; }
StyleBaseImpl(StyleBaseImpl *p) { m_parent = p; hasInlinedDecl = false; strictParsing = (m_parent ? m_parent->useStrictParsing() : true); sawDescendantRule = false; }
virtual ~StyleBaseImpl() {}
......@@ -238,6 +238,7 @@ private:
protected:
bool hasInlinedDecl : 1;
bool strictParsing : 1;
bool sawDescendantRule : 1;
};
// a style class which has a list of children (StyleSheets for example)
......
......@@ -297,7 +297,7 @@ static inline void bubbleSort( CSSOrderedProperty **b, CSSOrderedProperty **e )
}
}
RenderStyle *CSSStyleSelector::styleForElement(ElementImpl *e, int state)
RenderStyle *CSSStyleSelector::styleForElement(ElementImpl *e)
{
if (!e->getDocument()->haveStylesheetsLoaded()) {
if (!styleNotYetAvailable) {
......@@ -309,8 +309,6 @@ RenderStyle *CSSStyleSelector::styleForElement(ElementImpl *e, int state)
}
// set some variables we will need
dynamicState = state;
usedDynamicStates = StyleSelector::None;
::encodedurl = &encodedurl;
pseudoState = PseudoUnknown;
......@@ -322,6 +320,12 @@ RenderStyle *CSSStyleSelector::styleForElement(ElementImpl *e, int state)
settings = part->settings();
paintDeviceMetrics = element->getDocument()->paintDeviceMetrics();
style = new RenderStyle();
if( parentStyle )
style->inheritFrom( parentStyle );
else
parentStyle = style;
unsigned int numPropsToApply = 0;
unsigned int numPseudoProps = 0;
......@@ -379,12 +383,6 @@ RenderStyle *CSSStyleSelector::styleForElement(ElementImpl *e, int state)
bubbleSort( propsToApply, propsToApply+numPropsToApply-1 );
bubbleSort( pseudoProps, pseudoProps+numPseudoProps-1 );
RenderStyle *style = new RenderStyle();
if( parentStyle )
style->inheritFrom( parentStyle );
else
parentStyle = style;
// This member will be set to true if a rule specifies a font size
// explicitly. If they do this, then we don't need to check for a shift
// in default size caused by a change in generic family. -dwh
......@@ -455,11 +453,6 @@ RenderStyle *CSSStyleSelector::styleForElement(ElementImpl *e, int state)
}
}
if ( usedDynamicStates & StyleSelector::Hover )
style->setHasHover();
if ( usedDynamicStates & StyleSelector::Active )
style->setHasActive();
return style;
}
......@@ -522,7 +515,7 @@ static bool subject;
void CSSStyleSelector::checkSelector(int selIndex, DOM::ElementImpl *e)
{
dynamicPseudo = RenderStyle::NOPSEUDO;
selectorDynamicState = StyleSelector::None;
NodeImpl *n = e;
selectorCache[ selIndex ].state = Invalid;
......@@ -530,11 +523,12 @@ void CSSStyleSelector::checkSelector(int selIndex, DOM::ElementImpl *e)
// we have the subject part of the selector
subject = true;
// hack. We can't allow :hover, as it would trigger a complete relayout with every mouse event.
bool single = false;
bool affectedByHover = style->affectedByHoverRules();
if ( sel->tag == -1 )
single = true;
single = true;
// first selector has to match
if(!checkOneSelector(sel, e)) return;
......@@ -543,8 +537,8 @@ void CSSStyleSelector::checkSelector(int selIndex, DOM::ElementImpl *e)
CSSSelector::Relation relation = sel->relation;
while((sel = sel->tagHistory))
{
single = false;
if(!n->isElementNode()) return;
single = false;
if(!n->isElementNode()) return;
switch(relation)
{
case CSSSelector::Descendant:
......@@ -595,12 +589,13 @@ void CSSStyleSelector::checkSelector(int selIndex, DOM::ElementImpl *e)
}
relation = sel->relation;
}
// disallow *:hover
if ( single && selectorDynamicState & StyleSelector::Hover )
return;
usedDynamicStates |= selectorDynamicState;
if ((selectorDynamicState & dynamicState) != selectorDynamicState)
return;
if (single && !affectedByHover && style->affectedByHoverRules()) {
style->setAffectedByHoverRules(false);
return;
}
if ( dynamicPseudo != RenderStyle::NOPSEUDO ) {
selectorCache[selIndex].state = AppliesPseudo;
selectors[ selIndex ]->pseudoId = dynamicPseudo;
......@@ -811,19 +806,30 @@ bool CSSStyleSelector::checkOneSelector(DOM::CSSSelector *sel, DOM::ElementImpl
return true;
break;
case CSSSelector::PseudoHover:
selectorDynamicState |= StyleSelector::Hover;
// dynamic pseudos have to be sorted out in checkSelector, so we if it could in some state apply
// to the element.
return true;
if (element == e)
style->setAffectedByHoverRules(true);
if (e->renderer()) {
if (element != e)
e->renderer()->style()->setAffectedByHoverRules(true);
if (e->renderer()->mouseInside())
return true;
}
break;
case CSSSelector::PseudoFocus:
selectorDynamicState |= StyleSelector::Focus;
return true;
if (e && e->focused()) {
return true;
}
break;
case CSSSelector::PseudoActive:
if ( pseudoState == PseudoUnknown )
checkPseudoState( e );
if ( pseudoState != PseudoNone ) {
selectorDynamicState |= StyleSelector::Active;
return true;
if (element == e)
style->setAffectedByActiveRules(true);
else if (e->renderer())
e->renderer()->style()->setAffectedByActiveRules(true);
if (e->active())
return true;
}
break;
case CSSSelector::PseudoBefore:
......
......@@ -85,7 +85,7 @@ namespace khtml
the virtual methods until then, so the class has no vptr.
*/
// virtual ~StyleSelector() {};
// virtual RenderStyle *styleForElement(DOM::ElementImpl *e, int = None) = 0;
// virtual RenderStyle *styleForElement(DOM::ElementImpl *e) = 0;
enum State {
None = 0x00,
......@@ -124,7 +124,7 @@ namespace khtml
static void loadDefaultStyle(const KHTMLSettings *s = 0);
static void clear();
RenderStyle *styleForElement(DOM::ElementImpl *e, int state = None );
RenderStyle *styleForElement(DOM::ElementImpl *e);
QValueList<int> fontSizes() const { return m_fontSizes; }
QValueList<int> fixedFontSizes() const { return m_fixedFontSizes; }
......@@ -212,11 +212,8 @@ public:
unsigned int pseudoPropsSize;
int dynamicState;
RenderStyle::PseudoId dynamicPseudo;
int usedDynamicStates;
int selectorDynamicState;
RenderStyle *style;
RenderStyle *parentStyle;
DOM::ElementImpl *element;
......
......@@ -115,6 +115,9 @@ bool HTMLLinkElement::disabled() const
void HTMLLinkElement::setDisabled( bool _disabled )
{
if (disabled() == _disabled)
return;
if(impl)
((ElementImpl *)impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
}
......
......@@ -1441,7 +1441,7 @@ BidiIterator RenderFlow::findNextLineBreak(BidiIterator &start, QPtrList<BidiIte
last = o;
o = Bidinext( start.par, o );
if (last->isReplaced() && last->style()->whiteSpace() != NOWRAP) {
if (!last->isSpecial() && last->isReplaced() && last->style()->whiteSpace() != NOWRAP) {
// Go ahead and add in tmpW.
w += tmpW;
tmpW = 0;
......
......@@ -85,8 +85,16 @@ void RenderBox::setStyle(RenderStyle *_style)
setRelPositioned(true);
}
if (!isTableCell() && (isPositioned() || isRelPositioned()) && !m_layer)
m_layer = new (renderArena()) RenderLayer(this);
if (requiresLayer()) {
if (!m_layer) {
m_layer = new (renderArena()) RenderLayer(this);
m_layer->insertOnlyThisLayer();
}
}
else if (m_layer && !isHtml() && !isRoot()) {
m_layer->removeOnlyThisLayer();
m_layer = 0;
}
}
RenderBox::~RenderBox()
......
......@@ -154,7 +154,6 @@ protected:
// A pointer to our layer if we have one. Currently only positioned elements
// and floaters have layers.
RenderLayer* m_layer;
bool m_hasChildLayers : 1;
};
......
......@@ -260,7 +260,8 @@ void RenderContainer::appendChildNode(RenderObject* newChild)
setLastChild(newChild);
// Keep our layer hierarchy updated.
newChild->appendLayers(enclosingLayer());
RenderLayer* layer = enclosingLayer();
newChild->addLayers(layer, findNextLayer(layer, newChild));
newChild->setMinMaxKnown( false );
newChild->setLayouted( false );
......@@ -290,9 +291,8 @@ void RenderContainer::insertChildNode(RenderObject* child, RenderObject* beforeC
child->setParent(this);
// Keep our layer hierarchy updated.
// XXX Need this to do an insertion and really find the right place to
// put the new layer. Not a big deal though. -dwh
child->appendLayers(enclosingLayer());
RenderLayer* layer = enclosingLayer();
child->addLayers(layer, findNextLayer(layer, child));
child->setMinMaxKnown( false );
child->setLayouted( false );
......
......@@ -73,9 +73,6 @@ void RenderFlow::setStyle(RenderStyle *_style)
if(isPositioned())
setInline(false);
if (!isTableCell() && (isPositioned() || isRelPositioned() || style()->overflow()==OHIDDEN) && !m_layer)
m_layer = new (renderArena()) RenderLayer(this);
if(isFloating() || style()->display() != INLINE)
setInline(false);
......@@ -484,12 +481,6 @@ void RenderFlow::layoutBlockChildren( bool relayoutChildren )
if ( relayoutChildren || floatBottom() > m_y ||
(child->isReplaced() && (child->style()->width().isPercent() || child->style()->height().isPercent())))
child->setLayouted(false);
if ( child->style()->flowAroundFloats() && !child->isFloating() &&
style()->width().isFixed() && child->minWidth() > lineWidth( m_height ) ) {
m_height = QMAX( m_height, floatBottom() );
shouldCollapseChild = false;
clearOccurred = true;
}
// kdDebug( 6040 ) << " " << child->renderName() << " loop " << child << ", " << child->isInline() << ", " << child->layouted() << endl;
// kdDebug( 6040 ) << t.elapsed() << endl;
......@@ -525,6 +516,16 @@ void RenderFlow::layoutBlockChildren( bool relayoutChildren )
continue;
}
// Note this occurs after the test for positioning and floating above, since
// we want to ensure that we don't artificially increase our height because of
// a positioned or floating child.
if ( child->style()->flowAroundFloats() && !child->isFloating() &&
style()->width().isFixed() && child->minWidth() > lineWidth( m_height ) ) {
m_height = QMAX( m_height, floatBottom() );
shouldCollapseChild = false;
clearOccurred = true;
}
child->calcVerticalMargins();
//kdDebug(0) << "margin = " << margin << " yPos = " << m_height << endl;
......
......@@ -96,7 +96,10 @@ public:
int tx, int ty, int paintPhase);
void paintFloats(QPainter *p, int _x, int _y,
int _w, int _h, int _tx, int _ty);
virtual bool requiresLayer() { return !isTableCell() &&
(isPositioned() || isRelPositioned() || style()->overflow()==OHIDDEN); }
virtual void layout( );
virtual void close();
......
......@@ -144,18 +144,23 @@ void RenderLayer::detach(RenderArena* renderArena)
renderArena->free(*(size_t *)this, this);
}
void RenderLayer::addChild(RenderLayer *child)
void RenderLayer::addChild(RenderLayer *child, RenderLayer* beforeChild)
{
if (!firstChild()) {
setFirstChild(child);
setLastChild(child);
} else {
RenderLayer* last = lastChild();
setLastChild(child);
child->setPreviousSibling(last);
last->setNextSibling(child);
RenderLayer* prevSibling = beforeChild ? beforeChild->previousSibling() : lastChild();
if (prevSibling) {
child->setPreviousSibling(prevSibling);
prevSibling->setNextSibling(child);
}
else
setFirstChild(child);
if (beforeChild) {
beforeChild->setPreviousSibling(child);
child->setNextSibling(beforeChild);
}
else
setLastChild(child);
child->setParent(this);
}
......@@ -179,6 +184,44 @@ RenderLayer* RenderLayer::removeChild(RenderLayer* oldChild)
return oldChild;
}
void RenderLayer::removeOnlyThisLayer()
{
if (!m_parent)
return;
// Remove us from the parent.
RenderLayer* parent = m_parent;
RenderLayer* nextSib = nextSibling();
parent->removeChild(this);
// Now walk our kids and reattach them to our parent.
RenderLayer* current = m_first;
while (current) {
RenderLayer* next = current->nextSibling();
removeChild(current);
parent->addChild(current, nextSib);
current = next;
}
detach(renderer()->renderArena());
}
void RenderLayer::insertOnlyThisLayer()
{
if (!m_parent && renderer()->parent()) {
// We need to connect ourselves when our renderer() has a parent.
// Find our enclosingLayer and add ourselves.
RenderLayer* parentLayer = renderer()->parent()->enclosingLayer();
if (parentLayer)
parentLayer->addChild(this,
renderer()->parent()->findNextLayer(parentLayer, renderer()));
}
// Remove all descendant layers from the hierarchy and add them to the new position.
for (RenderObject* curr = renderer()->firstChild(); curr; curr = curr->nextSibling())
curr->moveLayers(m_parent, this);
}
void
RenderLayer::convertToLayerCoords(RenderLayer* ancestorLayer, int& x, int& y)
{
......@@ -314,10 +357,44 @@ RenderLayer::paint(QPainter *p, int x, int y, int w, int h)
node->detach(renderer()->renderArena());
}
void
RenderLayer::clearOtherLayersHoverActiveState()
{
if (!m_parent)
return;
for (RenderLayer* curr = m_parent->firstChild(); curr; curr = curr->nextSibling()) {
if (curr == this)
continue;
curr->clearHoverAndActiveState(curr->renderer());
}
m_parent->clearOtherLayersHoverActiveState();
}
void
RenderLayer::clearHoverAndActiveState(RenderObject* obj)
{
if (!obj->mouseInside())
return;
obj->setMouseInside(false);
if (obj->element()) {
obj->element()->setActive(false);
if (obj->style()->affectedByHoverRules() || obj->style()->affectedByActiveRules())
obj->element()->setChanged(true);
}
for (RenderObject* child = obj->firstChild(); child; child = child->nextSibling())
if (child->mouseInside())
clearHoverAndActiveState(child);
}
bool
RenderLayer::nodeAtPoint(RenderObject::NodeInfo& info, int x, int y)
{
bool inside = false;
RenderLayer* insideLayer = 0;
QRect damageRect(m_x, m_y, m_width, m_height);
RenderZTreeNode* node = constructZTree(damageRect, damageRect, this, true, x, y);
if (!node)
......@@ -341,11 +418,23 @@ RenderLayer::nodeAtPoint(RenderObject::NodeInfo& info, int x, int y)
inside = elt->layer->renderer()->nodeAtPoint(info, x, y,
elt->absBounds.x() - elt->layer->renderer()->xPos(),
elt->absBounds.y() - elt->layer->renderer()->yPos());
if (inside)
if (inside) {
insideLayer = elt->layer;
break;
}
}
node->detach(renderer()->renderArena());
if (insideLayer) {
// Clear out the other layers' hover/active state
insideLayer->clearOtherLayersHoverActiveState();