Skip to content
  • commit-queue@webkit.org's avatar
    045affa3
    Text Autosizing: Work out what to do about form controls · 045affa3
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=102560
    
    Patch by Tim Volodine <timvolodine@chromium.org> on 2012-12-19
    Reviewed by Kenneth Rohde Christiansen.
    
    Source/WebCore:
    
    Disallow autosizing of form input controls like buttons, text input fields, selection controls, radio buttons
    and check boxes. This is a short term solution to avoid inconsistent autosizing of form controls (which is
    worse than not autosizing at all).
    
    Tests: fast/text-autosizing/form-controls-autosizing-button-input-elements.html
           fast/text-autosizing/form-controls-autosizing-checkbox-input-element.html
           fast/text-autosizing/form-controls-autosizing-radio-input-element.html
           fast/text-autosizing/form-controls-autosizing-select-element.html
           fast/text-autosizing/form-controls-autosizing-textfield-input-elements.html
    
    * rendering/TextAutosizer.cpp:
    (WebCore):
    (WebCore::formInputTags):
    (WebCore::TextAutosizer::isAutosizingContainer):
    (WebCore::TextAutosizer::contentHeightIsConstrained):
    (WebCore::TextAutosizer::containerShouldBeAutosized):
    (WebCore::TextAutosizer::containerContainsOneOfTags):
    * rendering/TextAutosizer.h:
    
    LayoutTests:
    
    Tests for form input elements autosizing. Added tests to check that various kinds of form elements
    don't get autosized, i.e. buttons, textareas, check boxes, radio button and selection menus.
    
    * fast/text-autosizing/form-controls-autosizing-button-input-elements-expected.html: Added.
    * fast/text-autosizing/form-controls-autosizing-button-input-elements.html: Added.
    * fast/text-autosizing/form-controls-autosizing-checkbox-input-element-expected.html: Added.
    * fast/text-autosizing/form-controls-autosizing-checkbox-input-element.html: Added.
    * fast/text-autosizing/form-controls-autosizing-radio-input-element-expected.html: Added.
    * fast/text-autosizing/form-controls-autosizing-radio-input-element.html: Added.
    * fast/text-autosizing/form-controls-autosizing-select-element-expected.html: Added.
    * fast/text-autosizing/form-controls-autosizing-select-element.html: Added.
    * fast/text-autosizing/form-controls-autosizing-textfield-input-elements-expected.html: Added.
    * fast/text-autosizing/form-controls-autosizing-textfield-input-elements.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138162 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    045affa3
    Text Autosizing: Work out what to do about form controls
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=102560
    
    Patch by Tim Volodine <timvolodine@chromium.org> on 2012-12-19
    Reviewed by Kenneth Rohde Christiansen.
    
    Source/WebCore:
    
    Disallow autosizing of form input controls like buttons, text input fields, selection controls, radio buttons
    and check boxes. This is a short term solution to avoid inconsistent autosizing of form controls (which is
    worse than not autosizing at all).
    
    Tests: fast/text-autosizing/form-controls-autosizing-button-input-elements.html
           fast/text-autosizing/form-controls-autosizing-checkbox-input-element.html
           fast/text-autosizing/form-controls-autosizing-radio-input-element.html
           fast/text-autosizing/form-controls-autosizing-select-element.html
           fast/text-autosizing/form-controls-autosizing-textfield-input-elements.html
    
    * rendering/TextAutosizer.cpp:
    (WebCore):
    (WebCore::formInputTags):
    (WebCore::TextAutosizer::isAutosizingContainer):
    (WebCore::TextAutosizer::contentHeightIsConstrained):
    (WebCore::TextAutosizer::containerShouldBeAutosized):
    (WebCore::TextAutosizer::containerContainsOneOfTags):
    * rendering/TextAutosizer.h:
    
    LayoutTests:
    
    Tests for form input elements autosizing. Added tests to check that various kinds of form elements
    don't get autosized, i.e. buttons, textareas, check boxes, radio button and selection menus.
    
    * fast/text-autosizing/form-controls-autosizing-button-input-elements-expected.html: Added.
    * fast/text-autosizing/form-controls-autosizing-button-input-elements.html: Added.
    * fast/text-autosizing/form-controls-autosizing-checkbox-input-element-expected.html: Added.
    * fast/text-autosizing/form-controls-autosizing-checkbox-input-element.html: Added.
    * fast/text-autosizing/form-controls-autosizing-radio-input-element-expected.html: Added.
    * fast/text-autosizing/form-controls-autosizing-radio-input-element.html: Added.
    * fast/text-autosizing/form-controls-autosizing-select-element-expected.html: Added.
    * fast/text-autosizing/form-controls-autosizing-select-element.html: Added.
    * fast/text-autosizing/form-controls-autosizing-textfield-input-elements-expected.html: Added.
    * fast/text-autosizing/form-controls-autosizing-textfield-input-elements.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138162 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Loading