<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
<Definitions>
  <Module name="HTML5" id="::HTML5">
    <webidl>module HTML5 {

        [Supplemental] interface HTMLInputElement : <ref>HTMLElement</ref> {
                attribute DOMString autocomplete;
                attribute boolean autofocus;
                readonly attribute <ref>FileList</ref> files;
                attribute DOMString formAction;
                attribute DOMString formEnctype;
                attribute DOMString formMethod;
                attribute boolean formNoValidate;
                attribute DOMString formTarget;
                attribute DOMString height;
                attribute boolean indeterminate;
                readonly attribute <ref>HTMLElement</ref> list;
                attribute DOMString max;
                attribute DOMString min;
                attribute boolean multiple;
                attribute DOMString pattern;
                attribute DOMString placeholder;
                attribute boolean required;
                attribute DOMString step;
                attribute <ref>Date</ref> valueAsDate;
                attribute double valueAsNumber;
                readonly attribute <ref>HTMLOptionElement</ref> selectedOption;
                attribute DOMString width;
                void stepUp(in optional long n);
                void stepDown(in optional long n);
                readonly attribute boolean willValidate;
                readonly attribute <ref>ValidityState</ref> validity;
                readonly attribute DOMString validationMessage;
                boolean checkValidity();
                void setCustomValidity(in DOMString error);
                readonly attribute <ref>NodeList</ref> labels;
                attribute unsigned long selectionStart;
                attribute unsigned long selectionEnd;
                void setSelectionRange(in unsigned long start, in unsigned long end);
        };

        interface HTMLCanvasElement : <ref>HTMLElement</ref> {
                attribute unsigned long width;
                attribute unsigned long height;
                DOMString toDataURL(in optional DOMString type, in any... args);
                <ref>Object</ref> getContext(in DOMString contextId, in any... args);
        };

        interface CanvasRenderingContext2D {

                readonly attribute <ref>HTMLCanvasElement</ref> canvas;

                void save(); 
                void restore(); 

                void scale(in double x, in double y);
                void rotate(in double angle);
                void translate(in double x, in double y);
                void transform(in double a, in double b, in double c, in double d, in double e, in double f);
                void setTransform(in double a, in double b, in double c, in double d, in double e, in double f);

                attribute double globalAlpha; 
                attribute DOMString globalCompositeOperation; 

                attribute any strokeStyle; 
                attribute any fillStyle; 
                <ref>CanvasGradient</ref> createLinearGradient(in double x0, in double y0, in double x1, in double y1);
                <ref>CanvasGradient</ref> createRadialGradient(in double x0, in double y0, in double r0, in double x1, in double y1, in double r1);
                <ref>CanvasPattern</ref> createPattern(in <ref>HTMLImageElement</ref> image, in DOMString repetition);
                <ref>CanvasPattern</ref> createPattern(in <ref>HTMLCanvasElement</ref> image, in DOMString repetition);
                <ref>CanvasPattern</ref> createPattern(in <ref>HTMLVideoElement</ref> image, in DOMString repetition);

                attribute double lineWidth; 
                attribute DOMString lineCap; 
                attribute DOMString lineJoin; 
                attribute double miterLimit; 

                attribute double shadowOffsetX; 
                attribute double shadowOffsetY; 
                attribute double shadowBlur; 
                attribute DOMString shadowColor; 

                void clearRect(in double x, in double y, in double w, in double h);
                void fillRect(in double x, in double y, in double w, in double h);
                void strokeRect(in double x, in double y, in double w, in double h);

                void beginPath();
                void closePath();
                void moveTo(in double x, in double y);
                void lineTo(in double x, in double y);
                void quadraticCurveTo(in double cpx, in double cpy, in double x, in double y);
                void bezierCurveTo(in double cp1x, in double cp1y, in double cp2x, in double cp2y, in double x, in double y);
                void arcTo(in double x1, in double y1, in double x2, in double y2, in double radius);
                void rect(in double x, in double y, in double w, in double h);
                void arc(in double x, in double y, in double radius, in double startAngle, in double endAngle, in optional boolean anticlockwise);
                void fill();
                void stroke();
                void clip();
                boolean isPointInPath(in double x, in double y);

                boolean drawFocusRing(in <ref>Element</ref> element, in double xCaret, in double yCaret, in optional boolean canDrawCustom);

                attribute DOMString font; 
                attribute DOMString textAlign; 
                attribute DOMString textBaseline; 
                void fillText(in DOMString text, in double x, in double y, in optional double maxWidth);
                void strokeText(in DOMString text, in double x, in double y, in optional double maxWidth);
                <ref>TextMetrics</ref> measureText(in DOMString text);

                void drawImage(in <ref>HTMLImageElement</ref> image, in double dx, in double dy, in optional double dw, in double dh);
                void drawImage(in <ref>HTMLImageElement</ref> image, in double sx, in double sy, in double sw, in double sh, in double dx, in double dy, in double dw, in double dh);
                void drawImage(in <ref>HTMLCanvasElement</ref> image, in double dx, in double dy, in optional double dw, in double dh);
                void drawImage(in <ref>HTMLCanvasElement</ref> image, in double sx, in double sy, in double sw, in double sh, in double dx, in double dy, in double dw, in double dh);
                void drawImage(in <ref>HTMLVideoElement</ref> image, in double dx, in double dy, in optional double dw, in double dh);
                void drawImage(in <ref>HTMLVideoElement</ref> image, in double sx, in double sy, in double sw, in double sh, in double dx, in double dy, in double dw, in double dh);

                <ref>ImageData</ref> createImageData(in double sw, in double sh);
                <ref>ImageData</ref> createImageData(in <ref>ImageData</ref> imagedata);
                <ref>ImageData</ref> getImageData(in double sx, in double sy, in double sw, in double sh);
                void putImageData(in <ref>ImageData</ref> imagedata, in double dx, in double dy, in optional double dirtyX, in double dirtyY, in double dirtyWidth, in double dirtyHeight);
        };

        interface CanvasGradient {
                void addColorStop(in double offset, in DOMString color);
        };

        interface CanvasPattern {
        };

        interface TextMetrics {
                readonly attribute double width;
        };

        interface ImageData {
                readonly attribute unsigned long width;
                readonly attribute unsigned long height;
                readonly attribute <ref>CanvasPixelArray</ref> data;
        };

        interface CanvasPixelArray {
                readonly attribute unsigned long length;
                getter octet (in unsigned long index);
                setter void (in unsigned long index, in octet value);
        };      

        interface HTMLMediaElement : <ref>HTMLElement</ref> {

                readonly attribute <ref>MediaError</ref> error;

                attribute DOMString src;
                readonly attribute DOMString currentSrc;
                const unsigned short NETWORK_EMPTY = 0;
                const unsigned short NETWORK_IDLE = 1;
                const unsigned short NETWORK_LOADING = 2;
                const unsigned short NETWORK_NO_SOURCE = 3;
                readonly attribute unsigned short networkState;
                attribute DOMString preload;
                readonly attribute <ref>TimeRanges</ref> buffered;
                void load();
                DOMString canPlayType(in DOMString type);

                const unsigned short HAVE_NOTHING = 0;
                const unsigned short HAVE_METADATA = 1;
                const unsigned short HAVE_CURRENT_DATA = 2;
                const unsigned short HAVE_FUTURE_DATA = 3;
                const unsigned short HAVE_ENOUGH_DATA = 4;
                readonly attribute unsigned short readyState;
                readonly attribute boolean seeking;

                attribute float currentTime;
                readonly attribute float startTime;
                readonly attribute float duration;
                readonly attribute boolean paused;
                attribute float defaultPlaybackRate;
                attribute float playbackRate;
                readonly attribute <ref>TimeRanges</ref> played;
                readonly attribute <ref>TimeRanges</ref> seekable;
                readonly attribute boolean ended;
                attribute boolean autoplay;
                attribute boolean loop;
                void play();
                void pause();

                attribute boolean controls;
                attribute float volume;
                attribute boolean muted;
        };

  [NamedConstructor=Audio(),
   NamedConstructor=Audio(in DOMString src)]
  interface HTMLAudioElement : <ref>HTMLMediaElement</ref> {};

        interface HTMLVideoElement : <ref>HTMLMediaElement</ref> {
                attribute DOMString width;
                attribute DOMString height;
                readonly attribute unsigned long videoWidth;
                readonly attribute unsigned long videoHeight;
                attribute DOMString poster;
        };

        [Supplemental] interface HTMLElement {
                attribute <ref>Boolean</ref> hidden;
                attribute <ref>Object</ref> contenteditable;
        };

        [Supplemental] interface Navigator {
                attribute <ref>Boolean</ref> onLine;
        };

};</webidl>
    <Interface name="HTMLInputElement" id="::HTML5::HTMLInputElement">
      <webidl>        [Supplemental] interface HTMLInputElement : <ref>HTMLElement</ref> {
                attribute DOMString autocomplete;
                attribute boolean autofocus;
                readonly attribute <ref>FileList</ref> files;
                attribute DOMString formAction;
                attribute DOMString formEnctype;
                attribute DOMString formMethod;
                attribute boolean formNoValidate;
                attribute DOMString formTarget;
                attribute DOMString height;
                attribute boolean indeterminate;
                readonly attribute <ref>HTMLElement</ref> list;
                attribute DOMString max;
                attribute DOMString min;
                attribute boolean multiple;
                attribute DOMString pattern;
                attribute DOMString placeholder;
                attribute boolean required;
                attribute DOMString step;
                attribute <ref>Date</ref> valueAsDate;
                attribute double valueAsNumber;
                readonly attribute <ref>HTMLOptionElement</ref> selectedOption;
                attribute DOMString width;
                void stepUp(in optional long n);
                void stepDown(in optional long n);
                readonly attribute boolean willValidate;
                readonly attribute <ref>ValidityState</ref> validity;
                readonly attribute DOMString validationMessage;
                boolean checkValidity();
                void setCustomValidity(in DOMString error);
                readonly attribute <ref>NodeList</ref> labels;
                attribute unsigned long selectionStart;
                attribute unsigned long selectionEnd;
                void setSelectionRange(in unsigned long start, in unsigned long end);
        };</webidl>
      <ExtendedAttributeList>
        <ExtendedAttribute name="Supplemental"/>
      </ExtendedAttributeList>
      <InterfaceInheritance>
        <Name name="HTMLElement"/>
      </InterfaceInheritance>
      <Attribute name="autocomplete" id="::HTML5::HTMLInputElement::autocomplete">
        <webidl>                attribute DOMString autocomplete;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Attribute name="autofocus" id="::HTML5::HTMLInputElement::autofocus">
        <webidl>                attribute boolean autofocus;</webidl>
        <Type type="boolean"/>
      </Attribute>
      <Attribute readonly="readonly" name="files" id="::HTML5::HTMLInputElement::files">
        <webidl>                readonly attribute <ref>FileList</ref> files;</webidl>
        <Type name="FileList"/>
      </Attribute>
      <Attribute name="formAction" id="::HTML5::HTMLInputElement::formAction">
        <webidl>                attribute DOMString formAction;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Attribute name="formEnctype" id="::HTML5::HTMLInputElement::formEnctype">
        <webidl>                attribute DOMString formEnctype;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Attribute name="formMethod" id="::HTML5::HTMLInputElement::formMethod">
        <webidl>                attribute DOMString formMethod;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Attribute name="formNoValidate" id="::HTML5::HTMLInputElement::formNoValidate">
        <webidl>                attribute boolean formNoValidate;</webidl>
        <Type type="boolean"/>
      </Attribute>
      <Attribute name="formTarget" id="::HTML5::HTMLInputElement::formTarget">
        <webidl>                attribute DOMString formTarget;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Attribute name="height" id="::HTML5::HTMLInputElement::height">
        <webidl>                attribute DOMString height;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Attribute name="indeterminate" id="::HTML5::HTMLInputElement::indeterminate">
        <webidl>                attribute boolean indeterminate;</webidl>
        <Type type="boolean"/>
      </Attribute>
      <Attribute readonly="readonly" name="list" id="::HTML5::HTMLInputElement::list">
        <webidl>                readonly attribute <ref>HTMLElement</ref> list;</webidl>
        <Type name="HTMLElement"/>
      </Attribute>
      <Attribute name="max" id="::HTML5::HTMLInputElement::max">
        <webidl>                attribute DOMString max;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Attribute name="min" id="::HTML5::HTMLInputElement::min">
        <webidl>                attribute DOMString min;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Attribute name="multiple" id="::HTML5::HTMLInputElement::multiple">
        <webidl>                attribute boolean multiple;</webidl>
        <Type type="boolean"/>
      </Attribute>
      <Attribute name="pattern" id="::HTML5::HTMLInputElement::pattern">
        <webidl>                attribute DOMString pattern;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Attribute name="placeholder" id="::HTML5::HTMLInputElement::placeholder">
        <webidl>                attribute DOMString placeholder;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Attribute name="required" id="::HTML5::HTMLInputElement::required">
        <webidl>                attribute boolean required;</webidl>
        <Type type="boolean"/>
      </Attribute>
      <Attribute name="step" id="::HTML5::HTMLInputElement::step">
        <webidl>                attribute DOMString step;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Attribute name="valueAsDate" id="::HTML5::HTMLInputElement::valueAsDate">
        <webidl>                attribute <ref>Date</ref> valueAsDate;</webidl>
        <Type name="Date"/>
      </Attribute>
      <Attribute name="valueAsNumber" id="::HTML5::HTMLInputElement::valueAsNumber">
        <webidl>                attribute double valueAsNumber;</webidl>
        <Type type="double"/>
      </Attribute>
      <Attribute readonly="readonly" name="selectedOption" id="::HTML5::HTMLInputElement::selectedOption">
        <webidl>                readonly attribute <ref>HTMLOptionElement</ref> selectedOption;</webidl>
        <Type name="HTMLOptionElement"/>
      </Attribute>
      <Attribute name="width" id="::HTML5::HTMLInputElement::width">
        <webidl>                attribute DOMString width;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Operation name="stepUp" id="::HTML5::HTMLInputElement::stepUp">
        <webidl>                void stepUp(in optional long n);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" optional="optional" name="n">
            <Type type="long"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="stepDown" id="::HTML5::HTMLInputElement::stepDown">
        <webidl>                void stepDown(in optional long n);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" optional="optional" name="n">
            <Type type="long"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Attribute readonly="readonly" name="willValidate" id="::HTML5::HTMLInputElement::willValidate">
        <webidl>                readonly attribute boolean willValidate;</webidl>
        <Type type="boolean"/>
      </Attribute>
      <Attribute readonly="readonly" name="validity" id="::HTML5::HTMLInputElement::validity">
        <webidl>                readonly attribute <ref>ValidityState</ref> validity;</webidl>
        <Type name="ValidityState"/>
      </Attribute>
      <Attribute readonly="readonly" name="validationMessage" id="::HTML5::HTMLInputElement::validationMessage">
        <webidl>                readonly attribute DOMString validationMessage;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Operation name="checkValidity" id="::HTML5::HTMLInputElement::checkValidity">
        <webidl>                boolean checkValidity();</webidl>
        <Type type="boolean"/>
        <ArgumentList/>
      </Operation>
      <Operation name="setCustomValidity" id="::HTML5::HTMLInputElement::setCustomValidity">
        <webidl>                void setCustomValidity(in DOMString error);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="error">
            <Type type="DOMString"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Attribute readonly="readonly" name="labels" id="::HTML5::HTMLInputElement::labels">
        <webidl>                readonly attribute <ref>NodeList</ref> labels;</webidl>
        <Type name="NodeList"/>
      </Attribute>
      <Attribute name="selectionStart" id="::HTML5::HTMLInputElement::selectionStart">
        <webidl>                attribute unsigned long selectionStart;</webidl>
        <Type type="unsigned long"/>
      </Attribute>
      <Attribute name="selectionEnd" id="::HTML5::HTMLInputElement::selectionEnd">
        <webidl>                attribute unsigned long selectionEnd;</webidl>
        <Type type="unsigned long"/>
      </Attribute>
      <Operation name="setSelectionRange" id="::HTML5::HTMLInputElement::setSelectionRange">
        <webidl>                void setSelectionRange(in unsigned long start, in unsigned long end);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="start">
            <Type type="unsigned long"/>
          </Argument>
          <Argument in="in" name="end">
            <Type type="unsigned long"/>
          </Argument>
        </ArgumentList>
      </Operation>
    </Interface>
    <Interface name="HTMLCanvasElement" id="::HTML5::HTMLCanvasElement">
      <webidl>        interface HTMLCanvasElement : <ref>HTMLElement</ref> {
                attribute unsigned long width;
                attribute unsigned long height;
                DOMString toDataURL(in optional DOMString type, in any... args);
                <ref>Object</ref> getContext(in DOMString contextId, in any... args);
        };</webidl>
      <InterfaceInheritance>
        <Name name="HTMLElement"/>
      </InterfaceInheritance>
      <Attribute name="width" id="::HTML5::HTMLCanvasElement::width">
        <webidl>                attribute unsigned long width;</webidl>
        <Type type="unsigned long"/>
      </Attribute>
      <Attribute name="height" id="::HTML5::HTMLCanvasElement::height">
        <webidl>                attribute unsigned long height;</webidl>
        <Type type="unsigned long"/>
      </Attribute>
      <Operation name="toDataURL" id="::HTML5::HTMLCanvasElement::toDataURL">
        <webidl>                DOMString toDataURL(in optional DOMString type, in any... args);</webidl>
        <Type type="DOMString"/>
        <ArgumentList>
          <Argument in="in" optional="optional" name="type">
            <Type type="DOMString"/>
          </Argument>
          <Argument in="in" ellipsis="ellipsis" name="args">
            <Type type="any"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="getContext" id="::HTML5::HTMLCanvasElement::getContext">
        <webidl>                <ref>Object</ref> getContext(in DOMString contextId, in any... args);</webidl>
        <Type name="Object"/>
        <ArgumentList>
          <Argument in="in" name="contextId">
            <Type type="DOMString"/>
          </Argument>
          <Argument in="in" ellipsis="ellipsis" name="args">
            <Type type="any"/>
          </Argument>
        </ArgumentList>
      </Operation>
    </Interface>
    <Interface name="CanvasRenderingContext2D" id="::HTML5::CanvasRenderingContext2D">
      <webidl>        interface CanvasRenderingContext2D {

                readonly attribute <ref>HTMLCanvasElement</ref> canvas;

                void save(); 
                void restore(); 

                void scale(in double x, in double y);
                void rotate(in double angle);
                void translate(in double x, in double y);
                void transform(in double a, in double b, in double c, in double d, in double e, in double f);
                void setTransform(in double a, in double b, in double c, in double d, in double e, in double f);

                attribute double globalAlpha; 
                attribute DOMString globalCompositeOperation; 

                attribute any strokeStyle; 
                attribute any fillStyle; 
                <ref>CanvasGradient</ref> createLinearGradient(in double x0, in double y0, in double x1, in double y1);
                <ref>CanvasGradient</ref> createRadialGradient(in double x0, in double y0, in double r0, in double x1, in double y1, in double r1);
                <ref>CanvasPattern</ref> createPattern(in <ref>HTMLImageElement</ref> image, in DOMString repetition);
                <ref>CanvasPattern</ref> createPattern(in <ref>HTMLCanvasElement</ref> image, in DOMString repetition);
                <ref>CanvasPattern</ref> createPattern(in <ref>HTMLVideoElement</ref> image, in DOMString repetition);

                attribute double lineWidth; 
                attribute DOMString lineCap; 
                attribute DOMString lineJoin; 
                attribute double miterLimit; 

                attribute double shadowOffsetX; 
                attribute double shadowOffsetY; 
                attribute double shadowBlur; 
                attribute DOMString shadowColor; 

                void clearRect(in double x, in double y, in double w, in double h);
                void fillRect(in double x, in double y, in double w, in double h);
                void strokeRect(in double x, in double y, in double w, in double h);

                void beginPath();
                void closePath();
                void moveTo(in double x, in double y);
                void lineTo(in double x, in double y);
                void quadraticCurveTo(in double cpx, in double cpy, in double x, in double y);
                void bezierCurveTo(in double cp1x, in double cp1y, in double cp2x, in double cp2y, in double x, in double y);
                void arcTo(in double x1, in double y1, in double x2, in double y2, in double radius);
                void rect(in double x, in double y, in double w, in double h);
                void arc(in double x, in double y, in double radius, in double startAngle, in double endAngle, in optional boolean anticlockwise);
                void fill();
                void stroke();
                void clip();
                boolean isPointInPath(in double x, in double y);

                boolean drawFocusRing(in <ref>Element</ref> element, in double xCaret, in double yCaret, in optional boolean canDrawCustom);

                attribute DOMString font; 
                attribute DOMString textAlign; 
                attribute DOMString textBaseline; 
                void fillText(in DOMString text, in double x, in double y, in optional double maxWidth);
                void strokeText(in DOMString text, in double x, in double y, in optional double maxWidth);
                <ref>TextMetrics</ref> measureText(in DOMString text);

                void drawImage(in <ref>HTMLImageElement</ref> image, in double dx, in double dy, in optional double dw, in double dh);
                void drawImage(in <ref>HTMLImageElement</ref> image, in double sx, in double sy, in double sw, in double sh, in double dx, in double dy, in double dw, in double dh);
                void drawImage(in <ref>HTMLCanvasElement</ref> image, in double dx, in double dy, in optional double dw, in double dh);
                void drawImage(in <ref>HTMLCanvasElement</ref> image, in double sx, in double sy, in double sw, in double sh, in double dx, in double dy, in double dw, in double dh);
                void drawImage(in <ref>HTMLVideoElement</ref> image, in double dx, in double dy, in optional double dw, in double dh);
                void drawImage(in <ref>HTMLVideoElement</ref> image, in double sx, in double sy, in double sw, in double sh, in double dx, in double dy, in double dw, in double dh);

                <ref>ImageData</ref> createImageData(in double sw, in double sh);
                <ref>ImageData</ref> createImageData(in <ref>ImageData</ref> imagedata);
                <ref>ImageData</ref> getImageData(in double sx, in double sy, in double sw, in double sh);
                void putImageData(in <ref>ImageData</ref> imagedata, in double dx, in double dy, in optional double dirtyX, in double dirtyY, in double dirtyWidth, in double dirtyHeight);
        };</webidl>
      <Attribute readonly="readonly" name="canvas" id="::HTML5::CanvasRenderingContext2D::canvas">
        <webidl>                readonly attribute <ref>HTMLCanvasElement</ref> canvas;</webidl>
        <Type name="HTMLCanvasElement"/>
      </Attribute>
      <Operation name="save" id="::HTML5::CanvasRenderingContext2D::save">
        <webidl>                void save();</webidl>
        <Type type="void"/>
        <ArgumentList/>
      </Operation>
      <Operation name="restore" id="::HTML5::CanvasRenderingContext2D::restore">
        <webidl>                void restore();</webidl>
        <Type type="void"/>
        <ArgumentList/>
      </Operation>
      <Operation name="scale" id="::HTML5::CanvasRenderingContext2D::scale">
        <webidl>                void scale(in double x, in double y);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="x">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="y">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="rotate" id="::HTML5::CanvasRenderingContext2D::rotate">
        <webidl>                void rotate(in double angle);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="angle">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="translate" id="::HTML5::CanvasRenderingContext2D::translate">
        <webidl>                void translate(in double x, in double y);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="x">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="y">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="transform" id="::HTML5::CanvasRenderingContext2D::transform">
        <webidl>                void transform(in double a, in double b, in double c, in double d, in double e, in double f);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="a">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="b">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="c">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="d">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="e">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="f">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="setTransform" id="::HTML5::CanvasRenderingContext2D::setTransform">
        <webidl>                void setTransform(in double a, in double b, in double c, in double d, in double e, in double f);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="a">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="b">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="c">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="d">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="e">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="f">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Attribute name="globalAlpha" id="::HTML5::CanvasRenderingContext2D::globalAlpha">
        <webidl>                attribute double globalAlpha;</webidl>
        <Type type="double"/>
      </Attribute>
      <Attribute name="globalCompositeOperation" id="::HTML5::CanvasRenderingContext2D::globalCompositeOperation">
        <webidl>                attribute DOMString globalCompositeOperation;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Attribute name="strokeStyle" id="::HTML5::CanvasRenderingContext2D::strokeStyle">
        <webidl>                attribute any strokeStyle;</webidl>
        <Type type="any"/>
      </Attribute>
      <Attribute name="fillStyle" id="::HTML5::CanvasRenderingContext2D::fillStyle">
        <webidl>                attribute any fillStyle;</webidl>
        <Type type="any"/>
      </Attribute>
      <Operation name="createLinearGradient" id="::HTML5::CanvasRenderingContext2D::createLinearGradient">
        <webidl>                <ref>CanvasGradient</ref> createLinearGradient(in double x0, in double y0, in double x1, in double y1);</webidl>
        <Type name="CanvasGradient"/>
        <ArgumentList>
          <Argument in="in" name="x0">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="y0">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="x1">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="y1">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="createRadialGradient" id="::HTML5::CanvasRenderingContext2D::createRadialGradient">
        <webidl>                <ref>CanvasGradient</ref> createRadialGradient(in double x0, in double y0, in double r0, in double x1, in double y1, in double r1);</webidl>
        <Type name="CanvasGradient"/>
        <ArgumentList>
          <Argument in="in" name="x0">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="y0">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="r0">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="x1">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="y1">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="r1">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="createPattern" id="::HTML5::CanvasRenderingContext2D::createPattern">
        <webidl>                <ref>CanvasPattern</ref> createPattern(in <ref>HTMLImageElement</ref> image, in DOMString repetition);</webidl>
        <Type name="CanvasPattern"/>
        <ArgumentList>
          <Argument in="in" name="image">
            <Type name="HTMLImageElement"/>
          </Argument>
          <Argument in="in" name="repetition">
            <Type type="DOMString"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="createPattern" id="::HTML5::CanvasRenderingContext2D::createPattern">
        <webidl>                <ref>CanvasPattern</ref> createPattern(in <ref>HTMLCanvasElement</ref> image, in DOMString repetition);</webidl>
        <Type name="CanvasPattern"/>
        <ArgumentList>
          <Argument in="in" name="image">
            <Type name="HTMLCanvasElement"/>
          </Argument>
          <Argument in="in" name="repetition">
            <Type type="DOMString"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="createPattern" id="::HTML5::CanvasRenderingContext2D::createPattern">
        <webidl>                <ref>CanvasPattern</ref> createPattern(in <ref>HTMLVideoElement</ref> image, in DOMString repetition);</webidl>
        <Type name="CanvasPattern"/>
        <ArgumentList>
          <Argument in="in" name="image">
            <Type name="HTMLVideoElement"/>
          </Argument>
          <Argument in="in" name="repetition">
            <Type type="DOMString"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Attribute name="lineWidth" id="::HTML5::CanvasRenderingContext2D::lineWidth">
        <webidl>                attribute double lineWidth;</webidl>
        <Type type="double"/>
      </Attribute>
      <Attribute name="lineCap" id="::HTML5::CanvasRenderingContext2D::lineCap">
        <webidl>                attribute DOMString lineCap;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Attribute name="lineJoin" id="::HTML5::CanvasRenderingContext2D::lineJoin">
        <webidl>                attribute DOMString lineJoin;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Attribute name="miterLimit" id="::HTML5::CanvasRenderingContext2D::miterLimit">
        <webidl>                attribute double miterLimit;</webidl>
        <Type type="double"/>
      </Attribute>
      <Attribute name="shadowOffsetX" id="::HTML5::CanvasRenderingContext2D::shadowOffsetX">
        <webidl>                attribute double shadowOffsetX;</webidl>
        <Type type="double"/>
      </Attribute>
      <Attribute name="shadowOffsetY" id="::HTML5::CanvasRenderingContext2D::shadowOffsetY">
        <webidl>                attribute double shadowOffsetY;</webidl>
        <Type type="double"/>
      </Attribute>
      <Attribute name="shadowBlur" id="::HTML5::CanvasRenderingContext2D::shadowBlur">
        <webidl>                attribute double shadowBlur;</webidl>
        <Type type="double"/>
      </Attribute>
      <Attribute name="shadowColor" id="::HTML5::CanvasRenderingContext2D::shadowColor">
        <webidl>                attribute DOMString shadowColor;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Operation name="clearRect" id="::HTML5::CanvasRenderingContext2D::clearRect">
        <webidl>                void clearRect(in double x, in double y, in double w, in double h);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="x">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="y">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="w">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="h">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="fillRect" id="::HTML5::CanvasRenderingContext2D::fillRect">
        <webidl>                void fillRect(in double x, in double y, in double w, in double h);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="x">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="y">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="w">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="h">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="strokeRect" id="::HTML5::CanvasRenderingContext2D::strokeRect">
        <webidl>                void strokeRect(in double x, in double y, in double w, in double h);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="x">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="y">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="w">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="h">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="beginPath" id="::HTML5::CanvasRenderingContext2D::beginPath">
        <webidl>                void beginPath();</webidl>
        <Type type="void"/>
        <ArgumentList/>
      </Operation>
      <Operation name="closePath" id="::HTML5::CanvasRenderingContext2D::closePath">
        <webidl>                void closePath();</webidl>
        <Type type="void"/>
        <ArgumentList/>
      </Operation>
      <Operation name="moveTo" id="::HTML5::CanvasRenderingContext2D::moveTo">
        <webidl>                void moveTo(in double x, in double y);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="x">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="y">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="lineTo" id="::HTML5::CanvasRenderingContext2D::lineTo">
        <webidl>                void lineTo(in double x, in double y);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="x">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="y">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="quadraticCurveTo" id="::HTML5::CanvasRenderingContext2D::quadraticCurveTo">
        <webidl>                void quadraticCurveTo(in double cpx, in double cpy, in double x, in double y);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="cpx">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="cpy">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="x">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="y">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="bezierCurveTo" id="::HTML5::CanvasRenderingContext2D::bezierCurveTo">
        <webidl>                void bezierCurveTo(in double cp1x, in double cp1y, in double cp2x, in double cp2y, in double x, in double y);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="cp1x">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="cp1y">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="cp2x">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="cp2y">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="x">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="y">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="arcTo" id="::HTML5::CanvasRenderingContext2D::arcTo">
        <webidl>                void arcTo(in double x1, in double y1, in double x2, in double y2, in double radius);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="x1">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="y1">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="x2">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="y2">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="radius">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="rect" id="::HTML5::CanvasRenderingContext2D::rect">
        <webidl>                void rect(in double x, in double y, in double w, in double h);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="x">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="y">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="w">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="h">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="arc" id="::HTML5::CanvasRenderingContext2D::arc">
        <webidl>                void arc(in double x, in double y, in double radius, in double startAngle, in double endAngle, in optional boolean anticlockwise);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="x">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="y">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="radius">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="startAngle">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="endAngle">
            <Type type="double"/>
          </Argument>
          <Argument in="in" optional="optional" name="anticlockwise">
            <Type type="boolean"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="fill" id="::HTML5::CanvasRenderingContext2D::fill">
        <webidl>                void fill();</webidl>
        <Type type="void"/>
        <ArgumentList/>
      </Operation>
      <Operation name="stroke" id="::HTML5::CanvasRenderingContext2D::stroke">
        <webidl>                void stroke();</webidl>
        <Type type="void"/>
        <ArgumentList/>
      </Operation>
      <Operation name="clip" id="::HTML5::CanvasRenderingContext2D::clip">
        <webidl>                void clip();</webidl>
        <Type type="void"/>
        <ArgumentList/>
      </Operation>
      <Operation name="isPointInPath" id="::HTML5::CanvasRenderingContext2D::isPointInPath">
        <webidl>                boolean isPointInPath(in double x, in double y);</webidl>
        <Type type="boolean"/>
        <ArgumentList>
          <Argument in="in" name="x">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="y">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="drawFocusRing" id="::HTML5::CanvasRenderingContext2D::drawFocusRing">
        <webidl>                boolean drawFocusRing(in <ref>Element</ref> element, in double xCaret, in double yCaret, in optional boolean canDrawCustom);</webidl>
        <Type type="boolean"/>
        <ArgumentList>
          <Argument in="in" name="element">
            <Type name="Element"/>
          </Argument>
          <Argument in="in" name="xCaret">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="yCaret">
            <Type type="double"/>
          </Argument>
          <Argument in="in" optional="optional" name="canDrawCustom">
            <Type type="boolean"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Attribute name="font" id="::HTML5::CanvasRenderingContext2D::font">
        <webidl>                attribute DOMString font;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Attribute name="textAlign" id="::HTML5::CanvasRenderingContext2D::textAlign">
        <webidl>                attribute DOMString textAlign;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Attribute name="textBaseline" id="::HTML5::CanvasRenderingContext2D::textBaseline">
        <webidl>                attribute DOMString textBaseline;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Operation name="fillText" id="::HTML5::CanvasRenderingContext2D::fillText">
        <webidl>                void fillText(in DOMString text, in double x, in double y, in optional double maxWidth);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="text">
            <Type type="DOMString"/>
          </Argument>
          <Argument in="in" name="x">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="y">
            <Type type="double"/>
          </Argument>
          <Argument in="in" optional="optional" name="maxWidth">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="strokeText" id="::HTML5::CanvasRenderingContext2D::strokeText">
        <webidl>                void strokeText(in DOMString text, in double x, in double y, in optional double maxWidth);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="text">
            <Type type="DOMString"/>
          </Argument>
          <Argument in="in" name="x">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="y">
            <Type type="double"/>
          </Argument>
          <Argument in="in" optional="optional" name="maxWidth">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="measureText" id="::HTML5::CanvasRenderingContext2D::measureText">
        <webidl>                <ref>TextMetrics</ref> measureText(in DOMString text);</webidl>
        <Type name="TextMetrics"/>
        <ArgumentList>
          <Argument in="in" name="text">
            <Type type="DOMString"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="drawImage" id="::HTML5::CanvasRenderingContext2D::drawImage">
        <webidl>                void drawImage(in <ref>HTMLImageElement</ref> image, in double dx, in double dy, in optional double dw, in double dh);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="image">
            <Type name="HTMLImageElement"/>
          </Argument>
          <Argument in="in" name="dx">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dy">
            <Type type="double"/>
          </Argument>
          <Argument in="in" optional="optional" name="dw">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dh">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="drawImage" id="::HTML5::CanvasRenderingContext2D::drawImage">
        <webidl>                void drawImage(in <ref>HTMLImageElement</ref> image, in double sx, in double sy, in double sw, in double sh, in double dx, in double dy, in double dw, in double dh);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="image">
            <Type name="HTMLImageElement"/>
          </Argument>
          <Argument in="in" name="sx">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="sy">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="sw">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="sh">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dx">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dy">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dw">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dh">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="drawImage" id="::HTML5::CanvasRenderingContext2D::drawImage">
        <webidl>                void drawImage(in <ref>HTMLCanvasElement</ref> image, in double dx, in double dy, in optional double dw, in double dh);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="image">
            <Type name="HTMLCanvasElement"/>
          </Argument>
          <Argument in="in" name="dx">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dy">
            <Type type="double"/>
          </Argument>
          <Argument in="in" optional="optional" name="dw">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dh">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="drawImage" id="::HTML5::CanvasRenderingContext2D::drawImage">
        <webidl>                void drawImage(in <ref>HTMLCanvasElement</ref> image, in double sx, in double sy, in double sw, in double sh, in double dx, in double dy, in double dw, in double dh);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="image">
            <Type name="HTMLCanvasElement"/>
          </Argument>
          <Argument in="in" name="sx">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="sy">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="sw">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="sh">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dx">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dy">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dw">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dh">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="drawImage" id="::HTML5::CanvasRenderingContext2D::drawImage">
        <webidl>                void drawImage(in <ref>HTMLVideoElement</ref> image, in double dx, in double dy, in optional double dw, in double dh);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="image">
            <Type name="HTMLVideoElement"/>
          </Argument>
          <Argument in="in" name="dx">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dy">
            <Type type="double"/>
          </Argument>
          <Argument in="in" optional="optional" name="dw">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dh">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="drawImage" id="::HTML5::CanvasRenderingContext2D::drawImage">
        <webidl>                void drawImage(in <ref>HTMLVideoElement</ref> image, in double sx, in double sy, in double sw, in double sh, in double dx, in double dy, in double dw, in double dh);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="image">
            <Type name="HTMLVideoElement"/>
          </Argument>
          <Argument in="in" name="sx">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="sy">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="sw">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="sh">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dx">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dy">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dw">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dh">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="createImageData" id="::HTML5::CanvasRenderingContext2D::createImageData">
        <webidl>                <ref>ImageData</ref> createImageData(in double sw, in double sh);</webidl>
        <Type name="ImageData"/>
        <ArgumentList>
          <Argument in="in" name="sw">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="sh">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="createImageData" id="::HTML5::CanvasRenderingContext2D::createImageData">
        <webidl>                <ref>ImageData</ref> createImageData(in <ref>ImageData</ref> imagedata);</webidl>
        <Type name="ImageData"/>
        <ArgumentList>
          <Argument in="in" name="imagedata">
            <Type name="ImageData"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="getImageData" id="::HTML5::CanvasRenderingContext2D::getImageData">
        <webidl>                <ref>ImageData</ref> getImageData(in double sx, in double sy, in double sw, in double sh);</webidl>
        <Type name="ImageData"/>
        <ArgumentList>
          <Argument in="in" name="sx">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="sy">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="sw">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="sh">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation name="putImageData" id="::HTML5::CanvasRenderingContext2D::putImageData">
        <webidl>                void putImageData(in <ref>ImageData</ref> imagedata, in double dx, in double dy, in optional double dirtyX, in double dirtyY, in double dirtyWidth, in double dirtyHeight);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="imagedata">
            <Type name="ImageData"/>
          </Argument>
          <Argument in="in" name="dx">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dy">
            <Type type="double"/>
          </Argument>
          <Argument in="in" optional="optional" name="dirtyX">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dirtyY">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dirtyWidth">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="dirtyHeight">
            <Type type="double"/>
          </Argument>
        </ArgumentList>
      </Operation>
    </Interface>
    <Interface name="CanvasGradient" id="::HTML5::CanvasGradient">
      <webidl>        interface CanvasGradient {
                void addColorStop(in double offset, in DOMString color);
        };</webidl>
      <Operation name="addColorStop" id="::HTML5::CanvasGradient::addColorStop">
        <webidl>                void addColorStop(in double offset, in DOMString color);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="offset">
            <Type type="double"/>
          </Argument>
          <Argument in="in" name="color">
            <Type type="DOMString"/>
          </Argument>
        </ArgumentList>
      </Operation>
    </Interface>
    <Interface name="CanvasPattern" id="::HTML5::CanvasPattern">
      <webidl>        interface CanvasPattern {
        };</webidl>
    </Interface>
    <Interface name="TextMetrics" id="::HTML5::TextMetrics">
      <webidl>        interface TextMetrics {
                readonly attribute double width;
        };</webidl>
      <Attribute readonly="readonly" name="width" id="::HTML5::TextMetrics::width">
        <webidl>                readonly attribute double width;</webidl>
        <Type type="double"/>
      </Attribute>
    </Interface>
    <Interface name="ImageData" id="::HTML5::ImageData">
      <webidl>        interface ImageData {
                readonly attribute unsigned long width;
                readonly attribute unsigned long height;
                readonly attribute <ref>CanvasPixelArray</ref> data;
        };</webidl>
      <Attribute readonly="readonly" name="width" id="::HTML5::ImageData::width">
        <webidl>                readonly attribute unsigned long width;</webidl>
        <Type type="unsigned long"/>
      </Attribute>
      <Attribute readonly="readonly" name="height" id="::HTML5::ImageData::height">
        <webidl>                readonly attribute unsigned long height;</webidl>
        <Type type="unsigned long"/>
      </Attribute>
      <Attribute readonly="readonly" name="data" id="::HTML5::ImageData::data">
        <webidl>                readonly attribute <ref>CanvasPixelArray</ref> data;</webidl>
        <Type name="CanvasPixelArray"/>
      </Attribute>
    </Interface>
    <Interface name="CanvasPixelArray" id="::HTML5::CanvasPixelArray">
      <webidl>        interface CanvasPixelArray {
                readonly attribute unsigned long length;
                getter octet (in unsigned long index);
                setter void (in unsigned long index, in octet value);
        };</webidl>
      <Attribute readonly="readonly" name="length" id="::HTML5::CanvasPixelArray::length">
        <webidl>                readonly attribute unsigned long length;</webidl>
        <Type type="unsigned long"/>
      </Attribute>
      <Operation getter="getter">
        <webidl>                getter octet (in unsigned long index);</webidl>
        <Type type="octet"/>
        <ArgumentList>
          <Argument in="in" name="index">
            <Type type="unsigned long"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Operation setter="setter">
        <webidl>                setter void (in unsigned long index, in octet value);</webidl>
        <Type type="void"/>
        <ArgumentList>
          <Argument in="in" name="index">
            <Type type="unsigned long"/>
          </Argument>
          <Argument in="in" name="value">
            <Type type="octet"/>
          </Argument>
        </ArgumentList>
      </Operation>
    </Interface>
    <Interface name="HTMLMediaElement" id="::HTML5::HTMLMediaElement">
      <webidl>        interface HTMLMediaElement : <ref>HTMLElement</ref> {

                readonly attribute <ref>MediaError</ref> error;

                attribute DOMString src;
                readonly attribute DOMString currentSrc;
                const unsigned short NETWORK_EMPTY = 0;
                const unsigned short NETWORK_IDLE = 1;
                const unsigned short NETWORK_LOADING = 2;
                const unsigned short NETWORK_NO_SOURCE = 3;
                readonly attribute unsigned short networkState;
                attribute DOMString preload;
                readonly attribute <ref>TimeRanges</ref> buffered;
                void load();
                DOMString canPlayType(in DOMString type);

                const unsigned short HAVE_NOTHING = 0;
                const unsigned short HAVE_METADATA = 1;
                const unsigned short HAVE_CURRENT_DATA = 2;
                const unsigned short HAVE_FUTURE_DATA = 3;
                const unsigned short HAVE_ENOUGH_DATA = 4;
                readonly attribute unsigned short readyState;
                readonly attribute boolean seeking;

                attribute float currentTime;
                readonly attribute float startTime;
                readonly attribute float duration;
                readonly attribute boolean paused;
                attribute float defaultPlaybackRate;
                attribute float playbackRate;
                readonly attribute <ref>TimeRanges</ref> played;
                readonly attribute <ref>TimeRanges</ref> seekable;
                readonly attribute boolean ended;
                attribute boolean autoplay;
                attribute boolean loop;
                void play();
                void pause();

                attribute boolean controls;
                attribute float volume;
                attribute boolean muted;
        };</webidl>
      <InterfaceInheritance>
        <Name name="HTMLElement"/>
      </InterfaceInheritance>
      <Attribute readonly="readonly" name="error" id="::HTML5::HTMLMediaElement::error">
        <webidl>                readonly attribute <ref>MediaError</ref> error;</webidl>
        <Type name="MediaError"/>
      </Attribute>
      <Attribute name="src" id="::HTML5::HTMLMediaElement::src">
        <webidl>                attribute DOMString src;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Attribute readonly="readonly" name="currentSrc" id="::HTML5::HTMLMediaElement::currentSrc">
        <webidl>                readonly attribute DOMString currentSrc;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Const name="NETWORK_EMPTY" value="0" id="::HTML5::HTMLMediaElement::NETWORK_EMPTY">
        <webidl>                const unsigned short NETWORK_EMPTY = 0;</webidl>
        <Type type="unsigned short"/>
      </Const>
      <Const name="NETWORK_IDLE" value="1" id="::HTML5::HTMLMediaElement::NETWORK_IDLE">
        <webidl>                const unsigned short NETWORK_IDLE = 1;</webidl>
        <Type type="unsigned short"/>
      </Const>
      <Const name="NETWORK_LOADING" value="2" id="::HTML5::HTMLMediaElement::NETWORK_LOADING">
        <webidl>                const unsigned short NETWORK_LOADING = 2;</webidl>
        <Type type="unsigned short"/>
      </Const>
      <Const name="NETWORK_NO_SOURCE" value="3" id="::HTML5::HTMLMediaElement::NETWORK_NO_SOURCE">
        <webidl>                const unsigned short NETWORK_NO_SOURCE = 3;</webidl>
        <Type type="unsigned short"/>
      </Const>
      <Attribute readonly="readonly" name="networkState" id="::HTML5::HTMLMediaElement::networkState">
        <webidl>                readonly attribute unsigned short networkState;</webidl>
        <Type type="unsigned short"/>
      </Attribute>
      <Attribute name="preload" id="::HTML5::HTMLMediaElement::preload">
        <webidl>                attribute DOMString preload;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Attribute readonly="readonly" name="buffered" id="::HTML5::HTMLMediaElement::buffered">
        <webidl>                readonly attribute <ref>TimeRanges</ref> buffered;</webidl>
        <Type name="TimeRanges"/>
      </Attribute>
      <Operation name="load" id="::HTML5::HTMLMediaElement::load">
        <webidl>                void load();</webidl>
        <Type type="void"/>
        <ArgumentList/>
      </Operation>
      <Operation name="canPlayType" id="::HTML5::HTMLMediaElement::canPlayType">
        <webidl>                DOMString canPlayType(in DOMString type);</webidl>
        <Type type="DOMString"/>
        <ArgumentList>
          <Argument in="in" name="type">
            <Type type="DOMString"/>
          </Argument>
        </ArgumentList>
      </Operation>
      <Const name="HAVE_NOTHING" value="0" id="::HTML5::HTMLMediaElement::HAVE_NOTHING">
        <webidl>                const unsigned short HAVE_NOTHING = 0;</webidl>
        <Type type="unsigned short"/>
      </Const>
      <Const name="HAVE_METADATA" value="1" id="::HTML5::HTMLMediaElement::HAVE_METADATA">
        <webidl>                const unsigned short HAVE_METADATA = 1;</webidl>
        <Type type="unsigned short"/>
      </Const>
      <Const name="HAVE_CURRENT_DATA" value="2" id="::HTML5::HTMLMediaElement::HAVE_CURRENT_DATA">
        <webidl>                const unsigned short HAVE_CURRENT_DATA = 2;</webidl>
        <Type type="unsigned short"/>
      </Const>
      <Const name="HAVE_FUTURE_DATA" value="3" id="::HTML5::HTMLMediaElement::HAVE_FUTURE_DATA">
        <webidl>                const unsigned short HAVE_FUTURE_DATA = 3;</webidl>
        <Type type="unsigned short"/>
      </Const>
      <Const name="HAVE_ENOUGH_DATA" value="4" id="::HTML5::HTMLMediaElement::HAVE_ENOUGH_DATA">
        <webidl>                const unsigned short HAVE_ENOUGH_DATA = 4;</webidl>
        <Type type="unsigned short"/>
      </Const>
      <Attribute readonly="readonly" name="readyState" id="::HTML5::HTMLMediaElement::readyState">
        <webidl>                readonly attribute unsigned short readyState;</webidl>
        <Type type="unsigned short"/>
      </Attribute>
      <Attribute readonly="readonly" name="seeking" id="::HTML5::HTMLMediaElement::seeking">
        <webidl>                readonly attribute boolean seeking;</webidl>
        <Type type="boolean"/>
      </Attribute>
      <Attribute name="currentTime" id="::HTML5::HTMLMediaElement::currentTime">
        <webidl>                attribute float currentTime;</webidl>
        <Type type="float"/>
      </Attribute>
      <Attribute readonly="readonly" name="startTime" id="::HTML5::HTMLMediaElement::startTime">
        <webidl>                readonly attribute float startTime;</webidl>
        <Type type="float"/>
      </Attribute>
      <Attribute readonly="readonly" name="duration" id="::HTML5::HTMLMediaElement::duration">
        <webidl>                readonly attribute float duration;</webidl>
        <Type type="float"/>
      </Attribute>
      <Attribute readonly="readonly" name="paused" id="::HTML5::HTMLMediaElement::paused">
        <webidl>                readonly attribute boolean paused;</webidl>
        <Type type="boolean"/>
      </Attribute>
      <Attribute name="defaultPlaybackRate" id="::HTML5::HTMLMediaElement::defaultPlaybackRate">
        <webidl>                attribute float defaultPlaybackRate;</webidl>
        <Type type="float"/>
      </Attribute>
      <Attribute name="playbackRate" id="::HTML5::HTMLMediaElement::playbackRate">
        <webidl>                attribute float playbackRate;</webidl>
        <Type type="float"/>
      </Attribute>
      <Attribute readonly="readonly" name="played" id="::HTML5::HTMLMediaElement::played">
        <webidl>                readonly attribute <ref>TimeRanges</ref> played;</webidl>
        <Type name="TimeRanges"/>
      </Attribute>
      <Attribute readonly="readonly" name="seekable" id="::HTML5::HTMLMediaElement::seekable">
        <webidl>                readonly attribute <ref>TimeRanges</ref> seekable;</webidl>
        <Type name="TimeRanges"/>
      </Attribute>
      <Attribute readonly="readonly" name="ended" id="::HTML5::HTMLMediaElement::ended">
        <webidl>                readonly attribute boolean ended;</webidl>
        <Type type="boolean"/>
      </Attribute>
      <Attribute name="autoplay" id="::HTML5::HTMLMediaElement::autoplay">
        <webidl>                attribute boolean autoplay;</webidl>
        <Type type="boolean"/>
      </Attribute>
      <Attribute name="loop" id="::HTML5::HTMLMediaElement::loop">
        <webidl>                attribute boolean loop;</webidl>
        <Type type="boolean"/>
      </Attribute>
      <Operation name="play" id="::HTML5::HTMLMediaElement::play">
        <webidl>                void play();</webidl>
        <Type type="void"/>
        <ArgumentList/>
      </Operation>
      <Operation name="pause" id="::HTML5::HTMLMediaElement::pause">
        <webidl>                void pause();</webidl>
        <Type type="void"/>
        <ArgumentList/>
      </Operation>
      <Attribute name="controls" id="::HTML5::HTMLMediaElement::controls">
        <webidl>                attribute boolean controls;</webidl>
        <Type type="boolean"/>
      </Attribute>
      <Attribute name="volume" id="::HTML5::HTMLMediaElement::volume">
        <webidl>                attribute float volume;</webidl>
        <Type type="float"/>
      </Attribute>
      <Attribute name="muted" id="::HTML5::HTMLMediaElement::muted">
        <webidl>                attribute boolean muted;</webidl>
        <Type type="boolean"/>
      </Attribute>
    </Interface>
    <Interface name="HTMLAudioElement" id="::HTML5::HTMLAudioElement">
      <webidl>  [NamedConstructor=Audio(),
   NamedConstructor=Audio(in DOMString src)]
  interface HTMLAudioElement : <ref>HTMLMediaElement</ref> {};</webidl>
      <ExtendedAttributeList>
        <ExtendedAttribute name="NamedConstructor" value="Audio">
          <ArgumentList/>
        </ExtendedAttribute>
        <ExtendedAttribute name="NamedConstructor" value="Audio">
          <ArgumentList>
            <Argument in="in" name="src">
              <Type type="DOMString"/>
            </Argument>
          </ArgumentList>
        </ExtendedAttribute>
      </ExtendedAttributeList>
      <InterfaceInheritance>
        <Name name="HTMLMediaElement"/>
      </InterfaceInheritance>
    </Interface>
    <Interface name="HTMLVideoElement" id="::HTML5::HTMLVideoElement">
      <webidl>        interface HTMLVideoElement : <ref>HTMLMediaElement</ref> {
                attribute DOMString width;
                attribute DOMString height;
                readonly attribute unsigned long videoWidth;
                readonly attribute unsigned long videoHeight;
                attribute DOMString poster;
        };</webidl>
      <InterfaceInheritance>
        <Name name="HTMLMediaElement"/>
      </InterfaceInheritance>
      <Attribute name="width" id="::HTML5::HTMLVideoElement::width">
        <webidl>                attribute DOMString width;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Attribute name="height" id="::HTML5::HTMLVideoElement::height">
        <webidl>                attribute DOMString height;</webidl>
        <Type type="DOMString"/>
      </Attribute>
      <Attribute readonly="readonly" name="videoWidth" id="::HTML5::HTMLVideoElement::videoWidth">
        <webidl>                readonly attribute unsigned long videoWidth;</webidl>
        <Type type="unsigned long"/>
      </Attribute>
      <Attribute readonly="readonly" name="videoHeight" id="::HTML5::HTMLVideoElement::videoHeight">
        <webidl>                readonly attribute unsigned long videoHeight;</webidl>
        <Type type="unsigned long"/>
      </Attribute>
      <Attribute name="poster" id="::HTML5::HTMLVideoElement::poster">
        <webidl>                attribute DOMString poster;</webidl>
        <Type type="DOMString"/>
      </Attribute>
    </Interface>
    <Interface name="HTMLElement" id="::HTML5::HTMLElement">
      <webidl>        [Supplemental] interface HTMLElement {
                attribute <ref>Boolean</ref> hidden;
                attribute <ref>Object</ref> contenteditable;
        };</webidl>
      <ExtendedAttributeList>
        <ExtendedAttribute name="Supplemental"/>
      </ExtendedAttributeList>
      <Attribute name="hidden" id="::HTML5::HTMLElement::hidden">
        <webidl>                attribute <ref>Boolean</ref> hidden;</webidl>
        <Type name="Boolean"/>
      </Attribute>
      <Attribute name="contenteditable" id="::HTML5::HTMLElement::contenteditable">
        <webidl>                attribute <ref>Object</ref> contenteditable;</webidl>
        <Type name="Object"/>
      </Attribute>
    </Interface>
    <Interface name="Navigator" id="::HTML5::Navigator">
      <webidl>        [Supplemental] interface Navigator {
                attribute <ref>Boolean</ref> onLine;
        };</webidl>
      <ExtendedAttributeList>
        <ExtendedAttribute name="Supplemental"/>
      </ExtendedAttributeList>
      <Attribute name="onLine" id="::HTML5::Navigator::onLine">
        <webidl>                attribute <ref>Boolean</ref> onLine;</webidl>
        <Type name="Boolean"/>
      </Attribute>
    </Interface>
  </Module>
</Definitions>
