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

Side by Side Diff: Source/core/dom/Element.h

Issue 540533004: Use style invalidation for more pseudo classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 years, 3 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
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 10 matching lines...) Expand all
21 * Boston, MA 02110-1301, USA. 21 * Boston, MA 02110-1301, USA.
22 * 22 *
23 */ 23 */
24 24
25 #ifndef Element_h 25 #ifndef Element_h
26 #define Element_h 26 #define Element_h
27 27
28 #include "core/CSSPropertyNames.h" 28 #include "core/CSSPropertyNames.h"
29 #include "core/HTMLNames.h" 29 #include "core/HTMLNames.h"
30 #include "core/css/CSSPrimitiveValue.h" 30 #include "core/css/CSSPrimitiveValue.h"
31 #include "core/css/CSSSelector.h"
31 #include "core/dom/Attribute.h" 32 #include "core/dom/Attribute.h"
32 #include "core/dom/ContainerNode.h" 33 #include "core/dom/ContainerNode.h"
33 #include "core/dom/ElementData.h" 34 #include "core/dom/ElementData.h"
34 #include "core/dom/SpaceSplitString.h" 35 #include "core/dom/SpaceSplitString.h"
35 #include "core/html/CollectionType.h" 36 #include "core/html/CollectionType.h"
36 #include "core/page/FocusType.h" 37 #include "core/page/FocusType.h"
37 #include "platform/heap/Handle.h" 38 #include "platform/heap/Handle.h"
38 39
39 namespace blink { 40 namespace blink {
40 41
(...skipping 13 matching lines...) Expand all
54 class Image; 55 class Image;
55 class InputMethodContext; 56 class InputMethodContext;
56 class IntSize; 57 class IntSize;
57 class Locale; 58 class Locale;
58 class MutableStylePropertySet; 59 class MutableStylePropertySet;
59 class PropertySetCSSStyleDeclaration; 60 class PropertySetCSSStyleDeclaration;
60 class PseudoElement; 61 class PseudoElement;
61 class ShadowRoot; 62 class ShadowRoot;
62 class StylePropertySet; 63 class StylePropertySet;
63 64
64 enum AffectedSelectorType {
65 AffectedSelectorChecked = 1,
66 AffectedSelectorEnabled = 1 << 1,
67 AffectedSelectorDisabled = 1 << 2,
68 AffectedSelectorIndeterminate = 1 << 3,
69 AffectedSelectorLink = 1 << 4,
70 AffectedSelectorTarget = 1 << 5,
71 AffectedSelectorVisited = 1 << 6
72 };
73 typedef int AffectedSelectorMask;
74
75 enum SpellcheckAttributeState { 65 enum SpellcheckAttributeState {
76 SpellcheckAttributeTrue, 66 SpellcheckAttributeTrue,
77 SpellcheckAttributeFalse, 67 SpellcheckAttributeFalse,
78 SpellcheckAttributeDefault 68 SpellcheckAttributeDefault
79 }; 69 };
80 70
81 enum ElementFlags { 71 enum ElementFlags {
82 TabIndexWasSetExplicitly = 1 << 0, 72 TabIndexWasSetExplicitly = 1 << 0,
83 StyleAffectedByEmpty = 1 << 1, 73 StyleAffectedByEmpty = 1 << 1,
84 IsInCanvasSubtree = 1 << 2, 74 IsInCanvasSubtree = 1 << 2,
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 297
308 bool hasEquivalentAttributes(const Element* other) const; 298 bool hasEquivalentAttributes(const Element* other) const;
309 299
310 virtual void copyNonAttributePropertiesFromElement(const Element&) { } 300 virtual void copyNonAttributePropertiesFromElement(const Element&) { }
311 301
312 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; 302 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE;
313 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE; 303 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE;
314 virtual RenderObject* createRenderer(RenderStyle*); 304 virtual RenderObject* createRenderer(RenderStyle*);
315 virtual bool rendererIsNeeded(const RenderStyle&); 305 virtual bool rendererIsNeeded(const RenderStyle&);
316 void recalcStyle(StyleRecalcChange, Text* nextTextSibling = 0); 306 void recalcStyle(StyleRecalcChange, Text* nextTextSibling = 0);
317 void didAffectSelector(AffectedSelectorMask); 307 void pseudoStateChanged(CSSSelector::PseudoType);
318 void setAnimationStyleChange(bool); 308 void setAnimationStyleChange(bool);
319 void setNeedsAnimationStyleRecalc(); 309 void setNeedsAnimationStyleRecalc();
320 310
321 void setNeedsCompositingUpdate(); 311 void setNeedsCompositingUpdate();
322 312
323 bool supportsStyleSharing() const; 313 bool supportsStyleSharing() const;
324 314
325 ElementShadow* shadow() const; 315 ElementShadow* shadow() const;
326 ElementShadow& ensureShadow(); 316 ElementShadow& ensureShadow();
327 PassRefPtrWillBeRawPtr<ShadowRoot> createShadowRoot(ExceptionState&); 317 PassRefPtrWillBeRawPtr<ShadowRoot> createShadowRoot(ExceptionState&);
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) 858 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&)
869 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 859 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
870 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \ 860 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \
871 { \ 861 { \
872 return adoptRefWillBeNoop(new T(tagName, document)); \ 862 return adoptRefWillBeNoop(new T(tagName, document)); \
873 } 863 }
874 864
875 } // namespace 865 } // namespace
876 866
877 #endif // Element_h 867 #endif // Element_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698