blink里layout的几个触发点

当文档加载完毕后的触发FrameView::Layout()的一个callstack:



#0 WebCore::FrameView::layout(this=this@entry=0x2e61c500, allowSubtree=allowSubtree@entry=true) at../../third_party/WebKit/Source/core/frame/FrameView.cpp:852

#1 0x612ddcd4 in WebCore::Document::implicitClose(this=0x36204fa0) at../../third_party/WebKit/Source/core/dom/Document.cpp:2633

implicitclose这个函数先调用updateRenderTreeIfNeeded,会可能触发renderstyle的从新计算。然后才调用FrameView::layout().

#2 0x618c72de in WebCore::FrameLoader::checkCompleted(this=0x64deb698) at../../third_party/WebKit/Source/core/loader/FrameLoader.cpp:490

#3 0x618c7350 in WebCore::FrameLoader::finishedParsing(this=0x64deb698) at../../third_party/WebKit/Source/core/loader/FrameLoader.cpp:420

#4 0x612de752 in WebCore::Document::finishedParsing(this=0x36204fa0) at../../third_party/WebKit/Source/core/dom/Document.cpp:4707

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

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

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

#8 0x61179730 inWebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd(this=this@entry=0x2e953e00) at../../third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:839

#9 0x6117a08c inWebCore::HTMLDocumentParser::prepareToStopParsing (this=0x2e953e00)at../../third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:240

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

#11 0x6117b538 inWebCore::HTMLDocumentParser::pumpPendingSpeculations(this=this@entry=0x2e953e00) at../../third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:530

#12 0x6117b770 inWebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser(this=0x2e953e00, chunk=...) at../../third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:363

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

#14 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

#15 0x61b277fc in operator() (this=0x597b12c8) at../../third_party/WebKit/Source/wtf/Functional.h:577

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









其他一些触发FrameView::layout的场景:

收到resize的事件:



#0 WebCore::FrameView::layout(this=this@entry=0x2e61c500,allowSubtree=allowSubtree@entry=true) at../../third_party/WebKit/Source/core/frame/FrameView.cpp:852

#1 0x60f1d6cc in blink::WebViewImpl::resize(this=0x64da41e0, newSize=...) at../../third_party/WebKit/Source/web/WebViewImpl.cpp:1699

#2 0x61b9607a in content::RenderWidget::Resize(this=this@entry=0x60c85630, new_size=..., physical_backing_size=...,overdraw_bottom_height=<optimized out>,visible_viewport_size=..., resizer_rect=...,

is_fullscreen=false,resize_ack=resize_ack@entry=content::RenderWidget::SEND_RESIZE_ACK)at ../../content/renderer/render_widget.cc:660

#3 0x61b96858 in content::RenderWidget::OnResize(this=this@entry=0x60c85630, params=...) at../../content/renderer/render_widget.cc:750

#4 0x61b8d2c4 in content::RenderViewImpl::OnResize(this=0x60c85630, params=...) at../../content/renderer/render_view_impl.cc:3252

#5 0x61b97966 in DispatchToMethod<content::RenderWidget, void(content::RenderWidget::*)(ViewMsg_Resize_Params const&),ViewMsg_Resize_Params> (arg=...,

method=&virtualcontent::RenderWidget::OnResize(ViewMsg_Resize_Params const&),obj=0x60c85630) at ../../base/tuple.h:548

#6 Dispatch<content::RenderWidget, content::RenderWidget,void, void (content::RenderWidget::*)(ViewMsg_Resize_Params const&)>(sender=0x60c85630, parameter=0x0,

func=&virtualcontent::RenderWidget::OnResize(ViewMsg_Resize_Paramsconst&), obj=0x60c85630, msg=0x5acfadf4) at../../content/common/view_messages.h:615

#7 content::RenderWidget::OnMessageReceived(this=this@entry=0x60c85630, message=...) at../../content/renderer/render_widget.cc:578

#8 0x61b9294c in content::RenderViewImpl::OnMessageReceived(this=0x60c85630, message=...) at../../content/renderer/render_view_impl.cc:1330





还有一种场景,收到设置backgroundcolor的消息:

#0 WebCore::FrameView::layout(this=this@entry=0x2e61c000, allowSubtree=allowSubtree@entry=true) at../../third_party/WebKit/Source/core/frame/FrameView.cpp:852

