From 2e9e46a3a6185d43e6053869d363d4bd42f6ac1d Mon Sep 17 00:00:00 2001
From: Dries Buytaert <dries@buytaert.net>
Date: Sun, 11 Sep 2011 20:08:54 -0400
Subject: [PATCH] - Patch #308865 by cosmicdreams, casey, Rob Loach,
 tim.plunkett: drop IE6 support in Drupal core.

---
 misc/tabledrag.js                 | 10 -----
 misc/vertical-tabs.css            |  9 +----
 modules/color/color.js            |  8 ----
 modules/overlay/overlay-child.css |  9 -----
 modules/overlay/overlay-parent.js |  2 +-
 modules/system/system.admin.css   |  1 -
 modules/system/system.base.css    |  6 +--
 modules/toolbar/toolbar-rtl.css   |  4 --
 modules/toolbar/toolbar.css       | 15 -------
 themes/bartik/css/ie6.css         | 18 ---------
 themes/bartik/template.php        |  1 -
 themes/garland/fix-ie-rtl.css     | 61 -----------------------------
 themes/garland/fix-ie.css         | 65 -------------------------------
 themes/garland/template.php       |  2 -
 themes/seven/ie6.css              | 17 --------
 themes/seven/reset.css            |  7 ----
 themes/seven/template.php         |  2 -
 themes/seven/vertical-tabs.css    |  4 --
 themes/stark/layout.css           |  4 +-
 19 files changed, 5 insertions(+), 240 deletions(-)
 delete mode 100644 themes/bartik/css/ie6.css
 delete mode 100644 themes/garland/fix-ie-rtl.css
 delete mode 100644 themes/garland/fix-ie.css
 delete mode 100644 themes/seven/ie6.css

diff --git a/misc/tabledrag.js b/misc/tabledrag.js
index 3b56e2345c65..b9b5822c8128 100644
--- a/misc/tabledrag.js
+++ b/misc/tabledrag.js
@@ -301,11 +301,6 @@ Drupal.tableDrag.prototype.makeDraggable = function (item) {
       $(self.oldRowElement).removeClass('drag-previous');
     }
 
-    // Hack for IE6 that flickers uncontrollably if select lists are moved.
-    if (navigator.userAgent.indexOf('MSIE 6.') != -1) {
-      $('select', this.table).css('display', 'none');
-    }
-
     // Hack for Konqueror, prevent the blur handler from firing.
     // Konqueror always gives links focus, even after returning false on mousedown.
     self.safeBlur = false;
@@ -559,11 +554,6 @@ Drupal.tableDrag.prototype.dropRow = function (event, self) {
     self.dragObject = null;
     $('body').removeClass('drag');
     clearInterval(self.scrollInterval);
-
-    // Hack for IE6 that flickers uncontrollably if select lists are moved.
-    if (navigator.userAgent.indexOf('MSIE 6.') != -1) {
-      $('select', this.table).css('display', 'block');
-    }
   }
 };
 
diff --git a/misc/vertical-tabs.css b/misc/vertical-tabs.css
index 10e81539176c..505ba1e58e29 100644
--- a/misc/vertical-tabs.css
+++ b/misc/vertical-tabs.css
@@ -2,15 +2,14 @@
 div.vertical-tabs {
   margin: 1em 0 1em 15em; /* LTR */
   border: 1px solid #ccc;
-  position: relative; /* IE6/7 */
+  position: relative; /* IE7 */
 }
 .vertical-tabs ul.vertical-tabs-list {
   width: 15em;
   list-style: none;
-  list-style-image: none; /* IE6 */
+  list-style-image: none; /* IE7 */
   border-top: 1px solid #ccc;
   padding: 0;
-  position: relative; /* IE6 */
   margin: -1px 0 -1px -15em; /* LTR */
   float: left; /* LTR */
 }
@@ -71,7 +70,3 @@ div.vertical-tabs {
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
 }
-* html .vertical-tabs .form-type-textfield,
-* html .vertical-tabs .form-textarea-wrapper {
-  width: 95%; /* IE6 */
-}
diff --git a/modules/color/color.js b/modules/color/color.js
index 43099adcabf8..3e53ce115a78 100644
--- a/modules/color/color.js
+++ b/modules/color/color.js
@@ -43,14 +43,6 @@ Drupal.behaviors.color = {
       }
     }
 
