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

Unified Diff: third_party/WebKit/Source/devtools/front_end/network/RequestHTMLView.js

Issue 2466123002: DevTools: reformat front-end code to match chromium style. (Closed)
Patch Set: all done Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/network/RequestHTMLView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/RequestHTMLView.js b/third_party/WebKit/Source/devtools/front_end/network/RequestHTMLView.js
index 3e44bcdaee5ca6c768bc7dc18e5960a1d0c5ceee..7e0a7d137c591e7a8cce3078a92ae819c0103804 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/RequestHTMLView.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/RequestHTMLView.js
@@ -27,41 +27,41 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
/**
- * @constructor
- * @extends {WebInspector.RequestView}
- * @param {!WebInspector.NetworkRequest} request
- * @param {string} dataURL
+ * @unrestricted
*/
-WebInspector.RequestHTMLView = function(request, dataURL)
-{
- WebInspector.RequestView.call(this, request);
+WebInspector.RequestHTMLView = class extends WebInspector.RequestView {
+ /**
+ * @param {!WebInspector.NetworkRequest} request
+ * @param {string} dataURL
+ */
+ constructor(request, dataURL) {
+ super(request);
this._dataURL = dataURL;
- this.element.classList.add("html");
-};
-
-WebInspector.RequestHTMLView.prototype = {
- wasShown: function()
- {
- this._createIFrame();
- },
+ this.element.classList.add('html');
+ }
- willHide: function(parentElement)
- {
- this.element.removeChildren();
- },
+ /**
+ * @override
+ */
+ wasShown() {
+ this._createIFrame();
+ }
- _createIFrame: function()
- {
- // We need to create iframe again each time because contentDocument
- // is deleted when iframe is removed from its parent.
- this.element.removeChildren();
- var iframe = createElement("iframe");
- iframe.setAttribute("sandbox", ""); // Forbid to run JavaScript and set unique origin.
- iframe.setAttribute("src", this._dataURL);
- this.element.appendChild(iframe);
- },
+ /**
+ * @override
+ */
+ willHide() {
+ this.element.removeChildren();
+ }
- __proto__: WebInspector.RequestView.prototype
+ _createIFrame() {
+ // We need to create iframe again each time because contentDocument
+ // is deleted when iframe is removed from its parent.
+ this.element.removeChildren();
+ var iframe = createElement('iframe');
+ iframe.setAttribute('sandbox', ''); // Forbid to run JavaScript and set unique origin.
+ iframe.setAttribute('src', this._dataURL);
+ this.element.appendChild(iframe);
+ }
};

Powered by Google App Engine
This is Rietveld 408576698