设置 webkit 背景透明的几种办法
来源:互联网 发布:linux设置jdk环境变量 编辑:程序博客网 时间:2024/06/05 14:50
1.
FrameLoaderClientGtk.cpp:
void FrameLoaderClient::transitionToCommittedForNewPage()
{
WebKitWebView* containingWindow = getViewFromFrame(m_frame);
IntSize size = IntSize(GTK_WIDGET(containingWindow)->allocation.width,
GTK_WIDGET(containingWindow)->allocation.height);
bool transparent = webkit_web_view_get_transparent(containingWindow); //modify by raulli 20110922
Color backgroundColor = transparent ? WebCore::Color::transparent : WebCore::Color::white;
Frame* frame = core(m_frame);
ASSERT(frame);
frame->createView(size, backgroundColor, transparent, IntSize(), false);
// We need to do further manipulation on the FrameView if it was the mainFrame
if (frame != frame->page()->mainFrame())
return;
postCommitFrameViewSetup(m_frame, frame->view(), true);
}
2.
FrameView.cpp
void FrameView::setBaseBackgroundColor(Color bc)
{
printf("###### %s:%s:%d bc=0x%0x m_baseBackgroundColor=0x%0x\n",__FILE__,__FUNCTION__,__LINE__,bc.rgb(),m_baseBackgroundColor.rgb());
if (!bc.isValid())
{
printf("###### %s:%s:%d bc=0x%0x m_baseBackgroundColor=0x%0x\n",__FILE__,__FUNCTION__,__LINE__,bc.rgb(),m_baseBackgroundColor.rgb());
bc = Color::white;
}
printf("###### %s:%s:%d bc=0x%0x m_baseBackgroundColor=0x%0x\n",__FILE__,__FUNCTION__,__LINE__,bc.rgb(),m_baseBackgroundColor.rgb());
m_baseBackgroundColor = bc;
}
以上两处改成你自己需要的颜色就可以了
- 设置 webkit 背景透明的几种办法
- 设置 webkit 背景透明的几种办法
- 设置透明的背景
- 透明背景的设置
- VC++学习笔记3--------------设置static text背景为透明的办法
- 实现控件透明背景的几种方案
- Windows窗口背景透明的几种方法
- HTML中加入透明背景flash的几种方法
- C#控件背景透明的几种解决方案
- 实现控件背景透明的几种方法
- 有关webkit背景挖洞透明的思维集合
- 设置对话框背景的几种方法
- 设置透明背景效果的三种方法
- Activity的透明背景度的设置
- 将图片的背景设置为透明
- 透明背景的开/关设置
- 设置flash的背景为透明
- android apk背景设置透明的方式
- android 滚动条 相关属性
- 解释一下ruby中的特殊方法与特殊类?
- 007 SG 注意事项 04
- JSpider学习二 —— 应用示例
- Android PackageManagerService详细分析
- 设置 webkit 背景透明的几种办法
- post提交和get提交的区别
- Ajax检测注册用户是否存在
- hibernate 总结
- 认清事实,看清真相,利剑苍穹,奋勇富强
- Learning XPath
- Flex给Stage添加键盘监听
- 解决program or unit 'variants' recursively uses itself报错问题
- MyEclipse 8以上反编译插件jad安装方法