Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelinePaintProfilerView.js

Issue 2626143004: DevTools: move from Common module - Geometry and CSSShadowModel (Closed)
Patch Set: minimize test diff Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 /** 4 /**
5 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 Timeline.TimelinePaintProfilerView = class extends UI.SplitWidget { 7 Timeline.TimelinePaintProfilerView = class extends UI.SplitWidget {
8 /** 8 /**
9 * @param {!TimelineModel.TimelineFrameModel} frameModel 9 * @param {!TimelineModel.TimelineFrameModel} frameModel
10 */ 10 */
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 style.borderTopWidth = this._maskRectangle.y + 'px'; 177 style.borderTopWidth = this._maskRectangle.y + 'px';
178 style.borderRightWidth = (width - this._maskRectangle.x - this._maskRectan gle.width) + 'px'; 178 style.borderRightWidth = (width - this._maskRectangle.x - this._maskRectan gle.width) + 'px';
179 style.borderBottomWidth = (height - this._maskRectangle.y - this._maskRect angle.height) + 'px'; 179 style.borderBottomWidth = (height - this._maskRectangle.y - this._maskRect angle.height) + 'px';
180 } 180 }
181 this._transformController.setScaleConstraints(0.5, 10 / scale); 181 this._transformController.setScaleConstraints(0.5, 10 / scale);
182 var matrix = new WebKitCSSMatrix() 182 var matrix = new WebKitCSSMatrix()
183 .scale(this._transformController.scale(), this._transformCo ntroller.scale()) 183 .scale(this._transformController.scale(), this._transformCo ntroller.scale())
184 .translate(clientWidth / 2, clientHeight / 2) 184 .translate(clientWidth / 2, clientHeight / 2)
185 .scale(scale, scale) 185 .scale(scale, scale)
186 .translate(-width / 2, -height / 2); 186 .translate(-width / 2, -height / 2);
187 var bounds = Common.Geometry.boundsForTransformedPoints(matrix, [0, 0, 0, wi dth, height, 0]); 187 var bounds = UI.Geometry.boundsForTransformedPoints(matrix, [0, 0, 0, width, height, 0]);
188 this._transformController.clampOffsets( 188 this._transformController.clampOffsets(
189 paddingX - bounds.maxX, clientWidth - paddingX - bounds.minX, paddingY - bounds.maxY, 189 paddingX - bounds.maxX, clientWidth - paddingX - bounds.minX, paddingY - bounds.maxY,
190 clientHeight - paddingY - bounds.minY); 190 clientHeight - paddingY - bounds.minY);
191 matrix = new WebKitCSSMatrix() 191 matrix = new WebKitCSSMatrix()
192 .translate(this._transformController.offsetX(), this._transform Controller.offsetY()) 192 .translate(this._transformController.offsetX(), this._transform Controller.offsetY())
193 .multiply(matrix); 193 .multiply(matrix);
194 this._imageContainer.style.webkitTransform = matrix.toString(); 194 this._imageContainer.style.webkitTransform = matrix.toString();
195 } 195 }
196 196
197 /** 197 /**
198 * @param {string=} imageURL 198 * @param {string=} imageURL
199 */ 199 */
200 showImage(imageURL) { 200 showImage(imageURL) {
201 this._imageContainer.classList.toggle('hidden', !imageURL); 201 this._imageContainer.classList.toggle('hidden', !imageURL);
202 if (imageURL) 202 if (imageURL)
203 this._imageElement.src = imageURL; 203 this._imageElement.src = imageURL;
204 } 204 }
205 205
206 /** 206 /**
207 * @param {?Protocol.DOM.Rect} maskRectangle 207 * @param {?Protocol.DOM.Rect} maskRectangle
208 */ 208 */
209 setMask(maskRectangle) { 209 setMask(maskRectangle) {
210 this._maskRectangle = maskRectangle; 210 this._maskRectangle = maskRectangle;
211 this._maskElement.classList.toggle('hidden', !maskRectangle); 211 this._maskElement.classList.toggle('hidden', !maskRectangle);
212 } 212 }
213 }; 213 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698