Index: Source/WebCore/rendering/RenderBlock.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderBlock.cpp (revision 119777) |
+++ Source/WebCore/rendering/RenderBlock.cpp (working copy) |
@@ -107,18 +107,6 @@ |
static int gDelayUpdateScrollInfo = 0; |
static DelayedUpdateScrollInfoSet* gDelayedUpdateScrollInfoSet = 0; |
-// We only create "generated" renderers like one for first-letter and |
-// before/after pseudo elements if: |
-// - the firstLetterBlock can have children in the DOM and |
-// - the block doesn't have any special assumption on its text children. |
-// This correctly prevents form controls from having such renderers. |
-static inline bool canHaveGeneratedChildren(RenderObject* renderer) |
-{ |
- return (renderer->canHaveChildren() |
- && (!renderer->isDeprecatedFlexibleBox() |
- || static_cast<RenderDeprecatedFlexibleBox*>(renderer)->canHaveGeneratedChildren())); |
-} |
- |
bool RenderBlock::s_canPropagateFloatIntoSibling = false; |
// This class helps dispatching the 'overflow' event on layout change. overflow can be set on RenderBoxes, yet the existing code |
@@ -339,7 +327,7 @@ |
m_lineHeight = -1; |
// Update pseudos for :before and :after now. |
- if (!isAnonymous() && document()->usesBeforeAfterRules() && canHaveGeneratedChildren(this)) { |
+ if (!isAnonymous() && document()->usesBeforeAfterRules() && canHaveGeneratedChildren()) { |
updateBeforeAfterContent(BEFORE); |
updateBeforeAfterContent(AFTER); |
} |
@@ -5992,7 +5980,7 @@ |
RenderObject* firstLetterBlock = start; |
while (true) { |
bool canHaveFirstLetterRenderer = firstLetterBlock->style()->hasPseudoStyle(FIRST_LETTER) |
- && canHaveGeneratedChildren(firstLetterBlock); |
+ && firstLetterBlock->canHaveGeneratedChildren(); |
if (canHaveFirstLetterRenderer) |
return firstLetterBlock; |
@@ -6151,7 +6139,7 @@ |
currChild = currChild->nextSibling(); |
} else if (currChild->isReplaced() || currChild->isRenderButton() || currChild->isMenuList()) |
break; |
- else if (currChild->style()->hasPseudoStyle(FIRST_LETTER) && canHaveGeneratedChildren(currChild)) { |
+ else if (currChild->style()->hasPseudoStyle(FIRST_LETTER) && currChild->canHaveGeneratedChildren()) { |
// We found a lower-level node with first-letter, which supersedes the higher-level style |
firstLetterBlock = currChild; |
currChild = currChild->firstChild(); |