Bug 117645 - [Windows] Provide simple <meter> drawing logic for testing
Summary: [Windows] Provide simple <meter> drawing logic for testing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-14 09:54 PDT by Brent Fulgham
Modified: 2013-06-14 12:35 PDT (History)
3 users (show)

See Also:


Attachments
Patch (11.07 KB, patch)
2013-06-14 09:58 PDT, Brent Fulgham
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2013-06-14 09:54:36 PDT
Several accessibility tests crash due to missing <meter> features in the Windows port. The attached patch provides a simple implementation that allows the tests to run without crashing.
Comment 1 Brent Fulgham 2013-06-14 09:58:47 PDT
Created attachment 204717 [details]
Patch
Comment 2 Anders Carlsson 2013-06-14 10:02:29 PDT
Comment on attachment 204717 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=204717&action=review

> Source/WebCore/rendering/RenderThemeSafari.h:145
> +    virtual IntSize meterSizeForBounds(const RenderMeter*, const IntRect&) const;
> +    virtual bool supportsMeter(ControlPart) const;
> +    virtual void adjustMeterStyle(StyleResolver*, RenderStyle*, Element*) const;
> +    virtual bool paintMeter(RenderObject*, const PaintInfo&, const IntRect&);

No OVERRIDEs on these?

> Source/WebCore/rendering/RenderThemeWin.cpp:140
> +// Progress bar parts
> +#define PP_BAR          1
> +#define PP_BARVERT      2
> +#define PP_CHUNK        3
> +#define PP_CHUNKVERT    4
> +#define PP_FILL         5
> +#define PP_FILLVERT     6
> +#define PP_PULSEOVERLAY 7
> +#define PP_MOVEOVERLAY  8
> +#define PP_PULSEOVERLAYVERT 9
> +#define PP_MOVEOVERLAYVERT  10
> +#define PP_TRANSPARENTBAR   11
> +#define PP_TRANSPARENTBARVERT 12
> +
> +// Progress bar states
> +#define PBBS_NORMAL     1
> +#define PBBS_PARTIAL    2
> +#define PBBVS_NORMAL    1 // Vertical
> +#define PBBVS_PARTIAL   2
> +
> +// Progress bar fill states
> +#define PBFS_NORMAL     1
> +#define PBFS_ERROR      2
> +#define PBFS_PAUSED     3
> +#define PBFS_PARTIAL    4
> +#define PBFVS_NORMAL    1 // Vertical
> +#define PBFVS_ERROR     2
> +#define PBFVS_PAUSED    3
> +#define PBFVS_PARTIAL   4

I'd use enums for these, but #defines are fine (especially if they come from Windows headers).
Comment 3 Brent Fulgham 2013-06-14 12:24:09 PDT
(In reply to comment #2)
> > +    virtual bool paintMeter(RenderObject*, const PaintInfo&, const IntRect&);
> 
> No OVERRIDEs on these?

Good point.  I'll fix when I land.
 

> > +#define PBFVS_PARTIAL   4
> 
> I'd use enums for these, but #defines are fine (especially if they come from Windows headers).

Yeah -- I was trying to be consistent with the other examples in this file.
Comment 4 Brent Fulgham 2013-06-14 12:35:06 PDT
Committed r151601: <http://trac.webkit.org/changeset/151601>