Chromium Code Reviews| 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 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1221 void setUnicodeBidi(EUnicodeBidi b) { m_nonInheritedData.m_unicodeBidi = b; } | 1221 void setUnicodeBidi(EUnicodeBidi b) { m_nonInheritedData.m_unicodeBidi = b; } |
| 1222 | 1222 |
| 1223 // vertical-align | 1223 // vertical-align |
| 1224 static EVerticalAlign initialVerticalAlign() { return VerticalAlignBaseline; } | 1224 static EVerticalAlign initialVerticalAlign() { return VerticalAlignBaseline; } |
| 1225 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(m_ nonInheritedData.m_verticalAlign); } | 1225 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(m_ nonInheritedData.m_verticalAlign); } |
| 1226 const Length& getVerticalAlignLength() const { return m_box->verticalAlign() ; } | 1226 const Length& getVerticalAlignLength() const { return m_box->verticalAlign() ; } |
| 1227 void setVerticalAlign(EVerticalAlign v) { m_nonInheritedData.m_verticalAlign = v; } | 1227 void setVerticalAlign(EVerticalAlign v) { m_nonInheritedData.m_verticalAlign = v; } |
| 1228 void setVerticalAlignLength(const Length& length) { setVerticalAlign(Vertica lAlignLength); SET_VAR(m_box, m_verticalAlign, length); } | 1228 void setVerticalAlignLength(const Length& length) { setVerticalAlign(Vertica lAlignLength); SET_VAR(m_box, m_verticalAlign, length); } |
| 1229 | 1229 |
| 1230 // Exclusions properties. | 1230 // Exclusions properties. |
| 1231 // wrap-flow | |
| 1232 static WrapFlow initialWrapFlow() { return WrapFlowAuto; } | |
| 1233 | |
| 1234 // wrap-through | |
| 1235 static WrapThrough initialWrapThrough() { return WrapThroughWrap; } | |
|
rjwright
2016/08/10 06:44:13
Remove wrapflow & wrapthrough enums?
sashab
2016/08/11 07:33:16
Done.
| |
| 1236 | |
| 1237 // will-change | 1231 // will-change |
|
rjwright
2016/08/10 06:44:13
are these comments still needed?
sashab
2016/08/11 07:33:16
Yup, these are describing the property the methods
| |
| 1238 const Vector<CSSPropertyID>& willChangeProperties() const { return m_rareNon InheritedData->m_willChange->m_properties; } | 1232 const Vector<CSSPropertyID>& willChangeProperties() const { return m_rareNon InheritedData->m_willChange->m_properties; } |
| 1239 bool willChangeContents() const { return m_rareNonInheritedData->m_willChang e->m_contents; } | 1233 bool willChangeContents() const { return m_rareNonInheritedData->m_willChang e->m_contents; } |
| 1240 bool willChangeScrollPosition() const { return m_rareNonInheritedData->m_wil lChange->m_scrollPosition; } | 1234 bool willChangeScrollPosition() const { return m_rareNonInheritedData->m_wil lChange->m_scrollPosition; } |
| 1241 bool subtreeWillChangeContents() const { return m_rareInheritedData->m_subtr eeWillChangeContents; } | 1235 bool subtreeWillChangeContents() const { return m_rareInheritedData->m_subtr eeWillChangeContents; } |
| 1242 void setWillChangeProperties(const Vector<CSSPropertyID>& properties) { SET_ NESTED_VAR(m_rareNonInheritedData, m_willChange, m_properties, properties); } | 1236 void setWillChangeProperties(const Vector<CSSPropertyID>& properties) { SET_ NESTED_VAR(m_rareNonInheritedData, m_willChange, m_properties, properties); } |
| 1243 void setWillChangeContents(bool b) { SET_NESTED_VAR(m_rareNonInheritedData, m_willChange, m_contents, b); } | 1237 void setWillChangeContents(bool b) { SET_NESTED_VAR(m_rareNonInheritedData, m_willChange, m_contents, b); } |
| 1244 void setWillChangeScrollPosition(bool b) { SET_NESTED_VAR(m_rareNonInherited Data, m_willChange, m_scrollPosition, b); } | 1238 void setWillChangeScrollPosition(bool b) { SET_NESTED_VAR(m_rareNonInherited Data, m_willChange, m_scrollPosition, b); } |
| 1245 void setSubtreeWillChangeContents(bool b) { SET_VAR(m_rareInheritedData, m_s ubtreeWillChangeContents, b); } | 1239 void setSubtreeWillChangeContents(bool b) { SET_VAR(m_rareInheritedData, m_s ubtreeWillChangeContents, b); } |
| 1246 | 1240 |
| 1247 // z-index | 1241 // z-index |
| (...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2360 // TODO(sashab): Rename this to just getColor(), and add a comment explainin g how it works. | 2354 // TODO(sashab): Rename this to just getColor(), and add a comment explainin g how it works. |
| 2361 Color visitedDependentColor(int colorProperty) const; | 2355 Color visitedDependentColor(int colorProperty) const; |
| 2362 | 2356 |
| 2363 // -webkit-appearance utility functions. | 2357 // -webkit-appearance utility functions. |
| 2364 bool hasAppearance() const { return appearance() != NoControlPart; } | 2358 bool hasAppearance() const { return appearance() != NoControlPart; } |
| 2365 | 2359 |
| 2366 // Other utility functions. | 2360 // Other utility functions. |
| 2367 bool isStyleAvailable() const; | 2361 bool isStyleAvailable() const; |
| 2368 bool isSharable() const; | 2362 bool isSharable() const; |
| 2369 | 2363 |
| 2370 // TODO(sashab) Remove these. | |
| 2371 static ImageOrientationEnum initialImageOrientation() { return OriginTopLeft ; } | |
| 2372 static ImageResolutionSource initialImageResolutionSource() { return ImageRe solutionSpecified; } | |
| 2373 static ImageResolutionSnap initialImageResolutionSnap() { return ImageResolu tionNoSnap; } | |
|
rjwright
2016/08/10 06:44:13
Can we also remove ImageResolutionSource and Image
sashab
2016/08/11 07:33:16
Done!
| |
| 2374 static float initialImageResolution() { return 1; } | |
| 2375 void setWrapFlow(WrapFlow wrapFlow) { SET_VAR(m_rareNonInheritedData, m_wrap Flow, wrapFlow); } | |
| 2376 void setWrapThrough(WrapThrough wrapThrough) { SET_VAR(m_rareNonInheritedDat a, m_wrapThrough, wrapThrough); } | |
| 2377 | |
| 2378 private: | 2364 private: |
| 2379 void setVisitedLinkColor(const Color&); | 2365 void setVisitedLinkColor(const Color&); |
| 2380 void setVisitedLinkBackgroundColor(const StyleColor& v) { SET_VAR(m_rareNonI nheritedData, m_visitedLinkBackgroundColor, v); } | 2366 void setVisitedLinkBackgroundColor(const StyleColor& v) { SET_VAR(m_rareNonI nheritedData, m_visitedLinkBackgroundColor, v); } |
| 2381 void setVisitedLinkBorderLeftColor(const StyleColor& v) { SET_VAR(m_rareNonI nheritedData, m_visitedLinkBorderLeftColor, v); } | 2367 void setVisitedLinkBorderLeftColor(const StyleColor& v) { SET_VAR(m_rareNonI nheritedData, m_visitedLinkBorderLeftColor, v); } |
| 2382 void setVisitedLinkBorderRightColor(const StyleColor& v) { SET_VAR(m_rareNon InheritedData, m_visitedLinkBorderRightColor, v); } | 2368 void setVisitedLinkBorderRightColor(const StyleColor& v) { SET_VAR(m_rareNon InheritedData, m_visitedLinkBorderRightColor, v); } |
| 2383 void setVisitedLinkBorderBottomColor(const StyleColor& v) { SET_VAR(m_rareNo nInheritedData, m_visitedLinkBorderBottomColor, v); } | 2369 void setVisitedLinkBorderBottomColor(const StyleColor& v) { SET_VAR(m_rareNo nInheritedData, m_visitedLinkBorderBottomColor, v); } |
| 2384 void setVisitedLinkBorderTopColor(const StyleColor& v) { SET_VAR(m_rareNonIn heritedData, m_visitedLinkBorderTopColor, v); } | 2370 void setVisitedLinkBorderTopColor(const StyleColor& v) { SET_VAR(m_rareNonIn heritedData, m_visitedLinkBorderTopColor, v); } |
| 2385 void setVisitedLinkOutlineColor(const StyleColor& v) { SET_VAR(m_rareNonInhe ritedData, m_visitedLinkOutlineColor, v); } | 2371 void setVisitedLinkOutlineColor(const StyleColor& v) { SET_VAR(m_rareNonInhe ritedData, m_visitedLinkOutlineColor, v); } |
| 2386 void setVisitedLinkColumnRuleColor(const StyleColor& v) { SET_NESTED_VAR(m_r areNonInheritedData, m_multiCol, m_visitedLinkColumnRuleColor, v); } | 2372 void setVisitedLinkColumnRuleColor(const StyleColor& v) { SET_NESTED_VAR(m_r areNonInheritedData, m_multiCol, m_visitedLinkColumnRuleColor, v); } |
| 2387 void setVisitedLinkTextDecorationColor(const StyleColor& v) { SET_VAR(m_rare NonInheritedData, m_visitedLinkTextDecorationColor, v); } | 2373 void setVisitedLinkTextDecorationColor(const StyleColor& v) { SET_VAR(m_rare NonInheritedData, m_visitedLinkTextDecorationColor, v); } |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2554 } | 2540 } |
| 2555 | 2541 |
| 2556 inline bool ComputedStyle::hasPseudoElementStyle() const | 2542 inline bool ComputedStyle::hasPseudoElementStyle() const |
| 2557 { | 2543 { |
| 2558 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 2544 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
| 2559 } | 2545 } |
| 2560 | 2546 |
| 2561 } // namespace blink | 2547 } // namespace blink |
| 2562 | 2548 |
| 2563 #endif // ComputedStyle_h | 2549 #endif // ComputedStyle_h |
| OLD | NEW |