#1 0x61870002 inWebCore::FrameView::updateLayoutAndStyleIfNeededRecursive(this=this@entry=0x2e61c000) at../../third_party/WebKit/Source/core/frame/FrameView.cpp:2866

#2 0x618700da inWebCore::FrameView::updateLayoutAndStyleForPainting (this=0x2e61c000)at ../../third_party/WebKit/Source/core/frame/FrameView.cpp:2836

#3 0x618de9f4 inWebCore::PageAnimator::updateLayoutAndStyleForPainting(this=0x59aeb800) at../../third_party/WebKit/Source/core/page/PageAnimator.cpp:79

#4 0x60ef62f2 in blink::PageWidgetDelegate::layout(page=<optimized out>) at../../third_party/WebKit/Source/web/PageWidgetDelegate.cpp:75

#5 0x60f1b41e in blink::WebViewImpl::layout(this=0x64da4000) at../../third_party/WebKit/Source/web/WebViewImpl.cpp:1790

#6 0x60f1b38e in blink::WebViewImpl::setBaseBackgroundColor(this=0x64da4000, color=4294967295) at../../third_party/WebKit/Source/web/WebViewImpl.cpp:3692

#7 0x612c0c2c inandroid_webview::AwRenderViewExt::OnSetBackgroundColor(this=this@entry=0x5962f0d8, c=4294967295) at../../android_webview/renderer/aw_render_view_ext.cc:312

#8 0x612c0dda inDispatchToMethod<android_webview::AwRenderViewExt, void(android_webview::AwRenderViewExt::*)(unsigned int), unsigned int>(arg=..., method=<optimized out>, obj=0x5962f0d8)

at ../../base/tuple.h:548

#9 Dispatch<android_webview::AwRenderViewExt,android_webview::AwRenderViewExt, void, void(android_webview::AwRenderViewExt::*)(unsigned int)>(sender=0x5962f0d8, parameter=0x0, func=<optimized out>,

obj=0x5962f0d8, msg=0x59c350cc) at../../android_webview/common/render_view_messages.h:73

#10 android_webview::AwRenderViewExt::OnMessageReceived(this=0x5962f0d8, message=...) at../../android_webview/renderer/aw_render_view_ext.cc:162

#11 0x61b91380 in content::RenderViewImpl::OnMessageReceived(this=0x60c85630, message=...) at../../content/renderer/render_view_impl.









收到focus也会:

#0 WebCore::FrameView::layout(this=this@entry=0x2e61c000,allowSubtree=allowSubtree@entry=true) at../../third_party/WebKit/Source/core/frame/FrameView.cpp:852

#1 0x612ddab6 in WebCore::Document::updateLayout(this=0x36204000) at../../third_party/WebKit/Source/core/dom/Document.cpp:2000

#2 0x612de852 inWebCore::Document::updateLayoutIgnorePendingStylesheets(this=0x36204000,runPostLayoutTasks=runPostLayoutTasks@entry=WebCore::Document::RunPostLayoutTasksAsyhnchronously)

at ../../third_party/WebKit/Source/core/dom/Document.cpp:2056

#3 0x61839126 in WebCore::FrameSelection::setCaretVisibility(this=this@entry=0x64df17a0, visibility=WebCore::CaretBase::Visible)at../../third_party/WebKit/Source/core/editing/FrameSelection.cpp:1598

#4 0x6183ac32 inWebCore::FrameSelection::focusedOrActiveStateChanged(this=0x64df17a0) at../../third_party/WebKit/Source/core/editing/FrameSelection.cpp:1469

#5 0x6183ac60 in WebCore::FrameSelection::pageActivationChanged(this=<optimized out>) at../../third_party/WebKit/Source/core/editing/FrameSelection.cpp:1486

#6 0x618db2b4 in WebCore::FocusController::setActive(this=<optimized out>, active=active@entry=true) at../../third_party/WebKit/Source/core/page/FocusController.cpp:730

#7 0x60f1dcc2 in blink::WebViewImpl::setFocus(this=0x64da4000, enable=<optimized out>) at../../third_party/WebKit/Source/web/WebViewImpl.cpp:2014

#8 0x61b951a8 in content::RenderWidget::OnSetFocus(this=this@entry=0x60c85630, enable=enable@entry=true) at../../content/renderer/render_widget.cc:1130

