OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 return; | 890 return; |
891 const CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 891 const CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
892 if (!primitiveValue->getValueID()) | 892 if (!primitiveValue->getValueID()) |
893 return; | 893 return; |
894 state.style()->setDraggableRegionMode(primitiveValue->getValueID() == CSSVal
ueDrag ? DraggableRegionDrag : DraggableRegionNoDrag); | 894 state.style()->setDraggableRegionMode(primitiveValue->getValueID() == CSSVal
ueDrag ? DraggableRegionDrag : DraggableRegionNoDrag); |
895 state.document().setHasAnnotatedRegions(true); | 895 state.document().setHasAnnotatedRegions(true); |
896 } | 896 } |
897 | 897 |
898 void StyleBuilderFunctions::applyValueCSSPropertyWebkitWritingMode(StyleResolver
State& state, CSSValue* value) | 898 void StyleBuilderFunctions::applyValueCSSPropertyWebkitWritingMode(StyleResolver
State& state, CSSValue* value) |
899 { | 899 { |
900 if (value->isPrimitiveValue()) | 900 if (value->isPrimitiveValue()) { |
901 state.setWritingMode(*toCSSPrimitiveValue(value)); | 901 WritingMode writingMode = *toCSSPrimitiveValue(value); |
| 902 state.setWritingMode(writingMode); |
| 903 if (writingMode != TopToBottomWritingMode) |
| 904 state.document().setContainsAnyRareWritingMode(true); |
| 905 } |
902 | 906 |
903 // FIXME: It is not ok to modify document state while applying style. | 907 // FIXME: It is not ok to modify document state while applying style. |
904 if (state.element() && state.element() == state.document().documentElement()
) | 908 if (state.element() && state.element() == state.document().documentElement()
) |
905 state.document().setWritingModeSetOnDocumentElement(true); | 909 state.document().setWritingModeSetOnDocumentElement(true); |
906 } | 910 } |
907 | 911 |
908 void StyleBuilderFunctions::applyValueCSSPropertyWebkitTextOrientation(StyleReso
lverState& state, CSSValue* value) | 912 void StyleBuilderFunctions::applyValueCSSPropertyWebkitTextOrientation(StyleReso
lverState& state, CSSValue* value) |
909 { | 913 { |
910 if (value->isPrimitiveValue()) | 914 if (value->isPrimitiveValue()) |
911 state.setTextOrientation(*toCSSPrimitiveValue(value)); | 915 state.setTextOrientation(*toCSSPrimitiveValue(value)); |
(...skipping 27 matching lines...) Expand all Loading... |
939 return; | 943 return; |
940 case CSSValueSuper: | 944 case CSSValueSuper: |
941 svgStyle.setBaselineShift(BS_SUPER); | 945 svgStyle.setBaselineShift(BS_SUPER); |
942 return; | 946 return; |
943 default: | 947 default: |
944 ASSERT_NOT_REACHED(); | 948 ASSERT_NOT_REACHED(); |
945 } | 949 } |
946 } | 950 } |
947 | 951 |
948 } // namespace blink | 952 } // namespace blink |
OLD | NEW |