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

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: rebase master 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 bool hasFilterInducingProperty() const { return hasFilter() || (RuntimeEnabl edFeatures::cssBoxReflectFilterEnabled() && hasBoxReflect()); }
464 Order rtlOrdering() const { return static_cast<Order>(inherited_flags.m_rtlO rdering); } 464 Order rtlOrdering() const { return static_cast<Order>(inherited_flags.m_rtlO rdering); }
465 void setRTLOrdering(Order o) { inherited_flags.m_rtlOrdering = o; } 465 void setRTLOrdering(Order o) { inherited_flags.m_rtlOrdering = o; }
466 466
467 bool isStyleAvailable() const; 467 bool isStyleAvailable() const;
468 468
469 bool hasAnyPublicPseudoStyles() const; 469 bool hasAnyPublicPseudoStyles() const;
470 bool hasPseudoStyle(PseudoId) const; 470 bool hasPseudoStyle(PseudoId) const;
471 void setHasPseudoStyle(PseudoId); 471 void setHasPseudoStyle(PseudoId);
472 bool hasUniquePseudoStyle() const; 472 bool hasUniquePseudoStyle() const;
473 bool hasPseudoElementStyle() const; 473 bool hasPseudoElementStyle() const;
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 840
841 const GridPosition& gridColumnStart() const { return rareNonInheritedData->m _gridItem->m_gridColumnStart; } 841 const GridPosition& gridColumnStart() const { return rareNonInheritedData->m _gridItem->m_gridColumnStart; }
842 const GridPosition& gridColumnEnd() const { return rareNonInheritedData->m_g ridItem->m_gridColumnEnd; } 842 const GridPosition& gridColumnEnd() const { return rareNonInheritedData->m_g ridItem->m_gridColumnEnd; }
843 const GridPosition& gridRowStart() const { return rareNonInheritedData->m_gr idItem->m_gridRowStart; } 843 const GridPosition& gridRowStart() const { return rareNonInheritedData->m_gr idItem->m_gridRowStart; }
844 const GridPosition& gridRowEnd() const { return rareNonInheritedData->m_grid Item->m_gridRowEnd; } 844 const GridPosition& gridRowEnd() const { return rareNonInheritedData->m_grid Item->m_gridRowEnd; }
845 845
846 ShadowList* boxShadow() const { return rareNonInheritedData->m_boxShadow.get (); } 846 ShadowList* boxShadow() const { return rareNonInheritedData->m_boxShadow.get (); }
847 847
848 EBoxDecorationBreak boxDecorationBreak() const { return m_box->boxDecoration Break(); } 848 EBoxDecorationBreak boxDecorationBreak() const { return m_box->boxDecoration Break(); }
849 StyleReflection* boxReflect() const { return rareNonInheritedData->m_boxRefl ect.get(); } 849 StyleReflection* boxReflect() const { return rareNonInheritedData->m_boxRefl ect.get(); }
850 bool hasBoxReflect() const { return boxReflect(); }
850 bool reflectionDataEquivalent(const ComputedStyle* otherStyle) const { retur n rareNonInheritedData->reflectionDataEquivalent(*otherStyle->rareNonInheritedDa ta); } 851 bool reflectionDataEquivalent(const ComputedStyle* otherStyle) const { retur n rareNonInheritedData->reflectionDataEquivalent(*otherStyle->rareNonInheritedDa ta); }
851 852
852 // FIXME: reflections should belong to this helper function but they are cur rently handled 853 // 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. 854 // through their self-painting layers. So the layout code doesn't account fo r them.
854 bool hasVisualOverflowingEffect() const { return boxShadow() || hasBorderIma geOutsets() || hasOutline(); } 855 bool hasVisualOverflowingEffect() const { return boxShadow() || hasBorderIma geOutsets() || hasOutline(); }
855 856
856 Containment contain() const { return static_cast<Containment>(rareNonInherit edData->m_contain); } 857 Containment contain() const { return static_cast<Containment>(rareNonInherit edData->m_contain); }
857 bool containsPaint() const { return rareNonInheritedData->m_contain & Contai nsPaint; } 858 bool containsPaint() const { return rareNonInheritedData->m_contain & Contai nsPaint; }
858 bool containsStyle() const { return rareNonInheritedData->m_contain & Contai nsStyle; } 859 bool containsStyle() const { return rareNonInheritedData->m_contain & Contai nsStyle; }
859 bool containsLayout() const { return rareNonInheritedData->m_contain & Conta insLayout; } 860 bool containsLayout() const { return rareNonInheritedData->m_contain & Conta insLayout; }
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 1635
1635 void setHasExplicitlyInheritedProperties() { noninherited_flags.explicitInhe ritance = true; } 1636 void setHasExplicitlyInheritedProperties() { noninherited_flags.explicitInhe ritance = true; }
1636 bool hasExplicitlyInheritedProperties() const { return noninherited_flags.ex plicitInheritance; } 1637 bool hasExplicitlyInheritedProperties() const { return noninherited_flags.ex plicitInheritance; }
1637 1638
1638 void setHasVariableReferenceFromNonInheritedProperty() { noninherited_flags. variableReference = true; } 1639 void setHasVariableReferenceFromNonInheritedProperty() { noninherited_flags. variableReference = true; }
1639 bool hasVariableReferenceFromNonInheritedProperty() const { return noninheri ted_flags.variableReference; } 1640 bool hasVariableReferenceFromNonInheritedProperty() const { return noninheri ted_flags.variableReference; }
1640 1641
1641 bool hasChildDependentFlags() const { return emptyState() || hasExplicitlyIn heritedProperties(); } 1642 bool hasChildDependentFlags() const { return emptyState() || hasExplicitlyIn heritedProperties(); }
1642 void copyChildDependentFlagsFrom(const ComputedStyle&); 1643 void copyChildDependentFlagsFrom(const ComputedStyle&);
1643 1644
1644 bool hasBoxDecorations() const { return hasBorderDecoration() || hasBorderRa dius() || hasOutline() || hasAppearance() || boxShadow() || hasFilter() || hasBa ckdropFilter() || resize() != RESIZE_NONE; } 1645 bool hasBoxDecorations() const
1646 {
1647 return hasBorderDecoration()
1648 || hasBorderRadius()
1649 || hasOutline()
1650 || hasAppearance()
1651 || boxShadow()
1652 || hasFilterInducingProperty()
1653 || hasBackdropFilter()
1654 || resize() != RESIZE_NONE;
1655 }
1645 1656
1646 bool borderObscuresBackground() const; 1657 bool borderObscuresBackground() const;
1647 void getBorderEdgeInfo(BorderEdge edges[], bool includeLogicalLeftEdge = tru e, bool includeLogicalRightEdge = true) const; 1658 void getBorderEdgeInfo(BorderEdge edges[], bool includeLogicalLeftEdge = tru e, bool includeLogicalRightEdge = true) const;
1648 1659
1649 void setHasAuthorBackground(bool authorBackground) { SET_VAR(rareNonInherite dData, m_hasAuthorBackground, authorBackground); } 1660 void setHasAuthorBackground(bool authorBackground) { SET_VAR(rareNonInherite dData, m_hasAuthorBackground, authorBackground); }
1650 void setHasAuthorBorder(bool authorBorder) { SET_VAR(rareNonInheritedData, m _hasAuthorBorder, authorBorder); } 1661 void setHasAuthorBorder(bool authorBorder) { SET_VAR(rareNonInheritedData, m _hasAuthorBorder, authorBorder); }
1651 bool hasAuthorBackground() const { return rareNonInheritedData->m_hasAuthorB ackground; }; 1662 bool hasAuthorBackground() const { return rareNonInheritedData->m_hasAuthorB ackground; };
1652 bool hasAuthorBorder() const { return rareNonInheritedData->m_hasAuthorBorde r; }; 1663 bool hasAuthorBorder() const { return rareNonInheritedData->m_hasAuthorBorde r; };
1653 1664
1654 // Initial values for all the properties 1665 // Initial values for all the properties
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
2037 } 2048 }
2038 2049
2039 inline bool ComputedStyle::hasPseudoElementStyle() const 2050 inline bool ComputedStyle::hasPseudoElementStyle() const
2040 { 2051 {
2041 return noninherited_flags.pseudoBits & ElementPseudoIdMask; 2052 return noninherited_flags.pseudoBits & ElementPseudoIdMask;
2042 } 2053 }
2043 2054
2044 } // namespace blink 2055 } // namespace blink
2045 2056
2046 #endif // ComputedStyle_h 2057 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698