You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2012/01/13 12:04:57 UTC
svn commit: r1230993 - in
/myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl:
_util/_Dom.js _util/_DomQuirks.js xhrCore/_AjaxRequest.js
xhrCore/_AjaxResponse.js
Author: werpu
Date: Fri Jan 13 11:04:57 2012
New Revision: 1230993
URL: http://svn.apache.org/viewvc?rev=1230993&view=rev
Log:
https://issues.apache.org/jira/browse/MYFACES-3444 ie8 tag swallow bug fix, which ie8 inherited from ie6
Modified:
myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js
myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_DomQuirks.js
myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js
myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js
Modified: myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js?rev=1230993&r1=1230992&r2=1230993&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js (original)
+++ myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js Fri Jan 13 11:04:57 2012
@@ -473,7 +473,7 @@ _MF_SINGLTN(_PFX_UTIL + "_Dom", Object,
depth++;
}
- var dummyPlaceHolder = document.createElement("div");
+ var dummyPlaceHolder = this.getDummyPlaceHolder();
if (itemNodeName == "td") {
dummyPlaceHolder.innerHTML = "<table><tbody><tr>" + markup + "</tr></tbody></table>";
} else {
@@ -514,7 +514,14 @@ _MF_SINGLTN(_PFX_UTIL + "_Dom", Object,
if (this._isTableElement(item)) {
evalNodes = this._buildTableNodes(item, markup);
} else {
- evalNodes = (this.isDomCompliant()) ? this._buildNodesCompliant(markup) : this._buildNodesNonCompliant(markup);
+ var nonIEQuirks = (!this._RT.browser.isIE || this.browser.isIE > 8);
+ //ie8 has a special problem it still has the swallow scripts and other
+ //elements bug, but it is mostly dom compliant so we have to give it a special
+ //treatment
+ evalNodes = (this.isDomCompliant() && nonIEQuirks) ?
+ this._buildNodesCompliant(markup) :
+ //ie8 or quirks mode browsers
+ this._buildNodesNonCompliant(markup);
}
return evalNodes;
},
Modified: myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_DomQuirks.js
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_DomQuirks.js?rev=1230993&r1=1230992&r2=1230993&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_DomQuirks.js (original)
+++ myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_DomQuirks.js Fri Jan 13 11:04:57 2012
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-if (!document.querySelectorAll && _MF_SINGLTN) {
+if (_MF_SINGLTN) {
/***
Dom.js version for non html5 browsers
*/
@@ -96,9 +96,10 @@ if (!document.querySelectorAll && _MF_SI
isDomCompliant:function () {
if ('undefined' == typeof this._isCompliantBrowser) {
this._isCompliantBrowser = !!((window.Range
- && typeof Range.prototype.createContextualFragment == 'function') //createContextualFragment hints to a no quirks browser but we need more fallbacks
- || document.querySelectoryAll //query selector all hints to html5 capabilities
- || document.createTreeWalker); //treewalker is either firefox 3.5+ or ie9 standards mode
+ && typeof Range.prototype.createContextualFragment == 'function')
+ //createContextualFragment hints to a no quirks browser but we need more fallbacks
+ || document.querySelectoryAll //query selector all hints to html5 capabilities
+ || document.createTreeWalker); //treewalker is either firefox 3.5+ or ie9 standards mode
}
return this._isCompliantBrowser;
},
Modified: myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js?rev=1230993&r1=1230992&r2=1230993&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js (original)
+++ myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js Fri Jan 13 11:04:57 2012
@@ -198,7 +198,7 @@ _MF_CLS(_PFX_XHR + "_AjaxRequest", _MF_O
var xhr = this._xhr;
var _Lang = this._Lang;
- var errorText;
+ var errorText = "";
this._sendEvent("COMPLETE");
try {
var UNKNOWN = _Lang.getMessage("UNKNOWN");
@@ -212,7 +212,7 @@ _MF_CLS(_PFX_XHR + "_AjaxRequest", _MF_O
} finally {
var _Impl = this.attr("impl");
_Impl.sendError(xhr, context, _Impl.HTTPERROR,
- _Impl.HTTPERROR, errorText);
+ _Impl.HTTPERROR, errorText,"","myfaces._impl.xhrCore._AjaxRequest","onerror");
}
//_onError
},
Modified: myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js?rev=1230993&r1=1230992&r2=1230993&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js (original)
+++ myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js Fri Jan 13 11:04:57 2012
@@ -254,7 +254,7 @@ _MF_SINGLTN(_PFX_XHR + "_AjaxResponse",
var errorName = node.firstChild.textContent || "",
errorMessage = node.childNodes[1].firstChild.data || "";
- this.attr("impl").sendError(request, context, this.attr("impl").SERVER_ERROR, errorName, errorMessage);
+ this.attr("impl").sendError(request, context, this.attr("impl").SERVER_ERROR, errorName, errorMessage, "myfaces._impl.xhrCore._AjaxResponse", "processError");
},
/**