CSC/ECE 517 Spring 2017/M1702 Implement the Mutation Observer API: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 23: Line 23:
*'''Testing''':
*'''Testing''':
**add a __dir__.ini file to tests/wpt/metadata/dom/nodes/ which enables the new preference by including "prefs: ["dom.mutation_observer.enabled:true"]".
**add a __dir__.ini file to tests/wpt/metadata/dom/nodes/ which enables the new preference by including "prefs: ["dom.mutation_observer.enabled:true"]".
**Tests are present in web-platform-tests directory (i.e .tests/wpt/web-platform-tests/dom/nodes).
**Run web-platform tests from the root by using the command ./mach test-wpt tests/wpt/web-platform-tests/dom/nodes.
**Run web-platform tests from the root by using the command ./mach test-wpt tests/wpt/web-platform-tests/dom/nodes.
**Update tests expectations ( if the tests are passing remove them, keep only tests that fail) in tests/wpt/metadata/dom/nodes/.
**Update corresponding tests expectations ( if the tests are passing remove them, keep only tests that fail) in tests/wpt/metadata/dom/nodes/.


*'''Vector addition''':
*'''Vector addition''':

Revision as of 04:59, 23 March 2017

Mutation Observer API Project with SERVO & RUST

Servo is a prototype web browser engine written in the RUST language.Servo uses a variety of back-end implementations for drawing graphics depending on the operating system.One of such back-end is only compatible with Android right now, and we want to extend and refactor that back-end to enable on all Linux systems..

Introduction

Servo

ServoServo is an open source prototype web browser layout engine being developed by Mozilla, and it is written in Rust language. The main idea is to create a highly parallel environment, in which different components can be handled by fine grained, isolated tasks. The different components can be rendering, HTML parsing, etc.

Rust

Rust is an open source systems programming language developed by Mozilla. Servo is written in Rust. The main purpose behind it's design is to be thread safe and concurrent. The emphasis is also on speed, safety and control of memory layout.

Background information

The DOM standard defines a MutationObserver API that allows web content to receive callbacks when the page contents are mutated. The goal of this work is to implement the fundamental pieces required to support this API.

Tracking issue

The Original Tracking Issue for the same can be found at the Tracking Issue page of the Mutation Observer Project.

Project Description

  • Initial steps for Stub method Implementation:
    • create the MutationObserver and MutationRecord interfaces with stub method implementations
      • hide the new interfaces by default by adding a [Pref="dom.mutation_observer.enabled"] attribute to each one and add a corresponding preference to resources/prefs.json
  • Testing:
    • add a __dir__.ini file to tests/wpt/metadata/dom/nodes/ which enables the new preference by including "prefs: ["dom.mutation_observer.enabled:true"]".
    • Tests are present in web-platform-tests directory (i.e .tests/wpt/web-platform-tests/dom/nodes).
    • Run web-platform tests from the root by using the command ./mach test-wpt tests/wpt/web-platform-tests/dom/nodes.
    • Update corresponding tests expectations ( if the tests are passing remove them, keep only tests that fail) in tests/wpt/metadata/dom/nodes/.
  • Vector addition:
    • Add a vector of MutationObserver objects as a member of ScriptThread
  • Constructor creation:
    • Implement the MutationObserver constructor

Design Patterns

TODO

Conclusion

After making our changes,...TODO

References

1. https://doc.rust-lang.org/stable/book/
2. https://en.wikipedia.org/wiki/Rust_(programming_language)
3. https://en.wikipedia.org/wiki/Servo_(layout_engine)