Commit 3c25011b authored by ddkilzer@apple.com's avatar ddkilzer@apple.com

WebCore: HTML5 Conformance Test failure: approved/xhtml5/object_border_pixel.xhtml

https://bugs.webkit.org/show_bug.cgi?id=48596

Patch by Julie-Jeongeun-Kim <Jeongeun.Kim@obigo.com> on 2011-01-03
Reviewed by Darin Adler.

border attribute was not parsed in HTMLObjectElement.
I added code for it as HTMLImageElement handled.

new test:fast/html/object-border.html

* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseMappedAttribute):

LayoutTests: HTML5 Conformance Test failure: approved/xhtml5/object_border_pixel.xhtml
https://bugs.webkit.org/show_bug.cgi?id=48596

Patch by Julie-Jeongeun-Kim <Jeongeun.Kim@obigo.com> on 2011-01-03
Reviewed by Darin Adler.

* fast/html/object-border-expected.txt: Added.
* fast/html/object-border.html: Added.
* fast/html/resources/images/blue-border.png: Added.
* fast/html/resources/images/blue.png: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2e91ccf2
2011-01-03 Julie-Jeongeun-Kim <Jeongeun.Kim@obigo.com>
Reviewed by Darin Adler.
HTML5 Conformance Test failure: approved/xhtml5/object_border_pixel.xhtml
https://bugs.webkit.org/show_bug.cgi?id=48596
* fast/html/object-border-expected.txt: Added.
* fast/html/object-border.html: Added.
* fast/html/resources/images/blue-border.png: Added.
* fast/html/resources/images/blue.png: Added.
2010-12-20 Abhishek Arya <inferno@chromium.org>
Reviewed by Darin Adler.
......
Tests for border attribute with Object tag
Bug 48596 : HTML5 Conformance Test failure: approved/xhtml5/object_border_pixel.xhtml
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Title Actual Image Expected Image
Object Tag with border="50" px
PASS border-top-width is 50px.
PASS border-left-width is 50px.
PASS border-bottom-width is 50px.
PASS border-right-width is 50px.
PASS successfullyParsed is true
TEST COMPLETE
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<link rel="stylesheet" href="../js/resources/js-test-style.css">
<script src="../js/resources/js-test-pre.js"></script>
<title>OBJECT - border=pixel</title>
</head>
<p id="description"></p>
<table border="">
<thead>
<tr>
<th> Title </th>
<th> Actual Image </th>
<th> Expected Image </th>
</tr>
</thead>
<tr><td><div valing="center"> Object Tag with border="50" px </div></td>
<td><object id="objID" data="./resources/images/blue.png" type="image/png" border="50"></object></td>
<td><img src="./resources/images/blue-border.png" /></td>
</tr>
</table>
<div id="console"></div>
<script type="text/javascript">
description('Tests for border attribute with Object tag<br/><a href="https://bugs.webkit.org/show_bug.cgi?id=48596">Bug 48596</a> : HTML5 Conformance Test failure: approved/xhtml5/object_border_pixel.xhtml</p>');
function getStyle(el,styleProp)
{
var x = document.getElementById(el);
if (x.currentStyle)
var y = x.currentStyle[styleProp];
else if (window.getComputedStyle)
var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);
return y;
}
function startTests(prop)
{
var value = getStyle('objID', prop);
if (value =="50px")
testPassed(prop + " is " + "50px.");
else
testFailed(prop + " should be " + "50px" + ". Was " + value);
}
startTests("border-top-width");
startTests("border-left-width");
startTests("border-bottom-width");
startTests("border-right-width");
var successfullyParsed = true;
</script>
<script src="../js/resources/js-test-post.js"></script>
</body>
</html>
2011-01-03 Julie-Jeongeun-Kim <Jeongeun.Kim@obigo.com>
Reviewed by Darin Adler.
HTML5 Conformance Test failure: approved/xhtml5/object_border_pixel.xhtml
https://bugs.webkit.org/show_bug.cgi?id=48596
border attribute was not parsed in HTMLObjectElement.
I added code for it as HTMLImageElement handled.
new test:fast/html/object-border.html
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseMappedAttribute):
2011-01-03 Darin Adler <darin@apple.com>
Try to fix Chromium build.
......
......@@ -25,6 +25,7 @@
#include "HTMLObjectElement.h"
#include "Attribute.h"
#include "CSSValueKeywords.h"
#include "EventNames.h"
#include "ExceptionCode.h"
#include "Frame.h"
......@@ -113,6 +114,12 @@ void HTMLObjectElement::parseMappedAttribute(Attribute* attr)
document->addNamedItem(newName);
}
m_name = newName;
} else if (attr->name() == borderAttr) {
addCSSLength(attr, CSSPropertyBorderWidth, attr->value().toInt() ? attr->value() : "0");
addCSSProperty(attr, CSSPropertyBorderTopStyle, CSSValueSolid);
addCSSProperty(attr, CSSPropertyBorderRightStyle, CSSValueSolid);
addCSSProperty(attr, CSSPropertyBorderBottomStyle, CSSValueSolid);
addCSSProperty(attr, CSSPropertyBorderLeftStyle, CSSValueSolid);
} else if (isIdAttributeName(attr->name())) {
const AtomicString& newId = attr->value();
if (isDocNamedItem() && inDocument() && document()->isHTMLDocument()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment