<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[190662] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/190662">190662</a></dd>
<dt>Author</dt> <dd>changseok.oh@collabora.com</dd>
<dt>Date</dt> <dd>2015-10-07 00:32:14 -0700 (Wed, 07 Oct 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>[GTK] Progress bar is broken on recent GTK+
https://bugs.webkit.org/show_bug.cgi?id=149831

Reviewed by Carlos Garcia Campos.

Source/WebCore:

The gtk progress bar has been broken after bumping up to Gtk+-3.16. This is because
the way of rendering progress bar changed after gtk+-3.13.7. See more
https://mail.gnome.org/archives/commits-list/2014-August/msg03865.html
gtk_render_activity is no longer valid to paint a progress bar on a newer gtk+.
It should be done with gtk_render_background and gtk_render_frame.

Test: fast/dom/HTMLProgressElement/native-progress-bar.html

* rendering/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::paintProgressBar):

LayoutTests:

* fast/dom/HTMLProgressElement/native-progress-bar.html: Added.
* platform/gtk/fast/dom/HTMLProgressElement/native-progress-bar-expected.png: Added.
* platform/gtk/fast/dom/HTMLProgressElement/native-progress-bar-expected.txt: Added.
* platform/mac/fast/dom/HTMLProgressElement/native-progress-bar-expected.png: Added.
* platform/mac/fast/dom/HTMLProgressElement/native-progress-bar-expected.txt: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeGtkcpp">trunk/Source/WebCore/rendering/RenderThemeGtk.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastdomHTMLProgressElementnativeprogressbarhtml">trunk/LayoutTests/fast/dom/HTMLProgressElement/native-progress-bar.html</a></li>
<li><a href="#trunkLayoutTestsplatformgtkfastdomHTMLProgressElementnativeprogressbarexpectedpng">trunk/LayoutTests/platform/gtk/fast/dom/HTMLProgressElement/native-progress-bar-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformgtkfastdomHTMLProgressElementnativeprogressbarexpectedtxt">trunk/LayoutTests/platform/gtk/fast/dom/HTMLProgressElement/native-progress-bar-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastdomHTMLProgressElementnativeprogressbarexpectedpng">trunk/LayoutTests/platform/mac/fast/dom/HTMLProgressElement/native-progress-bar-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastdomHTMLProgressElementnativeprogressbarexpectedtxt">trunk/LayoutTests/platform/mac/fast/dom/HTMLProgressElement/native-progress-bar-expected.txt</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (190661 => 190662)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-10-07 07:11:08 UTC (rev 190661)
+++ trunk/LayoutTests/ChangeLog        2015-10-07 07:32:14 UTC (rev 190662)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2015-10-07  ChangSeok Oh  &lt;changseok.oh@collabora.com&gt;
+
+        [GTK] Progress bar is broken on recent GTK+
+        https://bugs.webkit.org/show_bug.cgi?id=149831
+
+        Reviewed by Carlos Garcia Campos.
+
+        * fast/dom/HTMLProgressElement/native-progress-bar.html: Added.
+        * platform/gtk/fast/dom/HTMLProgressElement/native-progress-bar-expected.png: Added.
+        * platform/gtk/fast/dom/HTMLProgressElement/native-progress-bar-expected.txt: Added.
+        * platform/mac/fast/dom/HTMLProgressElement/native-progress-bar-expected.png: Added.
+        * platform/mac/fast/dom/HTMLProgressElement/native-progress-bar-expected.txt: Added.
+
</ins><span class="cx"> 2015-10-06  Jon Honeycutt  &lt;jhoneycutt@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed iOS test gardening after r190629.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLProgressElementnativeprogressbarhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/HTMLProgressElement/native-progress-bar.html (0 => 190662)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLProgressElement/native-progress-bar.html                                (rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLProgressElement/native-progress-bar.html        2015-10-07 07:32:14 UTC (rev 190662)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;p&gt;Test passes if following bars are filled 30% with a color.&lt;p&gt;
+&lt;progress value=&quot;30&quot; max=&quot;100&quot;&gt;&lt;/progress&gt;&lt;br&gt;
+&lt;progress value=&quot;30&quot; max=&quot;100&quot; style=&quot;-webkit-appearance:none;&quot;&gt;&lt;/progress&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformgtkfastdomHTMLProgressElementnativeprogressbarexpectedpng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/platform/gtk/fast/dom/HTMLProgressElement/native-progress-bar-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/platform/gtk/fast/dom/HTMLProgressElement/native-progress-bar-expected.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkLayoutTestsplatformgtkfastdomHTMLProgressElementnativeprogressbarexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/gtk/fast/dom/HTMLProgressElement/native-progress-bar-expected.txt (0 => 190662)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/fast/dom/HTMLProgressElement/native-progress-bar-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/gtk/fast/dom/HTMLProgressElement/native-progress-bar-expected.txt        2015-10-07 07:32:14 UTC (rev 190662)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x99
+  RenderBlock {HTML} at (0,0) size 800x99
+    RenderBody {BODY} at (8,16) size 784x67
+      RenderBlock {P} at (0,0) size 784x17
+        RenderText {#text} at (0,0) size 354x17
+          text run at (0,0) width 354: &quot;Test passes if following bars are filled 30% with a color.&quot;
+      RenderBlock {P} at (0,33) size 784x34
+        RenderProgress {PROGRESS} at (0,1) size 160x17
+        RenderBR {BR} at (160,0) size 0x17
+        RenderBlock {PROGRESS} at (0,18) size 160x17
+          RenderProgress {DIV} at (0,0) size 160x16
+            RenderBlock {DIV} at (0,0) size 160x16 [bgcolor=#808080]
+              RenderBlock {DIV} at (0,0) size 48x16 [bgcolor=#008000]
+        RenderText {#text} at (0,0) size 0x0
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastdomHTMLProgressElementnativeprogressbarexpectedpng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/platform/mac/fast/dom/HTMLProgressElement/native-progress-bar-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/platform/mac/fast/dom/HTMLProgressElement/native-progress-bar-expected.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkLayoutTestsplatformmacfastdomHTMLProgressElementnativeprogressbarexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/fast/dom/HTMLProgressElement/native-progress-bar-expected.txt (0 => 190662)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/dom/HTMLProgressElement/native-progress-bar-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/dom/HTMLProgressElement/native-progress-bar-expected.txt        2015-10-07 07:32:14 UTC (rev 190662)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x105
+  RenderBlock {HTML} at (0,0) size 800x105
+    RenderBody {BODY} at (8,16) size 784x73
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 360x18
+          text run at (0,0) width 360: &quot;Test passes if following bars are filled 30% with a color.&quot;
+      RenderBlock {P} at (0,34) size 784x39
+        RenderProgress {PROGRESS} at (0,-1) size 160x22
+        RenderBR {BR} at (160,3) size 0x18
+        RenderBlock {PROGRESS} at (0,22) size 160x17
+          RenderProgress {DIV} at (0,0) size 160x16
+            RenderBlock {DIV} at (0,0) size 160x16 [bgcolor=#808080]
+              RenderBlock {DIV} at (0,0) size 48x16 [bgcolor=#008000]
+        RenderText {#text} at (0,0) size 0x0
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (190661 => 190662)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-10-07 07:11:08 UTC (rev 190661)
+++ trunk/Source/WebCore/ChangeLog        2015-10-07 07:32:14 UTC (rev 190662)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2015-10-07  ChangSeok Oh  &lt;changseok.oh@collabora.com&gt;
+
+        [GTK] Progress bar is broken on recent GTK+
+        https://bugs.webkit.org/show_bug.cgi?id=149831
+
+        Reviewed by Carlos Garcia Campos.
+
+        The gtk progress bar has been broken after bumping up to Gtk+-3.16. This is because
+        the way of rendering progress bar changed after gtk+-3.13.7. See more
+        https://mail.gnome.org/archives/commits-list/2014-August/msg03865.html
+        gtk_render_activity is no longer valid to paint a progress bar on a newer gtk+.
+        It should be done with gtk_render_background and gtk_render_frame.
+
+        Test: fast/dom/HTMLProgressElement/native-progress-bar.html
+
+        * rendering/RenderThemeGtk.cpp:
+        (WebCore::RenderThemeGtk::paintProgressBar):
+
</ins><span class="cx"> 2015-10-06  Michael Catanzaro  &lt;mcatanzaro@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Add autocleanups
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeGtk.cpp (190661 => 190662)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeGtk.cpp        2015-10-07 07:11:08 UTC (rev 190661)
+++ trunk/Source/WebCore/rendering/RenderThemeGtk.cpp        2015-10-07 07:32:14 UTC (rev 190662)
</span><span class="lines">@@ -1192,8 +1192,14 @@
</span><span class="cx">         rect.height() - (padding.top + padding.bottom));
</span><span class="cx">     progressRect = RenderThemeGtk::calculateProgressRect(renderObject, progressRect);
</span><span class="cx"> 
</span><del>-    if (!progressRect.isEmpty())
</del><ins>+    if (!progressRect.isEmpty()) {
+#if GTK_CHECK_VERSION(3, 13, 7)
+        gtk_render_background(context, paintInfo.context().platformContext()-&gt;cr(), progressRect.x(), progressRect.y(), progressRect.width(), progressRect.height());
+        gtk_render_frame(context, paintInfo.context().platformContext()-&gt;cr(), progressRect.x(), progressRect.y(), progressRect.width(), progressRect.height());
+#else
</ins><span class="cx">         gtk_render_activity(context, paintInfo.context().platformContext()-&gt;cr(), progressRect.x(), progressRect.y(), progressRect.width(), progressRect.height());
</span><ins>+#endif
+    }
</ins><span class="cx"> 
</span><span class="cx">     gtk_style_context_restore(context);
</span><span class="cx">     return false;
</span></span></pre>
</div>
</div>

</body>
</html>