/[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.27 by wakaba, Mon Dec 31 13:46:25 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        ___query_selector_all => 'Message::DOM::SelectorsAPI',
127    }->{$method_name}) {    }->{$method_name}) {
128      eval qq{ require $module_name } or die $@;      eval qq{ require $module_name } or die $@;
129      goto &{ $AUTOLOAD };      goto &{ $AUTOLOAD };
# Line 209  sub adopt_node ($$) { Line 217  sub adopt_node ($$) {
217          -object => $self,          -object => $self,
218          -type => 'NOT_SUPPORTED_ERR',          -type => 'NOT_SUPPORTED_ERR',
219          -subtype => 'ADOPT_NODE_TYPE_NOT_SUPPORTED_ERR';          -subtype => 'ADOPT_NODE_TYPE_NOT_SUPPORTED_ERR';
     ## ISSUE: Define ELEMENT_TYPE_DEFINITION_NODE and ATTRIBUTE_DEFINITION_NODE  
220    }    }
221    
222    my @change_od;    my @change_od;
# Line 809  sub replace_child ($$) { Line 816  sub replace_child ($$) {
816  ## NOTE: A manakai extension.  ## NOTE: A manakai extension.
817  sub all_declarations_processed ($;$);  sub all_declarations_processed ($;$);
818    
819    ## TODO: documentation
820    sub manakai_charset ($;$);
821    
822  sub doctype ($) {  sub doctype ($) {
823    my $self = $_[0];    my $self = $_[0];
824    for (@{$self->child_nodes}) {    for (@{$self->child_nodes}) {
# Line 861  sub manakai_entity_base_uri ($;$) { Line 871  sub manakai_entity_base_uri ($;$) {
871    }    }
872  } # manakai_entity_base_uri  } # manakai_entity_base_uri
873    
874    ## TODO: documentation
875    sub manakai_has_bom ($;$);
876    
877  sub input_encoding ($;$);  sub input_encoding ($;$);
878    
879  sub strict_error_checking ($;$) {  sub strict_error_checking ($;$) {
# Line 1121  sub inner_html ($;$) { Line 1134  sub inner_html ($;$) {
1134        return unless defined wantarray;        return unless defined wantarray;
1135      }      }
1136    
1137      return ${ Whatpm::HTML->get_inner_html ($self) };      require Whatpm::HTML::Serializer;
1138        return ${ Whatpm::HTML::Serializer->get_inner_html ($self) };
1139    } else {    } else {
1140      if (@_ > 1) {      if (@_ > 1) {
1141        ## Step 1        ## Step 1
# Line 1181  sub manakai_is_html ($;$) { Line 1195  sub manakai_is_html ($;$) {
1195  package Message::IF::Document;  package Message::IF::Document;
1196  package Message::IF::DocumentTraversal;  package Message::IF::DocumentTraversal;
1197  package Message::IF::DocumentXDoctype;  package Message::IF::DocumentXDoctype;
1198    package Message::IF::DocumentSelector;
1199  package Message::IF::HTMLDocument;  package Message::IF::HTMLDocument;
1200    
1201  package Message::DOM::DOMImplementation;  package Message::DOM::DOMImplementation;

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24