Changeset 55980 in webkit


Ignore:
Timestamp:
Mar 14, 2010 6:00:36 PM (14 years ago)
Author:
yael.aharon@nokia.com
Message:

Support for HTMLProgressElement
https://bugs.webkit.org/show_bug.cgi?id=35937

Reviewed by Darin Adler.

WebCore:

Added support for HTMLProgressElement.
This implementation is enabled only for Qt, because only RenderThemeQt
was modified to actually draw the progress element.
The labels attribute of the progress element will be implemented in a
separate patch.

Tests: fast/dom/HTMLProgressElement/progress-element.html

fast/dom/HTMLProgressElement/set-progress-properties.html

  • DerivedSources.cpp:
  • DerivedSources.make:
  • GNUmakefile.am:
  • WebCore.gypi:
  • WebCore.pri:
  • WebCore.pro:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):

  • css/CSSSelector.cpp:

(WebCore::CSSSelector::extractPseudoType):

  • css/CSSValueKeywords.in:
  • css/html.css:
  • html/HTMLElement.cpp:

(WebCore::inlineTagList):

  • html/HTMLElementsAllInOne.cpp:
  • html/HTMLFormControlElement.cpp:
  • html/HTMLFormControlElement.h:
  • html/HTMLProgressElement.cpp: Added.
  • html/HTMLProgressElement.h: Added.
  • html/HTMLProgressElement.idl: Added.
  • html/HTMLTagNames.in:
  • page/DOMWindow.idl:
  • platform/ThemeTypes.h:
  • platform/qt/RenderThemeQt.cpp:
  • platform/qt/RenderThemeQt.h:
  • rendering/RenderObject.h:
  • rendering/RenderProgress.cpp: Added.
  • rendering/RenderProgress.h: Added.
  • rendering/RenderTheme.cpp:
  • rendering/RenderTheme.h:

LayoutTests:

  • fast/dom/HTMLProgressElement: Added.
  • fast/dom/HTMLProgressElement/progress-element.html: Added.
  • fast/dom/HTMLProgressElement/script-tests: Added.
  • fast/dom/HTMLProgressElement/script-tests/TEMPLATE.html: Added.
  • fast/dom/HTMLProgressElement/script-tests/set-progress-properties.js: Added.
  • fast/dom/HTMLProgressElement/set-progress-properties.html: Added.
  • platform/gtk/Skipped:
  • platform/mac/Skipped:
  • platform/qt/fast/dom/HTMLProgressElement: Added.
  • platform/qt/fast/dom/HTMLProgressElement/progress-element-expected.checksum: Added.
  • platform/qt/fast/dom/HTMLProgressElement/progress-element-expected.png: Added.
  • platform/qt/fast/dom/HTMLProgressElement/progress-element-expected.txt: Added.
  • platform/qt/fast/dom/HTMLProgressElement/set-progress-properties-expected.txt: Added.
