设置 webkit 背景透明的几种办法
2014-11-18 21:59
344 查看
void
FrameLoaderClient::transitionToCommittedForNewPage()
02.
{
03.
WebKitWebView* containingWindow = getViewFromFrame(m_frame);
04.
IntSize size = IntSize(GTK_WIDGET(containingWindow)->allocation.width,
05.
GTK_WIDGET(containingWindow)->allocation.height);
06.
bool
transparent = webkit_web_view_get_transparent(containingWindow);
//modify by raulli 20110922
07.
Color backgroundColor = transparent ? WebCore::Color::transparent : WebCore::Color::white;
08.
Frame* frame = core(m_frame);
09.
ASSERT(frame);
10.
11.
frame->createView(size, backgroundColor, transparent, IntSize(),
false
);
12.
13.
// We need to do further manipulation on the FrameView if it was the mainFrame
14.
if
(frame != frame->page()->mainFrame())
15.
return
;
16.
17.
postCommitFrameViewSetup(m_frame, frame->view(),
true
);
18.
}
19.
20.
2.
21.
22.
FrameView.cpp
23.
void
FrameView::setBaseBackgroundColor(Color bc)
24.
{
25.
printf
(
"###### %s:%s:%d bc=0x%0x m_baseBackgroundColor=0x%0x\n"
,__FILE__,__FUNCTION__,__LINE__,bc.rgb(),m_baseBackgroundColor.rgb());
26.
if
(!bc.isValid())
27.
{
28.
printf
(
"###### %s:%s:%d bc=0x%0x m_baseBackgroundColor=0x%0x\n"
,__FILE__,__FUNCTION__,__LINE__,bc.rgb(),m_baseBackgroundColor.rgb());
29.
bc = Color::white;
30.
}
31.
printf
(
"###### %s:%s:%d bc=0x%0x m_baseBackgroundColor=0x%0x\n"
,__FILE__,__FUNCTION__,__LINE__,bc.rgb(),m_baseBackgroundColor.rgb());
32.
m_baseBackgroundColor = bc;
33.
}
相关文章推荐
- 设置 webkit 背景透明的几种办法
- 设置static text背景为透明的办法
- VC++学习笔记3--------------设置static text背景为透明的办法
- JPanel设置背景以及Jpanel设置透明的解决办法
- C# winfrom中Flash播放使用axShockwaveFlash控件设置透明XP出现白色背景解决办法,仿QQ魔法表情效果
- QT下的几种透明效果(QPalette背景白色,窗口设置setWindowOpacity,QPainter使用Clear模式绘图)
- 如何设置能够使网页中的FLASH背景透明
- 给TreeView设置背景图片-------即将TreeView的背景设为透明的方法
- 设置iframe框架背景透明
- ie下iframe设置背景透明
- png 设置透明背景
- 设置CEdit控件背景为透明 C++ MFC
- 将文本输入框的背景设置成透明
- ie ff中设置flash背景透明
- 网页制作中常用的基础知识001-将Flash文件的背景设置为透明
- 关于如何在iframe中设置背景颜色为透明
- 透明效果,可以设置透明值,做背景
- Flash透明背景设置
- 背景透明问题解决办法
- 如何设置网页的背景为透明