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

Side by Side Diff: Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 758073003: Always propagate direction and writing-mode from <body>. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added XML and overconstraining tests. Created 6 years 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) 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 } 245 }
246 } 246 }
247 } else { 247 } else {
248 state.style()->setCursor(*toCSSPrimitiveValue(value)); 248 state.style()->setCursor(*toCSSPrimitiveValue(value));
249 } 249 }
250 } 250 }
251 251
252 void StyleBuilderFunctions::applyValueCSSPropertyDirection(StyleResolverState& s tate, CSSValue* value) 252 void StyleBuilderFunctions::applyValueCSSPropertyDirection(StyleResolverState& s tate, CSSValue* value)
253 { 253 {
254 state.style()->setDirection(*toCSSPrimitiveValue(value)); 254 state.style()->setDirection(*toCSSPrimitiveValue(value));
255 Element* element = state.element();
256 if (element && element == element->document().documentElement())
257 element->document().setDirectionSetOnDocumentElement(true);
258 } 255 }
259 256
260 void StyleBuilderFunctions::applyValueCSSPropertyGlyphOrientationVertical(StyleR esolverState& state, CSSValue* value) 257 void StyleBuilderFunctions::applyValueCSSPropertyGlyphOrientationVertical(StyleR esolverState& state, CSSValue* value)
261 { 258 {
262 if (value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueAuto) 259 if (value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueAuto)
263 state.style()->accessSVGStyle().setGlyphOrientationVertical(GO_AUTO); 260 state.style()->accessSVGStyle().setGlyphOrientationVertical(GO_AUTO);
264 else 261 else
265 state.style()->accessSVGStyle().setGlyphOrientationVertical(StyleBuilder Converter::convertGlyphOrientation(state, value)); 262 state.style()->accessSVGStyle().setGlyphOrientationVertical(StyleBuilder Converter::convertGlyphOrientation(state, value));
266 } 263 }
267 264
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 if (!primitiveValue->getValueID()) 867 if (!primitiveValue->getValueID())
871 return; 868 return;
872 state.style()->setDraggableRegionMode(primitiveValue->getValueID() == CSSVal ueDrag ? DraggableRegionDrag : DraggableRegionNoDrag); 869 state.style()->setDraggableRegionMode(primitiveValue->getValueID() == CSSVal ueDrag ? DraggableRegionDrag : DraggableRegionNoDrag);
873 state.document().setHasAnnotatedRegions(true); 870 state.document().setHasAnnotatedRegions(true);
874 } 871 }
875 872
876 void StyleBuilderFunctions::applyValueCSSPropertyWebkitWritingMode(StyleResolver State& state, CSSValue* value) 873 void StyleBuilderFunctions::applyValueCSSPropertyWebkitWritingMode(StyleResolver State& state, CSSValue* value)
877 { 874 {
878 if (value->isPrimitiveValue()) 875 if (value->isPrimitiveValue())
879 state.setWritingMode(*toCSSPrimitiveValue(value)); 876 state.setWritingMode(*toCSSPrimitiveValue(value));
880 // FIXME: It is not ok to modify document state while applying style.
881 if (state.element() && state.element() == state.document().documentElement() )
882 state.document().setWritingModeSetOnDocumentElement(true);
883 } 877 }
884 878
885 void StyleBuilderFunctions::applyValueCSSPropertyWebkitTextOrientation(StyleReso lverState& state, CSSValue* value) 879 void StyleBuilderFunctions::applyValueCSSPropertyWebkitTextOrientation(StyleReso lverState& state, CSSValue* value)
886 { 880 {
887 if (value->isPrimitiveValue()) 881 if (value->isPrimitiveValue())
888 state.setTextOrientation(*toCSSPrimitiveValue(value)); 882 state.setTextOrientation(*toCSSPrimitiveValue(value));
889 } 883 }
890 884
891 void StyleBuilderFunctions::applyInheritCSSPropertyBaselineShift(StyleResolverSt ate& state) 885 void StyleBuilderFunctions::applyInheritCSSPropertyBaselineShift(StyleResolverSt ate& state)
892 { 886 {
(...skipping 23 matching lines...) Expand all
916 return; 910 return;
917 case CSSValueSuper: 911 case CSSValueSuper:
918 svgStyle.setBaselineShift(BS_SUPER); 912 svgStyle.setBaselineShift(BS_SUPER);
919 return; 913 return;
920 default: 914 default:
921 ASSERT_NOT_REACHED(); 915 ASSERT_NOT_REACHED();
922 } 916 }
923 } 917 }
924 918
925 } // namespace blink 919 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/resolver/MatchedPropertiesCache.cpp ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698