This is an automated email from the ASF dual-hosted git repository.

svenmeier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit 5d45c069ea8f3f088424b0205592346577660163
Author: Sven Meier <[email protected]>
AuthorDate: Mon May 6 13:52:38 2019 +0200

    WICKET-6667 JS removed Wicket.Browser.isKHTML()
    
    was used in model.js only
---
 .../wicket/ajax/res/js/wicket-ajax-jquery.js       | 15 ---------------
 .../extensions/ajax/markup/html/modal/res/modal.js | 22 ++++------------------
 2 files changed, 4 insertions(+), 33 deletions(-)

diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js 
b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
index 7d441ea..3b631bd 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
+++ 
b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
@@ -1854,12 +1854,6 @@
                                        // get the header contribution text and 
unescape it if necessary
                                        var text = Wicket.DOM.text(headerNode);
 
-                                       if (Wicket.Browser.isKHTML()) {
-                                               // konqueror crashes if there 
is a <script element in the xml, but <SCRIPT is fine.
-                                               text = text.replace(/<script/g, 
"<SCRIPT");
-                                               text = 
text.replace(/<\/script>/g, "</SCRIPT>");
-                                       }
-
                                        // build a DOM tree of the contribution
                                        var xmldoc = Wicket.Xml.parse(text);
                                        return xmldoc;
@@ -2481,15 +2475,6 @@
        jQuery.extend(true, Wicket, {
 
                Browser: {
-                       _isKHTML: null,
-                       isKHTML: function () {
-                               var wb = Wicket.Browser;
-                               if (wb._isKHTML === null) {
-                                       wb._isKHTML = 
(/Konqueror|KHTML/).test(window.navigator.userAgent) && 
!/Apple/.test(window.navigator.userAgent);
-                               }
-                               return wb._isKHTML;
-                       },
-
                        _isSafari: null,
                        isSafari: function () {
                                var wb = Wicket.Browser;
diff --git 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
index d5800e0..845391b 100644
--- 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
+++ 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
@@ -71,7 +71,7 @@
                var Win;
 
                // if it is an iframe window...
-               if (typeof(settings.src) !== "undefined" && 
Wicket.Browser.isKHTML() === false) {
+               if (typeof(settings.src) !== "undefined") {
                        // attempt to get class from parent
                        try {
                                Win = window.parent.Wicket.Window;
@@ -757,13 +757,6 @@
                                                this.captionText.innerHTML = 
this.content.contentWindow.document.title;
                                                // 
http://www.w3.org/TR/wai-aria/states_and_properties#aria-labelledby
                                                
this.window.setAttribute('aria-labelledBy', 
this.content.contentWindow.document.title);
-
-                                               // konqueror doesn't refresh 
caption text properly
-                                               if (Wicket.Browser.isKHTML()) {
-                                                       
this.captionText.style.display = 'none';
-                                                       
window.setTimeout(Wicket.bind(function() { 
this.captionText.style.display="block";}, this), 0);
-                                               }
-
                                        }
                                }
                        } catch (ignore) {
@@ -791,7 +784,7 @@
                onEnd: function(object) {
                        
jQuery(this.window).find('iframe').css('pointer-events', 'auto');
 
-                       if (Wicket.Browser.isKHTML() || 
this.content.style.visibility==='hidden') {
+                       if (this.content.style.visibility==='hidden') {
                                this.content.style.visibility='hidden';
                                window.setTimeout(Wicket.bind(function() { 
this.content.style.visibility='visible'; }, this),  0 );
                        }
@@ -1143,16 +1136,9 @@
 
                                e.style.zIndex = Wicket.Window.Mask.zIndex;
 
-                               // HACK - KHTML doesn't support colors with 
alpha transparency
-                               // if the mask is not transparent we have to 
either
-                               // make the background image visible (setting 
color to transparent) - for KHTML
-                               // or make the background-image invisible 
(setting it to null) - for other browsers
+                               // if the mask is not transparent we have to 
make the background-image invisible (setting it to null)
                                if (this.transparent === false) {
-                                       if (Wicket.Browser.isKHTML() === false) 
{
-                                               e.style.backgroundImage = 
"none";
-                                       } else {
-                                               e.style.backgroundColor = 
"transparent";
-                                       }
+                                       e.style.backgroundImage = "none";
                                }
 
                                // HACK - it really sucks that we have to set 
this to absolute even for gecko.

Reply via email to