分享

Webkit之常用对象API梳理

 wusiqi111 2019-08-15

本文链接:https://blog.csdn.net/sauphy/article/details/49893895

1)Node

#NodeType nodeType()//获取节点类型

#ContainerNode parentNode()//容器节点

#Element parentElement()//父亲元素

#Node

>>previousSibling()、nextSibling()//前后节点

>>childNodes()、firstChild()、lastChild()//孩子兄弟

>>lastDescendant()、firstDescendant//继承节点

#NamedNodeMap attributes()//获取属性列表

#ScriptExecutionContext scriptExecutionContext()//script执行上下文。

#RenderObject renderer()、nextRenderer()、previousRenderer()//渲染对象

#RenderBox renderBox()//渲染Box

#RenderBoxModelObject renderBoxModelObject()//渲染Box模型

#RenderStyle renderStyle()、computedStyle()//渲染Style信息体

#NodeList

>>getElementsByTagName()

>>getElementsByTagNameNS()

>>getElementsByName()

>>getElementsByClassName()

2)RenderObject

#Document document()//获取文档对象

#Frame frame()//数据Frame

#Node node()//数据节点

#RenderView view()//渲染物理View

#RenderStyle style()//渲染信息

3)RenderStyle

#inheritFrom():继承父元素

#RenderStyle//获取渲染样式

>>addCachedPseudoStyle()、removeCachedPseudoStyle()、getCachedPseudoStyle()

#create()、createDefaultStyle()、createAnonymousStyle()

#clone()//克隆

4)RenderTheme

#创建:defaultTheme()

#操作:

void adjustStyle()//Style发生改变时需要调度此函数。

bool paint(RenderObject*, const PaintInfo&, const IntRect&);

//绘制RenderObject的的背景,前景一般由engine提供(button`s text)

5)RenderThemeQt

#static void initStyleOption(QWidget *widget, QStyleOption& option)

 //根据QWidget的特性提取QStyleOption信息。

#QStyleFactory::create(QLatin1String("windows"));

 //创建默认的QStyle式样。

#绘制操作:

 paintButton(RenderObject* o, const PaintInfo& i, const IntRect& r)

 paintTextField():绘制文本域

 paintTextArea():绘制文本域

 paintMenuList():菜单列表

 paintMenuListButton():菜单列表按钮

 paintProgressBar():绘制进度条

 paintSliderTrack():绘制滑动条(slider)

 paintSliderThumb():绘制Slider的首部

 paintSearchField():绘制搜查域

 paintSearchFieldCancelButton

 paintSearchFieldDecoration

 paintSearchFieldResultsDecoration

 paintMediaBackground

 paintMediaFullscreenButton

 paintMediaMuteButton

 paintMediaSeekBackButton

 paintCheckbox

 paintRadiobox

6)StylePainter介绍(QWidget、QPainter、QStyle的枢纽带)

#构造:

>>explicit StylePainter(RenderThemeQt*, const PaintInfo&);

#绘制操作:

 void drawPrimitive(QStyle::PrimitiveElement pe, const QStyleOption& opt);

 void drawControl(QStyle::ControlElement ce, const QStyleOption& opt);

 void drawComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex& opt);

7)Event

#路径:WebCore/dom/Event.h

9)HTMLAnchorElement

#基本属性:

>>name、target、path、host、port、href、protecol、search、text

11)网络加载端的API

ResourceHandle::prepareForURL(document()->completeURL(parsedURL))

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多