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

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

Issue 1854423002: ASSERT -> {DCHECK|DCHECK_XX}, ENABLE(ASSERT) -> DCHECK_IS_ON() in dom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark svg/as-image/svg-nested.html crash on win Created 4 years, 8 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/FirstLetterPseudoElement.cpp
diff --git a/third_party/WebKit/Source/core/dom/FirstLetterPseudoElement.cpp b/third_party/WebKit/Source/core/dom/FirstLetterPseudoElement.cpp
index 60bcbbf9fa6486b8021517493331f9fafa3899e8..7f6f647af1792cd6fe48229097e0f503d27659ad 100644
--- a/third_party/WebKit/Source/core/dom/FirstLetterPseudoElement.cpp
+++ b/third_party/WebKit/Source/core/dom/FirstLetterPseudoElement.cpp
@@ -171,13 +171,13 @@ FirstLetterPseudoElement::FirstLetterPseudoElement(Element* parent)
FirstLetterPseudoElement::~FirstLetterPseudoElement()
{
- ASSERT(!m_remainingTextLayoutObject);
+ DCHECK(!m_remainingTextLayoutObject);
}
void FirstLetterPseudoElement::updateTextFragments()
{
String oldText = m_remainingTextLayoutObject->completeText();
- ASSERT(oldText.impl());
+ DCHECK(oldText.impl());
unsigned length = FirstLetterPseudoElement::firstLetterLength(oldText);
m_remainingTextLayoutObject->setTextFragment(oldText.impl()->substring(length, oldText.length()), length, oldText.length() - length);
@@ -235,10 +235,10 @@ void FirstLetterPseudoElement::detach(const AttachContext& context)
ComputedStyle* FirstLetterPseudoElement::styleForFirstLetter(LayoutObject* layoutObjectContainer)
{
- ASSERT(layoutObjectContainer);
+ DCHECK(layoutObjectContainer);
LayoutObject* styleContainer = parentOrShadowHostElement()->layoutObject();
- ASSERT(styleContainer);
+ DCHECK(styleContainer);
// We always force the pseudo style to recompute as the first-letter style
// computed by the style container may not have taken the layoutObjects styles
@@ -246,7 +246,7 @@ ComputedStyle* FirstLetterPseudoElement::styleForFirstLetter(LayoutObject* layou
styleContainer->mutableStyle()->removeCachedPseudoStyle(PseudoIdFirstLetter);
ComputedStyle* pseudoStyle = styleContainer->getCachedPseudoStyle(PseudoIdFirstLetter, layoutObjectContainer->firstLineStyle());
- ASSERT(pseudoStyle);
+ DCHECK(pseudoStyle);
return pseudoStyle;
}
@@ -254,14 +254,14 @@ ComputedStyle* FirstLetterPseudoElement::styleForFirstLetter(LayoutObject* layou
void FirstLetterPseudoElement::attachFirstLetterTextLayoutObjects()
{
LayoutObject* nextLayoutObject = FirstLetterPseudoElement::firstLetterTextLayoutObject(*this);
- ASSERT(nextLayoutObject);
- ASSERT(nextLayoutObject->isText());
+ DCHECK(nextLayoutObject);
+ DCHECK(nextLayoutObject->isText());
// The original string is going to be either a generated content string or a DOM node's
// string. We want the original string before it got transformed in case first-letter has
// no text-transform or a different text-transform applied to it.
String oldText = toLayoutText(nextLayoutObject)->isTextFragment() ? toLayoutTextFragment(nextLayoutObject)->completeText() : toLayoutText(nextLayoutObject)->originalText();
- ASSERT(oldText.impl());
+ DCHECK(oldText.impl());
ComputedStyle* pseudoStyle = styleForFirstLetter(nextLayoutObject->parent());
layoutObject()->setStyle(pseudoStyle);
« no previous file with comments | « third_party/WebKit/Source/core/dom/ExecutionContext.cpp ('k') | third_party/WebKit/Source/core/dom/FlexibleArrayBufferView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698