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 2869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2880 if (!hasRareData() && size == defaultMinimumSizeForResizing()) | 2880 if (!hasRareData() && size == defaultMinimumSizeForResizing()) |
2881 return; | 2881 return; |
2882 ensureElementRareData().setMinimumSizeForResizing(size); | 2882 ensureElementRareData().setMinimumSizeForResizing(size); |
2883 } | 2883 } |
2884 | 2884 |
2885 const ComputedStyle* Element::ensureComputedStyle(PseudoId pseudoElementSpecifie r) | 2885 const ComputedStyle* Element::ensureComputedStyle(PseudoId pseudoElementSpecifie r) |
2886 { | 2886 { |
2887 if (PseudoElement* element = pseudoElement(pseudoElementSpecifier)) | 2887 if (PseudoElement* element = pseudoElement(pseudoElementSpecifier)) |
2888 return element->ensureComputedStyle(); | 2888 return element->ensureComputedStyle(); |
2889 | 2889 |
2890 if (!inActiveDocument()) { | 2890 if (!inActiveDocument() && document().frame()) { |
esprehn
2016/09/26 22:23:37
This is not correct, it means we don't return null
| |
2891 // FIXME: Try to do better than this. Ensure that styleForElement() work s for elements that are not in the | 2891 // FIXME: Try to do better than this. Ensure that styleForElement() work s for elements that are not in the |
2892 // document tree and figure out when to destroy the computed style for s uch elements. | 2892 // document tree and figure out when to destroy the computed style for s uch elements. |
2893 return nullptr; | 2893 return nullptr; |
2894 } | 2894 } |
2895 | 2895 |
2896 // FIXME: Find and use the layoutObject from the pseudo element instead of t he actual element so that the 'length' | 2896 // FIXME: Find and use the layoutObject from the pseudo element instead of t he actual element so that the 'length' |
2897 // properties, which are only known by the layoutObject because it did the l ayout, will be correct and so that the | 2897 // properties, which are only known by the layoutObject because it did the l ayout, will be correct and so that the |
2898 // values returned for the ":selection" pseudo-element will be correct. | 2898 // values returned for the ":selection" pseudo-element will be correct. |
2899 ComputedStyle* elementStyle = mutableComputedStyle(); | 2899 ComputedStyle* elementStyle = mutableComputedStyle(); |
2900 if (!elementStyle) { | 2900 if (!elementStyle) { |
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3826 | 3826 |
3827 DEFINE_TRACE_WRAPPERS(Element) | 3827 DEFINE_TRACE_WRAPPERS(Element) |
3828 { | 3828 { |
3829 if (hasRareData()) { | 3829 if (hasRareData()) { |
3830 visitor->traceWrappers(elementRareData()); | 3830 visitor->traceWrappers(elementRareData()); |
3831 } | 3831 } |
3832 ContainerNode::traceWrappers(visitor); | 3832 ContainerNode::traceWrappers(visitor); |
3833 } | 3833 } |
3834 | 3834 |
3835 } // namespace blink | 3835 } // namespace blink |
OLD | NEW |