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
34833825
Commit
34833825
authored
Mar 16, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Store filter in HTMLElement object.
parent
7a320e5c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
11 deletions
+26
-11
htmlelem.c
dlls/mshtml/htmlelem.c
+6
-2
htmlstyle.c
dlls/mshtml/htmlstyle.c
+17
-7
htmlstyle.h
dlls/mshtml/htmlstyle.h
+1
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+2
-1
No files found.
dlls/mshtml/htmlelem.c
View file @
34833825
...
...
@@ -507,7 +507,7 @@ static HRESULT WINAPI HTMLElement_get_style(IHTMLElement *iface, IHTMLStyle **p)
return
E_FAIL
;
}
hres
=
HTMLStyle_Create
(
nsstyle
,
&
This
->
style
);
hres
=
HTMLStyle_Create
(
This
,
nsstyle
,
&
This
->
style
);
nsIDOMCSSStyleDeclaration_Release
(
nsstyle
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -1648,8 +1648,10 @@ void HTMLElement_destructor(HTMLDOMNode *iface)
if
(
This
->
nselem
)
nsIDOMHTMLElement_Release
(
This
->
nselem
);
if
(
This
->
style
)
if
(
This
->
style
)
{
This
->
style
->
elem
=
NULL
;
IHTMLStyle_Release
(
&
This
->
style
->
IHTMLStyle_iface
);
}
if
(
This
->
attrs
)
{
HTMLDOMAttribute
*
attr
;
...
...
@@ -1660,6 +1662,8 @@ void HTMLElement_destructor(HTMLDOMNode *iface)
IHTMLAttributeCollection_Release
(
&
This
->
attrs
->
IHTMLAttributeCollection_iface
);
}
heap_free
(
This
->
filter
);
HTMLDOMNode_destructor
(
&
This
->
node
);
}
...
...
dlls/mshtml/htmlstyle.c
View file @
34833825
...
...
@@ -694,7 +694,6 @@ static ULONG WINAPI HTMLStyle_Release(IHTMLStyle *iface)
if
(
!
ref
)
{
if
(
This
->
nsstyle
)
nsIDOMCSSStyleDeclaration_Release
(
This
->
nsstyle
);
heap_free
(
This
->
filter
);
release_dispex
(
&
This
->
dispex
);
heap_free
(
This
);
}
...
...
@@ -2597,7 +2596,7 @@ static void set_opacity(HTMLStyle *This, const WCHAR *val)
static
void
update_filter
(
HTMLStyle
*
This
)
{
const
WCHAR
*
ptr
=
This
->
filter
,
*
ptr2
;
const
WCHAR
*
ptr
=
This
->
elem
->
filter
,
*
ptr2
;
static
const
WCHAR
alphaW
[]
=
{
'a'
,
'l'
,
'p'
,
'h'
,
'a'
};
...
...
@@ -2683,14 +2682,19 @@ static HRESULT WINAPI HTMLStyle_put_filter(IHTMLStyle *iface, BSTR v)
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
if
(
!
This
->
elem
)
{
FIXME
(
"Element already destroyed
\n
"
);
return
E_UNEXPECTED
;
}
if
(
v
)
{
new_filter
=
heap_strdupW
(
v
);
if
(
!
new_filter
)
return
E_OUTOFMEMORY
;
}
heap_free
(
This
->
filter
);
This
->
filter
=
new_filter
;
heap_free
(
This
->
elem
->
filter
);
This
->
elem
->
filter
=
new_filter
;
update_filter
(
This
);
return
S_OK
;
...
...
@@ -2702,8 +2706,13 @@ static HRESULT WINAPI HTMLStyle_get_filter(IHTMLStyle *iface, BSTR *p)
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
This
->
filter
)
{
*
p
=
SysAllocString
(
This
->
filter
);
if
(
!
This
->
elem
)
{
FIXME
(
"Element already destroyed
\n
"
);
return
E_UNEXPECTED
;
}
if
(
This
->
elem
->
filter
)
{
*
p
=
SysAllocString
(
This
->
elem
->
filter
);
if
(
!*
p
)
return
E_OUTOFMEMORY
;
}
else
{
...
...
@@ -3038,7 +3047,7 @@ static dispex_static_data_t HTMLStyle_dispex = {
HTMLStyle_iface_tids
};
HRESULT
HTMLStyle_Create
(
nsIDOMCSSStyleDeclaration
*
nsstyle
,
HTMLStyle
**
ret
)
HRESULT
HTMLStyle_Create
(
HTMLElement
*
elem
,
nsIDOMCSSStyleDeclaration
*
nsstyle
,
HTMLStyle
**
ret
)
{
HTMLStyle
*
style
;
...
...
@@ -3049,6 +3058,7 @@ HRESULT HTMLStyle_Create(nsIDOMCSSStyleDeclaration *nsstyle, HTMLStyle **ret)
style
->
IHTMLStyle_iface
.
lpVtbl
=
&
HTMLStyleVtbl
;
style
->
ref
=
1
;
style
->
nsstyle
=
nsstyle
;
style
->
elem
=
elem
;
HTMLStyle2_Init
(
style
);
HTMLStyle3_Init
(
style
);
...
...
dlls/mshtml/htmlstyle.h
View file @
34833825
...
...
@@ -28,7 +28,7 @@ struct HTMLStyle {
LONG
ref
;
nsIDOMCSSStyleDeclaration
*
nsstyle
;
WCHAR
*
filter
;
HTMLElement
*
elem
;
};
/* NOTE: Make sure to keep in sync with style_tbl in htmlstyle.c */
...
...
dlls/mshtml/mshtml_private.h
View file @
34833825
...
...
@@ -556,6 +556,7 @@ typedef struct {
nsIDOMHTMLElement
*
nselem
;
HTMLStyle
*
style
;
HTMLAttributeCollection
*
attrs
;
WCHAR
*
filter
;
}
HTMLElement
;
#define HTMLELEMENT_TIDS \
...
...
@@ -722,7 +723,7 @@ void set_ready_state(HTMLWindow*,READYSTATE) DECLSPEC_HIDDEN;
HRESULT
HTMLSelectionObject_Create
(
HTMLDocumentNode
*
,
nsISelection
*
,
IHTMLSelectionObject
**
)
DECLSPEC_HIDDEN
;
HRESULT
HTMLTxtRange_Create
(
HTMLDocumentNode
*
,
nsIDOMRange
*
,
IHTMLTxtRange
**
)
DECLSPEC_HIDDEN
;
HRESULT
HTMLStyle_Create
(
nsIDOMCSSStyleDeclaration
*
,
HTMLStyle
**
)
DECLSPEC_HIDDEN
;
HRESULT
HTMLStyle_Create
(
HTMLElement
*
,
nsIDOMCSSStyleDeclaration
*
,
HTMLStyle
**
)
DECLSPEC_HIDDEN
;
IHTMLStyleSheet
*
HTMLStyleSheet_Create
(
nsIDOMStyleSheet
*
)
DECLSPEC_HIDDEN
;
IHTMLStyleSheetsCollection
*
HTMLStyleSheetsCollection_Create
(
nsIDOMStyleSheetList
*
)
DECLSPEC_HIDDEN
;
...
...
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