blink渲染知识11 - renderlayer tree的构建点

在收到了数据后,网页加载完成,创建rendertree时,也会对应创建renderlayer.

创建renderlayerCallstack:



#0 WebCore::RenderLayer::RenderLayer (this=0x69014000,renderer=0x69004000, type=<optimized out>) at../../third_party/WebKit/Source/core/rendering/RenderLayer.cpp:153

#1 0x610d689c in WebCore::RenderLayerModelObject::createLayer(this=this@entry=0x69004000,type=type@entry=WebCore::NormalLayer) at../../third_party/WebKit/Source/core/rendering/RenderLayerModelObject.cpp:59

#2 0x610d6a82 in WebCore::RenderLayerModelObject::styleDidChange(this=this@entry=0x69004000, diff=..., diff@entry=...,oldStyle=oldStyle@entry=0x0)

at../../third_party/WebKit/Source/core/rendering/RenderLayerModelObject.cpp:137

#3 0x610af712 in WebCore::RenderBox::styleDidChange(this=this@entry=0x69004000, diff=..., diff@entry=...,oldStyle=oldStyle@entry=0x0) at../../third_party/WebKit/Source/core/rendering/RenderBox.cpp:188

#4 0x610995cc in WebCore::RenderBlock::styleDidChange(this=this@entry=0x69004000, diff=..., diff@entry=...,oldStyle=oldStyle@entry=0x0) at../../third_party/WebKit/Source/core/rendering/RenderBlock.cpp:332

#5 0x6109f5ea in WebCore::RenderBlockFlow::styleDidChange(this=0x69004000, diff=..., oldStyle=0x0) at../../third_party/WebKit/Source/core/rendering/RenderBlockFlow.cpp:1836

#6 0x610eaa78 in WebCore::RenderObject::setStyle(this=this@entry=0x69004000, style=...) at../../third_party/WebKit/Source/core/rendering/RenderObject.cpp:2142

#7 0x60fbb694 in WebCore::Document::attach(this=0x66a04000, context=...) at../../third_party/WebKit/Source/core/dom/Document.cpp:2201//attach就是根据dom节点创建renderobject的时机

#8 0x61551b98 in WebCore::LocalDOMWindow::installNewDocument(this=0x3c7ec0e0, mimeType=..., init=...,forceXHTML=forceXHTML@entry=false) at../../third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp:401

#9 0x6159f2ee in WebCore::DocumentLoader::createWriterFor(frame=frame@entry=0x3c7e4000, ownerDocument=ownerDocument@entry=0x0,url=..., mimeType=..., encoding=...,userChosen=userChosen@entry=false,

dispatch=dispatch@entry=false) at../../third_party/WebKit/Source/core/loader/DocumentLoader.cpp:905

#10 0x6159f472 in WebCore::DocumentLoader::ensureWriter(this=this@entry=0x3c810600, mimeType=..., overridingURL=...) at../../third_party/WebKit/Source/core/loader/DocumentLoader.cpp:511

#11 0x6159f4fa in WebCore::DocumentLoader::commitData(this=this@entry=0x3c810600,

bytes=bytes@entry=0x6479d000 "<ahref=\"https://enginetest.baina.com:8081/jquery.js\"download>download by https</a>\r\n<ahref=\"http://10.2.0.15/hello.js\" download>download byhttp</a>",

length=length@entry=151) at../../third_party/WebKit/Source/core/loader/DocumentLoader.cpp:524

#12 0x6159f756 in WebCore::DocumentLoader::dataReceived(this=0x3c810600, resource=<optimized out>,

data=0x6479d000 "<ahref=\"https://enginetest.baina.com:8081/jquery.js\"download>download by https</a>\r\n<ahref=\"http://10.2.0.15/hello.js\" download>download byhttp</a>", length=151)

#13 0x6153b7d0 in WebCore::RawResource::appendData(this=0x3c90c000,

data=0x6479d000 "<ahref=\"https://enginetest.baina.com:8081/jquery.js\"download>download by https</a>\r\n<ahref=\"http://10.2.0.15/hello.js\" download>download byhttp</a>", length=151)

at../../third_party/WebKit/Source/core/fetch/RawResource.cpp:48

#14 0x61542556 in WebCore::ResourceLoader::didReceiveData(this=0x3c91c000,

