| 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 f07ef20afcc39adac5140b0f52f2644c614beb9e..60bcbbf9fa6486b8021517493331f9fafa3899e8 100644
|
| --- a/third_party/WebKit/Source/core/dom/FirstLetterPseudoElement.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/FirstLetterPseudoElement.cpp
|
| @@ -108,7 +108,7 @@ LayoutObject* FirstLetterPseudoElement::firstLetterTextLayoutObject(const Elemen
|
| parentLayoutObject = element.layoutObject();
|
|
|
| if (!parentLayoutObject
|
| - || !parentLayoutObject->style()->hasPseudoStyle(FIRST_LETTER)
|
| + || !parentLayoutObject->style()->hasPseudoStyle(PseudoIdFirstLetter)
|
| || !canHaveGeneratedChildren(*parentLayoutObject)
|
| || !parentLayoutObject->canHaveFirstLineOrFirstLetterStyle())
|
| return nullptr;
|
| @@ -119,7 +119,7 @@ LayoutObject* FirstLetterPseudoElement::firstLetterTextLayoutObject(const Elemen
|
| // This can be called when the first letter layoutObject is already in the tree. We do not
|
| // want to consider that layoutObject for our text layoutObject so we go to the sibling (which is
|
| // the LayoutTextFragment for the remaining text).
|
| - if (firstLetterTextLayoutObject->style() && firstLetterTextLayoutObject->style()->styleType() == FIRST_LETTER) {
|
| + if (firstLetterTextLayoutObject->style() && firstLetterTextLayoutObject->style()->styleType() == PseudoIdFirstLetter) {
|
| firstLetterTextLayoutObject = firstLetterTextLayoutObject->nextSibling();
|
| } else if (firstLetterTextLayoutObject->isText()) {
|
| // FIXME: If there is leading punctuation in a different LayoutText than
|
| @@ -133,7 +133,7 @@ LayoutObject* FirstLetterPseudoElement::firstLetterTextLayoutObject(const Elemen
|
| } else if (firstLetterTextLayoutObject->isListMarker()) {
|
| firstLetterTextLayoutObject = firstLetterTextLayoutObject->nextSibling();
|
| } else if (firstLetterTextLayoutObject->isFloatingOrOutOfFlowPositioned()) {
|
| - if (firstLetterTextLayoutObject->style()->styleType() == FIRST_LETTER) {
|
| + if (firstLetterTextLayoutObject->style()->styleType() == PseudoIdFirstLetter) {
|
| firstLetterTextLayoutObject = firstLetterTextLayoutObject->slowFirstChild();
|
| break;
|
| }
|
| @@ -144,9 +144,9 @@ LayoutObject* FirstLetterPseudoElement::firstLetterTextLayoutObject(const Elemen
|
| } else if (firstLetterTextLayoutObject->isFlexibleBoxIncludingDeprecated() || firstLetterTextLayoutObject->isLayoutGrid()) {
|
| firstLetterTextLayoutObject = firstLetterTextLayoutObject->nextSibling();
|
| } else if (!firstLetterTextLayoutObject->isInline()
|
| - && firstLetterTextLayoutObject->style()->hasPseudoStyle(FIRST_LETTER)
|
| + && firstLetterTextLayoutObject->style()->hasPseudoStyle(PseudoIdFirstLetter)
|
| && canHaveGeneratedChildren(*firstLetterTextLayoutObject)) {
|
| - // There is a layoutObject further down the tree which has FIRST_LETTER set. When that node
|
| + // There is a layoutObject further down the tree which has PseudoIdFirstLetter set. When that node
|
| // is attached we will handle setting up the first letter then.
|
| return nullptr;
|
| } else {
|
| @@ -164,7 +164,7 @@ LayoutObject* FirstLetterPseudoElement::firstLetterTextLayoutObject(const Elemen
|
| }
|
|
|
| FirstLetterPseudoElement::FirstLetterPseudoElement(Element* parent)
|
| - : PseudoElement(parent, FIRST_LETTER)
|
| + : PseudoElement(parent, PseudoIdFirstLetter)
|
| , m_remainingTextLayoutObject(nullptr)
|
| {
|
| }
|
| @@ -243,9 +243,9 @@ ComputedStyle* FirstLetterPseudoElement::styleForFirstLetter(LayoutObject* layou
|
| // 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
|
| // into account.
|
| - styleContainer->mutableStyle()->removeCachedPseudoStyle(FIRST_LETTER);
|
| + styleContainer->mutableStyle()->removeCachedPseudoStyle(PseudoIdFirstLetter);
|
|
|
| - ComputedStyle* pseudoStyle = styleContainer->getCachedPseudoStyle(FIRST_LETTER, layoutObjectContainer->firstLineStyle());
|
| + ComputedStyle* pseudoStyle = styleContainer->getCachedPseudoStyle(PseudoIdFirstLetter, layoutObjectContainer->firstLineStyle());
|
| ASSERT(pseudoStyle);
|
|
|
| return pseudoStyle;
|
| @@ -305,7 +305,7 @@ void FirstLetterPseudoElement::didRecalcStyle(StyleRecalcChange)
|
| for (LayoutObject* child = layoutObject->nextInPreOrder(layoutObject); child; child = child->nextInPreOrder(layoutObject)) {
|
| // We need to re-calculate the correct style for the first letter element
|
| // and then apply that to the container and the text fragment inside.
|
| - if (child->style()->styleType() == FIRST_LETTER && m_remainingTextLayoutObject) {
|
| + if (child->style()->styleType() == PseudoIdFirstLetter && m_remainingTextLayoutObject) {
|
| if (ComputedStyle* pseudoStyle = styleForFirstLetter(m_remainingTextLayoutObject->parent()))
|
| child->setPseudoStyle(pseudoStyle);
|
| continue;
|
|
|