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
4b5dcc9e
Commit
4b5dcc9e
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 more nsAString handling.
parent
248db8d8
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
19 additions
and
20 deletions
+19
-20
htmlframebase.c
dlls/mshtml/htmlframebase.c
+2
-2
htmlimg.c
dlls/mshtml/htmlimg.c
+2
-2
htmlinput.c
dlls/mshtml/htmlinput.c
+2
-2
htmlnode.c
dlls/mshtml/htmlnode.c
+1
-1
htmloption.c
dlls/mshtml/htmloption.c
+2
-2
htmlselect.c
dlls/mshtml/htmlselect.c
+1
-1
htmlwindow.c
dlls/mshtml/htmlwindow.c
+1
-1
mutation.c
dlls/mshtml/mutation.c
+3
-3
nsembed.c
dlls/mshtml/nsembed.c
+1
-1
nsevents.c
dlls/mshtml/nsevents.c
+1
-1
script.c
dlls/mshtml/script.c
+2
-3
txtrange.c
dlls/mshtml/txtrange.c
+1
-1
No files found.
dlls/mshtml/htmlframebase.c
View file @
4b5dcc9e
...
...
@@ -283,10 +283,10 @@ static HRESULT WINAPI HTMLFrameBase_put_scrolling(IHTMLFrameBase *iface, BSTR v)
return
E_INVALIDARG
;
if
(
This
->
nsframe
)
{
nsAString_Init
(
&
nsstr
,
v
);
nsAString_Init
Depend
(
&
nsstr
,
v
);
nsres
=
nsIDOMHTMLFrameElement_SetScrolling
(
This
->
nsframe
,
&
nsstr
);
}
else
if
(
This
->
nsiframe
)
{
nsAString_Init
(
&
nsstr
,
v
);
nsAString_Init
Depend
(
&
nsstr
,
v
);
nsres
=
nsIDOMHTMLIFrameElement_SetScrolling
(
This
->
nsiframe
,
&
nsstr
);
}
else
{
ERR
(
"No attached ns frame object
\n
"
);
...
...
dlls/mshtml/htmlimg.c
View file @
4b5dcc9e
...
...
@@ -228,7 +228,7 @@ static HRESULT WINAPI HTMLImgElement_put_alt(IHTMLImgElement *iface, BSTR v)
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_Init
(
&
alt_str
,
v
);
nsAString_Init
Depend
(
&
alt_str
,
v
);
nsres
=
nsIDOMHTMLImageElement_SetAlt
(
This
->
nsimg
,
&
alt_str
);
nsAString_Finish
(
&
alt_str
);
if
(
NS_FAILED
(
nsres
))
...
...
@@ -268,7 +268,7 @@ static HRESULT WINAPI HTMLImgElement_put_src(IHTMLImgElement *iface, BSTR v)
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_Init
(
&
src_str
,
v
);
nsAString_Init
Depend
(
&
src_str
,
v
);
nsres
=
nsIDOMHTMLImageElement_SetSrc
(
This
->
nsimg
,
&
src_str
);
nsAString_Finish
(
&
src_str
);
if
(
NS_FAILED
(
nsres
))
...
...
dlls/mshtml/htmlinput.c
View file @
4b5dcc9e
...
...
@@ -143,7 +143,7 @@ static HRESULT WINAPI HTMLInputElement_put_value(IHTMLInputElement *iface, BSTR
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_Init
(
&
val_str
,
v
);
nsAString_Init
Depend
(
&
val_str
,
v
);
nsres
=
nsIDOMHTMLInputElement_SetValue
(
This
->
nsinput
,
&
val_str
);
nsAString_Finish
(
&
val_str
);
if
(
NS_FAILED
(
nsres
))
...
...
@@ -512,7 +512,7 @@ static HRESULT WINAPI HTMLInputElement_put_src(IHTMLInputElement *iface, BSTR v)
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_Init
(
&
nsstr
,
v
);
nsAString_Init
Depend
(
&
nsstr
,
v
);
nsres
=
nsIDOMHTMLInputElement_SetSrc
(
This
->
nsinput
,
&
nsstr
);
nsAString_Finish
(
&
nsstr
);
if
(
NS_FAILED
(
nsres
))
...
...
dlls/mshtml/htmlnode.c
View file @
4b5dcc9e
...
...
@@ -645,7 +645,7 @@ static HRESULT WINAPI HTMLDOMNode_put_nodeValue(IHTMLDOMNode *iface, VARIANT v)
TRACE
(
"bstr %s
\n
"
,
debugstr_w
(
V_BSTR
(
&
v
)));
nsAString_Init
(
&
val_str
,
V_BSTR
(
&
v
));
nsAString_Init
Depend
(
&
val_str
,
V_BSTR
(
&
v
));
nsIDOMNode_SetNodeValue
(
This
->
nsnode
,
&
val_str
);
nsAString_Finish
(
&
val_str
);
...
...
dlls/mshtml/htmloption.c
View file @
4b5dcc9e
...
...
@@ -117,7 +117,7 @@ static HRESULT WINAPI HTMLOptionElement_put_value(IHTMLOptionElement *iface, BST
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_Init
(
&
value_str
,
v
);
nsAString_Init
Depend
(
&
value_str
,
v
);
nsres
=
nsIDOMHTMLOptionElement_SetValue
(
This
->
nsoption
,
&
value_str
);
nsAString_Finish
(
&
value_str
);
if
(
NS_FAILED
(
nsres
))
...
...
@@ -209,7 +209,7 @@ static HRESULT WINAPI HTMLOptionElement_put_text(IHTMLOptionElement *iface, BSTR
}
}
nsAString_Init
(
&
text_str
,
v
);
nsAString_Init
Depend
(
&
text_str
,
v
);
nsres
=
nsIDOMHTMLDocument_CreateTextNode
(
This
->
element
.
node
.
doc
->
nsdoc
,
&
text_str
,
&
text_node
);
nsAString_Finish
(
&
text_str
);
if
(
NS_FAILED
(
nsres
))
{
...
...
dlls/mshtml/htmlselect.c
View file @
4b5dcc9e
...
...
@@ -253,7 +253,7 @@ static HRESULT WINAPI HTMLSelectElement_put_value(IHTMLSelectElement *iface, BST
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_Init
(
&
value_str
,
v
);
nsAString_Init
Depend
(
&
value_str
,
v
);
nsres
=
nsIDOMHTMLSelectElement_SetValue
(
This
->
nsselect
,
&
value_str
);
nsAString_Finish
(
&
value_str
);
if
(
NS_FAILED
(
nsres
))
...
...
dlls/mshtml/htmlwindow.c
View file @
4b5dcc9e
...
...
@@ -694,7 +694,7 @@ static HRESULT WINAPI HTMLWindow2_put_name(IHTMLWindow2 *iface, BSTR v)
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_Init
(
&
name_str
,
v
);
nsAString_Init
Depend
(
&
name_str
,
v
);
nsres
=
nsIDOMWindow_SetName
(
This
->
nswindow
,
&
name_str
);
nsAString_Finish
(
&
name_str
);
if
(
NS_FAILED
(
nsres
))
...
...
dlls/mshtml/mutation.c
View file @
4b5dcc9e
...
...
@@ -168,12 +168,12 @@ static BOOL handle_insert_comment(HTMLDocumentNode *doc, const PRUnichar *commen
memcpy
(
buf
,
ptr
,
(
end
-
ptr
)
*
sizeof
(
WCHAR
));
buf
[
end
-
ptr
]
=
0
;
nsAString_Init
(
&
nsstr
,
buf
);
heap_free
(
buf
);
nsAString_InitDepend
(
&
nsstr
,
buf
);
/* FIXME: Find better way to insert HTML to document. */
nsres
=
nsIDOMHTMLDocument_Write
(
doc
->
nsdoc
,
&
nsstr
);
nsAString_Finish
(
&
nsstr
);
heap_free
(
buf
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Write failed: %08x
\n
"
,
nsres
);
return
FALSE
;
...
...
@@ -396,7 +396,7 @@ static nsresult NSAPI nsRunnable_Run(nsIRunnable *iface)
static
const
PRUnichar
remove_comment_magicW
[]
=
{
'#'
,
'!'
,
'w'
,
'i'
,
'n'
,
'e'
,
'r'
,
'e'
,
'm'
,
'o'
,
'v'
,
'e'
,
'!'
,
'#'
,
0
};
nsAString_Init
(
&
magic_str
,
remove_comment_magicW
);
nsAString_Init
Depend
(
&
magic_str
,
remove_comment_magicW
);
nsres
=
nsIDOMComment_SetData
(
nscomment
,
&
magic_str
);
nsAString_Finish
(
&
magic_str
);
if
(
NS_FAILED
(
nsres
))
...
...
dlls/mshtml/nsembed.c
View file @
4b5dcc9e
...
...
@@ -426,7 +426,7 @@ static BOOL init_xpcom(const PRUnichar *gre_path)
nsAString
path
;
nsIFile
*
gre_dir
;
nsAString_Init
(
&
path
,
gre_path
);
nsAString_Init
Depend
(
&
path
,
gre_path
);
nsres
=
NS_NewLocalFile
(
&
path
,
FALSE
,
&
gre_dir
);
nsAString_Finish
(
&
path
);
if
(
NS_FAILED
(
nsres
))
{
...
...
dlls/mshtml/nsevents.c
View file @
4b5dcc9e
...
...
@@ -316,7 +316,7 @@ static void init_event(nsIDOMEventTarget *target, const PRUnichar *type,
nsAString
type_str
;
nsresult
nsres
;
nsAString_Init
(
&
type_str
,
type
);
nsAString_Init
Depend
(
&
type_str
,
type
);
nsres
=
nsIDOMEventTarget_AddEventListener
(
target
,
&
type_str
,
listener
,
capture
);
nsAString_Finish
(
&
type_str
);
if
(
NS_FAILED
(
nsres
))
...
...
dlls/mshtml/script.c
View file @
4b5dcc9e
...
...
@@ -758,9 +758,9 @@ static BOOL get_script_guid(nsIDOMHTMLScriptElement *nsscript, GUID *guid)
ERR
(
"GetType failed: %08x
\n
"
,
nsres
);
}
nsAString_Init
(
&
attr_str
,
languageW
);
nsAString_InitDepend
(
&
attr_str
,
languageW
);
nsres
=
nsIDOMHTMLScriptElement_GetAttribute
(
nsscript
,
&
attr_str
,
&
val_str
);
nsAString_Finish
(
&
attr_str
);
if
(
NS_SUCCEEDED
(
nsres
))
{
const
PRUnichar
*
language
;
...
...
@@ -776,7 +776,6 @@ static BOOL get_script_guid(nsIDOMHTMLScriptElement *nsscript, GUID *guid)
ERR
(
"GetAttribute(language) failed: %08x
\n
"
,
nsres
);
}
nsAString_Finish
(
&
attr_str
);
nsAString_Finish
(
&
val_str
);
return
ret
;
...
...
dlls/mshtml/txtrange.c
View file @
4b5dcc9e
...
...
@@ -1141,7 +1141,7 @@ static HRESULT WINAPI HTMLTxtRange_put_text(IHTMLTxtRange *iface, BSTR v)
if
(
!
This
->
doc
)
return
MSHTML_E_NODOC
;
nsAString_Init
(
&
text_str
,
v
);
nsAString_Init
Depend
(
&
text_str
,
v
);
nsres
=
nsIDOMHTMLDocument_CreateTextNode
(
This
->
doc
->
nsdoc
,
&
text_str
,
&
text_node
);
nsAString_Finish
(
&
text_str
);
if
(
NS_FAILED
(
nsres
))
{
...
...
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