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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 setPseudo(pseudoId); | 63 setPseudo(pseudoId); |
64 } | 64 } |
65 | 65 |
66 PassRefPtr<ProgressInnerElement> ProgressInnerElement::create(Document* document
) | 66 PassRefPtr<ProgressInnerElement> ProgressInnerElement::create(Document* document
) |
67 { | 67 { |
68 RefPtr<ProgressInnerElement> element = adoptRef(new ProgressInnerElement(doc
ument)); | 68 RefPtr<ProgressInnerElement> element = adoptRef(new ProgressInnerElement(doc
ument)); |
69 element->setPseudo(AtomicString("-webkit-progress-inner-element", AtomicStri
ng::ConstructFromLiteral)); | 69 element->setPseudo(AtomicString("-webkit-progress-inner-element", AtomicStri
ng::ConstructFromLiteral)); |
70 return element.release(); | 70 return element.release(); |
71 } | 71 } |
72 | 72 |
73 RenderObject* ProgressInnerElement::createRenderer(RenderArena* arena, RenderSty
le*) | 73 RenderObject* ProgressInnerElement::createRenderer(RenderStyle*) |
74 { | 74 { |
75 return new (arena) RenderProgress(this); | 75 return new RenderProgress(this); |
76 } | 76 } |
77 | 77 |
78 bool ProgressInnerElement::rendererIsNeeded(const NodeRenderingContext& context) | 78 bool ProgressInnerElement::rendererIsNeeded(const NodeRenderingContext& context) |
79 { | 79 { |
80 if (progressElement()->hasAuthorShadowRoot()) | 80 if (progressElement()->hasAuthorShadowRoot()) |
81 return HTMLDivElement::rendererIsNeeded(context); | 81 return HTMLDivElement::rendererIsNeeded(context); |
82 | 82 |
83 RenderObject* progressRenderer = progressElement()->renderer(); | 83 RenderObject* progressRenderer = progressElement()->renderer(); |
84 return progressRenderer && !progressRenderer->style()->hasAppearance() && HT
MLDivElement::rendererIsNeeded(context); | 84 return progressRenderer && !progressRenderer->style()->hasAppearance() && HT
MLDivElement::rendererIsNeeded(context); |
85 } | 85 } |
86 | 86 |
87 void ProgressValueElement::setWidthPercentage(double width) | 87 void ProgressValueElement::setWidthPercentage(double width) |
88 { | 88 { |
89 setInlineStyleProperty(CSSPropertyWidth, width, CSSPrimitiveValue::CSS_PERCE
NTAGE); | 89 setInlineStyleProperty(CSSPropertyWidth, width, CSSPrimitiveValue::CSS_PERCE
NTAGE); |
90 } | 90 } |
91 | 91 |
92 } | 92 } |
OLD | NEW |