data=0x6479d000 "<ahref=\"https://enginetest.baina.com:8081/jquery.js\"download>download by https</a>\r\n<ahref=\"http://10.2.0.15/hello.js\" download>download byhttp</a>", length=151,

encodedDataLength=0) at../../third_party/WebKit/Source/core/fetch/ResourceLoader.cpp:418

#15 0x6172b794 incontent::WebURLLoaderImpl::Context::OnReceivedData(this=0x5b0a2390, data=<optimized out>, data_length=151,encoded_data_length=<optimized out>) at../../content/child/web_url_loader_impl.cc:601

#16 0x61724f36 in content::ResourceDispatcher::OnReceivedData(this=this@entry=0x6675bf28, request_id=0, data_offset=<optimizedout>, data_length=151, encoded_data_length=0)

at ../../content/child/resource_dispatcher.cc:466

#17 0x617244c6 in DispatchToMethod<content::ResourceDispatcher,void (content::ResourceDispatcher::*)(int, int, int, int), int, int,int, int> (arg=..., method=<optimized out>, obj=0x6675bf28)

at ../../base/tuple.h:570

#18 Dispatch<content::ResourceDispatcher,content::ResourceDispatcher, void, void(content::ResourceDispatcher::*)(int, int, int, int)>(sender=0x6675bf28, parameter=0x0, func=<optimized out>,obj=0x6675bf28,

msg=0x661df53c) at../../content/common/resource_messages.h:284

#19 content::ResourceDispatcher::DispatchMessage(this=this@entry=0x6675bf28, message=...) at../../content/child/resource_dispatcher.cc:707

#20 0x61725750 in content::ResourceDispatcher::OnMessageReceived(this=0x6675bf28, message=...) at../../content/child/resource_dispatcher.cc:319

#21 0x61708124 in content::ChildThread::OnMessageReceived(this=0x6676500c, msg=...) at ../../content/child/child_thread.cc:441

#22 0x60c94e42 in IPC::ChannelProxy::Context::OnDispatchMessage(this=0x66760e68, message=...) at ../../ipc/ipc_channel_proxy.cc:273

#23 0x60c94c80 in Run (a1=..., object=<optimized out>,this=0x6736bbf8) at ../../base/bind_internal.h:190

#24 MakeItSo (a2=..., a1=<optimized out>, runnable=...) at../../base/bind_internal.h:898

#25 base::internal::Invoker<2,base::internal::BindState<base::internal::RunnableAdapter<void(IPC::ChannelProxy::Context::*)(IPC::Message const&)>, void(IPC::ChannelProxy::Context*, IPC::Message const&), void (I

PC::ChannelProxy::Context*, IPC::Message)>, void(IPC::ChannelProxy::Context*, IPC::Messageconst&)>::Run(base::internal::BindStateBase*) (base=<optimizedout>) at ../../base/bind_internal.h:1253

#26 0x617ab368 in Run (this=0x6736bd00) at../../base/callback.h:401

#27 base::MessageLoop::RunTask (this=this@entry=0x66756a48,pending_task=...) at ../../base/message_loop/message_loop.cc:464

#28 0x617ab420 in base::MessageLoop::DeferOrRunPendingTask(this=this@entry=0x66756a48, pending_task=...) at../../base/message_loop/message_loop.cc:482

#29 0x617abb36 in base::MessageLoop::DoWork (this=0x66756a48) at../../base/message_loop/message_loop.cc:596

#30 0x617ac086 in base::MessagePumpDefault::Run (this=0x66756f30,delegate=0x66756a48) at../../base/message_loop/message_pump_default.cc:32

#31 0x617ab75a in base::MessageLoop::RunHandler (this=0x66756a48)at ../../base/message_loop/message_loop.cc:407

#32 0x617b2cf8 in base::RunLoop::Run (this=this@entry=0x6736bd70)at ../../base/run_loop.cc:49

#33 0x617aad6c in base::MessageLoop::Run (this=<optimized out>)at ../../base/message_loop/message_loop.cc:300

#34 0x617bb856 in base::Thread::ThreadMain (this=0x66758ed0) at../../base/threading/thread.cc:225

#35 0x617b967e in base::(anonymous namespace)::ThreadFunc(params=<optimized out>) at../../base/threading/platform_thread_posix.cc:80

