flutter_flutter/sky/engine/core/dom/ElementRareData.h
Adam Barth b379439e37 Remove some unused dart:sky IDLs
This CL deletes a bunch of unused IDL files and removes some dead code in the
engine.
2015-09-02 00:09:43 -07:00

64 lines
2.0 KiB
C++

/*
* Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved.
* Copyright (C) 2008 David Smith <catfish.man@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#ifndef SKY_ENGINE_CORE_DOM_ELEMENTRAREDATA_H_
#define SKY_ENGINE_CORE_DOM_ELEMENTRAREDATA_H_
#include "sky/engine/core/css/PropertySetCSSStyleDeclaration.h"
#include "sky/engine/core/dom/NodeRareData.h"
#include "sky/engine/core/rendering/style/StyleInheritedData.h"
#include "sky/engine/wtf/OwnPtr.h"
namespace blink {
class HTMLElement;
class ElementRareData : public NodeRareData {
public:
static ElementRareData* create(RenderObject* renderer)
{
return new ElementRareData(renderer);
}
CSSStyleDeclaration& ensureInlineCSSStyleDeclaration(Element* ownerElement);
RenderStyle* computedStyle() const { return m_computedStyle.get(); }
void setComputedStyle(PassRefPtr<RenderStyle> computedStyle) { m_computedStyle = computedStyle; }
void clearComputedStyle() { m_computedStyle = nullptr; }
private:
OwnPtr<InlineCSSStyleDeclaration> m_cssomWrapper;
RefPtr<RenderStyle> m_computedStyle;
explicit ElementRareData(RenderObject*);
};
inline ElementRareData::ElementRareData(RenderObject* renderer)
: NodeRareData(renderer)
{
m_isElementRareData = true;
}
} // namespace
#endif // SKY_ENGINE_CORE_DOM_ELEMENTRAREDATA_H_