Bug 567350 - Make getComputedStyle's second argument optional; r=bzbarsky a=jst

This commit is contained in:
Ms2ger 2010-10-16 13:54:47 +02:00
parent baa6ce418a
commit b1bed27299
3 changed files with 31 additions and 2 deletions

View File

@ -417,11 +417,12 @@ _TEST_FILES2 = \
test_websocket.html \
file_websocket_wsh.py \
file_websocket_http_resource.txt \
test_bug574596.html \
test_x-frame-options.html \
file_x-frame-options_main.html \
file_x-frame-options_page.sjs \
test_createHTMLDocument.html \
test_bug567350.html \
test_bug574596.html \
test_bug578096.html \
test_bug598877.html \
test_bug600466.html \

View File

@ -0,0 +1,25 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=567350
-->
<head>
<title>Test for Bug 567350</title>
<script src="/MochiKit/packed.js"></script>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=567350">Mozilla Bug 567350</a>
<p id="display"><span style="color: blue;"></span></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 567350 **/
is(getComputedStyle(document.getElementById("display").firstChild).color,
"rgb(0, 0, 255)");
</script>
</pre>
</body>
</html>

View File

@ -41,6 +41,9 @@
[scriptable, uuid(0b9341f3-95d4-4fa4-adcd-e119e0db2889)]
interface nsIDOMViewCSS : nsIDOMAbstractView
{
/**
* @see <http://dev.w3.org/csswg/cssom/#dom-window-getcomputedstyle>
*/
nsIDOMCSSStyleDeclaration getComputedStyle(in nsIDOMElement elt,
in DOMString pseudoElt);
[optional] in DOMString pseudoElt);
};