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
85368869
Commit
85368869
authored
Jan 07, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 07, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLStyle::get_pixelLeft implementation.
parent
c5f15727
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
3 deletions
+53
-3
htmlstyle.c
dlls/mshtml/htmlstyle.c
+37
-3
style.c
dlls/mshtml/tests/style.c
+16
-0
No files found.
dlls/mshtml/htmlstyle.c
View file @
85368869
...
...
@@ -180,6 +180,9 @@ static const WCHAR attrWordWrap[] =
static
const
WCHAR
attrZIndex
[]
=
{
'z'
,
'-'
,
'i'
,
'n'
,
'd'
,
'e'
,
'x'
,
0
};
static
const
WCHAR
pxW
[]
=
{
'p'
,
'x'
,
0
};
typedef
struct
{
const
WCHAR
*
name
;
DISPID
dispid
;
...
...
@@ -612,7 +615,6 @@ static HRESULT get_nsstyle_pos(HTMLStyle *This, styleid_t sid, float *p)
{
nsAString
str_value
;
HRESULT
hres
;
WCHAR
pxW
[]
=
{
'p'
,
'x'
,
0
};
TRACE
(
"%p %d %p
\n
"
,
This
,
sid
,
p
);
...
...
@@ -647,6 +649,36 @@ static HRESULT get_nsstyle_pos(HTMLStyle *This, styleid_t sid, float *p)
return
hres
;
}
static
HRESULT
get_nsstyle_pixel_val
(
HTMLStyle
*
This
,
styleid_t
sid
,
LONG
*
p
)
{
nsAString
str_value
;
HRESULT
hres
;
nsAString_Init
(
&
str_value
,
NULL
);
hres
=
get_nsstyle_attr_nsval
(
This
->
nsstyle
,
sid
,
&
str_value
);
if
(
hres
==
S_OK
)
{
WCHAR
*
ptr
;
const
PRUnichar
*
value
;
nsAString_GetData
(
&
str_value
,
&
value
);
if
(
value
)
{
*
p
=
strtolW
(
value
,
&
ptr
,
10
);
if
(
*
ptr
&&
strcmpW
(
ptr
,
pxW
))
{
nsAString_Finish
(
&
str_value
);
FIXME
(
"only px values are currently supported
\n
"
);
hres
=
E_NOTIMPL
;
}
}
else
{
*
p
=
0
;
}
}
nsAString_Finish
(
&
str_value
);
return
hres
;
}
static
BOOL
is_valid_border_style
(
BSTR
v
)
{
static
const
WCHAR
styleDotted
[]
=
{
'd'
,
'o'
,
't'
,
't'
,
'e'
,
'd'
,
0
};
...
...
@@ -2387,8 +2419,10 @@ static HRESULT WINAPI HTMLStyle_put_pixelLeft(IHTMLStyle *iface, LONG v)
static
HRESULT
WINAPI
HTMLStyle_get_pixelLeft
(
IHTMLStyle
*
iface
,
LONG
*
p
)
{
HTMLStyle
*
This
=
impl_from_IHTMLStyle
(
iface
);
FIXME
(
"(%p)->()
\n
"
,
This
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
get_nsstyle_pixel_val
(
This
,
STYLEID_LEFT
,
p
);
}
static
HRESULT
WINAPI
HTMLStyle_put_pixelWidth
(
IHTMLStyle
*
iface
,
LONG
v
)
...
...
dlls/mshtml/tests/style.c
View file @
85368869
...
...
@@ -465,6 +465,7 @@ static void test_body_style(IHTMLStyle *style)
float
f
;
BSTR
sOverflowDefault
;
BSTR
sDefault
;
LONG
l
;
VARIANT
vDefault
;
test_style_csstext
(
style
,
NULL
);
...
...
@@ -904,6 +905,11 @@ static void test_body_style(IHTMLStyle *style)
ok
(
!
V_BSTR
(
&
v
),
"V_BSTR(v) != NULL
\n
"
);
VariantClear
(
&
v
);
l
=
0xdeadbeef
;
hres
=
IHTMLStyle_get_pixelLeft
(
style
,
&
l
);
ok
(
hres
==
S_OK
,
"get_pixelLeft failed: %08x
\n
"
,
hres
);
ok
(
!
l
,
"pixelLeft = %d
\n
"
,
l
);
/* Test posLeft */
hres
=
IHTMLStyle_get_posLeft
(
style
,
NULL
);
ok
(
hres
==
E_POINTER
,
"get_posLeft failed: %08x
\n
"
,
hres
);
...
...
@@ -943,6 +949,11 @@ static void test_body_style(IHTMLStyle *style)
ok
(
hres
==
S_OK
,
"get_posLeft failed: %08x
\n
"
,
hres
);
ok
(
f
==
3
.
0
,
"expected 3.0 got %f
\n
"
,
f
);
l
=
0xdeadbeef
;
hres
=
IHTMLStyle_get_pixelLeft
(
style
,
&
l
);
ok
(
hres
==
S_OK
,
"get_pixelLeft failed: %08x
\n
"
,
hres
);
ok
(
l
==
3
,
"pixelLeft = %d
\n
"
,
l
);
V_VT
(
&
v
)
=
VT_EMPTY
;
hres
=
IHTMLStyle_get_left
(
style
,
&
v
);
ok
(
hres
==
S_OK
,
"get_left failed: %08x
\n
"
,
hres
);
...
...
@@ -968,6 +979,11 @@ static void test_body_style(IHTMLStyle *style)
ok
(
!
V_BSTR
(
&
v
),
"V_BSTR(v) != NULL
\n
"
);
VariantClear
(
&
v
);
l
=
0xdeadbeef
;
hres
=
IHTMLStyle_get_pixelLeft
(
style
,
&
l
);
ok
(
hres
==
S_OK
,
"get_pixelLeft failed: %08x
\n
"
,
hres
);
ok
(
!
l
,
"pixelLeft = %d
\n
"
,
l
);
/* Test posTop */
hres
=
IHTMLStyle_get_posTop
(
style
,
NULL
);
ok
(
hres
==
E_POINTER
,
"get_posTop failed: %08x
\n
"
,
hres
);
...
...
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