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 1923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1934 if (!layoutObject) | 1934 if (!layoutObject) |
1935 return; | 1935 return; |
1936 if (!layoutObject->hasLayer()) | 1936 if (!layoutObject->hasLayer()) |
1937 return; | 1937 return; |
1938 layoutObject->layer()->setNeedsCompositingInputsUpdate(); | 1938 layoutObject->layer()->setNeedsCompositingInputsUpdate(); |
1939 // Changes in the return value of requiresAcceleratedCompositing change if | 1939 // Changes in the return value of requiresAcceleratedCompositing change if |
1940 // the PaintLayer is self-painting. | 1940 // the PaintLayer is self-painting. |
1941 layoutObject->layer()->updateSelfPaintingLayer(); | 1941 layoutObject->layer()->updateSelfPaintingLayer(); |
1942 } | 1942 } |
1943 | 1943 |
1944 void Element::setCustomElementDefinition(V0CustomElementDefinition* definition) | 1944 void Element::v0SetCustomElementDefinition(V0CustomElementDefinition* definition
) |
1945 { | 1945 { |
1946 if (!hasRareData() && !definition) | 1946 if (!hasRareData() && !definition) |
1947 return; | 1947 return; |
| 1948 DCHECK(!v0CustomElementDefinition()); |
| 1949 ensureElementRareData().v0SetCustomElementDefinition(definition); |
| 1950 } |
| 1951 |
| 1952 V0CustomElementDefinition* Element::v0CustomElementDefinition() const |
| 1953 { |
| 1954 if (hasRareData()) |
| 1955 return elementRareData()->v0CustomElementDefinition(); |
| 1956 return nullptr; |
| 1957 } |
| 1958 |
| 1959 void Element::setCustomElementDefinition(CustomElementDefinition* definition) |
| 1960 { |
| 1961 DCHECK(definition); |
1948 DCHECK(!customElementDefinition()); | 1962 DCHECK(!customElementDefinition()); |
1949 ensureElementRareData().setCustomElementDefinition(definition); | 1963 ensureElementRareData().setCustomElementDefinition(definition); |
| 1964 this->setCustomElementState(CustomElementState::Custom); |
1950 } | 1965 } |
1951 | 1966 |
1952 V0CustomElementDefinition* Element::customElementDefinition() const | 1967 CustomElementDefinition* Element::customElementDefinition() const |
1953 { | 1968 { |
1954 if (hasRareData()) | 1969 if (hasRareData()) |
1955 return elementRareData()->customElementDefinition(); | 1970 return elementRareData()->customElementDefinition(); |
1956 return nullptr; | 1971 return nullptr; |
1957 } | 1972 } |
1958 | 1973 |
1959 ShadowRoot* Element::createShadowRoot(const ScriptState* scriptState, ExceptionS
tate& exceptionState) | 1974 ShadowRoot* Element::createShadowRoot(const ScriptState* scriptState, ExceptionS
tate& exceptionState) |
1960 { | 1975 { |
1961 HostsUsingFeatures::countMainWorldOnly(scriptState, document(), HostsUsingFe
atures::Feature::ElementCreateShadowRoot); | 1976 HostsUsingFeatures::countMainWorldOnly(scriptState, document(), HostsUsingFe
atures::Feature::ElementCreateShadowRoot); |
1962 if (ShadowRoot* root = shadowRoot()) { | 1977 if (ShadowRoot* root = shadowRoot()) { |
(...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3795 | 3810 |
3796 DEFINE_TRACE_WRAPPERS(Element) | 3811 DEFINE_TRACE_WRAPPERS(Element) |
3797 { | 3812 { |
3798 if (hasRareData()) { | 3813 if (hasRareData()) { |
3799 visitor->traceWrappers(elementRareData()); | 3814 visitor->traceWrappers(elementRareData()); |
3800 } | 3815 } |
3801 ContainerNode::traceWrappers(visitor); | 3816 ContainerNode::traceWrappers(visitor); |
3802 } | 3817 } |
3803 | 3818 |
3804 } // namespace blink | 3819 } // namespace blink |
OLD | NEW |