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
cb776f7d
Commit
cb776f7d
authored
Sep 26, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 27, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added get_compatMode implementation.
parent
9ba65105
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
2 deletions
+91
-2
htmldoc5.c
dlls/mshtml/htmldoc5.c
+28
-2
nsiface.idl
dlls/mshtml/nsiface.idl
+44
-0
dom.c
dlls/mshtml/tests/dom.c
+19
-0
No files found.
dlls/mshtml/htmldoc5.c
View file @
cb776f7d
...
...
@@ -220,8 +220,34 @@ static HRESULT WINAPI HTMLDocument5_get_onbeforedeactivate(IHTMLDocument5 *iface
static
HRESULT
WINAPI
HTMLDocument5_get_compatMode
(
IHTMLDocument5
*
iface
,
BSTR
*
p
)
{
HTMLDocument
*
This
=
HTMLDOC5_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsIDOMDocument
*
nsdoc
;
nsIDOMNSHTMLDocument
*
nshtmldoc
;
nsAString
mode_str
;
const
PRUnichar
*
mode
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsres
=
nsIWebNavigation_GetDocument
(
This
->
nscontainer
->
navigation
,
&
nsdoc
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"GetDocument failed: %08x
\n
"
,
nsres
);
nsres
=
nsIDOMDocument_QueryInterface
(
nsdoc
,
&
IID_nsIDOMNSHTMLDocument
,
(
void
**
)
&
nshtmldoc
);
nsIDOMDocument_Release
(
nsdoc
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMNSHTMLDocument: %08x
\n
"
,
nsres
);
return
S_OK
;
}
nsAString_Init
(
&
mode_str
,
NULL
);
nsIDOMNSHTMLDocument_GetCompatMode
(
nshtmldoc
,
&
mode_str
);
nsIDOMNSHTMLDocument_Release
(
nshtmldoc
);
nsAString_GetData
(
&
mode_str
,
&
mode
,
NULL
);
*
p
=
SysAllocString
(
mode
);
nsAString_Finish
(
&
mode_str
);
return
S_OK
;
}
#undef HTMLDOC5_THIS
...
...
dlls/mshtml/nsiface.idl
View file @
cb776f7d
...
...
@@ -836,6 +836,50 @@ interface nsIDOMHTMLDocument : nsIDOMDocument
[
object,
uuid(79beb289-3644-4b54-9432-9fb993945629)
/* NOT_FROZEN */
]
interface nsIDOMNSHTMLDocument : nsISupports
{
nsresult GetWidth(PRInt32 *aWidth);
nsresult GetHeight(PRInt32 *aHeight);
nsresult GetAlinkColor(nsAString *aAlinkColor);
nsresult SetAlinkColor(const nsAString *aAlinkColor);
nsresult GetLinkColor(nsAString *aLinkColor);
nsresult SetLinkColor(const nsAString *aLinkColor);
nsresult GetVlinkColor(nsAString *aVlinkColor);
nsresult SetVlinkColor(const nsAString *aVlinkColor);
nsresult GetBgColor(nsAString *aBgColor);
nsresult SetBgColor(const nsAString *aBgColor);
nsresult GetFgColor(nsAString *aFgColor);
nsresult SetFgColor(const nsAString *aFgColor);
nsresult GetDomain(nsAString *aDomain);
nsresult SetDomain(const nsAString *aDomain);
nsresult GetEmbeds(nsIDOMHTMLCollection **aEmbeds);
nsresult GetSelection(nsAString *_retval);
nsresult Open(nsIDOMDocument **_retval);
nsresult Write();
nsresult Writeln();
nsresult Clear();
nsresult CaptureEvents(PRInt32 eventFlags);
nsresult ReleaseEvents(PRInt32 eventFlags);
nsresult RouteEvent(nsIDOMEvent *evt);
nsresult GetCompatMode(nsAString *aCompatMode);
nsresult GetPlugins(nsIDOMHTMLCollection **aPlugins);
nsresult GetDesignMode(nsAString *aDesignMode);
nsresult SetDesignMode(const nsAString *aDesignMode);
nsresult ExecCommand(const nsAString *commandID, PRBool doShowUI, const nsAString *value, PRBool *_retval);
nsresult ExecCommandShowHelp(const nsAString *commandID, PRBool *_retval);
nsresult QueryCommandEnabled(const nsAString *commandID, PRBool *_retval);
nsresult QueryCommandIndeterm(const nsAString *commandID, PRBool *_retval);
nsresult QueryCommandState(const nsAString *commandID, PRBool *_retval);
nsresult QueryCommandSupported(const nsAString *commandID, PRBool *_retval);
nsresult QueryCommandText(const nsAString *commandID, nsAString *_retval);
nsresult QueryCommandValue(const nsAString *commandID, nsAString *_retval);
}
[
object,
uuid(3d9f4973-dd2e-48f5-b5f7-2634e09eadd9)
/* FROZEN */
]
...
...
dlls/mshtml/tests/dom.c
View file @
cb776f7d
...
...
@@ -347,6 +347,24 @@ static void test_txtrange(IHTMLDocument2 *doc)
IHTMLTxtRange_Release
(
body_range
);
}
static
void
test_compatmode
(
IHTMLDocument2
*
doc
)
{
IHTMLDocument5
*
doc5
;
BSTR
mode
;
HRESULT
hres
;
hres
=
IHTMLDocument2_QueryInterface
(
doc
,
&
IID_IHTMLDocument5
,
(
void
**
)
&
doc5
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLDocument5 interface: %08x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
return
;
hres
=
IHTMLDocument5_get_compatMode
(
doc5
,
&
mode
);
IHTMLDocument5_Release
(
doc5
);
ok
(
hres
==
S_OK
,
"get_compatMode failed: %08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
mode
,
"BackCompat"
),
"compatMode=%s
\n
"
,
dbgstr_w
(
mode
));
SysFreeString
(
mode
);
}
static
void
test_default_style
(
IHTMLStyle
*
style
)
{
VARIANT_BOOL
b
;
...
...
@@ -431,6 +449,7 @@ static void test_defaults(IHTMLDocument2 *doc)
ok
(
hres
==
S_OK
,
"get_style failed: %08x
\n
"
,
hres
);
test_default_style
(
style
);
test_compatmode
(
doc
);
IHTMLStyle_Release
(
style
);
...
...
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