X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=blobdiff_plain;f=WebCore%2Frendering%2FRenderTextControlMultiLine.cpp;h=df31c2bdf6a59fc5b6bba075cd625770632b726b;hp=566a81c868a33af7581b4a435249ffb1a7ea527d;hb=38e67496e4a857fcd90dd6f6a8fae63c9bc21f70;hpb=b8028f6a784dafb705a1311c62cfaa8028954da8;ds=sidebyside diff --git a/WebCore/rendering/RenderTextControlMultiLine.cpp b/WebCore/rendering/RenderTextControlMultiLine.cpp index 566a81c868a3..df31c2bdf6a5 100644 --- a/WebCore/rendering/RenderTextControlMultiLine.cpp +++ b/WebCore/rendering/RenderTextControlMultiLine.cpp @@ -106,6 +106,19 @@ PassRefPtr RenderTextControlMultiLine::createInnerTextStyle(const R textBlockStyle->inheritFrom(startStyle); adjustInnerTextStyle(startStyle, textBlockStyle.get()); + + // FIXME: This code should just map wrap into CSS in the DOM code. + // Then here we should set the textBlockStyle appropriately based off this + // object's style()->whiteSpace() and style->wordWrap(). + // Set word wrap property based on wrap attribute. + if (static_cast(node())->shouldWrapText()) { + textBlockStyle->setWhiteSpace(PRE_WRAP); + textBlockStyle->setWordWrap(BreakWordWrap); + } else { + textBlockStyle->setWhiteSpace(PRE); + textBlockStyle->setWordWrap(NormalWordWrap); + } + textBlockStyle->setDisplay(BLOCK); return textBlockStyle.release();