Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
23ae6e4e
Commit
23ae6e4e
authored
Jan 17, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Treat doctype nodes as comment nodes.
parent
292e2359
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
htmlnode.c
dlls/mshtml/htmlnode.c
+3
-0
dom.c
dlls/mshtml/tests/dom.c
+23
-0
No files found.
dlls/mshtml/htmlnode.c
View file @
23ae6e4e
...
...
@@ -387,6 +387,7 @@ static HRESULT WINAPI HTMLDOMNode_get_nodeType(IHTMLDOMNode *iface, LONG *p)
*
p
=
3
;
break
;
case
COMMENT_NODE
:
case
DOCUMENT_TYPE_NODE
:
*
p
=
8
;
break
;
case
DOCUMENT_NODE
:
...
...
@@ -1103,6 +1104,8 @@ static HRESULT create_node(HTMLDocumentNode *doc, nsIDOMNode *nsnode, HTMLDOMNod
if
(
FAILED
(
hres
))
return
hres
;
break
;
/* doctype nodes are represented as comment nodes (at least in quirks mode) */
case
DOCUMENT_TYPE_NODE
:
case
COMMENT_NODE
:
{
HTMLElement
*
comment
;
hres
=
HTMLCommentElement_Create
(
doc
,
nsnode
,
&
comment
);
...
...
dlls/mshtml/tests/dom.c
View file @
23ae6e4e
...
...
@@ -85,6 +85,10 @@ static const char emptydiv_str[] =
static
const
char
noscript_str
[]
=
"<html><head><title>noscript test</title><noscript><style>.body { margin-right: 0px; }</style></noscript></head>"
"<body><noscript><div>test</div></noscript></body></html>"
;
static
const
char
doctype_str
[]
=
"<!DOCTYPE html>"
"<html><head><title>emptydiv test</title></head>"
"<body><div id=
\"
divid
\"
></div></body></html>"
;
static
WCHAR
characterW
[]
=
{
'c'
,
'h'
,
'a'
,
'r'
,
'a'
,
'c'
,
't'
,
'e'
,
'r'
,
0
};
static
WCHAR
texteditW
[]
=
{
't'
,
'e'
,
'x'
,
't'
,
'e'
,
'd'
,
'i'
,
't'
,
0
};
...
...
@@ -6558,6 +6562,24 @@ static void test_noscript(IHTMLDocument2 *doc)
IHTMLElement_Release
(
body
);
}
static
void
test_doctype
(
IHTMLDocument2
*
doc
)
{
IHTMLDocument2
*
doc_node
;
IHTMLDOMNode
*
doctype
;
int
type
;
doc_node
=
get_doc_node
(
doc
);
doctype
=
get_first_child
((
IUnknown
*
)
doc_node
);
IHTMLDocument2_Release
(
doc_node
);
type
=
get_node_type
((
IUnknown
*
)
doctype
);
ok
(
type
==
8
,
"type = %d
\n
"
,
type
);
test_comment_text
((
IUnknown
*
)
doctype
,
"<!DOCTYPE html>"
);
test_elem_type
((
IUnknown
*
)
doctype
,
ET_COMMENT
);
IHTMLDOMNode_Release
(
doctype
);
}
static
void
test_null_write
(
IHTMLDocument2
*
doc
)
{
HRESULT
hres
;
...
...
@@ -7106,6 +7128,7 @@ START_TEST(dom)
run_domtest
(
frameset_str
,
test_frameset
);
run_domtest
(
emptydiv_str
,
test_docfrag
);
run_domtest
(
doc_blank
,
test_replacechild_elems
);
run_domtest
(
doctype_str
,
test_doctype
);
CoUninitialize
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment