카테고리 없음2012. 8. 9. 13:02



WebKit2 - High Level Document

WebKit2는 분리된 프로세스모델을 지원하기 위해 고안된 새로운 API Layer이다.

Why is it named WebKit2?

오리지날과 호환되지 않는 API변경이 있기 때문에 이름이 다르다. 이 라이브러리는 /System/Library/WebKit2.framework 위치에 설치될것이다.

C API

WebKit2는 C-based non-blocking API를 제공하며 대부분 플랫폼을 구별하지 않는다.  non-blocking API를 지원하기 위해 몇가지 기술이 사용되는데 다음과 같다.

  • 통지형태의 클라이언트콜백 : 무언가 이벤트가 발생하였음을 알린다. ex: didFinishLoadForFrame
  • 정책형태의 클라이언트콜백 : 어떤 동작에 대한 정책을 정할 수 있게 해준다. ex: decidePolicyForNavigationAction
  • 정책 설정 : 콜백없이 미리 정의된 정책을 지정할 수 있게 해준다. ex: WKContextSetCacheModel, WKContextSetPopupPolicy
  • 추출된 코드 : 다른 옵션이 실패하는 경우 WebProcess에 로드될 수 있는 코드이며 DOM에 접근하고자 할 때 유용하다. 아직 계획중이며 구현은 안되어 있다. ex: WebBundle

주요한 API 클래스들은 아래와 같다:

WKContextRef

  • 모든 페이지들에 대해 캡슐화를 제공한다. 하나의 Context의 모든 페이지들은 동일한 방문링크셋, 로컬스토리지, 그리고 프리퍼런스들을 공유한다.

WKPageNamespaceRef

  • 서로 스크립트할 수 있는 모든 페이지들.Encapsulates all pages that can script each other.

WKPageRef

  • 브라우징 기본 유닛, Basic unit of browsing. Stays the same as the main frame changes.

WKView[Ref]

  • 플랫폼툴킷에서 훅킹하는 네이티브뷰. 윈도우에서는 HWND, 맥에서는 NSView에 해당한다.


Port-Specific APIs

포팅에 국한된 API들이 있을 수 있다. 이 경우 기존 포팅에는 영향을 받지 않도록 한다.

Process Architecture

WebKit API Layer내에서 프로세스관리메커니즘을 빌드하는 스택을 변경한다.

다음은 전통적인 웹킷포팅 아키택쳐를 보여준다.

mac-webkit-stack

모든것이 하나의 프로세스안에 있다. 그리고 application과 WebKit API간의 경계가 있다. 이는 단순하고 재사용면에서도 편리하다.

다음은 WebKit2의 구성이다.

webkit2-stack

이제 하나의 프로세스 경계가 있다. 그리고 API 경계가 자리잡고 있다. WebKit의 일부는 UI Process에서 동작하는데 application logic이 살아 있다. WebKit의 나머지는 WebCore, JS Engine과 함께 WebProcess에 살아 있다. Webprocess는 UI process와 분리되어 있다. 이는 응답성, 견고성, 보안성 그리고 멀티코어에 적합하다. 

How is This Different from Chromium WebKit?

크로미엄은 멀티프로세스에 다르게 접근한다.

Notice that in this case, the the process boundary is *above* the API boundary. Chromium WebKit does not directly provide a multiprocess framework, rather, it is optimized for use as a component of a multiprocess application, which does all the proxying and process management itself. The Chrome team at Google did a great job at trailblazing multiprocess browsing with Chrome. But it's difficult to reuse their work, because the critical logic for process management, proxying between processes and sandboxing is all part of the Chrome application, rather than part of the API layer. So if another WebKit-based application or another port wanted to do multiprocess based on Chromium WebKit, it would be necessary to reinvent or cut & paste a great deal of code.

That was an understandable choice for Google - Chrome was developed as a secret project for many years, and is deeply invested in this approach. Also, there are not any other significant API clients. There is Google Chrome, and then there is the closely related Chrome Frame.

WebKit2 has a different goal - we want process management to be part of what is provided by WebKit itself, so that it is easy for any application to use. We would like chat clients, mail clients, twitter clients, and all the creative applications that people build with WebKit to be able to take advantage of this technology. We believe this is fundamentally part of what a web content engine should provide.

Internals

There are two key subsystems that support the process division :

  • CoreIPC - an abstraction for general message passing, including event handling. The current implementations use mach messages on Mac OS X, and named pipes on Windows.
  • DrawingArea - an abstraction for a cross-process drawing area. Multiple drawing strategies are possible, the simplest is just a shared memory bitmap.

There are two other important abstractions, which may be pushed down to WebCore or WTF over time:

  • Run Loops
  • Work Queues

Current Status

WebKit2 should be considered an early technology demo. It is not yet production quality. But it's possible to try it out and see how it works at this early stage.

How to try it Out

build-webkit의 맥과 윈도우버전은 이제 WebKit2를 디폴트로 빌드한다. WebKit2는 Safari에 탑재되지 않았다. WebKit2를 테스트하려면 Tools/MiniBrowser로 해야 한다.

How to run layout tests

