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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2366313006: CSS Properties and Values API: Support non-inherited custom properties (Closed)
Patch Set: moo Created 4 years, 2 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
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 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after
1760 void copyChildDependentFlagsFrom(const ComputedStyle&); 1760 void copyChildDependentFlagsFrom(const ComputedStyle&);
1761 1761
1762 // Counters. 1762 // Counters.
1763 const CounterDirectiveMap* counterDirectives() const; 1763 const CounterDirectiveMap* counterDirectives() const;
1764 CounterDirectiveMap& accessCounterDirectives(); 1764 CounterDirectiveMap& accessCounterDirectives();
1765 const CounterDirectives getCounterDirectives(const AtomicString& identifier) const; 1765 const CounterDirectives getCounterDirectives(const AtomicString& identifier) const;
1766 void clearIncrementDirectives(); 1766 void clearIncrementDirectives();
1767 void clearResetDirectives(); 1767 void clearResetDirectives();
1768 1768
1769 // Variables. 1769 // Variables.
1770 static StyleVariableData* initialVariables() { return nullptr; } 1770 static StyleInheritedVariables* initialInheritedVariables() { return nullptr ; }
1771 StyleVariableData* variables() const; 1771 static StyleNonInheritedVariables* initialNonInheritedVariables() { return n ullptr; }
1772 void setVariable(const AtomicString&, PassRefPtr<CSSVariableData>); 1772
1773 void removeVariable(const AtomicString&); 1773 StyleInheritedVariables* inheritedVariables() const;
1774 StyleNonInheritedVariables* nonInheritedVariables() const;
1775
1776 void setUnresolvedInheritedVariable(const AtomicString&, PassRefPtr<CSSVaria bleData>);
1777 void setUnresolvedNonInheritedVariable(const AtomicString&, PassRefPtr<CSSVa riableData>);
1778
1779 void setResolvedUnregisteredVariable(const AtomicString&, PassRefPtr<CSSVari ableData>);
1780 void setResolvedInheritedVariable(const AtomicString&, PassRefPtr<CSSVariabl eData>, const CSSValue*);
1781 void setResolvedNonInheritedVariable(const AtomicString&, PassRefPtr<CSSVari ableData>, const CSSValue*);
1782
1783 void removeInheritedVariable(const AtomicString&);
1784 void removeNonInheritedVariable(const AtomicString&);
1785
1774 void setHasVariableReferenceFromNonInheritedProperty() { m_nonInheritedData. m_variableReference = true; } 1786 void setHasVariableReferenceFromNonInheritedProperty() { m_nonInheritedData. m_variableReference = true; }
1775 bool hasVariableReferenceFromNonInheritedProperty() const { return m_nonInhe ritedData.m_variableReference; } 1787 bool hasVariableReferenceFromNonInheritedProperty() const { return m_nonInhe ritedData.m_variableReference; }
1776 1788
1777 // Call these after setting the CSSVariableData
1778 void setRegisteredInheritedProperty(const AtomicString&, const CSSValue*);
1779
1780 // Animations. 1789 // Animations.
1781 CSSAnimationData& accessAnimations(); 1790 CSSAnimationData& accessAnimations();
1782 const CSSAnimationData* animations() const { return m_rareNonInheritedData-> m_animations.get(); } 1791 const CSSAnimationData* animations() const { return m_rareNonInheritedData-> m_animations.get(); }
1783 1792
1784 // Transitions. 1793 // Transitions.
1785 const CSSTransitionData* transitions() const { return m_rareNonInheritedData ->m_transitions.get(); } 1794 const CSSTransitionData* transitions() const { return m_rareNonInheritedData ->m_transitions.get(); }
1786 CSSTransitionData& accessTransitions(); 1795 CSSTransitionData& accessTransitions();
1787 1796
1788 // Callback selectors. 1797 // Callback selectors.
1789 const Vector<String>& callbackSelectors() const { return m_rareNonInheritedD ata->m_callbackSelectors; } 1798 const Vector<String>& callbackSelectors() const { return m_rareNonInheritedD ata->m_callbackSelectors; }
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
2526 2535
2527 bool diffNeedsFullLayoutAndPaintInvalidation(const ComputedStyle& other) con st; 2536 bool diffNeedsFullLayoutAndPaintInvalidation(const ComputedStyle& other) con st;
2528 bool diffNeedsFullLayout(const ComputedStyle& other) const; 2537 bool diffNeedsFullLayout(const ComputedStyle& other) const;
2529 bool diffNeedsPaintInvalidationSubtree(const ComputedStyle& other) const; 2538 bool diffNeedsPaintInvalidationSubtree(const ComputedStyle& other) const;
2530 bool diffNeedsPaintInvalidationObject(const ComputedStyle& other) const; 2539 bool diffNeedsPaintInvalidationObject(const ComputedStyle& other) const;
2531 bool diffNeedsPaintInvalidationObjectForPaintImage(const StyleImage*, const ComputedStyle& other) const; 2540 bool diffNeedsPaintInvalidationObjectForPaintImage(const StyleImage*, const ComputedStyle& other) const;
2532 void updatePropertySpecificDifferences(const ComputedStyle& other, StyleDiff erence&) const; 2541 void updatePropertySpecificDifferences(const ComputedStyle& other, StyleDiff erence&) const;
2533 2542
2534 bool requireTransformOrigin(ApplyTransformOrigin applyOrigin, ApplyMotionPat h) const; 2543 bool requireTransformOrigin(ApplyTransformOrigin applyOrigin, ApplyMotionPat h) const;
2535 static bool shadowListHasCurrentColor(const ShadowList*); 2544 static bool shadowListHasCurrentColor(const ShadowList*);
2545
2546 StyleInheritedVariables& mutableInheritedVariables();
2547 StyleNonInheritedVariables& mutableNonInheritedVariables();
2536 }; 2548 };
2537 2549
2538 // FIXME: Reduce/remove the dependency on zoom adjusted int values. 2550 // FIXME: Reduce/remove the dependency on zoom adjusted int values.
2539 // The float or LayoutUnit versions of layout values should be used. 2551 // The float or LayoutUnit versions of layout values should be used.
2540 int adjustForAbsoluteZoom(int value, float zoomFactor); 2552 int adjustForAbsoluteZoom(int value, float zoomFactor);
2541 2553
2542 inline int adjustForAbsoluteZoom(int value, const ComputedStyle* style) 2554 inline int adjustForAbsoluteZoom(int value, const ComputedStyle* style)
2543 { 2555 {
2544 float zoomFactor = style->effectiveZoom(); 2556 float zoomFactor = style->effectiveZoom();
2545 if (zoomFactor == 1) 2557 if (zoomFactor == 1)
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
2630 } 2642 }
2631 2643
2632 inline bool ComputedStyle::hasPseudoElementStyle() const 2644 inline bool ComputedStyle::hasPseudoElementStyle() const
2633 { 2645 {
2634 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; 2646 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask;
2635 } 2647 }
2636 2648
2637 } // namespace blink 2649 } // namespace blink
2638 2650
2639 #endif // ComputedStyle_h 2651 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698