Pullup commits from trunk to 2.6 branch:

* virtualStyle typo (Closes #1495)
 * JSON fix for Safari 3.1 (Closes #1493)
 * panzoombar off-by-one (Closes #1486)
 * Handler Hover exception (Closes #1480)
 * Popup.framedcloud exception (Closes #1479)
 * VML Renderer when including namespace in page (Closes #1477)
 * SLD/Rule/Filter changes -- most of this commit (Closes #1492)


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.6@6819 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2008-04-08 01:51:04 +00:00
parent b9348dd5d5
commit 4085a2c220
29 changed files with 842 additions and 665 deletions

View File

@@ -56,12 +56,24 @@ OpenLayers.Util.extend = function(destination, source) {
destination[property] = value;
}
}
/**
* IE doesn't include the toString property when iterating over an object's
* properties with the for(property in object) syntax. Explicitly check if
* the source has its own toString property.
*/
if(source.hasOwnProperty && source.hasOwnProperty('toString')) {
/*
* FF/Windows < 2.0.0.13 reports "Illegal operation on WrappedNative
* prototype object" when calling hawOwnProperty if the source object
* is an instance of window.Event.
*/
var sourceIsEvt = typeof window.Event == "function"
&& source instanceof window.Event;
if(!sourceIsEvt
&& source.hasOwnProperty && source.hasOwnProperty('toString')) {
destination.toString = source.toString;
}
}
@@ -510,9 +522,18 @@ OpenLayers.Util.upperCaseObject = function (object) {
* in place and returned by this function.
*/
OpenLayers.Util.applyDefaults = function (to, from) {
/*
* FF/Windows < 2.0.0.13 reports "Illegal operation on WrappedNative
* prototype object" when calling hawOwnProperty if the source object is an
* instance of window.Event.
*/
var fromIsEvt = typeof window.Event == "function"
&& from instanceof window.Event;
for (var key in from) {
if (to[key] === undefined ||
(from.hasOwnProperty
(!fromIsEvt && from.hasOwnProperty
&& from.hasOwnProperty(key) && !to.hasOwnProperty(key))) {
to[key] = from[key];
}
@@ -522,7 +543,7 @@ OpenLayers.Util.applyDefaults = function (to, from) {
* properties with the for(property in object) syntax. Explicitly check if
* the source has its own toString property.
*/
if(from.hasOwnProperty
if(!fromIsEvt && from.hasOwnProperty
&& from.hasOwnProperty('toString') && !to.hasOwnProperty('toString')) {
to.toString = from.toString;
}