Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(515)

Side by Side Diff: sky/engine/core/dom/Element.h

Issue 1051713007: Revert "First iteration on custom layout." (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/core/core.gni ('k') | sky/engine/core/dom/Element.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 * Copyright (C) 2003-2011, 2013, 2014 Apple Inc. All rights reserved. 6 * Copyright (C) 2003-2011, 2013, 2014 Apple Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 class CSSStyleDeclaration; 43 class CSSStyleDeclaration;
44 class ClientRect; 44 class ClientRect;
45 class ClientRectList; 45 class ClientRectList;
46 class DOMTokenList; 46 class DOMTokenList;
47 class Document; 47 class Document;
48 class ElementRareData; 48 class ElementRareData;
49 class ElementShadow; 49 class ElementShadow;
50 class ExceptionState; 50 class ExceptionState;
51 class Image; 51 class Image;
52 class IntSize; 52 class IntSize;
53 class LayoutCallback;
54 class MutableStylePropertySet; 53 class MutableStylePropertySet;
55 class PaintingCallback; 54 class PaintingCallback;
56 class PropertySetCSSStyleDeclaration; 55 class PropertySetCSSStyleDeclaration;
57 class PseudoElement; 56 class PseudoElement;
58 class ShadowRoot; 57 class ShadowRoot;
59 class StylePropertySet; 58 class StylePropertySet;
60 59
61 enum SpellcheckAttributeState { 60 enum SpellcheckAttributeState {
62 SpellcheckAttributeTrue, 61 SpellcheckAttributeTrue,
63 SpellcheckAttributeFalse, 62 SpellcheckAttributeFalse,
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 void setAnimationStyleChange(bool); 194 void setAnimationStyleChange(bool);
196 void setNeedsAnimationStyleRecalc(); 195 void setNeedsAnimationStyleRecalc();
197 196
198 bool supportsStyleSharing() const; 197 bool supportsStyleSharing() const;
199 198
200 ElementShadow* shadow() const; 199 ElementShadow* shadow() const;
201 ElementShadow& ensureShadow(); 200 ElementShadow& ensureShadow();
202 PassRefPtr<ShadowRoot> ensureShadowRoot(ExceptionState&); 201 PassRefPtr<ShadowRoot> ensureShadowRoot(ExceptionState&);
203 ShadowRoot* shadowRoot() const; 202 ShadowRoot* shadowRoot() const;
204 203
205 double x() const;
206 void setX(double);
207
208 double y() const;
209 void setY(double);
210
211 double width() const;
212 void setWidth(double);
213
214 double height() const;
215 void setHeight(double);
216
217 bool hasAuthorShadowRoot() const { return shadowRoot(); } 204 bool hasAuthorShadowRoot() const { return shadowRoot(); }
218 205
219 LayoutCallback* layoutManager() const;
220 void setLayoutManager(PassOwnPtr<LayoutCallback>);
221
222 RenderStyle* computedStyle(); 206 RenderStyle* computedStyle();
223 207
224 bool isUpgradedCustomElement() const { return customElementState() == Upgrad ed; } 208 bool isUpgradedCustomElement() const { return customElementState() == Upgrad ed; }
225 bool isUnresolvedCustomElement() const { return customElementState() == Wait ingForUpgrade; } 209 bool isUnresolvedCustomElement() const { return customElementState() == Wait ingForUpgrade; }
226 210
227 AtomicString computeInheritedLanguage() const; 211 AtomicString computeInheritedLanguage() const;
228 212
229 virtual bool isURLAttribute(const Attribute&) const { return false; } 213 virtual bool isURLAttribute(const Attribute&) const { return false; }
230 214
231 virtual bool isLiveLink() const { return false; } 215 virtual bool isLiveLink() const { return false; }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 SpellcheckAttributeState spellcheckAttributeState() const; 344 SpellcheckAttributeState spellcheckAttributeState() const;
361 345
362 void createUniqueElementData(); 346 void createUniqueElementData();
363 347
364 bool shouldInvalidateDistributionWhenAttributeChanged(ElementShadow*, const QualifiedName&, const AtomicString&); 348 bool shouldInvalidateDistributionWhenAttributeChanged(ElementShadow*, const QualifiedName&, const AtomicString&);
365 349
366 ElementRareData* elementRareData() const; 350 ElementRareData* elementRareData() const;
367 ElementRareData& ensureElementRareData(); 351 ElementRareData& ensureElementRareData();
368 352
369 RefPtr<ElementData> m_elementData; 353 RefPtr<ElementData> m_elementData;
370 OwnPtr<LayoutCallback> m_layoutManager;
371 }; 354 };
372 355
373 DEFINE_NODE_TYPE_CASTS(Element, isElementNode()); 356 DEFINE_NODE_TYPE_CASTS(Element, isElementNode());
374 template <typename T> bool isElementOfType(const Node&); 357 template <typename T> bool isElementOfType(const Node&);
375 template <> inline bool isElementOfType<const Element>(const Node& node) { retur n node.isElementNode(); } 358 template <> inline bool isElementOfType<const Element>(const Node& node) { retur n node.isElementNode(); }
376 template <typename T> inline bool isElementOfType(const Element& element) { retu rn isElementOfType<T>(static_cast<const Node&>(element)); } 359 template <typename T> inline bool isElementOfType(const Element& element) { retu rn isElementOfType<T>(static_cast<const Node&>(element)); }
377 template <> inline bool isElementOfType<const Element>(const Element&) { return true; } 360 template <> inline bool isElementOfType<const Element>(const Element&) { return true; }
378 361
379 // Type casting. 362 // Type casting.
380 template<typename T> inline T& toElement(Node& node) 363 template<typename T> inline T& toElement(Node& node)
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 static PassRefPtr<T> create(const QualifiedName&, Document&) 556 static PassRefPtr<T> create(const QualifiedName&, Document&)
574 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 557 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
575 PassRefPtr<T> T::create(const QualifiedName& tagName, Document& document) \ 558 PassRefPtr<T> T::create(const QualifiedName& tagName, Document& document) \
576 { \ 559 { \
577 return adoptRef(new T(tagName, document)); \ 560 return adoptRef(new T(tagName, document)); \
578 } 561 }
579 562
580 } // namespace 563 } // namespace
581 564
582 #endif // SKY_ENGINE_CORE_DOM_ELEMENT_H_ 565 #endif // SKY_ENGINE_CORE_DOM_ELEMENT_H_
OLDNEW
« no previous file with comments | « sky/engine/core/core.gni ('k') | sky/engine/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698