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

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

Issue 669803002: Optimize for horizontal writing mode (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: w compile fix Created 6 years, 2 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
« no previous file with comments | « no previous file | Source/core/dom/Document.h » ('j') | Source/core/rendering/RenderBox.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/Document.h » ('j') | Source/core/rendering/RenderBox.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698