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
bf4b8691
Commit
bf4b8691
authored
Aug 23, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Wine Gecko 1.3 release.
parent
18c24345
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
147 additions
and
167 deletions
+147
-167
addons.c
dlls/appwiz.cpl/addons.c
+3
-3
htmlbody.c
dlls/mshtml/htmlbody.c
+1
-11
htmlcurstyle.c
dlls/mshtml/htmlcurstyle.c
+3
-20
htmldoc3.c
dlls/mshtml/htmldoc3.c
+1
-9
htmlelem.c
dlls/mshtml/htmlelem.c
+2
-16
htmlelem2.c
dlls/mshtml/htmlelem2.c
+3
-8
htmlevent.c
dlls/mshtml/htmlevent.c
+4
-11
htmlwindow.c
dlls/mshtml/htmlwindow.c
+1
-18
mutation.c
dlls/mshtml/mutation.c
+1
-1
npplugin.c
dlls/mshtml/npplugin.c
+8
-16
nsiface.idl
dlls/mshtml/nsiface.idl
+0
-0
nsio.c
dlls/mshtml/nsio.c
+120
-54
No files found.
dlls/appwiz.cpl/addons.c
View file @
bf4b8691
...
...
@@ -51,14 +51,14 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
appwizcpl
);
#define GECKO_VERSION "1.
2.0
"
#define GECKO_VERSION "1.
3
"
#ifdef __i386__
#define ARCH_STRING "x86"
#define GECKO_SHA "
6964d1877668ab7da07a60f6dcf23fb0e261a808
"
#define GECKO_SHA "
acc6a5bc15ebb3574e00f8ef4f23912239658b41
"
#elif defined(__x86_64__)
#define ARCH_STRING "x86_64"
#define GECKO_SHA "
3ac3c3e880e40f7763824866372ffc56128f0abd
"
#define GECKO_SHA "
5bcf29c48677dffa7a9112d481f7f5474cd255d4
"
#else
#define ARCH_STRING ""
#define GECKO_SHA "???"
...
...
dlls/mshtml/htmlbody.c
View file @
bf4b8691
...
...
@@ -660,7 +660,6 @@ static HRESULT WINAPI HTMLBodyElement_get_onbeforeunload(IHTMLBodyElement *iface
static
HRESULT
WINAPI
HTMLBodyElement_createTextRange
(
IHTMLBodyElement
*
iface
,
IHTMLTxtRange
**
range
)
{
HTMLBodyElement
*
This
=
impl_from_IHTMLBodyElement
(
iface
);
nsIDOMDocumentRange
*
nsdocrange
;
nsIDOMRange
*
nsrange
=
NULL
;
nsresult
nsres
;
HRESULT
hres
;
...
...
@@ -672,14 +671,7 @@ static HRESULT WINAPI HTMLBodyElement_createTextRange(IHTMLBodyElement *iface, I
return
E_UNEXPECTED
;
}
nsres
=
nsIDOMDocument_QueryInterface
(
This
->
textcont
.
element
.
node
.
doc
->
nsdoc
,
&
IID_nsIDOMDocumentRange
,
(
void
**
)
&
nsdocrange
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMDocumentRabge iface: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
nsres
=
nsIDOMDocumentRange_CreateRange
(
nsdocrange
,
&
nsrange
);
nsres
=
nsIDOMHTMLDocument_CreateRange
(
This
->
textcont
.
element
.
node
.
doc
->
nsdoc
,
&
nsrange
);
if
(
NS_SUCCEEDED
(
nsres
))
{
nsres
=
nsIDOMRange_SelectNodeContents
(
nsrange
,
This
->
textcont
.
element
.
node
.
nsnode
);
if
(
NS_FAILED
(
nsres
))
...
...
@@ -688,8 +680,6 @@ static HRESULT WINAPI HTMLBodyElement_createTextRange(IHTMLBodyElement *iface, I
ERR
(
"CreateRange failed: %08x
\n
"
,
nsres
);
}
nsIDOMDocumentRange_Release
(
nsdocrange
);
hres
=
HTMLTxtRange_Create
(
This
->
textcont
.
element
.
node
.
doc
->
basedoc
.
doc_node
,
nsrange
,
range
);
nsIDOMRange_Release
(
nsrange
);
...
...
dlls/mshtml/htmlcurstyle.c
View file @
bf4b8691
...
...
@@ -892,9 +892,7 @@ static dispex_static_data_t HTMLCurrentStyle_dispex = {
HRESULT
HTMLCurrentStyle_Create
(
HTMLElement
*
elem
,
IHTMLCurrentStyle
**
p
)
{
nsIDOMCSSStyleDeclaration
*
nsstyle
;
nsIDOMDocumentView
*
nsdocview
;
nsIDOMAbstractView
*
nsview
;
nsIDOMViewCSS
*
nsviewcss
;
nsIDOMWindow
*
nsview
;
nsAString
nsempty_str
;
HTMLCurrentStyle
*
ret
;
nsresult
nsres
;
...
...
@@ -904,29 +902,14 @@ HRESULT HTMLCurrentStyle_Create(HTMLElement *elem, IHTMLCurrentStyle **p)
return
E_UNEXPECTED
;
}
nsres
=
nsIDOMHTMLDocument_QueryInterface
(
elem
->
node
.
doc
->
nsdoc
,
&
IID_nsIDOMDocumentView
,
(
void
**
)
&
nsdocview
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMDocumentView: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
nsres
=
nsIDOMDocumentView_GetDefaultView
(
nsdocview
,
&
nsview
);
nsIDOMDocumentView_Release
(
nsdocview
);
nsres
=
nsIDOMHTMLDocument_GetDefaultView
(
elem
->
node
.
doc
->
nsdoc
,
&
nsview
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetDefaultView failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
nsres
=
nsIDOMAbstractView_QueryInterface
(
nsview
,
&
IID_nsIDOMViewCSS
,
(
void
**
)
&
nsviewcss
);
nsIDOMAbstractView_Release
(
nsview
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMViewCSS: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
nsAString_Init
(
&
nsempty_str
,
NULL
);
nsres
=
nsIDOMViewCSS_GetComputedStyle
(
nsviewcss
,
(
nsIDOMElement
*
)
elem
->
nselem
,
&
nsempty_str
,
&
nsstyle
);
nsIDOMViewCSS_Release
(
nsviewcss
);
nsres
=
nsIDOMWindow_GetComputedStyle
(
nsview
,
(
nsIDOMElement
*
)
elem
->
nselem
,
&
nsempty_str
,
&
nsstyle
);
nsAString_Finish
(
&
nsempty_str
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetComputedStyle failed: %08x
\n
"
,
nsres
);
...
...
dlls/mshtml/htmldoc3.c
View file @
bf4b8691
...
...
@@ -696,7 +696,6 @@ static HRESULT WINAPI HTMLDocument4_Invoke(IHTMLDocument4 *iface, DISPID dispIdM
static
HRESULT
WINAPI
HTMLDocument4_focus
(
IHTMLDocument4
*
iface
)
{
HTMLDocument
*
This
=
impl_from_IHTMLDocument4
(
iface
);
nsIDOMNSHTMLElement
*
nselem
;
nsIDOMHTMLElement
*
nsbody
;
nsresult
nsres
;
...
...
@@ -708,16 +707,9 @@ static HRESULT WINAPI HTMLDocument4_focus(IHTMLDocument4 *iface)
return
E_FAIL
;
}
nsres
=
nsIDOMHTMLElement_
QueryInterface
(
nsbody
,
&
IID_nsIDOMNSHTMLElement
,
(
void
**
)
&
nselem
);
nsres
=
nsIDOMHTMLElement_
Focus
(
nsbody
);
nsIDOMHTMLElement_Release
(
nsbody
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMNSHTMLElement: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
nsres
=
nsIDOMNSHTMLElement_Focus
(
nselem
);
nsIDOMNSHTMLElement_Release
(
nselem
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Focus failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
...
...
dlls/mshtml/htmlelem.c
View file @
bf4b8691
...
...
@@ -104,7 +104,6 @@ static const tag_desc_t *get_tag_desc(const WCHAR *tag_name)
HRESULT
replace_node_by_html
(
nsIDOMHTMLDocument
*
nsdoc
,
nsIDOMNode
*
nsnode
,
const
WCHAR
*
html
)
{
nsIDOMDocumentFragment
*
nsfragment
;
nsIDOMDocumentRange
*
nsdocrange
;
nsIDOMNSRange
*
nsrange
;
nsIDOMNode
*
nsparent
;
nsIDOMRange
*
range
;
...
...
@@ -112,12 +111,7 @@ HRESULT replace_node_by_html(nsIDOMHTMLDocument *nsdoc, nsIDOMNode *nsnode, cons
nsresult
nsres
;
HRESULT
hres
=
S_OK
;
nsres
=
nsIDOMHTMLDocument_QueryInterface
(
nsdoc
,
&
IID_nsIDOMDocumentRange
,
(
void
**
)
&
nsdocrange
);
if
(
NS_FAILED
(
nsres
))
return
E_FAIL
;
nsres
=
nsIDOMDocumentRange_CreateRange
(
nsdocrange
,
&
range
);
nsIDOMDocumentRange_Release
(
nsdocrange
);
nsres
=
nsIDOMHTMLDocument_CreateRange
(
nsdoc
,
&
range
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"CreateRange failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
...
...
@@ -1260,7 +1254,6 @@ static HRESULT WINAPI HTMLElement_insertAdjacentHTML(IHTMLElement *iface, BSTR w
BSTR
html
)
{
HTMLElement
*
This
=
impl_from_IHTMLElement
(
iface
);
nsIDOMDocumentRange
*
nsdocrange
;
nsIDOMRange
*
range
;
nsIDOMNSRange
*
nsrange
;
nsIDOMNode
*
nsnode
;
...
...
@@ -1275,14 +1268,7 @@ static HRESULT WINAPI HTMLElement_insertAdjacentHTML(IHTMLElement *iface, BSTR w
return
E_UNEXPECTED
;
}
nsres
=
nsIDOMDocument_QueryInterface
(
This
->
node
.
doc
->
nsdoc
,
&
IID_nsIDOMDocumentRange
,
(
void
**
)
&
nsdocrange
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"getting nsIDOMDocumentRange failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
nsres
=
nsIDOMDocumentRange_CreateRange
(
nsdocrange
,
&
range
);
nsIDOMDocumentRange_Release
(
nsdocrange
);
nsres
=
nsIDOMHTMLDocument_CreateRange
(
This
->
node
.
doc
->
nsdoc
,
&
range
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"CreateRange failed: %08x
\n
"
,
nsres
);
...
...
dlls/mshtml/htmlelem2.c
View file @
bf4b8691
...
...
@@ -716,18 +716,13 @@ static HRESULT WINAPI HTMLElement2_get_tabIndex(IHTMLElement2 *iface, short *p)
static
HRESULT
WINAPI
HTMLElement2_focus
(
IHTMLElement2
*
iface
)
{
HTMLElement
*
This
=
impl_from_IHTMLElement2
(
iface
);
nsIDOMNSHTMLElement
*
nselem
;
nsresult
nsres
;
TRACE
(
"(%p)
\n
"
,
This
);
nsres
=
nsIDOMHTMLElement_QueryInterface
(
This
->
nselem
,
&
IID_nsIDOMNSHTMLElement
,
(
void
**
)
&
nselem
);
if
(
NS_SUCCEEDED
(
nsres
))
{
nsIDOMNSHTMLElement_Focus
(
nselem
);
nsIDOMNSHTMLElement_Release
(
nselem
);
}
else
{
ERR
(
"Could not get nsIDOMHTMLNSElement: %08x
\n
"
,
nsres
);
}
nsres
=
nsIDOMHTMLElement_Focus
(
This
->
nselem
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"Focus failed: %08x
\n
"
,
nsres
);
return
S_OK
;
}
...
...
dlls/mshtml/htmlevent.c
View file @
bf4b8691
...
...
@@ -777,19 +777,12 @@ static HTMLEventObj *create_event(HTMLDOMNode *target, eventid_t eid, nsIDOMEven
if
(
nsevent
)
{
nsIDOMEvent_AddRef
(
nsevent
);
}
else
if
(
event_types
[
event_info
[
eid
].
type
])
{
ns
IDOMDocumentEvent
*
doc_event
;
ns
AString
type_str
;
nsresult
nsres
;
nsres
=
nsIDOMHTMLDocument_QueryInterface
(
target
->
doc
->
nsdoc
,
&
IID_nsIDOMDocumentEvent
,
(
void
**
)
&
doc_event
);
if
(
NS_SUCCEEDED
(
nsres
))
{
nsAString
type_str
;
nsAString_InitDepend
(
&
type_str
,
event_types
[
event_info
[
eid
].
type
]);
nsres
=
nsIDOMDocumentEvent_CreateEvent
(
doc_event
,
&
type_str
,
&
ret
->
nsevent
);
nsAString_Finish
(
&
type_str
);
nsIDOMDocumentEvent_Release
(
doc_event
);
}
nsAString_InitDepend
(
&
type_str
,
event_types
[
event_info
[
eid
].
type
]);
nsres
=
nsIDOMHTMLDocument_CreateEvent
(
target
->
doc
->
nsdoc
,
&
type_str
,
&
ret
->
nsevent
);
nsAString_Finish
(
&
type_str
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not create event: %08x
\n
"
,
nsres
);
IHTMLEventObj_Release
(
&
ret
->
IHTMLEventObj_iface
);
...
...
dlls/mshtml/htmlwindow.c
View file @
bf4b8691
...
...
@@ -85,32 +85,15 @@ static void window_set_docnode(HTMLWindow *window, HTMLDocumentNode *doc_node)
nsIDOMWindow
*
get_nsdoc_window
(
nsIDOMDocument
*
nsdoc
)
{
nsIDOMDocumentView
*
nsdocview
;
nsIDOMAbstractView
*
nsview
;
nsIDOMWindow
*
nswindow
;
nsresult
nsres
;
nsres
=
nsIDOMDocument_QueryInterface
(
nsdoc
,
&
IID_nsIDOMDocumentView
,
(
void
**
)
&
nsdocview
);
nsIDOMDocument_Release
(
nsdoc
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMDocumentView iface: %08x
\n
"
,
nsres
);
return
NULL
;
}
nsres
=
nsIDOMDocumentView_GetDefaultView
(
nsdocview
,
&
nsview
);
nsIDOMDocumentView_Release
(
nsdocview
);
nsres
=
nsIDOMDocument_GetDefaultView
(
nsdoc
,
&
nswindow
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetDefaultView failed: %08x
\n
"
,
nsres
);
return
NULL
;
}
nsres
=
nsIDOMAbstractView_QueryInterface
(
nsview
,
&
IID_nsIDOMWindow
,
(
void
**
)
&
nswindow
);
nsIDOMAbstractView_Release
(
nsview
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMWindow iface: %08x
\n
"
,
nsres
);
return
NULL
;
}
return
nswindow
;
}
...
...
dlls/mshtml/mutation.c
View file @
bf4b8691
...
...
@@ -549,7 +549,7 @@ static void NSAPI nsDocumentObserver_EndLoad(nsIDocumentObserver *iface, nsIDocu
}
static
void
NSAPI
nsDocumentObserver_ContentStatesChanged
(
nsIDocumentObserver
*
iface
,
nsIDocument
*
aDocument
,
nsIContent
*
aContent
1
,
nsIContent
*
aContent2
,
nsEventStates
aStateMask
)
nsIContent
*
aContent
,
nsEventStates
aStateMask
)
{
}
...
...
dlls/mshtml/npplugin.c
View file @
bf4b8691
...
...
@@ -96,29 +96,21 @@ static nsIDOMElement *get_dom_element(NPP instance)
{
nsISupports
*
instance_unk
=
(
nsISupports
*
)
instance
->
ndata
;
nsIPluginInstance
*
plugin_instance
;
nsIPluginInstanceOwner
*
owner
;
nsIPluginTagInfo
*
tag_info
;
nsIDOMElement
*
elem
;
nsresult
nsres
;
nsres
=
nsISupports_QueryInterface
(
instance_unk
,
&
IID_nsIPluginInstance
,
(
void
**
)
&
plugin_instance
);
if
(
NS_FAILED
(
nsres
))
return
NULL
;
nsres
=
nsIPluginInstance_GetOwner
(
plugin_instance
,
&
owner
);
nsIPluginInstance_Release
(
instance_unk
);
if
(
NS_FAILED
(
nsres
)
||
!
owner
)
return
NULL
;
nsres
=
nsISupports_QueryInterface
(
owner
,
&
IID_nsIPluginTagInfo
,
(
void
**
)
&
tag_info
);
nsISupports_Release
(
owner
);
if
(
NS_FAILED
(
nsres
))
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIPluginInstance interface: %08x
\n
"
,
nsres
);
return
NULL
;
}
nsres
=
nsIPluginTagInfo_GetDOMElement
(
tag_info
,
&
elem
);
nsIPluginTagInfo_Release
(
tag_info
);
if
(
NS_FAILED
(
nsres
))
nsres
=
nsIPluginInstance_GetDOMElement
(
plugin_instance
,
&
elem
);
nsIPluginInstance_Release
(
plugin_instance
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetDOMElement failed: %08x
\n
"
,
nsres
);
return
NULL
;
}
return
elem
;
}
...
...
dlls/mshtml/nsiface.idl
View file @
bf4b8691
This diff is collapsed.
Click to expand it.
dlls/mshtml/nsio.c
View file @
bf4b8691
...
...
@@ -1507,6 +1507,51 @@ static nsresult NSAPI nsHttpChannelInternal_SetChannelIsForDownload(nsIHttpChann
return
NS_ERROR_NOT_IMPLEMENTED
;
}
static
nsresult
NSAPI
nsHttpChannelInternal_GetLocalAddress
(
nsIHttpChannelInternal
*
iface
,
nsACString
*
aLocalAddress
)
{
nsChannel
*
This
=
impl_from_nsIHttpChannelInternal
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
aLocalAddress
);
return
NS_ERROR_NOT_IMPLEMENTED
;
}
static
nsresult
NSAPI
nsHttpChannelInternal_GetLocalPort
(
nsIHttpChannelInternal
*
iface
,
PRInt32
*
aLocalPort
)
{
nsChannel
*
This
=
impl_from_nsIHttpChannelInternal
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
aLocalPort
);
return
NS_ERROR_NOT_IMPLEMENTED
;
}
static
nsresult
NSAPI
nsHttpChannelInternal_GetRemoteAddress
(
nsIHttpChannelInternal
*
iface
,
nsACString
*
aRemoteAddress
)
{
nsChannel
*
This
=
impl_from_nsIHttpChannelInternal
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
aRemoteAddress
);
return
NS_ERROR_NOT_IMPLEMENTED
;
}
static
nsresult
NSAPI
nsHttpChannelInternal_GetRemotePort
(
nsIHttpChannelInternal
*
iface
,
PRInt32
*
aRemotePort
)
{
nsChannel
*
This
=
impl_from_nsIHttpChannelInternal
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
aRemotePort
);
return
NS_ERROR_NOT_IMPLEMENTED
;
}
static
nsresult
NSAPI
nsHttpChannelInternal_SetCacheKeysRedirectChain
(
nsIHttpChannelInternal
*
iface
,
void
*
cacheKeys
)
{
nsChannel
*
This
=
impl_from_nsIHttpChannelInternal
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
cacheKeys
);
return
NS_ERROR_NOT_IMPLEMENTED
;
}
static
const
nsIHttpChannelInternalVtbl
nsHttpChannelInternalVtbl
=
{
nsHttpChannelInternal_QueryInterface
,
nsHttpChannelInternal_AddRef
,
...
...
@@ -1521,7 +1566,12 @@ static const nsIHttpChannelInternalVtbl nsHttpChannelInternalVtbl = {
nsHttpChannelInternal_SetForceAllowThirdPartyCookie
,
nsHttpChannelInternal_GetCanceled
,
nsHttpChannelInternal_GetChannelIsForDownload
,
nsHttpChannelInternal_SetChannelIsForDownload
nsHttpChannelInternal_SetChannelIsForDownload
,
nsHttpChannelInternal_GetLocalAddress
,
nsHttpChannelInternal_GetLocalPort
,
nsHttpChannelInternal_GetRemoteAddress
,
nsHttpChannelInternal_GetRemotePort
,
nsHttpChannelInternal_SetCacheKeysRedirectChain
};
...
...
@@ -2038,6 +2088,57 @@ static nsresult NSAPI nsURI_SetPath(nsIURL *iface, const nsACString *aPath)
return
NS_OK
;
}
static
nsresult
NSAPI
nsURL_GetRef
(
nsIURL
*
iface
,
nsACString
*
aRef
)
{
nsWineURI
*
This
=
impl_from_nsIURL
(
iface
);
char
*
refa
=
NULL
;
BSTR
ref
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
aRef
);
if
(
!
ensure_uri
(
This
))
return
NS_ERROR_UNEXPECTED
;
hres
=
IUri_GetFragment
(
This
->
uri
,
&
ref
);
if
(
FAILED
(
hres
))
return
NS_ERROR_UNEXPECTED
;
refa
=
heap_strdupWtoA
(
ref
);
SysFreeString
(
ref
);
if
(
ref
&&
!
refa
)
return
NS_ERROR_OUT_OF_MEMORY
;
nsACString_SetData
(
aRef
,
refa
&&
*
refa
==
'#'
?
refa
+
1
:
refa
);
heap_free
(
refa
);
return
NS_OK
;
}
static
nsresult
NSAPI
nsURL_SetRef
(
nsIURL
*
iface
,
const
nsACString
*
aRef
)
{
nsWineURI
*
This
=
impl_from_nsIURL
(
iface
);
const
char
*
refa
;
WCHAR
*
ref
;
HRESULT
hres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_nsacstr
(
aRef
));
if
(
!
ensure_uri_builder
(
This
))
return
NS_ERROR_UNEXPECTED
;
nsACString_GetData
(
aRef
,
&
refa
);
ref
=
heap_strdupAtoW
(
refa
);
if
(
!
ref
)
return
NS_ERROR_OUT_OF_MEMORY
;
hres
=
IUriBuilder_SetFragment
(
This
->
uri_builder
,
ref
);
heap_free
(
ref
);
if
(
FAILED
(
hres
))
return
NS_ERROR_UNEXPECTED
;
return
NS_OK
;
}
static
nsresult
NSAPI
nsURI_Equals
(
nsIURL
*
iface
,
nsIURI
*
other
,
PRBool
*
_retval
)
{
nsWineURI
*
This
=
impl_from_nsIURL
(
iface
);
...
...
@@ -2065,6 +2166,13 @@ static nsresult NSAPI nsURI_Equals(nsIURL *iface, nsIURI *other, PRBool *_retval
return
nsres
;
}
static
nsresult
NSAPI
nsURI_EqualsExceptRef
(
nsIURL
*
iface
,
nsIURI
*
other
,
PRBool
*
_retval
)
{
nsWineURI
*
This
=
impl_from_nsIURL
(
iface
);
FIXME
(
"(%p)->(%p %p)
\n
"
,
This
,
other
,
_retval
);
return
nsIURL_Equals
(
&
This
->
nsIURL_iface
,
other
,
_retval
);
}
static
nsresult
NSAPI
nsURI_SchemeIs
(
nsIURL
*
iface
,
const
char
*
scheme
,
PRBool
*
_retval
)
{
nsWineURI
*
This
=
impl_from_nsIURL
(
iface
);
...
...
@@ -2117,6 +2225,13 @@ static nsresult NSAPI nsURI_Clone(nsIURL *iface, nsIURI **_retval)
return
NS_OK
;
}
static
nsresult
NSAPI
nsURI_CloneIgnoreRef
(
nsIURL
*
iface
,
nsIURI
**
_retval
)
{
nsWineURI
*
This
=
impl_from_nsIURL
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
_retval
);
return
nsIURL_Clone
(
&
This
->
nsIURL_iface
,
_retval
);
}
static
nsresult
NSAPI
nsURI_Resolve
(
nsIURL
*
iface
,
const
nsACString
*
aRelativePath
,
nsACString
*
_retval
)
{
...
...
@@ -2271,57 +2386,6 @@ static nsresult NSAPI nsURL_SetQuery(nsIURL *iface, const nsACString *aQuery)
return
NS_OK
;
}
static
nsresult
NSAPI
nsURL_GetRef
(
nsIURL
*
iface
,
nsACString
*
aRef
)
{
nsWineURI
*
This
=
impl_from_nsIURL
(
iface
);
char
*
refa
=
NULL
;
BSTR
ref
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
aRef
);
if
(
!
ensure_uri
(
This
))
return
NS_ERROR_UNEXPECTED
;
hres
=
IUri_GetFragment
(
This
->
uri
,
&
ref
);
if
(
FAILED
(
hres
))
return
NS_ERROR_UNEXPECTED
;
refa
=
heap_strdupWtoA
(
ref
);
SysFreeString
(
ref
);
if
(
ref
&&
!
refa
)
return
NS_ERROR_OUT_OF_MEMORY
;
nsACString_SetData
(
aRef
,
refa
&&
*
refa
==
'#'
?
refa
+
1
:
refa
);
heap_free
(
refa
);
return
NS_OK
;
}
static
nsresult
NSAPI
nsURL_SetRef
(
nsIURL
*
iface
,
const
nsACString
*
aRef
)
{
nsWineURI
*
This
=
impl_from_nsIURL
(
iface
);
const
char
*
refa
;
WCHAR
*
ref
;
HRESULT
hres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_nsacstr
(
aRef
));
if
(
!
ensure_uri_builder
(
This
))
return
NS_ERROR_UNEXPECTED
;
nsACString_GetData
(
aRef
,
&
refa
);
ref
=
heap_strdupAtoW
(
refa
);
if
(
!
ref
)
return
NS_ERROR_OUT_OF_MEMORY
;
hres
=
IUriBuilder_SetFragment
(
This
->
uri_builder
,
ref
);
heap_free
(
ref
);
if
(
FAILED
(
hres
))
return
NS_ERROR_UNEXPECTED
;
return
NS_OK
;
}
static
nsresult
NSAPI
nsURL_GetDirectory
(
nsIURL
*
iface
,
nsACString
*
aDirectory
)
{
nsWineURI
*
This
=
impl_from_nsIURL
(
iface
);
...
...
@@ -2499,9 +2563,13 @@ static const nsIURLVtbl nsURLVtbl = {
nsURI_SetPort
,
nsURI_GetPath
,
nsURI_SetPath
,
nsURL_GetRef
,
nsURL_SetRef
,
nsURI_Equals
,
nsURI_EqualsExceptRef
,
nsURI_SchemeIs
,
nsURI_Clone
,
nsURI_CloneIgnoreRef
,
nsURI_Resolve
,
nsURI_GetAsciiSpec
,
nsURI_GetAsciiHost
,
...
...
@@ -2512,8 +2580,6 @@ static const nsIURLVtbl nsURLVtbl = {
nsURL_SetParam
,
nsURL_GetQuery
,
nsURL_SetQuery
,
nsURL_GetRef
,
nsURL_SetRef
,
nsURL_GetDirectory
,
nsURL_SetDirectory
,
nsURL_GetFileName
,
...
...
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