Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: composer.postload.js

Issue 29365529: Noissue - Improve comments for composer code (Closed)
Patch Set: Created Nov. 28, 2016, 1:40 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: composer.postload.js
diff --git a/composer.postload.js b/composer.postload.js
index 2baaf758030673f62af50c2756046f7e43e0d809..f5a798420729433944344469cf183ebddba173a5 100644
--- a/composer.postload.js
+++ b/composer.postload.js
@@ -118,7 +118,7 @@ function getBlockableElementOrAncestor(element, callback)
/* Element highlighting */
-// Adds an overlay to an element, which is probably a Flash object.
+// Adds an overlay to an element in order to highlight it.
function addElementOverlay(element)
{
let position = "absolute";
@@ -214,6 +214,9 @@ function highlightElement(element, shadowColor, backgroundColor)
};
};
+ // If this element is an overlay that we've created previously then we need
+ // to give it a background colour. Otherwise we need to create an overlay
+ // and then recurse in order to set the overlay's background colour.
if ("prisoner" in element)
highlightWithStyleAttribute();
else
@@ -344,8 +347,8 @@ function startPickingElement()
{
currentlyPickingElement = true;
- // Add overlays for blockable elements that don't emit mouse events,
- // so that they can still be selected.
+ // Add (currently invisible) overlays for blockable elements that don't emit
+ // mouse events, so that they can still be selected.
Array.prototype.forEach.call(
document.querySelectorAll("object,embed,iframe,frame"),
element =>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld