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
f11ed78b
Commit
f11ed78b
authored
Mar 29, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 29, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added support for anchors with target '_top'.
parent
81fe4bd8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
12 deletions
+26
-12
htmlanchor.c
dlls/mshtml/htmlanchor.c
+13
-7
htmlwindow.c
dlls/mshtml/htmlwindow.c
+12
-5
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
No files found.
dlls/mshtml/htmlanchor.c
View file @
f11ed78b
...
...
@@ -73,6 +73,7 @@ static HRESULT navigate_anchor_window(HTMLAnchorElement *This, const WCHAR *targ
static
HRESULT
navigate_anchor
(
HTMLAnchorElement
*
This
)
{
nsAString
href_str
,
target_str
;
HTMLWindow
*
window
=
NULL
;
nsresult
nsres
;
HRESULT
hres
=
E_FAIL
;
...
...
@@ -87,14 +88,18 @@ static HRESULT navigate_anchor(HTMLAnchorElement *This)
nsAString_GetData
(
&
target_str
,
&
target
);
if
(
*
target
&&
strcmpiW
(
target
,
_selfW
))
{
if
(
strcmpiW
(
target
,
_parentW
)
&&
strcmpiW
(
target
,
_topW
))
{
hres
=
navigate_anchor_window
(
This
,
target
);
if
(
!
strcmpiW
(
target
,
_topW
))
{
TRACE
(
"target _top
\n
"
);
get_top_window
(
This
->
element
.
node
.
doc
->
basedoc
.
window
,
&
window
);
}
else
if
(
!
strcmpiW
(
target
,
_parentW
))
{
FIXME
(
"Navigating to target _parent is not implemented
\n
"
);
nsAString_Finish
(
&
target_str
);
return
S_OK
;
}
else
{
FIXME
(
"Navigating to target %s is not implemented
\n
"
,
debugstr_w
(
target
));
hres
=
S_OK
;
hres
=
navigate_anchor_window
(
This
,
target
);
nsAString_Finish
(
&
target_str
);
return
hres
;
}
nsAString_Finish
(
&
target_str
);
return
hres
;
}
}
nsAString_Finish
(
&
target_str
);
...
...
@@ -106,7 +111,8 @@ static HRESULT navigate_anchor(HTMLAnchorElement *This)
nsAString_GetData
(
&
href_str
,
&
href
);
if
(
*
href
)
{
HTMLWindow
*
window
=
This
->
element
.
node
.
doc
->
basedoc
.
window
;
if
(
!
window
)
window
=
This
->
element
.
node
.
doc
->
basedoc
.
window
;
hres
=
navigate_url
(
window
,
href
,
window
->
url
);
}
else
{
TRACE
(
"empty href
\n
"
);
...
...
dlls/mshtml/htmlwindow.c
View file @
f11ed78b
...
...
@@ -107,6 +107,14 @@ static HRESULT get_location(HTMLWindow *This, HTMLLocation **ret)
return
S_OK
;
}
void
get_top_window
(
HTMLWindow
*
window
,
HTMLWindow
**
ret
)
{
HTMLWindow
*
iter
;
for
(
iter
=
window
;
iter
->
parent
;
iter
=
iter
->
parent
);
*
ret
=
iter
;
}
static
inline
HRESULT
set_window_event
(
HTMLWindow
*
window
,
eventid_t
eid
,
VARIANT
*
var
)
{
if
(
!
window
->
doc
)
{
...
...
@@ -838,13 +846,12 @@ static HRESULT WINAPI HTMLWindow2_get_self(IHTMLWindow2 *iface, IHTMLWindow2 **p
static
HRESULT
WINAPI
HTMLWindow2_get_top
(
IHTMLWindow2
*
iface
,
IHTMLWindow2
**
p
)
{
HTMLWindow
*
This
=
impl_from_IHTMLWindow2
(
iface
);
HTMLWindow
*
curr
;
HTMLWindow
*
top
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
curr
=
This
;
while
(
curr
->
parent
)
curr
=
curr
->
parent
;
*
p
=
&
curr
->
IHTMLWindow2_iface
;
get_top_window
(
This
,
&
top
);
*
p
=
&
top
->
IHTMLWindow2_iface
;
IHTMLWindow2_AddRef
(
*
p
);
return
S_OK
;
...
...
dlls/mshtml/mshtml_private.h
View file @
f11ed78b
...
...
@@ -631,6 +631,7 @@ HRESULT create_document_fragment(nsIDOMNode*,HTMLDocumentNode*,HTMLDocumentNode*
HRESULT
HTMLWindow_Create
(
HTMLDocumentObj
*
,
nsIDOMWindow
*
,
HTMLWindow
*
,
HTMLWindow
**
)
DECLSPEC_HIDDEN
;
void
update_window_doc
(
HTMLWindow
*
)
DECLSPEC_HIDDEN
;
HTMLWindow
*
nswindow_to_window
(
const
nsIDOMWindow
*
)
DECLSPEC_HIDDEN
;
void
get_top_window
(
HTMLWindow
*
,
HTMLWindow
**
)
DECLSPEC_HIDDEN
;
HTMLOptionElementFactory
*
HTMLOptionElementFactory_Create
(
HTMLWindow
*
)
DECLSPEC_HIDDEN
;
HTMLImageElementFactory
*
HTMLImageElementFactory_Create
(
HTMLWindow
*
)
DECLSPEC_HIDDEN
;
HRESULT
HTMLLocation_Create
(
HTMLWindow
*
,
HTMLLocation
**
)
DECLSPEC_HIDDEN
;
...
...
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