aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-06-29 09:20:11 -0700
committerJose Antonio Marquez2012-06-29 09:20:11 -0700
commit20e945e1f6f6e44cc11de97063299698d4b8f881 (patch)
treeca7283597724981e1ec5a521faa4fecfaa795aae
parent54f95bf52f660f5d8bcb3180c203ffd6ce9b8557 (diff)
parentecd9e3b3b09695e3e7115c04e75add5a20c5c6fe (diff)
downloadninja-20e945e1f6f6e44cc11de97063299698d4b8f881.tar.gz
Merge branch 'refs/heads/Ninja-Internal' into Document
-rwxr-xr-xjs/controllers/styles-controller.js9
-rw-r--r--node_modules/montage-google/youtube-channel.reel/youtube-channel.html10
-rw-r--r--node_modules/montage-google/youtube-channel.reel/youtube-channel.js9
3 files changed, 22 insertions, 6 deletions
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js
index 0f847653..e25ed20c 100755
--- a/js/controllers/styles-controller.js
+++ b/js/controllers/styles-controller.js
@@ -213,6 +213,9 @@ var stylesController = exports.StylesController = Montage.create(Component, {
213 213
214 stylesheet.insertRule(ruleText, index); 214 stylesheet.insertRule(ruleText, index);
215 215
216 ///// Invalidate cache because rule dominance is affected
217 this._clearCache();
218
216 this.styleSheetModified(stylesheet); 219 this.styleSheetModified(stylesheet);
217 220
218 rule = stylesheet.rules[index]; 221 rule = stylesheet.rules[index];
@@ -775,7 +778,7 @@ var stylesController = exports.StylesController = Montage.create(Component, {
775 var a = this._getMostSpecificSelectorForElement(element, rule1[this.CONST.SPECIFICITY_KEY]), 778 var a = this._getMostSpecificSelectorForElement(element, rule1[this.CONST.SPECIFICITY_KEY]),
776 b = this._getMostSpecificSelectorForElement(element, rule2[this.CONST.SPECIFICITY_KEY]), 779 b = this._getMostSpecificSelectorForElement(element, rule2[this.CONST.SPECIFICITY_KEY]),
777 win = element.ownerDocument.defaultView, 780 win = element.ownerDocument.defaultView,
778 order; 781 order, sheetAIndex, sheetBIndex, ruleAIndex, ruleBIndex;
779 782
780 order = this.compareSpecificity(a.specificity, b.specificity); 783 order = this.compareSpecificity(a.specificity, b.specificity);
781 784
@@ -786,9 +789,9 @@ var stylesController = exports.StylesController = Montage.create(Component, {
786 /// If tied again (same sheet), determine which is further down in the sheet 789 /// If tied again (same sheet), determine which is further down in the sheet
787 if(sheetAIndex === sheetBIndex) { 790 if(sheetAIndex === sheetBIndex) {
788 ruleAIndex = this.getRuleIndex(rule1); ruleBIndex = this.getRuleIndex(rule2); 791 ruleAIndex = this.getRuleIndex(rule1); ruleBIndex = this.getRuleIndex(rule2);
789 return ruleAIndex < ruleBIndex ? 1 : (ruleAIndex > ruleBIndex) ? -1 : 0; 792 return ruleAIndex < ruleBIndex ? false : (ruleAIndex > ruleBIndex) ? true : false;
790 } else { 793 } else {
791 return sheetAIndex < sheetBIndex ? 1 : (sheetAIndex > sheetBIndex) ? -1 : 0; 794 return sheetAIndex < sheetBIndex ? false : (sheetAIndex > sheetBIndex) ? true : false;
792 } 795 }
793 } 796 }
794 797
diff --git a/node_modules/montage-google/youtube-channel.reel/youtube-channel.html b/node_modules/montage-google/youtube-channel.reel/youtube-channel.html
index 01cc42f3..65ffc945 100644
--- a/node_modules/montage-google/youtube-channel.reel/youtube-channel.html
+++ b/node_modules/montage-google/youtube-channel.reel/youtube-channel.html
@@ -96,7 +96,7 @@
96 .montage-youtube-channel-close { 96 .montage-youtube-channel-close {
97 position: absolute; 97 position: absolute;
98 top: 5px; 98 top: 5px;
99 left: 5px; 99 right: 5px;
100 100
101 width: 25px; 101 width: 25px;
102 height: 25px; 102 height: 25px;
@@ -107,6 +107,14 @@
107 107
108 color: #EEE; 108 color: #EEE;
109 outline: none; 109 outline: none;
110 text-align: center;
111 padding: 0;
112 }
113
114 .montage-youtube-channel .montage-youtube-player {
115 border-top: 35px solid #000;
116 -webkit-box-sizing: border-box;
117 box-sizing: border-box;
110 } 118 }
111 </style> 119 </style>
112</head> 120</head>
diff --git a/node_modules/montage-google/youtube-channel.reel/youtube-channel.js b/node_modules/montage-google/youtube-channel.reel/youtube-channel.js
index 95cd336a..f06216e1 100644
--- a/node_modules/montage-google/youtube-channel.reel/youtube-channel.js
+++ b/node_modules/montage-google/youtube-channel.reel/youtube-channel.js
@@ -180,8 +180,12 @@ var YoutubeChannel = exports.YoutubeChannel = Montage.create(Component, {
180 180
181 // take the video from the top only once it's stopped animating 181 // take the video from the top only once it's stopped animating
182 window.setTimeout(function() { 182 window.setTimeout(function() {
183 self.element.style.zIndex = null; 183 self._element.style.zIndex = null;
184 }, 500); 184 // HACK: Trigger a redraw so that Flash in Chrome on
185 // Windows doesn't remain rendered on top of everything,
186 // despite actually being hidden
187 self.player.element.getBoundingClientRect();
188 }, 510);
185 } 189 }
186 190
187 } 191 }
@@ -196,6 +200,7 @@ var YoutubeChannel = exports.YoutubeChannel = Montage.create(Component, {
196 value: function() { 200 value: function() {
197 var doc = this._element.ownerDocument; 201 var doc = this._element.ownerDocument;
198 202
203 this._popupElement.style.width = doc.width + "px";
199 this.player.width = doc.width; 204 this.player.width = doc.width;
200 this.player.height = doc.height; 205 this.player.height = doc.height;
201 206