| OLD | NEW |
| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 #include <wtf/Forward.h> | 70 #include <wtf/Forward.h> |
| 71 #include <wtf/OwnPtr.h> | 71 #include <wtf/OwnPtr.h> |
| 72 #include <wtf/RefCounted.h> | 72 #include <wtf/RefCounted.h> |
| 73 #include <wtf/StdLibExtras.h> | 73 #include <wtf/StdLibExtras.h> |
| 74 #include <wtf/Vector.h> | 74 #include <wtf/Vector.h> |
| 75 | 75 |
| 76 #if ENABLE(CSS_FILTERS) | 76 #if ENABLE(CSS_FILTERS) |
| 77 #include "StyleFilterData.h" | 77 #include "StyleFilterData.h" |
| 78 #endif | 78 #endif |
| 79 | 79 |
| 80 #if ENABLE(DASHBOARD_SUPPORT) | |
| 81 #include "StyleDashboardRegion.h" | |
| 82 #endif | |
| 83 | |
| 84 #if ENABLE(SVG) | 80 #if ENABLE(SVG) |
| 85 #include "SVGPaint.h" | 81 #include "SVGPaint.h" |
| 86 #include "SVGRenderStyle.h" | 82 #include "SVGRenderStyle.h" |
| 87 #endif | 83 #endif |
| 88 | 84 |
| 89 template<typename T, typename U> inline bool compareEqual(const T& t, const U& u
) { return t == static_cast<T>(u); } | 85 template<typename T, typename U> inline bool compareEqual(const T& t, const U& u
) { return t == static_cast<T>(u); } |
| 90 | 86 |
| 91 #define SET_VAR(group, variable, value) \ | 87 #define SET_VAR(group, variable, value) \ |
| 92 if (!compareEqual(group->variable, value)) \ | 88 if (!compareEqual(group->variable, value)) \ |
| 93 group.access()->variable = value | 89 group.access()->variable = value |
| (...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1005 } else { | 1001 } else { |
| 1006 SET_VAR(m_box, m_width, v); | 1002 SET_VAR(m_box, m_width, v); |
| 1007 } | 1003 } |
| 1008 } | 1004 } |
| 1009 | 1005 |
| 1010 void setMinWidth(Length v) { SET_VAR(m_box, m_minWidth, v); } | 1006 void setMinWidth(Length v) { SET_VAR(m_box, m_minWidth, v); } |
| 1011 void setMaxWidth(Length v) { SET_VAR(m_box, m_maxWidth, v); } | 1007 void setMaxWidth(Length v) { SET_VAR(m_box, m_maxWidth, v); } |
| 1012 void setMinHeight(Length v) { SET_VAR(m_box, m_minHeight, v); } | 1008 void setMinHeight(Length v) { SET_VAR(m_box, m_minHeight, v); } |
| 1013 void setMaxHeight(Length v) { SET_VAR(m_box, m_maxHeight, v); } | 1009 void setMaxHeight(Length v) { SET_VAR(m_box, m_maxHeight, v); } |
| 1014 | 1010 |
| 1015 #if ENABLE(DASHBOARD_SUPPORT) | |
| 1016 Vector<StyleDashboardRegion> dashboardRegions() const { return rareNonInheri
tedData->m_dashboardRegions; } | |
| 1017 void setDashboardRegions(Vector<StyleDashboardRegion> regions) { SET_VAR(rar
eNonInheritedData, m_dashboardRegions, regions); } | |
| 1018 | |
| 1019 void setDashboardRegion(int type, const String& label, Length t, Length r, L
ength b, Length l, bool append) | |
| 1020 { | |
| 1021 StyleDashboardRegion region; | |
| 1022 region.label = label; | |
| 1023 region.offset.m_top = t; | |
| 1024 region.offset.m_right = r; | |
| 1025 region.offset.m_bottom = b; | |
| 1026 region.offset.m_left = l; | |
| 1027 region.type = type; | |
| 1028 if (!append) | |
| 1029 rareNonInheritedData.access()->m_dashboardRegions.clear(); | |
| 1030 rareNonInheritedData.access()->m_dashboardRegions.append(region); | |
| 1031 } | |
| 1032 #endif | |
| 1033 | |
| 1034 #if ENABLE(DRAGGABLE_REGION) | 1011 #if ENABLE(DRAGGABLE_REGION) |
| 1035 DraggableRegionMode getDraggableRegionMode() const { return rareNonInherited
Data->m_draggableRegionMode; } | 1012 DraggableRegionMode getDraggableRegionMode() const { return rareNonInherited
Data->m_draggableRegionMode; } |
| 1036 void setDraggableRegionMode(DraggableRegionMode v) { SET_VAR(rareNonInherite
dData, m_draggableRegionMode, v); } | 1013 void setDraggableRegionMode(DraggableRegionMode v) { SET_VAR(rareNonInherite
dData, m_draggableRegionMode, v); } |
| 1037 #endif | 1014 #endif |
| 1038 | 1015 |
| 1039 void resetBorder() { resetBorderImage(); resetBorderTop(); resetBorderRight(
); resetBorderBottom(); resetBorderLeft(); resetBorderRadius(); } | 1016 void resetBorder() { resetBorderImage(); resetBorderTop(); resetBorderRight(
); resetBorderBottom(); resetBorderLeft(); resetBorderRadius(); } |
| 1040 void resetBorderTop() { SET_VAR(surround, border.m_top, BorderValue()); } | 1017 void resetBorderTop() { SET_VAR(surround, border.m_top, BorderValue()); } |
| 1041 void resetBorderRight() { SET_VAR(surround, border.m_right, BorderValue());
} | 1018 void resetBorderRight() { SET_VAR(surround, border.m_right, BorderValue());
} |
| 1042 void resetBorderBottom() { SET_VAR(surround, border.m_bottom, BorderValue())
; } | 1019 void resetBorderBottom() { SET_VAR(surround, border.m_bottom, BorderValue())
; } |
| 1043 void resetBorderLeft() { SET_VAR(surround, border.m_left, BorderValue()); } | 1020 void resetBorderLeft() { SET_VAR(surround, border.m_left, BorderValue()); } |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1742 | 1719 |
| 1743 // Keep these at the end. | 1720 // Keep these at the end. |
| 1744 static LineClampValue initialLineClamp() { return LineClampValue(); } | 1721 static LineClampValue initialLineClamp() { return LineClampValue(); } |
| 1745 static ETextSecurity initialTextSecurity() { return TSNONE; } | 1722 static ETextSecurity initialTextSecurity() { return TSNONE; } |
| 1746 #if ENABLE(TOUCH_EVENTS) | 1723 #if ENABLE(TOUCH_EVENTS) |
| 1747 static Color initialTapHighlightColor(); | 1724 static Color initialTapHighlightColor(); |
| 1748 #endif | 1725 #endif |
| 1749 #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING) | 1726 #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING) |
| 1750 static bool initialUseTouchOverflowScrolling() { return false; } | 1727 static bool initialUseTouchOverflowScrolling() { return false; } |
| 1751 #endif | 1728 #endif |
| 1752 #if ENABLE(DASHBOARD_SUPPORT) | |
| 1753 static const Vector<StyleDashboardRegion>& initialDashboardRegions(); | |
| 1754 static const Vector<StyleDashboardRegion>& noneDashboardRegions(); | |
| 1755 #endif | |
| 1756 #if ENABLE(CSS_FILTERS) | 1729 #if ENABLE(CSS_FILTERS) |
| 1757 static const FilterOperations& initialFilter() { DEFINE_STATIC_LOCAL(FilterO
perations, ops, ()); return ops; } | 1730 static const FilterOperations& initialFilter() { DEFINE_STATIC_LOCAL(FilterO
perations, ops, ()); return ops; } |
| 1758 #endif | 1731 #endif |
| 1759 #if ENABLE(CSS_COMPOSITING) | 1732 #if ENABLE(CSS_COMPOSITING) |
| 1760 static BlendMode initialBlendMode() { return BlendModeNormal; } | 1733 static BlendMode initialBlendMode() { return BlendModeNormal; } |
| 1761 #endif | 1734 #endif |
| 1762 private: | 1735 private: |
| 1763 void setVisitedLinkColor(const Color&); | 1736 void setVisitedLinkColor(const Color&); |
| 1764 void setVisitedLinkBackgroundColor(const Color& v) { SET_VAR(rareNonInherite
dData, m_visitedLinkBackgroundColor, v); } | 1737 void setVisitedLinkBackgroundColor(const Color& v) { SET_VAR(rareNonInherite
dData, m_visitedLinkBackgroundColor, v); } |
| 1765 void setVisitedLinkBorderLeftColor(const Color& v) { SET_VAR(rareNonInherite
dData, m_visitedLinkBorderLeftColor, v); } | 1738 void setVisitedLinkBorderLeftColor(const Color& v) { SET_VAR(rareNonInherite
dData, m_visitedLinkBorderLeftColor, v); } |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1888 if (compareEqual(rareInheritedData->m_textOrientation, textOrientation)) | 1861 if (compareEqual(rareInheritedData->m_textOrientation, textOrientation)) |
| 1889 return false; | 1862 return false; |
| 1890 | 1863 |
| 1891 rareInheritedData.access()->m_textOrientation = textOrientation; | 1864 rareInheritedData.access()->m_textOrientation = textOrientation; |
| 1892 return true; | 1865 return true; |
| 1893 } | 1866 } |
| 1894 | 1867 |
| 1895 } // namespace WebCore | 1868 } // namespace WebCore |
| 1896 | 1869 |
| 1897 #endif // RenderStyle_h | 1870 #endif // RenderStyle_h |
| OLD | NEW |