#36 0x40196a5c in __thread_entry () from/tmp/tshao-adb-gdb-libs/system/lib/libc.so

#37 0x40196bd8 in pthread_create () from/tmp/tshao-adb-gdb-libs/system/lib/libc.so

#38 0x00000000 in ?? ()





renderlayer插入到renderlayertreecallstack:

#0 WebCore::RenderLayer::addChild(this=this@entry=0x69014000, child=0x690140e8,beforeChild=0x0) at //renderlayer插入到树中。../../third_party/WebKit/Source/core/rendering/RenderLayer.cpp:1372

#1 0x610e695e inWebCore::addLayers (obj=obj@entry=0x69024000,parentLayer=parentLayer@entry=0x69014000, newObject=@0x6736b880: 0x0,beforeChild=@0x6736b884: 0x0)

at../../third_party/WebKit/Source/core/rendering/RenderObject.cpp:461

#2 0x610e698c in WebCore::RenderObject::addLayers//创建该renderobject对应的renderlayer (this=this@entry=0x69024000,parentLayer=parentLayer@entry=0x69014000) at../../third_party/WebKit/Source/core/rendering/RenderObject.cpp:476

#3 0x610e69c6 in WebCore::RenderObject::insertedIntoTree(this=0x69024000) at../../third_party/WebKit/Source/core/rendering/RenderObject.cpp:2973

#4 0x610ebff2 in WebCore::RenderObjectChildList::insertChildNode(this=this@entry=0x6900407c, owner=owner@entry=0x69004000,newChild=newChild@entry=0x69024000,beforeChild=beforeChild@entry=0x0,

notifyRenderer=notifyRenderer@entry=true) at../../third_party/WebKit/Source/core/rendering/RenderObjectChildList.cpp:155

#5 0x610e671c in WebCore::RenderObject::addChild(this=this@entry=0x69004000, newChild=newChild@entry=0x69024000,beforeChild=beforeChild@entry=0x0)

at../../third_party/WebKit/Source/core/rendering/RenderObject.cpp:336

#6 0x610978a4 inWebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks(this=0x69004000, newChild=0x69024000, beforeChild=<optimizedout>)

at../../third_party/WebKit/Source/core/rendering/RenderBlock.cpp:898

#7 0x6108f53c in WebCore::RenderBlock::addChild(this=0x69004000, newChild=0x69024000, beforeChild=0x0) at//将新建立的renderobject插入到rendertree中。../../third_party/WebKit/Source/core/rendering/RenderBlock.cpp:910

#8 0x60fd8834 inWebCore::RenderTreeBuilder::createRendererForElementIfNeeded(this=this@entry=0x6736b930) at ../../third_party/WebKit/Source/core/dom/RenderTreeBuilder.cpp:142

#9 0x60fc500e in WebCore::Element::attach(this=0x66a0823c, context=...) at../../third_party/WebKit/Source/core/dom/Element.cpp:1365

#10 0x60fcdb6c in WebCore::Node::reattach(this=this@entry=0x66a0823c, context=...) at../../third_party/WebKit/Source/core/dom/Node.cpp:973//从新attach,会从新创建renderobject,

#11 0x60fc4c9e in WebCore::Element::recalcOwnStyle(this=this@entry=0x66a0823c, change=change@entry=WebCore::Force) at../../third_party/WebKit/Source/core/dom/Element.cpp:1552

#12 0x60fc4dda in WebCore::Element::recalcStyle(this=0x66a0823c, change=WebCore::Force, nextTextSibling=0x0) at../../third_party/WebKit/Source/core/dom/Element.cpp:1518

#13 0x60fbaf22 in WebCore::Document::updateStyle(this=this@entry=0x66a04000, change=<optimized out>,change@entry=WebCore::NoChange) at../../third_party/WebKit/Source/core/dom/Document.cpp:1944

#14 0x60fbb9b2 in WebCore::Document::updateRenderTree(this=this@entry=0x66a04000, change=change@entry=WebCore::NoChange)at ../../third_party/WebKit/Source/core/dom/Document.cpp:1880

#15 0x60fbbafe in WebCore::Document::updateRenderTreeIfNeeded(this=this@entry=0x66a04000) at../../third_party/WebKit/Source/core/dom/Document.h:486

