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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutSliderContainer.cpp

Issue 2770123003: Replace ASSERT with DCHECK in core/layout/ excluding subdirs (Closed)
Patch Set: Split some DCHECKs and add DCHECK_ops wherever possible Created 3 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) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2010 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 : LayoutFlexibleBox(element) {} 45 : LayoutFlexibleBox(element) {}
46 46
47 inline static Decimal sliderPosition(HTMLInputElement* element) { 47 inline static Decimal sliderPosition(HTMLInputElement* element) {
48 const StepRange stepRange(element->createStepRange(RejectAny)); 48 const StepRange stepRange(element->createStepRange(RejectAny));
49 const Decimal oldValue = 49 const Decimal oldValue =
50 parseToDecimalForNumberType(element->value(), stepRange.defaultValue()); 50 parseToDecimalForNumberType(element->value(), stepRange.defaultValue());
51 return stepRange.proportionFromValue(stepRange.clampValue(oldValue)); 51 return stepRange.proportionFromValue(stepRange.clampValue(oldValue));
52 } 52 }
53 53
54 inline static bool hasVerticalAppearance(HTMLInputElement* input) { 54 inline static bool hasVerticalAppearance(HTMLInputElement* input) {
55 ASSERT(input->layoutObject()); 55 DCHECK(input->layoutObject());
56 const ComputedStyle& sliderStyle = input->layoutObject()->styleRef(); 56 const ComputedStyle& sliderStyle = input->layoutObject()->styleRef();
57 57
58 return sliderStyle.appearance() == SliderVerticalPart; 58 return sliderStyle.appearance() == SliderVerticalPart;
59 } 59 }
60 60
61 void LayoutSliderContainer::computeLogicalHeight( 61 void LayoutSliderContainer::computeLogicalHeight(
62 LayoutUnit logicalHeight, 62 LayoutUnit logicalHeight,
63 LayoutUnit logicalTop, 63 LayoutUnit logicalTop,
64 LogicalExtentComputedValues& computedValues) const { 64 LogicalExtentComputedValues& computedValues) const {
65 HTMLInputElement* input = toHTMLInputElement(node()->ownerShadowHost()); 65 HTMLInputElement* input = toHTMLInputElement(node()->ownerShadowHost());
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 // We need one-off invalidation code here because painting of the timeline 150 // We need one-off invalidation code here because painting of the timeline
151 // element does not go through style. 151 // element does not go through style.
152 // Instead it has a custom implementation in C++ code. 152 // Instead it has a custom implementation in C++ code.
153 // Therefore the style system cannot understand when it needs to be paint 153 // Therefore the style system cannot understand when it needs to be paint
154 // invalidated. 154 // invalidated.
155 setShouldDoFullPaintInvalidation(); 155 setShouldDoFullPaintInvalidation();
156 } 156 }
157 157
158 } // namespace blink 158 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutSlider.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698