Location:
trunk
Files:
16 added
28 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r55977 r55980  
     12010-03-14  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Support for HTMLProgressElement
     6        https://bugs.webkit.org/show_bug.cgi?id=35937
     7
     8        * fast/dom/HTMLProgressElement: Added.
     9        * fast/dom/HTMLProgressElement/progress-element.html: Added.
     10        * fast/dom/HTMLProgressElement/script-tests: Added.
     11        * fast/dom/HTMLProgressElement/script-tests/TEMPLATE.html: Added.
     12        * fast/dom/HTMLProgressElement/script-tests/set-progress-properties.js: Added.
     13        * fast/dom/HTMLProgressElement/set-progress-properties.html: Added.
     14        * platform/gtk/Skipped:
     15        * platform/mac/Skipped:
     16        * platform/qt/fast/dom/HTMLProgressElement: Added.
     17        * platform/qt/fast/dom/HTMLProgressElement/progress-element-expected.checksum: Added.
     18        * platform/qt/fast/dom/HTMLProgressElement/progress-element-expected.png: Added.
     19        * platform/qt/fast/dom/HTMLProgressElement/progress-element-expected.txt: Added.
     20        * platform/qt/fast/dom/HTMLProgressElement/set-progress-properties-expected.txt: Added.
     21
    1222010-03-14  Oliver Hunt  <oliver@apple.com>
    223
  • trunk/LayoutTests/platform/gtk/Skipped

    r55926 r55980  
    58245824fast/events/remove-child-onscroll.html
    58255825
     5826# renderTheme is not ready to draw progress element
     5827fast/dom/HTMLProgressElement/progress-element.html
     5828fast/dom/HTMLProgressElement/set-progress-properties.html
     5829
    58265830# For some reason it fails on DRT, although works on GtkLauncher and other ports' DRT.
    58275831# https://bugs.webkit.org/show_bug.cgi?id=35984
  • trunk/LayoutTests/platform/mac/Skipped

    r55766 r55980  
    130130fast/forms/multiple-form-submission-protection-mouse.html
    131131
     132
     133# renderTheme is not ready to draw progress element
     134fast/dom/HTMLProgressElement/progress-element.html
     135fast/dom/HTMLProgressElement/set-progress-properties.html
     136
    132137# event.dataTransfer.setData('text/uri-list') not correctly implemented on Mac
    133138editing/pasteboard/dataTransfer-setData-getData.html
     139
  • trunk/WebCore/ChangeLog

    r55977 r55980  
     12010-03-14  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Support for HTMLProgressElement
     6        https://bugs.webkit.org/show_bug.cgi?id=35937
     7
     8        Added support for HTMLProgressElement.
     9        This implementation is enabled only for Qt, because only RenderThemeQt
     10        was modified to actually draw the progress element.
     11        The labels attribute of the progress element will be implemented in a
     12        separate patch.
     13
     14        Tests: fast/dom/HTMLProgressElement/progress-element.html
     15               fast/dom/HTMLProgressElement/set-progress-properties.html
     16
     17        * DerivedSources.cpp:
     18        * DerivedSources.make:
     19        * GNUmakefile.am:
     20        * WebCore.gypi:
     21        * WebCore.pri:
     22        * WebCore.pro:
     23        * WebCore.vcproj/WebCore.vcproj:
     24        * WebCore.xcodeproj/project.pbxproj:
     25        * css/CSSPrimitiveValueMappings.h:
     26        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
     27        * css/CSSSelector.cpp:
     28        (WebCore::CSSSelector::extractPseudoType):
     29        * css/CSSValueKeywords.in:
     30        * css/html.css:
     31        * html/HTMLElement.cpp:
     32        (WebCore::inlineTagList):
     33        * html/HTMLElementsAllInOne.cpp:
     34        * html/HTMLFormControlElement.cpp:
     35        (WebCore::HTMLFormControlElement::HTMLFormControlElement):
     36        * html/HTMLFormControlElement.h:
     37        * html/HTMLProgressElement.cpp: Added.
     38        (WebCore::HTMLProgressElement::HTMLProgressElement):
     39        (WebCore::HTMLProgressElement::create):
     40        (WebCore::HTMLProgressElement::createRenderer):
     41        (WebCore::HTMLProgressElement::formControlType):
     42        (WebCore::HTMLProgressElement::parseMappedAttribute):
     43        (WebCore::HTMLProgressElement::value):
     44        (WebCore::HTMLProgressElement::setValue):
     45        (WebCore::HTMLProgressElement::max):
     46        (WebCore::HTMLProgressElement::setMax):
     47        (WebCore::HTMLProgressElement::position):
     48        * html/HTMLProgressElement.h: Added.
     49        (WebCore::HTMLProgressElement::isOptionalFormControl):
     50        * html/HTMLProgressElement.idl: Added.
     51        * html/HTMLTagNames.in:
     52        * page/DOMWindow.idl:
     53        * platform/ThemeTypes.h:
     54        * platform/qt/RenderThemeQt.cpp:
     55        (WebCore::RenderThemeQt::adjustProgressBarStyle):
     56        (WebCore::RenderThemeQt::paintProgressBar):
     57        * platform/qt/RenderThemeQt.h:
     58        * rendering/RenderObject.h:
     59        (WebCore::RenderObject::isProgress):
     60        * rendering/RenderProgress.cpp: Added.
     61        (WebCore::RenderProgress::RenderProgress):
     62        (WebCore::RenderProgress::baselinePosition):
     63        (WebCore::RenderProgress::calcPrefWidths):
     64        (WebCore::RenderProgress::layout):
     65        (WebCore::RenderProgress::updateFromElement):
     66        * rendering/RenderProgress.h: Added.
     67        (WebCore::RenderProgress::renderName):
     68        (WebCore::RenderProgress::isProgress):
     69        (WebCore::toRenderProgress):
     70        * rendering/RenderTheme.cpp:
     71        (WebCore::RenderTheme::adjustStyle):
     72        (WebCore::RenderTheme::paint):
     73        (WebCore::RenderTheme::paintBorderOnly):
     74        (WebCore::RenderTheme::paintDecorations):
     75        (WebCore::RenderTheme::adjustProgressBarStyle):
     76        * rendering/RenderTheme.h:
     77        (WebCore::RenderTheme::paintProgressBar):
     78
    1792010-03-14  Oliver Hunt  <oliver@apple.com>
    280
  • trunk/WebCore/DerivedSources.cpp

    r55926 r55980  
    144144#include "JSHTMLParamElement.cpp"
    145145#include "JSHTMLPreElement.cpp"
     146#include "JSHTMLProgressElement.cpp"
    146147#include "JSHTMLQuoteElement.cpp"
    147148#include "JSHTMLScriptElement.cpp"
  • trunk/WebCore/DerivedSources.make

    r55926 r55980  
    186186    HTMLParamElement \
    187187    HTMLPreElement \
     188    HTMLProgressElement \
    188189    HTMLQuoteElement \
    189190    HTMLScriptElement \
     
    621622endif
    622623
     624ifeq ($(findstring ENABLE_PROGRESS_TAG,$(FEATURE_DEFINES)), ENABLE_PROGRESS_TAG)
     625    HTML_FLAGS := $(HTML_FLAGS) ENABLE_PROGRESS_TAG=1
     626endif
     627
    623628ifeq ($(findstring ENABLE_VIDEO,$(FEATURE_DEFINES)), ENABLE_VIDEO)
    624629    HTML_FLAGS := $(HTML_FLAGS) ENABLE_VIDEO=1
  • trunk/WebCore/GNUmakefile.am

    r55928 r55980  
    241241        WebCore/html/HTMLParamElement.idl \
    242242        WebCore/html/HTMLPreElement.idl \
     243        WebCore/html/HTMLProgressElement.idl \
    243244        WebCore/html/HTMLQuoteElement.idl \
    244245        WebCore/html/HTMLScriptElement.idl \
     
    11461147        WebCore/html/HTMLPreElement.cpp \
    11471148        WebCore/html/HTMLPreElement.h \
     1149        WebCore/html/HTMLProgressElement.cpp \
     1150        WebCore/html/HTMLProgressElement.h \
    11481151        WebCore/html/HTMLQuoteElement.cpp \
    11491152        WebCore/html/HTMLQuoteElement.h \
     
    18471850        WebCore/rendering/RenderPartObject.cpp \
    18481851        WebCore/rendering/RenderPartObject.h \
     1852        WebCore/rendering/RenderProgress.cpp \
     1853        WebCore/rendering/RenderProgress.h \
    18491854        WebCore/rendering/RenderReplaced.cpp \
    18501855        WebCore/rendering/RenderReplaced.h \
     
    21692174webcore_cppflags += \
    21702175        -DENABLE_DATAGRID=0
     2176
     2177# ----
     2178# HTML Progress Element - disable for now, since painting code is missing.
     2179# ----
     2180FEATURE_DEFINES += ENABLE_PROGRESS_TAG=0
     2181
     2182webcore_cppflags += \
     2183        -DENABLE_PROGRESS_TAG=0
    21712184
    21722185# ----
  • trunk/WebCore/WebCore.gypi

    r55928 r55980  
    164164            'html/HTMLParamElement.idl',
    165165            'html/HTMLPreElement.idl',
     166            'html/HTMLProgressElement.idl',
    166167            'html/HTMLQuoteElement.idl',
    167168            'html/HTMLScriptElement.idl',
     
    15581559            'html/HTMLPreElement.cpp',
    15591560            'html/HTMLPreElement.h',
     1561            'html/HTMLProgressElement.cpp',
     1562            'html/HTMLProgressElement.h',
    15601563            'html/HTMLQuoteElement.cpp',
    15611564            'html/HTMLQuoteElement.h',
     
    31003103            'rendering/RenderPath.cpp',
    31013104            'rendering/RenderPath.h',
     3105            'rendering/RenderProgress.cpp',
     3106            'rendering/RenderProgress.h',
    31023107            'rendering/RenderReplaced.cpp',
    31033108            'rendering/RenderReplaced.h',
  • trunk/WebCore/WebCore.pri

    r55976 r55980  
    5555!contains(DEFINES, ENABLE_RUBY=.): DEFINES += ENABLE_RUBY=1
    5656!contains(DEFINES, ENABLE_SANDBOX=.): DEFINES += ENABLE_SANDBOX=1
     57!contains(DEFINES, ENABLE_PROGRESS_TAG=.): DEFINES += ENABLE_PROGRESS_TAG=1
    5758!contains(DEFINES, ENABLE_BLOB_SLICE=.): DEFINES += ENABLE_BLOB_SLICE=0
    5859
     
    369370    html/HTMLParamElement.idl \
    370371    html/HTMLPreElement.idl \
     372    html/HTMLProgressElement.idl \
    371373    html/HTMLQuoteElement.idl \
    372374    html/HTMLScriptElement.idl \
  • trunk/WebCore/WebCore.pro

    r55976 r55980  
    667667    html/HTMLPlugInImageElement.cpp \
    668668    html/HTMLPreElement.cpp \
     669    html/HTMLProgressElement.cpp \
    669670    html/HTMLQuoteElement.cpp \
    670671    html/HTMLScriptElement.cpp \
     
    931932    rendering/RenderPart.cpp \
    932933    rendering/RenderPartObject.cpp \
     934    rendering/RenderProgress.cpp \
    933935    rendering/RenderReplaced.cpp \
    934936    rendering/RenderReplica.cpp \
     
    13691371    html/HTMLPlugInImageElement.h \
    13701372    html/HTMLPreElement.h \
     1373    html/HTMLProgressElement.h \
    13711374    html/HTMLQuoteElement.h \
    13721375    html/HTMLScriptElement.h \
     
    16751678    rendering/RenderPartObject.h \
    16761679    rendering/RenderPath.h \
     1680    rendering/RenderProgress.h \
    16771681    rendering/RenderReplaced.h \
    16781682    rendering/RenderReplica.h \
  • trunk/WebCore/WebCore.vcproj/WebCore.vcproj

    r55975 r55980  
    68866886                        </File>
    68876887                        <File
     6888                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHTMLProgressElement.cpp"
     6889                                >
     6890                                <FileConfiguration
     6891                                        Name="Debug|Win32"
     6892                                        ExcludedFromBuild="true"
     6893                                        >
     6894                                        <Tool
     6895                                                Name="VCCLCompilerTool"
     6896                                        />
     6897                                </FileConfiguration>
     6898                                <FileConfiguration
     6899                                        Name="Release|Win32"
     6900                                        ExcludedFromBuild="true"
     6901                                        >
     6902                                        <Tool
     6903                                                Name="VCCLCompilerTool"
     6904                                        />
     6905                                </FileConfiguration>
     6906                                <FileConfiguration
     6907                                        Name="Debug_Internal|Win32"
     6908                                        ExcludedFromBuild="true"
     6909                                        >
     6910                                        <Tool
     6911                                                Name="VCCLCompilerTool"
     6912                                        />
     6913                                </FileConfiguration>
     6914                                <FileConfiguration
     6915                                        Name="Debug_Cairo|Win32"
     6916                                        ExcludedFromBuild="true"
     6917                                        >
     6918                                        <Tool
     6919                                                Name="VCCLCompilerTool"
     6920                                        />
     6921                                </FileConfiguration>
     6922                                <FileConfiguration
     6923                                        Name="Release_Cairo|Win32"
     6924                                        ExcludedFromBuild="true"
     6925                                        >
     6926                                        <Tool
     6927                                                Name="VCCLCompilerTool"
     6928                                        />
     6929                                </FileConfiguration>
     6930                                <FileConfiguration
     6931                                        Name="Debug_All|Win32"
     6932                                        ExcludedFromBuild="true"
     6933                                        >
     6934                                        <Tool
     6935                                                Name="VCCLCompilerTool"
     6936                                        />
     6937                                </FileConfiguration>
     6938                        </File>
     6939                        <File
     6940                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHTMLProgressElement.h"
     6941                                >
     6942                        </File>
     6943                        <File
    68886944                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHTMLQuoteElement.cpp"
    68896945                                >
     
    2747027526                        </File>
    2747127527                        <File
     27528                                RelativePath="..\rendering\RenderProgress.cpp"
     27529                                >
     27530                        </File>
     27531                        <File
     27532                                RelativePath="..\rendering\RenderProgress.h"
     27533                                >
     27534                        </File>
     27535                        <File
    2747227536                                RelativePath="..\rendering\RenderReplaced.cpp"
    2747327537                                >
     
    3321133275                        <File
    3321233276                                RelativePath="..\html\HTMLPreElement.h"
     33277                                >
     33278                        </File>
     33279                        <File
     33280                                RelativePath="..\html\HTMLProgressElement.cpp"
     33281                                >
     33282                                <FileConfiguration
     33283                                        Name="Debug|Win32"
     33284                                        ExcludedFromBuild="true"
     33285                                        >
     33286                                        <Tool
     33287                                                Name="VCCLCompilerTool"
     33288                                        />
     33289                                </FileConfiguration>
     33290                                <FileConfiguration
     33291                                        Name="Release|Win32"
     33292                                        ExcludedFromBuild="true"
     33293                                        >
     33294                                        <Tool
     33295                                                Name="VCCLCompilerTool"
     33296                                        />
     33297                                </FileConfiguration>
     33298                                <FileConfiguration
     33299                                        Name="Debug_Internal|Win32"
     33300                                        ExcludedFromBuild="true"
     33301                                        >
     33302                                        <Tool
     33303                                                Name="VCCLCompilerTool"
     33304                                        />
     33305                                </FileConfiguration>
     33306                                <FileConfiguration
     33307                                        Name="Debug_Cairo|Win32"
     33308                                        ExcludedFromBuild="true"
     33309                                        >
     33310                                        <Tool
     33311                                                Name="VCCLCompilerTool"
     33312                                        />
     33313                                </FileConfiguration>
     33314                                <FileConfiguration
     33315                                        Name="Release_Cairo|Win32"
     33316                                        ExcludedFromBuild="true"
     33317                                        >
     33318                                        <Tool
     33319                                                Name="VCCLCompilerTool"
     33320                                        />
     33321                                </FileConfiguration>
     33322                                <FileConfiguration
     33323                                        Name="Debug_All|Win32"
     33324                                        ExcludedFromBuild="true"
     33325                                        >
     33326                                        <Tool
     33327                                                Name="VCCLCompilerTool"
     33328                                        />
     33329                                </FileConfiguration>
     33330                        </File>
     33331                        <File
     33332                                RelativePath="..\html\HTMLProgressElement.h"
    3321333333                                >
    3321433334                        </File>
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r55928 r55980  
    24862486                A17C81220F2A5CF7005DAAEB /* HTMLElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */; };
    24872487                A17C81230F2A5CF7005DAAEB /* HTMLElementFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */; };
     2488                A43BF5981149290A00C643CA /* HTMLProgressElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A43BF5961149290A00C643CA /* HTMLProgressElement.cpp */; };
     2489                A43BF5991149290A00C643CA /* HTMLProgressElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A43BF5971149290A00C643CA /* HTMLProgressElement.h */; };
     2490                A43BF59C1149292800C643CA /* RenderProgress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A43BF59A1149292800C643CA /* RenderProgress.cpp */; };
     2491                A43BF59D1149292800C643CA /* RenderProgress.h in Headers */ = {isa = PBXBuildFile; fileRef = A43BF59B1149292800C643CA /* RenderProgress.h */; };
    24882492                A718760E0B2A120100A16ECE /* DragActions.h in Headers */ = {isa = PBXBuildFile; fileRef = A718760D0B2A120100A16ECE /* DragActions.h */; settings = {ATTRIBUTES = (Private, ); }; };
    24892493                A71878900B2D04AC00A16ECE /* DragControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = A718788F0B2D04AC00A16ECE /* DragControllerMac.mm */; };
     
    78767880                A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLElementFactory.cpp; sourceTree = "<group>"; };
    78777881                A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLElementFactory.h; sourceTree = "<group>"; };
     7882                A43BF5961149290A00C643CA /* HTMLProgressElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLProgressElement.cpp; sourceTree = "<group>"; };
     7883                A43BF5971149290A00C643CA /* HTMLProgressElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLProgressElement.h; sourceTree = "<group>"; };
     7884                A43BF59A1149292800C643CA /* RenderProgress.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderProgress.cpp; sourceTree = "<group>"; };
     7885                A43BF59B1149292800C643CA /* RenderProgress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderProgress.h; sourceTree = "<group>"; };
    78787886                A718760D0B2A120100A16ECE /* DragActions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DragActions.h; sourceTree = "<group>"; };
    78797887                A718788F0B2D04AC00A16ECE /* DragControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DragControllerMac.mm; sourceTree = "<group>"; };
     
    1286612874                        isa = PBXGroup;
    1286712875                        children = (
     12876                                A43BF5961149290A00C643CA /* HTMLProgressElement.cpp */,
     12877                                A43BF5971149290A00C643CA /* HTMLProgressElement.h */,
    1286812878                                49484FAE102CF01E00187DD3 /* canvas */,
    1286912879                                2EAFAF0B10E2AF2D007ED3D6 /* Blob.cpp */,
     
    1566415674                        isa = PBXGroup;
    1566515675                        children = (
     15676                                A43BF59A1149292800C643CA /* RenderProgress.cpp */,
     15677                                A43BF59B1149292800C643CA /* RenderProgress.h */,
    1566615678                                BC8C8FAA0DDCD2F200B592F4 /* style */,
    1566715679                                A8CFF04B0A154F09000A4234 /* AutoTableLayout.cpp */,
     
    1865618668                                97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */,
    1865718669                                CE172E011136E8CE0062A533 /* ZoomMode.h in Headers */,
     18670                                A43BF5991149290A00C643CA /* HTMLProgressElement.h in Headers */,
     18671                                A43BF59D1149292800C643CA /* RenderProgress.h in Headers */,
    1865818672                        );
    1865918673                        runOnlyForDeploymentPostprocessing = 0;
     
    2085720871                                E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */,
    2085820872                                97DD4D860FDF4D6E00ECF9A4 /* XSSAuditor.cpp in Sources */,
     20873                                A43BF5981149290A00C643CA /* HTMLProgressElement.cpp in Sources */,
     20874                                A43BF59C1149292800C643CA /* RenderProgress.cpp in Sources */,
    2085920875                        );
    2086020876                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/WebCore/css/CSSPrimitiveValueMappings.h

    r54472 r55980  
    276276            m_value.ident = CSSValueOuterSpinButton;
    277277            break;
     278        case ProgressBarPart:
     279#if ENABLE(PROGRESS_BAR)
     280            m_value.ident = CSSValueProgressBar;
     281#endif
     282            break;
    278283        case SliderHorizontalPart:
    279284            m_value.ident = CSSValueSliderHorizontal;
  • trunk/WebCore/css/CSSSelector.cpp

    r52432 r55980  
    130130    DEFINE_STATIC_LOCAL(AtomicString, optional, ("optional"));
    131131    DEFINE_STATIC_LOCAL(AtomicString, outerSpinButton, ("-webkit-outer-spin-button"));
     132#if ENABLE(PROGRESS_BAR)
     133    DEFINE_STATIC_LOCAL(AtomicString, progressBar, ("-webkit-progress-bar"));
     134#endif
    132135    DEFINE_STATIC_LOCAL(AtomicString, required, ("required"));
    133136    DEFINE_STATIC_LOCAL(AtomicString, resizer, ("-webkit-resizer"));
  • trunk/WebCore/css/CSSValueKeywords.in

    r55576 r55980  
    583583menulist-textfield
    584584outer-spin-button
     585progress-bar
    585586slider-horizontal
    586587slider-vertical
  • trunk/WebCore/css/html.css

    r55710 r55980  
    516516}
    517517
     518/* progress */
     519
     520progress {
     521    -webkit-appearance: progress-bar;
     522    padding: initial;
     523    border: initial;
     524    margin: 2px;
     525}
     526
     527progress::-webkit-progress-bar {
     528    -webkit-appearance: progress-bar;
     529}
     530
    518531/* datagrid */
    519532
  • trunk/WebCore/html/HTMLElement.cpp

    r55710 r55980  
    855855        tagList.add(rtTag.localName().impl());
    856856        tagList.add(rubyTag.localName().impl());
     857#if ENABLE(PROGRESS_TAG)
     858        tagList.add(progressTag.localName().impl());
     859#endif
    857860    }
    858861    return &tagList;
  • trunk/WebCore/html/HTMLElementsAllInOne.cpp

    r44946 r55980  
    8888#include "HTMLPlugInImageElement.cpp"
    8989#include "HTMLPreElement.cpp"
     90#include "HTMLProgressElement.cpp"
    9091#include "HTMLQuoteElement.cpp"
    9192#include "HTMLScriptElement.cpp"
  • trunk/WebCore/html/HTMLFormControlElement.cpp

    r54274 r55980  
    5050using namespace HTMLNames;
    5151
    52 HTMLFormControlElement::HTMLFormControlElement(const QualifiedName& tagName, Document* doc, HTMLFormElement* f)
    53     : HTMLElement(tagName, doc)
     52HTMLFormControlElement::HTMLFormControlElement(const QualifiedName& tagName, Document* doc, HTMLFormElement* f, ConstructionType constructionType)
     53    : HTMLElement(tagName, doc, constructionType)
    5454    , m_form(f)
    5555    , m_hasName(false)
  • trunk/WebCore/html/HTMLFormControlElement.h

    r54274 r55980  
    3737class HTMLFormControlElement : public HTMLElement {
    3838public:
    39     HTMLFormControlElement(const QualifiedName& tagName, Document*, HTMLFormElement*);
     39    HTMLFormControlElement(const QualifiedName& tagName, Document*, HTMLFormElement*, ConstructionType = CreateElementZeroRefCount);
    4040    virtual ~HTMLFormControlElement();
    4141
  • trunk/WebCore/html/HTMLTagNames.in

    r55710 r55980  
    9191plaintext interfaceName=HTMLElement
    9292pre createWithNew
     93progress interfaceName=HTMLProgressElement, conditional=PROGRESS_TAG
    9394q interfaceName=HTMLQuoteElement, createWithNew
    9495rp interfaceName=HTMLElement, conditional=RUBY
  • trunk/WebCore/page/DOMWindow.idl

    r55926 r55980  
    421421        attribute HTMLParamElementConstructor HTMLParamElement;
    422422        attribute HTMLPreElementConstructor HTMLPreElement;
     423#if defined(ENABLE_PROGRESS_TAG) && ENABLE_PROGRESS_TAG
     424        attribute HTMLProgressElementConstructor HTMLProgressElement;
     425#endif
    423426        attribute HTMLQuoteElementConstructor HTMLQuoteElement;
    424427        attribute HTMLScriptElementConstructor HTMLScriptElement;
  • trunk/WebCore/platform/ThemeTypes.h

    r52432 r55980  
    5353    MediaSliderPart, MediaSliderThumbPart, MediaVolumeSliderContainerPart, MediaVolumeSliderPart, MediaVolumeSliderThumbPart,
    5454    MediaControlsBackgroundPart, MediaCurrentTimePart, MediaTimeRemainingPart,
    55     MenulistPart, MenulistButtonPart, MenulistTextPart, MenulistTextFieldPart, OuterSpinButtonPart,
     55    MenulistPart, MenulistButtonPart, MenulistTextPart, MenulistTextFieldPart, OuterSpinButtonPart, ProgressBarPart,
    5656    SliderHorizontalPart, SliderVerticalPart, SliderThumbHorizontalPart,
    5757    SliderThumbVerticalPart, CaretPart, SearchFieldPart, SearchFieldDecorationPart,
  • trunk/WebCore/platform/qt/RenderThemeQt.cpp

    r55079 r55980  
    4242#include "HTMLInputElement.h"
    4343#include "HTMLMediaElement.h"
     44#if ENABLE(PROGRESS_TAG)
     45#include "HTMLProgressElement.h"
     46#endif
    4447#include "HTMLNames.h"
    4548#include "NotImplemented.h"
     
    4750#include "QWebPageClient.h"
    4851#include "RenderBox.h"
     52#if ENABLE(PROGRESS_TAG)
     53#include "RenderProgress.h"
     54#endif
    4955#include "RenderSlider.h"
    5056#include "RenderTheme.h"
     
    6470#include <QStyleOptionButton>
    6571#include <QStyleOptionFrameV2>
     72#if ENABLE(PROGRESS_TAG)
     73#include <QStyleOptionProgressBarV2>
     74#endif
    6675#include <QStyleOptionSlider>
    6776#include <QWidget>
     
    632641    return false;
    633642}
     643
     644#if ENABLE(PROGRESS_TAG)
     645void RenderThemeQt::adjustProgressBarStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
     646{
     647    style->setBoxShadow(0);
     648}
     649
     650bool RenderThemeQt::paintProgressBar(RenderObject* o, const RenderObject::PaintInfo& pi, const IntRect& r)
     651{
     652    StylePainter p(this, pi);
     653    if (!p.isValid())
     654       return true;
     655
     656    QStyleOptionProgressBarV2 option;
     657    if (p.widget)
     658       option.initFrom(p.widget);
     659    initializeCommonQStyleOptions(option, o);
     660
     661    RenderProgress* renderProgress = toRenderProgress(o);
     662    HTMLProgressElement* element = static_cast<HTMLProgressElement*>(renderProgress->node());
     663    option.rect = r;
     664    option.maximum = element->max();
     665    option.minimum = 0;
     666    option.progress = element->value();
     667
     668    const QPoint topLeft = r.topLeft();
     669    p.painter->translate(topLeft);
     670    option.rect.moveTo(QPoint(0, 0));
     671    option.rect.setSize(r.size());
     672
     673    p.drawControl(QStyle::CE_ProgressBar, option);
     674    p.painter->translate(-topLeft);
     675
     676    return false;
     677}
     678#endif
    634679
    635680bool RenderThemeQt::paintSliderTrack(RenderObject* o, const RenderObject::PaintInfo& pi,
  • trunk/WebCore/platform/qt/RenderThemeQt.h

    r55079 r55980  
    101101    virtual bool paintMenuListButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
    102102    virtual void adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
     103
     104#if ENABLE(PROGRESS_TAG)
     105    virtual void adjustProgressBarStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
     106    virtual bool paintProgressBar(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
     107#endif
    103108
    104109    virtual bool paintSliderTrack(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
  • trunk/WebCore/rendering/RenderObject.h

    r55065 r55980  
    278278    virtual bool isMedia() const { return false; }
    279279    virtual bool isMenuList() const { return false; }
     280#if ENABLE(PROGRESS_TAG)
     281    virtual bool isProgress() const { return false; }
     282#endif
    280283    virtual bool isRenderBlock() const { return false; }
    281284    virtual bool isRenderButton() const { return false; }
  • trunk/WebCore/rendering/RenderTheme.cpp

    r54326 r55980  
    210210        case SearchFieldResultsButtonPart:
    211211            return adjustSearchFieldResultsButtonStyle(selector, style, e);
     212#if ENABLE(PROGRESS_TAG)
     213        case ProgressBarPart:
     214            return adjustProgressBarStyle(selector, style, e);
     215#endif
    212216        default:
    213217            break;
     
    268272        case MenulistPart:
    269273            return paintMenuList(o, paintInfo, r);
     274#if ENABLE(PROGRESS_TAG)
     275        case ProgressBarPart:
     276            return paintProgressBar(o, paintInfo, r);
     277#endif
    270278        case SliderHorizontalPart:
    271279        case SliderVerticalPart:
     
    358366        case ButtonPart:
    359367        case MenulistPart:
     368#if ENABLE(PROGRESS_TAG)
     369        case ProgressBarPart:
     370#endif
    360371        case SliderHorizontalPart:
    361372        case SliderVerticalPart:
     
    393404        case ButtonPart:
    394405        case MenulistPart:
     406#if ENABLE(PROGRESS_TAG)
     407        case ProgressBarPart:
     408#endif
    395409        case SliderHorizontalPart:
    396410        case SliderVerticalPart:
     
    825839{
    826840}
     841
     842#if ENABLE(PROGRESS_TAG)
     843void RenderTheme::adjustProgressBarStyle(CSSStyleSelector*, RenderStyle*, Element*) const
     844{
     845}
     846#endif
    827847
    828848void RenderTheme::adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const
  • trunk/WebCore/rendering/RenderTheme.h

    r54326 r55980  
    227227    virtual void adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
    228228    virtual bool paintMenuListButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
     229
     230#if ENABLE(PROGRESS_TAG)
     231    virtual void adjustProgressBarStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
     232    virtual bool paintProgressBar(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
     233#endif
    229234
    230235    virtual void adjustSliderTrackStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
Note: See TracChangeset for help on using the changeset viewer.