diff --git a/dom/public/genPropNames.pl b/dom/public/genPropNames.pl index 67eb85dd6b3..e69de29bb2d 100644 --- a/dom/public/genPropNames.pl +++ b/dom/public/genPropNames.pl @@ -1,98 +0,0 @@ -#!/usr/bin/perl -# -# The contents of this file are subject to the Mozilla Public -# License Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS -# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -# implied. See the License for the specific language governing -# rights and limitations under the License. -# -# The Original Code is mozilla.org code. -# -# The Initial Developer of the Original Code is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1999 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# Norris Boyd -# - -open(IN, "nsDOMPropEnums.h") || - die("Error opening 'nsDOMPropEnums.h': $!\n"); - -open(OUT, ">nsDOMPropNames.h") || - die("Error opening 'nsDOMPropNames.h': $!\n"); - -while () { - if (/^enum nsDOMProp/) { - last; - } -} - -print OUT <<'EOF'; -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * Norris Boyd - */ - -/* nsDOMPropNames.h -- an definition of all DOM property names used to provide -** per-property security policies. -** AUTOMATICALLY GENERATED -- See genPropNames.pl -*/ - -#ifndef nsDOMPropNames_h__ -#define nsDOMPropNames_h__ - -#define NS_DOM_PROP_NAMES \ -EOF - -$last = ""; - -while () { - if (/NS_DOM_PROP_MAX/) { - last; - } - $save = $_; - s/,.*/", \\/; - s/NS_DOM_PROP_/"/; - s/_/./; - $_ = lc($_); - print OUT $_; - # Check order of names and make sure they are sorted. - # It's important we check after the subsitution of '.' for '_' - # since it's the sort order of the names we care about and '.' - # and '_' sort differently with respect to letters. - if ($last ne "" && ($last gt $_)) { - die "Name $lastsave and $save are out of order in nsDOMPropEnums.h.\n"; - } - $last = $_; - $lastsave = $save; -} - -print OUT <CheckScriptAccess(cx, obj, NS_DOM_PROP_IMAGE_NATURALHEIGHT, PR_FALSE); + if (NS_SUCCEEDED(rv)) { + PRInt32 prop; + nsIDOMImage* b; + if (NS_OK == a->QueryInterface(kIImageIID, (void **)&b)) { + rv = b->GetNaturalHeight(&prop); + if(NS_SUCCEEDED(rv)) { + *vp = INT_TO_JSVAL(prop); + } + NS_RELEASE(b); + } + else { + rv = NS_ERROR_DOM_WRONG_TYPE_ERR; + } + } + break; + } + case IMAGE_NATURALWIDTH: + { + rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_IMAGE_NATURALWIDTH, PR_FALSE); + if (NS_SUCCEEDED(rv)) { + PRInt32 prop; + nsIDOMImage* b; + if (NS_OK == a->QueryInterface(kIImageIID, (void **)&b)) { + rv = b->GetNaturalWidth(&prop); + if(NS_SUCCEEDED(rv)) { + *vp = INT_TO_JSVAL(prop); + } + NS_RELEASE(b); + } + else { + rv = NS_ERROR_DOM_WRONG_TYPE_ERR; + } + } + break; + } default: return nsJSUtils::nsCallJSScriptObjectGetProperty(a, cx, obj, id, vp); } @@ -663,6 +703,8 @@ static JSPropertySpec HTMLImageElementProperties[] = {"hspace", IMAGE_HSPACE, JSPROP_ENUMERATE}, {"vspace", IMAGE_VSPACE, JSPROP_ENUMERATE}, {"width", IMAGE_WIDTH, JSPROP_ENUMERATE}, + {"naturalHeight", IMAGE_NATURALHEIGHT, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"naturalWidth", IMAGE_NATURALWIDTH, JSPROP_ENUMERATE | JSPROP_READONLY}, {0} }; diff --git a/dom/tools/macbuild/IDL_MacPrefix.h b/dom/tools/macbuild/IDL_MacPrefix.h index fcef523decd..e69de29bb2d 100644 --- a/dom/tools/macbuild/IDL_MacPrefix.h +++ b/dom/tools/macbuild/IDL_MacPrefix.h @@ -1,3 +0,0 @@ - -#include "MacPrefix_debug.h" -