Skip to content

Commit ff3d162

Browse files
committed
Adaptation model and fix mistakes in grammar
1 parent 90d64ad commit ff3d162

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

cocos2d/transitions/CCTransition.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ cc.TransitionShrinkGrow = cc.TransitionScene.extend(/** @lends cc.TransitionShri
879879
var scaleOut = cc.scaleTo(this._duration, 0.01);
880880
var scaleIn = cc.scaleTo(this._duration, 1.0);
881881

882-
this._inScene.runAction(cc.sequence(this.easeActionWithAction(scaleIn), cc.callFunc(this.finish, this));
882+
this._inScene.runAction(cc.sequence(this.easeActionWithAction(scaleIn), cc.callFunc(this.finish, this)));
883883
this._outScene.runAction(this.easeActionWithAction(scaleOut));
884884
},
885885

extensions/ccui/uiwidgets/UIWebView.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ ccui.WebView = ccui.Widget.extend({
7979
* go back
8080
*/
8181
goBack: function(){
82+
if(ccui.WebView.polyfill.closeHistory)
83+
return cc.log("The current browser does not support the GoBack");
8284
var iframe = this._renderCmd._iframe;
8385
if(iframe){
8486
var win = iframe.contentWindow;
@@ -91,6 +93,8 @@ ccui.WebView = ccui.Widget.extend({
9193
* go forward
9294
*/
9395
goForward: function(){
96+
if(ccui.WebView.polyfill.closeHistory)
97+
return cc.log("The current browser does not support the GoForward");
9498
var iframe = this._renderCmd._iframe;
9599
if(iframe){
96100
var win = iframe.contentWindow;
@@ -195,14 +199,25 @@ ccui.WebView.EventType = {
195199

196200
(function(){
197201

198-
ccui.WebView.polyfill = {
202+
var polyfill = ccui.WebView.polyfill = {
199203
devicePixelRatio: false,
200204
enableDiv: false
201205
};
202206

203207
if(cc.sys.os === cc.sys.OS_IOS)
204208
ccui.WebView.polyfill.enableDiv = true;
205209

210+
if(cc.sys.isMobile){
211+
if(cc.sys.browserType === cc.sys.BROWSER_TYPE_FIREFOX){
212+
polyfill.enableBG = true;
213+
}
214+
}else{
215+
if(cc.sys.browserType === cc.sys.BROWSER_TYPE_IE){
216+
polyfill.closeHistory = true;
217+
}
218+
}
219+
220+
206221
})();
207222

208223
(function(polyfill){
@@ -222,6 +237,10 @@ ccui.WebView.EventType = {
222237
}else{
223238
this._div = this._iframe = document.createElement("iframe");
224239
}
240+
241+
if(polyfill.enableBG)
242+
this._div.style["background"] = "#FFF";
243+
225244
this._iframe.addEventListener("load", function(){
226245
cc.eventManager.dispatchCustomEvent(ccui.WebView.EventType.LOADED);
227246
});

0 commit comments

Comments
 (0)