-    // Fix preview background in IE6.
-    if (navigator.appVersion.match(/MSIE [0-6]\./)) {
-      var e = $('#preview #img')[0];
-      var image = e.currentStyle.backgroundImage;
-      e.style.backgroundImage = 'none';
-      e.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image.substring(5, image.length - 2) + "')";
-    }
-
     // Set up colorScheme selector.
     $('#edit-scheme', form).change(function () {
       var schemes = settings.color.schemes, colorScheme = this.options[this.selectedIndex].value;
diff --git a/modules/overlay/overlay-child.css b/modules/overlay/overlay-child.css
index d31952e594d5..f3532159bfcc 100644
--- a/modules/overlay/overlay-child.css
+++ b/modules/overlay/overlay-child.css
@@ -133,15 +133,6 @@ html.js body {
   padding-top: 0.9em;
 }
 
-/**
- * IE6 shows elements with position:fixed as position:static so replace
- * it with position:absolute;
- */
-* html #overlay-close,
-* html #overlay-close:hover {
-  position: absolute;
-}
-
 /**
  * Disable message.
  */
diff --git a/modules/overlay/overlay-parent.js b/modules/overlay/overlay-parent.js
index f9789f14aff1..135320fe603f 100644
--- a/modules/overlay/overlay-parent.js
+++ b/modules/overlay/overlay-parent.js
@@ -429,7 +429,7 @@ Drupal.overlay.eventhandlerAlterDisplacedElements = function (event) {
   var documentHeight = this.iframeWindow.document.body.clientHeight;
   var documentWidth = this.iframeWindow.document.body.clientWidth;
   // IE6 doesn't support maxWidth, use width instead.
-  var maxWidthName = (typeof document.body.style.maxWidth == 'string') ? 'maxWidth' : 'width';
+  var maxWidthName = 'maxWidth';
 
   if (Drupal.overlay.leftSidedScrollbarOffset === undefined && $(document.documentElement).attr('dir') === 'rtl') {
     // We can't use element.clientLeft to detect whether scrollbars are placed
diff --git a/modules/system/system.admin.css b/modules/system/system.admin.css
index 43340b58d3fd..7299484c38d8 100644
--- a/modules/system/system.admin.css
+++ b/modules/system/system.admin.css
@@ -243,7 +243,6 @@ table.screenshot {
 .exposed-filters .filters {
   float: left; /* LTR */
   margin-right: 1em; /* LTR */
-  width: 25em; /* IE6 */
 }
 .exposed-filters .form-item {
   margin: 0 0 0.1em 0;
diff --git a/modules/system/system.base.css b/modules/system/system.base.css
index a6748de42ebd..4ce63cf99955 100644
--- a/modules/system/system.base.css
+++ b/modules/system/system.base.css
@@ -227,7 +227,7 @@ html.js .js-hide {
  */
 .element-invisible {
   position: absolute !important;
-  clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
+  clip: rect(1px 1px 1px 1px); /* IE7 */
   clip: rect(1px, 1px, 1px, 1px);
 }
 
@@ -253,10 +253,6 @@ html.js .js-hide {
   clear: both;
   visibility: hidden;
 }
-/* IE6 */
-* html .clearfix {
-  height: 1%;
-}
 /* IE7 */
 *:first-child + html .clearfix {
   min-height: 1%;
diff --git a/modules/toolbar/toolbar-rtl.css b/modules/toolbar/toolbar-rtl.css
index acbc98f82873..e12154724a70 100644
--- a/modules/toolbar/toolbar-rtl.css
+++ b/modules/toolbar/toolbar-rtl.css
@@ -35,7 +35,3 @@
   left: 10px;
   right: auto;
 }
-* html #toolbar {
-  left: 0;
-  padding-left: 0;
-}
diff --git a/modules/toolbar/toolbar.css b/modules/toolbar/toolbar.css
index cbf3c14c8fe3..4b62cded060e 100644
--- a/modules/toolbar/toolbar.css
+++ b/modules/toolbar/toolbar.css
@@ -133,18 +133,3 @@ body.toolbar-drawer {
   position: relative;
   padding: 0 10px;
 }
-
-/**
- * IE 6 Fix.
- *
- * IE 6 shows elements with position:fixed as position:static so we replace
- * it with position:absolute; toolbar needs its z-index to stay above overlay.
- */
-* html #toolbar {
-  left: -20px;
-  margin: 0;
-  padding-right: 0;
-  position: absolute;
-  right: 0;
-  width: 100%;
-}
diff --git a/themes/bartik/css/ie6.css b/themes/bartik/css/ie6.css
deleted file mode 100644
index 435fab02bd8d..000000000000
--- a/themes/bartik/css/ie6.css
+++ /dev/null
@@ -1,18 +0,0 @@
-
-#content {
-  overflow: hidden;
-}
-.form-item-search-block-form {
-  width: 50%;
-}
-.tabs ul.primary,
-.region-header .block-menu li a,
-.comment-form .form-item {
-  zoom: 1;
-}
-#block-search-form .form-item-search-block-form input {
-  width: 67%;
-}
-.node-teaser {
-  border-bottom: 1px solid #d3d7d9;
-}
diff --git a/themes/bartik/template.php b/themes/bartik/template.php
index d523a0abab57..8d2b8c4e316c 100644
--- a/themes/bartik/template.php
+++ b/themes/bartik/template.php
@@ -23,7 +23,6 @@ function bartik_preprocess_html(&$variables) {
 
   // Add conditional stylesheets for IE
   drupal_add_css(path_to_theme() . '/css/ie.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 7', '!IE' => FALSE), 'preprocess' => FALSE));
-  drupal_add_css(path_to_theme() . '/css/ie6.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'IE 6', '!IE' => FALSE), 'preprocess' => FALSE));
 }
 
 /**
diff --git a/themes/garland/fix-ie-rtl.css b/themes/garland/fix-ie-rtl.css
deleted file mode 100644
index fb1901b37eba..000000000000
--- a/themes/garland/fix-ie-rtl.css
+++ /dev/null
@@ -1,61 +0,0 @@
-
-body {
-  /* Center layout */
-  text-align: center;
-}
-
-#squeeze {
-  zoom: 1;
-  direction: ltr;
-}
-
-#squeeze .left-corner {
-  direction: rtl
-}
-
-#header-region,
-#wrapper #container {
-  /* Reset text alignment */
-  text-align: right;
-}
-
-#wrapper #container #center {
-  /* Reduce amount of damage done by extremely wide content */
-  overflow: hidden;
-}
-
-#wrapper #container #center .right-corner .left-corner {
-  /* Because of the lack of min-height, we use height as an alternative */
-  height: 400px;
-}
-
-fieldset {
-  /* Don't draw backgrounds on fieldsets in IE, as they look really bad. */
-  background: none;
-}
-
-/* Prevent fieldsets from shifting when changing collapsed state. */
-html.js fieldset.collapsible {
-  top: -1em;
-}
-
-html.js fieldset.collapsed {
-  top: 0;
-  margin-bottom: 1em;
-}
-
-tr.menu-disabled {
-  /* Use filter to emulate CSS3 opacity */
-  filter: alpha(opacity=50);
-}
-
-#header-region {
-  /* Because of the lack of min-height, we use height as an alternative */
-  height: 1em;
-}
-
-#attach-hide label,
-#uploadprogress div.message {
-  /* Fading elements in IE causes the text to bleed unless they have a background. */
-  background-color: #ffffff;
-}
diff --git a/themes/garland/fix-ie.css b/themes/garland/fix-ie.css
deleted file mode 100644
index 1a1c131bc21f..000000000000
--- a/themes/garland/fix-ie.css
+++ /dev/null
@@ -1,65 +0,0 @@
-
-body {
-  /* Center layout */
-  text-align: center;
-}
-
-#header-region,
-#wrapper #container {
-  /* Reset text alignment */
-  text-align: left; /* LTR */
-}
-
-#wrapper #container #center {
-  /* Reduce amount of damage done by extremely wide content */
-  overflow: hidden;
-}
-
-#wrapper #container #center .right-corner .left-corner {
-  /* Because of the lack of min-height, we use height as an alternative */
-  height: 400px;
-}
-
-fieldset {
-  /* Don't draw backgrounds on fieldsets in IE, as they look really bad. */
-  background: none;
-}
-
-div.vertical-tabs ul.vertical-tabs-list li.first {
-  background-image: none;
-}
-
-ul.primary {
-  /* Fix missing top margin */
-  position: relative; /* LTR */
-/*  top: 0.5em; */
-}
-
-/* Prevent fieldsets from shifting when changing collapsed state. */
-html.js fieldset.collapsible {
-  top: -1em;
-}
-html.js fieldset.collapsed {
-  top: 0;
-  margin-bottom: 1em;
-}
-
-tr.menu-disabled {
-  /* Use filter to emulate CSS3 opacity */
-  filter: alpha(opacity=50);
-}
-
-#header-region {
-  /* Because of the lack of min-height, we use height as an alternative */
-  height: 1em;
-}
-
-tr.taxonomy-term-preview {
-  filter: alpha(opacity=50);
-}
-
-#attach-hide label,
-#uploadprogress div.message {
-  /* Fading elements in IE causes the text to bleed unless they have a background. */
-  background-color: #ffffff;
-}
diff --git a/themes/garland/template.php b/themes/garland/template.php
index 1b144f1210b9..fc09571435f3 100644
--- a/themes/garland/template.php
+++ b/themes/garland/template.php
@@ -40,8 +40,6 @@ function garland_preprocess_html(&$vars) {
   if (theme_get_setting('garland_width') == 'fluid') {
     $vars['classes_array'][] = 'fluid-width';
   }
-  // Add conditional CSS for IE6.
-  drupal_add_css(path_to_theme() . '/fix-ie.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lt IE 7', '!IE' => FALSE), 'preprocess' => FALSE));
 }
 
 /**
diff --git a/themes/seven/ie6.css b/themes/seven/ie6.css
deleted file mode 100644
index 7d1c320b84bc..000000000000
--- a/themes/seven/ie6.css
+++ /dev/null
@@ -1,17 +0,0 @@
-
-ul.menu li,
-ul.menu li a,
-ul.links li,
-ul.links li a,
-.action-links,
-#page {
-  height: 1%;
-}
-#block-system-main ul.admin-list li a {
-  height: 1px;
-  position: relative;
-  display: block;
-}
-#block-system-main ul.admin-list li div.description a {
-  display: inline;
-}
diff --git a/themes/seven/reset.css b/themes/seven/reset.css
index 0bdc29aef80d..78602dea037e 100644
--- a/themes/seven/reset.css
+++ b/themes/seven/reset.css
@@ -205,13 +205,6 @@ ul.inline:after {
   display: none;
   clear: none;
 }
-/* IE6 */
-* html .form-item,
-* html ul.links,
-* html div.admin-panel .body,
-* html .clearfix {
-  height: 1%;
-}
 /* IE7 */
 *:first-child + html .form-item,
 *:first-child + html ul.links,
