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
c3ae1356
Commit
c3ae1356
authored
Jan 28, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Optimize nsAString handling.
parent
22d49376
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
+17
-5
htmlstyle.c
dlls/mshtml/htmlstyle.c
+5
-5
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
nsembed.c
dlls/mshtml/nsembed.c
+11
-0
No files found.
dlls/mshtml/htmlstyle.c
View file @
c3ae1356
...
@@ -315,9 +315,9 @@ HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, LPCW
...
@@ -315,9 +315,9 @@ HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, LPCW
if
(
flags
&
ATTR_FIX_URL
)
if
(
flags
&
ATTR_FIX_URL
)
val
=
fix_url_value
(
value
);
val
=
fix_url_value
(
value
);
nsAString_Init
(
&
str_name
,
style_tbl
[
sid
].
name
);
nsAString_Init
Depend
(
&
str_name
,
style_tbl
[
sid
].
name
);
nsAString_Init
(
&
str_value
,
val
?
val
:
value
);
nsAString_Init
Depend
(
&
str_value
,
val
?
val
:
value
);
nsAString_Init
(
&
str_empty
,
wszEmpty
);
nsAString_Init
Depend
(
&
str_empty
,
wszEmpty
);
heap_free
(
val
);
heap_free
(
val
);
nsres
=
nsIDOMCSSStyleDeclaration_SetProperty
(
nsstyle
,
&
str_name
,
&
str_value
,
&
str_empty
);
nsres
=
nsIDOMCSSStyleDeclaration_SetProperty
(
nsstyle
,
&
str_name
,
&
str_value
,
&
str_empty
);
...
@@ -369,7 +369,7 @@ static HRESULT get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration *nsstyle, stylei
...
@@ -369,7 +369,7 @@ static HRESULT get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration *nsstyle, stylei
nsAString
str_name
;
nsAString
str_name
;
nsresult
nsres
;
nsresult
nsres
;
nsAString_Init
(
&
str_name
,
style_tbl
[
sid
].
name
);
nsAString_Init
Depend
(
&
str_name
,
style_tbl
[
sid
].
name
);
nsres
=
nsIDOMCSSStyleDeclaration_GetPropertyValue
(
nsstyle
,
&
str_name
,
value
);
nsres
=
nsIDOMCSSStyleDeclaration_GetPropertyValue
(
nsstyle
,
&
str_name
,
value
);
if
(
NS_FAILED
(
nsres
))
{
if
(
NS_FAILED
(
nsres
))
{
...
@@ -2129,7 +2129,7 @@ static HRESULT WINAPI HTMLStyle_put_cssText(IHTMLStyle *iface, BSTR v)
...
@@ -2129,7 +2129,7 @@ static HRESULT WINAPI HTMLStyle_put_cssText(IHTMLStyle *iface, BSTR v)
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_Init
(
&
text_str
,
v
);
nsAString_Init
Depend
(
&
text_str
,
v
);
nsres
=
nsIDOMCSSStyleDeclaration_SetCssText
(
This
->
nsstyle
,
&
text_str
);
nsres
=
nsIDOMCSSStyleDeclaration_SetCssText
(
This
->
nsstyle
,
&
text_str
);
nsAString_Finish
(
&
text_str
);
nsAString_Finish
(
&
text_str
);
if
(
NS_FAILED
(
nsres
))
{
if
(
NS_FAILED
(
nsres
))
{
...
...
dlls/mshtml/mshtml_private.h
View file @
c3ae1356
...
@@ -712,6 +712,7 @@ void nsACString_SetData(nsACString*,const char*);
...
@@ -712,6 +712,7 @@ void nsACString_SetData(nsACString*,const char*);
PRUint32
nsACString_GetData
(
const
nsACString
*
,
const
char
**
);
PRUint32
nsACString_GetData
(
const
nsACString
*
,
const
char
**
);
BOOL
nsAString_Init
(
nsAString
*
,
const
PRUnichar
*
);
BOOL
nsAString_Init
(
nsAString
*
,
const
PRUnichar
*
);
void
nsAString_InitDepend
(
nsAString
*
,
const
PRUnichar
*
);
void
nsAString_SetData
(
nsAString
*
,
const
PRUnichar
*
);
void
nsAString_SetData
(
nsAString
*
,
const
PRUnichar
*
);
PRUint32
nsAString_GetData
(
const
nsAString
*
,
const
PRUnichar
**
);
PRUint32
nsAString_GetData
(
const
nsAString
*
,
const
PRUnichar
**
);
void
nsAString_Finish
(
nsAString
*
);
void
nsAString_Finish
(
nsAString
*
);
...
...
dlls/mshtml/nsembed.c
View file @
c3ae1356
...
@@ -55,6 +55,8 @@ struct nsCStringContainer {
...
@@ -55,6 +55,8 @@ struct nsCStringContainer {
PRUint32
d3
;
PRUint32
d3
;
};
};
#define NS_STRING_CONTAINER_INIT_DEPEND 0x0002
static
nsresult
(
*
NS_InitXPCOM2
)(
nsIServiceManager
**
,
void
*
,
void
*
);
static
nsresult
(
*
NS_InitXPCOM2
)(
nsIServiceManager
**
,
void
*
,
void
*
);
static
nsresult
(
*
NS_ShutdownXPCOM
)(
nsIServiceManager
*
);
static
nsresult
(
*
NS_ShutdownXPCOM
)(
nsIServiceManager
*
);
static
nsresult
(
*
NS_GetComponentRegistrar
)(
nsIComponentRegistrar
**
);
static
nsresult
(
*
NS_GetComponentRegistrar
)(
nsIComponentRegistrar
**
);
...
@@ -560,6 +562,15 @@ BOOL nsAString_Init(nsAString *str, const PRUnichar *data)
...
@@ -560,6 +562,15 @@ BOOL nsAString_Init(nsAString *str, const PRUnichar *data)
return
NS_SUCCEEDED
(
NS_StringContainerInit2
(
str
,
data
,
PR_UINT32_MAX
,
0
));
return
NS_SUCCEEDED
(
NS_StringContainerInit2
(
str
,
data
,
PR_UINT32_MAX
,
0
));
}
}
/*
* Initializes nsAString with data owned by caller.
* Caller must ensure that data is valid during lifetime of string object.
*/
void
nsAString_InitDepend
(
nsAString
*
str
,
const
PRUnichar
*
data
)
{
NS_StringContainerInit2
(
str
,
data
,
PR_UINT32_MAX
,
NS_STRING_CONTAINER_INIT_DEPEND
);
}
void
nsAString_SetData
(
nsAString
*
str
,
const
PRUnichar
*
data
)
void
nsAString_SetData
(
nsAString
*
str
,
const
PRUnichar
*
data
)
{
{
NS_StringSetData
(
str
,
data
,
PR_UINT32_MAX
);
NS_StringSetData
(
str
,
data
,
PR_UINT32_MAX
);
...
...
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