OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 bool MeterInnerElement::rendererIsNeeded(const NodeRenderingContext& context) | 73 bool MeterInnerElement::rendererIsNeeded(const NodeRenderingContext& context) |
74 { | 74 { |
75 if (meterElement()->hasAuthorShadowRoot()) | 75 if (meterElement()->hasAuthorShadowRoot()) |
76 return HTMLDivElement::rendererIsNeeded(context); | 76 return HTMLDivElement::rendererIsNeeded(context); |
77 | 77 |
78 RenderObject* render = meterElement()->renderer(); | 78 RenderObject* render = meterElement()->renderer(); |
79 return render && !render->theme()->supportsMeter(render->style()->appearance
()) && HTMLDivElement::rendererIsNeeded(context); | 79 return render && !render->theme()->supportsMeter(render->style()->appearance
()) && HTMLDivElement::rendererIsNeeded(context); |
80 } | 80 } |
81 | 81 |
82 RenderObject* MeterInnerElement::createRenderer(RenderArena* arena, RenderStyle*
) | 82 RenderObject* MeterInnerElement::createRenderer(RenderStyle*) |
83 { | 83 { |
84 return new (arena) RenderMeter(this); | 84 return new RenderMeter(this); |
85 } | 85 } |
86 | 86 |
87 inline MeterBarElement::MeterBarElement(Document* document) | 87 inline MeterBarElement::MeterBarElement(Document* document) |
88 : MeterShadowElement(document) | 88 : MeterShadowElement(document) |
89 { | 89 { |
90 } | 90 } |
91 | 91 |
92 PassRefPtr<MeterBarElement> MeterBarElement::create(Document* document) | 92 PassRefPtr<MeterBarElement> MeterBarElement::create(Document* document) |
93 { | 93 { |
94 RefPtr<MeterBarElement> element = adoptRef(new MeterBarElement(document)); | 94 RefPtr<MeterBarElement> element = adoptRef(new MeterBarElement(document)); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 return optimumPseudoId; | 130 return optimumPseudoId; |
131 } | 131 } |
132 } | 132 } |
133 | 133 |
134 void MeterValueElement::setWidthPercentage(double width) | 134 void MeterValueElement::setWidthPercentage(double width) |
135 { | 135 { |
136 setInlineStyleProperty(CSSPropertyWidth, width, CSSPrimitiveValue::CSS_PERCE
NTAGE); | 136 setInlineStyleProperty(CSSPropertyWidth, width, CSSPrimitiveValue::CSS_PERCE
NTAGE); |
137 } | 137 } |
138 | 138 |
139 } | 139 } |
OLD | NEW |