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 2927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2938 if (!document().isHTMLDocument()) | 2938 if (!document().isHTMLDocument()) |
2939 return; | 2939 return; |
2940 | 2940 |
2941 if (!oldId.isEmpty()) | 2941 if (!oldId.isEmpty()) |
2942 toHTMLDocument(document()).removeExtraNamedItem(oldId); | 2942 toHTMLDocument(document()).removeExtraNamedItem(oldId); |
2943 | 2943 |
2944 if (!newId.isEmpty()) | 2944 if (!newId.isEmpty()) |
2945 toHTMLDocument(document()).addExtraNamedItem(newId); | 2945 toHTMLDocument(document()).addExtraNamedItem(newId); |
2946 } | 2946 } |
2947 | 2947 |
2948 PassRefPtrWillBeRawPtr<HTMLCollection> Element::ensureCachedHTMLCollection(Colle
ctionType type) | |
2949 { | |
2950 if (HTMLCollection* collection = cachedHTMLCollection(type)) | |
2951 return collection; | |
2952 | |
2953 if (type == TableRows) { | |
2954 ASSERT(isHTMLTableElement(this)); | |
2955 return ensureRareData().ensureNodeLists().addCache<HTMLTableRowsCollecti
on>(*this, type); | |
2956 } else if (type == SelectOptions) { | |
2957 ASSERT(isHTMLSelectElement(this)); | |
2958 return ensureRareData().ensureNodeLists().addCache<HTMLOptionsCollection
>(*this, type); | |
2959 } else if (type == FormControls) { | |
2960 ASSERT(isHTMLFormElement(this) || isHTMLFieldSetElement(this)); | |
2961 return ensureRareData().ensureNodeLists().addCache<HTMLFormControlsColle
ction>(*this, type); | |
2962 } | |
2963 return ensureRareData().ensureNodeLists().addCache<HTMLCollection>(*this, ty
pe); | |
2964 } | |
2965 | |
2966 void Element::scheduleSVGFilterLayerUpdateHack() | 2948 void Element::scheduleSVGFilterLayerUpdateHack() |
2967 { | 2949 { |
2968 document().scheduleSVGFilterLayerUpdateHack(*this); | 2950 document().scheduleSVGFilterLayerUpdateHack(*this); |
2969 } | 2951 } |
2970 | 2952 |
2971 HTMLCollection* Element::cachedHTMLCollection(CollectionType type) | |
2972 { | |
2973 return hasRareData() && rareData()->nodeLists() ? rareData()->nodeLists()->c
ached<HTMLCollection>(type) : 0; | |
2974 } | |
2975 | |
2976 IntSize Element::savedLayerScrollOffset() const | 2953 IntSize Element::savedLayerScrollOffset() const |
2977 { | 2954 { |
2978 return hasRareData() ? elementRareData()->savedLayerScrollOffset() : IntSize
(); | 2955 return hasRareData() ? elementRareData()->savedLayerScrollOffset() : IntSize
(); |
2979 } | 2956 } |
2980 | 2957 |
2981 void Element::setSavedLayerScrollOffset(const IntSize& size) | 2958 void Element::setSavedLayerScrollOffset(const IntSize& size) |
2982 { | 2959 { |
2983 if (size.isZero() && !hasRareData()) | 2960 if (size.isZero() && !hasRareData()) |
2984 return; | 2961 return; |
2985 ensureElementRareData().setSavedLayerScrollOffset(size); | 2962 ensureElementRareData().setSavedLayerScrollOffset(size); |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3337 { | 3314 { |
3338 #if ENABLE(OILPAN) | 3315 #if ENABLE(OILPAN) |
3339 if (hasRareData()) | 3316 if (hasRareData()) |
3340 visitor->trace(elementRareData()); | 3317 visitor->trace(elementRareData()); |
3341 visitor->trace(m_elementData); | 3318 visitor->trace(m_elementData); |
3342 #endif | 3319 #endif |
3343 ContainerNode::trace(visitor); | 3320 ContainerNode::trace(visitor); |
3344 } | 3321 } |
3345 | 3322 |
3346 } // namespace blink | 3323 } // namespace blink |
OLD | NEW |