Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show <html> tags in Inspector with classes. (Issue #2001) #2213

Closed
Closed
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
d50768b
Created esof-docs.
Oct 10, 2016
ed560f8
Updated report.
Oct 11, 2016
6fd938b
Merge branch 'master' into esof-docs
Oct 12, 2016
f7a4600
definition of project completed
jpedrotm Oct 12, 2016
1a2a177
Updated software development process.
Oct 13, 2016
2b24604
Added contributions.
Oct 13, 2016
03881c8
Fixed a typo.
Oct 13, 2016
d5cd528
opinions and critics completed
jpedrotm Oct 13, 2016
9f37de2
Organized report.
Oct 14, 2016
a512591
Small typo on report
edgarlpassos Oct 14, 2016
e8e81ab
image waterfall corrected
jpedrotm Oct 15, 2016
168cfc0
Fixed typo.
Oct 16, 2016
814df64
Merge branch 'esof-docs' of github.com:epassos26/uBlock into esof-docs
Oct 16, 2016
a4929b7
Renamed image.
Oct 16, 2016
b723165
Created report 2.
bernardobelchior Oct 24, 2016
286193e
Advances on requirements elicitation.
bernardobelchior Oct 24, 2016
099c784
Added 'Specific requirements and features section
edgarlpassos Oct 26, 2016
6a562f7
casos de usos completed
jpedrotm Oct 26, 2016
f89db9d
Added Domain Model and Group contribution sections, changed some Mark…
edgarlpassos Oct 28, 2016
d773643
Forgot to add renamed images
edgarlpassos Oct 28, 2016
cbc264f
Added some labels in domain model
edgarlpassos Oct 28, 2016
c02e9d0
Touch software-design.md
bernardobelchior Nov 16, 2016
f6c811b
Merge branch 'master' into esof-docs
bernardobelchior Nov 16, 2016
07cbdb6
Added index to third report
edgarlpassos Nov 16, 2016
2977428
Merge branch 'master' into esof-docs
bernardobelchior Nov 19, 2016
7eea15d
Merge branch 'esof-docs' of github.com:epassos26/uBlock into esof-docs
bernardobelchior Nov 19, 2016
81194cd
Added logical view.
bernardobelchior Nov 19, 2016
5089297
Updated logical-view. Wrote introduction.
bernardobelchior Nov 19, 2016
5443e53
vista de processos completo
jpedrotm Nov 20, 2016
9efd803
Added deployment view.
bernardobelchior Nov 20, 2016
1ced977
Some corrections on process view.
bernardobelchior Nov 20, 2016
58f47c3
Fixed problem an image would be side by side with text.
bernardobelchior Nov 20, 2016
bd4f216
Added development view
edgarlpassos Nov 20, 2016
1e92279
Merge branch 'esof-docs' of github.com:epassos26/uBlock into esof-docs
edgarlpassos Nov 20, 2016
eaa7330
Added group info
edgarlpassos Nov 20, 2016
6880ba8
process view fix
jpedrotm Nov 20, 2016
d04b827
Added group info to index
edgarlpassos Nov 20, 2016
5e51e74
Merge branch 'esof-docs' of github.com:epassos26/uBlock into esof-docs
edgarlpassos Nov 20, 2016
0954ccf
vista de processos diagram corrigido
jpedrotm Nov 20, 2016
2795ca4
vista de processos correção diagrama
jpedrotm Nov 20, 2016
5167e81
vista de processos diagrama nova correção
jpedrotm Nov 20, 2016
7da3fbd
diagrama de processos corrigido
jpedrotm Nov 20, 2016
8d8247e
diagrama de vistas de processos corrigido
jpedrotm Nov 20, 2016
915fe74
verification and validation started report
jpedrotm Nov 30, 2016
9f45090
Merge remote-tracking branch 'upstream/master' into esof-docs
bernardobelchior Dec 3, 2016
d583451
testability almost completed
jpedrotm Dec 4, 2016
0464a7b
testability completed
jpedrotm Dec 4, 2016
96e3c68
Added Test Statistics
edgarlpassos Dec 4, 2016
1c90fe5
Added "Bug Identification" section.
bernardobelchior Dec 4, 2016
7dddc02
Changed ESOF-Docs structure
edgarlpassos Dec 4, 2016
6c0b8bb
Better bug identification
bernardobelchior Dec 4, 2016
3b208da
DOM Inspector now shows the html tags along with its classes. (Issue …
bernardobelchior Dec 4, 2016
d026407
Merge branch 'master' into show-html-in-inspector
bernardobelchior Dec 4, 2016
08559ea
Deleted unnecessary files.
bernardobelchior Dec 4, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/js/scriptlets/dom-inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,12 @@ var domLayout = (function() {
return selector;
};

var DomRoot = function() {
this.nid = newNodeId(document.body);
var DomRoot = function(node) {
this.nid = newNodeId(document.documentElement);
this.lvl = 0;
this.sel = 'body';
this.sel = selectorFromNode(node);
this.cnt = 0;
this.filter = nodeToCosmeticFilterMap.get(document.body);
this.filter = nodeToCosmeticFilterMap.get(document.documentElement);
};

var DomNode = function(node, level) {
Expand All @@ -244,8 +244,8 @@ var domLayout = (function() {
if ( node.classList.contains(sessionId) ) {
return null;
}
if ( level === 0 && localName === 'body' ) {
return new DomRoot();
if ( level === 0 && localName === 'html' ) {
return new DomRoot(node);
}
return new DomNode(node, level);
};
Expand All @@ -255,7 +255,7 @@ var domLayout = (function() {
var getLayoutData = function() {
var layout = [];
var stack = [];
var node = document.body;
var node = document.documentElement;
var domNode;
var lvl = 0;

Expand Down Expand Up @@ -478,7 +478,7 @@ var domLayout = (function() {
if ( mutationObserver === null ) {
cosmeticFilterMapper.reset();
mutationObserver = new MutationObserver(onMutationObserved);
mutationObserver.observe(document.body, {
mutationObserver.observe(document.documentElement, {
childList: true,
subtree: true
});
Expand Down Expand Up @@ -655,7 +655,7 @@ var cosmeticFilterFromTarget = function(nid, coarseSelector) {
// Find the most concise selector from the target node
var segments = [], segment;
var node = target;
while ( node !== document.body ) {
while ( node !== document.documentElement ) {
segment = cosmeticFilterFromNode(node);
segments.unshift(segment);
if ( segment.charAt(0) === '#' ) {
Expand All @@ -670,7 +670,7 @@ var cosmeticFilterFromTarget = function(nid, coarseSelector) {
if ( fineSelector.charAt(0) === '.' && elementsFromSelector(fineSelector).length === 1 ) {
return fineSelector;
}
return 'body > ' + fineSelector;
return 'html > ' + fineSelector;
};

/******************************************************************************/
Expand Down