您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 咨询培训 > webkit_and_the_browser
WebKitenginewuduoyi@baidu.comAboutme•tieba-fe•space-fe•pass-fe•ps-feWhatwegoingtotalkabout•Webkitengine•Chrome•IEshellsWebkitengineWebKitengine•isanengine,notabrowser•forkedfromKHTML•10%marketshareWebKitbeginswherethechromeends•standardscompliance(css3,html5)•performance•clear,maintainablecodeWebKitComponents•WebKit•front-endlayer,gtk/mac/qt/win/wx•WebCore•rendering,layout,painting...•JavaScriptCore•JavaScriptengine(interpreter)WebKitApplicationWebCoreWebKitJavaScriptCoreWebKitAPIBoundaryUIProcessWebKitAPI•webcore•webcore•••WebKit•mac•qt•gtk•win•wx•chromium•...WEBKITMAC#include WebKit/WebKit.hWebKitdevelopment•WebViewWebFrameWebPreferences...•Delegate•DOMAPI•usingjavascriptWebViewapi•loadRequest()•reload()•goBack()/goForward()•makeTextLarger()/makeTextSmaller()Delegate•WebFrameLoad•didFailLoadWithError:forFrame•WebPolicy•decidePolicyForNewWindowAction•WebResourceLoad•didFinishLoading•WebUIDOMAPI•W3CDOMSpecification•[[docdocumentElement]innerHTML]CallJavascript•id win = [webView windowScriptObject];•[win evaluateWebScript:@location.href];WebKitdemoWebCoreWebCoreParsingLoadingPaintingRenderingScriptExecutionLayoutStyleResolutionEventHandlingProcessLoadingParsingRendinglayoutPaintingLoading•,••Frames•Resources•Loadingiscomplexity••,•Cache•HTTP•••DOM••DOMTreeProcessLoadingParsingRendinglayoutPaintingRending•Selector•RenderTree•CSS•RenderObject.hSelectormatchingRenderTree••display:noneDOM•••RenderTreeProcessLoadingParsingRendinglayoutPaintingLayout•renderlayout•input•GettingReal(1)-[WebCoreResourceHandleAsDelegateconnectionDidFinishLoading:]WebCore::ResourceLoader::didFinishLoadingWebCore::MainResourceLoader::didFinishLoadingWebCore::FrameLoader::finishedLoadingWebCore::DocumentLoader::finishedLoadingWebCore::DocumentWrite::endWebCore::DocumentWrite::endIfNotLoadingMainResourceWebCore::Document::finishParsingWebCore::HTMLTokenizer::finishWebCore::HTMLTokenizer::endWebCore::HTMLParser::finishedWebCore::Document::finishedParsingGettingReal(2)WebCore::FrameLoader::finishedParsingWebCore::FrameLoader::checkCompletedWebCore::FrameLoader::checkCallImplicitCloseWebCore::Document::implicitCloseWebCore::FrameView::layoutWebCore::RenderView::layoutWebCore::RenderBlock::layoutBlockProcessLoadingParsingRendinglayoutPaintingPainting•root••2DAPIoverview(Gecko)EventHandling••(hitTest)•layout•layout(,)•paintingEventExample•-‐[WebHTMLView mouseUp:]•WebCore::EventHandler::mouseUp•WebCore::EventHandler::handleMouseReleaseEvent•WebCore::EventHandler::prepareMouseEvent•WebCore::Document::preperMouseEvent•WebCore::RenderLayer::hitTest•WebCore::RenderLayer::hitTestLayerEventSystem(Mac)Dynamicchangesel.style.left=2px;el.style.left=el.offsetLeft+px;BrowsersBrowserfeaturestab•/hook•DOMAPI••html•Chrome[OS]Chrome•Multi-process•WebKitglue•Skia•Network•Extension•UpdateMulti-processArchitecture•browserasanoperatingsystem•asynchronous•backingstore•sandboxMulti-processArchitectureApplication(HostProcessWebKitWebCoreJavaScriptCoreAPIBoundaryUIProcessApplication(RenderProcess)WebProcessChromemulti-processarchitectureIPCIPCOtherProcessModel•WebKit2•IE8“Loosely-CoupledIE”,“Gazelle”•Firefox“Electrolysis”WebKit2•buildinseparateprocess•no-blockingAPIWebKit2ApplicationWebKit(WebProcess)WebCoreJavaScriptCoreAPIBoundaryUIProcessWebKit(UIProcess)WebProcessWebKitWebKit2ChromeApplicationWebKitWebCoreJavaScriptCoreUIProcessApplicationWebProcessApplicationWebKitWebCoreJavaScriptCoreUIProcessWebKitWebProcessApplicationWebKitWebCoreJavaScriptCoreUIProcessWebKitglue•WebKitembeddinglayer•GUI•ChromeWebKitChromelayersBrowserwindowTabcontentsRenderhostRendererWebKitglueWebKitWebKitportSkia•GDIisnotenough•GDI+isnolongersupportandisslow•in-housesolution•useGDIfortextNetwork•RewriteNetworkStack•DNSPrefetching•SPDYExtensions•canusejavascript•html5,css3•donʼtneedrestart•NPAPI•notsandbox•NativeClientSandBoxFirefox(Gecko)Firefox(Gecko)•notjustabrowser•mail,newsgroup,webdesigntool...•complexity•XPCOM,XUL•mozilla2KomodoThunderbirdInternetExplorer(Trident)IEshells(MSHTML)•360•theworld,•••,UI•••webkit/IE•HTML5CSS3ES5SVG•GPU•ChakrainsideMosaic://trac.webkit.org/wiki/://dbaron.org/talks/
本文标题:webkit_and_the_browser
链接地址:https://www.777doc.com/doc-6124586 .html