<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Maalbash</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Maalbash"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Maalbash"/>
	<updated>2026-05-08T15:56:26Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1603_Implement_Common_Parts_of_the_CSSOM_API&amp;diff=102055</id>
		<title>CSC/ECE 517 Spring 2016 M1603 Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1603_Implement_Common_Parts_of_the_CSSOM_API&amp;diff=102055"/>
		<updated>2016-04-11T18:30:42Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
==='''CSSOM'''===&lt;br /&gt;
CSSOM which is the CSS Object Model defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself&amp;lt;ref&amp;gt;https://drafts.csswg.org/cssom/&amp;lt;/ref&amp;gt;. The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes. CSSOM aims at proving a way to access the CSS style classes and properties. One can even modify the CSS rules using this API. These changes can be targeted to affect individual elements or the whole webpage. &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. CSSOM is actually a collection of all the CSS stylesheets found on a web page which is very similar to Document Object Model (DOM) but only stores collection of CSS instead of HTML. &amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;. CSSOM identifies which elements on your webpage require styling and modifies them. It is also used to optimize the speed at which webpages get loaded.&lt;br /&gt;
It is an integral part of the process that is used to display content on a webpage. The web browser first creates a DOM by examining the HTMLs, then creates a CSSOM by examining the CSS stylesheets. It then creates a render tree by comibining the DOM and the CSSOM and displays the webpage.&amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc. What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python. The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in Rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS).&amp;lt;ref&amp;gt;https://servo.org&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project is to go through the following steps in a somewhat linear order:&lt;br /&gt;
*Compiling servo on a machine and making sure it runs on a specific url. Then emailing the mozilla mailing list to introduce the group.&lt;br /&gt;
*Creating a StyleSheet interface which represents an abstract, base style sheet. This creation requires a couple of steps :&lt;br /&gt;
**Adding a new IDL file (which contains specifications)&lt;br /&gt;
**Creating the Rust file which has implementations of the things specified in IDL.&lt;br /&gt;
**Listing the Rust file in mod.rs file.&lt;br /&gt;
*After that comes the creation of  a StyleSheetList interface. Which represents an ordered collection of CSS style sheets. And basically because it's another interface, again the .webidl and .rs files need to be implemented.&lt;br /&gt;
*Adding the attribute &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;. &lt;br /&gt;
*In the three steps just mentioned some guidelines about implementation must be followed, like the return types of certain methods.&lt;br /&gt;
*Run the tests specified by the mozilla team.&lt;br /&gt;
*Finally updating the interfaces.html, and adding the new interface names.&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*making the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual implementation of &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; and adding a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*creating the CSSRule interface which represents an abstract, base CSS Rule. It is done using the Webidl format.&lt;br /&gt;
*creating the CSSRuleList interface and implementing &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt; which is an array like object containing an ordered collection of CSS rules.&lt;br /&gt;
*implementing the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; to allow mutation of the contents of the vector in the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
*creating the CSSStyleRule interface that extends the CSSRule interface and making &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
===='''Class Diagram'''====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UMLinitial.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated Element. We will then implement the ownerNode attribute in the StyleSheet inteface by making changes in the &amp;lt;code&amp;gt;StyleSheet.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;stylesheet.rs&amp;lt;/code&amp;gt;. We would just declare &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute in the .webidl and give its implementation in .rs file.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will be making a new interface named as &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;. In the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file, we will create a method to return the &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of the Document by giving a particular index as the input.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
&lt;br /&gt;
As the next step, we will be creating the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; interface which has attributes like &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cssText&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;parentRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;parentStyleSheet&amp;lt;/code&amp;gt;. This interface will also have several constants like &amp;lt;code&amp;gt;STYLE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CHARSET_RULE&amp;lt;/code&amp;gt; , &amp;lt;code&amp;gt;IMPORT_RULE, MEDIA_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FONT_FACE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PAGE_RULE, MARGIN_RULE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;NAMESPACE_RULE&amp;lt;/code&amp;gt;.&lt;br /&gt;
This will require us to create two files: &amp;lt;code&amp;gt;CSSRule.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;cssrule.rs&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 4'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating &amp;lt;code&amp;gt;CSSRuleList&amp;lt;/code&amp;gt; interface by creating 2 files: &amp;lt;code&amp;gt;CSSRuleList.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSRulelist.rs&amp;lt;/code&amp;gt;. This interface will have one attribute, which is length and a getter which returns the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; at a particular index. We will also implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 5'''====&lt;br /&gt;
&lt;br /&gt;
We will make &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; type which contains a RefCell and implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===='''Step 6'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating a new interface &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; , by making 2 files: &amp;lt;code&amp;gt;CSSStyleRule.webidl&amp;lt;code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleRule.rs&amp;lt;/code&amp;gt;. The interface will contain two attributes, namely, &amp;lt;code&amp;gt;selectorText&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleDeclaration&amp;lt;/code&amp;gt; style. The &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; will be implemented to return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
===='''Class Diagram'''====&lt;br /&gt;
&lt;br /&gt;
[[File:UMLsubs.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Principles'''==&lt;br /&gt;
In this mozilla project, we are asked to strictly follow the existing design patterns and coding conventions. The main aim of this project is to add and modify interfaces. Interfaces allow developers to follow a clean design principle wherein they do not have to program to classes. It is too easy to add a dependency on a class. In order to avoid that kind of dependency on the implementation i.e. classes, developers can program to interfaces. This type of design pattern is an architectural pattern and makes the code more modular and object oriented. Programming to an interface has a flavor of DRY principle because even if the underlying implementation changes, the handle to the implementation is an interface and that does not change. In this way, our mozilla project becomes more modular and object oriented. Servo has a utility of tests that checks the coding standards followed by Mozilla on this project. We will execute the following utility tests command.&lt;br /&gt;
&amp;lt;code&amp;gt;./mach test-tidy&amp;lt;/code&amp;gt; Any issues encountered by executing this test can be flagged before generating the pull request. This ensures that the developers follow the coding standards.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We have implemented the most commonly-used portions of the CSSOM API specification to increase Servo's compatibility with existing webpages &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. We have created two interfaces, StyleSheet and StyleSheetList in our initial steps. As a part of our subsequent steps, we would be adding 4 new interfaces: CSSStyleSheet, CSSRule, CSSRuleList and the CSSStyleRule interface. We have implemented only the obvious methods for these interfaces so that more advanced work can be done to make this CSSOM API fully functional keeping our work as the basis.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1603_Implement_Common_Parts_of_the_CSSOM_API&amp;diff=102054</id>
		<title>CSC/ECE 517 Spring 2016 M1603 Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1603_Implement_Common_Parts_of_the_CSSOM_API&amp;diff=102054"/>
		<updated>2016-04-11T18:30:24Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
==='''CSSOM'''===&lt;br /&gt;
CSSOM which is the CSS Object Model defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself&amp;lt;ref&amp;gt;https://drafts.csswg.org/cssom/&amp;lt;/ref&amp;gt;. The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes. CSSOM aims at proving a way to access the CSS style classes and properties. One can even modify the CSS rules using this API. These changes can be targeted to affect individual elements or the whole webpage. &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. CSSOM is actually a collection of all the CSS stylesheets found on a web page which is very similar to Document Object Model (DOM) but only stores collection of CSS instead of HTML. &amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;. CSSOM identifies which elements on your webpage require styling and modifies them. It is also used to optimize the speed at which webpages get loaded.&lt;br /&gt;
It is an integral part of the process that is used to display content on a webpage. The web browser first creates a DOM by examining the HTMLs, then creates a CSSOM by examining the CSS stylesheets. It then creates a render tree by comibining the DOM and the CSSOM and displays the webpage.&amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc. What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python. The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in Rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS).&amp;lt;ref&amp;gt;https://servo.org&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project is to go through the following steps in a somewhat linear order:&lt;br /&gt;
*Compiling servo on a machine and making sure it runs on a specific url. Then emailing the mozilla mailing list to introduce the group.&lt;br /&gt;
*Creating a StyleSheet interface which represents an abstract, base style sheet. This creation requires a couple of steps :&lt;br /&gt;
**Adding a new IDL file (which contains specifications)&lt;br /&gt;
**Creating the Rust file which has implementations of the things specified in IDL.&lt;br /&gt;
**Listing the Rust file in mod.rs file.&lt;br /&gt;
*After that comes the creation of  a StyleSheetList interface. Which represents an ordered collection of CSS style sheets. And basically because it's another interface, again the .webidl and .rs files need to be implemented.&lt;br /&gt;
*Adding the attribute &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;. &lt;br /&gt;
*In the three steps just mentioned some guidelines about implementation must be followed, like the return types of certain methods.&lt;br /&gt;
*Run the tests specified by the mozilla team.&lt;br /&gt;
*Finally updating the interfaces.html, and adding the new interface names.&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*making the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual implementation of &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; and adding a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*creating the CSSRule interface which represents an abstract, base CSS Rule. It is done using the Webidl format.&lt;br /&gt;
*creating the CSSRuleList interface and implementing &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt; which is an array like object containing an ordered collection of CSS rules.&lt;br /&gt;
*implementing the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; to allow mutation of the contents of the vector in the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
*creating the CSSStyleRule interface that extends the CSSRule interface and making &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
===='''Class Diagram'''====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UMLinitial.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated Element. We will then implement the ownerNode attribute in the StyleSheet inteface by making changes in the &amp;lt;code&amp;gt;StyleSheet.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;stylesheet.rs&amp;lt;/code&amp;gt;. We would just declare &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute in the .webidl and give its implementation in .rs file.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will be making a new interface named as &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;. In the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file, we will create a method to return the &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of the Document by giving a particular index as the input.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
&lt;br /&gt;
As the next step, we will be creating the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; interface which has attributes like &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cssText&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;parentRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;parentStyleSheet&amp;lt;/code&amp;gt;. This interface will also have several constants like &amp;lt;code&amp;gt;STYLE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CHARSET_RULE&amp;lt;/code&amp;gt; , &amp;lt;code&amp;gt;IMPORT_RULE, MEDIA_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FONT_FACE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PAGE_RULE, MARGIN_RULE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;NAMESPACE_RULE&amp;lt;/code&amp;gt;.&lt;br /&gt;
This will require us to create two files: &amp;lt;code&amp;gt;CSSRule.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;cssrule.rs&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 4'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating &amp;lt;code&amp;gt;CSSRuleList&amp;lt;/code&amp;gt; interface by creating 2 files: &amp;lt;code&amp;gt;CSSRuleList.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSRulelist.rs&amp;lt;/code&amp;gt;. This interface will have one attribute, which is length and a getter which returns the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; at a particular index. We will also implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 5'''====&lt;br /&gt;
&lt;br /&gt;
We will make &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; type which contains a RefCell and implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===='''Step 6'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating a new interface &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; , by making 2 files: &amp;lt;code&amp;gt;CSSStyleRule.webidl&amp;lt;code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleRule.rs&amp;lt;/code&amp;gt;. The interface will contain two attributes, namely, &amp;lt;code&amp;gt;selectorText&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleDeclaration&amp;lt;/code&amp;gt; style. The &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; will be implemented to return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
===='''Class Diagram'''====&lt;br /&gt;
&lt;br /&gt;
[[File:UMLsubs.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Principles'''==&lt;br /&gt;
In this mozilla project, we are asked to strictly follow the existing design patterns and coding conventions. The main aim of this project is to add and modify interfaces. Interfaces allow developers to follow a clean design principle wherein they do not have to program to classes. It is too easy to add a dependency on a class. In order to avoid that kind of dependency on the implementation i.e. classes, developers can program to interfaces. This type of design pattern is an architectural pattern and makes the code more modular and object oriented. Programming to an interface has a flavor of DRY principle because even if the underlying implementation changes, the handle to the implementation is an interface and that does not change. In this way, our mozilla project becomes more modular and object oriented. Servo has a utility of tests that checks the coding standards followed by Mozilla on this project. We will execute the following utility tests command.&lt;br /&gt;
&amp;lt;code&amp;gt;./mach test-tidy&amp;lt;/code&amp;gt; Any issues encountered by executing this test can be flagged before generating the pull request. This ensures that the developers follow the coding standards.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
&lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We have implemented the most commonly-used portions of the CSSOM API specification to increase Servo's compatibility with existing webpages &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. We have created two interfaces, StyleSheet and StyleSheetList in our initial steps. As a part of our subsequent steps, we would be adding 4 new interfaces: CSSStyleSheet, CSSRule, CSSRuleList and the CSSStyleRule interface. We have implemented only the obvious methods for these interfaces so that more advanced work can be done to make this CSSOM API fully functional keeping our work as the basis.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1603_Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101967</id>
		<title>CSC/ECE 517 Spring 2016 M1603 Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1603_Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101967"/>
		<updated>2016-04-09T03:57:32Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Class Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
