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

Unified Diff: Source/WebCore/rendering/RenderBlock.cpp

Issue 10538049: Merge 118711 - Can't edit <input> elements with :first-letter (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 6 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: 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();
« no previous file with comments | « LayoutTests/fast/forms/input-first-letter-edit-expected.html ('k') | Source/WebCore/rendering/RenderDeprecatedFlexibleBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698