#9 0x61b8e49c in content::RenderViewImpl::OnSetFocus(this=0x60c85630, enable=<optimized out>) at../../content/renderer/render_view_impl.cc:3547

#10 0x6172b0a4 in DispatchToMethod<content::RenderViewHostImpl,void (content::RenderViewHostImpl::*)(bool), bool>(obj=obj@entry=0x60c85630, method=&virtualcontent::RenderViewHostImpl::GetMainFrame(), arg=...)

at ../../base/tuple.h:548

#11 0x61b97a1a in Dispatch<content::RenderWidget,content::RenderWidget, void, void (content::RenderWidget::*)(bool)>(sender=<optimized out>, parameter=<optimized out>, func=

(void (content::RenderWidget::*)(content::RenderWidget *const, bool)) 0x60b80594, this adjustment 866453464, obj=<optimizedout>, msg=<optimized out>) at../../content/common/view_messages.h:630

#12 content::RenderWidget::OnMessageReceived(this=this@entry=0x60c85630, message=...) at../../content/renderer/render_widget.cc:581

#13 0x61b9294c in content::RenderViewImpl::OnMessageReceived(this=0x60c85630, message=...) at../../content/renderer/render_view_impl.cc:1330



CSS定位与浮动原理深度解析:从盒模型到层叠上下文 CSS定位(position)和浮动(float)是前端布局的底层基石,其行为根植于盒模型与普通流机制。理解relative、absolute、fixed等定位值的本质差异,关键在于掌握浏览器如何构建定位上下文与层叠上下文;而float的‘脱离但影响流’特性,则直接关联BFC触发与父容器坍缩问题。这些基础属性虽被Flexbox和Grid部分替代,却仍在文字环绕、遗留系统维护、性能微调等场景中不可替代。本文结合渲染原理、真实调试案例与跨浏览器兼容实践,系统拆解position与float的协同逻辑、常见失效原 阅读详情

相关推荐

chromium网络栈学习

内容目录 1 Overview 3 1.1 常用工具 6 1.2 SSL,TLS 6 1.2.1 常识 6 1.2.2 browser代码中ssl版本的选择以及握手的过程 7 1.3 额外需要细节性分析的部分: 20 1.4 http 协议 20 1.4.1 http authencation 20 1.4.1.1 basic authentication 20 1

2453

mysql 执行简单查询的调用栈

mysql 执行 select lower(‘Hi’) 的 调用栈: #5 0x0000000000660b8c in Item::send (this=0x6e7ada8, protocol=0x60234a8, buffer=0x7fe875d0efe0) at /root/lnmp1.3-full/src/mysql-5.5.48/sql/item.cc:5983 #6 0x0...

余璜的技术博客 1173

【信息科学与工程学】计算机科学与自动化——第六十三篇 人机交互之前端交互参数知识库02

每个分支下又细分了四个关键方向,并按照“研究对象/焦点、基本问题、核心理论/概念、研究方法、应用/目标、前沿/发展”的框架进行阐述,严格遵循了六级编码体系。在最终整合时,应建立唯一的学科分类编码表(例如,用两位数字或“ART”、“MED”、“ECO”等字母前缀),并确保所有下级编码(尺度、层次、类别、子类、具体项)的逻辑一致性。此回答中的编码为示例,实际系统需据此调整。控制过程(前馈、同期、反馈)、全面质量管理(TQM)、平衡计分卡(BSC)定量(调查、实验)、定性(访谈、民族志)、混合方法、大数据。

weixin_49199313的博客 680

一个越界导致的概率性重启问题排查