==='''CSSOM'''===&lt;br /&gt;
CSSOM which is the CSS Object Model defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself&amp;lt;ref&amp;gt;https://drafts.csswg.org/cssom/&amp;lt;/ref&amp;gt;. The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes. CSSOM aims at proving a way to access the CSS style classes and properties. One can even modify the CSS rules using this API. These changes can be targeted to affect individual elements or the whole webpage. &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. CSSOM is actually a collection of all the CSS stylesheets found on a web page which is very similar to Document Object Model (DOM) but only stores collection of CSS instead of HTML. &amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;. CSSOM identifies which elements on your webpage require styling and modifies them. It is also used to optimize the speed at which webpages get loaded.&lt;br /&gt;
It is an integral part of the process that is used to display content on a webpage. The web browser first creates a DOM by examining the HTMLs, then creates a CSSOM by examining the CSS stylesheets. It then creates a render tree by comibining the DOM and the CSSOM and displays the webpage.&amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc. What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python. The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in Rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS).&amp;lt;ref&amp;gt;https://servo.org&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project is to go through the following steps in a somewhat linear order:&lt;br /&gt;
*Compiling servo on a machine and making sure it runs on a specific url. Then emailing the mozilla mailing list to introduce the group.&lt;br /&gt;
*Creating a StyleSheet interface which represents an abstract, base style sheet. This creation requires a couple of steps :&lt;br /&gt;
**Adding a new IDL file (which contains specifications)&lt;br /&gt;
**Creating the Rust file which has implementations of the things specified in IDL.&lt;br /&gt;
**Listing the Rust file in mod.rs file.&lt;br /&gt;
*After that comes the creation of  a StyleSheetList interface. Which represents an ordered collection of CSS style sheets. And basically because it's another interface, again the .webidl and .rs files need to be implemented.&lt;br /&gt;
*Adding the attribute &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;. &lt;br /&gt;
*In the three steps just mentioned some guidelines about implementation must be followed, like the return types of certain methods.&lt;br /&gt;
*Run the tests specified by the mozilla team.&lt;br /&gt;
*Finally updating the interfaces.html, and adding the new interface names.&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*making the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual implementation of &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; and adding a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*creating the CSSRule interface which represents an abstract, base CSS Rule. It is done using the Webidl format.&lt;br /&gt;
*creating the CSSRuleList interface and implementing &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt; which is an array like object containing an ordered collection of CSS rules.&lt;br /&gt;
*implementing the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; to allow mutation of the contents of the vector in the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
*creating the CSSStyleRule interface that extends the CSSRule interface and making &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
===='''Class Diagram'''====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UMLinitial.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated Element. We will then implement the ownerNode attribute in the StyleSheet inteface by making changes in the &amp;lt;code&amp;gt;StyleSheet.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;stylesheet.rs&amp;lt;/code&amp;gt;. We would just declare &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute in the .webidl and give its implementation in .rs file.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will be making a new interface named as &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;. In the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file, we will create a method to return the &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of the Document by giving a particular index as the input.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
&lt;br /&gt;
As the next step, we will be creating the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; interface which has attributes like &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cssText&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;parentRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;parentStyleSheet&amp;lt;/code&amp;gt;. This interface will also have several constants like &amp;lt;code&amp;gt;STYLE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CHARSET_RULE&amp;lt;/code&amp;gt; , &amp;lt;code&amp;gt;IMPORT_RULE, MEDIA_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FONT_FACE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PAGE_RULE, MARGIN_RULE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;NAMESPACE_RULE&amp;lt;/code&amp;gt;.&lt;br /&gt;
This will require us to create two files: &amp;lt;code&amp;gt;CSSRule.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;cssrule.rs&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 4'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating &amp;lt;code&amp;gt;CSSRuleList&amp;lt;/code&amp;gt; interface by creating 2 files: &amp;lt;code&amp;gt;CSSRuleList.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSRulelist.rs&amp;lt;/code&amp;gt;. This interface will have one attribute, which is length and a getter which returns the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; at a particular index. We will also implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 5'''====&lt;br /&gt;
&lt;br /&gt;
We will make &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; type which contains a RefCell and implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===='''Step 6'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating a new interface &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; , by making 2 files: &amp;lt;code&amp;gt;CSSStyleRule.webidl&amp;lt;code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleRule.rs&amp;lt;/code&amp;gt;. The interface will contain two attributes, namely, &amp;lt;code&amp;gt;selectorText&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleDeclaration&amp;lt;/code&amp;gt; style. The &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; will be implemented to return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
===='''Class Diagram'''====&lt;br /&gt;
&lt;br /&gt;
[[File:UMLsubs.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Principles'''==&lt;br /&gt;
In this mozilla project, we are asked to strictly follow the existing design patterns and coding conventions. The main aim of this project is to add and modify interfaces. Interfaces allow developers to follow a clean design principle wherein they do not have to program to classes. It is too easy to add a dependency on a class. In order to avoid that kind of dependency on the implementation i.e. classes, developers can program to interfaces. This type of design pattern is an architectural pattern and makes the code more modular and object oriented. Programming to an interface has a flavor of DRY principle because even if the underlying implementation changes, the handle to the implementation is an interface and that does not change. In this way, our mozilla project becomes more modular and object oriented. Servo has a utility of tests that checks the coding standards followed by Mozilla on this project. We will execute the following utility tests command.&lt;br /&gt;
&amp;lt;code&amp;gt;./mach test-tidy&amp;lt;/code&amp;gt; Any issues encountered by executing this test can be flagged before generating the pull request. This ensures that the developers follow the coding standards.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We have implemented the most commonly-used portions of the CSSOM API specification to increase Servo's compatibility with existing webpages &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. We have created two interfaces, StyleSheet and StyleSheetList in our initial steps. As a part of our subsequent steps, we would be adding 4 new interfaces: CSSStyleSheet, CSSRule, CSSRuleList and the CSSStyleRule interface. We have implemented only the obvious methods for these interfaces so that more advanced work can be done to make this CSSOM API fully functional keeping our work as the basis.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:UMLsubs.png&amp;diff=101966</id>
		<title>File:UMLsubs.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:UMLsubs.png&amp;diff=101966"/>
		<updated>2016-04-09T03:55:21Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1603_Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101965</id>
		<title>CSC/ECE 517 Spring 2016 M1603 Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1603_Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101965"/>
		<updated>2016-04-09T03:54:28Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
==='''CSSOM'''===&lt;br /&gt;
CSSOM which is the CSS Object Model defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself&amp;lt;ref&amp;gt;https://drafts.csswg.org/cssom/&amp;lt;/ref&amp;gt;. The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes. CSSOM aims at proving a way to access the CSS style classes and properties. One can even modify the CSS rules using this API. These changes can be targeted to affect individual elements or the whole webpage. &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. CSSOM is actually a collection of all the CSS stylesheets found on a web page which is very similar to Document Object Model (DOM) but only stores collection of CSS instead of HTML. &amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;. CSSOM identifies which elements on your webpage require styling and modifies them. It is also used to optimize the speed at which webpages get loaded.&lt;br /&gt;
It is an integral part of the process that is used to display content on a webpage. The web browser first creates a DOM by examining the HTMLs, then creates a CSSOM by examining the CSS stylesheets. It then creates a render tree by comibining the DOM and the CSSOM and displays the webpage.&amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc. What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python. The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in Rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS).&amp;lt;ref&amp;gt;https://servo.org&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project is to go through the following steps in a somewhat linear order:&lt;br /&gt;
*Compiling servo on a machine and making sure it runs on a specific url. Then emailing the mozilla mailing list to introduce the group.&lt;br /&gt;
*Creating a StyleSheet interface which represents an abstract, base style sheet. This creation requires a couple of steps :&lt;br /&gt;
**Adding a new IDL file (which contains specifications)&lt;br /&gt;
**Creating the Rust file which has implementations of the things specified in IDL.&lt;br /&gt;
**Listing the Rust file in mod.rs file.&lt;br /&gt;
*After that comes the creation of  a StyleSheetList interface. Which represents an ordered collection of CSS style sheets. And basically because it's another interface, again the .webidl and .rs files need to be implemented.&lt;br /&gt;
*Adding the attribute &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;. &lt;br /&gt;
*In the three steps just mentioned some guidelines about implementation must be followed, like the return types of certain methods.&lt;br /&gt;
*Run the tests specified by the mozilla team.&lt;br /&gt;
*Finally updating the interfaces.html, and adding the new interface names.&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*making the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual implementation of &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; and adding a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*creating the CSSRule interface which represents an abstract, base CSS Rule. It is done using the Webidl format.&lt;br /&gt;
*creating the CSSRuleList interface and implementing &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt; which is an array like object containing an ordered collection of CSS rules.&lt;br /&gt;
*implementing the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; to allow mutation of the contents of the vector in the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
*creating the CSSStyleRule interface that extends the CSSRule interface and making &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
===='''Class Diagram'''====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UMLinitial.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated Element. We will then implement the ownerNode attribute in the StyleSheet inteface by making changes in the &amp;lt;code&amp;gt;StyleSheet.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;stylesheet.rs&amp;lt;/code&amp;gt;. We would just declare &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute in the .webidl and give its implementation in .rs file.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will be making a new interface named as &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;. In the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file, we will create a method to return the &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of the Document by giving a particular index as the input.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
&lt;br /&gt;
As the next step, we will be creating the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; interface which has attributes like &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cssText&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;parentRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;parentStyleSheet&amp;lt;/code&amp;gt;. This interface will also have several constants like &amp;lt;code&amp;gt;STYLE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CHARSET_RULE&amp;lt;/code&amp;gt; , &amp;lt;code&amp;gt;IMPORT_RULE, MEDIA_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FONT_FACE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PAGE_RULE, MARGIN_RULE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;NAMESPACE_RULE&amp;lt;/code&amp;gt;.&lt;br /&gt;
This will require us to create two files: &amp;lt;code&amp;gt;CSSRule.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;cssrule.rs&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 4'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating &amp;lt;code&amp;gt;CSSRuleList&amp;lt;/code&amp;gt; interface by creating 2 files: &amp;lt;code&amp;gt;CSSRuleList.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSRulelist.rs&amp;lt;/code&amp;gt;. This interface will have one attribute, which is length and a getter which returns the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; at a particular index. We will also implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 5'''====&lt;br /&gt;
&lt;br /&gt;
We will make &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; type which contains a RefCell and implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===='''Step 6'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating a new interface &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; , by making 2 files: &amp;lt;code&amp;gt;CSSStyleRule.webidl&amp;lt;code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleRule.rs&amp;lt;/code&amp;gt;. The interface will contain two attributes, namely, &amp;lt;code&amp;gt;selectorText&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleDeclaration&amp;lt;/code&amp;gt; style. The &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; will be implemented to return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
===='''Class Diagram'''====&lt;br /&gt;
&lt;br /&gt;
[[File:UMLsubs.jpg]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Principles'''==&lt;br /&gt;
In this mozilla project, we are asked to strictly follow the existing design patterns and coding conventions. The main aim of this project is to add and modify interfaces. Interfaces allow developers to follow a clean design principle wherein they do not have to program to classes. It is too easy to add a dependency on a class. In order to avoid that kind of dependency on the implementation i.e. classes, developers can program to interfaces. This type of design pattern is an architectural pattern and makes the code more modular and object oriented. Programming to an interface has a flavor of DRY principle because even if the underlying implementation changes, the handle to the implementation is an interface and that does not change. In this way, our mozilla project becomes more modular and object oriented. Servo has a utility of tests that checks the coding standards followed by Mozilla on this project. We will execute the following utility tests command.&lt;br /&gt;
&amp;lt;code&amp;gt;./mach test-tidy&amp;lt;/code&amp;gt; Any issues encountered by executing this test can be flagged before generating the pull request. This ensures that the developers follow the coding standards.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We have implemented the most commonly-used portions of the CSSOM API specification to increase Servo's compatibility with existing webpages &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. We have created two interfaces, StyleSheet and StyleSheetList in our initial steps. As a part of our subsequent steps, we would be adding 4 new interfaces: CSSStyleSheet, CSSRule, CSSRuleList and the CSSStyleRule interface. We have implemented only the obvious methods for these interfaces so that more advanced work can be done to make this CSSOM API fully functional keeping our work as the basis.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1603_Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101964</id>
		<title>CSC/ECE 517 Spring 2016 M1603 Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1603_Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101964"/>
		<updated>2016-04-09T03:02:13Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* UML Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
==='''CSSOM'''===&lt;br /&gt;
CSSOM which is the CSS Object Model defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself&amp;lt;ref&amp;gt;https://drafts.csswg.org/cssom/&amp;lt;/ref&amp;gt;. The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes. CSSOM aims at proving a way to access the CSS style classes and properties. One can even modify the CSS rules using this API. These changes can be targeted to affect individual elements or the whole webpage. &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. CSSOM is actually a collection of all the CSS stylesheets found on a web page which is very similar to Document Object Model (DOM) but only stores collection of CSS instead of HTML. &amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;. CSSOM identifies which elements on your webpage require styling and modifies them. It is also used to optimize the speed at which webpages get loaded.&lt;br /&gt;
It is an integral part of the process that is used to display content on a webpage. The web browser first creates a DOM by examining the HTMLs, then creates a CSSOM by examining the CSS stylesheets. It then creates a render tree by comibining the DOM and the CSSOM and displays the webpage.&amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc. What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python. The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in Rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS).&amp;lt;ref&amp;gt;https://servo.org&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project is to go through the following steps in a somewhat linear order:&lt;br /&gt;
*Compiling servo on a machine and making sure it runs on a specific url. Then emailing the mozilla mailing list to introduce the group.&lt;br /&gt;
*Creating a StyleSheet interface which represents an abstract, base style sheet. This creation requires a couple of steps :&lt;br /&gt;
**Adding a new IDL file (which contains specifications)&lt;br /&gt;
**Creating the Rust file which has implementations of the things specified in IDL.&lt;br /&gt;
**Listing the Rust file in mod.rs file.&lt;br /&gt;
*After that comes the creation of  a StyleSheetList interface. Which represents an ordered collection of CSS style sheets. And basically because it's another interface, again the .webidl and .rs files need to be implemented.&lt;br /&gt;
*Adding the attribute &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;. &lt;br /&gt;
*In the three steps just mentioned some guidelines about implementation must be followed, like the return types of certain methods.&lt;br /&gt;
*Run the tests specified by the mozilla team.&lt;br /&gt;
*Finally updating the interfaces.html, and adding the new interface names.&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*making the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual implementation of &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; and adding a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*creating the CSSRule interface which represents an abstract, base CSS Rule. It is done using the Webidl format.&lt;br /&gt;
*creating the CSSRuleList interface and implementing &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt; which is an array like object containing an ordered collection of CSS rules.&lt;br /&gt;
*implementing the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; to allow mutation of the contents of the vector in the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
*creating the CSSStyleRule interface that extends the CSSRule interface and making &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
===='''Class Diagram'''====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UMLinitial.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated Element. We will then implement the ownerNode attribute in the StyleSheet inteface by making changes in the &amp;lt;code&amp;gt;StyleSheet.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;stylesheet.rs&amp;lt;/code&amp;gt;. We would just declare &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute in the .webidl and give its implementation in .rs file.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will be making a new interface named as &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;. In the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file, we will create a method to return the &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of the Document by giving a particular index as the input.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
&lt;br /&gt;
As the next step, we will be creating the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; interface which has attributes like &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cssText&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;parentRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;parentStyleSheet&amp;lt;/code&amp;gt;. This interface will also have several constants like &amp;lt;code&amp;gt;STYLE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CHARSET_RULE&amp;lt;/code&amp;gt; , &amp;lt;code&amp;gt;IMPORT_RULE, MEDIA_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FONT_FACE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PAGE_RULE, MARGIN_RULE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;NAMESPACE_RULE&amp;lt;/code&amp;gt;.&lt;br /&gt;
This will require us to create two files: &amp;lt;code&amp;gt;CSSRule.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;cssrule.rs&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 4'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating &amp;lt;code&amp;gt;CSSRuleList&amp;lt;/code&amp;gt; interface by creating 2 files: &amp;lt;code&amp;gt;CSSRuleList.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSRulelist.rs&amp;lt;/code&amp;gt;. This interface will have one attribute, which is length and a getter which returns the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; at a particular index. We will also implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 5'''====&lt;br /&gt;
&lt;br /&gt;
We will make &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; type which contains a RefCell and implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===='''Step 6'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating a new interface &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; , by making 2 files: &amp;lt;code&amp;gt;CSSStyleRule.webidl&amp;lt;code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleRule.rs&amp;lt;/code&amp;gt;. The interface will contain two attributes, namely, &amp;lt;code&amp;gt;selectorText&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleDeclaration&amp;lt;/code&amp;gt; style. The &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; will be implemented to return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Design Principles'''==&lt;br /&gt;
In this mozilla project, we are asked to strictly follow the existing design patterns and coding conventions. The main aim of this project is to add and modify interfaces. Interfaces allow developers to follow a clean design principle wherein they do not have to program to classes. It is too easy to add a dependency on a class. In order to avoid that kind of dependency on the implementation i.e. classes, developers can program to interfaces. This type of design pattern is an architectural pattern and makes the code more modular and object oriented. Programming to an interface has a flavor of DRY principle because even if the underlying implementation changes, the handle to the implementation is an interface and that does not change. In this way, our mozilla project becomes more modular and object oriented. Servo has a utility of tests that checks the coding standards followed by Mozilla on this project. We will execute the following utility tests command.&lt;br /&gt;
&amp;lt;code&amp;gt;./mach test-tidy&amp;lt;/code&amp;gt; Any issues encountered by executing this test can be flagged before generating the pull request. This ensures that the developers follow the coding standards.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We have implemented the most commonly-used portions of the CSSOM API specification to increase Servo's compatibility with existing webpages &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. We have created two interfaces, StyleSheet and StyleSheetList in our initial steps. As a part of our subsequent steps, we would be adding 4 new interfaces: CSSStyleSheet, CSSRule, CSSRuleList and the CSSStyleRule interface. We have implemented only the obvious methods for these interfaces so that more advanced work can be done to make this CSSOM API fully functional keeping our work as the basis.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1603_Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101963</id>
		<title>CSC/ECE 517 Spring 2016 M1603 Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1603_Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101963"/>
		<updated>2016-04-09T02:56:54Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
==='''CSSOM'''===&lt;br /&gt;
CSSOM which is the CSS Object Model defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself&amp;lt;ref&amp;gt;https://drafts.csswg.org/cssom/&amp;lt;/ref&amp;gt;. The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes. CSSOM aims at proving a way to access the CSS style classes and properties. One can even modify the CSS rules using this API. These changes can be targeted to affect individual elements or the whole webpage. &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. CSSOM is actually a collection of all the CSS stylesheets found on a web page which is very similar to Document Object Model (DOM) but only stores collection of CSS instead of HTML. &amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;. CSSOM identifies which elements on your webpage require styling and modifies them. It is also used to optimize the speed at which webpages get loaded.&lt;br /&gt;
It is an integral part of the process that is used to display content on a webpage. The web browser first creates a DOM by examining the HTMLs, then creates a CSSOM by examining the CSS stylesheets. It then creates a render tree by comibining the DOM and the CSSOM and displays the webpage.&amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc. What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python. The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in Rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS).&amp;lt;ref&amp;gt;https://servo.org&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project is to go through the following steps in a somewhat linear order:&lt;br /&gt;
*Compiling servo on a machine and making sure it runs on a specific url. Then emailing the mozilla mailing list to introduce the group.&lt;br /&gt;
*Creating a StyleSheet interface which represents an abstract, base style sheet. This creation requires a couple of steps :&lt;br /&gt;
**Adding a new IDL file (which contains specifications)&lt;br /&gt;
**Creating the Rust file which has implementations of the things specified in IDL.&lt;br /&gt;
**Listing the Rust file in mod.rs file.&lt;br /&gt;
*After that comes the creation of  a StyleSheetList interface. Which represents an ordered collection of CSS style sheets. And basically because it's another interface, again the .webidl and .rs files need to be implemented.&lt;br /&gt;
*Adding the attribute &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;. &lt;br /&gt;
*In the three steps just mentioned some guidelines about implementation must be followed, like the return types of certain methods.&lt;br /&gt;
*Run the tests specified by the mozilla team.&lt;br /&gt;
*Finally updating the interfaces.html, and adding the new interface names.&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*making the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual implementation of &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; and adding a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*creating the CSSRule interface which represents an abstract, base CSS Rule. It is done using the Webidl format.&lt;br /&gt;
*creating the CSSRuleList interface and implementing &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt; which is an array like object containing an ordered collection of CSS rules.&lt;br /&gt;
*implementing the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; to allow mutation of the contents of the vector in the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
*creating the CSSStyleRule interface that extends the CSSRule interface and making &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
===='''UML Diagram'''====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UMLinitial.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated Element. We will then implement the ownerNode attribute in the StyleSheet inteface by making changes in the &amp;lt;code&amp;gt;StyleSheet.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;stylesheet.rs&amp;lt;/code&amp;gt;. We would just declare &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute in the .webidl and give its implementation in .rs file.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will be making a new interface named as &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;. In the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file, we will create a method to return the &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of the Document by giving a particular index as the input.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
&lt;br /&gt;
As the next step, we will be creating the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; interface which has attributes like &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cssText&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;parentRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;parentStyleSheet&amp;lt;/code&amp;gt;. This interface will also have several constants like &amp;lt;code&amp;gt;STYLE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CHARSET_RULE&amp;lt;/code&amp;gt; , &amp;lt;code&amp;gt;IMPORT_RULE, MEDIA_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FONT_FACE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PAGE_RULE, MARGIN_RULE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;NAMESPACE_RULE&amp;lt;/code&amp;gt;.&lt;br /&gt;
This will require us to create two files: &amp;lt;code&amp;gt;CSSRule.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;cssrule.rs&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 4'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating &amp;lt;code&amp;gt;CSSRuleList&amp;lt;/code&amp;gt; interface by creating 2 files: &amp;lt;code&amp;gt;CSSRuleList.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSRulelist.rs&amp;lt;/code&amp;gt;. This interface will have one attribute, which is length and a getter which returns the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; at a particular index. We will also implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 5'''====&lt;br /&gt;
&lt;br /&gt;
We will make &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; type which contains a RefCell and implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===='''Step 6'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating a new interface &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; , by making 2 files: &amp;lt;code&amp;gt;CSSStyleRule.webidl&amp;lt;code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleRule.rs&amp;lt;/code&amp;gt;. The interface will contain two attributes, namely, &amp;lt;code&amp;gt;selectorText&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleDeclaration&amp;lt;/code&amp;gt; style. The &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; will be implemented to return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Design Principles'''==&lt;br /&gt;
In this mozilla project, we are asked to strictly follow the existing design patterns and coding conventions. The main aim of this project is to add and modify interfaces. Interfaces allow developers to follow a clean design principle wherein they do not have to program to classes. It is too easy to add a dependency on a class. In order to avoid that kind of dependency on the implementation i.e. classes, developers can program to interfaces. This type of design pattern is an architectural pattern and makes the code more modular and object oriented. Programming to an interface has a flavor of DRY principle because even if the underlying implementation changes, the handle to the implementation is an interface and that does not change. In this way, our mozilla project becomes more modular and object oriented. Servo has a utility of tests that checks the coding standards followed by Mozilla on this project. We will execute the following utility tests command.&lt;br /&gt;
&amp;lt;code&amp;gt;./mach test-tidy&amp;lt;/code&amp;gt; Any issues encountered by executing this test can be flagged before generating the pull request. This ensures that the developers follow the coding standards.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We have implemented the most commonly-used portions of the CSSOM API specification to increase Servo's compatibility with existing webpages &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. We have created two interfaces, StyleSheet and StyleSheetList in our initial steps. As a part of our subsequent steps, we would be adding 4 new interfaces: CSSStyleSheet, CSSRule, CSSRuleList and the CSSStyleRule interface. We have implemented only the obvious methods for these interfaces so that more advanced work can be done to make this CSSOM API fully functional keeping our work as the basis.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1603_Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101962</id>
		<title>CSC/ECE 517 Spring 2016 M1603 Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1603_Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101962"/>
		<updated>2016-04-09T02:44:37Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* UML Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
==='''CSSOM'''===&lt;br /&gt;
CSSOM which is the CSS Object Model defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself&amp;lt;ref&amp;gt;https://drafts.csswg.org/cssom/&amp;lt;/ref&amp;gt;. The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes. CSSOM aims at proving a way to access the CSS style classes and properties. One can even modify the CSS rules using this API. These changes can be targeted to affect individual elements or the whole webpage. &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. CSSOM is actually a collection of all the CSS stylesheets found on a web page which is very similar to Document Object Model (DOM) but only stores collection of CSS instead of HTML. &amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;. CSSOM identifies which elements on your webpage require styling and modifies them. It is also used to optimize the speed at which webpages get loaded.&lt;br /&gt;
It is an integral part of the process that is used to display content on a webpage. The web browser first creates a DOM by examining the HTMLs, then creates a CSSOM by examining the CSS stylesheets. It then creates a render tree by comibining the DOM and the CSSOM and displays the webpage.&amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc. What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python. The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in Rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS).&amp;lt;ref&amp;gt;https://servo.org&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project is to go through the following steps in a somewhat linear order:&lt;br /&gt;
*Compiling servo on a machine and making sure it runs on a specific url. Then emailing the mozilla mailing list to introduce the group.&lt;br /&gt;
*Creating a StyleSheet interface which represents an abstract, base style sheet. This creation requires a couple of steps :&lt;br /&gt;
**Adding a new IDL file (which contains specifications)&lt;br /&gt;
**Creating the Rust file which has implementations of the things specified in IDL.&lt;br /&gt;
**Listing the Rust file in mod.rs file.&lt;br /&gt;
*After that comes the creation of  a StyleSheetList interface. Which represents an ordered collection of CSS style sheets. And basically because it's another interface, again the .webidl and .rs files need to be implemented.&lt;br /&gt;
*Adding the attribute &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;. &lt;br /&gt;
*In the three steps just mentioned some guidelines about implementation must be followed, like the return types of certain methods.&lt;br /&gt;
*Run the tests specified by the mozilla team.&lt;br /&gt;
*Finally updating the interfaces.html, and adding the new interface names.&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*making the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual implementation of &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; and adding a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*creating the CSSRule interface which represents an abstract, base CSS Rule. It is done using the Webidl format.&lt;br /&gt;
*creating the CSSRuleList interface and implementing &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt; which is an array like object containing an ordered collection of CSS rules.&lt;br /&gt;
*implementing the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; to allow mutation of the contents of the vector in the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
*creating the CSSStyleRule interface that extends the CSSRule interface and making &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
===='''UML Diagram'''====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UMLinitial.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated Element. We will then implement the ownerNode attribute in the StyleSheet inteface by making changes in the &amp;lt;code&amp;gt;StyleSheet.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;stylesheet.rs&amp;lt;/code&amp;gt;. We would just declare &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute in the .webidl and give its implementation in .rs file.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will be making a new interface named as &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;. In the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file, we will create a method to return the &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of the Document by giving a particular index as the input.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
&lt;br /&gt;
As the next step, we will be creating the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; interface which has attributes like &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cssText&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;parentRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;parentStyleSheet&amp;lt;/code&amp;gt;. This interface will also have several constants like &amp;lt;code&amp;gt;STYLE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CHARSET_RULE&amp;lt;/code&amp;gt; , &amp;lt;code&amp;gt;IMPORT_RULE, MEDIA_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FONT_FACE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PAGE_RULE, MARGIN_RULE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;NAMESPACE_RULE&amp;lt;/code&amp;gt;.&lt;br /&gt;
This will require us to create two files: &amp;lt;code&amp;gt;CSSRule.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;cssrule.rs&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 4'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating &amp;lt;code&amp;gt;CSSRuleList&amp;lt;/code&amp;gt; interface by creating 2 files: &amp;lt;code&amp;gt;CSSRuleList.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSRulelist.rs&amp;lt;/code&amp;gt;. This interface will have one attribute, which is length and a getter which returns the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; at a particular index. We will also implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 5'''====&lt;br /&gt;
&lt;br /&gt;
We will make &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; type which contains a RefCell and implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===='''Step 6'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating a new interface &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; , by making 2 files: &amp;lt;code&amp;gt;CSSStyleRule.webidl&amp;lt;code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleRule.rs&amp;lt;/code&amp;gt;. The interface will contain two attributes, namely, &amp;lt;code&amp;gt;selectorText&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleDeclaration&amp;lt;/code&amp;gt; style. The &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; will be implemented to return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Design Principles'''==&lt;br /&gt;
In this mozilla project, we are asked to strictly follow the existing design patterns and coding conventions. The main aim of this project is to add and modify interfaces. Interfaces allow developers to follow a clean design principle wherein they do not have to program to classes. It is too easy to add a dependency on a class. In order to avoid that kind of dependency on the implementation i.e. classes, developers can program to interfaces. This type of design pattern is an architectural pattern and makes the code more modular and object oriented. Programming to an interface has a flavor of DRY principle because even if the underlying implementation changes, the handle to the implementation is an interface and that does not change. In this way, our mozilla project becomes more modular and object oriented. Servo has a utility of tests that checks the coding standards followed by Mozilla on this project. We will execute the following utility tests command.&lt;br /&gt;
&amp;lt;code&amp;gt;./mach test-tidy&amp;lt;/code&amp;gt; Any issues encountered by executing this test can be flagged before generating the pull request. This ensures that the developers follow the coding standards.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We have tried to implement the most commonly-used portions of the CSSOM API specification to increase Servo's compatibility with existing webpages &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. We have created two interfaces, StyleSheet and StyleSheetList in our initial steps. As a part of our subsequent steps, we would be adding 4 new interfaces: CSSStyleSheet, CSSRule, CSSRuleList and the CSSStyleRule interface. We have implemented only the obvious methods for these interfaces so that more advanced work can be done to make this CSSOM API fully functional keeping our work as the basis.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1603_Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101961</id>
		<title>CSC/ECE 517 Spring 2016 M1603 Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1603_Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101961"/>
		<updated>2016-04-09T02:43:39Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
==='''CSSOM'''===&lt;br /&gt;
CSSOM which is the CSS Object Model defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself&amp;lt;ref&amp;gt;https://drafts.csswg.org/cssom/&amp;lt;/ref&amp;gt;. The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes. CSSOM aims at proving a way to access the CSS style classes and properties. One can even modify the CSS rules using this API. These changes can be targeted to affect individual elements or the whole webpage. &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. CSSOM is actually a collection of all the CSS stylesheets found on a web page which is very similar to Document Object Model (DOM) but only stores collection of CSS instead of HTML. &amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;. CSSOM identifies which elements on your webpage require styling and modifies them. It is also used to optimize the speed at which webpages get loaded.&lt;br /&gt;
It is an integral part of the process that is used to display content on a webpage. The web browser first creates a DOM by examining the HTMLs, then creates a CSSOM by examining the CSS stylesheets. It then creates a render tree by comibining the DOM and the CSSOM and displays the webpage.&amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc. What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python. The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in Rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS).&amp;lt;ref&amp;gt;https://servo.org&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project is to go through the following steps in a somewhat linear order:&lt;br /&gt;
*Compiling servo on a machine and making sure it runs on a specific url. Then emailing the mozilla mailing list to introduce the group.&lt;br /&gt;
*Creating a StyleSheet interface which represents an abstract, base style sheet. This creation requires a couple of steps :&lt;br /&gt;
**Adding a new IDL file (which contains specifications)&lt;br /&gt;
**Creating the Rust file which has implementations of the things specified in IDL.&lt;br /&gt;
**Listing the Rust file in mod.rs file.&lt;br /&gt;
*After that comes the creation of  a StyleSheetList interface. Which represents an ordered collection of CSS style sheets. And basically because it's another interface, again the .webidl and .rs files need to be implemented.&lt;br /&gt;
*Adding the attribute &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;. &lt;br /&gt;
*In the three steps just mentioned some guidelines about implementation must be followed, like the return types of certain methods.&lt;br /&gt;
*Run the tests specified by the mozilla team.&lt;br /&gt;
*Finally updating the interfaces.html, and adding the new interface names.&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*making the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual implementation of &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; and adding a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*creating the CSSRule interface which represents an abstract, base CSS Rule. It is done using the Webidl format.&lt;br /&gt;
*creating the CSSRuleList interface and implementing &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt; which is an array like object containing an ordered collection of CSS rules.&lt;br /&gt;
*implementing the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; to allow mutation of the contents of the vector in the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
*creating the CSSStyleRule interface that extends the CSSRule interface and making &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
==='''UML Diagram'''===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UMLinitial.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated Element. We will then implement the ownerNode attribute in the StyleSheet inteface by making changes in the &amp;lt;code&amp;gt;StyleSheet.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;stylesheet.rs&amp;lt;/code&amp;gt;. We would just declare &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute in the .webidl and give its implementation in .rs file.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will be making a new interface named as &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;. In the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file, we will create a method to return the &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of the Document by giving a particular index as the input.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
&lt;br /&gt;
As the next step, we will be creating the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; interface which has attributes like &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cssText&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;parentRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;parentStyleSheet&amp;lt;/code&amp;gt;. This interface will also have several constants like &amp;lt;code&amp;gt;STYLE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CHARSET_RULE&amp;lt;/code&amp;gt; , &amp;lt;code&amp;gt;IMPORT_RULE, MEDIA_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FONT_FACE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PAGE_RULE, MARGIN_RULE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;NAMESPACE_RULE&amp;lt;/code&amp;gt;.&lt;br /&gt;
This will require us to create two files: &amp;lt;code&amp;gt;CSSRule.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;cssrule.rs&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 4'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating &amp;lt;code&amp;gt;CSSRuleList&amp;lt;/code&amp;gt; interface by creating 2 files: &amp;lt;code&amp;gt;CSSRuleList.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSRulelist.rs&amp;lt;/code&amp;gt;. This interface will have one attribute, which is length and a getter which returns the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; at a particular index. We will also implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 5'''====&lt;br /&gt;
&lt;br /&gt;
We will make &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; type which contains a RefCell and implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===='''Step 6'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating a new interface &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; , by making 2 files: &amp;lt;code&amp;gt;CSSStyleRule.webidl&amp;lt;code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleRule.rs&amp;lt;/code&amp;gt;. The interface will contain two attributes, namely, &amp;lt;code&amp;gt;selectorText&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleDeclaration&amp;lt;/code&amp;gt; style. The &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; will be implemented to return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Design Principles'''==&lt;br /&gt;
In this mozilla project, we are asked to strictly follow the existing design patterns and coding conventions. The main aim of this project is to add and modify interfaces. Interfaces allow developers to follow a clean design principle wherein they do not have to program to classes. It is too easy to add a dependency on a class. In order to avoid that kind of dependency on the implementation i.e. classes, developers can program to interfaces. This type of design pattern is an architectural pattern and makes the code more modular and object oriented. Programming to an interface has a flavor of DRY principle because even if the underlying implementation changes, the handle to the implementation is an interface and that does not change. In this way, our mozilla project becomes more modular and object oriented. Servo has a utility of tests that checks the coding standards followed by Mozilla on this project. We will execute the following utility tests command.&lt;br /&gt;
&amp;lt;code&amp;gt;./mach test-tidy&amp;lt;/code&amp;gt; Any issues encountered by executing this test can be flagged before generating the pull request. This ensures that the developers follow the coding standards.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We have tried to implement the most commonly-used portions of the CSSOM API specification to increase Servo's compatibility with existing webpages &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. We have created two interfaces, StyleSheet and StyleSheetList in our initial steps. As a part of our subsequent steps, we would be adding 4 new interfaces: CSSStyleSheet, CSSRule, CSSRuleList and the CSSStyleRule interface. We have implemented only the obvious methods for these interfaces so that more advanced work can be done to make this CSSOM API fully functional keeping our work as the basis.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101960</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101960"/>
		<updated>2016-04-09T02:42:48Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* UML Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
==='''CSSOM'''===&lt;br /&gt;
CSSOM which is the CSS Object Model defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself&amp;lt;ref&amp;gt;https://drafts.csswg.org/cssom/&amp;lt;/ref&amp;gt;. The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes. CSSOM aims at proving a way to access the CSS style classes and properties. One can even modify the CSS rules using this API. These changes can be targeted to affect individual elements or the whole webpage. &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. CSSOM is actually a collection of all the CSS stylesheets found on a web page which is very similar to Document Object Model (DOM) but only stores collection of CSS instead of HTML. &amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;. CSSOM identifies which elements on your webpage require styling and modifies them. It is also used to optimize the speed at which webpages get loaded.&lt;br /&gt;
It is an integral part of the process that is used to display content on a webpage. The web browser first creates a DOM by examining the HTMLs, then creates a CSSOM by examining the CSS stylesheets. It then creates a render tree by comibining the DOM and the CSSOM and displays the webpage.&amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc. What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python. The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in Rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS).&amp;lt;ref&amp;gt;https://servo.org&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project is to go through the following steps in a somewhat linear order:&lt;br /&gt;
*Compiling servo on a machine and making sure it runs on a specific url. Then emailing the mozilla mailing list to introduce the group.&lt;br /&gt;
*Creating a StyleSheet interface which represents an abstract, base style sheet. This creation requires a couple of steps :&lt;br /&gt;
**Adding a new IDL file (which contains specifications)&lt;br /&gt;
**Creating the Rust file which has implementations of the things specified in IDL.&lt;br /&gt;
**Listing the Rust file in mod.rs file.&lt;br /&gt;
*After that comes the creation of  a StyleSheetList interface. Which represents an ordered collection of CSS style sheets. And basically because it's another interface, again the .webidl and .rs files need to be implemented.&lt;br /&gt;
*Adding the attribute &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;. &lt;br /&gt;
*In the three steps just mentioned some guidelines about implementation must be followed, like the return types of certain methods.&lt;br /&gt;
*Run the tests specified by the mozilla team.&lt;br /&gt;
*Finally updating the interfaces.html, and adding the new interface names.&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*making the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual implementation of &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; and adding a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*creating the CSSRule interface which represents an abstract, base CSS Rule. It is done using the Webidl format.&lt;br /&gt;
*creating the CSSRuleList interface and implementing &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt; which is an array like object containing an ordered collection of CSS rules.&lt;br /&gt;
*implementing the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; to allow mutation of the contents of the vector in the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
*creating the CSSStyleRule interface that extends the CSSRule interface and making &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
==='''UML Diagram'''===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UMLinitial.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated Element. We will then implement the ownerNode attribute in the StyleSheet inteface by making changes in the &amp;lt;code&amp;gt;StyleSheet.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;stylesheet.rs&amp;lt;/code&amp;gt;. We would just declare &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute in the .webidl and give its implementation in .rs file.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will be making a new interface named as &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;. In the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file, we will create a method to return the &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of the Document by giving a particular index as the input.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
&lt;br /&gt;
As the next step, we will be creating the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; interface which has attributes like &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cssText&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;parentRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;parentStyleSheet&amp;lt;/code&amp;gt;. This interface will also have several constants like &amp;lt;code&amp;gt;STYLE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CHARSET_RULE&amp;lt;/code&amp;gt; , &amp;lt;code&amp;gt;IMPORT_RULE, MEDIA_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FONT_FACE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PAGE_RULE, MARGIN_RULE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;NAMESPACE_RULE&amp;lt;/code&amp;gt;.&lt;br /&gt;
This will require us to create two files: &amp;lt;code&amp;gt;CSSRule.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;cssrule.rs&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 4'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating &amp;lt;code&amp;gt;CSSRuleList&amp;lt;/code&amp;gt; interface by creating 2 files: &amp;lt;code&amp;gt;CSSRuleList.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSRulelist.rs&amp;lt;/code&amp;gt;. This interface will have one attribute, which is length and a getter which returns the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; at a particular index. We will also implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 5'''====&lt;br /&gt;
&lt;br /&gt;
We will make &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; type which contains a RefCell and implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===='''Step 6'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating a new interface &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; , by making 2 files: &amp;lt;code&amp;gt;CSSStyleRule.webidl&amp;lt;code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleRule.rs&amp;lt;/code&amp;gt;. The interface will contain two attributes, namely, &amp;lt;code&amp;gt;selectorText&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleDeclaration&amp;lt;/code&amp;gt; style. The &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; will be implemented to return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Design Principles'''==&lt;br /&gt;
In this mozilla project, we are asked to strictly follow the existing design patterns and coding conventions. The main aim of this project is to add and modify interfaces. Interfaces allow developers to follow a clean design principle wherein they do not have to program to classes. It is too easy to add a dependency on a class. In order to avoid that kind of dependency on the implementation i.e. classes, developers can program to interfaces. This type of design pattern is an architectural pattern and makes the code more modular and object oriented. Programming to an interface has a flavor of DRY principle because even if the underlying implementation changes, the handle to the implementation is an interface and that does not change. In this way, our mozilla project becomes more modular and object oriented. Servo has a utility of tests that checks the coding standards followed by Mozilla on this project. We will execute the following utility tests command.&lt;br /&gt;
&amp;lt;code&amp;gt;./mach test-tidy&amp;lt;/code&amp;gt; Any issues encountered by executing this test can be flagged before generating the pull request. This ensures that the developers follow the coding standards.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We have tried to implement the most commonly-used portions of the CSSOM API specification to increase Servo's compatibility with existing webpages &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. We have created two interfaces, StyleSheet and StyleSheetList in our initial steps. As a part of our subsequent steps, we would be adding 4 new interfaces: CSSStyleSheet, CSSRule, CSSRuleList and the CSSStyleRule interface. We have implemented only the obvious methods for these interfaces so that more advanced work can be done to make this CSSOM API fully functional keeping our work as the basis.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101959</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101959"/>
		<updated>2016-04-09T02:42:30Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
