Bug 41014 - [GTK] Add support for the progress tag
Summary: [GTK] Add support for the progress tag
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-22 15:16 PDT by Martin Robinson
Modified: 2010-08-19 08:47 PDT (History)
4 users (show)

See Also:


Attachments
Add support for rendering the progress element (10.07 KB, patch)
2010-06-22 15:44 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff
Updated patch with Xan's suggestions (10.07 KB, patch)
2010-06-28 13:10 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Robinson 2010-06-22 15:16:34 PDT
The GTK+ port does not yet support the HTML5 progress tag. The only necessity is to add support to RenderThemeGtk for this control.
Comment 1 Martin Robinson 2010-06-22 15:44:09 PDT
Created attachment 59424 [details]
Add support for rendering the progress element
Comment 2 WebKit Review Bot 2010-06-22 15:46:46 PDT
Attachment 59424 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1
WebCore/platform/gtk/gtkdrawing.h:492:  moz_gtk_get_progress_widget is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WARNING: File exempt from style guide. Skipping: "WebCore/platform/gtk/gtk2drawing.c"
Total errors found: 1 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Martin Robinson 2010-06-22 15:50:33 PDT
This above is a bug in the style checker. I've filed it here: https://bugs.webkit.org/show_bug.cgi?id=41017
Comment 4 Xan Lopez 2010-06-28 12:41:35 PDT
Comment on attachment 59424 [details]
Add support for rendering the progress element

>diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
>--- a/WebCore/platform/gtk/RenderThemeGtk.cpp
>+++ b/WebCore/platform/gtk/RenderThemeGtk.cpp
>@@ -34,6 +34,9 @@
> #include "MediaControlElements.h"
> #include "NotImplemented.h"
> #include "RenderBox.h"
>+#if ENABLE(PROGRESS_TAG)
>+#include "RenderProgress.h"
>+#endif

Style guide says this has to go at the end of the includes in its own block.


>+bool RenderThemeGtk::paintProgressBar(RenderObject* renderObject, const RenderObject::PaintInfo& paintInfo, const IntRect& rect)
>+{
>+    if (!renderObject->isProgress())
>+        return true;
>+
>+    GtkWidget* progressBarWidget = moz_gtk_get_progress_widget();
>+    if (!progressBarWidget)
>+        return true;
>+
>+    if (paintMozillaGtkWidget(this, MOZ_GTK_PROGRESSBAR, renderObject, paintInfo, rect))
>+        return true;
>+
>+    IntRect chunkRect(rect);
>+    RenderProgress* renderProgress = toRenderProgress(renderObject);
>+
>+    chunkRect.setHeight(chunkRect.height() - (2 * progressBarWidget->style->ythickness));
>+    chunkRect.setY(chunkRect.y() + progressBarWidget->style->ythickness);
>+    chunkRect.setWidth(chunkRect.width() - (2 * progressBarWidget->style->xthickness));

Don't access style like that, it won't compile with GSEAL enabled.

r- for the GSEAL stuff.
Comment 5 Martin Robinson 2010-06-28 13:10:35 PDT
Created attachment 59926 [details]
Updated patch with Xan's suggestions
Comment 6 WebKit Review Bot 2010-06-28 13:12:03 PDT
Attachment 59926 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1
WebCore/platform/gtk/gtkdrawing.h:492:  moz_gtk_get_progress_widget is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WARNING: File exempt from style guide. Skipping: "WebCore/platform/gtk/gtk2drawing.c"
Total errors found: 1 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Martin Robinson 2010-06-28 13:44:16 PDT
Comment on attachment 59926 [details]
Updated patch with Xan's suggestions

Patch has landed (r62034), so I'm clearing the flags.
Comment 8 WebKit Review Bot 2010-06-28 14:24:15 PDT
http://trac.webkit.org/changeset/62034 might have broken GTK Linux 32-bit Debug
The following changes are on the blame list:
http://trac.webkit.org/changeset/62032
http://trac.webkit.org/changeset/62033
http://trac.webkit.org/changeset/62034
http://trac.webkit.org/changeset/62031
Comment 9 Gustavo Noronha (kov) 2010-08-19 08:23:32 PDT
So this bug is done, then? =) I'll close it, feel free to reopen if I'm mistaken.
Comment 10 Martin Robinson 2010-08-19 08:47:55 PDT
Yep! This should be complete.