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

Side by Side Diff: Source/devtools/front_end/sources/BreakpointsSidebarPane.js

Issue 401523004: Break on window close when the inspector is open (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: a working test Created 6 years, 5 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 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 this.categoriesElement.classList.add("properties-tree"); 522 this.categoriesElement.classList.add("properties-tree");
523 this.categoriesElement.classList.add("event-listener-breakpoints"); 523 this.categoriesElement.classList.add("event-listener-breakpoints");
524 this.categoriesTreeOutline = new TreeOutline(this.categoriesElement); 524 this.categoriesTreeOutline = new TreeOutline(this.categoriesElement);
525 this.bodyElement.appendChild(this.categoriesElement); 525 this.bodyElement.appendChild(this.categoriesElement);
526 526
527 this._categoryItems = []; 527 this._categoryItems = [];
528 // FIXME: uncomment following once inspector stops being drop targer in majo r ports. 528 // FIXME: uncomment following once inspector stops being drop targer in majo r ports.
529 // Otherwise, inspector page reacts on drop event and tries to load the even t data. 529 // Otherwise, inspector page reacts on drop event and tries to load the even t data.
530 // this._createCategory(WebInspector.UIString("Drag"), ["drag", "drop", "dra gstart", "dragend", "dragenter", "dragleave", "dragover"]); 530 // this._createCategory(WebInspector.UIString("Drag"), ["drag", "drop", "dra gstart", "dragend", "dragenter", "dragleave", "dragover"]);
531 this._createCategory(WebInspector.UIString("Animation"), ["requestAnimationF rame", "cancelAnimationFrame", "animationFrameFired"], true); 531 this._createCategory(WebInspector.UIString("Animation"), ["requestAnimationF rame", "cancelAnimationFrame", "animationFrameFired"], true);
532 this._createCategory(WebInspector.UIString("Control"), ["resize", "scroll", "zoom", "focus", "blur", "select", "change", "submit", "reset"]); 532 this._createCategory(WebInspector.UIString("Control"), ["resize", "scroll", "zoom", "focus", "blur", "select", "change", "submit", "reset", "instrumentation :close"]);
533 this._createCategory(WebInspector.UIString("Clipboard"), ["copy", "cut", "pa ste", "beforecopy", "beforecut", "beforepaste"]); 533 this._createCategory(WebInspector.UIString("Clipboard"), ["copy", "cut", "pa ste", "beforecopy", "beforecut", "beforepaste"]);
534 this._createCategory(WebInspector.UIString("DOM Mutation"), ["DOMActivate", "DOMFocusIn", "DOMFocusOut", "DOMAttrModified", "DOMCharacterDataModified", "DOM NodeInserted", "DOMNodeInsertedIntoDocument", "DOMNodeRemoved", "DOMNodeRemovedF romDocument", "DOMSubtreeModified", "DOMContentLoaded"]); 534 this._createCategory(WebInspector.UIString("DOM Mutation"), ["DOMActivate", "DOMFocusIn", "DOMFocusOut", "DOMAttrModified", "DOMCharacterDataModified", "DOM NodeInserted", "DOMNodeInsertedIntoDocument", "DOMNodeRemoved", "DOMNodeRemovedF romDocument", "DOMSubtreeModified", "DOMContentLoaded"]);
535 this._createCategory(WebInspector.UIString("Device"), ["deviceorientation", "devicemotion"]); 535 this._createCategory(WebInspector.UIString("Device"), ["deviceorientation", "devicemotion"]);
536 this._createCategory(WebInspector.UIString("Drag / drop"), ["dragenter", "dr agover", "dragleave", "drop"]); 536 this._createCategory(WebInspector.UIString("Drag / drop"), ["dragenter", "dr agover", "dragleave", "drop"]);
537 this._createCategory(WebInspector.UIString("Keyboard"), ["keydown", "keyup", "keypress", "input"]); 537 this._createCategory(WebInspector.UIString("Keyboard"), ["keydown", "keyup", "keypress", "input"]);
538 this._createCategory(WebInspector.UIString("Load"), ["load", "beforeunload", "unload", "abort", "error", "hashchange", "popstate"]); 538 this._createCategory(WebInspector.UIString("Load"), ["load", "beforeunload", "unload", "abort", "error", "hashchange", "popstate"]);
539 this._createCategory(WebInspector.UIString("Media"), ["play", "pause", "play ing", "canplay", "canplaythrough", "seeking", "seeked", "timeupdate", "ended", " ratechange", "durationchange", "volumechange", "loadstart", "progress", "suspend ", "abort", "error", "emptied", "stalled", "loadedmetadata", "loadeddata", "wait ing"], false, ["audio", "video"]); 539 this._createCategory(WebInspector.UIString("Media"), ["play", "pause", "play ing", "canplay", "canplaythrough", "seeking", "seeked", "timeupdate", "ended", " ratechange", "durationchange", "volumechange", "loadstart", "progress", "suspend ", "abort", "error", "emptied", "stalled", "loadedmetadata", "loadeddata", "wait ing"], false, ["audio", "video"]);
540 this._createCategory(WebInspector.UIString("Mouse"), ["click", "dblclick", " mousedown", "mouseup", "mouseover", "mousemove", "mouseout", "mousewheel", "whee l"]); 540 this._createCategory(WebInspector.UIString("Mouse"), ["click", "dblclick", " mousedown", "mouseup", "mouseover", "mousemove", "mouseout", "mousewheel", "whee l"]);
541 this._createCategory(WebInspector.UIString("Timer"), ["setTimer", "clearTime r", "timerFired"], true); 541 this._createCategory(WebInspector.UIString("Timer"), ["setTimer", "clearTime r", "timerFired"], true);
542 this._createCategory(WebInspector.UIString("Touch"), ["touchstart", "touchmo ve", "touchend", "touchcancel"]); 542 this._createCategory(WebInspector.UIString("Touch"), ["touchstart", "touchmo ve", "touchend", "touchcancel"]);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 categoryItem.element.listItemElement.classList.add("event-category"); 598 categoryItem.element.listItemElement.classList.add("event-category");
599 categoryItem.element.selectable = true; 599 categoryItem.element.selectable = true;
600 600
601 categoryItem.checkbox = this._createCheckbox(labelNode); 601 categoryItem.checkbox = this._createCheckbox(labelNode);
602 categoryItem.checkbox.addEventListener("click", this._categoryCheckboxCl icked.bind(this, categoryItem), true); 602 categoryItem.checkbox.addEventListener("click", this._categoryCheckboxCl icked.bind(this, categoryItem), true);
603 603
604 categoryItem.targetNames = this._stringArrayToLowerCase(targetNames || [ WebInspector.EventListenerBreakpointsSidebarPane.eventTargetAny]); 604 categoryItem.targetNames = this._stringArrayToLowerCase(targetNames || [ WebInspector.EventListenerBreakpointsSidebarPane.eventTargetAny]);
605 categoryItem.children = {}; 605 categoryItem.children = {};
606 var category = (isInstrumentationEvent ? WebInspector.EventListenerBreak pointsSidebarPane.categoryInstrumentation : WebInspector.EventListenerBreakpoin tsSidebarPane.categoryListener); 606 var category = (isInstrumentationEvent ? WebInspector.EventListenerBreak pointsSidebarPane.categoryInstrumentation : WebInspector.EventListenerBreakpoin tsSidebarPane.categoryListener);
607 for (var i = 0; i < eventNames.length; ++i) { 607 for (var i = 0; i < eventNames.length; ++i) {
608 var eventName = category + eventNames[i]; 608 var eventName = eventNames[i];
609 if (eventName.indexOf(':') === -1) {
pfeldman 2014/07/22 08:57:40 This does not look particularly nice. We should ei
610 eventName = category + eventName;
611 }
609 612
610 var breakpointItem = {}; 613 var breakpointItem = {};
611 var title = WebInspector.EventListenerBreakpointsSidebarPane.eventNa meForUI(eventName); 614 var title = WebInspector.EventListenerBreakpointsSidebarPane.eventNa meForUI(eventName);
612 615
613 labelNode = document.createElement("label"); 616 labelNode = document.createElement("label");
614 labelNode.textContent = title; 617 labelNode.textContent = title;
615 618
616 breakpointItem.element = new TreeElement(labelNode); 619 breakpointItem.element = new TreeElement(labelNode);
617 categoryItem.element.appendChild(breakpointItem.element); 620 categoryItem.element.appendChild(breakpointItem.element);
618 621
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 var breakpoints = WebInspector.settings.eventListenerBreakpoints.get(); 814 var breakpoints = WebInspector.settings.eventListenerBreakpoints.get();
812 for (var i = 0; i < breakpoints.length; ++i) { 815 for (var i = 0; i < breakpoints.length; ++i) {
813 var breakpoint = breakpoints[i]; 816 var breakpoint = breakpoints[i];
814 if (breakpoint && typeof breakpoint.eventName === "string") 817 if (breakpoint && typeof breakpoint.eventName === "string")
815 this._setBreakpoint(breakpoint.eventName, breakpoint.targetNames ); 818 this._setBreakpoint(breakpoint.eventName, breakpoint.targetNames );
816 } 819 }
817 }, 820 },
818 821
819 __proto__: WebInspector.SidebarPane.prototype 822 __proto__: WebInspector.SidebarPane.prototype
820 } 823 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698