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

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

Issue 1775013003: Implement -webkit-box-reflect as a filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make msvc dbg happy Created 4 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
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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 LayoutRectOutsets imageOutsets(const NinePieceImage&) const; 453 LayoutRectOutsets imageOutsets(const NinePieceImage&) const;
454 bool hasBorderImageOutsets() const 454 bool hasBorderImageOutsets() const
455 { 455 {
456 return borderImage().hasImage() && borderImage().outset().nonZero(); 456 return borderImage().hasImage() && borderImage().outset().nonZero();
457 } 457 }
458 LayoutRectOutsets borderImageOutsets() const 458 LayoutRectOutsets borderImageOutsets() const
459 { 459 {
460 return imageOutsets(borderImage()); 460 return imageOutsets(borderImage());
461 } 461 }
462 462
463 bool hasFilterOutsets() const { return hasFilter() && filter().hasOutsets(); } 463 // Returns |true| if any property that renders using filter operations is
464 // used (including, but not limited to, 'filter').
465 bool hasFilterInducingProperty() const { return hasFilter() || (RuntimeEnabl edFeatures::cssBoxReflectFilterEnabled() && hasBoxReflect()); }
466
464 Order rtlOrdering() const { return static_cast<Order>(inherited_flags.m_rtlO rdering); } 467 Order rtlOrdering() const { return static_cast<Order>(inherited_flags.m_rtlO rdering); }
465 void setRTLOrdering(Order o) { inherited_flags.m_rtlOrdering = o; } 468 void setRTLOrdering(Order o) { inherited_flags.m_rtlOrdering = o; }
466 469
467 bool isStyleAvailable() const; 470 bool isStyleAvailable() const;
468 471
469 bool hasAnyPublicPseudoStyles() const; 472 bool hasAnyPublicPseudoStyles() const;
470 bool hasPseudoStyle(PseudoId) const; 473 bool hasPseudoStyle(PseudoId) const;
471 void setHasPseudoStyle(PseudoId); 474 void setHasPseudoStyle(PseudoId);
472 bool hasUniquePseudoStyle() const; 475 bool hasUniquePseudoStyle() const;
473 bool hasPseudoElementStyle() const; 476 bool hasPseudoElementStyle() const;
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 843
841 const GridPosition& gridColumnStart() const { return rareNonInheritedData->m _gridItem->m_gridColumnStart; } 844 const GridPosition& gridColumnStart() const { return rareNonInheritedData->m _gridItem->m_gridColumnStart; }
842 const GridPosition& gridColumnEnd() const { return rareNonInheritedData->m_g ridItem->m_gridColumnEnd; } 845 const GridPosition& gridColumnEnd() const { return rareNonInheritedData->m_g ridItem->m_gridColumnEnd; }
843 const GridPosition& gridRowStart() const { return rareNonInheritedData->m_gr idItem->m_gridRowStart; } 846 const GridPosition& gridRowStart() const { return rareNonInheritedData->m_gr idItem->m_gridRowStart; }
844 const GridPosition& gridRowEnd() const { return rareNonInheritedData->m_grid Item->m_gridRowEnd; } 847 const GridPosition& gridRowEnd() const { return rareNonInheritedData->m_grid Item->m_gridRowEnd; }
845 848
846 ShadowList* boxShadow() const { return rareNonInheritedData->m_boxShadow.get (); } 849 ShadowList* boxShadow() const { return rareNonInheritedData->m_boxShadow.get (); }
847 850
848 EBoxDecorationBreak boxDecorationBreak() const { return m_box->boxDecoration Break(); } 851 EBoxDecorationBreak boxDecorationBreak() const { return m_box->boxDecoration Break(); }
849 StyleReflection* boxReflect() const { return rareNonInheritedData->m_boxRefl ect.get(); } 852 StyleReflection* boxReflect() const { return rareNonInheritedData->m_boxRefl ect.get(); }
853 bool hasBoxReflect() const { return boxReflect(); }
850 bool reflectionDataEquivalent(const ComputedStyle* otherStyle) const { retur n rareNonInheritedData->reflectionDataEquivalent(*otherStyle->rareNonInheritedDa ta); } 854 bool reflectionDataEquivalent(const ComputedStyle* otherStyle) const { retur n rareNonInheritedData->reflectionDataEquivalent(*otherStyle->rareNonInheritedDa ta); }
851 855
852 // FIXME: reflections should belong to this helper function but they are cur rently handled 856 // FIXME: reflections should belong to this helper function but they are cur rently handled
853 // through their self-painting layers. So the layout code doesn't account fo r them. 857 // through their self-painting layers. So the layout code doesn't account fo r them.
854 bool hasVisualOverflowingEffect() const { return boxShadow() || hasBorderIma geOutsets() || hasOutline(); } 858 bool hasVisualOverflowingEffect() const { return boxShadow() || hasBorderIma geOutsets() || hasOutline(); }
855 859
856 Containment contain() const { return static_cast<Containment>(rareNonInherit edData->m_contain); } 860 Containment contain() const { return static_cast<Containment>(rareNonInherit edData->m_contain); }
857 bool containsPaint() const { return rareNonInheritedData->m_contain & Contai nsPaint; } 861 bool containsPaint() const { return rareNonInheritedData->m_contain & Contai nsPaint; }
858 bool containsStyle() const { return rareNonInheritedData->m_contain & Contai nsStyle; } 862 bool containsStyle() const { return rareNonInheritedData->m_contain & Contai nsStyle; }
859 bool containsLayout() const { return rareNonInheritedData->m_contain & Conta insLayout; } 863 bool containsLayout() const { return rareNonInheritedData->m_contain & Conta insLayout; }
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 1638
1635 void setHasExplicitlyInheritedProperties() { noninherited_flags.explicitInhe ritance = true; } 1639 void setHasExplicitlyInheritedProperties() { noninherited_flags.explicitInhe ritance = true; }
1636 bool hasExplicitlyInheritedProperties() const { return noninherited_flags.ex plicitInheritance; } 1640 bool hasExplicitlyInheritedProperties() const { return noninherited_flags.ex plicitInheritance; }
1637 1641
1638 void setHasVariableReferenceFromNonInheritedProperty() { noninherited_flags. variableReference = true; } 1642 void setHasVariableReferenceFromNonInheritedProperty() { noninherited_flags. variableReference = true; }
1639 bool hasVariableReferenceFromNonInheritedProperty() const { return noninheri ted_flags.variableReference; } 1643 bool hasVariableReferenceFromNonInheritedProperty() const { return noninheri ted_flags.variableReference; }
1640 1644
1641 bool hasChildDependentFlags() const { return emptyState() || hasExplicitlyIn heritedProperties(); } 1645 bool hasChildDependentFlags() const { return emptyState() || hasExplicitlyIn heritedProperties(); }
1642 void copyChildDependentFlagsFrom(const ComputedStyle&); 1646 void copyChildDependentFlagsFrom(const ComputedStyle&);
1643 1647
1644 bool hasBoxDecorations() const { return hasBorderDecoration() || hasBorderRa dius() || hasOutline() || hasAppearance() || boxShadow() || hasFilter() || hasBa ckdropFilter() || resize() != RESIZE_NONE; } 1648 bool hasBoxDecorations() const
1649 {
1650 return hasBorderDecoration()
1651 || hasBorderRadius()
1652 || hasOutline()
1653 || hasAppearance()
1654 || boxShadow()
1655 || hasFilterInducingProperty()
1656 || hasBackdropFilter()
1657 || resize() != RESIZE_NONE;
1658 }
1645 1659
1646 bool borderObscuresBackground() const; 1660 bool borderObscuresBackground() const;
1647 void getBorderEdgeInfo(BorderEdge edges[], bool includeLogicalLeftEdge = tru e, bool includeLogicalRightEdge = true) const; 1661 void getBorderEdgeInfo(BorderEdge edges[], bool includeLogicalLeftEdge = tru e, bool includeLogicalRightEdge = true) const;
1648 1662
1649 void setHasAuthorBackground(bool authorBackground) { SET_VAR(rareNonInherite dData, m_hasAuthorBackground, authorBackground); } 1663 void setHasAuthorBackground(bool authorBackground) { SET_VAR(rareNonInherite dData, m_hasAuthorBackground, authorBackground); }
1650 void setHasAuthorBorder(bool authorBorder) { SET_VAR(rareNonInheritedData, m _hasAuthorBorder, authorBorder); } 1664 void setHasAuthorBorder(bool authorBorder) { SET_VAR(rareNonInheritedData, m _hasAuthorBorder, authorBorder); }
1651 bool hasAuthorBackground() const { return rareNonInheritedData->m_hasAuthorB ackground; }; 1665 bool hasAuthorBackground() const { return rareNonInheritedData->m_hasAuthorB ackground; };
1652 bool hasAuthorBorder() const { return rareNonInheritedData->m_hasAuthorBorde r; }; 1666 bool hasAuthorBorder() const { return rareNonInheritedData->m_hasAuthorBorde r; };
1653 1667
1654 // Initial values for all the properties 1668 // Initial values for all the properties
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
2037 } 2051 }
2038 2052
2039 inline bool ComputedStyle::hasPseudoElementStyle() const 2053 inline bool ComputedStyle::hasPseudoElementStyle() const
2040 { 2054 {
2041 return noninherited_flags.pseudoBits & ElementPseudoIdMask; 2055 return noninherited_flags.pseudoBits & ElementPseudoIdMask;
2042 } 2056 }
2043 2057
2044 } // namespace blink 2058 } // namespace blink
2045 2059
2046 #endif // ComputedStyle_h 2060 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698