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

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

Issue 119533003: Clear mutable inline style when it is empty. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed typo. Created 7 years 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, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl e Inc. All rights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl e 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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 bool hasActiveAnimations() const; 524 bool hasActiveAnimations() const;
525 525
526 InputMethodContext* inputMethodContext(); 526 InputMethodContext* inputMethodContext();
527 bool hasInputMethodContext() const; 527 bool hasInputMethodContext() const;
528 528
529 virtual void setPrefix(const AtomicString&, ExceptionState&) OVERRIDE FINAL; 529 virtual void setPrefix(const AtomicString&, ExceptionState&) OVERRIDE FINAL;
530 530
531 void synchronizeAttribute(const AtomicString& localName) const; 531 void synchronizeAttribute(const AtomicString& localName) const;
532 532
533 MutableStylePropertySet* ensureMutableInlineStyle(); 533 MutableStylePropertySet* ensureMutableInlineStyle();
534 void clearMutableInlineStyleIfEmpty();
534 535
535 protected: 536 protected:
536 Element(const QualifiedName& tagName, Document* document, ConstructionType t ype) 537 Element(const QualifiedName& tagName, Document* document, ConstructionType t ype)
537 : ContainerNode(document, type) 538 : ContainerNode(document, type)
538 , m_tagName(tagName) 539 , m_tagName(tagName)
539 { 540 {
540 ScriptWrappable::init(this); 541 ScriptWrappable::init(this);
541 } 542 }
542 543
543 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, CSSValueID identifier); 544 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, CSSValueID identifier);
(...skipping 29 matching lines...) Expand all
573 // classAttributeChanged() exists to share code between 574 // classAttributeChanged() exists to share code between
574 // parseAttribute (called via setAttribute()) and 575 // parseAttribute (called via setAttribute()) and
575 // svgAttributeChanged (called when element.className.baseValue is set) 576 // svgAttributeChanged (called when element.className.baseValue is set)
576 void classAttributeChanged(const AtomicString& newClassString); 577 void classAttributeChanged(const AtomicString& newClassString);
577 578
578 PassRefPtr<RenderStyle> originalStyleForRenderer(); 579 PassRefPtr<RenderStyle> originalStyleForRenderer();
579 580
580 Node* insertAdjacent(const String& where, Node* newChild, ExceptionState&); 581 Node* insertAdjacent(const String& where, Node* newChild, ExceptionState&);
581 582
582 private: 583 private:
584 void removeSynchronizedLazyAttribute(const QualifiedName&);
585
583 void styleAttributeChanged(const AtomicString& newStyleString, AttributeModi ficationReason); 586 void styleAttributeChanged(const AtomicString& newStyleString, AttributeModi ficationReason);
584 587
585 void updatePresentationAttributeStyle(); 588 void updatePresentationAttributeStyle();
586 589
587 void inlineStyleChanged(); 590 void inlineStyleChanged();
588 PropertySetCSSStyleDeclaration* inlineStyleCSSOMWrapper(); 591 PropertySetCSSStyleDeclaration* inlineStyleCSSOMWrapper();
589 void setInlineStyleFromString(const AtomicString&); 592 void setInlineStyleFromString(const AtomicString&);
590 593
591 StyleRecalcChange recalcOwnStyle(StyleRecalcChange); 594 StyleRecalcChange recalcOwnStyle(StyleRecalcChange);
592 void recalcChildStyle(StyleRecalcChange); 595 void recalcChildStyle(StyleRecalcChange);
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 } 897 }
895 898
896 inline bool isShadowHost(const Element* element) 899 inline bool isShadowHost(const Element* element)
897 { 900 {
898 return element && element->shadow(); 901 return element && element->shadow();
899 } 902 }
900 903
901 } // namespace 904 } // namespace
902 905
903 #endif 906 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698