/[suikacvs]/messaging/manakai/lib/Message/DOM/Document.pm
Suika

Diff of /messaging/manakai/lib/Message/DOM/Document.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.21 by wakaba, Sun Jul 29 08:31:14 2007 UTC revision 1.26 by wakaba, Sat Dec 22 06:29:32 2007 UTC
# Line 5  use strict; Line 5  use strict;
5  our $VERSION=do{my @r=(q$Revision$=~/\d+/g);sprintf "%d."."%02d" x $#r,@r};  our $VERSION=do{my @r=(q$Revision$=~/\d+/g);sprintf "%d."."%02d" x $#r,@r};
6  push our @ISA, 'Message::DOM::Node', 'Message::IF::Document',  push our @ISA, 'Message::DOM::Node', 'Message::IF::Document',
7      'Message::IF::DocumentTraversal', 'Message::IF::DocumentXDoctype',      'Message::IF::DocumentTraversal', 'Message::IF::DocumentXDoctype',
8        'Message::IF::DocumentSelector', # MUST in Selectors API spec
9      'Message::IF::HTMLDocument';      'Message::IF::HTMLDocument';
10  require Message::DOM::Node;  require Message::DOM::Node;
11  use Char::Class::XML  use Char::Class::XML
# Line 49  sub AUTOLOAD { Line 50  sub AUTOLOAD {
50      goto &{ $AUTOLOAD };      goto &{ $AUTOLOAD };
51    } elsif ({    } elsif ({
52      ## Read-write attributes (DOMString, trivial accessors)      ## Read-write attributes (DOMString, trivial accessors)
53        manakai_charset => 1,
54      document_uri => 1,      document_uri => 1,
55      input_encoding => 1,      input_encoding => 1,
56    }->{$method_name}) {    }->{$method_name}) {
# Line 76  sub AUTOLOAD { Line 78  sub AUTOLOAD {
78    } elsif ({    } elsif ({
79      ## Read-write attributes (boolean, trivial accessors)      ## Read-write attributes (boolean, trivial accessors)
80      all_declarations_processed => 1,      all_declarations_processed => 1,
81        manakai_has_bom => 1,
82    }->{$method_name}) {    }->{$method_name}) {
83      no strict 'refs';      no strict 'refs';
84      eval qq{      eval qq{
# Line 99  sub AUTOLOAD { Line 102  sub AUTOLOAD {
102      };      };
103      goto &{ $AUTOLOAD };      goto &{ $AUTOLOAD };
104    } elsif (my $module_name = {    } elsif (my $module_name = {
105        can_dispatch => 'Message::DOM::EventTargetNode',
106      create_attribute => 'Message::DOM::Attr',      create_attribute => 'Message::DOM::Attr',
107      create_attribute_ns => 'Message::DOM::Attr',      create_attribute_ns => 'Message::DOM::Attr',
108      create_attribute_definition => 'Message::DOM::AttributeDefinition',      create_attribute_definition => 'Message::DOM::AttributeDefinition',
# Line 110  sub AUTOLOAD { Line 114  sub AUTOLOAD {
114      create_element_ns => 'Message::DOM::Element',      create_element_ns => 'Message::DOM::Element',
115      create_element_type_definition => 'Message::DOM::ElementTypeDefinition',      create_element_type_definition => 'Message::DOM::ElementTypeDefinition',
116      create_entity_reference => 'Message::DOM::EntityReference',      create_entity_reference => 'Message::DOM::EntityReference',
117        create_event => 'Message::DOM::EventTargetNode',
118      create_general_entity => 'Message::DOM::Entity',      create_general_entity => 'Message::DOM::Entity',
119      create_notation => 'Message::DOM::Notation',      create_notation => 'Message::DOM::Notation',
120      create_processing_instruction => 'Message::DOM::ProcessingInstruction',      create_processing_instruction => 'Message::DOM::ProcessingInstruction',
121      manakai_create_serial_walker => 'Message::DOM::SerialWalker',      manakai_create_serial_walker => 'Message::DOM::SerialWalker',
122      create_text_node => 'Message::DOM::Text',      create_text_node => 'Message::DOM::Text',
123      create_tree_walker => 'Message::DOM::TreeWalker',      create_tree_walker => 'Message::DOM::TreeWalker',
124        query_selector => 'Message::DOM::SelectorsAPI',
125        query_selector_all => 'Message::DOM::SelectorsAPI',
126    }->{$method_name}) {    }->{$method_name}) {
127      eval qq{ require $module_name } or die $@;      eval qq{ require $module_name } or die $@;
128      goto &{ $AUTOLOAD };      goto &{ $AUTOLOAD };
# Line 209  sub adopt_node ($$) { Line 216  sub adopt_node ($$) {
216          -object => $self,          -object => $self,
217          -type => 'NOT_SUPPORTED_ERR',          -type => 'NOT_SUPPORTED_ERR',
218          -subtype => 'ADOPT_NODE_TYPE_NOT_SUPPORTED_ERR';          -subtype => 'ADOPT_NODE_TYPE_NOT_SUPPORTED_ERR';
     ## ISSUE: Define ELEMENT_TYPE_DEFINITION_NODE and ATTRIBUTE_DEFINITION_NODE  
219    }    }
220    
221    my @change_od;    my @change_od;
# Line 809  sub replace_child ($$) { Line 815  sub replace_child ($$) {
815  ## NOTE: A manakai extension.  ## NOTE: A manakai extension.
816  sub all_declarations_processed ($;$);  sub all_declarations_processed ($;$);
817    
818    ## TODO: documentation
819    sub manakai_charset ($;$);
820    
821  sub doctype ($) {  sub doctype ($) {
822    my $self = $_[0];    my $self = $_[0];
823    for (@{$self->child_nodes}) {    for (@{$self->child_nodes}) {
# Line 861  sub manakai_entity_base_uri ($;$) { Line 870  sub manakai_entity_base_uri ($;$) {
870    }    }
871  } # manakai_entity_base_uri  } # manakai_entity_base_uri
872    
873    ## TODO: documentation
874    sub manakai_has_bom ($;$);
875    
876  sub input_encoding ($;$);  sub input_encoding ($;$);
877    
878  sub strict_error_checking ($;$) {  sub strict_error_checking ($;$) {
# Line 1121  sub inner_html ($;$) { Line 1133  sub inner_html ($;$) {
1133        return unless defined wantarray;        return unless defined wantarray;
1134      }      }
1135    
1136      return ${ Whatpm::HTML->get_inner_html ($self) };      require Whatpm::HTML::Serializer;
1137        return ${ Whatpm::HTML::Serializer->get_inner_html ($self) };
1138    } else {    } else {
1139      if (@_ > 1) {      if (@_ > 1) {
1140        ## Step 1        ## Step 1
# Line 1181  sub manakai_is_html ($;$) { Line 1194  sub manakai_is_html ($;$) {
1194  package Message::IF::Document;  package Message::IF::Document;
1195  package Message::IF::DocumentTraversal;  package Message::IF::DocumentTraversal;
1196  package Message::IF::DocumentXDoctype;  package Message::IF::DocumentXDoctype;
1197    package Message::IF::DocumentSelector;
1198  package Message::IF::HTMLDocument;  package Message::IF::HTMLDocument;
1199    
1200  package Message::DOM::DOMImplementation;  package Message::DOM::DOMImplementation;

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.26

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24