https://bugs.webkit.org/show_bug.cgi?id=74965
Patch by Greg Billock <gbillock@google.com> on 2012-01-19
Reviewed by Simon Fraser.
Test: fast/canvas/script-tests/canvas-webkitLineDash.js
* html/HTMLFormCollection.cpp:
(WebCore::HTMLFormCollection::HTMLFormCollection):
* html/StepRange.cpp:
(WebCore::StepRange::StepRange):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::State::State):
* html/canvas/CanvasStyle.h:
(WebCore::CanvasStyle::CMYKAValues::CMYKAValues):
* html/canvas/WebGLGetInfo.cpp:
(WebCore::WebGLGetInfo::WebGLGetInfo):
* html/parser/CSSPreloadScanner.cpp:
(WebCore::CSSPreloadScanner::CSSPreloadScanner):
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::WebVTTParser):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105457
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
shouldBe('lineDash[0]', '15');
shouldBe('lineDash[1]', '10');
shouldBe('ctx.webkitLineDashOffset', '5');
+
+// Verify that line dash offset persists after
+// clearRect (which causes a save/restore of the context
+// state to the stack).
+ctx.clearRect(0, 0, 700, 700);
+shouldBe('ctx.webkitLineDashOffset', '5');
+2012-01-19 Greg Billock <gbillock@google.com>
+
+ [Coverity] Fix uninitialized constructor defects in .../html
+ https://bugs.webkit.org/show_bug.cgi?id=74965
+
+ Reviewed by Simon Fraser.
+
+ Test: fast/canvas/script-tests/canvas-webkitLineDash.js
+
+ * html/HTMLFormCollection.cpp:
+ (WebCore::HTMLFormCollection::HTMLFormCollection):
+ * html/StepRange.cpp:
+ (WebCore::StepRange::StepRange):
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::State::State):
+ * html/canvas/CanvasStyle.h:
+ (WebCore::CanvasStyle::CMYKAValues::CMYKAValues):
+ * html/canvas/WebGLGetInfo.cpp:
+ (WebCore::WebGLGetInfo::WebGLGetInfo):
+ * html/parser/CSSPreloadScanner.cpp:
+ (WebCore::CSSPreloadScanner::CSSPreloadScanner):
+ * html/track/WebVTTParser.cpp:
+ (WebCore::WebVTTParser::WebVTTParser):
+
2012-01-19 Alexandru Chiculita <achicu@adobe.com>
CSS Shaders: Remove the setTimeout from the layout tests
HTMLFormCollection::HTMLFormCollection(HTMLFormElement* form)
: HTMLCollection(form, OtherCollection)
+ , currentPos(0)
{
}
StepRange::StepRange(const HTMLInputElement* element)
{
- if (element->hasAttribute(precisionAttr)) {
- step = 1.0;
+ step = 1;
+ if (element->hasAttribute(precisionAttr))
hasStep = !equalIgnoringCase(element->getAttribute(precisionAttr), "float");
- } else
+ else
hasStep = element->getAllowedValueStep(&step);
maximum = element->maximum();
, m_globalComposite(other.m_globalComposite)
, m_transform(other.m_transform)
, m_invertibleCTM(other.m_invertibleCTM)
+ , m_lineDashOffset(other.m_lineDashOffset)
, m_textAlign(other.m_textAlign)
, m_textBaseline(other.m_textBaseline)
, m_unparsedFont(other.m_unparsedFont)
RefPtr<CanvasPattern> m_pattern;
struct CMYKAValues {
- CMYKAValues() {}
- CMYKAValues(float cyan, float magenta, float yellow, float black, float alpha) : c(cyan), m(magenta), y(yellow), k(black), a(alpha) {}
+ CMYKAValues() : c(0), m(0), y(0), k(0), a(0) { }
+ CMYKAValues(float cyan, float magenta, float yellow, float black, float alpha) : c(cyan), m(magenta), y(yellow), k(black), a(alpha) { }
float c;
float m;
float y;
WebGLGetInfo::WebGLGetInfo(bool value)
: m_type(kTypeBool)
, m_bool(value)
+ , m_float(0)
+ , m_int(0)
+ , m_unsignedInt(0)
{
}
WebGLGetInfo::WebGLGetInfo(const bool* value, int size)
: m_type(kTypeBoolArray)
+ , m_bool(false)
+ , m_float(0)
+ , m_int(0)
+ , m_unsignedInt(0)
{
if (!value || size <=0)
return;
WebGLGetInfo::WebGLGetInfo(float value)
: m_type(kTypeFloat)
+ , m_bool(false)
, m_float(value)
+ , m_int(0)
+ , m_unsignedInt(0)
{
}
WebGLGetInfo::WebGLGetInfo(int value)
: m_type(kTypeInt)
+ , m_bool(false)
+ , m_float(0)
, m_int(value)
+ , m_unsignedInt(0)
{
}
WebGLGetInfo::WebGLGetInfo()
: m_type(kTypeNull)
+ , m_bool(false)
+ , m_float(0)
+ , m_int(0)
+ , m_unsignedInt(0)
{
}
WebGLGetInfo::WebGLGetInfo(const String& value)
: m_type(kTypeString)
+ , m_bool(false)
+ , m_float(0)
+ , m_int(0)
, m_string(value)
+ , m_unsignedInt(0)
{
}
WebGLGetInfo::WebGLGetInfo(unsigned int value)
: m_type(kTypeUnsignedInt)
+ , m_bool(false)
+ , m_float(0)
+ , m_int(0)
, m_unsignedInt(value)
{
}
WebGLGetInfo::WebGLGetInfo(PassRefPtr<WebGLBuffer> value)
: m_type(kTypeWebGLBuffer)
+ , m_bool(false)
+ , m_float(0)
+ , m_int(0)
+ , m_unsignedInt(0)
, m_webglBuffer(value)
{
}
WebGLGetInfo::WebGLGetInfo(PassRefPtr<Float32Array> value)
: m_type(kTypeWebGLFloatArray)
+ , m_bool(false)
+ , m_float(0)
+ , m_int(0)
+ , m_unsignedInt(0)
, m_webglFloatArray(value)
{
}
WebGLGetInfo::WebGLGetInfo(PassRefPtr<WebGLFramebuffer> value)
: m_type(kTypeWebGLFramebuffer)
+ , m_bool(false)
+ , m_float(0)
+ , m_int(0)
+ , m_unsignedInt(0)
, m_webglFramebuffer(value)
{
}
WebGLGetInfo::WebGLGetInfo(PassRefPtr<Int32Array> value)
: m_type(kTypeWebGLIntArray)
+ , m_bool(false)
+ , m_float(0)
+ , m_int(0)
+ , m_unsignedInt(0)
, m_webglIntArray(value)
{
}
WebGLGetInfo::WebGLGetInfo(PassRefPtr<WebGLProgram> value)
: m_type(kTypeWebGLProgram)
+ , m_bool(false)
+ , m_float(0)
+ , m_int(0)
+ , m_unsignedInt(0)
, m_webglProgram(value)
{
}
WebGLGetInfo::WebGLGetInfo(PassRefPtr<WebGLRenderbuffer> value)
: m_type(kTypeWebGLRenderbuffer)
+ , m_bool(false)
+ , m_float(0)
+ , m_int(0)
+ , m_unsignedInt(0)
, m_webglRenderbuffer(value)
{
}
WebGLGetInfo::WebGLGetInfo(PassRefPtr<WebGLTexture> value)
: m_type(kTypeWebGLTexture)
+ , m_bool(false)
+ , m_float(0)
+ , m_int(0)
+ , m_unsignedInt(0)
, m_webglTexture(value)
{
}
WebGLGetInfo::WebGLGetInfo(PassRefPtr<Uint8Array> value)
: m_type(kTypeWebGLUnsignedByteArray)
+ , m_bool(false)
+ , m_float(0)
+ , m_int(0)
+ , m_unsignedInt(0)
, m_webglUnsignedByteArray(value)
{
}
WebGLGetInfo::WebGLGetInfo(PassRefPtr<WebGLVertexArrayObjectOES> value)
: m_type(kTypeWebGLVertexArrayObjectOES)
+ , m_bool(false)
+ , m_float(0)
+ , m_int(0)
+ , m_unsignedInt(0)
, m_webglVertexArrayObject(value)
{
}
CSSPreloadScanner::CSSPreloadScanner(Document* document)
: m_state(Initial)
+ , m_scanningBody(false)
, m_document(document)
{
}
WebVTTParser::WebVTTParser(WebVTTParserClient* client, ScriptExecutionContext* context)
: m_scriptExecutionContext(context)
, m_state(Initial)
+ , m_currentStartTime(0)
+ , m_currentEndTime(0)
, m_tokenizer(WebVTTTokenizer::create())
, m_client(client)
{