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

Unified Diff: third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp

Issue 2181953004: Changed ComputedStyle's EVisibility to be an enum class and fixed naming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_move_computedstyle_around
Patch Set: Rebase Created 4 years, 4 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/editing/iterators/TextIterator.cpp
diff --git a/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp b/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
index 3d0909ba8417fbf6fb8abdd324a2736e6fb041d0..aeff18e04914b1016ad4e77e6ad79f4adeab73c6 100644
--- a/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
+++ b/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
@@ -441,7 +441,7 @@ void TextIteratorAlgorithm<Strategy>::advance()
static bool hasVisibleTextNode(LayoutText* layoutObject)
{
- if (layoutObject->style()->visibility() == VISIBLE)
+ if (layoutObject->style()->visibility() == EVisibility::Visible)
return true;
if (!layoutObject->isTextFragment())
@@ -453,7 +453,7 @@ static bool hasVisibleTextNode(LayoutText* layoutObject)
DCHECK(fragment->firstLetterPseudoElement());
LayoutObject* pseudoElementLayoutObject = fragment->firstLetterPseudoElement()->layoutObject();
- return pseudoElementLayoutObject && pseudoElementLayoutObject->style()->visibility() == VISIBLE;
+ return pseudoElementLayoutObject && pseudoElementLayoutObject->style()->visibility() == EVisibility::Visible;
}
template<typename Strategy>
@@ -497,7 +497,7 @@ bool TextIteratorAlgorithm<Strategy>::handleTextNode()
return false;
}
}
- if (layoutObject->style()->visibility() != VISIBLE && !ignoresStyleVisibility())
+ if (layoutObject->style()->visibility() != EVisibility::Visible && !ignoresStyleVisibility())
return false;
int strLength = str.length();
int end = (textNode == m_endContainer) ? m_endOffset : INT_MAX;
@@ -518,7 +518,7 @@ bool TextIteratorAlgorithm<Strategy>::handleTextNode()
handleTextNodeFirstLetter(toLayoutTextFragment(layoutObject));
if (!layoutObject->firstTextBox() && str.length() > 0 && !shouldHandleFirstLetter) {
- if (layoutObject->style()->visibility() != VISIBLE && !ignoresStyleVisibility())
+ if (layoutObject->style()->visibility() != EVisibility::Visible && !ignoresStyleVisibility())
return false;
m_lastTextNodeEndedWithCollapsedSpace = true; // entire block is collapsed space
return true;
@@ -547,7 +547,7 @@ void TextIteratorAlgorithm<Strategy>::handleTextBox()
{
LayoutText* layoutObject = m_firstLetterText ? m_firstLetterText : toLayoutText(m_node->layoutObject());
- if (layoutObject->style()->visibility() != VISIBLE && !ignoresStyleVisibility()) {
+ if (layoutObject->style()->visibility() != EVisibility::Visible && !ignoresStyleVisibility()) {
m_textBox = nullptr;
} else {
String str = layoutObject->text();
@@ -660,7 +660,7 @@ void TextIteratorAlgorithm<Strategy>::handleTextNodeFirstLetter(LayoutTextFragme
return;
LayoutObject* pseudoLayoutObject = firstLetterElement->layoutObject();
- if (pseudoLayoutObject->style()->visibility() != VISIBLE && !ignoresStyleVisibility())
+ if (pseudoLayoutObject->style()->visibility() != EVisibility::Visible && !ignoresStyleVisibility())
return;
LayoutObject* firstLetter = pseudoLayoutObject->slowFirstChild();
@@ -694,7 +694,7 @@ bool TextIteratorAlgorithm<Strategy>::handleReplacedElement()
return false;
LayoutObject* layoutObject = m_node->layoutObject();
- if (layoutObject->style()->visibility() != VISIBLE && !ignoresStyleVisibility())
+ if (layoutObject->style()->visibility() != EVisibility::Visible && !ignoresStyleVisibility())
return false;
if (emitsObjectReplacementCharacter()) {
@@ -912,7 +912,7 @@ bool TextIteratorAlgorithm<Strategy>::shouldRepresentNodeOffsetZero()
// If this node is unrendered or invisible the VisiblePosition checks below won't have much meaning.
// Additionally, if the range we are iterating over contains huge sections of unrendered content,
// we would create VisiblePositions on every call to this function without this check.
- if (!m_node->layoutObject() || m_node->layoutObject()->style()->visibility() != VISIBLE
+ if (!m_node->layoutObject() || m_node->layoutObject()->style()->visibility() != EVisibility::Visible
|| (m_node->layoutObject()->isLayoutBlockFlow() && !toLayoutBlock(m_node->layoutObject())->size().height() && !isHTMLBodyElement(*m_node)))
return false;

Powered by Google App Engine
This is Rietveld 408576698