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

Side by Side Diff: sky/engine/core/css/resolver/StyleBuilderCustom.cpp

Issue 689283003: Remove scroll corners and resizers. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/css/parser/BisonCSSParser-in.cpp ('k') | sky/engine/core/frame/FrameView.h » ('j') | no next file with comments »
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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 state.style()->setOutlineStyle(state.parentStyle()->outlineStyle()); 234 state.style()->setOutlineStyle(state.parentStyle()->outlineStyle());
235 } 235 }
236 236
237 void StyleBuilderFunctions::applyValueCSSPropertyOutlineStyle(StyleResolverState & state, CSSValue* value) 237 void StyleBuilderFunctions::applyValueCSSPropertyOutlineStyle(StyleResolverState & state, CSSValue* value)
238 { 238 {
239 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); 239 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
240 state.style()->setOutlineStyleIsAuto(*primitiveValue); 240 state.style()->setOutlineStyleIsAuto(*primitiveValue);
241 state.style()->setOutlineStyle(*primitiveValue); 241 state.style()->setOutlineStyle(*primitiveValue);
242 } 242 }
243 243
244 void StyleBuilderFunctions::applyValueCSSPropertyResize(StyleResolverState& stat e, CSSValue* value)
245 {
246 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
247
248 EResize r = RESIZE_NONE;
249 if (primitiveValue->getValueID() == CSSValueAuto) {
250 if (Settings* settings = state.document().settings())
251 r = settings->textAreasAreResizable() ? RESIZE_BOTH : RESIZE_NONE;
252 } else {
253 r = *primitiveValue;
254 }
255 state.style()->setResize(r);
256 }
257
258 static Length mmLength(double mm) { return Length(mm * cssPixelsPerMillimeter, F ixed); } 244 static Length mmLength(double mm) { return Length(mm * cssPixelsPerMillimeter, F ixed); }
259 static Length inchLength(double inch) { return Length(inch * cssPixelsPerInch, F ixed); } 245 static Length inchLength(double inch) { return Length(inch * cssPixelsPerInch, F ixed); }
260 static bool getPageSizeFromName(CSSPrimitiveValue* pageSizeName, CSSPrimitiveVal ue* pageOrientation, Length& width, Length& height) 246 static bool getPageSizeFromName(CSSPrimitiveValue* pageSizeName, CSSPrimitiveVal ue* pageOrientation, Length& width, Length& height)
261 { 247 {
262 DEFINE_STATIC_LOCAL(Length, a5Width, (mmLength(148))); 248 DEFINE_STATIC_LOCAL(Length, a5Width, (mmLength(148)));
263 DEFINE_STATIC_LOCAL(Length, a5Height, (mmLength(210))); 249 DEFINE_STATIC_LOCAL(Length, a5Height, (mmLength(210)));
264 DEFINE_STATIC_LOCAL(Length, a4Width, (mmLength(210))); 250 DEFINE_STATIC_LOCAL(Length, a4Width, (mmLength(210)));
265 DEFINE_STATIC_LOCAL(Length, a4Height, (mmLength(297))); 251 DEFINE_STATIC_LOCAL(Length, a4Height, (mmLength(297)));
266 DEFINE_STATIC_LOCAL(Length, a3Width, (mmLength(297))); 252 DEFINE_STATIC_LOCAL(Length, a3Width, (mmLength(297)));
267 DEFINE_STATIC_LOCAL(Length, a3Height, (mmLength(420))); 253 DEFINE_STATIC_LOCAL(Length, a3Height, (mmLength(420)));
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 state.style()->setPerspective(perspectiveValue); 952 state.style()->setPerspective(perspectiveValue);
967 } 953 }
968 954
969 void StyleBuilderFunctions::applyValueCSSPropertyWebkitTextOrientation(StyleReso lverState& state, CSSValue* value) 955 void StyleBuilderFunctions::applyValueCSSPropertyWebkitTextOrientation(StyleReso lverState& state, CSSValue* value)
970 { 956 {
971 if (value->isPrimitiveValue()) 957 if (value->isPrimitiveValue())
972 state.setTextOrientation(*toCSSPrimitiveValue(value)); 958 state.setTextOrientation(*toCSSPrimitiveValue(value));
973 } 959 }
974 960
975 } // namespace blink 961 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/css/parser/BisonCSSParser-in.cpp ('k') | sky/engine/core/frame/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698