Changeset 73488 in webkit


Ignore:
Timestamp:
Dec 7, 2010 8:21:20 PM (13 years ago)
Author:
morrita@google.com
Message:

2010-12-05 MORITA Hajime <morrita@google.com>

Reviewed by Dimitri Glazkov.

  • Added a test case
  • Updated expectations to follow the change on the shadow structure.

RenderIndicator subclasses should not change the render tree during layout.
https://bugs.webkit.org/show_bug.cgi?id=50026

  • fast/dom/HTMLMeterElement/meter-element-crash-expected.txt: Added.
  • fast/dom/HTMLMeterElement/meter-element-crash.html: Added.
  • platform/mac/fast/dom/HTMLMeterElement/meter-appearances-capacity-expected.txt:
  • platform/mac/fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy-expected.txt:
  • platform/mac/fast/dom/HTMLMeterElement/meter-boundary-values-expected.txt:
  • platform/mac/fast/dom/HTMLMeterElement/meter-element-expected.txt:
  • platform/mac/fast/dom/HTMLMeterElement/meter-optimums-expected.txt:
  • platform/mac/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.txt:
  • platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.txt:

2010-12-06 MORITA Hajime <morrita@google.com>

Reviewed by Dimitri Glazkov.

RenderIndicator subclasses should not change the render tree during layout.
https://bugs.webkit.org/show_bug.cgi?id=50026

The old code created shadow elements during a layout computation,
that makes the layout state inconsisntent and cause an assertion failure.
This change created shadow elements before the layout to avoid
state inconsistencies.

Instead of creating shadows on demand, RenderMeter and
RenderProgress now create all necessary shadows before layouts,
and change its visibilities during the layout: Changing
visibilities doesn't trigger relayout and keep the state
consistent.

RenderMeter uses new HidablePartElement for shadow elements,
which can toggle visibiliby between hidden and original value.

Test: fast/dom/HTMLMeterElement/meter-element-crash.html

  • html/HTMLMeterElement.cpp: (WebCore::HTMLMeterElement::attach): Calling updateFromElement()
  • html/HTMLMeterElement.h:
  • html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::attach): Calling updateFromElement()
  • html/HTMLProgressElement.h:
  • rendering/RenderIndicator.cpp:
  • rendering/RenderIndicator.h:
  • rendering/RenderMeter.cpp: (WebCore::MeterPartElement::MeterPartElement): Added to hold a restorable visibility. (WebCore::MeterPartElement::createForPart): (WebCore::MeterPartElement::hide): (WebCore::MeterPartElement::restoreVisibility): (WebCore::MeterPartElement::updateStyleForPart): (WebCore::MeterPartElement::saveVisibility): (WebCore::RenderMeter::~RenderMeter): (WebCore::RenderMeter::createPart): Extracted (WebCore::RenderMeter::updateFromElement): Had a shadow generation. (WebCore::RenderMeter::layoutParts): Removed shadow generation code. (WebCore::RenderMeter::shouldHaveParts): (WebCore::RenderMeter::valuePartRect): Adopted orientation. (WebCore::RenderMeter::orientation): Morphed from isHorizontal() (WebCore::RenderMeter::valuePseudoId): Adoptedn orientation (WebCore::RenderMeter::barPseudoId): Adopted orientation.
  • rendering/RenderMeter.h: (WebCore::RenderMeter::shadowAttached):
  • rendering/RenderProgress.cpp: (WebCore::RenderProgress::updateFromElement): Had a shadow generation. (WebCore::RenderProgress::layoutParts):
  • rendering/RenderProgress.h:
  • rendering/ShadowElement.cpp: (WebCore::ShadowBlockElement::createForPart): Extracted initAsPart(). (WebCore::ShadowBlockElement::initAsPart): Extracted from createForPart().
  • rendering/ShadowElement.h:
