-
commit-queue@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=80382 Patch by Shezan Baig <shezbaig.wk@gmail.com> on 2012-05-07 Reviewed by David Hyatt. Source/WebCore: Determine the text colors and selection colors before painting the background behind the text. This is because when determining whether to invert the selection background, the selection text color should be used instead of the regular text color. With this patch, the selection text color is passed to 'paintSelection' so that the selection background can be compared against it, instead of comparing against the CSSPropertyColor value. Test: fast/backgrounds/selection-background-color.html * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): Pass selection text color to paintSelection (WebCore::InlineTextBox::paintSelection): Use the selection text color instead of CSSPropertyColor * rendering/InlineTextBox.h: (InlineTextBox): Adjust signature of paintSelection to accept text color LayoutTests: Added new test case for selection background color. * fast/backgrounds/selection-background-color.html: Added. * fast/backgrounds/selection-background-color-expected.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
a42bf04e