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

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, 5 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 f63021a50688d8c38cb7537f8c15af8de6dbd598..4cb5b5e0c8fa70cbebf101522848fb94c5f3a757 100644
--- a/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
+++ b/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
@@ -427,7 +427,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())
@@ -439,7 +439,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>
@@ -483,7 +483,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;
@@ -504,7 +504,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;
@@ -533,7 +533,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();
@@ -646,7 +646,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();
@@ -680,7 +680,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()) {
@@ -898,7 +898,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