Location:
trunk
Files:
2 added
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r73487 r73488  
     12010-12-05  MORITA Hajime  <morrita@google.com>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        - Added a test case
     6        - Updated expectations to follow the change on the shadow structure.
     7       
     8        RenderIndicator subclasses should not change the render tree during layout.
     9        https://bugs.webkit.org/show_bug.cgi?id=50026
     10       
     11        * fast/dom/HTMLMeterElement/meter-element-crash-expected.txt: Added.
     12        * fast/dom/HTMLMeterElement/meter-element-crash.html: Added.
     13        * platform/mac/fast/dom/HTMLMeterElement/meter-appearances-capacity-expected.txt:
     14        * platform/mac/fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy-expected.txt:
     15        * platform/mac/fast/dom/HTMLMeterElement/meter-boundary-values-expected.txt:
     16        * platform/mac/fast/dom/HTMLMeterElement/meter-element-expected.txt:
     17        * platform/mac/fast/dom/HTMLMeterElement/meter-optimums-expected.txt:
     18        * platform/mac/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.txt:
     19        * platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.txt:
     20
    1212010-12-07  Simon Fraser  <simon.fraser@apple.com>
    222
  • trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-appearances-capacity-expected.txt

    r60822 r73488  
    1717              text run at (0,0) width 86: "value=10/10:"
    1818            RenderMeter {METER} at (664,0) size 80x18
     19              RenderBlock {DIV} at (0,0) size 80x18
     20              RenderBlock {DIV} at (0,0) size 80x18
     21              RenderBlock {DIV} at (0,0) size 80x18
     22              RenderBlock {DIV} at (0,0) size 80x18
    1923          RenderListItem {LI} at (40,18) size 744x18 [bgcolor=#CCCCCC]
    2024            RenderListMarker at (-17,0) size 7x18: bullet
     
    2226              text run at (0,0) width 78: "value=8/10:"
    2327            RenderMeter {METER} at (664,0) size 80x18
     28              RenderBlock {DIV} at (0,0) size 80x18
     29              RenderBlock {DIV} at (0,0) size 64x18
     30              RenderBlock {DIV} at (0,0) size 80x18
     31              RenderBlock {DIV} at (0,4) size 80x14
    2432          RenderListItem {LI} at (40,36) size 744x18 [bgcolor=#EEEEEE]
    2533            RenderListMarker at (-17,0) size 7x18: bullet
     
    2735              text run at (0,0) width 78: "value=5/10:"
    2836            RenderMeter {METER} at (664,0) size 80x18
     37              RenderBlock {DIV} at (0,0) size 80x18
     38              RenderBlock {DIV} at (0,0) size 40x18
     39              RenderBlock {DIV} at (0,0) size 80x18
     40              RenderBlock {DIV} at (0,9) size 80x9
    2941          RenderListItem {LI} at (40,54) size 744x18 [bgcolor=#CCCCCC]
    3042            RenderListMarker at (-17,0) size 7x18: bullet
     
    3244              text run at (0,0) width 78: "value=2/10:"
    3345            RenderMeter {METER} at (664,0) size 80x18
     46              RenderBlock {DIV} at (0,0) size 80x18
     47              RenderBlock {DIV} at (0,0) size 16x18
     48              RenderBlock {DIV} at (0,0) size 80x18
     49              RenderBlock {DIV} at (0,15) size 80x3
    3450          RenderListItem {LI} at (40,72) size 744x18 [bgcolor=#EEEEEE]
    3551            RenderListMarker at (-17,0) size 7x18: bullet
     
    3753              text run at (0,0) width 78: "value=0/10:"
    3854            RenderMeter {METER} at (664,0) size 80x18
     55              RenderBlock {DIV} at (0,0) size 80x18
     56              RenderBlock {DIV} at (0,0) size 0x18
     57              RenderBlock {DIV} at (0,0) size 80x18
     58              RenderBlock {DIV} at (0,18) size 80x0
    3959          RenderListItem {LI} at (40,90) size 744x18 [bgcolor=#CCCCCC]
    4060            RenderListMarker at (-17,0) size 7x18: bullet
     
    4262              text run at (0,0) width 39: "RTL:"
    4363            RenderMeter {METER} at (664,0) size 80x18
     64              RenderBlock {DIV} at (0,0) size 80x18
     65              RenderBlock {DIV} at (40,0) size 40x18
     66              RenderBlock {DIV} at (0,0) size 80x18
     67              RenderBlock {DIV} at (0,9) size 80x9
    4468          RenderListItem {LI} at (40,108) size 744x50 [bgcolor=#EEEEEE]
    4569            RenderListMarker at (-17,0) size 7x18: bullet
     
    4771              text run at (0,0) width 32: "Tall:"
    4872            RenderMeter {METER} at (664,0) size 80x50
     73              RenderBlock {DIV} at (0,0) size 80x50
     74              RenderBlock {DIV} at (0,0) size 40x50
     75              RenderBlock {DIV} at (0,0) size 80x50
     76              RenderBlock {DIV} at (0,25) size 80x25
    4977          RenderListItem {LI} at (40,158) size 744x18 [bgcolor=#CCCCCC]
    5078            RenderListMarker at (-17,0) size 7x18: bullet
     
    5280              text run at (0,0) width 43: "Short:"
    5381            RenderMeter {METER} at (664,0) size 80x18
     82              RenderBlock {DIV} at (0,0) size 80x18
     83              RenderBlock {DIV} at (0,0) size 24x18
     84              RenderBlock {DIV} at (0,0) size 80x18
     85              RenderBlock {DIV} at (0,13) size 80x5
    5486          RenderListItem {LI} at (40,176) size 744x18 [bgcolor=#EEEEEE]
    5587            RenderListMarker at (-17,0) size 7x18: bullet
     
    5789              text run at (0,0) width 41: "Wide:"
    5890            RenderMeter {METER} at (444,0) size 300x18
     91              RenderBlock {DIV} at (0,0) size 300x18
     92              RenderBlock {DIV} at (0,0) size 150x18
     93              RenderBlock {DIV} at (0,0) size 300x18
     94              RenderBlock {DIV} at (0,9) size 300x9
    5995          RenderListItem {LI} at (40,194) size 744x18 [bgcolor=#CCCCCC]
    6096            RenderListMarker at (-17,0) size 7x18: bullet
     
    6298              text run at (0,0) width 59: "Narrow:"
    6399            RenderMeter {METER} at (714,0) size 30x18
     100              RenderBlock {DIV} at (0,0) size 30x18
     101              RenderBlock {DIV} at (0,0) size 15x18
     102              RenderBlock {DIV} at (0,0) size 30x18
     103              RenderBlock {DIV} at (0,9) size 30x9
    64104      RenderBlock {H2} at (0,293) size 784x18
    65105        RenderText {#text} at (0,0) size 236x18
     
    72112              text run at (0,0) width 86: "value=10/10:"
    73113            RenderMeter {METER} at (664,0) size 80x16
     114              RenderBlock {DIV} at (0,0) size 80x16
     115              RenderBlock {DIV} at (0,0) size 80x16
     116              RenderBlock {DIV} at (0,0) size 80x16
     117              RenderBlock {DIV} at (0,0) size 80x16
    74118          RenderListItem {LI} at (40,18) size 744x18 [bgcolor=#CCCCCC]
    75119            RenderListMarker at (-17,0) size 7x18: bullet
     
    77121              text run at (0,0) width 78: "value=8/10:"
    78122            RenderMeter {METER} at (664,0) size 80x16
     123              RenderBlock {DIV} at (0,0) size 80x16
     124              RenderBlock {DIV} at (0,0) size 64x16
     125              RenderBlock {DIV} at (0,0) size 80x16
     126              RenderBlock {DIV} at (0,4) size 80x12
    79127          RenderListItem {LI} at (40,36) size 744x18 [bgcolor=#EEEEEE]
    80128            RenderListMarker at (-17,0) size 7x18: bullet
     
    82130              text run at (0,0) width 78: "value=5/10:"
    83131            RenderMeter {METER} at (664,0) size 80x16
     132              RenderBlock {DIV} at (0,0) size 80x16
     133              RenderBlock {DIV} at (0,0) size 40x16
     134              RenderBlock {DIV} at (0,0) size 80x16
     135              RenderBlock {DIV} at (0,8) size 80x8
    84136          RenderListItem {LI} at (40,54) size 744x18 [bgcolor=#CCCCCC]
    85137            RenderListMarker at (-17,0) size 7x18: bullet
     
    87139              text run at (0,0) width 78: "value=2/10:"
    88140            RenderMeter {METER} at (664,0) size 80x16
     141              RenderBlock {DIV} at (0,0) size 80x16
     142              RenderBlock {DIV} at (0,0) size 16x16
     143              RenderBlock {DIV} at (0,0) size 80x16
     144              RenderBlock {DIV} at (0,13) size 80x3
    89145          RenderListItem {LI} at (40,72) size 744x18 [bgcolor=#EEEEEE]
    90146            RenderListMarker at (-17,0) size 7x18: bullet
     
    92148              text run at (0,0) width 78: "value=0/10:"
    93149            RenderMeter {METER} at (664,0) size 80x16
     150              RenderBlock {DIV} at (0,0) size 80x16
     151              RenderBlock {DIV} at (0,0) size 0x16
     152              RenderBlock {DIV} at (0,0) size 80x16
     153              RenderBlock {DIV} at (0,16) size 80x0
    94154          RenderListItem {LI} at (40,90) size 744x18 [bgcolor=#CCCCCC]
    95155            RenderListMarker at (-17,0) size 7x18: bullet
     
    97157              text run at (0,0) width 39: "RTL:"
    98158            RenderMeter {METER} at (664,0) size 80x16
     159              RenderBlock {DIV} at (0,0) size 80x16
     160              RenderBlock {DIV} at (40,0) size 40x16
     161              RenderBlock {DIV} at (0,0) size 80x16
     162              RenderBlock {DIV} at (0,8) size 80x8
    99163          RenderListItem {LI} at (40,108) size 744x50 [bgcolor=#EEEEEE]
    100164            RenderListMarker at (-17,0) size 7x18: bullet
     
    102166              text run at (0,0) width 32: "Tall:"
    103167            RenderMeter {METER} at (664,0) size 80x50
     168              RenderBlock {DIV} at (0,0) size 80x50
     169              RenderBlock {DIV} at (0,0) size 40x50
     170              RenderBlock {DIV} at (0,0) size 80x50
     171              RenderBlock {DIV} at (0,25) size 80x25
    104172          RenderListItem {LI} at (40,158) size 744x18 [bgcolor=#CCCCCC]
    105173            RenderListMarker at (-17,0) size 7x18: bullet
     
    107175              text run at (0,0) width 43: "Short:"
    108176            RenderMeter {METER} at (664,0) size 80x16
     177              RenderBlock {DIV} at (0,0) size 80x16
     178              RenderBlock {DIV} at (0,0) size 24x16
     179              RenderBlock {DIV} at (0,0) size 80x16
     180              RenderBlock {DIV} at (0,12) size 80x4
    109181          RenderListItem {LI} at (40,176) size 744x18 [bgcolor=#EEEEEE]
    110182            RenderListMarker at (-17,0) size 7x18: bullet
     
    112184              text run at (0,0) width 41: "Wide:"
    113185            RenderMeter {METER} at (444,0) size 300x16
     186              RenderBlock {DIV} at (0,0) size 300x16
     187              RenderBlock {DIV} at (0,0) size 150x16
     188              RenderBlock {DIV} at (0,0) size 300x16
     189              RenderBlock {DIV} at (0,8) size 300x8
    114190          RenderListItem {LI} at (40,194) size 744x18 [bgcolor=#CCCCCC]
    115191            RenderListMarker at (-17,0) size 7x18: bullet
     
    117193              text run at (0,0) width 59: "Narrow:"
    118194            RenderMeter {METER} at (714,0) size 30x16
     195              RenderBlock {DIV} at (0,0) size 30x16
     196              RenderBlock {DIV} at (0,0) size 15x16
     197              RenderBlock {DIV} at (0,0) size 30x16
     198              RenderBlock {DIV} at (0,8) size 30x8
  • trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy-expected.txt

    r60822 r73488  
    1717              text run at (0,0) width 86: "value=10/10:"
    1818            RenderMeter {METER} at (614,0) size 130x16
     19              RenderBlock {DIV} at (0,0) size 130x16
     20              RenderBlock {DIV} at (0,0) size 130x16
     21              RenderBlock {DIV} at (0,0) size 130x16
     22              RenderBlock {DIV} at (0,0) size 130x16
    1923          RenderListItem {LI} at (40,18) size 744x18 [bgcolor=#CCCCCC]
    2024            RenderListMarker at (-17,0) size 7x18: bullet
     
    2226              text run at (0,0) width 78: "value=8/10:"
    2327            RenderMeter {METER} at (614,0) size 130x16
     28              RenderBlock {DIV} at (0,0) size 130x16
     29              RenderBlock {DIV} at (0,0) size 104x16
     30              RenderBlock {DIV} at (0,0) size 130x16
     31              RenderBlock {DIV} at (0,4) size 130x12
    2432          RenderListItem {LI} at (40,36) size 744x18 [bgcolor=#EEEEEE]
    2533            RenderListMarker at (-17,0) size 7x18: bullet
     
    2735              text run at (0,0) width 78: "value=5/10:"
    2836            RenderMeter {METER} at (614,0) size 130x16
     37              RenderBlock {DIV} at (0,0) size 130x16
     38              RenderBlock {DIV} at (0,0) size 65x16
     39              RenderBlock {DIV} at (0,0) size 130x16
     40              RenderBlock {DIV} at (0,8) size 130x8
    2941          RenderListItem {LI} at (40,54) size 744x18 [bgcolor=#CCCCCC]
    3042            RenderListMarker at (-17,0) size 7x18: bullet
     
    3244              text run at (0,0) width 78: "value=2/10:"
    3345            RenderMeter {METER} at (614,0) size 130x16
     46              RenderBlock {DIV} at (0,0) size 130x16
     47              RenderBlock {DIV} at (0,0) size 26x16
     48              RenderBlock {DIV} at (0,0) size 130x16
     49              RenderBlock {DIV} at (0,13) size 130x3
    3450          RenderListItem {LI} at (40,72) size 744x18 [bgcolor=#EEEEEE]
    3551            RenderListMarker at (-17,0) size 7x18: bullet
     
    3753              text run at (0,0) width 78: "value=0/10:"
    3854            RenderMeter {METER} at (614,0) size 130x16
     55              RenderBlock {DIV} at (0,0) size 130x16
     56              RenderBlock {DIV} at (0,0) size 0x16
     57              RenderBlock {DIV} at (0,0) size 130x16
     58              RenderBlock {DIV} at (0,16) size 130x0
    3959          RenderListItem {LI} at (40,90) size 744x18 [bgcolor=#CCCCCC]
    4060            RenderListMarker at (-17,0) size 7x18: bullet
     
    4262              text run at (0,0) width 39: "RTL:"
    4363            RenderMeter {METER} at (614,0) size 130x16
     64              RenderBlock {DIV} at (0,0) size 130x16
     65              RenderBlock {DIV} at (65,0) size 65x16
     66              RenderBlock {DIV} at (0,0) size 130x16
     67              RenderBlock {DIV} at (0,8) size 130x8
    4468          RenderListItem {LI} at (40,108) size 744x50 [bgcolor=#EEEEEE]
    4569            RenderListMarker at (-17,0) size 7x18: bullet
     
    4771              text run at (0,0) width 32: "Tall:"
    4872            RenderMeter {METER} at (614,0) size 130x50
     73              RenderBlock {DIV} at (0,0) size 130x50
     74              RenderBlock {DIV} at (0,0) size 65x50
     75              RenderBlock {DIV} at (0,0) size 130x50
     76              RenderBlock {DIV} at (0,25) size 130x25
    4977          RenderListItem {LI} at (40,158) size 744x18 [bgcolor=#CCCCCC]
    5078            RenderListMarker at (-17,0) size 7x18: bullet
     
    5280              text run at (0,0) width 43: "Short:"
    5381            RenderMeter {METER} at (614,0) size 130x13
     82              RenderBlock {DIV} at (0,0) size 130x13
     83              RenderBlock {DIV} at (0,0) size 39x13
     84              RenderBlock {DIV} at (0,0) size 130x13
     85              RenderBlock {DIV} at (0,10) size 130x3
    5486          RenderListItem {LI} at (40,176) size 744x18 [bgcolor=#EEEEEE]
    5587            RenderListMarker at (-17,0) size 7x18: bullet
     
    5789              text run at (0,0) width 41: "Wide:"
    5890            RenderMeter {METER} at (444,0) size 300x16
     91              RenderBlock {DIV} at (0,0) size 300x16
     92              RenderBlock {DIV} at (0,0) size 150x16
     93              RenderBlock {DIV} at (0,0) size 300x16
     94              RenderBlock {DIV} at (0,8) size 300x8
    5995          RenderListItem {LI} at (40,194) size 744x18 [bgcolor=#CCCCCC]
    6096            RenderListMarker at (-17,0) size 7x18: bullet
     
    6298              text run at (0,0) width 59: "Narrow:"
    6399            RenderMeter {METER} at (614,0) size 130x16
     100              RenderBlock {DIV} at (0,0) size 130x16
     101              RenderBlock {DIV} at (0,0) size 65x16
     102              RenderBlock {DIV} at (0,0) size 130x16
     103              RenderBlock {DIV} at (0,8) size 130x8
    64104      RenderBlock {H2} at (0,293) size 784x18
    65105        RenderText {#text} at (0,0) size 166x18
     
    72112              text run at (0,0) width 86: "value=10/10:"
    73113            RenderMeter {METER} at (664,0) size 80x16
     114              RenderBlock {DIV} at (0,0) size 80x16
     115              RenderBlock {DIV} at (0,0) size 80x16
     116              RenderBlock {DIV} at (0,0) size 80x16
     117              RenderBlock {DIV} at (0,0) size 80x16
    74118          RenderListItem {LI} at (40,18) size 744x18 [bgcolor=#CCCCCC]
    75119            RenderListMarker at (-17,0) size 7x18: bullet
     
    77121              text run at (0,0) width 78: "value=8/10:"
    78122            RenderMeter {METER} at (664,0) size 80x16
     123              RenderBlock {DIV} at (0,0) size 80x16
     124              RenderBlock {DIV} at (0,0) size 64x16
     125              RenderBlock {DIV} at (0,0) size 80x16
     126              RenderBlock {DIV} at (0,4) size 80x12
    79127          RenderListItem {LI} at (40,36) size 744x18 [bgcolor=#EEEEEE]
    80128            RenderListMarker at (-17,0) size 7x18: bullet
     
    82130              text run at (0,0) width 78: "value=5/10:"
    83131            RenderMeter {METER} at (664,0) size 80x16
     132              RenderBlock {DIV} at (0,0) size 80x16
     133              RenderBlock {DIV} at (0,0) size 40x16
     134              RenderBlock {DIV} at (0,0) size 80x16
     135              RenderBlock {DIV} at (0,8) size 80x8
    84136          RenderListItem {LI} at (40,54) size 744x18 [bgcolor=#CCCCCC]
    85137            RenderListMarker at (-17,0) size 7x18: bullet
     
    87139              text run at (0,0) width 78: "value=2/10:"
    88140            RenderMeter {METER} at (664,0) size 80x16
     141              RenderBlock {DIV} at (0,0) size 80x16
     142              RenderBlock {DIV} at (0,0) size 16x16
     143              RenderBlock {DIV} at (0,0) size 80x16
     144              RenderBlock {DIV} at (0,13) size 80x3
    89145          RenderListItem {LI} at (40,72) size 744x18 [bgcolor=#EEEEEE]
    90146            RenderListMarker at (-17,0) size 7x18: bullet
     
    92148              text run at (0,0) width 78: "value=0/10:"
    93149            RenderMeter {METER} at (664,0) size 80x16
     150              RenderBlock {DIV} at (0,0) size 80x16
     151              RenderBlock {DIV} at (0,0) size 0x16
     152              RenderBlock {DIV} at (0,0) size 80x16
     153              RenderBlock {DIV} at (0,16) size 80x0
    94154          RenderListItem {LI} at (40,90) size 744x18 [bgcolor=#CCCCCC]
    95155            RenderListMarker at (-17,0) size 7x18: bullet
     
    97157              text run at (0,0) width 39: "RTL:"
    98158            RenderMeter {METER} at (664,0) size 80x16
     159              RenderBlock {DIV} at (0,0) size 80x16
     160              RenderBlock {DIV} at (40,0) size 40x16
     161              RenderBlock {DIV} at (0,0) size 80x16
     162              RenderBlock {DIV} at (0,8) size 80x8
    99163          RenderListItem {LI} at (40,108) size 744x50 [bgcolor=#EEEEEE]
    100164            RenderListMarker at (-17,0) size 7x18: bullet
     
    102166              text run at (0,0) width 32: "Tall:"
    103167            RenderMeter {METER} at (664,0) size 80x50
     168              RenderBlock {DIV} at (0,0) size 80x50
     169              RenderBlock {DIV} at (0,0) size 40x50
     170              RenderBlock {DIV} at (0,0) size 80x50
     171              RenderBlock {DIV} at (0,25) size 80x25
    104172          RenderListItem {LI} at (40,158) size 744x18 [bgcolor=#CCCCCC]
    105173            RenderListMarker at (-17,0) size 7x18: bullet
     
    107175              text run at (0,0) width 43: "Short:"
    108176            RenderMeter {METER} at (664,0) size 80x12
     177              RenderBlock {DIV} at (0,0) size 80x12
     178              RenderBlock {DIV} at (0,0) size 24x12
     179              RenderBlock {DIV} at (0,0) size 80x12
     180              RenderBlock {DIV} at (0,9) size 80x3
    109181          RenderListItem {LI} at (40,176) size 744x18 [bgcolor=#EEEEEE]
    110182            RenderListMarker at (-17,0) size 7x18: bullet
     
    112184              text run at (0,0) width 41: "Wide:"
    113185            RenderMeter {METER} at (444,0) size 300x16
     186              RenderBlock {DIV} at (0,0) size 300x16
     187              RenderBlock {DIV} at (0,0) size 150x16
     188              RenderBlock {DIV} at (0,0) size 300x16
     189              RenderBlock {DIV} at (0,8) size 300x8
    114190          RenderListItem {LI} at (40,194) size 744x18 [bgcolor=#CCCCCC]
    115191            RenderListMarker at (-17,0) size 7x18: bullet
     
    117193              text run at (0,0) width 59: "Narrow:"
    118194            RenderMeter {METER} at (714,0) size 30x16
     195              RenderBlock {DIV} at (0,0) size 30x16
     196              RenderBlock {DIV} at (0,0) size 15x16
     197              RenderBlock {DIV} at (0,0) size 30x16
     198              RenderBlock {DIV} at (0,8) size 30x8
  • trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-boundary-values-expected.txt

    r70856 r73488  
    2020            text run at (8,0) width 107: "|10,20,30,40,50: "
    2121          RenderMeter {METER} at (115,1) size 80x16
     22            RenderBlock {DIV} at (0,0) size 80x16
     23            RenderBlock {DIV} at (0,0) size 0x16
     24            RenderBlock {DIV} at (0,0) size 80x16
     25            RenderBlock {DIV} at (0,16) size 80x0
    2226        RenderListItem {LI} at (40,36) size 744x18
    2327          RenderListMarker at (-17,0) size 7x18: bullet
     
    2832            text run at (16,0) width 88: ",20,30,40,50: "
    2933          RenderMeter {METER} at (104,1) size 80x16
     34            RenderBlock {DIV} at (0,0) size 80x16
     35            RenderBlock {DIV} at (0,0) size 0x16
     36            RenderBlock {DIV} at (0,0) size 80x16
     37            RenderBlock {DIV} at (0,16) size 80x0
    3038        RenderListItem {LI} at (40,54) size 744x18
    3139          RenderListMarker at (-17,0) size 7x18: bullet
     
    3846            text run at (36,0) width 68: ",30,40,50: "
    3947          RenderMeter {METER} at (104,1) size 80x16
     48            RenderBlock {DIV} at (0,0) size 80x16
     49            RenderBlock {DIV} at (0,0) size 20x16
     50            RenderBlock {DIV} at (0,0) size 80x16
     51            RenderBlock {DIV} at (0,12) size 80x4
    4052          RenderText {#text} at (184,0) size 110x18
    4153            text run at (184,0) width 110: "(should be green)"
     
    5062            text run at (56,0) width 48: ",40,50: "
    5163          RenderMeter {METER} at (104,1) size 80x16
     64            RenderBlock {DIV} at (0,0) size 80x16
     65            RenderBlock {DIV} at (0,0) size 40x16
     66            RenderBlock {DIV} at (0,0) size 80x16
     67            RenderBlock {DIV} at (0,8) size 80x8
    5268          RenderText {#text} at (184,0) size 110x18
    5369            text run at (184,0) width 110: "(should be green)"
     
    6278            text run at (76,0) width 28: ",50: "
    6379          RenderMeter {METER} at (104,1) size 80x16
     80            RenderBlock {DIV} at (0,0) size 80x16
     81            RenderBlock {DIV} at (0,0) size 60x16
     82            RenderBlock {DIV} at (0,0) size 80x16
     83            RenderBlock {DIV} at (0,4) size 80x12
    6484          RenderText {#text} at (184,0) size 110x18
    6585            text run at (184,0) width 110: "(should be green)"
     
    7494            text run at (96,0) width 8: ": "
    7595          RenderMeter {METER} at (104,1) size 80x16
     96            RenderBlock {DIV} at (0,0) size 80x16
     97            RenderBlock {DIV} at (0,0) size 80x16
     98            RenderBlock {DIV} at (0,0) size 80x16
     99            RenderBlock {DIV} at (0,0) size 80x16
    76100          RenderText {#text} at (184,0) size 118x18
    77101            text run at (184,0) width 118: "(should be yellow)"
     
    86110            text run at (115,0) width 8: ": "
    87111          RenderMeter {METER} at (123,1) size 80x16
     112            RenderBlock {DIV} at (0,0) size 80x16
     113            RenderBlock {DIV} at (0,0) size 80x16
     114            RenderBlock {DIV} at (0,0) size 80x16
     115            RenderBlock {DIV} at (0,0) size 80x16
    88116          RenderText {#text} at (203,0) size 118x18
    89117            text run at (203,0) width 118: "(should be yellow)"
     
    98126            text run at (36,0) width 68: ",30,40,50: "
    99127          RenderMeter {METER} at (104,1) size 80x16
     128            RenderBlock {DIV} at (0,0) size 80x16
     129            RenderBlock {DIV} at (0,0) size 0x16
     130            RenderBlock {DIV} at (0,0) size 80x16
     131            RenderBlock {DIV} at (0,16) size 80x0
    100132        RenderListItem {LI} at (40,162) size 744x18
    101133          RenderListMarker at (-17,0) size 7x18: bullet
     
    108140            text run at (76,0) width 28: ",40: "
    109141          RenderMeter {METER} at (104,1) size 80x16
     142            RenderBlock {DIV} at (0,0) size 80x16
     143            RenderBlock {DIV} at (0,0) size 80x16
     144            RenderBlock {DIV} at (0,0) size 80x16
     145            RenderBlock {DIV} at (0,0) size 80x16
    110146          RenderText {#text} at (184,0) size 110x18
    111147            text run at (184,0) width 110: "(should be green)"
     
    118154            text run at (8,0) width 107: "|10,10,10,20,30: "
    119155          RenderMeter {METER} at (115,1) size 80x16
     156            RenderBlock {DIV} at (0,0) size 80x16
     157            RenderBlock {DIV} at (0,0) size 0x16
     158            RenderBlock {DIV} at (0,0) size 80x16
     159            RenderBlock {DIV} at (0,16) size 80x0
    120160        RenderListItem {LI} at (40,198) size 744x18
    121161          RenderListMarker at (-17,0) size 7x18: bullet
     
    128168            text run at (56,0) width 48: ",20,30: "
    129169          RenderMeter {METER} at (104,1) size 80x16
     170            RenderBlock {DIV} at (0,0) size 80x16
     171            RenderBlock {DIV} at (0,0) size 0x16
     172            RenderBlock {DIV} at (0,0) size 80x16
     173            RenderBlock {DIV} at (0,16) size 80x0
    130174        RenderListItem {LI} at (40,216) size 744x18
    131175          RenderListMarker at (-17,0) size 7x18: bullet
     
    138182            text run at (56,0) width 48: ",30,30: "
    139183          RenderMeter {METER} at (104,1) size 80x16
     184            RenderBlock {DIV} at (0,0) size 80x16
     185            RenderBlock {DIV} at (0,0) size 80x16
     186            RenderBlock {DIV} at (0,0) size 80x16
     187            RenderBlock {DIV} at (0,0) size 80x16
    140188          RenderText {#text} at (184,0) size 110x18
    141189            text run at (184,0) width 110: "(should be green)"
     
    150198            text run at (115,0) width 8: ": "
    151199          RenderMeter {METER} at (123,1) size 80x16
     200            RenderBlock {DIV} at (0,0) size 80x16
     201            RenderBlock {DIV} at (0,0) size 80x16
     202            RenderBlock {DIV} at (0,0) size 80x16
     203            RenderBlock {DIV} at (0,0) size 80x16
    152204          RenderText {#text} at (203,0) size 110x18
    153205            text run at (203,0) width 110: "(should be green)"
     
    162214            text run at (56,0) width 48: ",20,30: "
    163215          RenderMeter {METER} at (104,1) size 80x16
    164           RenderText {#text} at (184,0) size 110x18
    165             text run at (184,0) width 110: "(should be green)"
     216            RenderBlock {DIV} at (0,0) size 80x16
     217            RenderBlock {DIV} at (0,0) size 40x16
     218            RenderBlock {DIV} at (0,0) size 80x16
     219            RenderBlock {DIV} at (0,8) size 80x8
     220          RenderText {#text} at (184,0) size 110x18
     221            text run at (184,0) width 110: "(should be green)"
  • trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-element-expected.txt

    r71377 r73488  
    55    RenderBody {BODY} at (8,8) size 784x584
    66      RenderMeter {METER} at (0,44) size 80x16
     7        RenderBlock {DIV} at (0,0) size 80x16
     8        RenderBlock {DIV} at (0,0) size 17x16
     9        RenderBlock {DIV} at (0,0) size 80x16
     10        RenderBlock {DIV} at (0,13) size 80x3
    711      RenderMeter {METER} at (80,0) size 10x60
     12        RenderBlock {DIV} at (0,0) size 10x60
     13        RenderBlock {DIV} at (0,0) size 7x60
    814        RenderBlock {DIV} at (0,0) size 10x60
    915        RenderBlock {DIV} at (0,18) size 10x42
  • trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-optimums-expected.txt

    r60822 r73488  
    1919            text run at (0,0) width 75: "value=150: "
    2020          RenderMeter {METER} at (75,1) size 80x16
     21            RenderBlock {DIV} at (0,0) size 80x16
     22            RenderBlock {DIV} at (0,0) size 20x16
     23            RenderBlock {DIV} at (0,0) size 80x16
     24            RenderBlock {DIV} at (0,12) size 80x4
    2125        RenderListItem {LI} at (40,18) size 744x18
    2226          RenderListMarker at (-17,0) size 7x18: bullet
     
    2428            text run at (0,0) width 75: "value=450: "
    2529          RenderMeter {METER} at (75,1) size 80x16
     30            RenderBlock {DIV} at (0,0) size 80x16
     31            RenderBlock {DIV} at (0,0) size 36x16
     32            RenderBlock {DIV} at (0,0) size 80x16
     33            RenderBlock {DIV} at (0,9) size 80x7
    2634        RenderListItem {LI} at (40,36) size 744x18
    2735          RenderListMarker at (-17,0) size 7x18: bullet
     
    2937            text run at (0,0) width 75: "value=750: "
    3038          RenderMeter {METER} at (75,1) size 80x16
     39            RenderBlock {DIV} at (0,0) size 80x16
     40            RenderBlock {DIV} at (0,0) size 60x16
     41            RenderBlock {DIV} at (0,0) size 80x16
     42            RenderBlock {DIV} at (0,4) size 80x12
    3143        RenderListItem {LI} at (40,54) size 744x18
    3244          RenderListMarker at (-17,0) size 7x18: bullet
     
    3446            text run at (0,0) width 59: "value=0: "
    3547          RenderMeter {METER} at (59,1) size 80x16
     48            RenderBlock {DIV} at (0,0) size 80x16
     49            RenderBlock {DIV} at (0,0) size 0x16
     50            RenderBlock {DIV} at (0,0) size 80x16
     51            RenderBlock {DIV} at (0,16) size 80x0
    3652        RenderListItem {LI} at (40,72) size 744x18
    3753          RenderListMarker at (-17,0) size 7x18: bullet
     
    3955            text run at (0,0) width 83: "value=1000: "
    4056          RenderMeter {METER} at (83,1) size 80x16
     57            RenderBlock {DIV} at (0,0) size 80x16
     58            RenderBlock {DIV} at (0,0) size 80x16
     59            RenderBlock {DIV} at (0,0) size 80x16
     60            RenderBlock {DIV} at (0,0) size 80x16
    4161      RenderBlock {H2} at (0,251) size 784x28
    4262        RenderText {#text} at (0,0) size 143x28
     
    4868            text run at (0,0) width 75: "value=150: "
    4969          RenderMeter {METER} at (75,1) size 80x16
     70            RenderBlock {DIV} at (0,0) size 80x16
     71            RenderBlock {DIV} at (0,0) size 20x16
     72            RenderBlock {DIV} at (0,0) size 80x16
     73            RenderBlock {DIV} at (0,12) size 80x4
    5074        RenderListItem {LI} at (40,18) size 744x18
    5175          RenderListMarker at (-17,0) size 7x18: bullet
     
    5377            text run at (0,0) width 75: "value=450: "
    5478          RenderMeter {METER} at (75,1) size 80x16
     79            RenderBlock {DIV} at (0,0) size 80x16
     80            RenderBlock {DIV} at (0,0) size 36x16
     81            RenderBlock {DIV} at (0,0) size 80x16
     82            RenderBlock {DIV} at (0,9) size 80x7
    5583        RenderListItem {LI} at (40,36) size 744x18
    5684          RenderListMarker at (-17,0) size 7x18: bullet
     
    5886            text run at (0,0) width 75: "value=750: "
    5987          RenderMeter {METER} at (75,1) size 80x16
     88            RenderBlock {DIV} at (0,0) size 80x16
     89            RenderBlock {DIV} at (0,0) size 60x16
     90            RenderBlock {DIV} at (0,0) size 80x16
     91            RenderBlock {DIV} at (0,4) size 80x12
    6092        RenderListItem {LI} at (40,54) size 744x18
    6193          RenderListMarker at (-17,0) size 7x18: bullet
     
    6395            text run at (0,0) width 59: "value=0: "
    6496          RenderMeter {METER} at (59,1) size 80x16
     97            RenderBlock {DIV} at (0,0) size 80x16
     98            RenderBlock {DIV} at (0,0) size 0x16
     99            RenderBlock {DIV} at (0,0) size 80x16
     100            RenderBlock {DIV} at (0,16) size 80x0
    65101        RenderListItem {LI} at (40,72) size 744x18
    66102          RenderListMarker at (-17,0) size 7x18: bullet
     
    68104            text run at (0,0) width 83: "value=1000: "
    69105          RenderMeter {METER} at (83,1) size 80x16
     106            RenderBlock {DIV} at (0,0) size 80x16
     107            RenderBlock {DIV} at (0,0) size 80x16
     108            RenderBlock {DIV} at (0,0) size 80x16
     109            RenderBlock {DIV} at (0,0) size 80x16
    70110      RenderBlock {H2} at (0,407) size 784x28
    71111        RenderText {#text} at (0,0) size 143x28
     
    77117            text run at (0,0) width 75: "value=150: "
    78118          RenderMeter {METER} at (75,1) size 80x16
     119            RenderBlock {DIV} at (0,0) size 80x16
     120            RenderBlock {DIV} at (0,0) size 20x16
     121            RenderBlock {DIV} at (0,0) size 80x16
     122            RenderBlock {DIV} at (0,12) size 80x4
    79123        RenderListItem {LI} at (40,18) size 744x18
    80124          RenderListMarker at (-17,0) size 7x18: bullet
     
    82126            text run at (0,0) width 75: "value=450: "
    83127          RenderMeter {METER} at (75,1) size 80x16
     128            RenderBlock {DIV} at (0,0) size 80x16
     129            RenderBlock {DIV} at (0,0) size 36x16
     130            RenderBlock {DIV} at (0,0) size 80x16
     131            RenderBlock {DIV} at (0,9) size 80x7
    84132        RenderListItem {LI} at (40,36) size 744x18
    85133          RenderListMarker at (-17,0) size 7x18: bullet
     
    87135            text run at (0,0) width 75: "value=750: "
    88136          RenderMeter {METER} at (75,1) size 80x16
     137            RenderBlock {DIV} at (0,0) size 80x16
     138            RenderBlock {DIV} at (0,0) size 60x16
     139            RenderBlock {DIV} at (0,0) size 80x16
     140            RenderBlock {DIV} at (0,4) size 80x12
    89141        RenderListItem {LI} at (40,54) size 744x18
    90142          RenderListMarker at (-17,0) size 7x18: bullet
     
    92144            text run at (0,0) width 59: "value=0: "
    93145          RenderMeter {METER} at (59,1) size 80x16
     146            RenderBlock {DIV} at (0,0) size 80x16
     147            RenderBlock {DIV} at (0,0) size 0x16
     148            RenderBlock {DIV} at (0,0) size 80x16
     149            RenderBlock {DIV} at (0,16) size 80x0
    94150        RenderListItem {LI} at (40,72) size 744x18
    95151          RenderListMarker at (-17,0) size 7x18: bullet
     
    97153            text run at (0,0) width 83: "value=1000: "
    98154          RenderMeter {METER} at (83,1) size 80x16
     155            RenderBlock {DIV} at (0,0) size 80x16
     156            RenderBlock {DIV} at (0,0) size 80x16
     157            RenderBlock {DIV} at (0,0) size 80x16
     158            RenderBlock {DIV} at (0,0) size 80x16
  • trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.txt

    r63403 r73488  
    1414          RenderBlock {DIV} at (0,0) size 80x16 [bgcolor=#808080]
    1515          RenderBlock {DIV} at (0,0) size 72x16 [bgcolor=#008000]
     16          RenderBlock {DIV} at (0,0) size 80x16
     17          RenderBlock {DIV} at (0,2) size 80x14
    1618        RenderText {#text} at (0,0) size 0x0
    1719      RenderBlock {P} at (0,124) size 784x18
     
    2022      RenderBlock (anonymous) at (0,158) size 784x100
    2123        RenderMeter {METER} at (0,0) size 80x100
     24          RenderBlock {DIV} at (0,0) size 80x100
     25          RenderBlock {DIV} at (0,0) size 72x100
    2226          RenderBlock {DIV} at (0,0) size 80x100 [bgcolor=#808080]
    2327          RenderBlock {DIV} at (0,10) size 80x90 [bgcolor=#0000FF]
     
    2933      RenderBlock (anonymous) at (0,326) size 784x20
    3034        RenderMeter {METER} at (0,0) size 80x20
     35          RenderBlock {DIV} at (0,0) size 80x20
     36          RenderBlock {DIV} at (0,0) size 72x20
     37          RenderBlock {DIV} at (0,0) size 80x20 [bgcolor=#808080]
     38          RenderBlock {DIV} at (0,2) size 80x18 [bgcolor=#0000FF]
    3139        RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.txt

    r61376 r73488  
    1212            RenderBlock {DIV} at (0,0) size 80x16
    1313            RenderBlock {DIV} at (0,0) size 20x16
     14            RenderBlock {DIV} at (0,0) size 80x16
     15            RenderBlock {DIV} at (0,12) size 80x4
    1416        RenderListItem {LI} at (43,21) size 732x18
    1517          RenderMeter {METER} at (0,1) size 80x16
    1618            RenderBlock {DIV} at (0,0) size 80x16
    1719            RenderBlock {DIV} at (0,0) size 36x16
     20            RenderBlock {DIV} at (0,0) size 80x16
     21            RenderBlock {DIV} at (0,9) size 80x7
    1822        RenderListItem {LI} at (43,42) size 732x18
    1923          RenderMeter {METER} at (0,1) size 80x16
    2024            RenderBlock {DIV} at (0,0) size 80x16
    2125            RenderBlock {DIV} at (0,0) size 60x16
     26            RenderBlock {DIV} at (0,0) size 80x16
     27            RenderBlock {DIV} at (0,4) size 80x12
    2228      RenderBlock {H2} at (3,84) size 778x18
    2329        RenderText {#text} at (0,0) size 332x18
     
    2733          RenderMeter {METER} at (0,0) size 30x40
    2834            RenderBlock {DIV} at (0,0) size 30x40
     35            RenderBlock {DIV} at (0,0) size 7x40
     36            RenderBlock {DIV} at (0,0) size 30x40
    2937            RenderBlock {DIV} at (0,30) size 30x10
    3038        RenderListItem {LI} at (43,44) size 732x41
    3139          RenderMeter {METER} at (0,0) size 30x40
    3240            RenderBlock {DIV} at (0,0) size 30x40
     41            RenderBlock {DIV} at (0,0) size 13x40
     42            RenderBlock {DIV} at (0,0) size 30x40
    3343            RenderBlock {DIV} at (0,22) size 30x18
    3444        RenderListItem {LI} at (43,88) size 732x41
    3545          RenderMeter {METER} at (0,0) size 30x40
     46            RenderBlock {DIV} at (0,0) size 30x40
     47            RenderBlock {DIV} at (0,0) size 22x40
    3648            RenderBlock {DIV} at (0,0) size 30x40
    3749            RenderBlock {DIV} at (0,10) size 30x30
     
    4557              RenderBlock {DIV} at (100,10) size 80x16
    4658              RenderBlock {DIV} at (100,10) size 64x16
     59              RenderBlock {DIV} at (100,10) size 80x16
     60              RenderBlock {DIV} at (100,14) size 80x12
    4761            RenderText {#text} at (230,14) size 70x18
    4862              text run at (230,14) width 70: " has border"
     
    5165              RenderBlock {DIV} at (100,10) size 80x16
    5266              RenderBlock {DIV} at (100,10) size 64x16
     67              RenderBlock {DIV} at (100,10) size 80x16
     68              RenderBlock {DIV} at (100,14) size 80x12
    5369            RenderText {#text} at (230,14) size 80x18
    5470              text run at (230,14) width 80: " has padding"
     
    5773              RenderBlock {DIV} at (0,0) size 80x16
    5874              RenderBlock {DIV} at (0,0) size 64x16
     75              RenderBlock {DIV} at (0,0) size 80x16
     76              RenderBlock {DIV} at (0,4) size 80x12
    5977            RenderText {#text} at (230,14) size 73x18
    6078              text run at (230,14) width 73: " has margin"
     
    6886              RenderBlock {DIV} at (0,0) size 80x16
    6987              RenderBlock {DIV} at (0,0) size 64x16 [bgcolor=#008000] [border: (2px solid #77CC77)]
     88              RenderBlock {DIV} at (0,0) size 80x16
     89              RenderBlock {DIV} at (0,4) size 80x12
    7090            RenderText {#text} at (80,0) size 250x18
    7191              text run at (80,0) width 250: " has bar style, should be styled as it has."
     
    7494              RenderBlock {DIV} at (0,0) size 80x16 [bgcolor=#808080] [border: (2px solid #222222)]
    7595              RenderBlock {DIV} at (0,0) size 64x16
     96              RenderBlock {DIV} at (0,0) size 80x16
     97              RenderBlock {DIV} at (0,4) size 80x12
    7698            RenderText {#text} at (80,0) size 264x18
    7799              text run at (80,0) width 264: " has value style, should be styled as it has."
     
    80102              RenderBlock {DIV} at (0,0) size 80x16 [bgcolor=#808080] [border: (2px solid #222222)]
    81103              RenderBlock {DIV} at (0,0) size 64x16 [bgcolor=#008000] [border: (2px solid #77CC77)]
     104              RenderBlock {DIV} at (0,0) size 80x16
     105              RenderBlock {DIV} at (0,4) size 80x12
    82106            RenderText {#text} at (80,0) size 264x18
    83107              text run at (80,0) width 264: " has both styles, should be styled as it has."
     
    91115              RenderBlock {DIV} at (0,0) size 80x16
    92116              RenderBlock {DIV} at (0,0) size 64x16
     117              RenderBlock {DIV} at (0,0) size 80x16
     118              RenderBlock {DIV} at (0,4) size 80x12
    93119            RenderText {#text} at (80,0) size 375x18
    94120              text run at (80,0) width 375: " has \"none\" appearance, should be styled with default style."
    95121          RenderListItem {LI} at (43,21) size 732x18
    96122            RenderMeter {METER} at (0,1) size 80x16
     123              RenderBlock {DIV} at (0,0) size 80x16
     124              RenderBlock {DIV} at (0,0) size 64x16
     125              RenderBlock {DIV} at (0,0) size 80x16
     126              RenderBlock {DIV} at (0,4) size 80x12
    97127            RenderText {#text} at (80,0) size 276x18
    98128              text run at (80,0) width 276: " has \"meter\" appearance, should be themed."
  • trunk/WebCore/ChangeLog

    r73486 r73488  
     12010-12-06  MORITA Hajime  <morrita@google.com>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        RenderIndicator subclasses should not change the render tree during layout.
     6        https://bugs.webkit.org/show_bug.cgi?id=50026
     7
     8        The old code created shadow elements during a layout computation,
     9        that makes the layout state inconsisntent and cause an assertion failure.
     10        This change created shadow elements before the layout to avoid 
     11        state inconsistencies.
     12       
     13        Instead of creating shadows on demand, RenderMeter and
     14        RenderProgress now create all necessary shadows before layouts,
     15        and change its visibilities during the layout: Changing
     16        visibilities doesn't trigger relayout and keep the state
     17        consistent.
     18       
     19        RenderMeter uses new HidablePartElement for shadow elements,
     20        which can toggle visibiliby between hidden and original value.
     21
     22        Test: fast/dom/HTMLMeterElement/meter-element-crash.html
     23
     24        * html/HTMLMeterElement.cpp:
     25        (WebCore::HTMLMeterElement::attach): Calling updateFromElement()
     26        * html/HTMLMeterElement.h:
     27        * html/HTMLProgressElement.cpp:
     28        (WebCore::HTMLProgressElement::attach): Calling updateFromElement()
     29        * html/HTMLProgressElement.h:
     30        * rendering/RenderIndicator.cpp:
     31        * rendering/RenderIndicator.h:
     32        * rendering/RenderMeter.cpp:
     33        (WebCore::MeterPartElement::MeterPartElement): Added to hold a restorable visibility.
     34        (WebCore::MeterPartElement::createForPart):
     35        (WebCore::MeterPartElement::hide):
     36        (WebCore::MeterPartElement::restoreVisibility):
     37        (WebCore::MeterPartElement::updateStyleForPart):
     38        (WebCore::MeterPartElement::saveVisibility):
     39        (WebCore::RenderMeter::~RenderMeter):
     40        (WebCore::RenderMeter::createPart): Extracted
     41        (WebCore::RenderMeter::updateFromElement): Had a shadow generation.
     42        (WebCore::RenderMeter::layoutParts): Removed shadow generation code.
     43        (WebCore::RenderMeter::shouldHaveParts):
     44        (WebCore::RenderMeter::valuePartRect): Adopted orientation.
     45        (WebCore::RenderMeter::orientation): Morphed from isHorizontal()
     46        (WebCore::RenderMeter::valuePseudoId): Adoptedn orientation
     47        (WebCore::RenderMeter::barPseudoId): Adopted orientation.
     48        * rendering/RenderMeter.h:
     49        (WebCore::RenderMeter::shadowAttached):
     50        * rendering/RenderProgress.cpp:
     51        (WebCore::RenderProgress::updateFromElement): Had a shadow generation.
     52        (WebCore::RenderProgress::layoutParts):
     53        * rendering/RenderProgress.h:
     54        * rendering/ShadowElement.cpp:
     55        (WebCore::ShadowBlockElement::createForPart): Extracted initAsPart().
     56        (WebCore::ShadowBlockElement::initAsPart): Extracted from createForPart().
     57        * rendering/ShadowElement.h:
     58
    1592010-11-29  Mihai Parparita  <mihaip@chromium.org>
    260
  • trunk/WebCore/html/HTMLMeterElement.cpp

    r72976 r73488  
    6868}
    6969
     70void HTMLMeterElement::attach()
     71{
     72    HTMLFormControlElement::attach();
     73    if (renderer())
     74        renderer()->updateFromElement();
     75}
     76
    7077double HTMLMeterElement::min() const
    7178{
  • trunk/WebCore/html/HTMLMeterElement.h

    r72976 r73488  
    6666
    6767    virtual void parseMappedAttribute(Attribute*);
     68
     69    virtual void attach();
    6870};
    6971
  • trunk/WebCore/html/HTMLProgressElement.cpp

    r67423 r73488  
    7171}
    7272
     73void HTMLProgressElement::attach()
     74{
     75    HTMLFormControlElement::attach();
     76    if (renderer())
     77        renderer()->updateFromElement();
     78}
     79
    7380double HTMLProgressElement::value() const
    7481{
  • trunk/WebCore/html/HTMLProgressElement.h

    r72976 r73488  
    4949
    5050    virtual void parseMappedAttribute(Attribute*);
     51
     52    virtual void attach();
    5153};
    5254
  • trunk/WebCore/rendering/RenderIndicator.cpp

    r68238 r73488  
    2626
    2727#include "RenderTheme.h"
     28#include "ShadowElement.h"
    2829
    2930using namespace std;
  • trunk/WebCore/rendering/RenderIndicator.h

    r71377 r73488  
    3939
    4040    virtual void layoutParts() = 0;
    41     virtual bool shouldHaveParts() const = 0;
    4241};
    4342
  • trunk/WebCore/rendering/RenderMeter.cpp

    r68817 r73488  
    3636using namespace HTMLNames;
    3737
     38class MeterPartElement : public ShadowBlockElement {
     39public:
     40    static PassRefPtr<MeterPartElement> createForPart(HTMLElement*, PseudoId);
     41
     42    void hide();
     43    void restoreVisibility();
     44
     45    virtual void updateStyleForPart(PseudoId);
     46
     47private:
     48    MeterPartElement(HTMLElement*);
     49    void saveVisibility();
     50
     51    EVisibility m_originalVisibility;
     52};
     53
     54MeterPartElement::MeterPartElement(HTMLElement* shadowParent)
     55    : ShadowBlockElement(shadowParent)
     56{
     57}
     58
     59PassRefPtr<MeterPartElement> MeterPartElement::createForPart(HTMLElement* shadowParent, PseudoId pseudoId)
     60{
     61    RefPtr<MeterPartElement> ret = adoptRef(new MeterPartElement(shadowParent));
     62    ret->initAsPart(pseudoId);
     63    ret->saveVisibility();
     64    return ret;
     65}
     66
     67void MeterPartElement::hide()
     68{
     69    if (renderer())
     70        renderer()->style()->setVisibility(HIDDEN);
     71}
     72
     73void MeterPartElement::restoreVisibility()
     74{
     75    if (renderer())
     76        renderer()->style()->setVisibility(m_originalVisibility);
     77}
     78
     79void MeterPartElement::updateStyleForPart(PseudoId pseudoId)
     80{
     81    if (renderer()->style()->styleType() == pseudoId)
     82        return;
     83
     84    ShadowBlockElement::updateStyleForPart(pseudoId);
     85    saveVisibility();
     86}
     87
     88void MeterPartElement::saveVisibility()
     89{
     90    m_originalVisibility = renderer()->style()->visibility();
     91}
     92
    3893RenderMeter::RenderMeter(HTMLMeterElement* element)
    3994    : RenderIndicator(element)
     
    4398RenderMeter::~RenderMeter()
    4499{
    45     if (m_valuePart)
    46         m_valuePart->detach();
    47     if (m_barPart)
    48         m_barPart->detach();
     100    if (shadowAttached()) {
     101        m_verticalValuePart->detach();
     102        m_verticalBarPart->detach();
     103        m_horizontalValuePart->detach();
     104        m_horizontalBarPart->detach();
     105    }
     106}
     107
     108PassRefPtr<MeterPartElement> RenderMeter::createPart(PseudoId pseudoId)
     109{
     110    RefPtr<MeterPartElement> element = MeterPartElement::createForPart(static_cast<HTMLElement*>(node()), pseudoId);
     111    if (element->renderer())
     112        addChild(element->renderer());
     113    return element;
     114}
     115
     116void RenderMeter::updateFromElement()
     117{
     118    if (!shadowAttached()) {
     119        m_horizontalBarPart = createPart(barPseudoId(HORIZONTAL));
     120        m_horizontalValuePart = createPart(valuePseudoId(HORIZONTAL));
     121        m_verticalBarPart = createPart(barPseudoId(VERTICAL));
     122        m_verticalValuePart = createPart(valuePseudoId(VERTICAL));
     123    }
     124
     125    m_horizontalBarPart->updateStyleForPart(barPseudoId(HORIZONTAL));
     126    m_horizontalValuePart->updateStyleForPart(valuePseudoId(HORIZONTAL));
     127    m_verticalBarPart->updateStyleForPart(barPseudoId(VERTICAL));
     128    m_verticalValuePart->updateStyleForPart(valuePseudoId(VERTICAL));
     129    RenderIndicator::updateFromElement();
    49130}
    50131
     
    63144void RenderMeter::layoutParts()
    64145{
    65     // We refresh shadow node here because the state can depend
    66     // on the frame size of this render object.
    67     updatePartsState();
    68     if (m_valuePart)
    69         m_valuePart->layoutAsPart(valuePartRect());
    70     if (m_barPart)
    71         m_barPart->layoutAsPart(barPartRect());
     146    m_horizontalBarPart->layoutAsPart(barPartRect());
     147    m_horizontalValuePart->layoutAsPart(valuePartRect(HORIZONTAL));
     148    m_verticalBarPart->layoutAsPart(barPartRect());
     149    m_verticalValuePart->layoutAsPart(valuePartRect(VERTICAL));
     150
     151    if (shouldHaveParts()) {
     152        if (HORIZONTAL == orientation()) {
     153            m_verticalBarPart->hide();
     154            m_verticalValuePart->hide();
     155            m_horizontalBarPart->restoreVisibility();
     156            m_horizontalValuePart->restoreVisibility();
     157        } else {
     158            m_verticalBarPart->restoreVisibility();
     159            m_verticalValuePart->restoreVisibility();
     160            m_horizontalBarPart->hide();
     161            m_horizontalValuePart->hide();
     162        }
     163    } else {
     164        m_verticalBarPart->hide();
     165        m_verticalValuePart->hide();
     166        m_horizontalBarPart->hide();
     167        m_horizontalValuePart->hide();
     168    }
    72169}
    73170
    74171bool RenderMeter::shouldHaveParts() const
    75172{
    76     bool hasTheme = theme()->supportsMeter(style()->appearance(), isHorizontal());
     173    EBoxOrient currentOrientation = orientation();
     174    bool hasTheme = theme()->supportsMeter(style()->appearance(), HORIZONTAL == currentOrientation);
    77175    if (!hasTheme)
    78176        return true;
    79     bool shadowsHaveStyle = ShadowBlockElement::partShouldHaveStyle(this, barPseudoId()) || ShadowBlockElement::partShouldHaveStyle(this, valuePseudoId());
     177    bool shadowsHaveStyle = ShadowBlockElement::partShouldHaveStyle(this, barPseudoId(currentOrientation)) || ShadowBlockElement::partShouldHaveStyle(this, valuePseudoId(currentOrientation));
    80178    if (shadowsHaveStyle)
    81179        return true;
     
    100198}
    101199
    102 IntRect RenderMeter::valuePartRect() const
     200IntRect RenderMeter::valuePartRect(EBoxOrient asOrientation) const
    103201{
    104202    IntRect rect = barPartRect();
    105203   
    106     if (rect.height() <= rect.width()) {
     204    if (HORIZONTAL == asOrientation) {
    107205        int width = static_cast<int>(rect.width()*valueRatio());
    108206        if (!style()->isLeftToRightDirection()) {
     
    120218}
    121219
    122 bool RenderMeter::isHorizontal() const
     220EBoxOrient RenderMeter::orientation() const
    123221{
    124222    IntRect rect = barPartRect();
    125     return rect.height() <= rect.width();
    126 }
    127 
    128 PseudoId RenderMeter::valuePseudoId() const
     223    return rect.height() <= rect.width() ? HORIZONTAL : VERTICAL;
     224}
     225
     226PseudoId RenderMeter::valuePseudoId(EBoxOrient asOrientation) const
    129227{
    130228    HTMLMeterElement* element = static_cast<HTMLMeterElement*>(node());
    131229
    132     if (isHorizontal()) {
     230    if (HORIZONTAL == asOrientation) {
    133231        switch (element->gaugeRegion()) {
    134232        case HTMLMeterElement::GaugeRegionOptimum:
     
    154252}
    155253
    156 PseudoId RenderMeter::barPseudoId() const
    157 {
    158     return isHorizontal() ? METER_HORIZONTAL_BAR : METER_VERTICAL_BAR;
    159 }
    160 
    161 void RenderMeter::updatePartsState()
    162 {
    163     if (shouldHaveParts() && !m_barPart) {
    164         ASSERT(!m_valuePart);
    165         m_barPart = ShadowBlockElement::createForPart(static_cast<HTMLElement*>(node()), barPseudoId());
    166         addChild(m_barPart->renderer());
    167         m_valuePart = ShadowBlockElement::createForPart(static_cast<HTMLElement*>(node()), valuePseudoId());
    168         addChild(m_valuePart->renderer());
    169     } else if (!shouldHaveParts() && m_barPart) {
    170         ASSERT(m_valuePart);
    171         m_barPart->detach();
    172         m_barPart = 0;
    173         m_valuePart->detach();
    174         m_valuePart = 0;
    175     }
    176 
    177     if (m_barPart) {
    178         ASSERT(m_valuePart);
    179         m_barPart->updateStyleForPart(barPseudoId());
    180         m_valuePart->updateStyleForPart(valuePseudoId());
    181     }
     254PseudoId RenderMeter::barPseudoId(EBoxOrient asOrientation) const
     255{
     256    return HORIZONTAL == asOrientation ? METER_HORIZONTAL_BAR : METER_VERTICAL_BAR;
    182257}
    183258
  • trunk/WebCore/rendering/RenderMeter.h

    r70440 r73488  
    3131
    3232class HTMLMeterElement;
    33 class ShadowBlockElement;
     33class MeterPartElement;
    3434
    3535class RenderMeter : public RenderIndicator {
     
    4141    virtual const char* renderName() const { return "RenderMeter"; }
    4242    virtual bool isMeter() const { return true; }
     43    virtual void updateFromElement();
    4344    virtual void computeLogicalWidth();
    4445    virtual void computeLogicalHeight();
    4546
    4647    virtual void layoutParts();
    47     virtual bool shouldHaveParts() const;
    4848
    49     bool isHorizontal() const;
    50     void updatePartsState();   
    51     IntRect valuePartRect() const;
    52     PseudoId valuePseudoId() const;
    53     IntRect barPartRect() const;   
    54     PseudoId barPseudoId() const;
     49    bool shadowAttached() const { return m_horizontalBarPart; }
     50    IntRect valuePartRect(EBoxOrient) const;
     51    PseudoId valuePseudoId(EBoxOrient) const;
     52    IntRect barPartRect() const;
     53    PseudoId barPseudoId(EBoxOrient) const;
     54    EBoxOrient orientation() const;
     55
    5556    double valueRatio() const;
     57    bool shouldHaveParts() const;
     58    PassRefPtr<MeterPartElement> createPart(PseudoId);
    5659
    57     RefPtr<ShadowBlockElement> m_barPart;
    58     RefPtr<ShadowBlockElement> m_valuePart;
     60    RefPtr<MeterPartElement> m_horizontalBarPart;
     61    RefPtr<MeterPartElement> m_horizontalValuePart;
     62    RefPtr<MeterPartElement> m_verticalBarPart;
     63    RefPtr<MeterPartElement> m_verticalValuePart;
    5964};
    6065
  • trunk/WebCore/rendering/RenderProgress.cpp

    r68817 r73488  
    5555void RenderProgress::updateFromElement()
    5656{
     57    if (!m_valuePart) {
     58        m_valuePart = ShadowBlockElement::createForPart(static_cast<HTMLElement*>(node()), PROGRESS_BAR_VALUE);
     59        if (m_valuePart->renderer())
     60            addChild(m_valuePart->renderer());
     61    }
     62
     63    if (shouldHaveParts())
     64        style()->setAppearance(NoControlPart);
     65    else if (m_valuePart->renderer())
     66        m_valuePart->renderer()->style()->setVisibility(HIDDEN);
     67
    5768    HTMLProgressElement* element = progressElement();
    5869    if (m_position == element->position())
     
    91102void RenderProgress::layoutParts()
    92103{
    93     updatePartsState();
    94     if (m_valuePart)
    95         m_valuePart->layoutAsPart(valuePartRect());
     104    m_valuePart->layoutAsPart(valuePartRect());
    96105    updateAnimationState();
    97106}
     
    104113        return true;
    105114    return false;
    106 }
    107 
    108 void RenderProgress::updatePartsState()
    109 {
    110     if (shouldHaveParts() && !m_valuePart) {
    111         style()->setAppearance(NoControlPart);
    112         m_valuePart = ShadowBlockElement::createForPart(static_cast<HTMLElement*>(node()), PROGRESS_BAR_VALUE);
    113         addChild(m_valuePart->renderer());
    114     } else if (!shouldHaveParts() && m_valuePart) {
    115         m_valuePart->detach();
    116         m_valuePart = 0;
    117     }
    118115}
    119116
  • trunk/WebCore/rendering/RenderProgress.h

    r61376 r73488  
    5151
    5252    virtual void layoutParts();
    53     virtual bool shouldHaveParts() const;
    5453
    5554    IntRect valuePartRect() const;
     55    bool shouldHaveParts() const;
    5656
    5757    void animationTimerFired(Timer<RenderProgress>*);
    5858    void updateAnimationState();
    59     void updatePartsState();
    6059
    6160    double m_position;
  • trunk/WebCore/rendering/ShadowElement.cpp

    r71851 r73488  
    6969PassRefPtr<ShadowBlockElement> ShadowBlockElement::createForPart(HTMLElement* shadowParent, PseudoId pseudoId)
    7070{
    71     RenderObject* parentRenderer = shadowParent->renderer();
     71    RefPtr<ShadowBlockElement> part = create(shadowParent);
     72    part->initAsPart(pseudoId);
     73    return part.release();
     74}
     75
     76void ShadowBlockElement::initAsPart(PseudoId pseudoId)
     77{
     78    RenderObject* parentRenderer = shadowParent()->renderer();
    7279    RefPtr<RenderStyle> styleForPart = createStyleForPart(parentRenderer, pseudoId);
    73     RefPtr<ShadowBlockElement> part = create(shadowParent);
    74     part->setRenderer(part->createRenderer(parentRenderer->renderArena(), styleForPart.get()));
    75     part->renderer()->setStyle(styleForPart.release());
    76     part->setAttached();
    77     part->setInDocument();
    78     return part.release();
     80    setRenderer(createRenderer(parentRenderer->renderArena(), styleForPart.get()));
     81    renderer()->setStyle(styleForPart.release());
     82    setAttached();
     83    setInDocument();
    7984}
    8085
  • trunk/WebCore/rendering/ShadowElement.h

    r71934 r73488  
    5959    static bool partShouldHaveStyle(const RenderObject* parentRenderer, PseudoId pseudoId);
    6060    void layoutAsPart(const IntRect& partRect);
    61     void updateStyleForPart(PseudoId);
     61    virtual void updateStyleForPart(PseudoId);
    6262
    6363protected:
    6464    ShadowBlockElement(HTMLElement*);
    65 
     65    void initAsPart(PseudoId pasuedId);
    6666private:
    6767    static PassRefPtr<RenderStyle> createStyleForPart(RenderObject*, PseudoId);
Note: See TracChangeset for help on using the changeset viewer.