Chromium Code Reviews| 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 { | |
| 1946 if (!hasRareData() && !definition) | |
| 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) | |
|
davaajav
2016/08/03 11:31:14
I am not sure about not allowing setting the defin
| |
| 1945 { | 1960 { |
| 1946 if (!hasRareData() && !definition) | 1961 if (!hasRareData() && !definition) |
| 1947 return; | 1962 return; |
| 1948 DCHECK(!customElementDefinition()); | 1963 DCHECK(!customElementDefinition()); |
| 1949 ensureElementRareData().setCustomElementDefinition(definition); | 1964 ensureElementRareData().setCustomElementDefinition(definition); |
| 1965 this->setCustomElementState(CustomElementState::Custom); | |
| 1950 } | 1966 } |
| 1951 | 1967 |
| 1952 V0CustomElementDefinition* Element::customElementDefinition() const | 1968 CustomElementDefinition* Element::customElementDefinition() const |
| 1953 { | 1969 { |
| 1954 if (hasRareData()) | 1970 if (hasRareData()) |
| 1955 return elementRareData()->customElementDefinition(); | 1971 return elementRareData()->customElementDefinition(); |
| 1956 return nullptr; | 1972 return nullptr; |
| 1957 } | 1973 } |
| 1958 | 1974 |
| 1959 ShadowRoot* Element::createShadowRoot(const ScriptState* scriptState, ExceptionS tate& exceptionState) | 1975 ShadowRoot* Element::createShadowRoot(const ScriptState* scriptState, ExceptionS tate& exceptionState) |
| 1960 { | 1976 { |
| 1961 HostsUsingFeatures::countMainWorldOnly(scriptState, document(), HostsUsingFe atures::Feature::ElementCreateShadowRoot); | 1977 HostsUsingFeatures::countMainWorldOnly(scriptState, document(), HostsUsingFe atures::Feature::ElementCreateShadowRoot); |
| 1962 if (ShadowRoot* root = shadowRoot()) { | 1978 if (ShadowRoot* root = shadowRoot()) { |
| (...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3795 | 3811 |
| 3796 DEFINE_TRACE_WRAPPERS(Element) | 3812 DEFINE_TRACE_WRAPPERS(Element) |
| 3797 { | 3813 { |
| 3798 if (hasRareData()) { | 3814 if (hasRareData()) { |
| 3799 visitor->traceWrappers(elementRareData()); | 3815 visitor->traceWrappers(elementRareData()); |
| 3800 } | 3816 } |
| 3801 ContainerNode::traceWrappers(visitor); | 3817 ContainerNode::traceWrappers(visitor); |
| 3802 } | 3818 } |
| 3803 | 3819 |
| 3804 } // namespace blink | 3820 } // namespace blink |
| OLD | NEW |