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
5a9980e1
Commit
5a9980e1
authored
Nov 17, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 17, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Store nsIDOMCSSStyleDeclaration in HTMLStyle.
parent
5b1af5b7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
4 deletions
+58
-4
htmlelem.c
dlls/mshtml/htmlelem.c
+21
-2
htmlstyle.c
dlls/mshtml/htmlstyle.c
+6
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-1
nsiface.idl
dlls/mshtml/nsiface.idl
+30
-0
No files found.
dlls/mshtml/htmlelem.c
View file @
5a9980e1
...
...
@@ -243,11 +243,30 @@ static HRESULT WINAPI HTMLElement_get_parentElement(IHTMLElement *iface, IHTMLEl
static
HRESULT
WINAPI
HTMLElement_get_style
(
IHTMLElement
*
iface
,
IHTMLStyle
**
p
)
{
HTMLElement
*
This
=
HTMLELEM_THIS
(
iface
);
nsIDOMElementCSSInlineStyle
*
nselemstyle
;
nsIDOMCSSStyleDeclaration
*
nsstyle
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
/* FIXME: Store IHTMLStyle instead of creating a new instance in every call. */
*
p
=
HTMLStyle_Create
();
nsres
=
nsIDOMHTMLElement_QueryInterface
(
This
->
nselem
,
&
IID_nsIDOMElementCSSInlineStyle
,
(
void
**
)
&
nselemstyle
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Coud not get nsIDOMCSSStyleDeclaration interface: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
nsres
=
nsIDOMElementCSSInlineStyle_GetStyle
(
nselemstyle
,
&
nsstyle
);
nsIDOMElementCSSInlineStyle_Release
(
nselemstyle
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetStyle failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
/* FIXME: Store style instead of creating a new instance in each call */
*
p
=
HTMLStyle_Create
(
nsstyle
);
nsIDOMCSSStyleDeclaration_Release
(
nsstyle
);
return
S_OK
;
}
...
...
dlls/mshtml/htmlstyle.c
View file @
5a9980e1
...
...
@@ -40,6 +40,8 @@ typedef struct {
const
IHTMLStyleVtbl
*
lpHTMLStyleVtbl
;
LONG
ref
;
nsIDOMCSSStyleDeclaration
*
nsstyle
;
}
HTMLStyle
;
#define HTMLSTYLE(x) ((IHTMLStyle*) &(x)->lpHTMLStyleVtbl);
...
...
@@ -1578,12 +1580,15 @@ static const IHTMLStyleVtbl HTMLStyleVtbl = {
HTMLStyle_toString
};
IHTMLStyle
*
HTMLStyle_Create
(
void
)
IHTMLStyle
*
HTMLStyle_Create
(
nsIDOMCSSStyleDeclaration
*
nsstyle
)
{
HTMLStyle
*
ret
=
mshtml_alloc
(
sizeof
(
HTMLStyle
));
ret
->
lpHTMLStyleVtbl
=
&
HTMLStyleVtbl
;
ret
->
ref
=
1
;
ret
->
nsstyle
=
nsstyle
;
nsIDOMCSSStyleDeclaration_AddRef
(
nsstyle
);
return
HTMLSTYLE
(
ret
);
}
dlls/mshtml/mshtml_private.h
View file @
5a9980e1
...
...
@@ -329,7 +329,7 @@ void set_document_bscallback(HTMLDocument*,BSCallback*);
IHlink
*
Hlink_Create
(
void
);
IHTMLSelectionObject
*
HTMLSelectionObject_Create
(
nsISelection
*
);
IHTMLTxtRange
*
HTMLTxtRange_Create
(
nsISelection
*
);
IHTMLStyle
*
HTMLStyle_Create
(
void
);
IHTMLStyle
*
HTMLStyle_Create
(
nsIDOMCSSStyleDeclaration
*
);
void
HTMLElement_Create
(
HTMLDOMNode
*
);
void
HTMLBodyElement_Create
(
HTMLElement
*
);
...
...
dlls/mshtml/nsiface.idl
View file @
5a9980e1
...
...
@@ -110,6 +110,8 @@ typedef nsISupports nsIDOMHTMLCollection;
typedef nsISupports nsIDOMRange;
typedef nsISupports nsIEditor;
typedef nsISupports nsIWebProgressListener;
typedef nsISupports nsIDOMCSSValue;
typedef nsISupports nsIDOMCSSRule;
[
object,
...
...
@@ -377,6 +379,25 @@ interface nsIUploadChannel : nsISupports
[
object,
uuid(a6cf90be-15b3-11d2-932e-00805f8add32)
]
interface nsIDOMCSSStyleDeclaration : nsISupports
{
nsresult GetCssText(nsAString *aCssText);
nsresult SetCssText(const nsAString *aCssText);
nsresult GetPropertyValue(const nsAString *propertyName, nsAString *_retval);
nsresult GetPropertyCSSValue(const nsAString *propertyName, nsIDOMCSSValue **_retval);
nsresult RemoveProperty(const nsAString *propertyName, nsAString *_retval);
nsresult GetPropertyPriority(const nsAString *propertyName, nsAString *_retval);
nsresult SetProperty(const nsAString *propertyName, const nsAString *value,
const nsAString *priority);
nsresult GetLength(PRUint32 *aLength);
nsresult Item(PRUint32 index, nsAString *_retval);
nsresult GetParentRule(nsIDOMCSSRule **aParentRule);
}
[
object,
uuid(a6cf907d-15b3-11d2-932e-00805f8add32)
]
interface nsIDOMNodeList : nsISupports
...
...
@@ -462,6 +483,15 @@ interface nsIDOMElement : nsIDOMNode
PRBool *_retval);
}
[
object,
uuid(99715845-95fc-4a56-aa53-214b65c26e22)
]
interface nsIDOMElementCSSInlineStyle : nsISupports
{
nsresult GetStyle(nsIDOMCSSStyleDeclaration **aStyle);
}
cpp_quote("#undef GetClassName");
[
...
...
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