==='''CSSOM'''===&lt;br /&gt;
CSSOM which is the CSS Object Model defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself&amp;lt;ref&amp;gt;https://drafts.csswg.org/cssom/&amp;lt;/ref&amp;gt;. The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes. CSSOM aims at proving a way to access the CSS style classes and properties. One can even modify the CSS rules using this API. These changes can be targeted to affect individual elements or the whole webpage. &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. CSSOM is actually a collection of all the CSS stylesheets found on a web page which is very similar to Document Object Model (DOM) but only stores collection of CSS instead of HTML. &amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;. CSSOM identifies which elements on your webpage require styling and modifies them. It is also used to optimize the speed at which webpages get loaded.&lt;br /&gt;
It is an integral part of the process that is used to display content on a webpage. The web browser first creates a DOM by examining the HTMLs, then creates a CSSOM by examining the CSS stylesheets. It then creates a render tree by comibining the DOM and the CSSOM and displays the webpage.&amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc. What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python. The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in Rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS).&amp;lt;ref&amp;gt;https://servo.org&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project is to go through the following steps in a somewhat linear order:&lt;br /&gt;
*Compiling servo on a machine and making sure it runs on a specific url. Then emailing the mozilla mailing list to introduce the group.&lt;br /&gt;
*Creating a StyleSheet interface which represents an abstract, base style sheet. This creation requires a couple of steps :&lt;br /&gt;
**Adding a new IDL file (which contains specifications)&lt;br /&gt;
**Creating the Rust file which has implementations of the things specified in IDL.&lt;br /&gt;
**Listing the Rust file in mod.rs file.&lt;br /&gt;
*After that comes the creation of  a StyleSheetList interface. Which represents an ordered collection of CSS style sheets. And basically because it's another interface, again the .webidl and .rs files need to be implemented.&lt;br /&gt;
*Adding the attribute &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;. &lt;br /&gt;
*In the three steps just mentioned some guidelines about implementation must be followed, like the return types of certain methods.&lt;br /&gt;
*Run the tests specified by the mozilla team.&lt;br /&gt;
*Finally updating the interfaces.html, and adding the new interface names.&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*making the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual implementation of &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; and adding a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*creating the CSSRule interface which represents an abstract, base CSS Rule. It is done using the Webidl format.&lt;br /&gt;
*creating the CSSRuleList interface and implementing &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt; which is an array like object containing an ordered collection of CSS rules.&lt;br /&gt;
*implementing the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; to allow mutation of the contents of the vector in the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
*creating the CSSStyleRule interface that extends the CSSRule interface and making &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
==='''UML Diagram'''===&lt;br /&gt;
&lt;br /&gt;
[[File:UMLinitial.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated Element. We will then implement the ownerNode attribute in the StyleSheet inteface by making changes in the &amp;lt;code&amp;gt;StyleSheet.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;stylesheet.rs&amp;lt;/code&amp;gt;. We would just declare &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute in the .webidl and give its implementation in .rs file.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will be making a new interface named as &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;. In the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file, we will create a method to return the &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of the Document by giving a particular index as the input.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
&lt;br /&gt;
As the next step, we will be creating the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; interface which has attributes like &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cssText&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;parentRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;parentStyleSheet&amp;lt;/code&amp;gt;. This interface will also have several constants like &amp;lt;code&amp;gt;STYLE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CHARSET_RULE&amp;lt;/code&amp;gt; , &amp;lt;code&amp;gt;IMPORT_RULE, MEDIA_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FONT_FACE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PAGE_RULE, MARGIN_RULE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;NAMESPACE_RULE&amp;lt;/code&amp;gt;.&lt;br /&gt;
This will require us to create two files: &amp;lt;code&amp;gt;CSSRule.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;cssrule.rs&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 4'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating &amp;lt;code&amp;gt;CSSRuleList&amp;lt;/code&amp;gt; interface by creating 2 files: &amp;lt;code&amp;gt;CSSRuleList.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSRulelist.rs&amp;lt;/code&amp;gt;. This interface will have one attribute, which is length and a getter which returns the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; at a particular index. We will also implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 5'''====&lt;br /&gt;
&lt;br /&gt;
We will make &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; type which contains a RefCell and implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===='''Step 6'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating a new interface &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; , by making 2 files: &amp;lt;code&amp;gt;CSSStyleRule.webidl&amp;lt;code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleRule.rs&amp;lt;/code&amp;gt;. The interface will contain two attributes, namely, &amp;lt;code&amp;gt;selectorText&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleDeclaration&amp;lt;/code&amp;gt; style. The &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; will be implemented to return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Design Principles'''==&lt;br /&gt;
In this mozilla project, we are asked to strictly follow the existing design patterns and coding conventions. The main aim of this project is to add and modify interfaces. Interfaces allow developers to follow a clean design principle wherein they do not have to program to classes. It is too easy to add a dependency on a class. In order to avoid that kind of dependency on the implementation i.e. classes, developers can program to interfaces. This type of design pattern is an architectural pattern and makes the code more modular and object oriented. Programming to an interface has a flavor of DRY principle because even if the underlying implementation changes, the handle to the implementation is an interface and that does not change. In this way, our mozilla project becomes more modular and object oriented. Servo has a utility of tests that checks the coding standards followed by Mozilla on this project. We will execute the following utility tests command.&lt;br /&gt;
&amp;lt;code&amp;gt;./mach test-tidy&amp;lt;/code&amp;gt; Any issues encountered by executing this test can be flagged before generating the pull request. This ensures that the developers follow the coding standards.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We have tried to implement the most commonly-used portions of the CSSOM API specification to increase Servo's compatibility with existing webpages &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. We have created two interfaces, StyleSheet and StyleSheetList in our initial steps. As a part of our subsequent steps, we would be adding 4 new interfaces: CSSStyleSheet, CSSRule, CSSRuleList and the CSSStyleRule interface. We have implemented only the obvious methods for these interfaces so that more advanced work can be done to make this CSSOM API fully functional keeping our work as the basis.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:UMLinitial.png&amp;diff=101958</id>
		<title>File:UMLinitial.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:UMLinitial.png&amp;diff=101958"/>
		<updated>2016-04-09T02:40:40Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101957</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101957"/>
		<updated>2016-04-09T02:39:53Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
==='''CSSOM'''===&lt;br /&gt;
CSSOM which is the CSS Object Model defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself&amp;lt;ref&amp;gt;https://drafts.csswg.org/cssom/&amp;lt;/ref&amp;gt;. The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes. CSSOM aims at proving a way to access the CSS style classes and properties. One can even modify the CSS rules using this API. These changes can be targeted to affect individual elements or the whole webpage. &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. CSSOM is actually a collection of all the CSS stylesheets found on a web page which is very similar to Document Object Model (DOM) but only stores collection of CSS instead of HTML. &amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;. CSSOM identifies which elements on your webpage require styling and modifies them. It is also used to optimize the speed at which webpages get loaded.&lt;br /&gt;
It is an integral part of the process that is used to display content on a webpage. The web browser first creates a DOM by examining the HTMLs, then creates a CSSOM by examining the CSS stylesheets. It then creates a render tree by comibining the DOM and the CSSOM and displays the webpage.&amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc. What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python. The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in Rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS).&amp;lt;ref&amp;gt;https://servo.org&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project is to go through the following steps in a somewhat linear order:&lt;br /&gt;
*Compiling servo on a machine and making sure it runs on a specific url. Then emailing the mozilla mailing list to introduce the group.&lt;br /&gt;
*Creating a StyleSheet interface which represents an abstract, base style sheet. This creation requires a couple of steps :&lt;br /&gt;
**Adding a new IDL file (which contains specifications)&lt;br /&gt;
**Creating the Rust file which has implementations of the things specified in IDL.&lt;br /&gt;
**Listing the Rust file in mod.rs file.&lt;br /&gt;
*After that comes the creation of  a StyleSheetList interface. Which represents an ordered collection of CSS style sheets. And basically because it's another interface, again the .webidl and .rs files need to be implemented.&lt;br /&gt;
*Adding the attribute &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;. &lt;br /&gt;
*In the three steps just mentioned some guidelines about implementation must be followed, like the return types of certain methods.&lt;br /&gt;
*Run the tests specified by the mozilla team.&lt;br /&gt;
*Finally updating the interfaces.html, and adding the new interface names.&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*making the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual implementation of &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; and adding a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*creating the CSSRule interface which represents an abstract, base CSS Rule. It is done using the Webidl format.&lt;br /&gt;
*creating the CSSRuleList interface and implementing &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt; which is an array like object containing an ordered collection of CSS rules.&lt;br /&gt;
*implementing the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; to allow mutation of the contents of the vector in the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
*creating the CSSStyleRule interface that extends the CSSRule interface and making &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
==='''UML Diagram'''===&lt;br /&gt;
&lt;br /&gt;
[[File:UMLinitial.jpg]]&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated Element. We will then implement the ownerNode attribute in the StyleSheet inteface by making changes in the &amp;lt;code&amp;gt;StyleSheet.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;stylesheet.rs&amp;lt;/code&amp;gt;. We would just declare &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute in the .webidl and give its implementation in .rs file.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will be making a new interface named as &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;. In the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file, we will create a method to return the &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of the Document by giving a particular index as the input.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
&lt;br /&gt;
As the next step, we will be creating the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; interface which has attributes like &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cssText&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;parentRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;parentStyleSheet&amp;lt;/code&amp;gt;. This interface will also have several constants like &amp;lt;code&amp;gt;STYLE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CHARSET_RULE&amp;lt;/code&amp;gt; , &amp;lt;code&amp;gt;IMPORT_RULE, MEDIA_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FONT_FACE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PAGE_RULE, MARGIN_RULE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;NAMESPACE_RULE&amp;lt;/code&amp;gt;.&lt;br /&gt;
This will require us to create two files: &amp;lt;code&amp;gt;CSSRule.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;cssrule.rs&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 4'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating &amp;lt;code&amp;gt;CSSRuleList&amp;lt;/code&amp;gt; interface by creating 2 files: &amp;lt;code&amp;gt;CSSRuleList.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSRulelist.rs&amp;lt;/code&amp;gt;. This interface will have one attribute, which is length and a getter which returns the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; at a particular index. We will also implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 5'''====&lt;br /&gt;
&lt;br /&gt;
We will make &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; type which contains a RefCell and implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===='''Step 6'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating a new interface &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; , by making 2 files: &amp;lt;code&amp;gt;CSSStyleRule.webidl&amp;lt;code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleRule.rs&amp;lt;/code&amp;gt;. The interface will contain two attributes, namely, &amp;lt;code&amp;gt;selectorText&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleDeclaration&amp;lt;/code&amp;gt; style. The &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; will be implemented to return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Design Principles'''==&lt;br /&gt;
In this mozilla project, we are asked to strictly follow the existing design patterns and coding conventions. The main aim of this project is to add and modify interfaces. Interfaces allow developers to follow a clean design principle wherein they do not have to program to classes. It is too easy to add a dependency on a class. In order to avoid that kind of dependency on the implementation i.e. classes, developers can program to interfaces. This type of design pattern is an architectural pattern and makes the code more modular and object oriented. Programming to an interface has a flavor of DRY principle because even if the underlying implementation changes, the handle to the implementation is an interface and that does not change. In this way, our mozilla project becomes more modular and object oriented. Servo has a utility of tests that checks the coding standards followed by Mozilla on this project. We will execute the following utility tests command.&lt;br /&gt;
&amp;lt;code&amp;gt;./mach test-tidy&amp;lt;/code&amp;gt; Any issues encountered by executing this test can be flagged before generating the pull request. This ensures that the developers follow the coding standards.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We have tried to implement the most commonly-used portions of the CSSOM API specification to increase Servo's compatibility with existing webpages &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. We have created two interfaces, StyleSheet and StyleSheetList in our initial steps. As a part of our subsequent steps, we would be adding 4 new interfaces: CSSStyleSheet, CSSRule, CSSRuleList and the CSSStyleRule interface. We have implemented only the obvious methods for these interfaces so that more advanced work can be done to make this CSSOM API fully functional keeping our work as the basis.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1603_Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101956</id>
		<title>CSC/ECE 517 Spring 2016 M1603 Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1603_Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101956"/>
		<updated>2016-04-09T02:37:39Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: Created page with &amp;quot;=='''Introduction'''==  Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a do...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
==='''CSSOM'''===&lt;br /&gt;
CSSOM which is the CSS Object Model defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself&amp;lt;ref&amp;gt;https://drafts.csswg.org/cssom/&amp;lt;/ref&amp;gt;. The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes. CSSOM aims at proving a way to access the CSS style classes and properties. One can even modify the CSS rules using this API. These changes can be targeted to affect individual elements or the whole webpage. &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. CSSOM is actually a collection of all the CSS stylesheets found on a web page which is very similar to Document Object Model (DOM) but only stores collection of CSS instead of HTML. &amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;. CSSOM identifies which elements on your webpage require styling and modifies them. It is also used to optimize the speed at which webpages get loaded.&lt;br /&gt;
It is an integral part of the process that is used to display content on a webpage. The web browser first creates a DOM by examining the HTMLs, then creates a CSSOM by examining the CSS stylesheets. It then creates a render tree by comibining the DOM and the CSSOM and displays the webpage.&amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc. What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python. The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in Rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS).&amp;lt;ref&amp;gt;https://servo.org&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project is to go through the following steps in a somewhat linear order:&lt;br /&gt;
*Compiling servo on a machine and making sure it runs on a specific url. Then emailing the mozilla mailing list to introduce the group.&lt;br /&gt;
*Creating a StyleSheet interface which represents an abstract, base style sheet. This creation requires a couple of steps :&lt;br /&gt;
**Adding a new IDL file (which contains specifications)&lt;br /&gt;
**Creating the Rust file which has implementations of the things specified in IDL.&lt;br /&gt;
**Listing the Rust file in mod.rs file.&lt;br /&gt;
*After that comes the creation of  a StyleSheetList interface. Which represents an ordered collection of CSS style sheets. And basically because it's another interface, again the .webidl and .rs files need to be implemented.&lt;br /&gt;
*Adding the attribute &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;. &lt;br /&gt;
*In the three steps just mentioned some guidelines about implementation must be followed, like the return types of certain methods.&lt;br /&gt;
*Run the tests specified by the mozilla team.&lt;br /&gt;
*Finally updating the interfaces.html, and adding the new interface names.&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*making the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual implementation of &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; and adding a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*creating the CSSRule interface which represents an abstract, base CSS Rule. It is done using the Webidl format.&lt;br /&gt;
*creating the CSSRuleList interface and implementing &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt; which is an array like object containing an ordered collection of CSS rules.&lt;br /&gt;
*implementing the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; to allow mutation of the contents of the vector in the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
*creating the CSSStyleRule interface that extends the CSSRule interface and making &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated Element. We will then implement the ownerNode attribute in the StyleSheet inteface by making changes in the &amp;lt;code&amp;gt;StyleSheet.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;stylesheet.rs&amp;lt;/code&amp;gt;. We would just declare &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute in the .webidl and give its implementation in .rs file.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will be making a new interface named as &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;. In the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file, we will create a method to return the &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of the Document by giving a particular index as the input.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
&lt;br /&gt;
As the next step, we will be creating the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; interface which has attributes like &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cssText&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;parentRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;parentStyleSheet&amp;lt;/code&amp;gt;. This interface will also have several constants like &amp;lt;code&amp;gt;STYLE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CHARSET_RULE&amp;lt;/code&amp;gt; , &amp;lt;code&amp;gt;IMPORT_RULE, MEDIA_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FONT_FACE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PAGE_RULE, MARGIN_RULE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;NAMESPACE_RULE&amp;lt;/code&amp;gt;.&lt;br /&gt;
This will require us to create two files: &amp;lt;code&amp;gt;CSSRule.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;cssrule.rs&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 4'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating &amp;lt;code&amp;gt;CSSRuleList&amp;lt;/code&amp;gt; interface by creating 2 files: &amp;lt;code&amp;gt;CSSRuleList.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSRulelist.rs&amp;lt;/code&amp;gt;. This interface will have one attribute, which is length and a getter which returns the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; at a particular index. We will also implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 5'''====&lt;br /&gt;
&lt;br /&gt;
We will make &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; type which contains a RefCell and implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===='''Step 6'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating a new interface &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; , by making 2 files: &amp;lt;code&amp;gt;CSSStyleRule.webidl&amp;lt;code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleRule.rs&amp;lt;/code&amp;gt;. The interface will contain two attributes, namely, &amp;lt;code&amp;gt;selectorText&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleDeclaration&amp;lt;/code&amp;gt; style. The &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; will be implemented to return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Design Principles'''==&lt;br /&gt;
In this mozilla project, we are asked to strictly follow the existing design patterns and coding conventions. The main aim of this project is to add and modify interfaces. Interfaces allow developers to follow a clean design principle wherein they do not have to program to classes. It is too easy to add a dependency on a class. In order to avoid that kind of dependency on the implementation i.e. classes, developers can program to interfaces. This type of design pattern is an architectural pattern and makes the code more modular and object oriented. Programming to an interface has a flavor of DRY principle because even if the underlying implementation changes, the handle to the implementation is an interface and that does not change. In this way, our mozilla project becomes more modular and object oriented. Servo has a utility of tests that checks the coding standards followed by Mozilla on this project. We will execute the following utility tests command.&lt;br /&gt;
&amp;lt;code&amp;gt;./mach test-tidy&amp;lt;/code&amp;gt; Any issues encountered by executing this test can be flagged before generating the pull request. This ensures that the developers follow the coding standards.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We have tried to implement the most commonly-used portions of the CSSOM API specification to increase Servo's compatibility with existing webpages &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. We have created two interfaces, StyleSheet and StyleSheetList in our initial steps. As a part of our subsequent steps, we would be adding 4 new interfaces: CSSStyleSheet, CSSRule, CSSRuleList and the CSSStyleRule interface. We have implemented only the obvious methods for these interfaces so that more advanced work can be done to make this CSSOM API fully functional keeping our work as the basis.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016&amp;diff=101955</id>
		<title>CSC/ECE 517 Spring 2016</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016&amp;diff=101955"/>
		<updated>2016-04-09T02:37:17Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Final Project Design Document */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Writing Assignment 1==&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Active Job]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Calibration Assignment Submissions==&lt;br /&gt;
*[[Calibration Assignment Submission (OmniAuth)]]&lt;br /&gt;
*[[Calibration Assignment Submission (Patch_verb)]]&lt;br /&gt;
&lt;br /&gt;
==Writing Assignment 2==&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Mozilla Implement HTML5 form validation]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE_517_Spring_2016/Mozilla Conforming Image Loading to HTML 5 Specs]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Functional Tests for Questionnaire Controller]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Refactor different question types from quiz feature]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Implement private browsing]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Write automated tests for WebDriver]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Refactor sign_up_sheet_controller.rb and sign_up_topic.rb]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Functional tests for assignment creation function]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/E1604. Functional tests for Calibration function]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Refactor and write unit tests for question type.rb]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Refactor response controller]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE_517_Spring_2016_OSS_M1606]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE_517_Spring_2016/OSS_E1601]]&lt;br /&gt;
&lt;br /&gt;
==Final Project Design Document==&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016 M1601 Implement HTML5 form validation]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016 M1602 Make image loads conform with the spec]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016 E1624 Compose functional tests for Suggest topics of student functionality ]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016 E1631 Team-based reviewing]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016 E1628 Visualization]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016 E1625 Show confidence ratings for grade based on reputations of reviewers]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016 E1629 Performance improvement for Course &amp;amp; Assignment Listing]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016 M1603 Implement Common Parts of the CSSOM API]]&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101949</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101949"/>
		<updated>2016-04-08T22:33:35Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Subsequent Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
