REGRESSION(r147602): Search text field doesn't render selection when it has some...
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jun 2013 21:25:07 +0000 (21:25 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jun 2013 21:25:07 +0000 (21:25 +0000)
commitbf47a6f5bc49361793ef757ef71c86844854a73e
treec71722b437a74a658b4cc67973d2a87ff84109bd
parent5ffecd526885228040674ed44e97a82dcea16662
REGRESSION(r147602): Search text field doesn't render selection when it has some :focus rules
https://bugs.webkit.org/show_bug.cgi?id=117747

Reviewed by Kent Tamura.

.:

* ManualTests/search-select-all-with-focus-style.html: Added.

Source/WebCore:

Merge https://chromium.googlesource.com/chromium/blink/+/7ff656c8239ce3b125246abcc8b149a603fcff28

r147612 added setNeedsLayout(true, MarkOnlyThis) for
TextControlInnerTextElement renderer. It's ok for input[type=text]
because RenderTextControlSingleLine also has needsLayout flag, and it
has only the inner text renderer as a child.

As for input[type=search], it doesn't work. Renderer structure for
input[type=search] is:

RenderTextControlSingleLine
└Renderer for TextControlInnerContainer
  └Renderer for TextControlInnerElement
    └Renderer for TextControlInnerTextElement

After r147612, there is a case that only RenderTextControlSingleLine
and TextControlInnerTextElement renderer have needsLayout flag, and
others don't.  It won't trigger layout for
TextControlInnerTextElement renderer.

We should set needsLayout flags of TextControlInnerContainer renderer
and TextControlInnerElement renderer by MarkContainingBlockChain.

Manual Tests: search-select-all-with-focus-style.html
(I tried but couldn't make a test that works in DRT)

* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::styleDidChange):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@151695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
ManualTests/search-select-all-with-focus-style.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderTextControlSingleLine.cpp