Changeset 35325 in webkit


Ignore:
Timestamp:
Jul 24, 2008 7:19:35 AM (16 years ago)
Author:
jchaffraix@webkit.org
Message:

2008-07-24 Julien Chaffraix <jchaffraix@webkit.org>

Reviewed by Eric.

Bug 20029: [XBL] Add more tags

Add <binding> and <template> classes.
Add <div> tag.

The two classes are stubs for the moment.

These tags are required to have a simple XBL example
running.


XBLElement now inherits from StyledElement as <div>
is a placeholder for CSS style information.

  • WebCore.xcodeproj/project.pbxproj:
  • dom/make_names.pl: Add 'generateNameOnly' attribute used for <div> as we do not want to add a specialized class.


  • xbl/XBLBindingElement.h: Added. (WebCore::XBLBindingElement::XBLBindingElement):
  • xbl/XBLElement.h: (WebCore::XBLElement::XBLElement): Now XBLElement inherits from styledElement.
  • xbl/XBLTemplateElement.h: Added. (WebCore::XBLTemplateElement::XBLTemplateElement):
  • xbl/xbltags.in: Add tags.
Location:
branches/XBL2/WebCore
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/XBL2/WebCore/ChangeLog

    r35324 r35325  
     12008-07-24  Julien Chaffraix  <jchaffraix@webkit.org>
     2
     3        Reviewed by Eric.
     4
     5        Bug 20029: [XBL] Add more tags
     6
     7        Add <binding> and <template> classes.
     8        Add <div> tag.
     9
     10        The two classes are stubs for the moment.
     11
     12        These tags are required to have a simple XBL example
     13        running.
     14       
     15        XBLElement now inherits from StyledElement as <div>
     16        is a placeholder for CSS style information.
     17
     18        * WebCore.xcodeproj/project.pbxproj:
     19        * dom/make_names.pl: Add 'generateNameOnly' attribute
     20        used for <div> as we do not want to add a specialized
     21        class.
     22
     23        * xbl/XBLBindingElement.h: Added.
     24        (WebCore::XBLBindingElement::XBLBindingElement):
     25        * xbl/XBLElement.h:
     26        (WebCore::XBLElement::XBLElement): Now XBLElement
     27        inherits from styledElement.
     28
     29        * xbl/XBLTemplateElement.h: Added.
     30        (WebCore::XBLTemplateElement::XBLTemplateElement):
     31        * xbl/xbltags.in: Add tags.
     32
    1332008-07-24  Julien Chaffraix  <jchaffraix@webkit.org>
    234
  • branches/XBL2/WebCore/WebCore.xcodeproj/project.pbxproj

    r35324 r35325  
    18271827                A10D20A70E386DCF007E500B /* XBLBindingManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A10D20A40E386DCF007E500B /* XBLBindingManager.cpp */; };
    18281828                A10D20A80E386DCF007E500B /* XBLBindingManager.h in Headers */ = {isa = PBXBuildFile; fileRef = A10D20A50E386DCF007E500B /* XBLBindingManager.h */; };
     1829                A10D21400E389A0D007E500B /* XBLBindingElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A10D213F0E389A0D007E500B /* XBLBindingElement.h */; };
     1830                A10D21420E389A18007E500B /* XBLTemplateElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A10D21410E389A18007E500B /* XBLTemplateElement.h */; };
    18291831                A1172D6E0E0C539E00175C88 /* XBLDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = A1172D6D0E0C539E00175C88 /* XBLDocument.h */; };
    18301832                A718760E0B2A120100A16ECE /* DragActions.h in Headers */ = {isa = PBXBuildFile; fileRef = A718760D0B2A120100A16ECE /* DragActions.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    62996301                A10D20A40E386DCF007E500B /* XBLBindingManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XBLBindingManager.cpp; sourceTree = "<group>"; };
    63006302                A10D20A50E386DCF007E500B /* XBLBindingManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XBLBindingManager.h; sourceTree = "<group>"; };
     6303                A10D213F0E389A0D007E500B /* XBLBindingElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XBLBindingElement.h; sourceTree = "<group>"; };
     6304                A10D21410E389A18007E500B /* XBLTemplateElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XBLTemplateElement.h; sourceTree = "<group>"; };
    63016305                A1172D6D0E0C539E00175C88 /* XBLDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XBLDocument.h; sourceTree = "<group>"; };
    63026306                A718760D0B2A120100A16ECE /* DragActions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DragActions.h; sourceTree = "<group>"; };
     
    1330013304                        isa = PBXGroup;
    1330113305                        children = (
     13306                                A10D21410E389A18007E500B /* XBLTemplateElement.h */,
     13307                                A10D213F0E389A0D007E500B /* XBLBindingElement.h */,
    1330213308                                A10D20A30E386DCF007E500B /* XBLBinding.h */,
    1330313309                                A10D20A40E386DCF007E500B /* XBLBindingManager.cpp */,
     
    1532015326                                A10D20A60E386DCF007E500B /* XBLBinding.h in Headers */,
    1532115327                                A10D20A80E386DCF007E500B /* XBLBindingManager.h in Headers */,
     15328                                A10D21400E389A0D007E500B /* XBLBindingElement.h in Headers */,
     15329                                A10D21420E389A18007E500B /* XBLTemplateElement.h in Headers */,
    1532215330                        );
    1532315331                        runOnlyForDeploymentPostprocessing = 0;
  • branches/XBL2/WebCore/dom/make_names.pl

    r34875 r35325  
    8787{
    8888    return ('upperCase' => upperCaseName($_[0]),
    89             'applyAudioHack' => 0);
     89            'applyAudioHack' => 0,
     90            'generateNameOnly' => 0);
    9091}
    9192
     
    237238    print F "#if $parameters{'guardFactoryWith'}\n" if $parameters{'guardFactoryWith'};
    238239    for my $name (sort keys %names) {
     240        next if ($names{$name}{'generateNameOnly'});
     241
    239242        my $ucName = $names{$name}{"upperCase"};
    240243
     
    250253{
    251254    my ($F, $namesRef) = @_;
    252     for my $name (sort keys %$namesRef) {
     255    my %names = %$namesRef;
     256    for my $name (sort keys %names) {
     257        next if ($names{$name}{'generateNameOnly'});
     258       
    253259        print F "    gFunctionMap->set(${name}Tag.localName().impl(), ${name}Constructor);\n";
    254260    }
     
    460466    my %names = %$namesRef;
    461467    for my $name (sort keys %names) {
    462         next if ($shouldSkipCustomMappings && hasCustomMapping($name));
     468        next if ($names{$name}{'generateNameOnly'} || ($shouldSkipCustomMappings && hasCustomMapping($name)));
    463469
    464470        my $ucName = $names{$name}{"upperCase"};
     
    722728    for my $name (sort keys %names) {
    723729        # Custom mapping do not need a JS wrapper
    724         next if (hasCustomMapping($name));
     730        next if ($names{$name}{'generateNameOnly'} || hasCustomMapping($name));
    725731
    726732        my $ucName = $names{$name}{"upperCase"};
     
    793799
    794800    for my $tag (sort keys %tags) {
    795         next if (hasCustomMapping($tag));
     801        next if ($tags{$tag}{'generateNameOnly'} || hasCustomMapping($tag));
    796802
    797803        my $ucTag = $tags{$tag}{"upperCase"};
  • branches/XBL2/WebCore/xbl/XBLElement.h

    r35033 r35325  
    3030
    3131#include "config.h"
    32 #include "Element.h"
     32#include "StyledElement.h"
    3333
    3434namespace WebCore {
    3535
    36     class XBLElement : public Element {
     36    class XBLElement : public StyledElement {
    3737    public:
    3838        XBLElement(const WebCore::QualifiedName& qName, WebCore::Document* doc)
    39             : Element(qName, doc)
     39            : StyledElement(qName, doc)
    4040        {
    4141        }
  • branches/XBL2/WebCore/xbl/xbltags.in

    r34875 r35325  
    11<tags namespace="XBL" cppNamespace="WebCore" namespaceURI="http://www.w3.org/ns/xbl" generateFactory="1" guardFactoryWith="ENABLE(XBL)">
     2<binding/>
     3<div generateNameOnly="1"/>
     4<template/>
    25<xbl upperCase="XBL"/>
    36</tags>
Note: See TracChangeset for help on using the changeset viewer.