==='''CSSOM'''===&lt;br /&gt;
CSSOM which is the CSS Object Model defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself&amp;lt;ref&amp;gt;https://drafts.csswg.org/cssom/&amp;lt;/ref&amp;gt;. The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes. CSSOM aims at proving a way to access the CSS style classes and properties. One can even modify the CSS rules using this API. These changes can be targeted to affect individual elements or the whole webpage. &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. CSSOM is actually a collection of all the CSS stylesheets found on a web page which is very similar to Document Object Model (DOM) but only stores collection of CSS instead of HTML. &amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;. CSSOM identifies which elements on your webpage require styling and modifies them. It is also used to optimize the speed at which webpages get loaded.&lt;br /&gt;
It is an integral part of the process that is used to display content on a webpage. The web browser first creates a DOM by examining the HTMLs, then creates a CSSOM by examining the CSS stylesheets. It then creates a render tree by comibining the DOM and the CSSOM and displays the webpage.&amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc. What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python. The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in Rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS).&amp;lt;ref&amp;gt;https://servo.org&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project is to go through the following steps in a somewhat linear order:&lt;br /&gt;
*Compiling servo on a machine and making sure it runs on a specific url. Then emailing the mozilla mailing list to introduce the group.&lt;br /&gt;
*Creating a StyleSheet interface which represents an abstract, base style sheet. This creation requires a couple of steps :&lt;br /&gt;
**Adding a new IDL file (which contains specifications)&lt;br /&gt;
**Creating the Rust file which has implementations of the things specified in IDL.&lt;br /&gt;
**Listing the Rust file in mod.rs file.&lt;br /&gt;
*After that comes the creation of  a StyleSheetList interface. Which represents an ordered collection of CSS style sheets. And basically because it's another interface, again the .webidl and .rs files need to be implemented.&lt;br /&gt;
*Adding the attribute &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;. &lt;br /&gt;
*In the three steps just mentioned some guidelines about implementation must be followed, like the return types of certain methods.&lt;br /&gt;
*Run the tests specified by the mozilla team.&lt;br /&gt;
*Finally updating the interfaces.html, and adding the new interface names.&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*making the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual implementation of &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; and adding a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*creating the CSSRule interface which represents an abstract, base CSS Rule. It is done using the Webidl format.&lt;br /&gt;
*creating the CSSRuleList interface and implementing &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt; which is an array like object containing an ordered collection of CSS rules.&lt;br /&gt;
*implementing the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; to allow mutation of the contents of the vector in the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
*creating the CSSStyleRule interface that extends the CSSRule interface and making &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated Element. We will then implement the ownerNode attribute in the StyleSheet inteface by making changes in the &amp;lt;code&amp;gt;StyleSheet.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;stylesheet.rs&amp;lt;/code&amp;gt;. We would just declare &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute in the .webidl and give its implementation in .rs file.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will be making a new interface named as &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;. In the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file, we will create a method to return the &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of the Document by giving a particular index as the input.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
&lt;br /&gt;
As the next step, we will be creating the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; interface which has attributes like &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cssText&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;parentRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;parentStyleSheet&amp;lt;/code&amp;gt;. This interface will also have several constants like &amp;lt;code&amp;gt;STYLE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CHARSET_RULE&amp;lt;/code&amp;gt; , &amp;lt;code&amp;gt;IMPORT_RULE, MEDIA_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FONT_FACE_RULE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PAGE_RULE, MARGIN_RULE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;NAMESPACE_RULE&amp;lt;/code&amp;gt;.&lt;br /&gt;
This will require us to create two files: &amp;lt;code&amp;gt;CSSRule.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;cssrule.rs&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 4'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating &amp;lt;code&amp;gt;CSSRuleList&amp;lt;/code&amp;gt; interface by creating 2 files: &amp;lt;code&amp;gt;CSSRuleList.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSRulelist.rs&amp;lt;/code&amp;gt;. This interface will have one attribute, which is length and a getter which returns the &amp;lt;code&amp;gt;CSSRule&amp;lt;/code&amp;gt; at a particular index. We will also implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Step 5'''====&lt;br /&gt;
&lt;br /&gt;
We will make &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; type which contains a RefCell and implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===='''Step 6'''====&lt;br /&gt;
&lt;br /&gt;
We will be creating a new interface &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; , by making 2 files: &amp;lt;code&amp;gt;CSSStyleRule.webidl&amp;lt;code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleRule.rs&amp;lt;/code&amp;gt;. The interface will contain two attributes, namely, &amp;lt;code&amp;gt;selectorText&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CSSStyleDeclaration&amp;lt;/code&amp;gt; style. The &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; will be implemented to return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Design Principles'''==&lt;br /&gt;
In this mozilla project, we are asked to strictly follow the existing design patterns and coding conventions. The main aim of this project is to add and modify interfaces. Interfaces allow developers to follow a clean design principle wherein they do not have to program to classes. It is too easy to add a dependency on a class. In order to avoid that kind of dependency on the implementation i.e. classes, developers can program to interfaces. This type of design pattern is an architectural pattern and makes the code more modular and object oriented. Programming to an interface has a flavor of DRY principle because even if the underlying implementation changes, the handle to the implementation is an interface and that does not change. In this way, our mozilla project becomes more modular and object oriented. Servo has a utility of tests that checks the coding standards followed by Mozilla on this project. We will execute the following utility tests command.&lt;br /&gt;
&amp;lt;code&amp;gt;./mach test-tidy&amp;lt;/code&amp;gt; Any issues encountered by executing this test can be flagged before generating the pull request. This ensures that the developers follow the coding standards.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We have tried to implement the most commonly-used portions of the CSSOM API specification to increase Servo's compatibility with existing webpages &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. We have created two interfaces, StyleSheet and StyleSheetList in our initial steps. As a part of our subsequent steps, we would be adding 4 new interfaces: CSSStyleSheet, CSSRule, CSSRuleList and the CSSStyleRule interface. We have implemented only the obvious methods for these interfaces so that more advanced work can be done to make this CSSOM API fully functional keeping our work as the basis.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101945</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101945"/>
		<updated>2016-04-08T21:14:16Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
==='''CSSOM'''===&lt;br /&gt;
CSSOM which is the CSS Object Model defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself&amp;lt;ref&amp;gt;https://drafts.csswg.org/cssom/&amp;lt;/ref&amp;gt;. The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes. CSSOM aims at proving a way to access the CSS style classes and properties. One can even modify the CSS rules using this API. These changes can be targeted to affect individual elements or the whole webpage. &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. CSSOM is actually a collection of all the CSS stylesheets found on a web page which is very similar to Document Object Model (DOM) but only stores collection of CSS instead of HTML. &amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;. CSSOM identifies which elements on your webpage require styling and modifies them. It is also used to optimize the speed at which webpages get loaded.&lt;br /&gt;
It is an integral part of the process that is used to display content on a webpage. The web browser first creates a DOM by examining the HTMLs, then creates a CSSOM by examining the CSS stylesheets. It then creates a render tree by comibining the DOM and the CSSOM and displays the webpage.&amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc. What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python. The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in Rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS).&amp;lt;ref&amp;gt;https://servo.org&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project is to go through the following steps in a somewhat linear order:&lt;br /&gt;
*Compiling servo on a machine and making sure it runs on a specific url. Then emailing the mozilla mailing list to introduce the group.&lt;br /&gt;
*Creating a StyleSheet interface which represents an abstract, base style sheet. This creation requires a couple of steps :&lt;br /&gt;
**Adding a new IDL file (which contains specifications)&lt;br /&gt;
**Creating the Rust file which has implementations of the things specified in IDL.&lt;br /&gt;
**Listing the Rust file in mod.rs file.&lt;br /&gt;
*After that comes the creation of  a StyleSheetList interface. Which represents an ordered collection of CSS style sheets. And basically because it's another interface, again the .webidl and .rs files need to be implemented.&lt;br /&gt;
*Adding the attribute &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;. &lt;br /&gt;
*In the three steps just mentioned some guidelines about implementation must be followed, like the return types of certain methods.&lt;br /&gt;
*Run the tests specified by the mozilla team.&lt;br /&gt;
*Finally updating the interfaces.html, and adding the new interface names.&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;. Add a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*create the CSSRule interface.&lt;br /&gt;
*create the CSSRuleList interface and implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;.&lt;br /&gt;
*implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; by making the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; type contain a RefCell, and using this to mutate the contents of the vector.&lt;br /&gt;
*create the CSSStyleRule interface and make &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt;. We're also going to implement the following:&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will also implement the &amp;lt;code&amp;gt;.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.rs&amp;lt;/code&amp;gt; files for the following:&lt;br /&gt;
&lt;br /&gt;
*CSSStyleSheet interface&lt;br /&gt;
*CSSRule interface&lt;br /&gt;
*CSSRuleList interface&lt;br /&gt;
*CSSStyleRule interface&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We have tried to implement the most commonly-used portions of the CSSOM API specification to increase Servo's compatibility with existing webpages &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. We have created two interfaces, StyleSheet and StyleSheetList in our initial steps. As a part of our subsequent steps, we would be adding 4 new interfaces: CSSStyleSheet, CSSRule, CSSRuleList and the CSSStyleRule interface. We have implemented only the obvious methods for these interfaces so that more advanced work can be done to make this CSSOM API fully functional keeping our work as the basis.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101944</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101944"/>
		<updated>2016-04-08T21:02:17Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* CSSOM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
==='''CSSOM'''===&lt;br /&gt;
CSSOM which is the CSS Object Model defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself&amp;lt;ref&amp;gt;https://drafts.csswg.org/cssom/&amp;lt;/ref&amp;gt;. The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes. CSSOM aims at proving a way to access the CSS style classes and properties. One can even modify the CSS rules using this API. These changes can be targeted to affect individual elements or the whole webpage. &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/CSSOM-student-project&amp;lt;/ref&amp;gt;. CSSOM is actually a collection of all the CSS stylesheets found on a web page which is very similar to Document Object Model (DOM) but only stores collection of CSS instead of HTML. &amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;. CSSOM identifies which elements on your webpage require styling and modifies them. It is also used to optimize the speed at which webpages get loaded.&lt;br /&gt;
It is an integral part of the process that is used to display content on a webpage. The web browser first creates a DOM by examining the HTMLs, then creates a CSSOM by examining the CSS stylesheets. It then creates a render tree by comibining the DOM and the CSSOM and displays the webpage.&amp;lt;ref&amp;gt;https://varvy.com/performance/cssom.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc. What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python. The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in Rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS).&amp;lt;ref&amp;gt;https://servo.org&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project is to go through the following steps in a somewhat linear order:&lt;br /&gt;
*Compiling servo on a machine and making sure it runs on a specific url. Then emailing the mozilla mailing list to introduce the group.&lt;br /&gt;
*Creating a StyleSheet interface which represents an abstract, base style sheet. This creation requires a couple of steps :&lt;br /&gt;
**Adding a new IDL file (which contains specifications)&lt;br /&gt;
**Creating the Rust file which has implementations of the things specified in IDL.&lt;br /&gt;
**Listing the Rust file in mod.rs file.&lt;br /&gt;
*After that comes the creation of  a StyleSheetList interface. Which represents an ordered collection of CSS style sheets. And basically because it's another interface, again the .webidl and .rs files need to be implemented.&lt;br /&gt;
*Adding the attribute &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;. &lt;br /&gt;
*In the three steps just mentioned some guidelines about implementation must be followed, like the return types of certain methods.&lt;br /&gt;
*Run the tests specified by the mozilla team.&lt;br /&gt;
*Finally updating the interfaces.html, and adding the new interface names.&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;. Add a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*create the CSSRule interface.&lt;br /&gt;
*create the CSSRuleList interface and implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;.&lt;br /&gt;
*implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; by making the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; type contain a RefCell, and using this to mutate the contents of the vector.&lt;br /&gt;
*create the CSSStyleRule interface and make &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt;. We're also going to implement the following:&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will also implement the &amp;lt;code&amp;gt;.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.rs&amp;lt;/code&amp;gt; files for the following:&lt;br /&gt;
&lt;br /&gt;
*CSSStyleSheet interface&lt;br /&gt;
*CSSRule interface&lt;br /&gt;
*CSSRuleList interface&lt;br /&gt;
*CSSStyleRule interface&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101943</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101943"/>
		<updated>2016-04-08T21:00:07Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Project Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
==='''CSSOM'''===&lt;br /&gt;
CSSOM (CSS object model) defines [https://en.wikipedia.org/wiki/Application_programming_interface APIs] (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc. What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python. The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in Rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS).&amp;lt;ref&amp;gt;https://servo.org&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project is to go through the following steps in a somewhat linear order:&lt;br /&gt;
*Compiling servo on a machine and making sure it runs on a specific url. Then emailing the mozilla mailing list to introduce the group.&lt;br /&gt;
*Creating a StyleSheet interface which represents an abstract, base style sheet. This creation requires a couple of steps :&lt;br /&gt;
**Adding a new IDL file (which contains specifications)&lt;br /&gt;
**Creating the Rust file which has implementations of the things specified in IDL.&lt;br /&gt;
**Listing the Rust file in mod.rs file.&lt;br /&gt;
*After that comes the creation of  a StyleSheetList interface. Which represents an ordered collection of CSS style sheets. And basically because it's another interface, again the .webidl and .rs files need to be implemented.&lt;br /&gt;
*Adding the attribute &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;. &lt;br /&gt;
*In the three steps just mentioned some guidelines about implementation must be followed, like the return types of certain methods.&lt;br /&gt;
*Run the tests specified by the mozilla team.&lt;br /&gt;
*Finally updating the interfaces.html, and adding the new interface names.&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;. Add a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*create the CSSRule interface.&lt;br /&gt;
*create the CSSRuleList interface and implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;.&lt;br /&gt;
*implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; by making the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; type contain a RefCell, and using this to mutate the contents of the vector.&lt;br /&gt;
*create the CSSStyleRule interface and make &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt;. We're also going to implement the following:&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will also implement the &amp;lt;code&amp;gt;.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.rs&amp;lt;/code&amp;gt; files for the following:&lt;br /&gt;
&lt;br /&gt;
*CSSStyleSheet interface&lt;br /&gt;
*CSSRule interface&lt;br /&gt;
*CSSRuleList interface&lt;br /&gt;
*CSSStyleRule interface&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101942</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101942"/>
		<updated>2016-04-08T20:50:08Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
==='''CSSOM'''===&lt;br /&gt;
CSSOM (CSS object model) defines [https://en.wikipedia.org/wiki/Application_programming_interface APIs] (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc. What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python. The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in Rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS).&amp;lt;ref&amp;gt;https://servo.org&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project is to go through the following steps in a somewhat linear order:&lt;br /&gt;
*Compiling servo on our machines and making sure it runs on a specific url. After that we email the mozilla mailing list and introduce our group.&lt;br /&gt;
*We then create a StyleSheet interface which represents an abstract, base style sheet. This creation requires a couple of steps :&lt;br /&gt;
**Adding a new IDL file (which contains specifications)&lt;br /&gt;
**Creating the Rust file which has implementations of the things specified in IDL.&lt;br /&gt;
**Listing the Rust file in mod.rs file.&lt;br /&gt;
*After that we have to create a StyleSheetList interface. Which represents an ordered collection of CSS style sheets. And basically because it's another interface, we again need to create the .webidl and .rs files.&lt;br /&gt;
*We also add the attribute &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;. &lt;br /&gt;
*In the three steps we just mentioned we have to follow some guidelines about implementation, like the return types of certain methods.&lt;br /&gt;
*We need to run the tests specified by the mozilla team.&lt;br /&gt;
*Finally we need to update the interfaces.html, and add the new interface names.&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;. Add a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*create the CSSRule interface.&lt;br /&gt;
*create the CSSRuleList interface and implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;.&lt;br /&gt;
*implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; by making the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; type contain a RefCell, and using this to mutate the contents of the vector.&lt;br /&gt;
*create the CSSStyleRule interface and make &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt;. We're also going to implement the following:&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will also implement the &amp;lt;code&amp;gt;.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.rs&amp;lt;/code&amp;gt; files for the following:&lt;br /&gt;
&lt;br /&gt;
*CSSStyleSheet interface&lt;br /&gt;
*CSSRule interface&lt;br /&gt;
*CSSRuleList interface&lt;br /&gt;
*CSSStyleRule interface&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101941</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101941"/>
		<updated>2016-04-08T20:48:02Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Project Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines [https://en.wikipedia.org/wiki/Application_programming_interface APIs] (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc. What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python. The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in Rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS).&amp;lt;ref&amp;gt;https://servo.org&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project is to go through the following steps in a somewhat linear order:&lt;br /&gt;
*Compiling servo on our machines and making sure it runs on a specific url. After that we email the mozilla mailing list and introduce our group.&lt;br /&gt;
*We then create a StyleSheet interface which represents an abstract, base style sheet. This creation requires a couple of steps :&lt;br /&gt;
**Adding a new IDL file (which contains specifications)&lt;br /&gt;
**Creating the Rust file which has implementations of the things specified in IDL.&lt;br /&gt;
**Listing the Rust file in mod.rs file.&lt;br /&gt;
*After that we have to create a StyleSheetList interface. Which represents an ordered collection of CSS style sheets. And basically because it's another interface, we again need to create the .webidl and .rs files.&lt;br /&gt;
*We also add the attribute &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;. &lt;br /&gt;
*In the three steps we just mentioned we have to follow some guidelines about implementation, like the return types of certain methods.&lt;br /&gt;
*We need to run the tests specified by the mozilla team.&lt;br /&gt;
*Finally we need to update the interfaces.html, and add the new interface names.&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;. Add a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*create the CSSRule interface.&lt;br /&gt;
*create the CSSRuleList interface and implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;.&lt;br /&gt;
*implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; by making the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; type contain a RefCell, and using this to mutate the contents of the vector.&lt;br /&gt;
*create the CSSStyleRule interface and make &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt;. We're also going to implement the following:&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will also implement the &amp;lt;code&amp;gt;.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.rs&amp;lt;/code&amp;gt; files for the following:&lt;br /&gt;
&lt;br /&gt;
*CSSStyleSheet interface&lt;br /&gt;
*CSSRule interface&lt;br /&gt;
*CSSRuleList interface&lt;br /&gt;
*CSSStyleRule interface&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101936</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101936"/>
		<updated>2016-04-08T20:38:34Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Rust */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines [https://en.wikipedia.org/wiki/Application_programming_interface APIs] (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc. What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python. The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety. &amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in Rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS).&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;. Add a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*create the CSSRule interface.&lt;br /&gt;
*create the CSSRuleList interface and implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;.&lt;br /&gt;
*implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; by making the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; type contain a RefCell, and using this to mutate the contents of the vector.&lt;br /&gt;
*create the CSSStyleRule interface and make &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Document.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt;. We're also going to implement the following:&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will also implement the &amp;lt;code&amp;gt;.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.rs&amp;lt;/code&amp;gt; files for the following:&lt;br /&gt;
&lt;br /&gt;
*CSSStyleSheet interface&lt;br /&gt;
*CSSRule interface&lt;br /&gt;
*CSSRuleList interface&lt;br /&gt;
*CSSStyleRule interface&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html.&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101930</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101930"/>
		<updated>2016-04-08T20:15:49Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines [https://en.wikipedia.org/wiki/Application_programming_interface APIs] (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS). &lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc.&lt;br /&gt;
What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python.&lt;br /&gt;
The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;. Add a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*create the CSSRule interface.&lt;br /&gt;
*create the CSSRuleList interface and implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;.&lt;br /&gt;
*implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; by making the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; type contain a RefCell, and using this to mutate the contents of the vector.&lt;br /&gt;
*create the CSSStyleRule interface and make &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Documet.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt;. We're also going to implement the following:&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will also implement the &amp;lt;code&amp;gt;.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.rs&amp;lt;/code&amp;gt; files for the following:&lt;br /&gt;
&lt;br /&gt;
*CSSStyleSheet interface&lt;br /&gt;
*CSSRule interface&lt;br /&gt;
*CSSRuleList interface&lt;br /&gt;
*CSSStyleRule interface&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html.&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101845</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101845"/>
		<updated>2016-04-04T23:22:22Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Subsequent Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines [https://en.wikipedia.org/wiki/Application_programming_interface APIs] (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS). &lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc.&lt;br /&gt;
What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python.&lt;br /&gt;
The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;. Add a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*create the CSSRule interface.&lt;br /&gt;
*create the CSSRuleList interface and implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;.&lt;br /&gt;
*implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; by making the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; type contain a RefCell, and using this to mutate the contents of the vector.&lt;br /&gt;
*create the CSSStyleRule interface and make &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
[[File:part of stylesheet.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:stylesheet webidl.png]]&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
[[File:part of stylesheetlist.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:stylesheetlist webidl.png]]&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
[[File:doc rs.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:doc webidl.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Documet.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt;. We're also going to implement the following:&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
&lt;br /&gt;
We will also implement the &amp;lt;code&amp;gt;.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.rs&amp;lt;/code&amp;gt; files for the following:&lt;br /&gt;
&lt;br /&gt;
*CSSStyleSheet interface&lt;br /&gt;
*CSSRule interface&lt;br /&gt;
*CSSRuleList interface&lt;br /&gt;
*CSSStyleRule interface&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html.&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101844</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101844"/>
		<updated>2016-04-04T23:21:45Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Subsequent Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines [https://en.wikipedia.org/wiki/Application_programming_interface APIs] (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS). &lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc.&lt;br /&gt;
What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python.&lt;br /&gt;
The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;. Add a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*create the CSSRule interface.&lt;br /&gt;
*create the CSSRuleList interface and implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;.&lt;br /&gt;
*implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; by making the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; type contain a RefCell, and using this to mutate the contents of the vector.&lt;br /&gt;
*create the CSSStyleRule interface and make &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
[[File:part of stylesheet.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:stylesheet webidl.png]]&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
[[File:part of stylesheetlist.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:stylesheetlist webidl.png]]&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
[[File:doc rs.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:doc webidl.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
===='''Step One'''====&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Documet.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt;. We're also going to implement the following:&lt;br /&gt;
&lt;br /&gt;
===='''Step Two'''====&lt;br /&gt;
&lt;br /&gt;
We will also implement the &amp;lt;code&amp;gt;.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.rs&amp;lt;/code&amp;gt; files for the following:&lt;br /&gt;
&lt;br /&gt;
*CSSStyleSheet interface&lt;br /&gt;
*CSSRule interface&lt;br /&gt;
*CSSRuleList interface&lt;br /&gt;
*CSSStyleRule interface&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html.&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101843</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101843"/>
		<updated>2016-04-04T23:20:12Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Subsequent Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines [https://en.wikipedia.org/wiki/Application_programming_interface APIs] (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS). &lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc.&lt;br /&gt;
What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python.&lt;br /&gt;
The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;. Add a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*create the CSSRule interface.&lt;br /&gt;
*create the CSSRuleList interface and implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;.&lt;br /&gt;
*implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; by making the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; type contain a RefCell, and using this to mutate the contents of the vector.&lt;br /&gt;
*create the CSSStyleRule interface and make &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
[[File:part of stylesheet.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:stylesheet webidl.png]]&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
[[File:part of stylesheetlist.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:stylesheetlist webidl.png]]&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
[[File:doc rs.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:doc webidl.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Documet.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt;. We're also going to implement the following:&lt;br /&gt;
&lt;br /&gt;
We will implement the &amp;lt;code&amp;gt;.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.rs&amp;lt;/code&amp;gt; files for the following:&lt;br /&gt;
&lt;br /&gt;
*CSSStyleSheet interface&lt;br /&gt;
*CSSRule interface&lt;br /&gt;
*CSSRuleList interface&lt;br /&gt;
*CSSStyleRule interface&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html.&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101842</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101842"/>
		<updated>2016-04-04T23:18:20Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines [https://en.wikipedia.org/wiki/Application_programming_interface APIs] (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS). &lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc.&lt;br /&gt;
What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python.&lt;br /&gt;
The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;. Add a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*create the CSSRule interface.&lt;br /&gt;
*create the CSSRuleList interface and implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;.&lt;br /&gt;
*implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; by making the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; type contain a RefCell, and using this to mutate the contents of the vector.&lt;br /&gt;
*create the CSSStyleRule interface and make &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
==='''Initial Steps'''===&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
===='''Step 1'''====&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
[[File:part of stylesheet.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:stylesheet webidl.png]]&lt;br /&gt;
&lt;br /&gt;
===='''Step 2'''====&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
[[File:part of stylesheetlist.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:stylesheetlist webidl.png]]&lt;br /&gt;
&lt;br /&gt;
===='''Step 3'''====&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
[[File:doc rs.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:doc webidl.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Subsequent Steps'''===&lt;br /&gt;
&lt;br /&gt;
We will be making changes in the &amp;lt;code&amp;gt;Documet.rs&amp;lt;/code&amp;gt; file to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt;. We're also going to implement the following:&lt;br /&gt;
&lt;br /&gt;
*CSSStyleSheet interface&lt;br /&gt;
*CSSRule interface&lt;br /&gt;
*CSSRuleList interface&lt;br /&gt;
*CSSStyleRule interface&lt;br /&gt;
&lt;br /&gt;
For each of these interfaces, we’re going to be implementing both the &amp;lt;code&amp;gt;.webidl&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.rs&amp;lt;/code&amp;gt; files.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html.&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101841</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101841"/>
		<updated>2016-04-04T23:03:05Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Project Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines [https://en.wikipedia.org/wiki/Application_programming_interface APIs] (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS). &lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc.&lt;br /&gt;
What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python.&lt;br /&gt;
The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*to make the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member of &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; store the associated &amp;lt;code&amp;gt;Element&amp;lt;/code&amp;gt; along with the actual &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt;. Add a member to &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; for the associated element, and implement the &amp;lt;code&amp;gt;ownerNode&amp;lt;/code&amp;gt; attribute of &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an &amp;lt;code&amp;gt;Arc&amp;lt;Stylesheet&amp;gt;&amp;lt;/code&amp;gt; member. Add a method to &amp;lt;code&amp;gt;Document&amp;lt;/code&amp;gt; that returns a new &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; instance for a particular index in the &amp;lt;code&amp;gt;stylesheets&amp;lt;/code&amp;gt; member.&lt;br /&gt;
*create the CSSRule interface.&lt;br /&gt;
*create the CSSRuleList interface and implement &amp;lt;code&amp;gt;CSSStyleSheet.cssRules&amp;lt;/code&amp;gt;.&lt;br /&gt;
*implement the &amp;lt;code&amp;gt;insertRule&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;deleteRule&amp;lt;/code&amp;gt; methods of &amp;lt;code&amp;gt;CSSStyleSheet&amp;lt;/code&amp;gt; by making the &amp;lt;code&amp;gt;rules&amp;lt;/code&amp;gt; member of the &amp;lt;code&amp;gt;Stylesheet&amp;lt;/code&amp;gt; type contain a RefCell, and using this to mutate the contents of the vector.&lt;br /&gt;
*create the CSSStyleRule interface and make &amp;lt;code&amp;gt;cssRules&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;CSSStyleRule&amp;lt;/code&amp;gt; values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
==='''Step 1'''===&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
[[File:part of stylesheet.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:stylesheet webidl.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Step 2'''===&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
[[File:part of stylesheetlist.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:stylesheetlist webidl.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Step 3'''===&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
[[File:doc rs.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:doc webidl.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html.&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101840</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101840"/>
		<updated>2016-04-04T22:49:06Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Project Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines [https://en.wikipedia.org/wiki/Application_programming_interface APIs] (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS). &lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc.&lt;br /&gt;
What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python.&lt;br /&gt;
The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
The Subsequent steps are:&lt;br /&gt;
*to make the stylesheets member of Document store the associated Element along with the actual Stylesheet. Add a member to StyleSheet for the associated element, and implement the ownerNode attribute of StyleSheet using this.&lt;br /&gt;
*create the CSSStyleSheet interface, containing an Arc&amp;lt;Stylesheet&amp;gt; member. Add a method to Document that returns a new CSSStyleSheet instance for a particular index in thestylesheets member.&lt;br /&gt;
*create the CSSRule interface.&lt;br /&gt;
*create the CSSRuleList interface and implement CSSStyleSheet.cssRules.&lt;br /&gt;
*implement the insertRule and deleteRule methods of CSSStyleSheet by making the rulesmember of the Stylesheet type contain a RefCell, and using this to mutate the contents of the vector.&lt;br /&gt;
*create the CSSStyleRule interface and make cssRules return CSSStyleRule values for appropriate rules.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
==='''Step 1'''===&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
[[File:part of stylesheet.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:stylesheet webidl.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Step 2'''===&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
[[File:part of stylesheetlist.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:stylesheetlist webidl.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Step 3'''===&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
[[File:doc rs.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:doc webidl.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html.&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101573</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101573"/>
		<updated>2016-04-01T02:07:36Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines [https://en.wikipedia.org/wiki/Application_programming_interface APIs] (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS). &lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc.&lt;br /&gt;
What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python.&lt;br /&gt;
The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
==='''Step 1'''===&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
[[File:part of stylesheet.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:stylesheet webidl.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Step 2'''===&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
[[File:part of stylesheetlist.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:stylesheetlist webidl.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Step 3'''===&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
[[File:doc rs.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:doc webidl.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. As far as we know there is no way to test this from UI.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html.&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101572</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101572"/>
		<updated>2016-04-01T02:05:14Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines [https://en.wikipedia.org/wiki/Application_programming_interface APIs] (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS). &lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc.&lt;br /&gt;
What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python.&lt;br /&gt;
The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
==='''Step 1'''===&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
[[File:part of stylesheet.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:stylesheet webidl.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Step 2'''===&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
[[File:part of stylesheetlist.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:stylesheetlist webidl.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Step 3'''===&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
[[File:doc rs.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:doc webidl.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html. As far as we know there is no way to test this from UI.&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Doc_webidl.png&amp;diff=101571</id>
		<title>File:Doc webidl.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Doc_webidl.png&amp;diff=101571"/>
		<updated>2016-04-01T02:02:29Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Doc_rs.png&amp;diff=101570</id>
		<title>File:Doc rs.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Doc_rs.png&amp;diff=101570"/>
		<updated>2016-04-01T02:02:04Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Stylesheetlist_webidl.png&amp;diff=101569</id>
		<title>File:Stylesheetlist webidl.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Stylesheetlist_webidl.png&amp;diff=101569"/>
		<updated>2016-04-01T02:01:45Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Part_of_stylesheetlist.png&amp;diff=101568</id>
		<title>File:Part of stylesheetlist.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Part_of_stylesheetlist.png&amp;diff=101568"/>
		<updated>2016-04-01T02:01:32Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Stylesheet_webidl.png&amp;diff=101567</id>
		<title>File:Stylesheet webidl.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Stylesheet_webidl.png&amp;diff=101567"/>
		<updated>2016-04-01T02:01:19Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Part_of_stylesheet.png&amp;diff=101566</id>
		<title>File:Part of stylesheet.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Part_of_stylesheet.png&amp;diff=101566"/>
		<updated>2016-04-01T02:00:52Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: uploaded a new version of &amp;amp;quot;File:Part of stylesheet.png&amp;amp;quot;: Reverted to version as of 01:57, 1 April 2016&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Part_of_stylesheet.png&amp;diff=101565</id>
		<title>File:Part of stylesheet.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Part_of_stylesheet.png&amp;diff=101565"/>
		<updated>2016-04-01T02:00:11Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: uploaded a new version of &amp;amp;quot;File:Part of stylesheet.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Part_of_stylesheet.png&amp;diff=101564</id>
		<title>File:Part of stylesheet.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Part_of_stylesheet.png&amp;diff=101564"/>
		<updated>2016-04-01T01:57:30Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101563</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101563"/>
		<updated>2016-04-01T01:57:07Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines [https://en.wikipedia.org/wiki/Application_programming_interface APIs] (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS). &lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc.&lt;br /&gt;
What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python.&lt;br /&gt;
The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
==='''Step 1'''===&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
[[File:part of stylesheet.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:stylesheet webidl.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Step 2'''===&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
[[File:part of stylesheetlist.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:stylesheetlist webidl.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Step 3'''===&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current document.&lt;br /&gt;
&lt;br /&gt;
[[File:doc rs.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:doc webidl.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101562</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101562"/>
		<updated>2016-04-01T01:34:30Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines [https://en.wikipedia.org/wiki/Application_programming_interface APIs] (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in [https://en.wikipedia.org/wiki/Mozilla Mozilla] research to write a parallel layout engine in rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS). &lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc.&lt;br /&gt;
What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python.&lt;br /&gt;
The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
==='''Step 1'''===&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
==='''Step 2'''===&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
==='''Step 3'''===&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current docume[Snapshots of .webidl and .rs from Git]nt.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101561</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101561"/>
		<updated>2016-04-01T01:31:47Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in [https://en.wikipedia.org/wiki/HTML HTML] and [https://en.wikipedia.org/wiki/XHTML XHTML], the language can be applied to any [https://en.wikipedia.org/wiki/XML XML] document, including plain XML, [https://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] and [https://en.wikipedia.org/wiki/XUL XUL], and is applicable to rendering in speech, or on other media. Along with HTML and [https://en.wikipedia.org/wiki/JavaScript JavaScript], CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in Mozilla research to write a parallel layout engine in rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS). &lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc.&lt;br /&gt;
What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python.&lt;br /&gt;
The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
==='''Step 1'''===&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
==='''Step 2'''===&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
==='''Step 3'''===&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current docume[Snapshots of .webidl and .rs from Git]nt.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101560</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101560"/>
		<updated>2016-04-01T01:27:59Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]) is a style sheet language used for describing the presentation of a document written in a markup language.[1] Although most often used to set the visual style of web pages and user interfaces written in HTML and XHTML, the language can be applied to any XML document, including plain XML, SVG and XUL, and is applicable to rendering in speech, or on other media. Along with HTML and JavaScript, CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in Mozilla research to write a parallel layout engine in rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS). &lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc.&lt;br /&gt;
What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python.&lt;br /&gt;
The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
==='''Step 1'''===&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
==='''Step 2'''===&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
==='''Step 3'''===&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current docume[Snapshots of .webidl and .rs from Git]nt.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101378</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101378"/>
		<updated>2016-03-26T22:28:55Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language.[1] Although most often used to set the visual style of web pages and user interfaces written in HTML and XHTML, the language can be applied to any XML document, including plain XML, SVG and XUL, and is applicable to rendering in speech, or on other media. Along with HTML and JavaScript, CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in Mozilla research to write a parallel layout engine in rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS). &lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc.&lt;br /&gt;
What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python.&lt;br /&gt;
The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
==='''Step 1'''===&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
==='''Step 2'''===&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
==='''Step 3'''===&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current docume[Snapshots of .webidl and .rs from Git]nt.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101377</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101377"/>
		<updated>2016-03-26T22:23:06Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language.  Although most often used to set the visual style of web pages and user interfaces written in HTML and XHTML, the language can be applied to any XML document, including plain XML, SVG and XUL, and is applicable to rendering in speech, or on other media. Along with HTML and JavaScript, CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in Mozilla research to write a parallel layout engine in rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS). &lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc.&lt;br /&gt;
What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python.&lt;br /&gt;
The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
==='''Step 1'''===&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
==='''Step 2'''===&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
==='''Step 3'''===&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current docume[Snapshots of .webidl and .rs from Git]nt.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101376</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101376"/>
		<updated>2016-03-26T22:19:59Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([[CSS]]) is a style sheet language used for describing the presentation of a document written in a markup language.  Although most often used to set the visual style of web pages and user interfaces written in HTML and XHTML, the language can be applied to any XML document, including plain XML, SVG and XUL, and is applicable to rendering in speech, or on other media. Along with HTML and JavaScript, CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in Mozilla research to write a parallel layout engine in rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS). &lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc.&lt;br /&gt;
What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python.&lt;br /&gt;
The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
==='''Step 1'''===&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
==='''Step 2'''===&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
==='''Step 3'''===&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current docume[Snapshots of .webidl and .rs from Git]nt.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101375</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101375"/>
		<updated>2016-03-26T22:19:39Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([CSS]) is a style sheet language used for describing the presentation of a document written in a markup language.  Although most often used to set the visual style of web pages and user interfaces written in HTML and XHTML, the language can be applied to any XML document, including plain XML, SVG and XUL, and is applicable to rendering in speech, or on other media. Along with HTML and JavaScript, CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in Mozilla research to write a parallel layout engine in rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS). &lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc.&lt;br /&gt;
What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python.&lt;br /&gt;
The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
==='''Step 1'''===&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
==='''Step 2'''===&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
==='''Step 3'''===&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current docume[Snapshots of .webidl and .rs from Git]nt.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101374</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101374"/>
		<updated>2016-03-26T22:19:12Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets ([[CSS]]) is a style sheet language used for describing the presentation of a document written in a markup language.  Although most often used to set the visual style of web pages and user interfaces written in HTML and XHTML, the language can be applied to any XML document, including plain XML, SVG and XUL, and is applicable to rendering in speech, or on other media. Along with HTML and JavaScript, CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in Mozilla research to write a parallel layout engine in rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS). &lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc.&lt;br /&gt;
What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python.&lt;br /&gt;
The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
==='''Step 1'''===&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
==='''Step 2'''===&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
==='''Step 3'''===&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current docume[Snapshots of .webidl and .rs from Git]nt.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101373</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101373"/>
		<updated>2016-03-26T22:18:58Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language.  Although most often used to set the visual style of web pages and user interfaces written in HTML and XHTML, the language can be applied to any XML document, including plain XML, SVG and XUL, and is applicable to rendering in speech, or on other media. Along with HTML and JavaScript, CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in Mozilla research to write a parallel layout engine in rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS). &lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc.&lt;br /&gt;
What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python.&lt;br /&gt;
The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
==='''Step 1'''===&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
==='''Step 2'''===&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
==='''Step 3'''===&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current docume[Snapshots of .webidl and .rs from Git]nt.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So now you will see 0 testcases. We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101337</id>
		<title>CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Implement_Common_Parts_of_the_CSSOM_API&amp;diff=101337"/>
		<updated>2016-03-24T03:50:01Z</updated>

		<summary type="html">&lt;p&gt;Maalbash: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language.  Although most often used to set the visual style of web pages and user interfaces written in HTML and XHTML, the language can be applied to any XML document, including plain XML, SVG and XUL, and is applicable to rendering in speech, or on other media. Along with HTML and JavaScript, CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications&lt;br /&gt;
&lt;br /&gt;
=='''CSSOM'''==&lt;br /&gt;
CSSOM (CSS object model) defines APIs (including generic parsing and serialization rules) for media queries, selectors, and CSS itself.&lt;br /&gt;
The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.&lt;br /&gt;
&lt;br /&gt;
=='''Servo'''==&lt;br /&gt;
&lt;br /&gt;
Servo is a project in Mozilla research to write a parallel layout engine in rust. It aims to achieve better parallelism, security, modularity and performance. Servo is built with Cargo, the rust package manager. It currently supports 64bit OSX, 64bit Linux, Android, and Gonk(Firefox OS). &lt;br /&gt;
&lt;br /&gt;
=='''Rust'''==&lt;br /&gt;
&lt;br /&gt;
We can organize different languages on a spectrum with control on one end and safety on the other. Languages like C and C++ fall on the end of the side of control, where as on the other side we have languages like Javascript, Ruby, Python, etc.&lt;br /&gt;
What Rust does is stepping off this line. What it does is not a tradeoff between control and safety, but it provides you both the low level of control found in C and C++, and the high level of safety in JavaScript and Python.&lt;br /&gt;
The three concepts that distinguish rust from other programming languages are: Ownership, Borrowing and lifetime. Ownership is how Rust achieves its largest goal, memory safety.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
&lt;br /&gt;
The project initial steps were described as the following:&lt;br /&gt;
*compile Servo and ensure that it runs on &amp;lt;code&amp;gt;tests/html/about-mozilla.html&amp;lt;/code&amp;gt;&lt;br /&gt;
*email the &amp;lt;code&amp;gt;mozilla.dev.servo&amp;lt;/code&amp;gt; mailing list introducing your group and your progress&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheet&amp;lt;/code&amp;gt; interface. See the documentation for how to go about this. Comment out any method in the WebIDL that cannot be trivially implemented according to the specification.&lt;br /&gt;
*create the &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; interface. Leave &amp;lt;code&amp;gt;[ArrayClass]&amp;lt;/code&amp;gt; commented out, since it is not yet supported by Servo. Store a &amp;lt;code&amp;gt;JS&amp;lt;Document&amp;gt;&amp;lt;/code&amp;gt; member to allow accessing a document's stylesheets.&lt;br /&gt;
*add the &amp;lt;code&amp;gt;styleSheets&amp;lt;/code&amp;gt; attribute from the Document extension to &amp;lt;code&amp;gt;Document.webidl&amp;lt;/code&amp;gt;, and make it return a new instance of &amp;lt;code&amp;gt;StyleSheetList&amp;lt;/code&amp;gt; referencing the current document.&lt;br /&gt;
*run &amp;lt;code&amp;gt;./mach test-wpt&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;/tests/wpt/html/dom/interfaces.html&amp;lt;/code&amp;gt; and update the test result expectations according to the documentation&lt;br /&gt;
*update &amp;lt;code&amp;gt;tests/wpt/mozilla/tests/mozilla/interfaces.html&amp;lt;/code&amp;gt; to add the new interface names and allow the test to pass&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this github page.&lt;br /&gt;
==='''Step 1'''===&lt;br /&gt;
We had to implement the StyleSheet interface for which we had to create two file: stylesheet.rs and StyleSheet.webidl and included stylesheet interface in the mod.rs file.&lt;br /&gt;
In the StyleSheet interface we avoided the three methods: ownerNode, parentStyleSheet and media as they could not be trivially implemented and the instructions were clear to avoid such methods.&lt;br /&gt;
&lt;br /&gt;
==='''Step 2'''===&lt;br /&gt;
We had to implement StyleSheetList interface for which we had to create two file: stylesheetlist.rs and StyleSheetList.webidl and included stylesheetlist interface in the mod.rs file.&lt;br /&gt;
We used JS&amp;lt;Document&amp;gt; instead of [ArrayClass] as [ArrayClass] is not yet supported by Servo.&lt;br /&gt;
In the StyleSheetList interface we did not implement the getter as we do not have a list of stylesheets/scripts/dom.&lt;br /&gt;
&lt;br /&gt;
==='''Step 3'''===&lt;br /&gt;
We had to implement a partial interface Document with an attribute as styleSheets. The declaration of the interface was done in Document.webidl and its implementation was done in document.rs file. The implementation returned a new instance of StyleSheetList referencing the current docume[Snapshots of .webidl and .rs from Git]nt.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
Following are the steps to run all the tests:&lt;br /&gt;
1.	Install the pre-requisites required for servo as mentioned here&lt;br /&gt;
2.	Run the following commands&lt;br /&gt;
    cd&lt;br /&gt;
    git clone https://github.com/mohammed-alfatih/servo.git&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --release&lt;br /&gt;
'''Note''': It may take around 30 mins to build&lt;br /&gt;
    ./mach test-wpt /tests/wpt/html/dom/interfaces.html&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note''': There were no predefined test cases mentioned for our project. So no you will see 0 testcases. We added the two new interfaces in tests/wpt/mozilla/tests/mozilla/interfaces.html&lt;/div&gt;</summary>
		<author><name>Maalbash</name></author>
	</entry>
</feed>