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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 #include "core/rendering/style/StyleGridData.h" | 46 #include "core/rendering/style/StyleGridData.h" |
| 47 #include "core/rendering/style/StyleGridItemData.h" | 47 #include "core/rendering/style/StyleGridItemData.h" |
| 48 #include "core/rendering/style/StyleMarqueeData.h" | 48 #include "core/rendering/style/StyleMarqueeData.h" |
| 49 #include "core/rendering/style/StyleMultiColData.h" | 49 #include "core/rendering/style/StyleMultiColData.h" |
| 50 #include "core/rendering/style/StyleRareInheritedData.h" | 50 #include "core/rendering/style/StyleRareInheritedData.h" |
| 51 #include "core/rendering/style/StyleRareNonInheritedData.h" | 51 #include "core/rendering/style/StyleRareNonInheritedData.h" |
| 52 #include "core/rendering/style/StyleReflection.h" | 52 #include "core/rendering/style/StyleReflection.h" |
| 53 #include "core/rendering/style/StyleSurroundData.h" | 53 #include "core/rendering/style/StyleSurroundData.h" |
| 54 #include "core/rendering/style/StyleTransformData.h" | 54 #include "core/rendering/style/StyleTransformData.h" |
| 55 #include "core/rendering/style/StyleVisualData.h" | 55 #include "core/rendering/style/StyleVisualData.h" |
| 56 #include "core/rendering/style/StyleWillChangeData.h" | |
| 56 #include "core/svg/SVGPaint.h" | 57 #include "core/svg/SVGPaint.h" |
| 57 #include "platform/Length.h" | 58 #include "platform/Length.h" |
| 58 #include "platform/LengthBox.h" | 59 #include "platform/LengthBox.h" |
| 59 #include "platform/LengthSize.h" | 60 #include "platform/LengthSize.h" |
| 60 #include "platform/ThemeTypes.h" | 61 #include "platform/ThemeTypes.h" |
| 61 #include "platform/fonts/FontBaseline.h" | 62 #include "platform/fonts/FontBaseline.h" |
| 62 #include "platform/fonts/FontDescription.h" | 63 #include "platform/fonts/FontDescription.h" |
| 63 #include "platform/geometry/LayoutBoxExtent.h" | 64 #include "platform/geometry/LayoutBoxExtent.h" |
| 64 #include "platform/geometry/RoundedRect.h" | 65 #include "platform/geometry/RoundedRect.h" |
| 65 #include "platform/graphics/Color.h" | 66 #include "platform/graphics/Color.h" |
| (...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 946 void setIsolation(EIsolation v); | 947 void setIsolation(EIsolation v); |
| 947 bool hasIsolation() const; | 948 bool hasIsolation() const; |
| 948 | 949 |
| 949 bool shouldPlaceBlockDirectionScrollbarOnLogicalLeft() const { return !isLef tToRightDirection() && isHorizontalWritingMode(); } | 950 bool shouldPlaceBlockDirectionScrollbarOnLogicalLeft() const { return !isLef tToRightDirection() && isHorizontalWritingMode(); } |
| 950 | 951 |
| 951 TouchAction touchAction() const { return static_cast<TouchAction>(rareNonInh eritedData->m_touchAction); } | 952 TouchAction touchAction() const { return static_cast<TouchAction>(rareNonInh eritedData->m_touchAction); } |
| 952 TouchActionDelay touchActionDelay() const { return static_cast<TouchActionDe lay>(rareInheritedData->m_touchActionDelay); } | 953 TouchActionDelay touchActionDelay() const { return static_cast<TouchActionDe lay>(rareInheritedData->m_touchActionDelay); } |
| 953 | 954 |
| 954 ScrollBehavior scrollBehavior() const { return static_cast<ScrollBehavior>(r areNonInheritedData->m_scrollBehavior); } | 955 ScrollBehavior scrollBehavior() const { return static_cast<ScrollBehavior>(r areNonInheritedData->m_scrollBehavior); } |
| 955 | 956 |
| 957 const Vector<CSSPropertyID>& willChangeProperties() const { return rareNonIn heritedData->m_willChange->m_properties; } | |
| 958 bool willChangeContents() const { return rareNonInheritedData->m_willChange- >m_contents; } | |
| 959 bool willChangeScrollPosition() const { return rareNonInheritedData->m_willC hange->m_scrollPosition; } | |
| 960 | |
| 956 // attribute setter methods | 961 // attribute setter methods |
| 957 | 962 |
| 958 void setDisplay(EDisplay v) { noninherited_flags._effectiveDisplay = v; } | 963 void setDisplay(EDisplay v) { noninherited_flags._effectiveDisplay = v; } |
| 959 void setOriginalDisplay(EDisplay v) { noninherited_flags._originalDisplay = v; } | 964 void setOriginalDisplay(EDisplay v) { noninherited_flags._originalDisplay = v; } |
| 960 void setPosition(EPosition v) { noninherited_flags._position = v; } | 965 void setPosition(EPosition v) { noninherited_flags._position = v; } |
| 961 void setFloating(EFloat v) { noninherited_flags._floating = v; } | 966 void setFloating(EFloat v) { noninherited_flags._floating = v; } |
| 962 | 967 |
| 963 void setLeft(Length v) { SET_VAR(surround, offset.m_left, v); } | 968 void setLeft(Length v) { SET_VAR(surround, offset.m_left, v); } |
| 964 void setRight(Length v) { SET_VAR(surround, offset.m_right, v); } | 969 void setRight(Length v) { SET_VAR(surround, offset.m_right, v); } |
| 965 void setTop(Length v) { SET_VAR(surround, offset.m_top, v); } | 970 void setTop(Length v) { SET_VAR(surround, offset.m_top, v); } |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1368 | 1373 |
| 1369 void setLineBoxContain(LineBoxContain c) { SET_VAR(rareInheritedData, m_line BoxContain, c); } | 1374 void setLineBoxContain(LineBoxContain c) { SET_VAR(rareInheritedData, m_line BoxContain, c); } |
| 1370 void setLineClamp(LineClampValue c) { SET_VAR(rareNonInheritedData, lineClam p, c); } | 1375 void setLineClamp(LineClampValue c) { SET_VAR(rareNonInheritedData, lineClam p, c); } |
| 1371 void setTapHighlightColor(const Color& c) { SET_VAR(rareInheritedData, tapHi ghlightColor, c); } | 1376 void setTapHighlightColor(const Color& c) { SET_VAR(rareInheritedData, tapHi ghlightColor, c); } |
| 1372 void setTextSecurity(ETextSecurity aTextSecurity) { SET_VAR(rareInheritedDat a, textSecurity, aTextSecurity); } | 1377 void setTextSecurity(ETextSecurity aTextSecurity) { SET_VAR(rareInheritedDat a, textSecurity, aTextSecurity); } |
| 1373 void setTouchAction(TouchAction t) { SET_VAR(rareNonInheritedData, m_touchAc tion, t); } | 1378 void setTouchAction(TouchAction t) { SET_VAR(rareNonInheritedData, m_touchAc tion, t); } |
| 1374 void setTouchActionDelay(TouchActionDelay t) { SET_VAR(rareInheritedData, m_ touchActionDelay, t); } | 1379 void setTouchActionDelay(TouchActionDelay t) { SET_VAR(rareInheritedData, m_ touchActionDelay, t); } |
| 1375 | 1380 |
| 1376 void setScrollBehavior(ScrollBehavior b) { SET_VAR(rareNonInheritedData, m_s crollBehavior, b); } | 1381 void setScrollBehavior(ScrollBehavior b) { SET_VAR(rareNonInheritedData, m_s crollBehavior, b); } |
| 1377 | 1382 |
| 1383 void setWillChangeProperties(const Vector<CSSPropertyID>& properties) { SET_ VAR(rareNonInheritedData.access()->m_willChange, m_properties, properties); } | |
|
eseidel
2014/02/18 23:33:52
We'll end up copying the vector here. That's not
| |
| 1384 void setWillChangeContents(bool b) { SET_VAR(rareNonInheritedData.access()-> m_willChange, m_contents, b); } | |
| 1385 void setWillChangeScrollPosition(bool b) { SET_VAR(rareNonInheritedData.acce ss()->m_willChange, m_scrollPosition, b); } | |
| 1386 | |
| 1378 const SVGRenderStyle* svgStyle() const { return m_svgStyle.get(); } | 1387 const SVGRenderStyle* svgStyle() const { return m_svgStyle.get(); } |
| 1379 SVGRenderStyle* accessSVGStyle() { return m_svgStyle.access(); } | 1388 SVGRenderStyle* accessSVGStyle() { return m_svgStyle.access(); } |
| 1380 | 1389 |
| 1381 const SVGPaint::SVGPaintType& fillPaintType() const { return svgStyle()->fil lPaintType(); } | 1390 const SVGPaint::SVGPaintType& fillPaintType() const { return svgStyle()->fil lPaintType(); } |
| 1382 Color fillPaintColor() const { return svgStyle()->fillPaintColor(); } | 1391 Color fillPaintColor() const { return svgStyle()->fillPaintColor(); } |
| 1383 void setFillPaintColor(const Color& c) { accessSVGStyle()->setFillPaint(SVGP aint::SVG_PAINTTYPE_RGBCOLOR, c, ""); } | 1392 void setFillPaintColor(const Color& c) { accessSVGStyle()->setFillPaint(SVGP aint::SVG_PAINTTYPE_RGBCOLOR, c, ""); } |
| 1384 float fillOpacity() const { return svgStyle()->fillOpacity(); } | 1393 float fillOpacity() const { return svgStyle()->fillOpacity(); } |
| 1385 void setFillOpacity(float f) { accessSVGStyle()->setFillOpacity(f); } | 1394 void setFillOpacity(float f) { accessSVGStyle()->setFillOpacity(f); } |
| 1386 | 1395 |
| 1387 const SVGPaint::SVGPaintType& strokePaintType() const { return svgStyle()->s trokePaintType(); } | 1396 const SVGPaint::SVGPaintType& strokePaintType() const { return svgStyle()->s trokePaintType(); } |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1869 } | 1878 } |
| 1870 | 1879 |
| 1871 inline bool RenderStyle::hasPseudoElementStyle() const | 1880 inline bool RenderStyle::hasPseudoElementStyle() const |
| 1872 { | 1881 { |
| 1873 return noninherited_flags._pseudoBits & PSEUDO_ELEMENT_MASK; | 1882 return noninherited_flags._pseudoBits & PSEUDO_ELEMENT_MASK; |
| 1874 } | 1883 } |
| 1875 | 1884 |
| 1876 } // namespace WebCore | 1885 } // namespace WebCore |
| 1877 | 1886 |
| 1878 #endif // RenderStyle_h | 1887 #endif // RenderStyle_h |
| OLD | NEW |