Changeset 84156 in webkit
- Timestamp:
- Apr 18, 2011 10:14:03 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r84152 r84156 1 2011-04-15 MORITA Hajime <morrita@google.com> 2 3 Reviewed by Adam Barth. 4 5 REGRESSION: <progress> doesn't animate if it doesn't have value 6 https://bugs.webkit.org/show_bug.cgi?id=58693 7 8 The initial value of RenderProgress::m_position is accidentally same as 9 the indeterminate value, that makes update code on updateFromElement() skipped. 10 This change set unique invalid value for the initial value of m_position. 11 12 No new tests. Testing animated bar is not possible with DRT. 13 14 * html/HTMLProgressElement.cpp: 15 (WebCore::HTMLProgressElement::position): 16 * html/HTMLProgressElement.h: 17 * rendering/RenderProgress.cpp: 18 (WebCore::RenderProgress::RenderProgress): 19 (WebCore::RenderProgress::isDeterminate): 20 1 21 2011-04-18 MORITA Hajime <morrita@google.com> 2 22 -
trunk/Source/WebCore/html/HTMLProgressElement.cpp
r83256 r84156 39 39 40 40 using namespace HTMLNames; 41 42 const double HTMLProgressElement::IndeterminatePosition = -1; 43 const double HTMLProgressElement::InvalidPosition = -2; 41 44 42 45 HTMLProgressElement::HTMLProgressElement(const QualifiedName& tagName, Document* document, HTMLFormElement* form) … … 124 127 { 125 128 if (!hasAttribute(valueAttr)) 126 return -1;129 return HTMLProgressElement::IndeterminatePosition; 127 130 return value() / max(); 128 131 } -
trunk/Source/WebCore/html/HTMLProgressElement.h
r83065 r84156 31 31 class HTMLProgressElement : public HTMLFormControlElement { 32 32 public: 33 static const double IndeterminatePosition; 34 static const double InvalidPosition; 35 33 36 static PassRefPtr<HTMLProgressElement> create(const QualifiedName&, Document*, HTMLFormElement*); 34 37 -
trunk/Source/WebCore/rendering/RenderProgress.cpp
r83065 r84156 39 39 RenderProgress::RenderProgress(HTMLProgressElement* element) 40 40 : RenderBlock(element) 41 , m_position( -1)41 , m_position(HTMLProgressElement::InvalidPosition) 42 42 , m_animationStartTime(0) 43 43 , m_animationRepeatInterval(0) … … 70 70 bool RenderProgress::isDeterminate() const 71 71 { 72 return 0 <= position(); 72 return (HTMLProgressElement::IndeterminatePosition != position() 73 && HTMLProgressElement::InvalidPosition != position()); 73 74 } 74 75
Note: See TracChangeset
for help on using the changeset viewer.