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

Side by Side Diff: Source/core/rendering/style/RenderStyle.h

Issue 17450016: Implementation of CSS3 nav-up/down/left/right properties from CSS3 UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Applied code review suggestions. Also rebased. Created 6 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 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
7 * 8 *
8 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 11 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version. 12 * version 2 of the License, or (at your option) any later version.
12 * 13 *
13 * This library is distributed in the hope that it will be useful, 14 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details. 17 * Library General Public License for more details.
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 void applyTransform(TransformationMatrix&, const LayoutSize& borderBoxSize, ApplyTransformOrigin = IncludeTransformOrigin) const; 886 void applyTransform(TransformationMatrix&, const LayoutSize& borderBoxSize, ApplyTransformOrigin = IncludeTransformOrigin) const;
886 void applyTransform(TransformationMatrix&, const FloatRect& boundingBox, App lyTransformOrigin = IncludeTransformOrigin) const; 887 void applyTransform(TransformationMatrix&, const FloatRect& boundingBox, App lyTransformOrigin = IncludeTransformOrigin) const;
887 888
888 bool hasMask() const { return rareNonInheritedData->m_mask.hasImage() || rar eNonInheritedData->m_maskBoxImage.hasImage(); } 889 bool hasMask() const { return rareNonInheritedData->m_mask.hasImage() || rar eNonInheritedData->m_maskBoxImage.hasImage(); }
889 890
890 TextCombine textCombine() const { return static_cast<TextCombine>(rareNonInh eritedData->m_textCombine); } 891 TextCombine textCombine() const { return static_cast<TextCombine>(rareNonInh eritedData->m_textCombine); }
891 bool hasTextCombine() const { return textCombine() != TextCombineNone; } 892 bool hasTextCombine() const { return textCombine() != TextCombineNone; }
892 893
893 unsigned tabSize() const { return rareInheritedData->m_tabSize; } 894 unsigned tabSize() const { return rareInheritedData->m_tabSize; }
894 895
896 StyleNavigationValue navDown() const { return rareNonInheritedData->navDown( ); }
897 StyleNavigationValue navLeft() const { return rareNonInheritedData->navLeft( ); }
898 StyleNavigationValue navRight() const { return rareNonInheritedData->navRigh t(); }
899 StyleNavigationValue navUp() const { return rareNonInheritedData->navUp(); }
900
895 // End CSS3 Getters 901 // End CSS3 Getters
896 902
897 WrapFlow wrapFlow() const { return static_cast<WrapFlow>(rareNonInheritedDat a->m_wrapFlow); } 903 WrapFlow wrapFlow() const { return static_cast<WrapFlow>(rareNonInheritedDat a->m_wrapFlow); }
898 WrapThrough wrapThrough() const { return static_cast<WrapThrough>(rareNonInh eritedData->m_wrapThrough); } 904 WrapThrough wrapThrough() const { return static_cast<WrapThrough>(rareNonInh eritedData->m_wrapThrough); }
899 905
900 // Apple-specific property getter methods 906 // Apple-specific property getter methods
901 EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(in herited_flags._pointerEvents); } 907 EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(in herited_flags._pointerEvents); }
902 const CSSAnimationDataList* animations() const { return rareNonInheritedData ->m_animations.get(); } 908 const CSSAnimationDataList* animations() const { return rareNonInheritedData ->m_animations.get(); }
903 const CSSAnimationDataList* transitions() const { return rareNonInheritedDat a->m_transitions.get(); } 909 const CSSAnimationDataList* transitions() const { return rareNonInheritedDat a->m_transitions.get(); }
904 910
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
1342 1348
1343 void setObjectFit(ObjectFit f) { SET_VAR(rareNonInheritedData, m_objectFit, f); } 1349 void setObjectFit(ObjectFit f) { SET_VAR(rareNonInheritedData, m_objectFit, f); }
1344 void setObjectPosition(LengthPoint position) { SET_VAR(rareNonInheritedData, m_objectPosition, position); } 1350 void setObjectPosition(LengthPoint position) { SET_VAR(rareNonInheritedData, m_objectPosition, position); }
1345 1351
1346 void setRubyPosition(RubyPosition position) { SET_VAR(rareInheritedData, m_r ubyPosition, position); } 1352 void setRubyPosition(RubyPosition position) { SET_VAR(rareInheritedData, m_r ubyPosition, position); }
1347 1353
1348 void setFilter(const FilterOperations& ops) { SET_VAR(rareNonInheritedData.a ccess()->m_filter, m_operations, ops); } 1354 void setFilter(const FilterOperations& ops) { SET_VAR(rareNonInheritedData.a ccess()->m_filter, m_operations, ops); }
1349 1355
1350 void setTabSize(unsigned size) { SET_VAR(rareInheritedData, m_tabSize, size) ; } 1356 void setTabSize(unsigned size) { SET_VAR(rareInheritedData, m_tabSize, size) ; }
1351 1357
1358 void setNavDown(const StyleNavigationValue& value) { SET_VAR_WITH_SETTER(rar eNonInheritedData, navDown, setNavDown, value); }
1359 void setNavLeft(const StyleNavigationValue& value) { SET_VAR_WITH_SETTER(rar eNonInheritedData, navLeft, setNavLeft, value); }
1360 void setNavRight(const StyleNavigationValue& value) { SET_VAR_WITH_SETTER(ra reNonInheritedData, navRight, setNavRight, value); }
1361 void setNavUp(const StyleNavigationValue& value) { SET_VAR_WITH_SETTER(rareN onInheritedData, navUp, setNavUp, value); }
1352 // End CSS3 Setters 1362 // End CSS3 Setters
1353 1363
1354 void setWrapFlow(WrapFlow wrapFlow) { SET_VAR(rareNonInheritedData, m_wrapFl ow, wrapFlow); } 1364 void setWrapFlow(WrapFlow wrapFlow) { SET_VAR(rareNonInheritedData, m_wrapFl ow, wrapFlow); }
1355 void setWrapThrough(WrapThrough wrapThrough) { SET_VAR(rareNonInheritedData, m_wrapThrough, wrapThrough); } 1365 void setWrapThrough(WrapThrough wrapThrough) { SET_VAR(rareNonInheritedData, m_wrapThrough, wrapThrough); }
1356 1366
1357 // Apple-specific property setters 1367 // Apple-specific property setters
1358 void setPointerEvents(EPointerEvents p) { inherited_flags._pointerEvents = p ; } 1368 void setPointerEvents(EPointerEvents p) { inherited_flags._pointerEvents = p ; }
1359 1369
1360 void clearAnimations() 1370 void clearAnimations()
1361 { 1371 {
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
1691 static GridPosition initialGridRowStart() { return GridPosition(); } 1701 static GridPosition initialGridRowStart() { return GridPosition(); }
1692 static GridPosition initialGridRowEnd() { return GridPosition(); } 1702 static GridPosition initialGridRowEnd() { return GridPosition(); }
1693 1703
1694 static unsigned initialTabSize() { return 8; } 1704 static unsigned initialTabSize() { return 8; }
1695 1705
1696 static WrapFlow initialWrapFlow() { return WrapFlowAuto; } 1706 static WrapFlow initialWrapFlow() { return WrapFlowAuto; }
1697 static WrapThrough initialWrapThrough() { return WrapThroughWrap; } 1707 static WrapThrough initialWrapThrough() { return WrapThroughWrap; }
1698 1708
1699 static QuotesData* initialQuotes() { return 0; } 1709 static QuotesData* initialQuotes() { return 0; }
1700 1710
1711 static StyleNavigationValue initialStyleNavigation() { DEFINE_STATIC_LOCAL(S tyleNavigationValue, initialNavigation, ()); return initialNavigation; }
1712
1701 // Keep these at the end. 1713 // Keep these at the end.
1702 // FIXME: Why? Seems these should all be one big sorted list. 1714 // FIXME: Why? Seems these should all be one big sorted list.
1703 static LineClampValue initialLineClamp() { return LineClampValue(); } 1715 static LineClampValue initialLineClamp() { return LineClampValue(); }
1704 static ETextSecurity initialTextSecurity() { return TSNONE; } 1716 static ETextSecurity initialTextSecurity() { return TSNONE; }
1705 static Color initialTapHighlightColor(); 1717 static Color initialTapHighlightColor();
1706 static const FilterOperations& initialFilter() { DEFINE_STATIC_LOCAL(FilterO perations, ops, ()); return ops; } 1718 static const FilterOperations& initialFilter() { DEFINE_STATIC_LOCAL(FilterO perations, ops, ()); return ops; }
1707 static blink::WebBlendMode initialBlendMode() { return blink::WebBlendModeNo rmal; } 1719 static blink::WebBlendMode initialBlendMode() { return blink::WebBlendModeNo rmal; }
1708 static EIsolation initialIsolation() { return IsolationAuto; } 1720 static EIsolation initialIsolation() { return IsolationAuto; }
1709 private: 1721 private:
1710 void setVisitedLinkColor(const Color&); 1722 void setVisitedLinkColor(const Color&);
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 inline bool RenderStyle::hasPseudoElementStyle() const 1880 inline bool RenderStyle::hasPseudoElementStyle() const
1869 { 1881 {
1870 return noninherited_flags._pseudoBits & PSEUDO_ELEMENT_MASK; 1882 return noninherited_flags._pseudoBits & PSEUDO_ELEMENT_MASK;
1871 } 1883 }
1872 1884
1873 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&); 1885 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&);
1874 1886
1875 } // namespace WebCore 1887 } // namespace WebCore
1876 1888
1877 #endif // RenderStyle_h 1889 #endif // RenderStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698