#16 0x60fbc810 in WebCore::Document::finishedParsing(this=0x66a04000) at../../third_party/WebKit/Source/core/dom/Document.cpp:4703

#17 0x60e56244 in WebCore::HTMLConstructionSite::finishedParsing(this=<optimized out>) at../../third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp:543

#18 0x60e660ae in WebCore::HTMLTreeBuilder::finished(this=<optimized out>) at../../third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp:2796

#19 0x60e577a4 in WebCore::HTMLDocumentParser::end(this=this@entry=0x3ccbcc80) at../../third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:828

#20 0x60e577b8 inWebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd(this=this@entry=0x3ccbcc80) at../../third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:839

#21 0x60e58114 inWebCore::HTMLDocumentParser::prepareToStopParsing (this=0x3ccbcc80)at../../third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:240

#22 0x60e5945e inWebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser(this=this@entry=0x3ccbcc80, popChunk=...) at../../third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:491

#23 0x60e595c0 inWebCore::HTMLDocumentParser::pumpPendingSpeculations(this=this@entry=0x3ccbcc80) at../../third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:530

#24 0x60e597f8 inWebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser(this=0x3ccbcc80, chunk=...) at../../third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:363

#25 0x60e5374a in operator() (p1=..., c=..., this=<optimizedout>) at ../../third_party/WebKit/Source/wtf/Functional.h:210

#26 WTF::BoundFunctionImpl<WTF::FunctionWrapper<void(WebCore::HTMLDocumentParser::*)(WTF::PassOwnPtr<WebCore::HTMLDocumentParser::ParsedChunk>)>,void (WTF::WeakPtr<WebCore::HTMLDocumentParser>,WTF::PassOwnPtr<W

ebCore::HTMLDocumentParser::ParsedChunk>)>::operator()()(this=<optimized out>) at../../third_party/WebKit/Source/wtf/Functional.h:420

#27 0x6180597c in operator() (this=0x661271d0) at../../third_party/WebKit/Source/wtf/Functional.h:577

#28 WTF::callFunctionObject (context=0x661271d0) at../../third_party/WebKit/Source/wtf/MainThread.cpp:62

#29 0x61705606 in Run (a1=<optimized out>, this=<syntheticpointer>) at ../../base/bind_internal.h:171

#30 MakeItSo (a1=<optimized out>, runnable=...) at../../base/bind_internal.h:871

#31 base::internal::Invoker<1,base::internal::BindState<base::internal::RunnableAdapter<void(*)(void*)>, void (void*), void (void*)>, void(void*)>::Run(base::internal::BindStateBase*) (base=<optimizedout>)

at ../../base/bind_internal.h:1169

#32 0x617ab368 in Run (this=0x6736bd00) at../../base/callback.h:401

#33 base::MessageLoop::RunTask (this=this@entry=0x66756a48,pending_task=...) at ../../base/message_loop/message_loop.cc:464

#34 0x617ab420 in base::MessageLoop::DeferOrRunPendingTask(this=this@entry=0x66756a48, pending_task=...) at../../base/message_loop/message_loop.cc:482

#35 0x617abb36 in base::MessageLoop::DoWork (this=0x66756a48) at../../base/message_loop/message_loop.cc:596

#36 0x617ac086 in base::MessagePumpDefault::Run (this=0x66756f30,delegate=0x66756a48) at../../base/message_loop/message_pump_default.cc:32

#37 0x617ab75a in base::MessageLoop::RunHandler (this=0x66756a48)at ../../base/message_loop/message_loop.cc:407

#38 0x617b2cf8 in base::RunLoop::Run (this=this@entry=0x6736bd70)at ../../base/run_loop.cc:49

#39 0x617aad6c in base::MessageLoop::Run (this=<optimized out>)at ../../base/message_loop/message_loop.cc:300

#40 0x617bb856 in base::Thread::ThreadMain (this=0x66758ed0) at../../base/threading/thread.cc:225

#41 0x617b967e in base::(anonymous namespace)::ThreadFunc(params=<optimized out>) at../../base/threading/platform_thread_posix.cc:80

#42 0x40196a5c in __thread_entry () from/tmp/tshao-adb-gdb-libs/system/lib/libc.so

#43 0x40196bd8 in pthread_create () from/tmp/tshao-adb-gdb-libs/system/lib/libc.so

#44 0x00000000 in ?? ()

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值