Merge mozilla-central into cedar

This commit is contained in:
Ehsan Akhgari 2011-04-11 13:11:47 -04:00
Родитель d15b17b512 01671ed6dd
Коммит d532809012
97 изменённых файлов: 497 добавлений и 493 удалений

Просмотреть файл

@ -526,7 +526,7 @@ NS_IMETHODIMP nsHTMLTextFieldAccessible::GetActionName(PRUint8 aIndex, nsAString
NS_IMETHODIMP nsHTMLTextFieldAccessible::DoAction(PRUint8 index)
{
if (index == 0) {
nsCOMPtr<nsIDOMNSHTMLElement> element(do_QueryInterface(mContent));
nsCOMPtr<nsIDOMHTMLElement> element(do_QueryInterface(mContent));
if ( element ) {
return element->Focus();
}

Просмотреть файл

@ -142,7 +142,6 @@ MOZ_PROFILELOCKING = @MOZ_PROFILELOCKING@
MOZ_FEEDS = @MOZ_FEEDS@
MOZ_TOOLKIT_SEARCH = @MOZ_TOOLKIT_SEARCH@
MOZ_PLACES = @MOZ_PLACES@
MOZ_PLACES_BOOKMARKS = @MOZ_PLACES_BOOKMARKS@
MOZ_STORAGE = @MOZ_STORAGE@
MOZ_SAFE_BROWSING = @MOZ_SAFE_BROWSING@
MOZ_FASTSTART = @MOZ_FASTSTART@

Просмотреть файл

@ -8951,7 +8951,6 @@ AC_SUBST(MOZ_PROFILING)
AC_SUBST(MOZ_QUANTIFY)
AC_SUBST(LIBICONV)
AC_SUBST(MOZ_PLACES)
AC_SUBST(MOZ_PLACES_BOOKMARKS)
AC_SUBST(MOZ_STORAGE)
AC_SUBST(MOZ_TOOLKIT_SEARCH)
AC_SUBST(MOZ_FEEDS)

Просмотреть файл

@ -162,11 +162,14 @@ enum {
// Set if the node has the accesskey attribute set.
NODE_HAS_ACCESSKEY = 0x00020000U,
// Set if the node is handling a click.
NODE_HANDLING_CLICK = 0x00040000U,
// Two bits for the script-type ID. Not enough to represent all
// nsIProgrammingLanguage values, but we don't care. In practice,
// we can represent the ones we want, and we can fail the others at
// runtime.
NODE_SCRIPT_TYPE_OFFSET = 18,
NODE_SCRIPT_TYPE_OFFSET = 19,
NODE_SCRIPT_TYPE_SIZE = 2,

Просмотреть файл

@ -22,14 +22,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=409604
var modifier = Components.interfaces.nsIDOMNSEvent.ALT_MASK |
Components.interfaces.nsIDOMNSEvent.SHIFT_MASK;
var expectedFocus = "d,g,h,k,l,m,n";
var expectedFocus = "a,c,d,e,f,g,h,i,j,k,l,m,n,p,x,y";
// XXX the "map" test is causing trouble, see bug 433089
// var expectedClick = "a,b,c,e,f,i,j";
var expectedClick = "a,c,e,f,i,j";
var focusArray = expectedFocus.split(",");
var clickArray = expectedClick.split(",");
var invalidElementId = "invalid";
var invalidTags = [
var unfocusableElementId = "invalid";
var unfocusableTags = [
{tag: "abbr", content: "text", attribs: {title: "something"}},
{tag: "acronym", content: "text", attribs: {title: "something"}},
{tag: "address", content: "text"},
@ -63,7 +60,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=409604
{tag: "li", content: "text", parent: "ol"},
{tag: "li", content: "text", parent: "ul"},
{tag: "noscript", content: "text"},
{tag: "object", content: "text"},
{tag: "ol", content: "<li>text</li>"},
{tag: "optgroup", content: "<option>text</option>", attribs: {label: "some label"}, parent: "select"},
{tag: "option", content: "text", parent: "select"},
@ -71,7 +67,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=409604
{tag: "pre", content: "text"},
{tag: "q", content: "text"},
{tag: "samp", content: "text"},
{tag: "select", content: "<option>text</option>"},
{tag: "small", content: "text"},
{tag: "span", content: "text"},
{tag: "strong", content: "text"},
@ -133,9 +128,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=409604
function handleClick(e) {
ok("accessKey" in e, "(click) accesskey property not found on element");
var expected = clickArray.shift();
ok(expected == e.accessKey, "(click) unexpected element: " + e.accessKey +
" expected: " + expected);
}
function handleInvalid(e) {
@ -154,19 +146,18 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=409604
utils.sendKeyEvent("keyup", key, key, modifier);
}
function testValidElements() {
for (var code = "a".charCodeAt(0); code <= "o".charCodeAt(0); ++ code) {
function testFocusableElements() {
for (var code = "a".charCodeAt(0); code <= "y".charCodeAt(0); ++ code) {
// XXX the "map" test is causing trouble, see bug 433089
if (code == "b".charCodeAt(0))
continue;
pressAccessKey(code);
}
ok(focusArray.length == 0, "(focus) unhandled elements remaining: " + focusArray.join(","));
ok(clickArray.length == 0, "(click) unhandled elements remaining: " + clickArray.join(","));
}
function createInvalidElement(elem, accesskey) {
ok("tag" in elem, "invalid object passed to createInvalidElement: " + elem.toString());
function createUnfocusableElement(elem, accesskey) {
ok("tag" in elem, "invalid object passed to createUnfocusableElement: " + elem.toString());
var e = document.createElement(elem.tag);
if ("content" in elem) {
e.innerHTML = elem.content;
@ -177,7 +168,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=409604
}
}
e.setAttribute("accesskey", accesskey);
e.setAttribute("onclick", "handleInvalid(event.target); event.preventDefault();");
e.setAttribute("onclick", "handleClick(event.target); event.preventDefault();");
e.setAttribute("onfocus", "handleInvalid(event.target);");
var parent = null;
var elementToInsert = null;
@ -196,7 +187,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=409604
}
ok(parent != null, "parent element not specified for element: " + elem.tag);
ok(elementToInsert != null, "elementToInsert not specified for element: " + elem.tag);
elementToInsert.setAttribute("id", invalidElementId);
elementToInsert.setAttribute("id", unfocusableElementId);
if ("where" in elem) {
if (elem.where == "first") {
parent.insertBefore(elementToInsert, parent.firstChild);
@ -208,25 +199,25 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=409604
}
}
function destroyInvalidElement() {
var el = document.getElementById(invalidElementId);
ok(el != null, "invalid element not found");
function destroyUnfocusableElement() {
var el = document.getElementById(unfocusableElementId);
ok(el != null, "unfocusable element not found");
el.parentNode.removeChild(el);
ok(document.getElementById(invalidElementId) == null, "invalid element not properly removed");
ok(document.getElementById(unfocusableElementId) == null, "unfocusable element not properly removed");
}
function testInvalidElements() {
function testUnfocusableElements() {
var i, e;
for (i = 0; i < invalidTags.length; ++ i) {
createInvalidElement(invalidTags[i], "z");
for (i = 0; i < unfocusableTags.length; ++ i) {
createUnfocusableElement(unfocusableTags[i], "z");
pressAccessKey("z".charCodeAt(0));
destroyInvalidElement();
destroyUnfocusableElement();
}
for (i = 0; i < invalidElements.length; ++ i) {
e = document.getElementById(invalidElements[i]);
ok(e != null, "element with ID " + invalidElements[i] + " not found");
e.setAttribute("accesskey", "z");
e.setAttribute("onclick", "handleInvalid(event.target); event.preventDefault();");
e.setAttribute("onclick", "handleClick(event.target); event.preventDefault();");
e.setAttribute("onfocus", "handleInvalid(event.target);");
pressAccessKey("z".charCodeAt(0));
e.removeAttribute("accesskey");
@ -236,8 +227,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=409604
}
function start() {
testValidElements();
testInvalidElements();
testFocusableElements();
testUnfocusableElements();
setOrRestoreContentAccess(0);
SimpleTest.finish();
}
@ -265,7 +256,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=409604
<col></col>
</colgroup>
<tr>
<td>a</td><td><a href="#" onclick="handleClick(event.target); return false;" accesskey="a">test link</a></td>
<td>a</td><td><a href="#" onclick="handleClick(event.target); return false;" accesskey="a" onfocus="handleFocus(event.target);">test link"</a></td>
</tr>
<!-- the "map" test is causing trouble, see bug 433089
<tr>
@ -276,47 +267,132 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=409604
</tr>
-->
<tr>
<td>button</td><td><button onclick="handleClick(event.target);" accesskey="c">test button</button></td>
<td>button</td><td><button onclick="handleClick(event.target);" accesskey="c" onfocus="handleFocus(event.target);">test button"</button></td>
</tr>
<tr>
<td>input type="text"</td><td><input type="text" value="" onfocus="handleFocus(event.target);" accesskey="d"></td>
<td>input type="text"</td><td><input type="text" value="" onclick="handleClick(event.target);" onfocus="handleFocus(event.target);" accesskey="d"></td>
</tr>
<tr>
<td>input type="button"</td><td><input type="button" value="type='button'" onclick="handleClick(event.target);" accesskey="e"></td>
<td>input type="button"</td><td><input type="button" value="type='button'" onclick="handleClick(event.target);" onfocus="handleFocus(event.target);" accesskey="e"></td>
</tr>
<tr>
<td>input type="checkbox"</td><td><input type="checkbox" onclick="handleClick(event.target);" accesskey="f"></td>
<td>input type="checkbox"</td><td><input type="checkbox" onclick="handleClick(event.target);" onfocus="handleFocus(event.target)" accesskey="f"></td>
</tr>
<tr>
<td>input type="radio"</td><td><input type="radio" name="radio" onfocus="handleFocus(event.target);" accesskey="g"></td>
<td>input type="radio"</td><td><input type="radio" name="radio" onclick="handleClick(event.target);" onfocus="handleFocus(event.target);" accesskey="g"></td>
</tr>
<tr>
<td>input type="password"</td><td><input type="password" onfocus="handleFocus(event.target);" accesskey="h"></td>
<td>input type="password"</td><td><input type="password" onclick="handleClick(event.target);" onfocus="handleFocus(event.target);" accesskey="h"></td>
</tr>
<tr>
<td>input type="submit"</td><td><input type="submit" value="type='submit'" onclick="handleClick(event.target); return false;" accesskey="i"></td>
<td>input type="submit"</td><td><input type="submit" value="type='submit'" onclick="handleClick(event.target); return false;"
onfocus="handleFocus(event.target);" accesskey="i"></td>
</tr>
<tr>
<td>input type="reset"</td><td><input type="submit" value="type='reset'" onclick="handleClick(event.target);" accesskey="j"></td>
<td>input type="reset"</td><td><input type="submit" value="type='reset'" onclick="handleClick(event.target);"
onfocus="handleFocus(event.target);" accesskey="j"></td>
</tr>
<tr>
<td>label</td><td><label accesskey="k">test label
<input type="text" value="test for label" onfocus="handleFocus(event.target);"></label></td>
<td>label</td><td><label accesskey="k" onclick="handleClick(event.target);" onfocus="handleInvalid(event.target);">test label
<input type="text" value="test for label" onfocus="handleFocus(event.target);" onclick="handleClick(event.target);"></label></td>
</tr>
<tr>
<td>legend</td><td><fieldset><legend accesskey="l">test legend</legend>
<input type="text" value="test for legend" onfocus="handleFocus(event.target);"></fieldset></td>
<input type="text" value="test for legend" onfocus="handleFocus(event.target);" onclick="handleClick(event.target);" ></fieldset></td>
</tr>
<tr>
<td>textarea</td><td><textarea onfocus="handleFocus(event.target);" accesskey="m">test text</textarea></td>
<td>textarea</td><td><textarea onfocus="handleFocus(event.target);" onclick="handleClick(event.target);" accesskey="m">test text</textarea></td>
</tr>
<tr>
<td>label (label invisible)</td><td><label for="txt1" accesskey="n" style="display:none">test label</label>
<input type="text" id="txt1" value="test for label" onfocus="handleFocus(event.target);"></td>
<td>label (label invisible)</td><td><label for="txt1" accesskey="n" style="display:none"
onclick="handleClick(event.target);" onfocus="handleInvalid(event.target);">test label</label>
<input type="text" id="txt1" value="test for label" onclick="handleClick(event.target);" onfocus="handleFocus(event.target);"></td>
</tr>
<tr>
<td>label (control invisible)</td><td><label for="txt2" accesskey="o">test label</label>
<input type="text" id="txt2" value="test for label" onfocus="handleInvalid(event.target);" style="display:none"></td>
<td>label (control invisible)</td><td><label for="txt2" accesskey="o"
onclick="handleClick(event.target);" onfocus="handleInvalid(event.target);">test label</label>
<input type="text" id="txt2" value="test for label" onclick="handleClick(event.target);"
onfocus="handleInvalid(event.target);" style="display:none"></td>
</tr>
<tr>
<td>select</td>
<td>
<select onclick="handleClick(event.target);" onfocus="handleFocus(event.target)" accesskey="p"><option>option</option></select>
</td>
</tr>
<tr>
<td>object</td>
<td>
<object onclick="handleClick(event.target);" onfocus="handleInvalid(event.target)" accesskey="q">an object</object>
</td>
</tr>
<tr>
<td>a without href</td>
<td>
<a onclick="handleClick(event.target);" onfocus="handleInvalid(event.target)" accesskey="r">an object</object>
</td>
</tr>
<tr>
<td>disabled button</td>
<td>
<button disabled="" onclick="handleClick(event.target);" onfocus="handleInvalid(event.target)" accesskey="s">disabled</button>
</td>
</tr>
<tr>
<td>disabled input</td>
<td>
<input disabled="" onclick="handleClick(event.target);" onfocus="handleInvalid(event.target)" accesskey="t"></input>
</td>
</tr>
<tr>
<td>hidden input</td>
<td>
<input type="hidden" onclick="handleClick(event.target);" onfocus="handleInvalid(event.target)" accesskey="u">disabled</input>
</td>
</tr>
<tr>
<td>disabled select</td>
<td>
<select disabled onclick="handleClick(event.target);" onfocus="handleInvalid(event.target)" accesskey="v">
<option>disabled</option>
</select>
</td>
</tr>
<tr>
<td>disabled textarea</td>
<td>
<textarea disabled onclick="handleClick(event.target);" onfocus="handleInvalid(event.target)" accesskey="w">disabled</textarea>
</td>
</tr>
<tr>
<td>scrollable div(focusable)</td>
<td>
<div onclick="handleClick(event.target);" onfocus="handleFocus(event.target)" accesskey="x" style="height: 50px; overflow: auto;">
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy
dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
lazy dog. The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy
dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
lazy dog. The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy
dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
lazy dog. The quick brown fox jumps over the lazy dog.
</div>
</td>
</tr>
<tr>
<td>contenteditable div(focusable)</td>
<td>
<div onclick="handleClick(event.target);" onfocus="handleFocus(event.target)" accesskey="y" contenteditable="true">
Test text.....
</div>
</td>
</tr>
</tbody>
</table>

Просмотреть файл

@ -0,0 +1,6 @@
<!DOCTYPE html>
<html>
<body">
<div>pass</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html class=reftest-wait>
<script>
function onLoadHandler()
{
var v = document.createElement("input");
v.setAttribute("onclick", "document.getElementById('result').innerHTML += 'pass';\
document.documentElement.removeAttribute('class');");
v.click();
}
</script>
<body onload="onLoadHandler();">
<div id="result"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,3 @@
<body>
<input>
<div>Results: div clicked body clicked input clicked div clicked body clicked input focused

Просмотреть файл

@ -0,0 +1,24 @@
<head>
<script>
function test()
{
document.getElementById("a").click();
document.getElementById("b").click();
document.getElementById("a").focus();
document.getElementById("b").focus();
// unfocus input to avoid failing due to caret
document.getElementById("b").blur();
}
function log(text)
{
document.getElementById("c").innerHTML+=text;
}
</script>
</head>
<body id="body" onload='javascript:test()' onclick='log("body clicked");'>
<div id=a onclick='log(" div clicked ");' onfocus='log(" div focused ");'>
<input id=b onclick='log(" input clicked ");' onfocus='log(" input focused ");'></div>
<div id="c">Results:

Просмотреть файл

@ -0,0 +1,2 @@
<!DOCTYPE html>
Pass

Просмотреть файл

@ -0,0 +1,13 @@
<!DOCTYPE html>
<head>
<script>
function test() {
var elem = document.createElement("input");
elem.setAttribute("onclick","document.getElementById('result').innerHTML = 'Pass'");
elem.click();
}
</script>
</head>
<body onload="test()">
<div id="result">Fail</div>
</body>

Просмотреть файл

@ -21,6 +21,9 @@ include autofocus/reftest.list
== 596455-2a.html 596455-ref-2.html
== 596455-2b.html 596455-ref-2.html
== 610935.html 610935-ref.html
== 583514-1.html 583514-1-ref.html
== 583514-2.html 583514-2-ref.html
== 409604-1.html 409604-1-ref.html
== hidden-1a.html hidden-1-ref.html
== hidden-1b.html hidden-1-ref.html
== hidden-1c.html hidden-1-ref.html

Просмотреть файл

@ -466,6 +466,8 @@ nsGenericHTMLElement::SetClassName(const nsAString& aClassName)
return NS_OK;
}
NS_IMPL_STRING_ATTR(nsGenericHTMLElement, AccessKey, accesskey)
static PRBool
IsBody(nsIContent *aContent)
{
@ -946,6 +948,7 @@ nsGenericHTMLElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
NS_ENSURE_SUCCESS(rv, rv);
if (aDocument) {
RegAccessKey();
if (HasName()) {
aDocument->
AddToNameTable(this, GetParsedAttr(nsGkAtoms::name)->GetAtomValue());
@ -964,6 +967,10 @@ nsGenericHTMLElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
void
nsGenericHTMLElement::UnbindFromTree(PRBool aDeep, PRBool aNullParent)
{
if (IsInDoc()) {
UnregAccessKey();
}
RemoveFromNameTable();
if (GetContentEditableValue() == eTrue) {
@ -1183,12 +1190,19 @@ nsGenericHTMLElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
{
PRBool contentEditable = aNameSpaceID == kNameSpaceID_None &&
aName == nsGkAtoms::contenteditable;
PRBool accessKey = aName == nsGkAtoms::accesskey &&
aNameSpaceID == kNameSpaceID_None;
PRInt32 change;
if (contentEditable) {
change = GetContentEditableValue() == eTrue ? -1 : 0;
SetMayHaveContentEditableAttr();
}
if (accessKey) {
UnregAccessKey();
}
nsresult rv = nsStyledElement::SetAttr(aNameSpaceID, aName, aPrefix, aValue,
aNotify);
NS_ENSURE_SUCCESS(rv, rv);
@ -1201,6 +1215,11 @@ nsGenericHTMLElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
ChangeEditableState(change);
}
if (accessKey && !aValue.IsEmpty()) {
SetFlags(NODE_HAS_ACCESSKEY);
RegAccessKey();
}
return NS_OK;
}
@ -1222,6 +1241,11 @@ nsGenericHTMLElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
contentEditable = PR_TRUE;
contentEditableChange = GetContentEditableValue() == eTrue ? -1 : 0;
}
else if (aAttribute == nsGkAtoms::accesskey) {
// Have to unregister before clearing flag. See UnregAccessKey
UnregAccessKey();
UnsetFlags(NODE_HAS_ACCESSKEY);
}
else if (nsContentUtils::IsEventAttributeName(aAttribute,
EventNameType_HTML)) {
nsIEventListenerManager* manager = GetListenerManager(PR_FALSE);
@ -3229,6 +3253,38 @@ nsGenericHTMLElement::Focus()
return fm ? fm->SetFocus(elem, 0) : NS_OK;
}
nsresult nsGenericHTMLElement::Click()
{
if (HasFlag(NODE_HANDLING_CLICK))
return NS_OK;
// Strong in case the event kills it
nsCOMPtr<nsIDocument> doc = GetCurrentDoc();
nsCOMPtr<nsIPresShell> shell = nsnull;
nsRefPtr<nsPresContext> context = nsnull;
if (doc) {
shell = doc->GetShell();
if (shell) {
context = shell->GetPresContext();
}
}
SetFlags(NODE_HANDLING_CLICK);
// Click() is never called from native code, but it may be
// called from chrome JS. Mark this event trusted if Click()
// is called from chrome code.
nsMouseEvent event(nsContentUtils::IsCallerChrome(),
NS_MOUSE_CLICK, nsnull, nsMouseEvent::eReal);
event.inputSource = nsIDOMNSMouseEvent::MOZ_SOURCE_UNKNOWN;
nsEventDispatcher::Dispatch(this, context, &event);
UnsetFlags(NODE_HANDLING_CLICK);
return NS_OK;
}
PRBool
nsGenericHTMLElement::IsHTMLFocusable(PRBool aWithMouse,
PRBool *aIsFocusable,

Просмотреть файл

@ -140,6 +140,7 @@ public:
// classes that inherit interfaces with those methods properly override them.
NS_IMETHOD Focus();
NS_IMETHOD Blur();
NS_IMETHOD Click();
NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex);
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
NS_IMETHOD GetHidden(PRBool* aHidden);
@ -148,6 +149,8 @@ public:
NS_IMETHOD SetSpellcheck(PRBool aSpellcheck);
NS_IMETHOD GetDraggable(PRBool* aDraggable);
NS_IMETHOD SetDraggable(PRBool aDraggable);
NS_IMETHOD GetAccessKey(nsAString &aAccessKey);
NS_IMETHOD SetAccessKey(const nsAString& aAccessKey);
nsresult GetContentEditable(nsAString& aContentEditable);
nsresult GetIsContentEditable(PRBool* aContentEditable);
nsresult SetContentEditable(const nsAString &aContentEditable);
@ -1480,6 +1483,22 @@ protected:
NS_INTERFACE_TABLE_ENTRY(_class, _i10) \
NS_OFFSET_AND_INTERFACE_TABLE_END
/* Use this macro to declare functions that forward the behavior of this interface to another object.
This macro doesn't forward Focus or Click because sometimes elements will want to override them. */
#define NS_FORWARD_NSIDOMHTMLELEMENT_NOFOCUSCLICK(_to) \
NS_SCRIPTABLE NS_IMETHOD GetId(nsAString & aId) { return _to GetId(aId); } \
NS_SCRIPTABLE NS_IMETHOD SetId(const nsAString & aId) { return _to SetId(aId); } \
NS_SCRIPTABLE NS_IMETHOD GetTitle(nsAString & aTitle) { return _to GetTitle(aTitle); } \
NS_SCRIPTABLE NS_IMETHOD SetTitle(const nsAString & aTitle) { return _to SetTitle(aTitle); } \
NS_SCRIPTABLE NS_IMETHOD GetLang(nsAString & aLang) { return _to GetLang(aLang); } \
NS_SCRIPTABLE NS_IMETHOD SetLang(const nsAString & aLang) { return _to SetLang(aLang); } \
NS_SCRIPTABLE NS_IMETHOD GetDir(nsAString & aDir) { return _to GetDir(aDir); } \
NS_SCRIPTABLE NS_IMETHOD SetDir(const nsAString & aDir) { return _to SetDir(aDir); } \
NS_SCRIPTABLE NS_IMETHOD GetClassName(nsAString & aClassName) { return _to GetClassName(aClassName); } \
NS_SCRIPTABLE NS_IMETHOD SetClassName(const nsAString & aClassName) { return _to SetClassName(aClassName); } \
NS_SCRIPTABLE NS_IMETHOD GetAccessKey(nsAString & aAccessKey) { return _to GetAccessKey(aAccessKey); } \
NS_SCRIPTABLE NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) { return _to SetAccessKey(aAccessKey); } \
NS_SCRIPTABLE NS_IMETHOD Blur(void) { return _to Blur(); }
/**
* A macro to declare the NS_NewHTMLXXXElement() functions.

Просмотреть файл

@ -167,7 +167,6 @@ NS_IMPL_STRING_ATTR(nsHTMLAnchorElement, Rev, rev)
NS_IMPL_STRING_ATTR(nsHTMLAnchorElement, Shape, shape)
NS_IMPL_INT_ATTR(nsHTMLAnchorElement, TabIndex, tabindex)
NS_IMPL_STRING_ATTR(nsHTMLAnchorElement, Type, type)
NS_IMPL_STRING_ATTR(nsHTMLAnchorElement, AccessKey, accesskey)
NS_IMETHODIMP
nsHTMLAnchorElement::GetDraggable(PRBool* aDraggable)
@ -196,10 +195,6 @@ nsHTMLAnchorElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
aCompileEventHandlers);
NS_ENSURE_SUCCESS(rv, rv);
if (aDocument) {
RegAccessKey();
}
// Prefetch links
if (aDocument && nsHTMLDNSPrefetch::IsAllowed(GetOwnerDoc())) {
nsHTMLDNSPrefetch::PrefetchLow(this);
@ -214,25 +209,9 @@ nsHTMLAnchorElement::UnbindFromTree(PRBool aDeep, PRBool aNullParent)
// be under a different xml:base, so forget the cached state now.
Link::ResetLinkState(false);
if (IsInDoc()) {
UnregAccessKey();
}
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
}
NS_IMETHODIMP
nsHTMLAnchorElement::Blur()
{
return nsGenericHTMLElement::Blur();
}
NS_IMETHODIMP
nsHTMLAnchorElement::Focus()
{
return nsGenericHTMLElement::Focus();
}
PRBool
nsHTMLAnchorElement::IsHTMLFocusable(PRBool aWithMouse,
PRBool *aIsFocusable, PRInt32 *aTabIndex)
@ -401,10 +380,6 @@ nsHTMLAnchorElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
nsIAtom* aPrefix, const nsAString& aValue,
PRBool aNotify)
{
if (aName == nsGkAtoms::accesskey && kNameSpaceID_None == aNameSpaceID) {
UnregAccessKey();
}
bool reset = false;
if (aName == nsGkAtoms::href && kNameSpaceID_None == aNameSpaceID) {
// If we do not have a cached URI, we have some value here so we must reset
@ -434,12 +409,6 @@ nsHTMLAnchorElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
Link::ResetLinkState(!!aNotify);
}
if (aName == nsGkAtoms::accesskey && kNameSpaceID_None == aNameSpaceID &&
!aValue.IsEmpty()) {
SetFlags(NODE_HAS_ACCESSKEY);
RegAccessKey();
}
return rv;
}
@ -447,13 +416,6 @@ nsresult
nsHTMLAnchorElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRBool aNotify)
{
if (aAttribute == nsGkAtoms::accesskey &&
kNameSpaceID_None == aNameSpaceID) {
// Have to unregister before clearing flag. See UnregAccessKey
UnregAccessKey();
UnsetFlags(NODE_HAS_ACCESSKEY);
}
nsresult rv = nsGenericHTMLElement::UnsetAttr(aNameSpaceID, aAttribute,
aNotify);

Просмотреть файл

@ -140,7 +140,6 @@ NS_HTML_CONTENT_INTERFACE_TABLE_TAIL_CLASSINFO(HTMLAreaElement)
NS_IMPL_ELEMENT_CLONE(nsHTMLAreaElement)
NS_IMPL_STRING_ATTR(nsHTMLAreaElement, AccessKey, accesskey)
NS_IMPL_STRING_ATTR(nsHTMLAreaElement, Alt, alt)
NS_IMPL_STRING_ATTR(nsHTMLAreaElement, Coords, coords)
NS_IMPL_URI_ATTR(nsHTMLAreaElement, Href, href)
@ -197,16 +196,9 @@ nsHTMLAreaElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
{
Link::ResetLinkState(false);
nsresult rv = nsGenericHTMLElement::BindToTree(aDocument, aParent,
return nsGenericHTMLElement::BindToTree(aDocument, aParent,
aBindingParent,
aCompileEventHandlers);
NS_ENSURE_SUCCESS(rv, rv);
if (aDocument) {
RegAccessKey();
}
return rv;
}
void
@ -216,10 +208,6 @@ nsHTMLAreaElement::UnbindFromTree(PRBool aDeep, PRBool aNullParent)
// be under a different xml:base, so forget the cached state now.
Link::ResetLinkState(false);
if (IsInDoc()) {
UnregAccessKey();
}
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
}
@ -228,10 +216,6 @@ nsHTMLAreaElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
nsIAtom* aPrefix, const nsAString& aValue,
PRBool aNotify)
{
if (aName == nsGkAtoms::accesskey && aNameSpaceID == kNameSpaceID_None) {
UnregAccessKey();
}
nsresult rv =
nsGenericHTMLElement::SetAttr(aNameSpaceID, aName, aPrefix, aValue, aNotify);
@ -244,12 +228,6 @@ nsHTMLAreaElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
Link::ResetLinkState(!!aNotify);
}
if (aName == nsGkAtoms::accesskey && aNameSpaceID == kNameSpaceID_None &&
!aValue.IsEmpty()) {
SetFlags(NODE_HAS_ACCESSKEY);
RegAccessKey();
}
return rv;
}
@ -257,13 +235,6 @@ nsresult
nsHTMLAreaElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRBool aNotify)
{
if (aAttribute == nsGkAtoms::accesskey &&
aNameSpaceID == kNameSpaceID_None) {
// Have to unregister before clearing flag. See UnregAccessKey
UnregAccessKey();
UnsetFlags(NODE_HAS_ACCESSKEY);
}
nsresult rv = nsGenericHTMLElement::UnsetAttr(aNameSpaceID, aAttribute,
aNotify);

Просмотреть файл

@ -138,7 +138,6 @@ public:
protected:
PRUint8 mType;
PRPackedBool mHandlingClick;
PRPackedBool mDisabledChanged;
PRPackedBool mInInternalActivate;
@ -158,7 +157,6 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(Button)
nsHTMLButtonElement::nsHTMLButtonElement(already_AddRefed<nsINodeInfo> aNodeInfo)
: nsGenericHTMLFormElement(aNodeInfo),
mType(kButtonDefaultType->value),
mHandlingClick(PR_FALSE),
mDisabledChanged(PR_FALSE),
mInInternalActivate(PR_FALSE)
{
@ -204,7 +202,6 @@ nsHTMLButtonElement::GetForm(nsIDOMHTMLFormElement** aForm)
return nsGenericHTMLFormElement::GetForm(aForm);
}
NS_IMPL_STRING_ATTR(nsHTMLButtonElement, AccessKey, accesskey)
NS_IMPL_BOOL_ATTR(nsHTMLButtonElement, Autofocus, autofocus)
NS_IMPL_BOOL_ATTR(nsHTMLButtonElement, Disabled, disabled)
NS_IMPL_ACTION_ATTR(nsHTMLButtonElement, FormAction, formaction)
@ -220,53 +217,6 @@ NS_IMPL_STRING_ATTR(nsHTMLButtonElement, Value, value)
NS_IMPL_ENUM_ATTR_DEFAULT_VALUE(nsHTMLButtonElement, Type, type,
kButtonDefaultType->tag)
NS_IMETHODIMP
nsHTMLButtonElement::Blur()
{
return nsGenericHTMLElement::Blur();
}
NS_IMETHODIMP
nsHTMLButtonElement::Focus()
{
return nsGenericHTMLElement::Focus();
}
NS_IMETHODIMP
nsHTMLButtonElement::Click()
{
if (mHandlingClick)
return NS_OK;
mHandlingClick = PR_TRUE;
// Hold on to the document in case one of the events makes it die or
// something...
nsCOMPtr<nsIDocument> doc = GetCurrentDoc();
if (doc) {
nsIPresShell *shell = doc->GetShell();
if (shell) {
nsRefPtr<nsPresContext> context = shell->GetPresContext();
if (context) {
// Click() is never called from native code, but it may be
// called from chrome JS. Mark this event trusted if Click()
// is called from chrome code.
nsMouseEvent event(nsContentUtils::IsCallerChrome(),
NS_MOUSE_CLICK, nsnull,
nsMouseEvent::eReal);
event.inputSource = nsIDOMNSMouseEvent::MOZ_SOURCE_UNKNOWN;
nsEventStatus status = nsEventStatus_eIgnore;
nsEventDispatcher::Dispatch(static_cast<nsIContent*>(this), context,
&event, nsnull, &status);
}
}
}
mHandlingClick = PR_FALSE;
return NS_OK;
}
PRBool
nsHTMLButtonElement::IsHTMLFocusable(PRBool aWithMouse, PRBool *aIsFocusable, PRInt32 *aTabIndex)
{

Просмотреть файл

@ -973,7 +973,6 @@ nsHTMLInputElement::GetForm(nsIDOMHTMLFormElement** aForm)
NS_IMPL_STRING_ATTR(nsHTMLInputElement, DefaultValue, value)
NS_IMPL_BOOL_ATTR(nsHTMLInputElement, DefaultChecked, checked)
NS_IMPL_STRING_ATTR(nsHTMLInputElement, Accept, accept)
NS_IMPL_STRING_ATTR(nsHTMLInputElement, AccessKey, accesskey)
NS_IMPL_STRING_ATTR(nsHTMLInputElement, Align, align)
NS_IMPL_STRING_ATTR(nsHTMLInputElement, Alt, alt)
NS_IMPL_ENUM_ATTR_DEFAULT_VALUE(nsHTMLInputElement, Autocomplete, autocomplete,
@ -1746,12 +1745,6 @@ nsHTMLInputElement::SetCheckedInternal(PRBool aChecked, PRBool aNotify)
}
}
NS_IMETHODIMP
nsHTMLInputElement::Blur()
{
return nsGenericHTMLElement::Blur();
}
NS_IMETHODIMP
nsHTMLInputElement::Focus()
{
@ -1855,68 +1848,10 @@ nsHTMLInputElement::SelectAll(nsPresContext* aPresContext)
NS_IMETHODIMP
nsHTMLInputElement::Click()
{
nsresult rv = NS_OK;
if (GET_BOOLBIT(mBitField, BF_HANDLING_CLICK)) // Fixes crash as in bug 41599
return rv; // --heikki@netscape.com
// first see if we are disabled or not. If disabled then do nothing.
nsAutoString disabled;
if (IsDisabled()) {
return NS_OK;
}
// see what type of input we are. Only click button, checkbox, radio,
// reset, submit, & image
if (mType == NS_FORM_INPUT_BUTTON ||
mType == NS_FORM_INPUT_CHECKBOX ||
mType == NS_FORM_INPUT_RADIO ||
mType == NS_FORM_INPUT_RESET ||
mType == NS_FORM_INPUT_SUBMIT ||
mType == NS_FORM_INPUT_IMAGE ||
mType == NS_FORM_INPUT_FILE) {
// Strong in case the event kills it
nsCOMPtr<nsIDocument> doc = GetCurrentDoc();
if (!doc) {
return rv;
}
nsCOMPtr<nsIPresShell> shell = doc->GetShell();
nsRefPtr<nsPresContext> context = nsnull;
if (shell) {
context = shell->GetPresContext();
}
if (!context) {
doc->FlushPendingNotifications(Flush_Frames);
shell = doc->GetShell();
if (shell) {
context = shell->GetPresContext();
}
}
if (context) {
// Click() is never called from native code, but it may be
// called from chrome JS. Mark this event trusted if Click()
// is called from chrome code.
nsMouseEvent event(nsContentUtils::IsCallerChrome(),
NS_MOUSE_CLICK, nsnull, nsMouseEvent::eReal);
event.inputSource = nsIDOMNSMouseEvent::MOZ_SOURCE_UNKNOWN;
nsEventStatus status = nsEventStatus_eIgnore;
SET_BOOLBIT(mBitField, BF_HANDLING_CLICK, PR_TRUE);
if (mType == NS_FORM_INPUT_FILE){
if (mType == NS_FORM_INPUT_FILE)
FireAsyncClickHandler();
}
nsEventDispatcher::Dispatch(static_cast<nsIContent*>(this), context,
&event, nsnull, &status);
SET_BOOLBIT(mBitField, BF_HANDLING_CLICK, PR_FALSE);
}
}
return NS_OK;
return nsGenericHTMLElement::Click();
}
NS_IMETHODIMP

Просмотреть файл

@ -55,19 +55,18 @@
// Accessors for mBitField
//
#define BF_DISABLED_CHANGED 0
#define BF_HANDLING_CLICK 1
#define BF_VALUE_CHANGED 2
#define BF_CHECKED_CHANGED 3
#define BF_CHECKED 4
#define BF_HANDLING_SELECT_EVENT 5
#define BF_SHOULD_INIT_CHECKED 6
#define BF_PARSER_CREATING 7
#define BF_IN_INTERNAL_ACTIVATE 8
#define BF_CHECKED_IS_TOGGLED 9
#define BF_INDETERMINATE 10
#define BF_INHIBIT_RESTORATION 11
#define BF_CAN_SHOW_INVALID_UI 12
#define BF_CAN_SHOW_VALID_UI 13
#define BF_VALUE_CHANGED 1
#define BF_CHECKED_CHANGED 2
#define BF_CHECKED 3
#define BF_HANDLING_SELECT_EVENT 4
#define BF_SHOULD_INIT_CHECKED 5
#define BF_PARSER_CREATING 6
#define BF_IN_INTERNAL_ACTIVATE 7
#define BF_CHECKED_IS_TOGGLED 8
#define BF_INDETERMINATE 9
#define BF_INHIBIT_RESTORATION 10
#define BF_CAN_SHOW_INVALID_UI 11
#define BF_CAN_SHOW_VALID_UI 12
#define GET_BOOLBIT(bitfield, field) (((bitfield) & (0x01 << (field))) \
? PR_TRUE : PR_FALSE)
@ -136,9 +135,6 @@ public:
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT(nsGenericHTMLFormElement::)
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT(nsGenericHTMLFormElement::)
// nsIDOMHTMLInputElement
NS_DECL_NSIDOMHTMLINPUTELEMENT
@ -150,6 +146,12 @@ public:
{
return nsGenericHTMLElement::GetEditor(aEditor);
}
// Forward nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_NOFOCUSCLICK(nsGenericHTMLFormElement::)
NS_IMETHOD Focus();
NS_IMETHOD Click();
NS_IMETHOD SetUserInput(const nsAString& aInput);
// Overriden nsIFormControl methods

Просмотреть файл

@ -68,19 +68,21 @@ public:
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT(nsGenericHTMLFormElement::)
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT(nsGenericHTMLFormElement::)
// nsIDOMHTMLLabelElement
NS_DECL_NSIDOMHTMLLABELELEMENT
// Forward nsIDOMHTMLElement -- We don't override Click()
NS_FORWARD_NSIDOMHTMLELEMENT_NOFOCUSCLICK(nsGenericHTMLFormElement::)
NS_IMETHOD Click() {
return nsGenericHTMLFormElement::Click();
}
NS_IMETHOD Focus();
// nsIFormControl
NS_IMETHOD_(PRUint32) GetType() const { return NS_FORM_LABEL; }
NS_IMETHOD Reset();
NS_IMETHOD SubmitNamesValues(nsFormSubmission* aFormSubmission);
NS_IMETHOD Focus();
virtual bool IsDisabled() const { return PR_FALSE; }
// nsIContent
@ -174,7 +176,6 @@ nsHTMLLabelElement::GetControl(nsIDOMHTMLElement** aElement)
}
NS_IMPL_STRING_ATTR(nsHTMLLabelElement, AccessKey, accesskey)
NS_IMPL_STRING_ATTR(nsHTMLLabelElement, HtmlFor, _for)
NS_IMETHODIMP
@ -198,25 +199,14 @@ nsHTMLLabelElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIContent* aBindingParent,
PRBool aCompileEventHandlers)
{
nsresult rv = nsGenericHTMLFormElement::BindToTree(aDocument, aParent,
return nsGenericHTMLFormElement::BindToTree(aDocument, aParent,
aBindingParent,
aCompileEventHandlers);
NS_ENSURE_SUCCESS(rv, rv);
if (aDocument) {
RegAccessKey();
}
return rv;
}
void
nsHTMLLabelElement::UnbindFromTree(PRBool aDeep, PRBool aNullParent)
{
if (IsInDoc()) {
UnregAccessKey();
}
nsGenericHTMLFormElement::UnbindFromTree(aDeep, aNullParent);
}
@ -356,34 +346,14 @@ nsresult
nsHTMLLabelElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName, nsIAtom* aPrefix,
const nsAString& aValue, PRBool aNotify)
{
if (aName == nsGkAtoms::accesskey && kNameSpaceID_None == aNameSpaceID) {
UnregAccessKey();
}
nsresult rv =
nsGenericHTMLFormElement::SetAttr(aNameSpaceID, aName, aPrefix, aValue,
return nsGenericHTMLFormElement::SetAttr(aNameSpaceID, aName, aPrefix, aValue,
aNotify);
if (aName == nsGkAtoms::accesskey && kNameSpaceID_None == aNameSpaceID &&
!aValue.IsEmpty()) {
SetFlags(NODE_HAS_ACCESSKEY);
RegAccessKey();
}
return rv;
}
nsresult
nsHTMLLabelElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRBool aNotify)
{
if (aAttribute == nsGkAtoms::accesskey &&
kNameSpaceID_None == aNameSpaceID) {
// Have to unregister before clearing flag. See UnregAccessKey
UnregAccessKey();
UnsetFlags(NODE_HAS_ACCESSKEY);
}
return nsGenericHTMLFormElement::UnsetAttr(aNameSpaceID, aAttribute, aNotify);
}

Просмотреть файл

@ -90,7 +90,6 @@ nsHTMLLegendElement::GetForm(nsIDOMHTMLFormElement** aForm)
}
NS_IMPL_STRING_ATTR(nsHTMLLegendElement, AccessKey, accesskey)
NS_IMPL_STRING_ATTR(nsHTMLLegendElement, Align, align)
// this contains center, because IE4 does
@ -146,34 +145,13 @@ nsHTMLLegendElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
nsIAtom* aPrefix, const nsAString& aValue,
PRBool aNotify)
{
PRBool accesskey = (aAttribute == nsGkAtoms::accesskey &&
aNameSpaceID == kNameSpaceID_None);
if (accesskey) {
UnregAccessKey();
}
nsresult rv = nsGenericHTMLElement::SetAttr(aNameSpaceID, aAttribute,
return nsGenericHTMLElement::SetAttr(aNameSpaceID, aAttribute,
aPrefix, aValue, aNotify);
if (accesskey && !aValue.IsEmpty()) {
SetFlags(NODE_HAS_ACCESSKEY);
RegAccessKey();
}
return rv;
}
nsresult
nsHTMLLegendElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRBool aNotify)
{
if (aAttribute == nsGkAtoms::accesskey &&
aNameSpaceID == kNameSpaceID_None) {
// Have to unregister before clearing flag. See UnregAccessKey
UnregAccessKey();
UnsetFlags(NODE_HAS_ACCESSKEY);
}
return nsGenericHTMLElement::UnsetAttr(aNameSpaceID, aAttribute, aNotify);
}
@ -182,25 +160,14 @@ nsHTMLLegendElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIContent* aBindingParent,
PRBool aCompileEventHandlers)
{
nsresult rv = nsGenericHTMLElement::BindToTree(aDocument, aParent,
return nsGenericHTMLElement::BindToTree(aDocument, aParent,
aBindingParent,
aCompileEventHandlers);
NS_ENSURE_SUCCESS(rv, rv);
if (aDocument) {
RegAccessKey();
}
return rv;
}
void
nsHTMLLegendElement::UnbindFromTree(PRBool aDeep, PRBool aNullParent)
{
if (IsInDoc()) {
UnregAccessKey();
}
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
}

Просмотреть файл

@ -64,14 +64,15 @@ public:
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT(nsGenericHTMLElement::)
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT(nsGenericHTMLElement::)
// nsIDOMHTMLLegendElement
NS_DECL_NSIDOMHTMLLEGENDELEMENT
// nsGenericHTMLElement
NS_IMETHODIMP Focus();
// Forward nsIDOMHTMLElement -- We don't override Click()
NS_FORWARD_NSIDOMHTMLELEMENT_NOFOCUSCLICK(nsGenericHTMLElement::)
NS_IMETHOD Click() {
return nsGenericHTMLElement::Click();
}
NS_IMETHOD Focus();
virtual void PerformAccesskey(PRBool aKeyCausesActivation,
PRBool aIsTrustedEvent);

Просмотреть файл

@ -1272,18 +1272,6 @@ NS_IMPL_BOOL_ATTR(nsHTMLSelectElement, Required, required)
NS_IMPL_NON_NEGATIVE_INT_ATTR_DEFAULT_VALUE(nsHTMLSelectElement, Size, size, 0)
NS_IMPL_INT_ATTR(nsHTMLSelectElement, TabIndex, tabindex)
NS_IMETHODIMP
nsHTMLSelectElement::Blur()
{
return nsGenericHTMLElement::Blur();
}
NS_IMETHODIMP
nsHTMLSelectElement::Focus()
{
return nsGenericHTMLElement::Focus();
}
PRBool
nsHTMLSelectElement::IsHTMLFocusable(PRBool aWithMouse,
PRBool *aIsFocusable, PRInt32 *aTabIndex)

Просмотреть файл

@ -366,18 +366,6 @@ nsHTMLTextAreaElement::GetForm(nsIDOMHTMLFormElement** aForm)
// nsIContent
NS_IMETHODIMP
nsHTMLTextAreaElement::Blur()
{
return nsGenericHTMLElement::Blur();
}
NS_IMETHODIMP
nsHTMLTextAreaElement::Focus()
{
return nsGenericHTMLElement::Focus();
}
NS_IMETHODIMP
nsHTMLTextAreaElement::Select()
{
@ -449,7 +437,6 @@ nsHTMLTextAreaElement::IsHTMLFocusable(PRBool aWithMouse,
return PR_FALSE;
}
NS_IMPL_STRING_ATTR(nsHTMLTextAreaElement, AccessKey, accesskey)
NS_IMPL_BOOL_ATTR(nsHTMLTextAreaElement, Autofocus, autofocus)
NS_IMPL_UINT_ATTR_NON_ZERO_DEFAULT_VALUE(nsHTMLTextAreaElement, Cols, cols, DEFAULT_COLS)
NS_IMPL_BOOL_ATTR(nsHTMLTextAreaElement, Disabled, disabled)

Просмотреть файл

@ -0,0 +1,61 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=562932
-->
<head>
<title>Test for Bug 583514</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=583514">Mozilla Bug 583514</a>
<p id="display"></p>
<div id="content">
<div id="a" accesskey="a" onfocus="divfocus = true;" onclick="divclicked = true;">
<input id="b" accesskey = "b" onfocus="inputfocus = true;" onclick="inputclicked = true;">
</div>
</div>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 583514 **/
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var Cc = Components.classes;
var Ci = Components.interfaces;
var modifier = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefBranch).
getIntPref("ui.key.contentAccess");
var divfocus = false;
var divclicked = false;
var inputfocus = false;
var inputclicked = false;
var utils = window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
//utils.sendNativeKeyEvent(0, 65, modifier, "a", "a");
utils.sendKeyEvent("keypress", "a", 65, modifier);
is(divfocus, false, "accesskey does not focus div");
is(divclicked, true, "accesskey fires click at div");
is(inputfocus, false, "input was not targeted");
is(inputclicked, false, "inpt was not targeted");
divclicked = false;
utils.sendKeyEvent("keypress", "b", 66, modifier);
is(divfocus, false, "focus cannot bubble to div");
is(divclicked, true, "click bubbles to div");
is(inputfocus, true, "accesskey focuses input");
is(inputclicked, true, "accesskey clicks input");
</script>
</pre>
</body>
</html>

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(99419cf8-5835-4c2a-b013-189b17f0423f)]
[scriptable, uuid(768bfb39-f0ce-4f17-bad7-f0f722dc293a)]
interface nsIDOMHTMLAnchorElement : nsIDOMHTMLElement
{
attribute DOMString href;
@ -78,7 +78,6 @@ interface nsIDOMHTMLAnchorElement : nsIDOMHTMLElement
attribute DOMString hash;
attribute DOMString accessKey;
attribute DOMString charset;
attribute DOMString coords;
attribute DOMString name;
@ -87,6 +86,4 @@ interface nsIDOMHTMLAnchorElement : nsIDOMHTMLElement
attribute long tabIndex;
DOMString toString();
void blur();
void focus();
};

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(a70cc757-4640-4c73-b73b-eb07cf43d90b)]
[scriptable, uuid(1840a15d-618e-4e22-a53e-56a3624b8ae3)]
interface nsIDOMHTMLAppletElement : nsIDOMHTMLElement
{
attribute DOMString align;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(89547ef1-f349-4c4f-ada7-5d51234de0c0)]
[scriptable, uuid(eeae849e-d9f6-4e66-a838-44deb9594bc1)]
interface nsIDOMHTMLAreaElement : nsIDOMHTMLElement
{
attribute DOMString alt;
@ -71,7 +71,6 @@ interface nsIDOMHTMLAreaElement : nsIDOMHTMLElement
attribute DOMString hash;
attribute DOMString accessKey;
attribute long tabIndex;
attribute boolean noHref;
DOMString toString();

Просмотреть файл

@ -52,7 +52,7 @@
* @status UNDER_DEVELOPMENT
*/
[scriptable, uuid(8cb32fc5-d302-46ab-ac91-5bcb21d05023)]
[scriptable, uuid(f0d4977c-9632-4fab-bc9b-91c250a6ef96)]
interface nsIDOMHTMLAudioElement : nsIDOMHTMLMediaElement
{
// Setup the audio stream for writing

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(e7ecc247-4f30-4de2-835f-642ad76af28f)]
[scriptable, uuid(e8252870-aa63-4eaf-9d59-5e5ea014fdf3)]
interface nsIDOMHTMLBRElement : nsIDOMHTMLElement
{
attribute DOMString clear;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(43fc71aa-f089-4056-b3a6-2259d13fb11a)]
[scriptable, uuid(84ee3ce6-ea9c-4443-93a2-359c259ef218)]
interface nsIDOMHTMLBaseElement : nsIDOMHTMLElement
{
attribute DOMString href;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(22c641f6-f39b-4f6b-b1f5-8271a200bf01)]
[scriptable, uuid(87db4ba2-367d-4604-ad36-b97cc09bf3f1)]
interface nsIDOMHTMLBodyElement : nsIDOMHTMLElement
{
attribute DOMString aLink;

Просмотреть файл

@ -52,7 +52,7 @@
interface nsIDOMValidityState;
[scriptable, uuid(e158abd8-2521-4ce9-af68-26b70ada7614)]
[scriptable, uuid(7a40902e-d0ce-41f2-bc46-e247e9662ea8)]
interface nsIDOMHTMLButtonElement : nsIDOMHTMLElement
{
attribute boolean autofocus;
@ -68,14 +68,9 @@ interface nsIDOMHTMLButtonElement : nsIDOMHTMLElement
attribute DOMString type;
attribute DOMString value;
attribute DOMString accessKey;
attribute long tabIndex;
void blur();
void focus();
void click();
// The following lines are parte of the constraint validation API, see:
// The following lines are part of the constraint validation API, see:
// http://www.whatwg.org/specs/web-apps/current-work/#the-constraint-validation-api
readonly attribute boolean willValidate;
readonly attribute nsIDOMValidityState validity;

Просмотреть файл

@ -54,7 +54,7 @@
interface nsIDOMFile;
[scriptable, uuid(f11cc1ae-3c8d-46b9-90cd-7b3f3395b2dd)]
[scriptable, uuid(2e98cd39-2269-493a-a3bb-abe85be2523c)]
interface nsIDOMHTMLCanvasElement : nsIDOMHTMLElement
{
attribute unsigned long width;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(a6cf9083-15b3-11d2-932e-00805f8add32)]
[scriptable, uuid(1af9e026-011d-4d0e-91db-09bcfa3e9622)]
interface nsIDOMHTMLCollection : nsISupports
{
readonly attribute unsigned long length;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(a291df4d-ee6f-46f7-b1d8-9680a387c23e)]
[scriptable, uuid(8c2e26d3-8ed4-4e13-abc8-46d7d2f7d300)]
interface nsIDOMHTMLDListElement : nsIDOMHTMLElement
{
attribute boolean compact;

Просмотреть файл

@ -49,7 +49,7 @@
interface nsIDOMHTMLCollection;
[scriptable, uuid(cbea212b-8dda-42a5-b2c4-5942f55e1dfe)]
[scriptable, uuid(11dacc1f-4abc-44a5-9c57-c0c3e833e387)]
interface nsIDOMHTMLDataListElement : nsIDOMHTMLElement
{
readonly attribute nsIDOMHTMLCollection options;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(65f89019-bcf9-4661-8211-f52dbb9a7fe5)]
[scriptable, uuid(3531a90c-cd39-4619-abad-71a961a58c54)]
interface nsIDOMHTMLDirectoryElement : nsIDOMHTMLElement
{
attribute boolean compact;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(06b50d6a-611e-4f3c-baa6-3af81155f0bb)]
[scriptable, uuid(616223f7-014d-4805-b524-ad6cf8536ac0)]
interface nsIDOMHTMLDivElement : nsIDOMHTMLElement
{
attribute DOMString align;

Просмотреть файл

@ -51,7 +51,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(092ef5f6-3f54-468a-a1a5-ca922f8ef547)]
[scriptable, uuid(164c7ebd-2245-42d2-a96f-2bf2d01c1697)]
interface nsIDOMHTMLElement : nsIDOMElement
{
attribute DOMString id;
@ -59,4 +59,10 @@ interface nsIDOMHTMLElement : nsIDOMElement
attribute DOMString lang;
attribute DOMString dir;
attribute DOMString className;
attribute DOMString accessKey;
void blur();
void focus();
void click();
};

Просмотреть файл

@ -47,7 +47,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/#the-embed-element
*/
[scriptable, uuid(6eebf0ac-b388-4942-ad83-3e43b327c360)]
[scriptable, uuid(dec16079-b0e7-46b9-aafa-c7f0ebc9abc1)]
interface nsIDOMHTMLEmbedElement : nsIDOMHTMLElement
{
attribute DOMString align;

Просмотреть файл

@ -52,7 +52,7 @@
interface nsIDOMValidityState;
[scriptable, uuid(1bcb97d2-47f6-403f-ae10-65e00ad728f5)]
[scriptable, uuid(c989a733-40a6-4712-b0f0-944dd5ec4344)]
interface nsIDOMHTMLFieldSetElement : nsIDOMHTMLElement
{
attribute boolean disabled;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(a2e78525-ade0-41bb-8bf0-041a32dc467e)]
[scriptable, uuid(99875201-4f50-4e8a-a58e-dd39b9ff51e1)]
interface nsIDOMHTMLFontElement : nsIDOMHTMLElement
{
attribute DOMString color;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(746363ef-0164-4868-8cf4-e6a695bd4cc7)]
[scriptable, uuid(e8624d8a-0e9c-49d4-848c-75afcfd6f048)]
interface nsIDOMHTMLFormElement : nsIDOMHTMLElement
{
attribute DOMString name;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(74a61421-d692-4f51-aee8-2409daebde0d)]
[scriptable, uuid(e3f42587-847f-4743-8891-490b2066493d)]
interface nsIDOMHTMLFrameElement : nsIDOMHTMLElement
{
attribute DOMString frameBorder;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(dd600777-2812-4986-859a-8e9090aee1da)]
[scriptable, uuid(a827ecd2-472d-4cf7-ae3b-21bca7e5c6aa)]
interface nsIDOMHTMLFrameSetElement : nsIDOMHTMLElement
{
attribute DOMString cols;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(95573fb0-58eb-4740-ab11-a0e84ab67d3a)]
[scriptable, uuid(b72f9f2d-4c6c-4264-a713-4423724379c0)]
interface nsIDOMHTMLHRElement : nsIDOMHTMLElement
{
attribute DOMString align;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(97c0fbe3-f79c-4fe3-b891-dfabcf74a614)]
[scriptable, uuid(0d91b09d-0de9-4d9b-a53d-ce9b4c462f5a)]
interface nsIDOMHTMLHeadElement : nsIDOMHTMLElement
{
[noscript] attribute DOMString profile;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(2f103fa6-27ae-409a-95a9-a842dd2feeba)]
[scriptable, uuid(0515a456-2545-4865-9a5b-f744a8e16101)]
interface nsIDOMHTMLHeadingElement : nsIDOMHTMLElement
{
attribute DOMString align;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(3947d0f1-6b16-4bf7-a7e5-e042c5ce5975)]
[scriptable, uuid(a8500f4c-3314-4049-bb79-f782663e7273)]
interface nsIDOMHTMLHtmlElement : nsIDOMHTMLElement
{
attribute DOMString version;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(9cad6a82-1ffe-4990-9f32-37634e2873ff)]
[scriptable, uuid(33dfbcdc-4edf-4e6a-acf4-c6b5bbb61caf)]
interface nsIDOMHTMLIFrameElement : nsIDOMHTMLElement
{
attribute DOMString align;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(e5747c9e-c805-4dfd-ae15-827a331533ba)]
[scriptable, uuid(c4ef8a40-dd56-4b95-a007-630a0ac04341)]
interface nsIDOMHTMLImageElement : nsIDOMHTMLElement
{
attribute DOMString alt;

Просмотреть файл

@ -54,7 +54,7 @@ interface nsIDOMValidityState;
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(bcf00efc-5217-4350-9fbc-e3059190830a)]
[scriptable, uuid(a59ba6b8-6f8b-4003-a8a4-184a51a05050)]
interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
{
attribute DOMString accept;
@ -87,7 +87,6 @@ interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
attribute boolean readOnly;
attribute boolean required;
attribute DOMString accessKey;
attribute DOMString align;
attribute unsigned long size;
@ -126,8 +125,4 @@ interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
* element is a text field.
*/
boolean mozIsTextField(in boolean aExcludePassword);
void blur();
void focus();
void click();
};

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(9d1384b5-d70c-455d-929c-f422f89fcb7e)]
[scriptable, uuid(e630b11e-ffc1-4666-b7dd-823e9077ef89)]
interface nsIDOMHTMLIsIndexElement : nsIDOMHTMLElement
{
readonly attribute nsIDOMHTMLFormElement form;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(e48b4094-9858-4aff-8e83-901fae94cd60)]
[scriptable, uuid(9c31bd99-1412-49a2-954c-6c1be575decc)]
interface nsIDOMHTMLLIElement : nsIDOMHTMLElement
{
attribute DOMString type;

Просмотреть файл

@ -50,12 +50,10 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(1a36591e-2538-4685-bb23-cb80300539db)]
[scriptable, uuid(0b4f3766-e6e8-4578-9d4e-f1fb4861c956)]
interface nsIDOMHTMLLabelElement : nsIDOMHTMLElement
{
readonly attribute nsIDOMHTMLFormElement form;
attribute DOMString htmlFor;
readonly attribute nsIDOMHTMLElement control;
attribute DOMString accessKey;
};

Просмотреть файл

@ -50,10 +50,9 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(e68756ab-a35b-41b8-b9e7-bf0c0c1fa953)]
[scriptable, uuid(d84fcdd0-5962-42aa-ab83-dc92321553aa)]
interface nsIDOMHTMLLegendElement : nsIDOMHTMLElement
{
readonly attribute nsIDOMHTMLFormElement form;
attribute DOMString accessKey;
attribute DOMString align;
};

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(efceac0d-dc51-4c03-8658-7225c8cba4d3)]
[scriptable, uuid(b60dc7dd-30d1-40aa-a306-02a2ebb30f12)]
interface nsIDOMHTMLLinkElement : nsIDOMHTMLElement
{
attribute boolean disabled;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(dcf3850e-700e-4ef0-a67f-1e3dd9cdce9a)]
[scriptable, uuid(1fe0dac9-564d-4f20-9933-e77bef7853cc)]
interface nsIDOMHTMLMapElement : nsIDOMHTMLElement
{
readonly attribute nsIDOMHTMLCollection areas;

Просмотреть файл

@ -57,7 +57,7 @@
#endif
%}
[scriptable, uuid(b1a6e147-6934-43dc-b07e-8d1b40980b90)]
[scriptable, uuid(d8213322-46d8-47ca-a15c-2abae47ddfde)]
interface nsIDOMHTMLMediaElement : nsIDOMHTMLElement
{
// error state

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(df6c8120-e52e-4ea9-b49e-b83928487e75)]
[scriptable, uuid(318d9314-f97b-4b7e-96ff-95f0cb203fdf)]
interface nsIDOMHTMLMenuElement : nsIDOMHTMLElement
{
attribute boolean compact;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(2cde45b3-1cc8-4a91-af52-a05ff8e78e3e)]
[scriptable, uuid(43232acb-397c-46ce-8cd7-7fb2c286e851)]
interface nsIDOMHTMLMetaElement : nsIDOMHTMLElement
{
attribute DOMString content;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(9164daf4-974e-4862-b913-e0e73372df86)]
[scriptable, uuid(9ee75a83-0acb-42e4-8fe7-dac88fcec547)]
interface nsIDOMHTMLModElement : nsIDOMHTMLElement
{
attribute DOMString cite;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(5efcd7a0-8ca1-4efa-83fa-ea8f5fd29e76)]
[scriptable, uuid(e0bc10a7-46c7-4d6a-99a7-621827594efe)]
interface nsIDOMHTMLOListElement : nsIDOMHTMLElement
{
attribute boolean compact;

Просмотреть файл

@ -52,7 +52,7 @@
interface nsIDOMValidityState;
[scriptable, uuid(b11e44f3-c15c-494a-a89f-879fe9814cda)]
[scriptable, uuid(700d3c7b-cbc2-4ab4-9aa3-fedd0b09fe89)]
interface nsIDOMHTMLObjectElement : nsIDOMHTMLElement
{
readonly attribute nsIDOMHTMLFormElement form;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(a47a2815-3115-46fb-915a-1ce3eea13a1a)]
[scriptable, uuid(98694f29-5a2a-4da3-8a0f-3351bafe1fea)]
interface nsIDOMHTMLOptGroupElement : nsIDOMHTMLElement
{
attribute boolean disabled;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(40465e21-dd35-4d8b-8d07-70a51b4fb9d1)]
[scriptable, uuid(f289fdb9-fe0f-41d3-bbdb-5c4e21f0a4d2)]
interface nsIDOMHTMLOptionElement : nsIDOMHTMLElement
{
attribute boolean disabled;

Просмотреть файл

@ -50,7 +50,7 @@
interface nsIDOMDOMSettableTokenList;
interface nsIDOMValidityState;
[scriptable, uuid(8c46bfd3-c4cb-4b97-b011-2c8fd2811aca)]
[scriptable, uuid(546ce012-e7ce-4490-8530-75f2b1b135b6)]
interface nsIDOMHTMLOutputElement : nsIDOMHTMLElement
{
readonly attribute nsIDOMDOMSettableTokenList htmlFor;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(4e83739e-1756-40dd-9bdf-eab1bf515239)]
[scriptable, uuid(7a324f4d-c264-4978-9d0c-5fdaac33a3ee)]
interface nsIDOMHTMLParagraphElement : nsIDOMHTMLElement
{
attribute DOMString align;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(3d42b355-2e24-4b2f-8221-69e7a9fe373e)]
[scriptable, uuid(20ac93e9-4ac8-40b0-a1f3-38948f6ca6ab)]
interface nsIDOMHTMLParamElement : nsIDOMHTMLElement
{
attribute DOMString name;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(b069f384-b2bf-4b8f-887d-427389c02e53)]
[scriptable, uuid(3459e9d4-40a0-4b55-a018-db287561feab)]
interface nsIDOMHTMLPreElement : nsIDOMHTMLElement
{
attribute long width;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(b09051e3-a24c-4912-b6f3-a53d050e4439)]
[scriptable, uuid(c9c87e61-dc16-47b9-acdd-641dd220557b)]
interface nsIDOMHTMLQuoteElement : nsIDOMHTMLElement
{
attribute DOMString cite;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(8143a6fa-58f0-43fa-a300-e590fcf5f2f1)]
[scriptable, uuid(c623ecc4-381b-4fa7-9016-a29f0a06230b)]
interface nsIDOMHTMLScriptElement : nsIDOMHTMLElement
{
attribute DOMString src;

Просмотреть файл

@ -53,7 +53,7 @@
interface nsIDOMValidityState;
[scriptable, uuid(438a6680-f9e2-4f98-875e-b6083cbe3e77)]
[scriptable, uuid(58cd01b8-c3f2-4e58-b39d-8a0ba941717e)]
interface nsIDOMHTMLSelectElement : nsIDOMHTMLElement
{
attribute boolean autofocus;
@ -78,10 +78,8 @@ interface nsIDOMHTMLSelectElement : nsIDOMHTMLElement
attribute DOMString value;
attribute long tabIndex;
void blur();
void focus();
// The following lines are parte of the constraint validation API, see:
// The following lines are part of the constraint validation API, see:
// http://www.whatwg.org/specs/web-apps/current-work/#the-constraint-validation-api
readonly attribute boolean willValidate;
readonly attribute nsIDOMValidityState validity;

Просмотреть файл

@ -48,7 +48,7 @@
* @status UNDER_DEVELOPMENT
*/
[scriptable, uuid(23ab8a3e-d6e5-4ed3-8c89-7a1ac31c67f2)]
[scriptable, uuid(ee69ccd4-5216-46cc-bfb4-b612d197ce29)]
interface nsIDOMHTMLSourceElement : nsIDOMHTMLElement
{
attribute DOMString src;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(7cfe7566-5b1b-4931-9969-3d64c4a8cee1)]
[scriptable, uuid(675aff34-07c5-491f-b92f-ccaf616ef8b3)]
interface nsIDOMHTMLStyleElement : nsIDOMHTMLElement
{
attribute boolean disabled;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(d8d86ab3-6bc2-4615-a7ee-24be42a44a46)]
[scriptable, uuid(0e843cc7-ff12-49b5-8c8d-939dc5b66b6b)]
interface nsIDOMHTMLTableCaptionElement : nsIDOMHTMLElement
{
attribute DOMString align;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(8b44d956-4da8-4b61-a0ee-2ae6773bd2ce)]
[scriptable, uuid(042957a7-8680-4ed4-9a45-40108e73701b)]
interface nsIDOMHTMLTableCellElement : nsIDOMHTMLElement
{
readonly attribute long cellIndex;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(3ce8cdfa-9bb0-4a42-a483-c3cb978f7864)]
[scriptable, uuid(b0c8daa0-6b74-4436-b1ca-2de5d6d3fe33)]
interface nsIDOMHTMLTableColElement : nsIDOMHTMLElement
{
attribute DOMString align;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(5287af67-bcac-4db7-8dd7-6a60cde335b0)]
[scriptable, uuid(1927df94-db16-4e28-a491-4279eccc539d)]
interface nsIDOMHTMLTableElement : nsIDOMHTMLElement
{
// Modified in DOM Level 2:

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(32cba7ef-5cda-49a3-b1a8-f6defb13aa4e)]
[scriptable, uuid(0f614ba0-5ee1-494b-ade8-14c29f416798)]
interface nsIDOMHTMLTableRowElement : nsIDOMHTMLElement
{
// Modified in DOM Level 2:

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(669bdaf8-f3c5-4925-a054-fbd11d63de59)]
[scriptable, uuid(76400ad3-725a-45c1-bb98-5a6cdb91af11)]
interface nsIDOMHTMLTableSectionElement : nsIDOMHTMLElement
{
attribute DOMString align;

Просмотреть файл

@ -50,13 +50,12 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(cbc46753-1e54-43cd-afc9-068501abffb9)]
[scriptable, uuid(905edd3e-c0b3-4d54-8a2c-0eaab6ccb3cf)]
interface nsIDOMHTMLTextAreaElement : nsIDOMHTMLElement
{
// Modified in DOM Level 2:
attribute DOMString defaultValue;
readonly attribute nsIDOMHTMLFormElement form;
attribute DOMString accessKey;
attribute unsigned long cols;
attribute boolean disabled;
attribute DOMString name;
@ -65,7 +64,5 @@ interface nsIDOMHTMLTextAreaElement : nsIDOMHTMLElement
attribute long tabIndex;
readonly attribute DOMString type;
attribute DOMString value;
void blur();
void focus();
void select();
};

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(df203632-8ff0-4435-966f-449b11ce4d48)]
[scriptable, uuid(487748c0-31c0-4985-93c6-588b64f8ed2d)]
interface nsIDOMHTMLTitleElement : nsIDOMHTMLElement
{
attribute DOMString text;

Просмотреть файл

@ -50,7 +50,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(ee2d4c7c-6f45-4746-8f07-67012dd41b9e)]
[scriptable, uuid(49610fd6-bf9e-4a13-beb3-09ac74540077)]
interface nsIDOMHTMLUListElement : nsIDOMHTMLElement
{
attribute boolean compact;

Просмотреть файл

@ -43,7 +43,7 @@
*
* @see <http://www.whatwg.org/html/#htmlunknownelement>
*/
[scriptable, uuid(3ed18057-6dc0-43f4-834e-25118c840482)]
[scriptable, uuid(9d094117-9937-4ae4-a325-1761d7a9f3bc)]
interface nsIDOMHTMLUnknownElement : nsIDOMHTMLElement
{
};

Просмотреть файл

@ -48,7 +48,7 @@
* @status UNDER_DEVELOPMENT
*/
[scriptable, uuid(59b7aa25-7857-4f2c-a11e-ab921a76e6c7)]
[scriptable, uuid(00c757ec-db7b-477e-95cd-b2a03b0f8634)]
interface nsIDOMHTMLVideoElement : nsIDOMHTMLMediaElement
{
attribute long width;

Просмотреть файл

@ -38,7 +38,7 @@
#include "domstubs.idl"
[scriptable, uuid(f0ffe1d2-9615-492b-aae1-05428ebc2a70)]
[scriptable, uuid(4738f75d-9c6f-40f8-81d0-84b2e4726a8f)]
interface nsIDOMNSHTMLElement : nsISupports
{
readonly attribute long offsetTop;
@ -63,9 +63,6 @@ interface nsIDOMNSHTMLElement : nsISupports
// for WHAT-WG drag and drop
attribute boolean draggable;
void blur();
void focus();
[optional_argc] void scrollIntoView([optional] in boolean top);
attribute boolean spellcheck;

Просмотреть файл

@ -42,7 +42,7 @@
* interface for [X]HTML hr elements, for compatibility with IE.
*/
[scriptable, uuid(19b5879f-c125-447c-aaaf-719de3ef221a)]
[scriptable, uuid(63c0ae1b-8aa7-4e72-82a1-aff486bfdaf5)]
interface nsIDOMNSHTMLHRElement : nsISupports
{
attribute DOMString color;

Просмотреть файл

@ -172,6 +172,9 @@ gfxSurfaceDrawable::Draw(gfxContext* aContext,
PreparePatternForUntiledDrawing(pattern, deviceSpaceToImageSpace,
surfaceType, currentTarget, filter);
}
#ifdef MOZ_GFX_OPTIMIZE_MOBILE
pattern->SetFilter(gfxPattern::FILTER_FAST);
#endif
pattern->SetMatrix(gfxMatrix(aTransform).Multiply(mTransform));
aContext->NewPath();
aContext->SetPattern(pattern);

Просмотреть файл

@ -139,8 +139,8 @@ typedef struct CapturingContentInfo {
} CapturingContentInfo;
#define NS_IPRESSHELL_IID \
{ 0xfd4ba6e3, 0x921c, 0x4058, \
{ 0xa6, 0x1b, 0xc7, 0x14, 0x5e, 0x80, 0x50, 0x1f } }
{ 0x3a8030b5, 0x8d2c, 0x4cb3, \
{ 0xb5, 0xae, 0xb2, 0x43, 0xa9, 0x28, 0x02, 0x82 } }
// Constants for ScrollContentIntoView() function
#define NS_PRESSHELL_SCROLL_TOP 0
@ -573,8 +573,7 @@ public:
enum {
SCROLL_FIRST_ANCESTOR_ONLY = 0x01,
SCROLL_OVERFLOW_HIDDEN = 0x02,
SCROLL_NO_PARENT_FRAMES = 0x04,
SCROLL_ALLOW_SMOOTH = 0x08
SCROLL_NO_PARENT_FRAMES = 0x04
};
/**
* Scrolls the view of the document so that the given area of a frame

Просмотреть файл

@ -3065,7 +3065,11 @@ nsLayoutUtils::GetClosestLayer(nsIFrame* aFrame)
GraphicsFilter
nsLayoutUtils::GetGraphicsFilterForFrame(nsIFrame* aForFrame)
{
#ifdef MOZ_GFX_OPTIMIZE_MOBILE
GraphicsFilter defaultFilter = gfxPattern::FILTER_NEAREST;
#else
GraphicsFilter defaultFilter = gfxPattern::FILTER_GOOD;
#endif
#ifdef MOZ_SVG
nsIFrame *frame = nsCSSRendering::IsCanvasFrame(aForFrame) ?
nsCSSRendering::FindBackgroundStyleFrame(aForFrame) : aForFrame;

Просмотреть файл

@ -224,10 +224,7 @@
#define NS_TIME_FUNCTION_WITH_DOCURL do{} while(0)
#endif
static const PRUint32 ANCHOR_SCROLL_FLAGS =
nsIPresShell::SCROLL_OVERFLOW_HIDDEN |
nsIPresShell::SCROLL_NO_PARENT_FRAMES |
nsIPresShell::SCROLL_ALLOW_SMOOTH;
#define ANCHOR_SCROLL_FLAGS (SCROLL_OVERFLOW_HIDDEN | SCROLL_NO_PARENT_FRAMES)
#include "nsContentCID.h"
static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID);
@ -1196,9 +1193,8 @@ protected:
// Information needed to properly handle scrolling content into view if the
// pre-scroll reflow flush can be interrupted. mContentToScrollTo is
// non-null between the initial scroll attempt and the first time we finish
// processing all our dirty roots. mContentScrollVPosition,
// mContentScrollHPosition and mContentToScrollToFlags are only used when
// it's non-null.
// processing all our dirty roots. mContentScrollVPosition and
// mContentScrollHPosition are only used when it's non-null.
nsCOMPtr<nsIContent> mContentToScrollTo;
PRIntn mContentScrollVPosition;
PRIntn mContentScrollHPosition;
@ -4152,9 +4148,7 @@ static void ScrollToShowRect(nsIScrollableFrame* aScrollFrame,
}
}
aScrollFrame->ScrollTo(scrollPt,
(aFlags & nsIPresShell::SCROLL_ALLOW_SMOOTH) ? nsIScrollableFrame::SMOOTH :
nsIScrollableFrame::INSTANT);
aScrollFrame->ScrollTo(scrollPt, nsIScrollableFrame::INSTANT);
}
nsresult

Просмотреть файл

@ -353,10 +353,3 @@ input > .anonymous-div:after {
margin: 16px;
}
/*
* Enforce nearest scaling for video in order not to lose too much performance
* after fixing bug 598736 ("Use higher-quality imageinterpolation on mobile")
*/
video {
image-rendering: -moz-crisp-edges;
}

Просмотреть файл

@ -63,8 +63,6 @@
run_for_effects := $(shell if test ! -d $(DIST); then $(NSINSTALL) -D $(DIST); fi)
_ABS_DIST := $(shell cd $(DIST) && pwd)
# This makefile uses variable overrides from the libs-% target to
# build non-default locales to non-default dist/ locations. Be aware!
@ -130,6 +128,14 @@ unpack: $(STAGEDIST)
# may be overridden if necessary.
MOZDEPTH ?= $(DEPTH)
ifdef MOZ_MAKE_COMPLETE_MAR
MAKE_COMPLETE_MAR = 1
ifeq ($(OS_ARCH), WINNT)
ifneq ($(MOZ_PKG_FORMAT), SFX7Z)
MAKE_COMPLETE_MAR =
endif
endif
endif
repackage-zip: UNPACKAGE="$(ZIP_IN)"
repackage-zip: libs-$(AB_CD)
# Adjust jar logs with the new locale (can't use sed -i because of bug 373784)
@ -153,7 +159,7 @@ ifeq (WINCE,$(OS_ARCH))
cd $(DIST)/l10n-stage; \
$(MAKE_CAB)
endif
ifdef MOZ_MAKE_COMPLETE_MAR
ifdef MAKE_COMPLETE_MAR
$(MAKE) -C $(MOZDEPTH)/tools/update-packaging full-update AB_CD=$(AB_CD) \
MOZ_PKG_PRETTYNAMES=$(MOZ_PKG_PRETTYNAMES) \
PACKAGE_BASE_DIR="$(_ABS_DIST)/l10n-stage" \

Просмотреть файл

@ -140,7 +140,7 @@ INNER_MAKE_PACKAGE = rm -f app.7z && \
mv core $(MOZ_PKG_DIR) && \
cat $(SFX_HEADER) app.7z > $(PACKAGE) && \
chmod 0755 $(PACKAGE)
INNER_UNMAKE_PACKAGE = $(CYGWIN_WRAPPER) 7z x $(UNPACKAGE) && \
INNER_UNMAKE_PACKAGE = $(CYGWIN_WRAPPER) 7z x $(UNPACKAGE) core && \
mv core $(MOZ_PKG_DIR)
endif

Просмотреть файл

@ -44,8 +44,6 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
# input location for the build, usually $(DIST)
# set this to $(DIST)/l10n-stage per override for L10n builds
PACKAGE_BASE_DIR = $(DIST)
@ -72,7 +70,20 @@ MBSDIFF_BIN = $(LIBXUL_DIST)/host/bin/mbsdiff$(HOST_BIN_SUFFIX)
full-update:: complete-patch
ifeq ($(OS_TARGET), WINNT)
MOZ_PKG_FORMAT := SFX7Z
UNPACKAGE = "$(subst $(DIST),$(_ABS_DIST),$(INSTALLER_PACKAGE))"
ifdef AB_CD
UNPACKAGE = "$(PACKAGE_BASE_DIR)/$(PACKAGE)"
endif
endif
complete-patch::
ifeq ($(OS_TARGET), WINNT)
test -f $(UNPACKAGE)
$(RM) -rf "$(PACKAGE_DIR)"
cd $(PACKAGE_BASE_DIR) && $(INNER_UNMAKE_PACKAGE)
endif
mkdir -p $(STAGE_DIR)
MAR=$(MAR_BIN) \
$(srcdir)/make_full_update.sh \
@ -89,3 +100,4 @@ partial-patch::
"$(DST_BUILD)"
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk