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

Unified Diff: third_party/WebKit/Source/core/dom/IntersectionObservation.cpp

Issue 2390543002: Reflow comments in core/dom/. (Closed)
Patch Set: Reformat comments in core/dom/. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp b/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
index de199f91c0ac9a21c49407fc40dadcdf8c26f615..c9c04457e5ea67c7f176de9f8542466870e0c392 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
+++ b/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
@@ -144,12 +144,12 @@ static bool isContainingBlockChainDescendant(LayoutObject* descendant,
bool IntersectionObservation::computeGeometry(
IntersectionGeometry& geometry) const {
- // In the first few lines here, before initializeGeometry is called, "return true"
- // effectively means "if the previous observed state was that root and target were
- // intersecting, then generate a notification indicating that they are no longer
- // intersecting." This happens, for example, when root or target is removed from the
- // DOM tree and not reinserted before the next frame is generated, or display:none
- // is set on the root or target.
+ // In the first few lines here, before initializeGeometry is called, "return
+ // true" effectively means "if the previous observed state was that root and
+ // target were intersecting, then generate a notification indicating that they
+ // are no longer intersecting." This happens, for example, when root or
+ // target is removed from the DOM tree and not reinserted before the next
+ // frame is generated, or display:none is set on the root or target.
Element* targetElement = target();
if (!targetElement)
return false;
@@ -198,16 +198,18 @@ void IntersectionObservation::computeIntersectionObservations(
return;
// Some corner cases for threshold index:
- // - If target rect is zero area, because it has zero width and/or zero height,
+ // - If target rect is zero area, because it has zero width and/or zero
+ // height,
// only two states are recognized:
// - 0 means not intersecting.
// - 1 means intersecting.
// No other threshold crossings are possible.
// - Otherwise:
// - If root and target do not intersect, the threshold index is 0.
- // - If root and target intersect but the intersection has zero-area (i.e., they
- // have a coincident edge or corner), we consider the intersection to have
- // "crossed" a zero threshold, but not crossed any non-zero threshold.
+ // - If root and target intersect but the intersection has zero-area
+ // (i.e., they have a coincident edge or corner), we consider the
+ // intersection to have "crossed" a zero threshold, but not crossed
+ // any non-zero threshold.
unsigned newThresholdIndex;
float newVisibleRatio = 0;
if (geometry.targetRect.isEmpty()) {
« no previous file with comments | « third_party/WebKit/Source/core/dom/Fullscreen.cpp ('k') | third_party/WebKit/Source/core/dom/IntersectionObserver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698