Changeset 61993 in webkit
- Timestamp:
- Jun 28, 2010 4:20:33 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r61991 r61993 1 2010-06-22 MORITA Hajime <morrita@google.com> 2 3 Reviewed by Kent Tamura. 4 5 <progress> should be styled with -webkit-progress-bar-value 6 https://bugs.webkit.org/show_bug.cgi?id=40823 7 8 Added cases for various style combinations, and explanations for 9 that cases. 10 11 * fast/dom/HTMLProgressElement/progress-bar-value-pseudo-element.html: 12 * platform/mac/fast/dom/HTMLProgressElement/progress-bar-value-pseudo-element-expected.checksum: 13 * platform/mac/fast/dom/HTMLProgressElement/progress-bar-value-pseudo-element-expected.png: 14 * platform/mac/fast/dom/HTMLProgressElement/progress-bar-value-pseudo-element-expected.txt: 15 * platform/qt/Skipped: 16 1 17 2010-06-28 Eric Seidel <eric@webkit.org> 2 18 -
trunk/LayoutTests/fast/dom/HTMLProgressElement/progress-bar-value-pseudo-element.html
r58228 r61993 2 2 <head><script> 3 3 window.onload = function() { 4 document.getElementById("p").setAttribute("style", "-webkit-appearance:none; border:3px red dotted; background-color:cyan;") 4 document.getElementById("toChangeStyle").setAttribute("style", "border:3px red dotted; background-color:cyan;"); 5 document.getElementById("toAddStyle").setAttribute("style", "border:3px red dotted; background-color:cyan;"); 5 6 } 6 7 </script> 7 8 <style> 8 ::-webkit-progress-bar-value {background-color:gray;} 9 #p::-webkit-progress-bar-value {background-color:darkblue;} 9 .styled::-webkit-progress-bar-value {background-color: lightgray;} 10 #toAddStyle::-webkit-progress-bar-value {background-color:darkblue;} 11 .no-appearance {-webkit-appearance: none;} 10 12 </style> 11 13 </head> 12 <body><progress max=100 value=70 dir="rtl" id="p"></progress><progress max=100 value=70 style="-webkit-appearance:none; width:300px; height:50px; background-color:blue; " ></progress><progress style="border:3px solid red;" value=0.5></progress></body> 14 <body> 15 <ul> 16 <li> 17 Giving style statically : background-color: 18 <progress class="styled" max=100 value=70 style="width:300px; height:50px; background-color:blue; " > 19 </li> 20 <li> 21 Giving style statically : border: 22 <progress class="styled" style="border:3px solid red;" value=0.5> 23 </li> 24 <li> 25 Giving style statically, only for -webkit-progress-bar-value: 26 <progress class="styled" value=0.5></progress> 27 </li> 28 <li> 29 Adding style dynamically: 30 <progress value=0.5 id="toAddStyle"></progress> 31 </li> 32 <li> 33 Changing style dynamically: 34 <progress class="styled" max=100 value=70 dir="rtl" id="toChangeStyle"></progress> 35 </li> 36 </ul> 37 </body> 13 38 </html> -
trunk/LayoutTests/platform/mac/fast/dom/HTMLProgressElement/progress-bar-value-pseudo-element-expected.checksum
r58228 r61993 1 9d70735521c5b951d8ec93992d820d16 1 496b6f8374f87c0d227c4cc48011920f -
trunk/LayoutTests/platform/mac/fast/dom/HTMLProgressElement/progress-bar-value-pseudo-element-expected.txt
r58228 r61993 3 3 layer at (0,0) size 800x600 4 4 RenderBlock {HTML} at (0,0) size 800x600 5 RenderBody {BODY} at (8,8) size 784x584 6 RenderProgress {PROGRESS} at (0,28) size 166x22 [bgcolor=#00FFFF] [border: (3px dotted #FF0000)] 7 RenderBlock {DIV} at (51,3) size 112x16 [bgcolor=#00008B] 8 RenderProgress {PROGRESS} at (166,0) size 300x50 [bgcolor=#0000FF] 9 RenderBlock {DIV} at (0,0) size 210x50 [bgcolor=#808080] 10 RenderProgress {PROGRESS} at (466,28) size 166x22 [border: (3px solid #FF0000)] 11 RenderBlock {DIV} at (3,3) size 80x16 [bgcolor=#808080] 12 RenderText {#text} at (0,0) size 0x0 13 RenderText {#text} at (0,0) size 0x0 5 RenderBody {BODY} at (8,8) size 784x576 6 RenderBlock {UL} at (0,0) size 784x138 7 RenderListItem {LI} at (40,0) size 744x51 8 RenderListMarker at (-17,33) size 7x18: bullet 9 RenderText {#text} at (0,33) size 268x18 10 text run at (0,33) width 268: "Giving style statically : background-color: " 11 RenderProgress {PROGRESS} at (268,0) size 300x50 [bgcolor=#0000FF] 12 RenderBlock {DIV} at (0,0) size 210x50 [bgcolor=#D3D3D3] 13 RenderListItem {LI} at (40,51) size 744x23 14 RenderListMarker at (-17,5) size 7x18: bullet 15 RenderText {#text} at (0,5) size 197x18 16 text run at (0,5) width 197: "Giving style statically : border: " 17 RenderProgress {PROGRESS} at (197,0) size 166x22 [bgcolor=#808080] [border: (3px solid #FF0000)] 18 RenderBlock {DIV} at (3,3) size 80x16 [bgcolor=#D3D3D3] 19 RenderListItem {LI} at (40,74) size 744x18 20 RenderListMarker at (-17,0) size 7x18: bullet 21 RenderText {#text} at (0,0) size 376x18 22 text run at (0,0) width 376: "Giving style statically, only for -webkit-progress-bar-value: " 23 RenderProgress {PROGRESS} at (376,1) size 160x16 [bgcolor=#808080] 24 RenderBlock {DIV} at (0,0) size 80x16 [bgcolor=#D3D3D3] 25 RenderText {#text} at (0,0) size 0x0 26 RenderListItem {LI} at (40,92) size 744x23 27 RenderListMarker at (-17,5) size 7x18: bullet 28 RenderText {#text} at (0,5) size 170x18 29 text run at (0,5) width 170: "Adding style dynamically: " 30 RenderProgress {PROGRESS} at (170,0) size 166x22 [bgcolor=#00FFFF] [border: (3px dotted #FF0000)] 31 RenderBlock {DIV} at (3,3) size 80x16 [bgcolor=#00008B] 32 RenderText {#text} at (0,0) size 0x0 33 RenderListItem {LI} at (40,115) size 744x23 34 RenderListMarker at (-17,5) size 7x18: bullet 35 RenderText {#text} at (0,5) size 184x18 36 text run at (0,5) width 184: "Changing style dynamically: " 37 RenderProgress {PROGRESS} at (184,0) size 166x22 [bgcolor=#00FFFF] [border: (3px dotted #FF0000)] 38 RenderBlock {DIV} at (51,3) size 112x16 [bgcolor=#D3D3D3] 39 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/qt/Skipped
r61970 r61993 3252 3252 # meter-element.html is temporally disabled.We need to rebaseline. 3253 3253 fast/dom/HTMLMeterElement/meter-element.html 3254 # progress-bar-value-pseudo-element.html is temporally disabled.We need to rebaseline. 3255 fast/dom/HTMLProgressElement/progress-bar-value-pseudo-element.html 3254 3256 fast/dom/HTMLObjectElement/vspace-hspace-as-number.html 3255 3257 fast/dom/HTMLStyleElement/insert-parser-generated.html -
trunk/WebCore/ChangeLog
r61992 r61993 1 2010-06-22 MORITA Hajime <morrita@google.com> 2 3 Reviewed by Kent Tamura. 4 5 <progress> should be styled with -webkit-progress-bar-value 6 https://bugs.webkit.org/show_bug.cgi?id=40823 7 8 Fixed to peek styles of the shadow node pseudo class to fallback 9 to non-styled painting. 10 11 * css/html.css: 12 (progress): Added defaul background-color. 13 (progress::-webkit-progress-bar-value): Added defaul background-color. 14 * rendering/RenderProgress.cpp: 15 (WebCore::RenderProgress::shouldHaveParts): 16 (WebCore::RenderProgress::updatePartsState): 17 18 Test: fast/dom/HTMLProgressElement/progress-bar-value-pseudo-element.html 19 1 20 2010-06-28 Csaba Osztrogonác <ossy@webkit.org> 2 21 -
trunk/WebCore/css/html.css
r61975 r61993 585 585 width: 10em; 586 586 vertical-align: -0.2em; 587 } 588 589 progress::-webkit-progress-bar { 587 background-color: gray; 588 } 589 590 progress::-webkit-progress-bar-value { 590 591 -webkit-appearance: progress-bar; 592 background-color: green; 591 593 } 592 594 -
trunk/WebCore/rendering/RenderProgress.cpp
r61376 r61993 99 99 bool RenderProgress::shouldHaveParts() const 100 100 { 101 return !style()->hasAppearance(); 101 if (!style()->hasAppearance()) 102 return true; 103 if (ShadowBlockElement::partShouldHaveStyle(this, PROGRESS_BAR_VALUE)) 104 return true; 105 return false; 102 106 } 103 107 … … 105 109 { 106 110 if (shouldHaveParts() && !m_valuePart) { 111 style()->setAppearance(NoControlPart); 107 112 m_valuePart = ShadowBlockElement::createForPart(this->node(), PROGRESS_BAR_VALUE); 108 113 addChild(m_valuePart->renderer());
Note: See TracChangeset
for help on using the changeset viewer.