Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b7934f0a
Commit
b7934f0a
authored
Jul 15, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLStyle::clip property implementation.
parent
e0631980
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
9 deletions
+47
-9
htmlstyle.c
dlls/mshtml/htmlstyle.c
+41
-5
htmlstyle.h
dlls/mshtml/htmlstyle.h
+6
-4
No files found.
dlls/mshtml/htmlstyle.c
View file @
b7934f0a
...
...
@@ -91,6 +91,8 @@ static const WCHAR attrBorderWidth[] =
{
'b'
,
'o'
,
'r'
,
'd'
,
'e'
,
'r'
,
'-'
,
'w'
,
'i'
,
'd'
,
't'
,
'h'
,
0
};
static
const
WCHAR
attrBottom
[]
=
{
'b'
,
'o'
,
't'
,
't'
,
'o'
,
'm'
,
0
};
static
const
WCHAR
attrClip
[]
=
{
'c'
,
'l'
,
'i'
,
'p'
,
0
};
static
const
WCHAR
attrColor
[]
=
{
'c'
,
'o'
,
'l'
,
'o'
,
'r'
,
0
};
static
const
WCHAR
attrCursor
[]
=
...
...
@@ -198,6 +200,7 @@ static const struct{
{
attrBorderTopWidth
,
DISPID_IHTMLSTYLE_BORDERTOPWIDTH
},
{
attrBorderWidth
,
DISPID_IHTMLSTYLE_BORDERWIDTH
},
{
attrBottom
,
DISPID_IHTMLSTYLE2_BOTTOM
},
{
attrClip
,
DISPID_IHTMLSTYLE_CLIP
},
{
attrColor
,
DISPID_IHTMLSTYLE_COLOR
},
{
attrCursor
,
DISPID_IHTMLSTYLE_CURSOR
},
{
attrDisplay
,
DISPID_IHTMLSTYLE_DISPLAY
},
...
...
@@ -410,6 +413,7 @@ static HRESULT get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration *nsstyle, stylei
static
HRESULT
nsstyle_to_bstr
(
const
WCHAR
*
val
,
DWORD
flags
,
BSTR
*
p
)
{
BSTR
ret
;
DWORD
len
;
if
(
!*
val
)
{
*
p
=
NULL
;
...
...
@@ -420,6 +424,34 @@ static HRESULT nsstyle_to_bstr(const WCHAR *val, DWORD flags, BSTR *p)
if
(
!
ret
)
return
E_OUTOFMEMORY
;
len
=
SysStringLen
(
ret
);
if
(
flags
&
ATTR_REMOVE_COMMA
)
{
DWORD
new_len
=
len
;
WCHAR
*
ptr
,
*
ptr2
;
for
(
ptr
=
ret
;
(
ptr
=
strchrW
(
ptr
,
','
));
ptr
++
)
new_len
--
;
if
(
new_len
!=
len
)
{
BSTR
new_ret
;
new_ret
=
SysAllocStringLen
(
NULL
,
new_len
);
if
(
!
new_ret
)
{
SysFreeString
(
ret
);
return
E_OUTOFMEMORY
;
}
for
(
ptr2
=
new_ret
,
ptr
=
ret
;
*
ptr
;
ptr
++
)
{
if
(
*
ptr
!=
','
)
*
ptr2
++
=
*
ptr
;
}
SysFreeString
(
ret
);
ret
=
new_ret
;
}
}
*
p
=
ret
;
return
S_OK
;
}
...
...
@@ -488,7 +520,7 @@ HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid,
nsAString_Finish
(
&
str_value
);
TRACE
(
"%s -> %s
\n
"
,
debugstr_w
(
style_tbl
[
sid
].
name
),
debugstr_variant
(
p
));
return
hres
;
return
S_OK
;
}
static
inline
HRESULT
get_style_attr
(
HTMLStyle
*
This
,
styleid_t
sid
,
BSTR
*
p
)
...
...
@@ -2549,15 +2581,19 @@ static HRESULT WINAPI HTMLStyle_get_cursor(IHTMLStyle *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLStyle_put_clip
(
IHTMLStyle
*
iface
,
BSTR
v
)
{
HTMLStyle
*
This
=
impl_from_IHTMLStyle
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
set_style_attr
(
This
,
STYLEID_CLIP
,
v
,
0
);
}
static
HRESULT
WINAPI
HTMLStyle_get_clip
(
IHTMLStyle
*
iface
,
BSTR
*
p
)
{
HTMLStyle
*
This
=
impl_from_IHTMLStyle
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
get_nsstyle_attr
(
This
->
nsstyle
,
STYLEID_CLIP
,
p
,
ATTR_REMOVE_COMMA
);
}
static
void
set_opacity
(
HTMLStyle
*
This
,
const
WCHAR
*
val
)
...
...
dlls/mshtml/htmlstyle.h
View file @
b7934f0a
...
...
@@ -59,6 +59,7 @@ typedef enum {
STYLEID_BORDER_TOP_WIDTH
,
STYLEID_BORDER_WIDTH
,
STYLEID_BOTTOM
,
STYLEID_CLIP
,
STYLEID_COLOR
,
STYLEID_CURSOR
,
STYLEID_DISPLAY
,
...
...
@@ -107,7 +108,8 @@ HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration*,styleid_t,LPCWSTR,DWORD) DEC
HRESULT
set_nsstyle_attr_var
(
nsIDOMCSSStyleDeclaration
*
nsstyle
,
styleid_t
sid
,
VARIANT
*
value
,
DWORD
flags
)
DECLSPEC_HIDDEN
;
HRESULT
get_nsstyle_attr_var
(
nsIDOMCSSStyleDeclaration
*
nsstyle
,
styleid_t
sid
,
VARIANT
*
p
,
DWORD
flags
)
DECLSPEC_HIDDEN
;
#define ATTR_FIX_PX 1
#define ATTR_FIX_URL 2
#define ATTR_STR_TO_INT 4
#define ATTR_HEX_INT 8
#define ATTR_FIX_PX 0x0001
#define ATTR_FIX_URL 0x0002
#define ATTR_STR_TO_INT 0x0004
#define ATTR_HEX_INT 0x0008
#define ATTR_REMOVE_COMMA 0x0010
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