Changeset 19517 in webkit


Ignore:
Timestamp:
Feb 8, 2007 6:21:54 PM (17 years ago)
Author:
bdash
Message:

2007-02-08 Mitz Pettel <mitz@webkit.org>

Reviewed by Adele.


Test: fast/forms/select-empty-option-height.html

  • rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::setText): If the option text is empty, use a RenderBR as inner text, to ensure that the inner div has line height.

2007-02-08 Mitz Pettel <mitz@webkit.org>

Reviewed by Adele.


  • fast/forms/HTMLOptionElement_label07-expected.txt:
  • fast/forms/form-element-geometry-expected.txt:
  • fast/forms/select-baseline-expected.txt:
  • fast/forms/select-empty-option-height-expected.checksum: Added.
  • fast/forms/select-empty-option-height-expected.png: Added.
  • fast/forms/select-empty-option-height-expected.txt: Added.
  • fast/forms/select-empty-option-height.html: Added.
  • fast/replaced/three-selects-break-expected.txt:
Location:
trunk
Files:
4 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r19515 r19517  
     12007-02-08  Mitz Pettel  <mitz@webkit.org>
     2
     3        Reviewed by Adele.
     4
     5        - test for http://bugs.webkit.org/show_bug.cgi?id=11047
     6          REGRESSION: Empty options cause the entire select to collapse
     7       
     8        - updated results for http://bugs.webkit.org/show_bug.cgi?id=10783
     9          REGRESSION (r16044): Clicking a popup changes layout around it
     10
     11        * fast/forms/HTMLOptionElement_label07-expected.txt:
     12        * fast/forms/form-element-geometry-expected.txt:
     13        * fast/forms/select-baseline-expected.txt:
     14        * fast/forms/select-empty-option-height-expected.checksum: Added.
     15        * fast/forms/select-empty-option-height-expected.png: Added.
     16        * fast/forms/select-empty-option-height-expected.txt: Added.
     17        * fast/forms/select-empty-option-height.html: Added.
     18        * fast/replaced/three-selects-break-expected.txt:
     19
    1202007-02-08  Geoffrey Garen  <ggaren@apple.com>
    221
  • trunk/LayoutTests/fast/forms/HTMLOptionElement_label07-expected.txt

    r16044 r19517  
    99      RenderBR {BR} at (28,32) size 0x0
    1010      RenderMenuList {SELECT} at (2,38) size 36x18 [bgcolor=#FFFFFF]
     11        RenderBlock (anonymous) at (8,2) size 5x13
     12          RenderBR at (0,0) size 0x13 [bgcolor=#FFFFFF]
    1113      RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/fast/forms/form-element-geometry-expected.txt

    r19001 r19517  
    196196          RenderText {#text} at (0,0) size 0x0
    197197          RenderMenuList {SELECT} at (2,9) size 36x18 [bgcolor=#FFFFFF]
     198            RenderBlock (anonymous) at (8,2) size 5x13
     199              RenderBR at (0,0) size 0x13 [bgcolor=#FFFFFF]
    198200          RenderText {#text} at (40,0) size 6x28
    199201            text run at (40,0) width 6: " "
     
    211213      RenderBlock {DIV} at (0,566) size 769x22
    212214        RenderMenuList {SELECT} at (2,2) size 36x18 [bgcolor=#FFFFFF]
     215          RenderBlock (anonymous) at (8,2) size 5x13
     216            RenderBR at (0,0) size 0x13 [bgcolor=#FFFFFF]
    213217        RenderText {#text} at (40,1) size 4x18
    214218          text run at (40,1) width 4: " "
     
    228232          RenderText {#text} at (0,0) size 0x0
    229233          RenderMenuList {SELECT} at (2,2) size 36x18 [bgcolor=#FFFFFF]
     234            RenderBlock (anonymous) at (8,2) size 5x13
     235              RenderBR at (0,0) size 0x13 [bgcolor=#FFFFFF]
    230236          RenderText {#text} at (40,5) size 3x13
    231237            text run at (40,5) width 3: " "
  • trunk/LayoutTests/fast/forms/select-baseline-expected.txt

    r16290 r19517  
    88      RenderBR {BR} at (462,14) size 0x0
    99      RenderMenuList {SELECT} at (2,22) size 36x18 [bgcolor=#FFFFFF]
     10        RenderBlock (anonymous) at (8,2) size 5x13
     11          RenderBR at (0,0) size 0x13 [bgcolor=#FFFFFF]
    1012      RenderText {#text} at (40,21) size 29x18
    1113        text run at (40,21) width 29: " test "
     
    1719        text run at (124,21) width 4: " "
    1820      RenderMenuList {SELECT} at (130,22) size 36x18 [color=#00008B] [bgcolor=#ADD8E6] [border: (1px solid #00008B)]
     21        RenderBlock (anonymous) at (9,2) size 5x13
     22          RenderBR at (0,0) size 0x13 [bgcolor=#ADD8E6] [border: (1px solid #00008B)]
    1923      RenderText {#text} at (168,21) size 29x18
    2024        text run at (168,21) width 29: " test "
  • trunk/LayoutTests/fast/replaced/three-selects-break-expected.txt

    r18852 r19517  
    66      RenderBlock {DIV} at (0,0) size 5x66
    77        RenderMenuList {SELECT} at (2,2) size 36x18 [bgcolor=#FFFFFF]
     8          RenderBlock (anonymous) at (8,2) size 5x13
     9            RenderBR at (0,0) size 0x13 [bgcolor=#FFFFFF]
    810        RenderMenuList {SELECT} at (2,24) size 36x18 [bgcolor=#FFFFFF]
     11          RenderBlock (anonymous) at (8,2) size 5x13
     12            RenderBR at (0,0) size 0x13 [bgcolor=#FFFFFF]
    913        RenderMenuList {SELECT} at (2,46) size 36x18 [bgcolor=#FFFFFF]
     14          RenderBlock (anonymous) at (8,2) size 5x13
     15            RenderBR at (0,0) size 0x13 [bgcolor=#FFFFFF]
  • trunk/WebCore/ChangeLog

    r19516 r19517  
     12007-02-08  Mitz Pettel  <mitz@webkit.org>
     2
     3        Reviewed by Adele.
     4
     5        - fix http://bugs.webkit.org/show_bug.cgi?id=11047
     6          REGRESSION: Empty options cause the entire select to collapse
     7       
     8        Test: fast/forms/select-empty-option-height.html
     9
     10        - fix http://bugs.webkit.org/show_bug.cgi?id=10783
     11          REGRESSION (r16044): Clicking a popup changes layout around it
     12
     13        * rendering/RenderMenuList.cpp:
     14        (WebCore::RenderMenuList::setText): If the option text is empty, use a RenderBR
     15        as inner text, to ensure that the inner div has line height.
     16
    1172007-02-08  Geoffrey Garen  <ggaren@apple.com>
    218
  • trunk/WebCore/rendering/RenderMenuList.cpp

    r19331 r19517  
    3232#include "HTMLSelectElement.h"
    3333#include "PopupMenu.h"
     34#include "RenderBR.h"
    3435#include "RenderText.h"
    3536#include "RenderTheme.h"
     
    165166{
    166167    if (s.isEmpty()) {
    167         if (m_buttonText) {
    168             m_buttonText->destroy();
    169             m_buttonText = 0;
     168        if (!m_buttonText || !m_buttonText->isBR()) {
     169            if (m_buttonText)
     170                m_buttonText->destroy();
     171            m_buttonText = new (renderArena()) RenderBR(document());
     172            m_buttonText->setStyle(style());
     173            addChild(m_buttonText);
    170174        }
    171175    } else {
    172         if (m_buttonText)
     176        if (m_buttonText && !m_buttonText->isBR())
    173177            m_buttonText->setText(s.impl());
    174178        else {
     179            if (m_buttonText)
     180                m_buttonText->destroy();
    175181            m_buttonText = new (renderArena()) RenderText(document(), s.impl());
    176182            m_buttonText->setStyle(style());
Note: See TracChangeset for help on using the changeset viewer.