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
67e6c7f1
Commit
67e6c7f1
authored
Oct 27, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added HTML frames support.
parent
faf0b6bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
87 additions
and
12 deletions
+87
-12
mutation.c
dlls/mshtml/mutation.c
+60
-12
nsiface.idl
dlls/mshtml/nsiface.idl
+27
-0
No files found.
dlls/mshtml/mutation.c
View file @
67e6c7f1
...
...
@@ -37,6 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
enum
{
MUTATION_COMMENT
,
MUTATION_FRAME
,
MUTATION_IFRAME
,
MUTATION_SCRIPT
};
...
...
@@ -245,10 +246,30 @@ static void pop_mutation_queue(HTMLDocumentNode *doc)
heap_free
(
tmp
);
}
static
nsresult
init_nsdoc_window
(
HTMLDocumentNode
*
doc
,
nsIDOMDocument
*
nsdoc
)
{
nsIDOMWindow
*
nswindow
;
nswindow
=
get_nsdoc_window
(
nsdoc
);
if
(
!
nswindow
)
return
NS_ERROR_FAILURE
;
if
(
!
nswindow_to_window
(
nswindow
))
{
HTMLWindow
*
window
;
HRESULT
hres
;
hres
=
HTMLWindow_Create
(
doc
->
basedoc
.
doc_obj
,
nswindow
,
doc
->
basedoc
.
window
,
&
window
);
if
(
SUCCEEDED
(
hres
))
IHTMLWindow2_Release
(
HTMLWINDOW2
(
window
));
}
nsIDOMWindow_Release
(
nswindow
);
return
NS_OK
;
}
static
nsresult
init_iframe_window
(
HTMLDocumentNode
*
doc
,
nsISupports
*
nsunk
)
{
nsIDOMHTMLIFrameElement
*
nsiframe
;
nsIDOMWindow
*
nswindow
;
nsIDOMDocument
*
nsdoc
;
nsresult
nsres
;
...
...
@@ -265,22 +286,35 @@ static nsresult init_iframe_window(HTMLDocumentNode *doc, nsISupports *nsunk)
return
nsres
;
}
nswindow
=
get_nsdoc_window
(
nsdoc
);
nsres
=
init_nsdoc_window
(
doc
,
nsdoc
);
nsIDOMDocument_Release
(
nsdoc
);
if
(
!
nswindow
)
return
NS_ERROR_FAILURE
;
return
nsres
;
}
if
(
!
nswindow_to_window
(
nswindow
))
{
HTMLWindow
*
window
;
HRESULT
hres
;
static
nsresult
init_frame_window
(
HTMLDocumentNode
*
doc
,
nsISupports
*
nsunk
)
{
nsIDOMHTMLFrameElement
*
nsframe
;
nsIDOMDocument
*
nsdoc
;
nsresult
nsres
;
hres
=
HTMLWindow_Create
(
doc
->
basedoc
.
doc_obj
,
nswindow
,
doc
->
basedoc
.
window
,
&
window
);
if
(
SUCCEEDED
(
hres
))
IHTMLWindow2_Release
(
HTMLWINDOW2
(
window
));
nsres
=
nsISupports_QueryInterface
(
nsunk
,
&
IID_nsIDOMHTMLFrameElement
,
(
void
**
)
&
nsframe
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMHTMLFrameElement: %08x
\n
"
,
nsres
);
return
nsres
;
}
nsIDOMWindow_Release
(
nswindow
);
return
NS_OK
;
nsres
=
nsIDOMHTMLFrameElement_GetContentDocument
(
nsframe
,
&
nsdoc
);
nsIDOMHTMLFrameElement_Release
(
nsframe
);
if
(
NS_FAILED
(
nsres
)
||
!
nsdoc
)
{
ERR
(
"GetContentDocument failed: %08x
\n
"
,
nsres
);
return
nsres
;
}
nsres
=
init_nsdoc_window
(
doc
,
nsdoc
);
nsIDOMDocument_Release
(
nsdoc
);
return
nsres
;
}
static
nsresult
NSAPI
nsRunnable_Run
(
nsIRunnable
*
iface
)
...
...
@@ -339,6 +373,10 @@ static nsresult NSAPI nsRunnable_Run(nsIRunnable *iface)
break
;
}
case
MUTATION_FRAME
:
init_frame_window
(
This
,
This
->
mutation_queue
->
nsiface
);
break
;
case
MUTATION_IFRAME
:
init_iframe_window
(
This
,
This
->
mutation_queue
->
nsiface
);
break
;
...
...
@@ -562,6 +600,7 @@ static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface,
{
HTMLDocumentNode
*
This
=
NSDOCOBS_THIS
(
iface
);
nsIDOMHTMLIFrameElement
*
nsiframe
;
nsIDOMHTMLFrameElement
*
nsframe
;
nsIDOMComment
*
nscomment
;
nsIDOMElement
*
nselem
;
nsresult
nsres
;
...
...
@@ -591,6 +630,15 @@ static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface,
nsIDOMHTMLIFrameElement_Release
(
nsiframe
);
add_script_runner
(
This
);
}
nsres
=
nsISupports_QueryInterface
(
aContent
,
&
IID_nsIDOMHTMLFrameElement
,
(
void
**
)
&
nsframe
);
if
(
NS_SUCCEEDED
(
nsres
))
{
TRACE
(
"frame node
\n
"
);
push_mutation_queue
(
This
,
MUTATION_FRAME
,
(
nsISupports
*
)
nsframe
);
nsIDOMHTMLFrameElement_Release
(
nsframe
);
add_script_runner
(
This
);
}
}
static
void
NSAPI
nsDocumentObserver_DoneAddingChildren
(
nsIDocumentObserver
*
iface
,
nsIContent
*
aContent
,
...
...
dlls/mshtml/nsiface.idl
View file @
67e6c7f1
...
...
@@ -1513,6 +1513,33 @@ interface nsIDOMHTMLIFrameElement : nsIDOMHTMLElement
[
object,
uuid(a6cf90b9-15b3-11d2-932e-00805f8add32),
local
/* FROZEN */
]
interface nsIDOMHTMLFrameElement : nsIDOMHTMLElement
{
nsresult GetFrameBorder(nsAString *aFrameBorder);
nsresult SetFrameBorder(const nsAString *aFrameBorder);
nsresult GetLongDesc(nsAString *aLongDesc);
nsresult SetLongDesc(const nsAString *aLongDesc);
nsresult GetMarginHeight(nsAString *aMarginHeight);
nsresult SetMarginHeight(const nsAString *aMarginHeight);
nsresult GetMarginWidth(nsAString *aMarginWidth);
nsresult SetMarginWidth(const nsAString *aMarginWidth);
nsresult GetName(nsAString *aName);
nsresult SetName(const nsAString *aName);
nsresult GetNoResize(PRBool *aNoResize);
nsresult SetNoResize(PRBool aNoResize);
nsresult GetScrolling(nsAString *aScrolling);
nsresult SetScrolling(const nsAString *aScrolling);
nsresult GetSrc(nsAString *aSrc);
nsresult SetSrc(const nsAString *aSrc);
nsresult GetContentDocument(nsIDOMDocument **aContentDocument);
}
[
object,
uuid(94928ab3-8b63-11d3-989d-001083010e9b),
local
/* FROZEN */
...
...
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