diff --git a/themes/seven/template.php b/themes/seven/template.php
index 437e9a79f006..b78f5ab5f834 100644
--- a/themes/seven/template.php
+++ b/themes/seven/template.php
@@ -20,8 +20,6 @@ function seven_preprocess_html(&$vars) {
   drupal_add_css(path_to_theme() . '/ie.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE), 'weight' => 999, 'preprocess' => FALSE));
   // Add conditional CSS for IE7 and below.
   drupal_add_css(path_to_theme() . '/ie7.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 7', '!IE' => FALSE), 'weight' => 999, 'preprocess' => FALSE));
-  // Add conditional CSS for IE6.
-  drupal_add_css(path_to_theme() . '/ie6.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 6', '!IE' => FALSE), 'weight' => 999, 'preprocess' => FALSE));
 }
 
 /**
diff --git a/themes/seven/vertical-tabs.css b/themes/seven/vertical-tabs.css
index 4f6622251c73..f06aade8135b 100644
--- a/themes/seven/vertical-tabs.css
+++ b/themes/seven/vertical-tabs.css
@@ -87,7 +87,3 @@ div.vertical-tabs .vertical-tabs-panes legend {
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
 }
-* html .vertical-tabs .form-type-textfield,
-* html .vertical-tabs .form-textarea-wrapper {
-  width: 95%; /* IE6 */
-}
diff --git a/themes/stark/layout.css b/themes/stark/layout.css
index 43bb93f88856..7e49d74a8f7c 100644
--- a/themes/stark/layout.css
+++ b/themes/stark/layout.css
@@ -10,9 +10,7 @@
  * This layout method works reasonably well, but shouldn't be used on a
  * production site because it can break. For example, if an over-large image
  * (one that is wider than 20% of the viewport) is in the left sidebar, the
- * image will overlap with the #content to the right. The exception to this
- * is IE6 which will just hide the navigation block completely in these
- * instances due to a positioning bug.
+ * image will overlap with the #content to the right.
  */
 
 #content,
-- 
GitLab