Changeset 102320 in webkit


Ignore:
Timestamp:
Dec 7, 2011 11:53:01 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

CSS color gets adjusted for disabled input elements
https://bugs.webkit.org/show_bug.cgi?id=54643

Patch by Yosifumi Inoue <yosin@chromium.org> on 2011-12-07
Reviewed by Kent Tamura.

Source/WebCore:

No new tests. covered by existing tests. Need rebasing some existing tests for Chromimum.

Remove automatic color adjustment for disabled text control for Chromimum.

  • css/themeChromium.css: Add CSS entries for default style for disabled input and textarea elements.
  • WebCore/rendering/RenderTextControl.cpp:

(disabledTextColor): Removed for PLATFORM(CHROMIUM)
(RenderTextControl::adjustInnerTextStyle): Don't call disabledTextColor for Chromium.

LayoutTests:

  • platform/chromium/test_expectations.txt: Add files need to be updated.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r102317 r102320  
     12011-12-07  Yosifumi Inoue  <yosin@chromium.org>
     2
     3        CSS color gets adjusted for disabled input elements
     4        https://bugs.webkit.org/show_bug.cgi?id=54643
     5
     6        Reviewed by Kent Tamura.
     7
     8        * platform/chromium/test_expectations.txt: Add files need to be updated.
     9
    1102011-12-07  Dmitry Lomov  <dslomov@google.com>
    211
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r102315 r102320  
    37893789BUGWK73838 LEOPARD DEBUG : animations/animation-add-events-in-handler.html = CRASH
    37903790
     3791// Need rebase - Removing auto gray for disabled text inputs.
     3792BUGWK54643 : fast/forms/basic-inputs.html = FAIL
     3793BUGWK54643 : fast/forms/basic-textareas-quirks.html = FAIL
     3794BUGWK54643 : fast/forms/basic-textareas.html = FAIL
     3795BUGWK54643 : fast/forms/file/file-input-disabled.html = FAIL
     3796BUGWK54643 : fast/forms/input-appearance-disabled.html = FAIL
     3797BUGWK54643 : fast/forms/input-disabled-color.html = FAIL
     3798BUGWK54643 : fast/forms/number/input-appearance-spinbutton-disabled-readonly.html = FAIL
     3799BUGWK54643 : fast/forms/placeholder-pseudo-style.html = FAIL
     3800BUGWK54643 : fast/forms/textarea-placeholder-pseudo-style.html = FAIL
     3801
    37913802// Need rebaseline on Linux and Win GPU
    37923803BUGWK73905 GPU LINUX : media/video-layer-crash.html = IMAGE+TEXT
  • trunk/Source/WebCore/ChangeLog

    r102317 r102320  
     12011-12-07  Yosifumi Inoue  <yosin@chromium.org>
     2
     3        CSS color gets adjusted for disabled input elements
     4        https://bugs.webkit.org/show_bug.cgi?id=54643
     5
     6        Reviewed by Kent Tamura.
     7
     8        No new tests. covered by existing tests. Need rebasing some existing tests for Chromimum.
     9
     10        Remove automatic color adjustment for disabled text control for Chromimum.
     11
     12        * css/themeChromium.css: Add CSS entries for default style for disabled input and textarea elements.
     13        * WebCore/rendering/RenderTextControl.cpp:
     14        (disabledTextColor): Removed for PLATFORM(CHROMIUM)
     15        (RenderTextControl::adjustInnerTextStyle): Don't call disabledTextColor for Chromium.
     16
    1172011-12-07  Dmitry Lomov  <dslomov@google.com>
    218
  • trunk/Source/WebCore/css/themeChromium.css

    r92585 r102320  
    7171    color: #444;
    7272}
     73
     74input:disabled, isindex:disabled, textarea:disabled {
     75    color: #545454; /* Color::light() for #000000. See RenderTextControl.cpp:disabledTextColor */
     76}
     77
  • trunk/Source/WebCore/rendering/RenderTextControl.cpp

    r99016 r102320  
    3535namespace WebCore {
    3636
     37#if !PLATFORM(CHROMIUM)
    3738// Value chosen by observation.  This can be tweaked.
    3839static const int minColorContrastValue = 1300;
     
    5859    return disabledColor;
    5960}
     61#endif
    6062
    6163RenderTextControl::RenderTextControl(Node* node)
     
    120122
    121123    bool disabled = updateUserModifyProperty(node(), textBlockStyle);
    122     if (disabled)
     124    if (disabled) {
     125#if PLATFORM(CHROMIUM)
     126        textBlockStyle->setColor(textBlockStyle->visitedDependentColor(CSSPropertyColor));
     127#else
    123128        textBlockStyle->setColor(disabledTextColor(textBlockStyle->visitedDependentColor(CSSPropertyColor), startStyle->visitedDependentColor(CSSPropertyBackgroundColor)));
     129#endif
     130    }
    124131}
    125132
Note: See TracChangeset for help on using the changeset viewer.