Main objects in WebCore

Source: Internet
Author: User

Conversion from: WebKit technology translation series (1): main objects in WebCore

Original link http://webkit.org/coding/major-objects.html

WebCore uses many objects to represent the web pages in memory. This article describes some of the main objects and their relationships. In some cases, the connection between objects is broken, resulting in NULL pointer reference. Therefore, when traversing these pointers, the Code must carefully consider the "detached" Situation and elegantly process the NULL pointer.

  +---------+ | Chrome  | +----+----+      |  +---+---+     +----------+  | Page  +---->| Settings |  +---+---+     +----------+      |      +-------------------------- ... other Frame objects      |  +---+---+   +-------------+                 +-------------------+  | Frame +---+ FrameLoader +                 | JSDOMWindowShell  |  +---+---+   +-------------+                 +---------+---------+     / /                                                |    /   /      //  Re-used after navigation   //        |.../....|...............................................|..........  /     |      //  Replaced after navigation  //        | /      |                                               |/<------|<-- Ptrs to Frame are null after navigation[1] ||       |                                               || +-----+-----+         +-------------+                 || | DOMWindow |<--impl--+ JSDOMWindow |<------window----+| +-----+-----+         +-------------+|       ||       |<-- Can be null for Documents created by XMLHttpRequest|       || +-----+-----+         +-------------++-+ Document  |<--impl--+ JSDocument  |  +-----+-----+         +-------------+        |        |<-- Can be null for DocumentType objects        |    +---+---+           +--------+    | Node  |<---impl---| JSNode |    +-------+           +--------+

[1] After navigating to a new page, the old domwindow and document point to an empty frame, while the frame points to a new domwindow and document.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.