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 * 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 // Clones all attribute-derived data, including subclass specifics (through
copyNonAttributeProperties.) | 303 // Clones all attribute-derived data, including subclass specifics (through
copyNonAttributeProperties.) |
304 void cloneDataFromElement(const Element&); | 304 void cloneDataFromElement(const Element&); |
305 | 305 |
306 bool hasEquivalentAttributes(const Element* other) const; | 306 bool hasEquivalentAttributes(const Element* other) const; |
307 | 307 |
308 virtual void copyNonAttributePropertiesFromElement(const Element&) { } | 308 virtual void copyNonAttributePropertiesFromElement(const Element&) { } |
309 | 309 |
310 virtual void attach(const AttachContext& = AttachContext()) override; | 310 virtual void attach(const AttachContext& = AttachContext()) override; |
311 virtual void detach(const AttachContext& = AttachContext()) override; | 311 virtual void detach(const AttachContext& = AttachContext()) override; |
312 | 312 |
313 virtual LayoutObject* createLayoutObject(const LayoutStyle&); | 313 virtual LayoutObject* createLayoutObject(const ComputedStyle&); |
314 virtual bool layoutObjectIsNeeded(const LayoutStyle&); | 314 virtual bool layoutObjectIsNeeded(const ComputedStyle&); |
315 void recalcStyle(StyleRecalcChange, Text* nextTextSibling = nullptr); | 315 void recalcStyle(StyleRecalcChange, Text* nextTextSibling = nullptr); |
316 void pseudoStateChanged(CSSSelector::PseudoType); | 316 void pseudoStateChanged(CSSSelector::PseudoType); |
317 void setAnimationStyleChange(bool); | 317 void setAnimationStyleChange(bool); |
318 void clearAnimationStyleChange(); | 318 void clearAnimationStyleChange(); |
319 void setNeedsAnimationStyleRecalc(); | 319 void setNeedsAnimationStyleRecalc(); |
320 | 320 |
321 void setNeedsCompositingUpdate(); | 321 void setNeedsCompositingUpdate(); |
322 | 322 |
323 bool supportsStyleSharing() const; | 323 bool supportsStyleSharing() const; |
324 | 324 |
325 ElementShadow* shadow() const; | 325 ElementShadow* shadow() const; |
326 ElementShadow& ensureShadow(); | 326 ElementShadow& ensureShadow(); |
327 PassRefPtrWillBeRawPtr<ShadowRoot> createShadowRoot(ScriptState*, ExceptionS
tate&); | 327 PassRefPtrWillBeRawPtr<ShadowRoot> createShadowRoot(ScriptState*, ExceptionS
tate&); |
328 PassRefPtrWillBeRawPtr<ShadowRoot> createShadowRoot(ExceptionState&); | 328 PassRefPtrWillBeRawPtr<ShadowRoot> createShadowRoot(ExceptionState&); |
329 ShadowRoot* shadowRoot() const; | 329 ShadowRoot* shadowRoot() const; |
330 ShadowRoot* youngestShadowRoot() const; | 330 ShadowRoot* youngestShadowRoot() const; |
331 | 331 |
332 bool hasOpenShadowRoot() const { return shadowRoot(); } | 332 bool hasOpenShadowRoot() const { return shadowRoot(); } |
333 ShadowRoot* closedShadowRoot() const; | 333 ShadowRoot* closedShadowRoot() const; |
334 ShadowRoot& ensureClosedShadowRoot(); | 334 ShadowRoot& ensureClosedShadowRoot(); |
335 virtual void willAddFirstOpenShadowRoot() { } | 335 virtual void willAddFirstOpenShadowRoot() { } |
336 | 336 |
337 bool isInDescendantTreeOf(const Element* shadowHost) const; | 337 bool isInDescendantTreeOf(const Element* shadowHost) const; |
338 | 338 |
339 const LayoutStyle* computedStyle(PseudoId = NOPSEUDO); | 339 const ComputedStyle* ensureComputedStyle(PseudoId = NOPSEUDO); |
340 | 340 |
341 // Methods for indicating the style is affected by dynamic updates (e.g., ch
ildren changing, our position changing in our sibling list, etc.) | 341 // Methods for indicating the style is affected by dynamic updates (e.g., ch
ildren changing, our position changing in our sibling list, etc.) |
342 bool styleAffectedByEmpty() const { return hasElementFlag(StyleAffectedByEmp
ty); } | 342 bool styleAffectedByEmpty() const { return hasElementFlag(StyleAffectedByEmp
ty); } |
343 void setStyleAffectedByEmpty() { setElementFlag(StyleAffectedByEmpty); } | 343 void setStyleAffectedByEmpty() { setElementFlag(StyleAffectedByEmpty); } |
344 | 344 |
345 void setIsInCanvasSubtree(bool value) { setElementFlag(IsInCanvasSubtree, va
lue); } | 345 void setIsInCanvasSubtree(bool value) { setElementFlag(IsInCanvasSubtree, va
lue); } |
346 bool isInCanvasSubtree() const { return hasElementFlag(IsInCanvasSubtree); } | 346 bool isInCanvasSubtree() const { return hasElementFlag(IsInCanvasSubtree); } |
347 | 347 |
348 bool isUpgradedCustomElement() { return customElementState() == Upgraded; } | 348 bool isUpgradedCustomElement() { return customElementState() == Upgraded; } |
349 bool isUnresolvedCustomElement() { return customElementState() == WaitingFor
Upgrade; } | 349 bool isUnresolvedCustomElement() { return customElementState() == WaitingFor
Upgrade; } |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 void setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(bool); | 469 void setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(bool); |
470 | 470 |
471 bool isInTopLayer() const { return hasElementFlag(IsInTopLayer); } | 471 bool isInTopLayer() const { return hasElementFlag(IsInTopLayer); } |
472 void setIsInTopLayer(bool); | 472 void setIsInTopLayer(bool); |
473 | 473 |
474 void requestPointerLock(); | 474 void requestPointerLock(); |
475 | 475 |
476 bool isSpellCheckingEnabled() const; | 476 bool isSpellCheckingEnabled() const; |
477 | 477 |
478 // FIXME: public for LayoutTreeBuilder, we shouldn't expose this though. | 478 // FIXME: public for LayoutTreeBuilder, we shouldn't expose this though. |
479 PassRefPtr<LayoutStyle> styleForLayoutObject(); | 479 PassRefPtr<ComputedStyle> styleForLayoutObject(); |
480 | 480 |
481 bool hasID() const; | 481 bool hasID() const; |
482 bool hasClass() const; | 482 bool hasClass() const; |
483 const SpaceSplitString& classNames() const; | 483 const SpaceSplitString& classNames() const; |
484 | 484 |
485 IntSize savedLayerScrollOffset() const; | 485 IntSize savedLayerScrollOffset() const; |
486 void setSavedLayerScrollOffset(const IntSize&); | 486 void setSavedLayerScrollOffset(const IntSize&); |
487 | 487 |
488 ElementAnimations* elementAnimations() const; | 488 ElementAnimations* elementAnimations() const; |
489 ElementAnimations& ensureElementAnimations(); | 489 ElementAnimations& ensureElementAnimations(); |
(...skipping 23 matching lines...) Expand all Loading... |
513 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, CSSValueID identifier); | 513 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, CSSValueID identifier); |
514 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, double value, CSSPrimitiveValue::UnitType); | 514 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, double value, CSSPrimitiveValue::UnitType); |
515 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, const String& value); | 515 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, const String& value); |
516 | 516 |
517 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; | 517 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; |
518 virtual void removedFrom(ContainerNode*) override; | 518 virtual void removedFrom(ContainerNode*) override; |
519 virtual void childrenChanged(const ChildrenChange&) override; | 519 virtual void childrenChanged(const ChildrenChange&) override; |
520 | 520 |
521 virtual void willRecalcStyle(StyleRecalcChange); | 521 virtual void willRecalcStyle(StyleRecalcChange); |
522 virtual void didRecalcStyle(StyleRecalcChange); | 522 virtual void didRecalcStyle(StyleRecalcChange); |
523 virtual PassRefPtr<LayoutStyle> customStyleForLayoutObject(); | 523 virtual PassRefPtr<ComputedStyle> customStyleForLayoutObject(); |
524 | 524 |
525 virtual bool shouldRegisterAsNamedItem() const { return false; } | 525 virtual bool shouldRegisterAsNamedItem() const { return false; } |
526 virtual bool shouldRegisterAsExtraNamedItem() const { return false; } | 526 virtual bool shouldRegisterAsExtraNamedItem() const { return false; } |
527 | 527 |
528 bool supportsSpatialNavigationFocus() const; | 528 bool supportsSpatialNavigationFocus() const; |
529 | 529 |
530 void clearTabIndexExplicitlyIfNeeded(); | 530 void clearTabIndexExplicitlyIfNeeded(); |
531 void setTabIndexExplicitly(short); | 531 void setTabIndexExplicitly(short); |
532 // Subclasses may override this method to affect focusability. Unlike | 532 // Subclasses may override this method to affect focusability. Unlike |
533 // supportsFocus, this method must be called on an up-to-date layout, so it | 533 // supportsFocus, this method must be called on an up-to-date layout, so it |
534 // may use the renderer to reason about focusability. This method cannot be | 534 // may use the renderer to reason about focusability. This method cannot be |
535 // moved to LayoutObject because some focusable nodes don't have renderers, | 535 // moved to LayoutObject because some focusable nodes don't have renderers, |
536 // e.g., HTMLOptionElement. | 536 // e.g., HTMLOptionElement. |
537 virtual bool layoutObjectIsFocusable() const; | 537 virtual bool layoutObjectIsFocusable() const; |
538 | 538 |
539 // classAttributeChanged() exists to share code between | 539 // classAttributeChanged() exists to share code between |
540 // parseAttribute (called via setAttribute()) and | 540 // parseAttribute (called via setAttribute()) and |
541 // svgAttributeChanged (called when element.className.baseValue is set) | 541 // svgAttributeChanged (called when element.className.baseValue is set) |
542 void classAttributeChanged(const AtomicString& newClassString); | 542 void classAttributeChanged(const AtomicString& newClassString); |
543 | 543 |
544 PassRefPtr<LayoutStyle> originalStyleForLayoutObject(); | 544 PassRefPtr<ComputedStyle> originalStyleForLayoutObject(); |
545 | 545 |
546 Node* insertAdjacent(const String& where, Node* newChild, ExceptionState&); | 546 Node* insertAdjacent(const String& where, Node* newChild, ExceptionState&); |
547 | 547 |
548 virtual void parserDidSetAttributes() { }; | 548 virtual void parserDidSetAttributes() { }; |
549 | 549 |
550 void scrollLayoutBoxBy(const ScrollToOptions&); | 550 void scrollLayoutBoxBy(const ScrollToOptions&); |
551 void scrollLayoutBoxTo(const ScrollToOptions&); | 551 void scrollLayoutBoxTo(const ScrollToOptions&); |
552 void scrollFrameBy(const ScrollToOptions&); | 552 void scrollFrameBy(const ScrollToOptions&); |
553 void scrollFrameTo(const ScrollToOptions&); | 553 void scrollFrameTo(const ScrollToOptions&); |
554 | 554 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 | 606 |
607 void setAttributeInternal(size_t index, const QualifiedName&, const AtomicSt
ring& value, SynchronizationOfLazyAttribute); | 607 void setAttributeInternal(size_t index, const QualifiedName&, const AtomicSt
ring& value, SynchronizationOfLazyAttribute); |
608 void appendAttributeInternal(const QualifiedName&, const AtomicString& value
, SynchronizationOfLazyAttribute); | 608 void appendAttributeInternal(const QualifiedName&, const AtomicString& value
, SynchronizationOfLazyAttribute); |
609 void removeAttributeInternal(size_t index, SynchronizationOfLazyAttribute); | 609 void removeAttributeInternal(size_t index, SynchronizationOfLazyAttribute); |
610 void attributeChangedFromParserOrByCloning(const QualifiedName&, const Atomi
cString&, AttributeModificationReason); | 610 void attributeChangedFromParserOrByCloning(const QualifiedName&, const Atomi
cString&, AttributeModificationReason); |
611 | 611 |
612 #ifndef NDEBUG | 612 #ifndef NDEBUG |
613 virtual void formatForDebugger(char* buffer, unsigned length) const override
; | 613 virtual void formatForDebugger(char* buffer, unsigned length) const override
; |
614 #endif | 614 #endif |
615 | 615 |
616 bool pseudoStyleCacheIsInvalid(const LayoutStyle* currentStyle, LayoutStyle*
newStyle); | 616 bool pseudoStyleCacheIsInvalid(const ComputedStyle* currentStyle, ComputedSt
yle* newStyle); |
617 | 617 |
618 void cancelFocusAppearanceUpdate(); | 618 void cancelFocusAppearanceUpdate(); |
619 | 619 |
620 virtual const LayoutStyle* virtualComputedStyle(PseudoId pseudoElementSpecif
ier = NOPSEUDO) override { return computedStyle(pseudoElementSpecifier); } | 620 virtual const ComputedStyle* virtualEnsureComputedStyle(PseudoId pseudoEleme
ntSpecifier = NOPSEUDO) override { return ensureComputedStyle(pseudoElementSpeci
fier); } |
621 | 621 |
622 inline void updateCallbackSelectors(const LayoutStyle* oldStyle, const Layou
tStyle* newStyle); | 622 inline void updateCallbackSelectors(const ComputedStyle* oldStyle, const Com
putedStyle* newStyle); |
623 inline void removeCallbackSelectors(); | 623 inline void removeCallbackSelectors(); |
624 inline void addCallbackSelectors(); | 624 inline void addCallbackSelectors(); |
625 | 625 |
626 // cloneNode is private so that non-virtual cloneElementWithChildren and clo
neElementWithoutChildren | 626 // cloneNode is private so that non-virtual cloneElementWithChildren and clo
neElementWithoutChildren |
627 // are used instead. | 627 // are used instead. |
628 virtual PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep) override; | 628 virtual PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep) override; |
629 virtual PassRefPtrWillBeRawPtr<Element> cloneElementWithoutAttributesAndChil
dren(); | 629 virtual PassRefPtrWillBeRawPtr<Element> cloneElementWithoutAttributesAndChil
dren(); |
630 | 630 |
631 QualifiedName m_tagName; | 631 QualifiedName m_tagName; |
632 | 632 |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) | 882 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) |
883 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 883 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
884 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ | 884 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ |
885 { \ | 885 { \ |
886 return adoptRefWillBeNoop(new T(tagName, document)); \ | 886 return adoptRefWillBeNoop(new T(tagName, document)); \ |
887 } | 887 } |
888 | 888 |
889 } // namespace | 889 } // namespace |
890 | 890 |
891 #endif // Element_h | 891 #endif // Element_h |
OLD | NEW |