WebKit2를 테스트하려면 layout test에 "-2" 또는 "--webkit-test-runner" 옵션을 주어 다음처럼 실행한다.

run-webkit-tests --debug -2

많은 테스트가 무시될것인데 지속적으로 그 수는 줄어들것이다.


Posted by 삼스

댓글을 달아 주세요

  1. Nike Giants Jersey

    http://www.texanssportshop.com http://www.texanssportshop.com
    http://www.texanssportshop.com/jj-watt-jersey-c-1_127.html J.J. Watt Jersey
    http://www.texanssportshop.com/andre-johnson-jersey-c-1_13.html Andre Johnson Jersey
    http://www.texanssportshop.com/arian-foster-jersey-c-1_31.html Arian Foster Jersey
    http://www.texanssportshop.com/brian-cushing-jersey-c-1_55.html Brian Cushing Jersey
    http://www.texanssportshop.com/johnathan-joseph-jersey-c-1_139.html Johnathan Joseph Jersey
    http://www.texanssportshop.com/whitney-mercilus-jersey-c-1_217.html Whitney Mercilus Jersey
    http://www.texanssportshop.com/alan-ball-jersey-c-1_2.html Alan Ball Jersey
    http://www.texanssportshop.com/antoine-caldwell-jersey-c-1_19.html Antoine Caldwell Jersey
    http://www.texanssportshop.com/antonio-smith-jersey-c-1_25.html Antonio Smith Jersey
    http://www.texanssportshop.com/ben-tate-jersey-c-1_37.html Ben Tate Jersey
    http://www.texanssportshop.com/bradie-james-jersey-c-1_43.html Bradie James Jersey
    http://www.texanssportshop.com/brandon-brooks-jersey-c-1_49.html Brandon Brooks Jersey
    http://www.texanssportshop.com/brice-mccain-jersey-c-1_61.html Brice McCain Jersey
    http://www.texanssportshop.com/brooks-reed-jersey-c-1_67.html Brooks Reed Jersey
    http://www.texanssportshop.com/chris-myers-jersey-c-1_73.html Chris Myers Jersey
    http://www.texanssportshop.com/connor-barwin-jersey-c-1_79.html Connor Barwin Jersey
    http://www.texanssportshop.com/danieal-manning-jersey-c-1_85.html Danieal Manning Jersey
    http://www.texanssportshop.com/derek-newton-jersey-c-1_91.html Derek Newton Jersey
    http://www.texanssportshop.com/devier-posey-jersey-c-1_97.html Devier Posey Jersey
    http://www.texanssportshop.com/donnie-jones-jersey-c-1_103.html Donnie Jones Jersey
    http://www.texanssportshop.com/duane-brown-jersey-c-1_109.html Duane Brown Jersey
    http://www.texanssportshop.com/garrett-graham-jersey-c-1_115.html Garrett Graham Jersey
    http://www.texanssportshop.com/glover-quin-jersey-c-1_121.html Glover Quin Jersey
    http://www.texanssportshop.com/james-casey-jersey-c-1_133.html James Casey Jersey
    http://www.texanssportshop.com/kareem-jackson-jersey-c-1_145.html Kareem Jackson Jersey
    http://www.texanssportshop.com/kevin-walter-jersey-c-1_151.html Kevin Walter Jersey
    http://www.texanssportshop.com/lestar-jean-jersey-c-1_157.html Lestar Jean Jersey
    http://www.texanssportshop.com/matt-schaub-jersey-c-1_163.html Matt Schaub Jersey
    http://www.texanssportshop.com/owen-daniels-jersey-c-1_169.html Owen Daniels Jersey
    http://www.texanssportshop.com/quintin-demps-jersey-c-1_175.html Quintin Demps Jersey
    http://www.texanssportshop.com/shaun-cody-jersey-c-1_181.html Shaun Cody Jersey
    http://www.texanssportshop.com/shayne-graham-jersey-c-1_187.html Shayne Graham Jersey
    http://www.texanssportshop.com/tj-yates-jersey-c-1_193.html T.J. Yates Jersey
    http://www.texanssportshop.com/tim-jamison-jersey-c-1_199.html Tim Jamison Jersey
    http://www.texanssportshop.com/trindon-holliday-jersey-c-1_205.html Trindon Holliday Jersey
    http://www.texanssportshop.com/wade-smith-jersey-c-1_211.html Wade Smith Jersey

    2012.11.28 17:53 [ ADDR : EDIT/ DEL : REPLY ]
  2. 지금은 반짝반짝 빛이 나겠지,, 하지만 시간이 흐르면 그빛은 사라저버릴거야,지금 우리처럼

    2013.07.11 06:17 [ ADDR : EDIT/ DEL : REPLY ]
  3. 사람들은 죽을걸 알면서도 살잖아 .사랑은 원래 유치한거에요

    2013.07.15 01:15 [ ADDR : EDIT/ DEL : REPLY ]
  4. 당신은 내가사랑할 만한 사람이 아니예요,사랑하지 않으면 안될 사람이예요.

    2013.07.18 05:17 [ ADDR : EDIT/ DEL : REPLY ]