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

Unified Diff: third_party/WebKit/Source/core/layout/HitTestResult.cpp

Issue 2391893004: Reformat comments in core/layout up until LayoutBox (Closed)
Patch Set: Rebase w/HEAD (again) 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/layout/HitTestResult.cpp
diff --git a/third_party/WebKit/Source/core/layout/HitTestResult.cpp b/third_party/WebKit/Source/core/layout/HitTestResult.cpp
index 3b4b0fee06af912cef36010664578094b17850a5..8a1247f905d1672c8063310be4fbe2dbb5d03ded 100644
--- a/third_party/WebKit/Source/core/layout/HitTestResult.cpp
+++ b/third_party/WebKit/Source/core/layout/HitTestResult.cpp
@@ -238,7 +238,8 @@ bool HitTestResult::isSelected() const {
String HitTestResult::title(TextDirection& dir) const {
dir = LTR;
// Find the title in the nearest enclosing DOM node.
- // For <area> tags in image maps, walk the tree for the <area>, not the <img> using it.
+ // For <area> tags in image maps, walk the tree for the <area>, not the <img>
+ // using it.
if (m_innerNode.get())
m_innerNode->updateDistribution();
for (Node* titleNode = m_innerNode.get(); titleNode;
@@ -303,9 +304,10 @@ KURL HitTestResult::absoluteImageURL() const {
return KURL();
AtomicString urlString;
- // Always return a url for image elements and input elements with type=image, even if they
- // don't have a LayoutImage (e.g. because the image didn't load and we are using an alt container).
- // For other elements we don't create alt containers so ensure they contain a loaded image.
+ // Always return a url for image elements and input elements with type=image,
+ // even if they don't have a LayoutImage (e.g. because the image didn't load
+ // and we are using an alt container). For other elements we don't create alt
+ // containers so ensure they contain a loaded image.
if (isHTMLImageElement(*innerNodeOrImageMapImage) ||
(isHTMLInputElement(*innerNodeOrImageMapImage) &&
toHTMLInputElement(innerNodeOrImageMapImage)->type() ==
@@ -362,10 +364,11 @@ String HitTestResult::textContent() const {
return m_innerURLElement->textContent();
}
-// FIXME: This function needs a better name and may belong in a different class. It's not
-// really isContentEditable(); it's more like needsEditingContextMenu(). In many ways, this
-// function would make more sense in the ContextMenu class, except that WebElementDictionary
-// hooks into it. Anyway, we should architect this better.
+// FIXME: This function needs a better name and may belong in a different class.
+// It's not really isContentEditable(); it's more like needsEditingContextMenu.
+// In many ways, this function would make more sense in the ContextMenu class,
+// except that WebElementDictionary hooks into it. Anyway, we should architect
+// this better.
bool HitTestResult::isContentEditable() const {
if (!m_innerNode)
return false;
@@ -469,10 +472,10 @@ void HitTestResult::resolveRectBasedTest(
m_innerPossiblyPseudoNode = nullptr;
m_listBasedTestResult = nullptr;
- // Update the HitTestResult as if the supplied node had been hit in normal point-based hit-test.
- // Note that we don't know the local point after a rect-based hit-test, but we never use
- // it so shouldn't bother with the cost of computing it.
- resolvedInnerNode->layoutObject()->updateHitTestResult(*this, LayoutPoint());
+ // Update the HitTestResult as if the supplied node had been hit in normal
+ // point-based hit-test.
+ // Note that we don't know the local point after a rect-based hit-test, but we
+ // never use it so shouldn't bother with the cost of computing it. resolvedInnerNode->layoutObject()->updateHitTestResult(*this, LayoutPoint());
ASSERT(!isRectBasedTest());
}

Powered by Google App Engine
This is Rietveld 408576698