OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. |
8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1383 activeAnimations->setAnimationStyleChange(false); | 1383 activeAnimations->setAnimationStyleChange(false); |
1384 } | 1384 } |
1385 } | 1385 } |
1386 } | 1386 } |
1387 | 1387 |
1388 void Element::detach(const AttachContext& context) | 1388 void Element::detach(const AttachContext& context) |
1389 { | 1389 { |
1390 HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates; | 1390 HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates; |
1391 cancelFocusAppearanceUpdate(); | 1391 cancelFocusAppearanceUpdate(); |
1392 removeCallbackSelectors(); | 1392 removeCallbackSelectors(); |
1393 if (svgFilterNeedsLayerUpdate()) | 1393 if (svgEffectsNeedLayerUpdate()) |
1394 document().unscheduleSVGFilterLayerUpdateHack(*this); | 1394 document().unscheduleSVGEffectsLayerUpdateHack(*this); |
1395 if (hasRareData()) { | 1395 if (hasRareData()) { |
1396 ElementRareData* data = elementRareData(); | 1396 ElementRareData* data = elementRareData(); |
1397 data->clearPseudoElements(); | 1397 data->clearPseudoElements(); |
1398 | 1398 |
1399 // attach() will perform the below steps for us when inside recalcStyle. | 1399 // attach() will perform the below steps for us when inside recalcStyle. |
1400 if (!document().inStyleRecalc()) { | 1400 if (!document().inStyleRecalc()) { |
1401 data->resetStyleState(); | 1401 data->resetStyleState(); |
1402 data->clearComputedStyle(); | 1402 data->clearComputedStyle(); |
1403 } | 1403 } |
1404 | 1404 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1557 return Reattach; | 1557 return Reattach; |
1558 return ReattachNoRenderer; | 1558 return ReattachNoRenderer; |
1559 } | 1559 } |
1560 | 1560 |
1561 ASSERT(oldStyle); | 1561 ASSERT(oldStyle); |
1562 | 1562 |
1563 if (localChange != NoChange) | 1563 if (localChange != NoChange) |
1564 updateCallbackSelectors(oldStyle.get(), newStyle.get()); | 1564 updateCallbackSelectors(oldStyle.get(), newStyle.get()); |
1565 | 1565 |
1566 if (RenderObject* renderer = this->renderer()) { | 1566 if (RenderObject* renderer = this->renderer()) { |
1567 if (localChange != NoChange || pseudoStyleCacheIsInvalid(oldStyle.get(),
newStyle.get()) || svgFilterNeedsLayerUpdate()) { | 1567 if (localChange != NoChange || pseudoStyleCacheIsInvalid(oldStyle.get(),
newStyle.get()) || svgEffectsNeedLayerUpdate()) { |
1568 renderer->setStyle(newStyle.get()); | 1568 renderer->setStyle(newStyle.get()); |
1569 } else { | 1569 } else { |
1570 // Although no change occurred, we use the new style so that the cou
sin style sharing code won't get | 1570 // Although no change occurred, we use the new style so that the cou
sin style sharing code won't get |
1571 // fooled into believing this style is the same. | 1571 // fooled into believing this style is the same. |
1572 // FIXME: We may be able to remove this hack, see discussion in | 1572 // FIXME: We may be able to remove this hack, see discussion in |
1573 // https://codereview.chromium.org/30453002/ | 1573 // https://codereview.chromium.org/30453002/ |
1574 renderer->setStyleInternal(newStyle.get()); | 1574 renderer->setStyleInternal(newStyle.get()); |
1575 } | 1575 } |
1576 } | 1576 } |
1577 | 1577 |
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2954 } else if (type == SelectOptions) { | 2954 } else if (type == SelectOptions) { |
2955 ASSERT(isHTMLSelectElement(this)); | 2955 ASSERT(isHTMLSelectElement(this)); |
2956 return ensureRareData().ensureNodeLists().addCache<HTMLOptionsCollection
>(*this, type); | 2956 return ensureRareData().ensureNodeLists().addCache<HTMLOptionsCollection
>(*this, type); |
2957 } else if (type == FormControls) { | 2957 } else if (type == FormControls) { |
2958 ASSERT(isHTMLFormElement(this) || isHTMLFieldSetElement(this)); | 2958 ASSERT(isHTMLFormElement(this) || isHTMLFieldSetElement(this)); |
2959 return ensureRareData().ensureNodeLists().addCache<HTMLFormControlsColle
ction>(*this, type); | 2959 return ensureRareData().ensureNodeLists().addCache<HTMLFormControlsColle
ction>(*this, type); |
2960 } | 2960 } |
2961 return ensureRareData().ensureNodeLists().addCache<HTMLCollection>(*this, ty
pe); | 2961 return ensureRareData().ensureNodeLists().addCache<HTMLCollection>(*this, ty
pe); |
2962 } | 2962 } |
2963 | 2963 |
2964 void Element::scheduleSVGFilterLayerUpdateHack() | 2964 void Element::scheduleSVGEffectsLayerUpdateHack() |
2965 { | 2965 { |
2966 document().scheduleSVGFilterLayerUpdateHack(*this); | 2966 document().scheduleSVGEffectsLayerUpdateHack(*this); |
2967 } | 2967 } |
2968 | 2968 |
2969 HTMLCollection* Element::cachedHTMLCollection(CollectionType type) | 2969 HTMLCollection* Element::cachedHTMLCollection(CollectionType type) |
2970 { | 2970 { |
2971 return hasRareData() && rareData()->nodeLists() ? rareData()->nodeLists()->c
ached<HTMLCollection>(type) : 0; | 2971 return hasRareData() && rareData()->nodeLists() ? rareData()->nodeLists()->c
ached<HTMLCollection>(type) : 0; |
2972 } | 2972 } |
2973 | 2973 |
2974 IntSize Element::savedLayerScrollOffset() const | 2974 IntSize Element::savedLayerScrollOffset() const |
2975 { | 2975 { |
2976 return hasRareData() ? elementRareData()->savedLayerScrollOffset() : IntSize
(); | 2976 return hasRareData() ? elementRareData()->savedLayerScrollOffset() : IntSize
(); |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3335 { | 3335 { |
3336 #if ENABLE(OILPAN) | 3336 #if ENABLE(OILPAN) |
3337 if (hasRareData()) | 3337 if (hasRareData()) |
3338 visitor->trace(elementRareData()); | 3338 visitor->trace(elementRareData()); |
3339 visitor->trace(m_elementData); | 3339 visitor->trace(m_elementData); |
3340 #endif | 3340 #endif |
3341 ContainerNode::trace(visitor); | 3341 ContainerNode::trace(visitor); |
3342 } | 3342 } |
3343 | 3343 |
3344 } // namespace blink | 3344 } // namespace blink |
OLD | NEW |