问题:现场设备出现了频繁重启问题,生成的coredump文件显示有好几个线程导致重启,其中4个都显示布防线程发出了signal 11 布防线程相关代码: int RADAR_COORDINATE_SERVER::PicServ_SDK_Recv(int sockfd,char *pbuf, UINT32 buflen, UINT32 *dwOutlen) { ... NET...

hzq_blog 1677

android-blink:演示 LayoutInflater 复活节彩蛋的小型 Android 项目

android-blink 演示 LayoutInflater 复活节彩蛋的小型 Android 项目。

Dify+工作流,通过多模态实现发票自动识别

上个章节我们用Dify实现了基于本地知识库的聊天助手,本节我们通过工作流 ,可视化界面快速构建复杂的工作流和自动化流程。结合 OCR(光学字符识别)技术和工作流引擎,可以实现发票的自动识别、数据提取以及后续的审批流程。本文将详细介绍如何使用 Dify 和工作流来实现发票的自动识别与审批。

odin2005的博客 7426

gdb @entry= 是什么意思

调用函数时传入的参数值 The @entry form refers to the value of the parameter when the function was entered. This isn't always available, but sometimes it is -- there is a DWARF extension for it, and GCC emits this when possible. c++ - difference between this .

软件工程小施同学 的专栏 2723

Landsat9 地表温度反演方法

landsat9地表温度反演及缺失值处理方法

xiangliu12345的博客 3919

gdb 使用

分析 core 核心转储文件 程序崩溃时, 会有核心转储文件生成, 方便定位有异常的栈. 下面这个例子中, #6位置有空指针, 所以异常. $gdb binary/home/admin/d2_runtime/bin/sap_server_d suez_worker/core-500-sap_server_d-3504-1553079090 (gdb) bt #0 0x00007f71ae6fc...

yichudu 1061

用Java实现森林冰火人游戏

g.drawString("游戏结束", CELL_SIZE * COLS / 2 - 100, CELL_SIZE * ROWS / 2);g.drawString("难度级别: " + difficultyLevel, 10, CELL_SIZE * ROWS + 60);g.drawString("生命值: " + playerHealth, 10, CELL_SIZE * ROWS + 20);setTitle("森林冰火人");

2401_82778412的博客 1734

YOLO 线性小目标涨点|3890 张输电导线散股 VOC+YOLO 单类别数据集实战,无人机电力缺陷巡检全流程落地

架空输电导线是电网能量传输核心载体,长期受风力摆动、雷击、腐蚀、外力撞击作用,外层铝股极易出现断裂散股故障。导线散股初期仅少量铝丝开裂,肉眼与无人机远距离航拍下属于细长微弱线性小目标;若未及时发现,散股会持续扩张,引发导线过热、断线、大面积停电重大电力安全事故。传统人工巡检存在多重行业痛点:山区、跨江河线路人员无法攀爬登杆,高空作业人身坠落风险极高;无人机单次航拍产出数千张高清图片,人工逐帧筛查微小散股耗时 3-5 天,阴天、逆光、植被遮挡场景漏检率超 45;

lin_xiu的博客 53

Android BlinkLayout 初识

最近在和同事之间讨论 View 的加载过程中,通过阅读源代码发现有这么一个“控件” 为什么叫他控件,请继续看下面一个有意思的地方 private static class BlinkLayout extends FrameLayout { private static final int MESSAGE_BLINK = 0x42; private static f

hpu小生的奋斗 2522

RT-Thread Studio 使用笔记(七)| 配合STM32CubeMX添加裸机驱动(以ADC为例)

1. 配置STM32CubeMX 2. 复制stm32xxxx_hal_msp.c文件 将 CubeMx 生成的代码 stm32f7xx_hal_msp.c 函数复制到 RT-Thread Studio 生成的工程中,并参与工程编译: 由于我们并没有使用 CubeMx 生成的工程,所以这里需要将 stm32f7xx_hal_msp.c 文件中 #include “main.h” 替换为 #i...

Mculover666的博客(嵌入式) 9628

c++中operator()的用法简单理解记录

c++ 中的operator()有两大主要作用: Overloading------重载()操作符; Casting------实现对象类型转化。 一. 重载()操作符 函数对象:定义了调用操作符()的类对象。当用该对象调用()操作符时,其表现形式如同普通函数一致,因此取名为函数对象。与普通函数相比,函数对象更加灵活,代码看上去更加优雅。 函数对象有自己的状态。可以在类中定义状态变量,这样一个函数对象在多次的调用中可以共享这个状态; 函数对象有自己特有的类型。可以传递相应的类型作为参数来实例化相应

萧戈的专栏 1万+

基于YOLO26深度学习框架的人脸识别门禁系统的算法研究实现方法

本文研究了基于YOLO26深度学习框架的人脸识别门禁系统实现方法。系统采用YOLO26目标检测算法,通过CSPDarknet53主干网络、特征金字塔结构和注意力机制实现高效人脸检测。研究内容包括数据预处理、模型训练优化和身份验证等关键技术,使用迁移学习策略和CIoU损失函数提升检测精度。该系统可应用于智能安防场景,具有实时性强、识别准确的特点,为门禁管理提供了智能化解决方案。

一键难忘的博客 766

4 屏 + 8 摄像头一开,谁在悄悄拖慢你的座舱域控?

如果你觉得座舱卡顿:❌ 别第一反应怪 SoC❌ 别盲目堆算力。

weixin_43199439的博客 150

GDB调试实战三完整的数据流程

一、基本流程介绍 经过了前面的各种准备,再结合学习过的GDB的各种调试方法和技巧,下面进行一次完整的数据调试流程。整个程序的流程基本是模拟网络和网口通信,区别在于完整包的大小不同,网口是100个字节而串口是60个字节。程序在启动时,启动了两个线程,生产者直接从一个固定的字符串数组取大小不同的数组来送到数据处理的两个std::vector 中。消费线程从这两个向量中不断的取出数据并根据包大小对其进行处理,一旦处理成功就通过回调函数显示并打印到屏幕上。这里需要注意的是,如果不调试了,要马上停止这个进程,...

fpcc的专栏 1773

3D点云-CVPR 2020-PF-Net: Point Fractal Network for 3D Point Cloud Completion

是一种专门为三维点云补全设计的深度学习模型。点云补全实际上和图片补全是一个逻辑,都是采用GAN模型的思想来进行补全,在图片补全中,将部分像素点删除并且标记,然后卷积特征提取预测、判别器判别,来训练模型,生成的像素点与原来像素点比较完成模型的训练。而PF-Net就是采用GAN的思想在3D点云上的应用。

404 Not Found 2375

this指针调整问题

this指针调整:出现在多重继承的情况中 class A { public: A() { printf("A():%p\n", this); } void funA() { printf("funA():%p\n", this); } public: int a; }; class B { public: B() {

qq_38158479的博客 400

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

Android开发知识(二十二)LayoutInflater装载xml布局过程的源码解析

文章目录前言LayoutInflater的创建过程LayoutInflater的装载过程标签解析标签解析attachToRoot参数解析View创建过程(1)判断view标签(2) 主题相关判断(3)BlinkLayout判断(4)Factory接口自定义View的创建规则(5)View的默认创建规则(6)View的创建过程ViewStub源码解析结束语 前言 本篇讲解的是LayoutInflat...

lc_miao的专栏 1万+

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

比较隐秘的内存问题

share_ptr/auto_ptr 避免这样使用:强引用上的回环指针会导致内存泄露,可在destructor人为拆散 症状:方便的话在ref_count加个打印就知道了,可以在对象析构加打印提醒是否有对象一直没被析构。 基类析构函数非virtual  针对base *pt = new derived; delete pt的情况 栈溢出.下标越界,栈区,一是越界离谱低于栈区最低地

linxuping的专栏 799

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

C++调用成员函数需要this指针的情况

C++调用成员函数需要this指针的情况

cjc211322的专栏 2121

entry类型的对象_对象entry()方法

entry类型的对象Introduced in ES2017. 在ES2017中ES2017 。 This method returns an array containing all the object own properties, as an array of [key, value] pairs. 此方法以[key, value]对的数组形式返回一个包含所有对象自身属性的数组。...

cuk0051的博客 1701

【core】protobuf debugstring()接口core

protobuf core问题

lwj的博客 1203

使用ESP8266通过Blinker平台接入天猫精灵控制电视/空调

目录1.准备工作1.1 `原理`1.2 `使用的硬件以及硬件连接图`1.3 `开发环境准备`2.解码空调红外键值2.1 `把ESP8266红外接收的实例,上传到NodeMCU中`2.2 `读取红外键值`3. 配置Blinker App的UI界面4.Arduino程序的编写`4.1 控制逻辑``4.2 新建一个Arduino程序,编写控制逻辑`4.3 `上传程序到ESP8266`5.App控制6.天...

广源的博客 1万+
上一篇: webkit内部的WebView, page, WebFrame, Frame, document, frameView, RenderView, RenderFrame, Widget的关系和构建
下一篇: FrameView::layout干了什么
csshell2002
博客等级 码龄11年 30粉丝 41原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值