<?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=Smshah4</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=Smshah4"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Smshah4"/>
	<updated>2026-06-25T16:25:09Z</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_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101927</id>
		<title>CSC/ECE 517 Spring 2016 M1602 Make image loads conform with the spec</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101927"/>
		<updated>2016-04-08T18:27:00Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Step 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTML5 HTML 5] specifies a complex model for image loading on a web browser. It has specifications&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/#the-picture-element&amp;lt;/ref&amp;gt; for [https://html.spec.whatwg.org/multipage/#the-picture-element picture element] as well as img element, and browsers need to follow these HTML 5 specifications to conform to the standard. Servo's current implementation of image loading is [http://mxr.mozilla.org/servo/source/components/script/dom/htmlimageelement.rs#107 straightforward, but non-compliant] with HTML 5 standards&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/&amp;lt;/ref&amp;gt; in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML 5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/servo/servo Servo] is a [https://en.wikipedia.org/wiki/Web_browser web browser] layout engine written in [https://www.mozilla.org/en-US/?v=b Mozilla]'s new [https://en.wikipedia.org/wiki/System_programming_language systems language] [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust]&amp;lt;ref&amp;gt;https://servo.org/&amp;lt;/ref&amp;gt;. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism&amp;lt;ref&amp;gt;https://www.usenix.org/legacy/event/hotpar09/tech/full_papers/jones/jones.pdf&amp;lt;/ref&amp;gt;, security&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Browser_security&amp;lt;/ref&amp;gt;, modularity&amp;lt;ref&amp;gt;https://msdn.microsoft.com/en-us/library/ff709921.aspx&amp;lt;/ref&amp;gt; and performance. The Servo project is [https://en.wikipedia.org/wiki/Open-source_software open sourced] and receives contributions from individual contributors from around the globe. It currently supports [https://www.linux.com/ Linux], [http://www.apple.com/osx/ OS X], [https://www.microsoft.com/en-us/windows Windows], [https://www.android.com/ Android], and [https://en.wikipedia.org/wiki/Gonk Gonk] (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;. Rust is a [https://en.wikipedia.org/wiki/General-purpose_programming_language general-purpose], [https://developer.mozilla.org/ar/docs/multiparadigmlanguage.html multi-paradigm], [https://en.wikipedia.org/wiki/Compiled_language compiled programming] language, supporting pure-functional, imperative-procedural, and object-oriented styles&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The detailed description of the project can be found [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
===Compilation and Build===&lt;br /&gt;
* The first step is to compile Servo browser and build it on a local machine. The steps for compiling and building Servo are:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
compile Servo and ensure that it runs tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
===Initial Steps===&lt;br /&gt;
The initial steps for the project were completed as a part of OSS project 2. The functionalities implemented were:&lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
The subsequent steps for the project are to be implemented as a part of final semester project. The steps to do are:&lt;br /&gt;
* Replace the code in htmlimageelement.rs that instructs the image cache to fetch a URL with code that directly performs a network request (see HTMLScriptElement::prepare for an example that uses the NetworkListener helper and Document::load_async). The result should be sent to the image cache using the newly-added command. &lt;br /&gt;
* Implement the parse a srcset attribute algorithm by defining a parse_a_srcset_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs (./mach test-unit -p script/dom/htmlimageelement).  &lt;br /&gt;
* Implement the parse a sizes attribute algorithm by defining a parse_a_sizes_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs.&lt;br /&gt;
* Implement the normalize the source densities algorithm - create data types for source set and image source.&lt;br /&gt;
* Implement the update the source set algorithm by defining a update_the_source_set function in htmlimageelement.rs.&lt;br /&gt;
* Implement the select an image source algorithm by defining a select_an_image_source function in htmlimageelement.rs.&lt;br /&gt;
&lt;br /&gt;
==Design Principles==&lt;br /&gt;
&lt;br /&gt;
There were no particular design principles used in this project as it was a modification of existing code. .&lt;br /&gt;
&lt;br /&gt;
We were not supposed to modify the existing design apart from adding a new behaviour/ability for HTMLImageElement. The same principals of the original Servo code can be thought of as being followed by the project.&lt;br /&gt;
The main aim was to increase the code coverage and to make the Servo browser more compliant to HMTL 5 standards when it comes to image loading.&lt;br /&gt;
&lt;br /&gt;
We attempted to follow good OO practices throughout development. While using enums and also while defining new methods, we tried to follow the DRY principle in order to avoid repetition of code. Servo has it's own coding standards which are checked by running following command &lt;br /&gt;
&lt;br /&gt;
 ./mach test-tidy  &lt;br /&gt;
&lt;br /&gt;
Issues reported by test are to be fixed before pull request can be generated. This ensures that developers would adhere to coding standards. We have fixed all the issues reported by tidy-test.&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 [https://github.com/servo/servo/wiki/Image-load-conformance-student-project github page].&lt;br /&gt;
&lt;br /&gt;
====Step 1====&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ImageRequest.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:currentSrc.png]]&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
Following is the class diagram for the main classes affected in the project . Class HTMLImageElement (HTMLImageElement.rs file) . Also provided flowcharts for the algorithms we are to implement .  &lt;br /&gt;
&lt;br /&gt;
[[File:class_diagram_M1602.png]]&lt;br /&gt;
====Step 1====&lt;br /&gt;
replace the code in  htmlimageelement.rs  that instructs the image cache to fetch a URL with code that directly performs a network request (see  HTMLScriptElement::prepare  for an example that uses the  NetworkListener  helper and  Document::load_async ). The result should be sent to the image cache using the newly-added command.&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
implement the parse a srcset attribute algorithm by defining a  parse_a_srcset_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs  ( ./mach test-unit -p script/dom/htmlimageelement )&lt;br /&gt;
&lt;br /&gt;
The flowchart of the above step is :&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
implement the parse a sizes attribute algorithm by defining a  parse_a_sizes_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs .&lt;br /&gt;
&lt;br /&gt;
[[File:parsasize.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 4====&lt;br /&gt;
implement the normalize the source densities algorithm - create data types for  source set  and  image source  &lt;br /&gt;
====Step 5====&lt;br /&gt;
implement the update the source set algorithm by defining a  update_the_source_set  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc_2.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 6====&lt;br /&gt;
implement the select an image source algorithm by defining a  select_an_image_source  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for HTMLImageElement:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/10134 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101923</id>
		<title>CSC/ECE 517 Spring 2016 M1602 Make image loads conform with the spec</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101923"/>
		<updated>2016-04-06T20:45:44Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Subsequent Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTML5 HTML 5] specifies a complex model for image loading on a web browser. It has specifications&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/#the-picture-element&amp;lt;/ref&amp;gt; for [https://html.spec.whatwg.org/multipage/#the-picture-element picture element] as well as img element, and browsers need to follow these HTML 5 specifications to conform to the standard. Servo's current implementation of image loading is [http://mxr.mozilla.org/servo/source/components/script/dom/htmlimageelement.rs#107 straightforward, but non-compliant] with HTML 5 standards&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/&amp;lt;/ref&amp;gt; in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML 5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/servo/servo Servo] is a [https://en.wikipedia.org/wiki/Web_browser web browser] layout engine written in [https://www.mozilla.org/en-US/?v=b Mozilla]'s new [https://en.wikipedia.org/wiki/System_programming_language systems language] [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust]&amp;lt;ref&amp;gt;https://servo.org/&amp;lt;/ref&amp;gt;. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism&amp;lt;ref&amp;gt;https://www.usenix.org/legacy/event/hotpar09/tech/full_papers/jones/jones.pdf&amp;lt;/ref&amp;gt;, security&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Browser_security&amp;lt;/ref&amp;gt;, modularity&amp;lt;ref&amp;gt;https://msdn.microsoft.com/en-us/library/ff709921.aspx&amp;lt;/ref&amp;gt; and performance. The Servo project is [https://en.wikipedia.org/wiki/Open-source_software open sourced] and receives contributions from individual contributors from around the globe. It currently supports [https://www.linux.com/ Linux], [http://www.apple.com/osx/ OS X], [https://www.microsoft.com/en-us/windows Windows], [https://www.android.com/ Android], and [https://en.wikipedia.org/wiki/Gonk Gonk] (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;. Rust is a [https://en.wikipedia.org/wiki/General-purpose_programming_language general-purpose], [https://developer.mozilla.org/ar/docs/multiparadigmlanguage.html multi-paradigm], [https://en.wikipedia.org/wiki/Compiled_language compiled programming] language, supporting pure-functional, imperative-procedural, and object-oriented styles&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The detailed description of the project can be found [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
===Compilation and Build===&lt;br /&gt;
* The first step is to compile Servo browser and build it on a local machine. The steps for compiling and building Servo are:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
compile Servo and ensure that it runs tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
===Initial Steps===&lt;br /&gt;
The initial steps for the project were completed as a part of OSS project 2. The functionalities implemented were:&lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
The subsequent steps for the project are to be implemented as a part of final semester project. The steps to do are:&lt;br /&gt;
* Replace the code in htmlimageelement.rs that instructs the image cache to fetch a URL with code that directly performs a network request (see HTMLScriptElement::prepare for an example that uses the NetworkListener helper and Document::load_async). The result should be sent to the image cache using the newly-added command. &lt;br /&gt;
* Implement the parse a srcset attribute algorithm by defining a parse_a_srcset_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs (./mach test-unit -p script/dom/htmlimageelement).  &lt;br /&gt;
* Implement the parse a sizes attribute algorithm by defining a parse_a_sizes_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs.&lt;br /&gt;
* Implement the normalize the source densities algorithm - create data types for source set and image source.&lt;br /&gt;
* Implement the update the source set algorithm by defining a update_the_source_set function in htmlimageelement.rs.&lt;br /&gt;
* Implement the select an image source algorithm by defining a select_an_image_source function in htmlimageelement.rs.&lt;br /&gt;
&lt;br /&gt;
==Design Principles==&lt;br /&gt;
&lt;br /&gt;
There were no particular design principles used in this project as it was a modification of existing code. .&lt;br /&gt;
&lt;br /&gt;
We were not supposed to modify the existing design apart from adding a new behaviour/ability for HTMLImageElement. The same principals of the original Servo code can be thought of as being followed by the project.&lt;br /&gt;
The main aim was to increase the code coverage and to make the Servo browser more compliant to HMTL 5 standards when it comes to image loading.&lt;br /&gt;
&lt;br /&gt;
We attempted to follow good OO practices throughout development. While using enums and also while defining new methods, we tried to follow the DRY principle in order to avoid repetition of code. Servo has it's own coding standards which are checked by running following command &lt;br /&gt;
&lt;br /&gt;
 ./mach test-tidy  &lt;br /&gt;
&lt;br /&gt;
Issues reported by test are to be fixed before pull request can be generated. This ensures that developers would adhere to coding standards. We have fixed all the issues reported by tidy-test.&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 [https://github.com/servo/servo/wiki/Image-load-conformance-student-project github page].&lt;br /&gt;
&lt;br /&gt;
====Step 1====&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ImageRequest.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:currentSrc.png]]&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
Following is the class diagram for the main classes affected in the project . Class HTMLImageElement (HTMLImageElement.rs file) . Also provided flowcharts for the algorithms we are to implement .  &lt;br /&gt;
&lt;br /&gt;
[[File:class_diagram_M1602.png]]&lt;br /&gt;
====Step 1====&lt;br /&gt;
replace the code in  htmlimageelement.rs  that instructs the image cache to fetch a URL with code that directly performs a network request (see  HTMLScriptElement::prepare  for an example that uses the  NetworkListener  helper and  Document::load_async ). The result should be sent to the image cache using the newly-added command.&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
implement the parse a srcset attribute algorithm by defining a  parse_a_srcset_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs  ( ./mach test-unit -p script/dom/htmlimageelement )&lt;br /&gt;
&lt;br /&gt;
The flowchart of the above step is : &lt;br /&gt;
&lt;br /&gt;
[[File:parseAsrcset.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
implement the parse a sizes attribute algorithm by defining a  parse_a_sizes_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs .&lt;br /&gt;
&lt;br /&gt;
[[File:parsasize.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 4====&lt;br /&gt;
implement the normalize the source densities algorithm - create data types for  source set  and  image source  &lt;br /&gt;
====Step 5====&lt;br /&gt;
implement the update the source set algorithm by defining a  update_the_source_set  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc_2.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 6====&lt;br /&gt;
implement the select an image source algorithm by defining a  select_an_image_source  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for HTMLImageElement:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/10134 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101922</id>
		<title>CSC/ECE 517 Spring 2016 M1602 Make image loads conform with the spec</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101922"/>
		<updated>2016-04-06T20:38:32Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Subsequent Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTML5 HTML 5] specifies a complex model for image loading on a web browser. It has specifications&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/#the-picture-element&amp;lt;/ref&amp;gt; for [https://html.spec.whatwg.org/multipage/#the-picture-element picture element] as well as img element, and browsers need to follow these HTML 5 specifications to conform to the standard. Servo's current implementation of image loading is [http://mxr.mozilla.org/servo/source/components/script/dom/htmlimageelement.rs#107 straightforward, but non-compliant] with HTML 5 standards&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/&amp;lt;/ref&amp;gt; in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML 5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/servo/servo Servo] is a [https://en.wikipedia.org/wiki/Web_browser web browser] layout engine written in [https://www.mozilla.org/en-US/?v=b Mozilla]'s new [https://en.wikipedia.org/wiki/System_programming_language systems language] [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust]&amp;lt;ref&amp;gt;https://servo.org/&amp;lt;/ref&amp;gt;. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism&amp;lt;ref&amp;gt;https://www.usenix.org/legacy/event/hotpar09/tech/full_papers/jones/jones.pdf&amp;lt;/ref&amp;gt;, security&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Browser_security&amp;lt;/ref&amp;gt;, modularity&amp;lt;ref&amp;gt;https://msdn.microsoft.com/en-us/library/ff709921.aspx&amp;lt;/ref&amp;gt; and performance. The Servo project is [https://en.wikipedia.org/wiki/Open-source_software open sourced] and receives contributions from individual contributors from around the globe. It currently supports [https://www.linux.com/ Linux], [http://www.apple.com/osx/ OS X], [https://www.microsoft.com/en-us/windows Windows], [https://www.android.com/ Android], and [https://en.wikipedia.org/wiki/Gonk Gonk] (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;. Rust is a [https://en.wikipedia.org/wiki/General-purpose_programming_language general-purpose], [https://developer.mozilla.org/ar/docs/multiparadigmlanguage.html multi-paradigm], [https://en.wikipedia.org/wiki/Compiled_language compiled programming] language, supporting pure-functional, imperative-procedural, and object-oriented styles&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The detailed description of the project can be found [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
===Compilation and Build===&lt;br /&gt;
* The first step is to compile Servo browser and build it on a local machine. The steps for compiling and building Servo are:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
compile Servo and ensure that it runs tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
===Initial Steps===&lt;br /&gt;
The initial steps for the project were completed as a part of OSS project 2. The functionalities implemented were:&lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
The subsequent steps for the project are to be implemented as a part of final semester project. The steps to do are:&lt;br /&gt;
* Replace the code in htmlimageelement.rs that instructs the image cache to fetch a URL with code that directly performs a network request (see HTMLScriptElement::prepare for an example that uses the NetworkListener helper and Document::load_async). The result should be sent to the image cache using the newly-added command. &lt;br /&gt;
* Implement the parse a srcset attribute algorithm by defining a parse_a_srcset_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs (./mach test-unit -p script/dom/htmlimageelement).  &lt;br /&gt;
* Implement the parse a sizes attribute algorithm by defining a parse_a_sizes_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs.&lt;br /&gt;
* Implement the normalize the source densities algorithm - create data types for source set and image source.&lt;br /&gt;
* Implement the update the source set algorithm by defining a update_the_source_set function in htmlimageelement.rs.&lt;br /&gt;
* Implement the select an image source algorithm by defining a select_an_image_source function in htmlimageelement.rs.&lt;br /&gt;
&lt;br /&gt;
==Design Principles==&lt;br /&gt;
&lt;br /&gt;
There were no particular design principles used in this project as it was a modification of existing code. .&lt;br /&gt;
&lt;br /&gt;
We were not supposed to modify the existing design apart from adding a new behaviour/ability for HTMLImageElement. The same principals of the original Servo code can be thought of as being followed by the project.&lt;br /&gt;
The main aim was to increase the code coverage and to make the Servo browser more compliant to HMTL 5 standards when it comes to image loading.&lt;br /&gt;
&lt;br /&gt;
We attempted to follow good OO practices throughout development. While using enums and also while defining new methods, we tried to follow the DRY principle in order to avoid repetition of code. Servo has it's own coding standards which are checked by running following command &lt;br /&gt;
&lt;br /&gt;
 ./mach test-tidy  &lt;br /&gt;
&lt;br /&gt;
Issues reported by test are to be fixed before pull request can be generated. This ensures that developers would adhere to coding standards. We have fixed all the issues reported by tidy-test.&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 [https://github.com/servo/servo/wiki/Image-load-conformance-student-project github page].&lt;br /&gt;
&lt;br /&gt;
====Step 1====&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ImageRequest.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:currentSrc.png]]&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
Since the main changes are in class HTMLImageElement (HTMLImageElement.rs file) we have made class diagram for it and also provided flowcharts for the algorithms we are to implement .  &lt;br /&gt;
&lt;br /&gt;
[[File:class_diagram_M1602.png]]&lt;br /&gt;
====Step 1====&lt;br /&gt;
replace the code in  htmlimageelement.rs  that instructs the image cache to fetch a URL with code that directly performs a network request (see  HTMLScriptElement::prepare  for an example that uses the  NetworkListener  helper and  Document::load_async ). The result should be sent to the image cache using the newly-added command.&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
implement the parse a srcset attribute algorithm by defining a  parse_a_srcset_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs  ( ./mach test-unit -p script/dom/htmlimageelement )&lt;br /&gt;
&lt;br /&gt;
The flowchart of the above step is : &lt;br /&gt;
&lt;br /&gt;
[[File:parseAsrcset.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
implement the parse a sizes attribute algorithm by defining a  parse_a_sizes_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs .&lt;br /&gt;
&lt;br /&gt;
[[File:parsasize.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 4====&lt;br /&gt;
implement the normalize the source densities algorithm - create data types for  source set  and  image source  &lt;br /&gt;
====Step 5====&lt;br /&gt;
implement the update the source set algorithm by defining a  update_the_source_set  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc_2.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 6====&lt;br /&gt;
implement the select an image source algorithm by defining a  select_an_image_source  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for HTMLImageElement:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/10134 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Class_diagram_M1602.png&amp;diff=101921</id>
		<title>File:Class diagram M1602.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Class_diagram_M1602.png&amp;diff=101921"/>
		<updated>2016-04-06T20:37:14Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101920</id>
		<title>CSC/ECE 517 Spring 2016 M1602 Make image loads conform with the spec</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101920"/>
		<updated>2016-04-06T20:37:01Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Subsequent Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTML5 HTML 5] specifies a complex model for image loading on a web browser. It has specifications&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/#the-picture-element&amp;lt;/ref&amp;gt; for [https://html.spec.whatwg.org/multipage/#the-picture-element picture element] as well as img element, and browsers need to follow these HTML 5 specifications to conform to the standard. Servo's current implementation of image loading is [http://mxr.mozilla.org/servo/source/components/script/dom/htmlimageelement.rs#107 straightforward, but non-compliant] with HTML 5 standards&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/&amp;lt;/ref&amp;gt; in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML 5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/servo/servo Servo] is a [https://en.wikipedia.org/wiki/Web_browser web browser] layout engine written in [https://www.mozilla.org/en-US/?v=b Mozilla]'s new [https://en.wikipedia.org/wiki/System_programming_language systems language] [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust]&amp;lt;ref&amp;gt;https://servo.org/&amp;lt;/ref&amp;gt;. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism&amp;lt;ref&amp;gt;https://www.usenix.org/legacy/event/hotpar09/tech/full_papers/jones/jones.pdf&amp;lt;/ref&amp;gt;, security&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Browser_security&amp;lt;/ref&amp;gt;, modularity&amp;lt;ref&amp;gt;https://msdn.microsoft.com/en-us/library/ff709921.aspx&amp;lt;/ref&amp;gt; and performance. The Servo project is [https://en.wikipedia.org/wiki/Open-source_software open sourced] and receives contributions from individual contributors from around the globe. It currently supports [https://www.linux.com/ Linux], [http://www.apple.com/osx/ OS X], [https://www.microsoft.com/en-us/windows Windows], [https://www.android.com/ Android], and [https://en.wikipedia.org/wiki/Gonk Gonk] (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;. Rust is a [https://en.wikipedia.org/wiki/General-purpose_programming_language general-purpose], [https://developer.mozilla.org/ar/docs/multiparadigmlanguage.html multi-paradigm], [https://en.wikipedia.org/wiki/Compiled_language compiled programming] language, supporting pure-functional, imperative-procedural, and object-oriented styles&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The detailed description of the project can be found [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
===Compilation and Build===&lt;br /&gt;
* The first step is to compile Servo browser and build it on a local machine. The steps for compiling and building Servo are:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
compile Servo and ensure that it runs tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
===Initial Steps===&lt;br /&gt;
The initial steps for the project were completed as a part of OSS project 2. The functionalities implemented were:&lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
The subsequent steps for the project are to be implemented as a part of final semester project. The steps to do are:&lt;br /&gt;
* Replace the code in htmlimageelement.rs that instructs the image cache to fetch a URL with code that directly performs a network request (see HTMLScriptElement::prepare for an example that uses the NetworkListener helper and Document::load_async). The result should be sent to the image cache using the newly-added command. &lt;br /&gt;
* Implement the parse a srcset attribute algorithm by defining a parse_a_srcset_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs (./mach test-unit -p script/dom/htmlimageelement).  &lt;br /&gt;
* Implement the parse a sizes attribute algorithm by defining a parse_a_sizes_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs.&lt;br /&gt;
* Implement the normalize the source densities algorithm - create data types for source set and image source.&lt;br /&gt;
* Implement the update the source set algorithm by defining a update_the_source_set function in htmlimageelement.rs.&lt;br /&gt;
* Implement the select an image source algorithm by defining a select_an_image_source function in htmlimageelement.rs.&lt;br /&gt;
&lt;br /&gt;
==Design Principles==&lt;br /&gt;
&lt;br /&gt;
There were no particular design principles used in this project as it was a modification of existing code. .&lt;br /&gt;
&lt;br /&gt;
We were not supposed to modify the existing design apart from adding a new behaviour/ability for HTMLImageElement. The same principals of the original Servo code can be thought of as being followed by the project.&lt;br /&gt;
The main aim was to increase the code coverage and to make the Servo browser more compliant to HMTL 5 standards when it comes to image loading.&lt;br /&gt;
&lt;br /&gt;
We attempted to follow good OO practices throughout development. While using enums and also while defining new methods, we tried to follow the DRY principle in order to avoid repetition of code. Servo has it's own coding standards which are checked by running following command &lt;br /&gt;
&lt;br /&gt;
 ./mach test-tidy  &lt;br /&gt;
&lt;br /&gt;
Issues reported by test are to be fixed before pull request can be generated. This ensures that developers would adhere to coding standards. We have fixed all the issues reported by tidy-test.&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 [https://github.com/servo/servo/wiki/Image-load-conformance-student-project github page].&lt;br /&gt;
&lt;br /&gt;
====Step 1====&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ImageRequest.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:currentSrc.png]]&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
Since the change is in this single file Htmlimageelement.rs , we haven't made any class diagram , but provided flowcharts for the algorithms we are to implement. &lt;br /&gt;
&lt;br /&gt;
[[File:class_diagram_M1602.png]]&lt;br /&gt;
====Step 1====&lt;br /&gt;
replace the code in  htmlimageelement.rs  that instructs the image cache to fetch a URL with code that directly performs a network request (see  HTMLScriptElement::prepare  for an example that uses the  NetworkListener  helper and  Document::load_async ). The result should be sent to the image cache using the newly-added command.&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
implement the parse a srcset attribute algorithm by defining a  parse_a_srcset_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs  ( ./mach test-unit -p script/dom/htmlimageelement )&lt;br /&gt;
&lt;br /&gt;
The flowchart of the above step is : &lt;br /&gt;
&lt;br /&gt;
[[File:parseAsrcset.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
implement the parse a sizes attribute algorithm by defining a  parse_a_sizes_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs .&lt;br /&gt;
&lt;br /&gt;
[[File:parsasize.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 4====&lt;br /&gt;
implement the normalize the source densities algorithm - create data types for  source set  and  image source  &lt;br /&gt;
====Step 5====&lt;br /&gt;
implement the update the source set algorithm by defining a  update_the_source_set  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc_2.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 6====&lt;br /&gt;
implement the select an image source algorithm by defining a  select_an_image_source  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for HTMLImageElement:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/10134 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101919</id>
		<title>CSC/ECE 517 Spring 2016 M1602 Make image loads conform with the spec</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101919"/>
		<updated>2016-04-06T20:36:28Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Subsequent Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTML5 HTML 5] specifies a complex model for image loading on a web browser. It has specifications&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/#the-picture-element&amp;lt;/ref&amp;gt; for [https://html.spec.whatwg.org/multipage/#the-picture-element picture element] as well as img element, and browsers need to follow these HTML 5 specifications to conform to the standard. Servo's current implementation of image loading is [http://mxr.mozilla.org/servo/source/components/script/dom/htmlimageelement.rs#107 straightforward, but non-compliant] with HTML 5 standards&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/&amp;lt;/ref&amp;gt; in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML 5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/servo/servo Servo] is a [https://en.wikipedia.org/wiki/Web_browser web browser] layout engine written in [https://www.mozilla.org/en-US/?v=b Mozilla]'s new [https://en.wikipedia.org/wiki/System_programming_language systems language] [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust]&amp;lt;ref&amp;gt;https://servo.org/&amp;lt;/ref&amp;gt;. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism&amp;lt;ref&amp;gt;https://www.usenix.org/legacy/event/hotpar09/tech/full_papers/jones/jones.pdf&amp;lt;/ref&amp;gt;, security&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Browser_security&amp;lt;/ref&amp;gt;, modularity&amp;lt;ref&amp;gt;https://msdn.microsoft.com/en-us/library/ff709921.aspx&amp;lt;/ref&amp;gt; and performance. The Servo project is [https://en.wikipedia.org/wiki/Open-source_software open sourced] and receives contributions from individual contributors from around the globe. It currently supports [https://www.linux.com/ Linux], [http://www.apple.com/osx/ OS X], [https://www.microsoft.com/en-us/windows Windows], [https://www.android.com/ Android], and [https://en.wikipedia.org/wiki/Gonk Gonk] (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;. Rust is a [https://en.wikipedia.org/wiki/General-purpose_programming_language general-purpose], [https://developer.mozilla.org/ar/docs/multiparadigmlanguage.html multi-paradigm], [https://en.wikipedia.org/wiki/Compiled_language compiled programming] language, supporting pure-functional, imperative-procedural, and object-oriented styles&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The detailed description of the project can be found [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
===Compilation and Build===&lt;br /&gt;
* The first step is to compile Servo browser and build it on a local machine. The steps for compiling and building Servo are:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
compile Servo and ensure that it runs tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
===Initial Steps===&lt;br /&gt;
The initial steps for the project were completed as a part of OSS project 2. The functionalities implemented were:&lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
The subsequent steps for the project are to be implemented as a part of final semester project. The steps to do are:&lt;br /&gt;
* Replace the code in htmlimageelement.rs that instructs the image cache to fetch a URL with code that directly performs a network request (see HTMLScriptElement::prepare for an example that uses the NetworkListener helper and Document::load_async). The result should be sent to the image cache using the newly-added command. &lt;br /&gt;
* Implement the parse a srcset attribute algorithm by defining a parse_a_srcset_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs (./mach test-unit -p script/dom/htmlimageelement).  &lt;br /&gt;
* Implement the parse a sizes attribute algorithm by defining a parse_a_sizes_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs.&lt;br /&gt;
* Implement the normalize the source densities algorithm - create data types for source set and image source.&lt;br /&gt;
* Implement the update the source set algorithm by defining a update_the_source_set function in htmlimageelement.rs.&lt;br /&gt;
* Implement the select an image source algorithm by defining a select_an_image_source function in htmlimageelement.rs.&lt;br /&gt;
&lt;br /&gt;
==Design Principles==&lt;br /&gt;
&lt;br /&gt;
There were no particular design principles used in this project as it was a modification of existing code. .&lt;br /&gt;
&lt;br /&gt;
We were not supposed to modify the existing design apart from adding a new behaviour/ability for HTMLImageElement. The same principals of the original Servo code can be thought of as being followed by the project.&lt;br /&gt;
The main aim was to increase the code coverage and to make the Servo browser more compliant to HMTL 5 standards when it comes to image loading.&lt;br /&gt;
&lt;br /&gt;
We attempted to follow good OO practices throughout development. While using enums and also while defining new methods, we tried to follow the DRY principle in order to avoid repetition of code. Servo has it's own coding standards which are checked by running following command &lt;br /&gt;
&lt;br /&gt;
 ./mach test-tidy  &lt;br /&gt;
&lt;br /&gt;
Issues reported by test are to be fixed before pull request can be generated. This ensures that developers would adhere to coding standards. We have fixed all the issues reported by tidy-test.&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 [https://github.com/servo/servo/wiki/Image-load-conformance-student-project github page].&lt;br /&gt;
&lt;br /&gt;
====Step 1====&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ImageRequest.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:currentSrc.png]]&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
Since the change is in this single file Htmlimageelement.rs , we haven't made any class diagram , but provided flowcharts for the algorithms we are to implement. &lt;br /&gt;
&lt;br /&gt;
[[File:class_diagram.png]]&lt;br /&gt;
====Step 1====&lt;br /&gt;
replace the code in  htmlimageelement.rs  that instructs the image cache to fetch a URL with code that directly performs a network request (see  HTMLScriptElement::prepare  for an example that uses the  NetworkListener  helper and  Document::load_async ). The result should be sent to the image cache using the newly-added command.&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
implement the parse a srcset attribute algorithm by defining a  parse_a_srcset_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs  ( ./mach test-unit -p script/dom/htmlimageelement )&lt;br /&gt;
&lt;br /&gt;
The flowchart of the above step is : &lt;br /&gt;
&lt;br /&gt;
[[File:parseAsrcset.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
implement the parse a sizes attribute algorithm by defining a  parse_a_sizes_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs .&lt;br /&gt;
&lt;br /&gt;
[[File:parsasize.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 4====&lt;br /&gt;
implement the normalize the source densities algorithm - create data types for  source set  and  image source  &lt;br /&gt;
====Step 5====&lt;br /&gt;
implement the update the source set algorithm by defining a  update_the_source_set  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc_2.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 6====&lt;br /&gt;
implement the select an image source algorithm by defining a  select_an_image_source  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for HTMLImageElement:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/10134 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Parsasize.png&amp;diff=101918</id>
		<title>File:Parsasize.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Parsasize.png&amp;diff=101918"/>
		<updated>2016-04-06T10:16:25Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101917</id>
		<title>CSC/ECE 517 Spring 2016 M1602 Make image loads conform with the spec</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101917"/>
		<updated>2016-04-06T10:15:31Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Step 3 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTML5 HTML 5] specifies a complex model for image loading on a web browser. It has specifications&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/#the-picture-element&amp;lt;/ref&amp;gt; for [https://html.spec.whatwg.org/multipage/#the-picture-element picture element] as well as img element, and browsers need to follow these HTML 5 specifications to conform to the standard. Servo's current implementation of image loading is [http://mxr.mozilla.org/servo/source/components/script/dom/htmlimageelement.rs#107 straightforward, but non-compliant] with HTML 5 standards&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/&amp;lt;/ref&amp;gt; in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML 5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/servo/servo Servo] is a [https://en.wikipedia.org/wiki/Web_browser web browser] layout engine written in [https://www.mozilla.org/en-US/?v=b Mozilla]'s new [https://en.wikipedia.org/wiki/System_programming_language systems language] [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust]&amp;lt;ref&amp;gt;https://servo.org/&amp;lt;/ref&amp;gt;. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism&amp;lt;ref&amp;gt;https://www.usenix.org/legacy/event/hotpar09/tech/full_papers/jones/jones.pdf&amp;lt;/ref&amp;gt;, security&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Browser_security&amp;lt;/ref&amp;gt;, modularity&amp;lt;ref&amp;gt;https://msdn.microsoft.com/en-us/library/ff709921.aspx&amp;lt;/ref&amp;gt; and performance. The Servo project is [https://en.wikipedia.org/wiki/Open-source_software open sourced] and receives contributions from individual contributors from around the globe. It currently supports [https://www.linux.com/ Linux], [http://www.apple.com/osx/ OS X], [https://www.microsoft.com/en-us/windows Windows], [https://www.android.com/ Android], and [https://en.wikipedia.org/wiki/Gonk Gonk] (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;. Rust is a [https://en.wikipedia.org/wiki/General-purpose_programming_language general-purpose], [https://developer.mozilla.org/ar/docs/multiparadigmlanguage.html multi-paradigm], [https://en.wikipedia.org/wiki/Compiled_language compiled programming] language, supporting pure-functional, imperative-procedural, and object-oriented styles&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The detailed description of the project can be found [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
===Compilation and Build===&lt;br /&gt;
* The first step is to compile Servo browser and build it on a local machine. The steps for compiling and building Servo are:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
compile Servo and ensure that it runs tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
===Initial Steps===&lt;br /&gt;
The initial steps for the project were completed as a part of OSS project 2. The functionalities implemented were:&lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
The subsequent steps for the project are to be implemented as a part of final semester project. The steps to do are:&lt;br /&gt;
* Replace the code in htmlimageelement.rs that instructs the image cache to fetch a URL with code that directly performs a network request (see HTMLScriptElement::prepare for an example that uses the NetworkListener helper and Document::load_async). The result should be sent to the image cache using the newly-added command. &lt;br /&gt;
* Implement the parse a srcset attribute algorithm by defining a parse_a_srcset_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs (./mach test-unit -p script/dom/htmlimageelement).  &lt;br /&gt;
* Implement the parse a sizes attribute algorithm by defining a parse_a_sizes_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs.&lt;br /&gt;
* Implement the normalize the source densities algorithm - create data types for source set and image source.&lt;br /&gt;
* Implement the update the source set algorithm by defining a update_the_source_set function in htmlimageelement.rs.&lt;br /&gt;
* Implement the select an image source algorithm by defining a select_an_image_source function in htmlimageelement.rs.&lt;br /&gt;
&lt;br /&gt;
==Design Principles==&lt;br /&gt;
&lt;br /&gt;
There were no particular design principles used in this project as it was a modification of existing code. .&lt;br /&gt;
&lt;br /&gt;
We were not supposed to modify the existing design apart from adding a new behaviour/ability for HTMLImageElement. The same principals of the original Servo code can be thought of as being followed by the project.&lt;br /&gt;
The main aim was to increase the code coverage and to make the Servo browser more compliant to HMTL 5 standards when it comes to image loading.&lt;br /&gt;
&lt;br /&gt;
We attempted to follow good OO practices throughout development. While using enums and also while defining new methods, we tried to follow the DRY principle in order to avoid repetition of code. Servo has it's own coding standards which are checked by running following command &lt;br /&gt;
&lt;br /&gt;
 ./mach test-tidy  &lt;br /&gt;
&lt;br /&gt;
Issues reported by test are to be fixed before pull request can be generated. This ensures that developers would adhere to coding standards. We have fixed all the issues reported by tidy-test.&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 [https://github.com/servo/servo/wiki/Image-load-conformance-student-project github page].&lt;br /&gt;
&lt;br /&gt;
====Step 1====&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ImageRequest.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:currentSrc.png]]&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
Since the change is in this single file Htmlimageelement.rs , we haven't made any class diagram , but provided flowcharts for the algorithms we are to implement. &lt;br /&gt;
====Step 1====&lt;br /&gt;
replace the code in  htmlimageelement.rs  that instructs the image cache to fetch a URL with code that directly performs a network request (see  HTMLScriptElement::prepare  for an example that uses the  NetworkListener  helper and  Document::load_async ). The result should be sent to the image cache using the newly-added command.&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
implement the parse a srcset attribute algorithm by defining a  parse_a_srcset_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs  ( ./mach test-unit -p script/dom/htmlimageelement )&lt;br /&gt;
&lt;br /&gt;
The flowchart of the above step is : &lt;br /&gt;
&lt;br /&gt;
[[File:parseAsrcset.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
implement the parse a sizes attribute algorithm by defining a  parse_a_sizes_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs .&lt;br /&gt;
&lt;br /&gt;
[[File:parsasize.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 4====&lt;br /&gt;
implement the normalize the source densities algorithm - create data types for  source set  and  image source  &lt;br /&gt;
====Step 5====&lt;br /&gt;
implement the update the source set algorithm by defining a  update_the_source_set  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc_2.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 6====&lt;br /&gt;
implement the select an image source algorithm by defining a  select_an_image_source  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for HTMLImageElement:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/10134 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101916</id>
		<title>CSC/ECE 517 Spring 2016 M1602 Make image loads conform with the spec</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101916"/>
		<updated>2016-04-06T10:15:14Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Step 3 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTML5 HTML 5] specifies a complex model for image loading on a web browser. It has specifications&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/#the-picture-element&amp;lt;/ref&amp;gt; for [https://html.spec.whatwg.org/multipage/#the-picture-element picture element] as well as img element, and browsers need to follow these HTML 5 specifications to conform to the standard. Servo's current implementation of image loading is [http://mxr.mozilla.org/servo/source/components/script/dom/htmlimageelement.rs#107 straightforward, but non-compliant] with HTML 5 standards&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/&amp;lt;/ref&amp;gt; in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML 5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/servo/servo Servo] is a [https://en.wikipedia.org/wiki/Web_browser web browser] layout engine written in [https://www.mozilla.org/en-US/?v=b Mozilla]'s new [https://en.wikipedia.org/wiki/System_programming_language systems language] [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust]&amp;lt;ref&amp;gt;https://servo.org/&amp;lt;/ref&amp;gt;. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism&amp;lt;ref&amp;gt;https://www.usenix.org/legacy/event/hotpar09/tech/full_papers/jones/jones.pdf&amp;lt;/ref&amp;gt;, security&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Browser_security&amp;lt;/ref&amp;gt;, modularity&amp;lt;ref&amp;gt;https://msdn.microsoft.com/en-us/library/ff709921.aspx&amp;lt;/ref&amp;gt; and performance. The Servo project is [https://en.wikipedia.org/wiki/Open-source_software open sourced] and receives contributions from individual contributors from around the globe. It currently supports [https://www.linux.com/ Linux], [http://www.apple.com/osx/ OS X], [https://www.microsoft.com/en-us/windows Windows], [https://www.android.com/ Android], and [https://en.wikipedia.org/wiki/Gonk Gonk] (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;. Rust is a [https://en.wikipedia.org/wiki/General-purpose_programming_language general-purpose], [https://developer.mozilla.org/ar/docs/multiparadigmlanguage.html multi-paradigm], [https://en.wikipedia.org/wiki/Compiled_language compiled programming] language, supporting pure-functional, imperative-procedural, and object-oriented styles&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The detailed description of the project can be found [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
===Compilation and Build===&lt;br /&gt;
* The first step is to compile Servo browser and build it on a local machine. The steps for compiling and building Servo are:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
compile Servo and ensure that it runs tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
===Initial Steps===&lt;br /&gt;
The initial steps for the project were completed as a part of OSS project 2. The functionalities implemented were:&lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
The subsequent steps for the project are to be implemented as a part of final semester project. The steps to do are:&lt;br /&gt;
* Replace the code in htmlimageelement.rs that instructs the image cache to fetch a URL with code that directly performs a network request (see HTMLScriptElement::prepare for an example that uses the NetworkListener helper and Document::load_async). The result should be sent to the image cache using the newly-added command. &lt;br /&gt;
* Implement the parse a srcset attribute algorithm by defining a parse_a_srcset_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs (./mach test-unit -p script/dom/htmlimageelement).  &lt;br /&gt;
* Implement the parse a sizes attribute algorithm by defining a parse_a_sizes_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs.&lt;br /&gt;
* Implement the normalize the source densities algorithm - create data types for source set and image source.&lt;br /&gt;
* Implement the update the source set algorithm by defining a update_the_source_set function in htmlimageelement.rs.&lt;br /&gt;
* Implement the select an image source algorithm by defining a select_an_image_source function in htmlimageelement.rs.&lt;br /&gt;
&lt;br /&gt;
==Design Principles==&lt;br /&gt;
&lt;br /&gt;
There were no particular design principles used in this project as it was a modification of existing code. .&lt;br /&gt;
&lt;br /&gt;
We were not supposed to modify the existing design apart from adding a new behaviour/ability for HTMLImageElement. The same principals of the original Servo code can be thought of as being followed by the project.&lt;br /&gt;
The main aim was to increase the code coverage and to make the Servo browser more compliant to HMTL 5 standards when it comes to image loading.&lt;br /&gt;
&lt;br /&gt;
We attempted to follow good OO practices throughout development. While using enums and also while defining new methods, we tried to follow the DRY principle in order to avoid repetition of code. Servo has it's own coding standards which are checked by running following command &lt;br /&gt;
&lt;br /&gt;
 ./mach test-tidy  &lt;br /&gt;
&lt;br /&gt;
Issues reported by test are to be fixed before pull request can be generated. This ensures that developers would adhere to coding standards. We have fixed all the issues reported by tidy-test.&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 [https://github.com/servo/servo/wiki/Image-load-conformance-student-project github page].&lt;br /&gt;
&lt;br /&gt;
====Step 1====&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ImageRequest.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:currentSrc.png]]&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
Since the change is in this single file Htmlimageelement.rs , we haven't made any class diagram , but provided flowcharts for the algorithms we are to implement. &lt;br /&gt;
====Step 1====&lt;br /&gt;
replace the code in  htmlimageelement.rs  that instructs the image cache to fetch a URL with code that directly performs a network request (see  HTMLScriptElement::prepare  for an example that uses the  NetworkListener  helper and  Document::load_async ). The result should be sent to the image cache using the newly-added command.&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
implement the parse a srcset attribute algorithm by defining a  parse_a_srcset_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs  ( ./mach test-unit -p script/dom/htmlimageelement )&lt;br /&gt;
&lt;br /&gt;
The flowchart of the above step is : &lt;br /&gt;
&lt;br /&gt;
[[File:parseAsrcset.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
implement the parse a sizes attribute algorithm by defining a  parse_a_sizes_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs .&lt;br /&gt;
[[File:parsasize.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 4====&lt;br /&gt;
implement the normalize the source densities algorithm - create data types for  source set  and  image source  &lt;br /&gt;
====Step 5====&lt;br /&gt;
implement the update the source set algorithm by defining a  update_the_source_set  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc_2.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 6====&lt;br /&gt;
implement the select an image source algorithm by defining a  select_an_image_source  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for HTMLImageElement:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/10134 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101913</id>
		<title>CSC/ECE 517 Spring 2016 M1602 Make image loads conform with the spec</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101913"/>
		<updated>2016-04-05T20:57:16Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Design Principles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTML5 HTML 5] specifies a complex model for image loading on a web browser. It has specifications&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/#the-picture-element&amp;lt;/ref&amp;gt; for [https://html.spec.whatwg.org/multipage/#the-picture-element picture element] as well as img element, and browsers need to follow these HTML 5 specifications to conform to the standard. Servo's current implementation of image loading is [http://mxr.mozilla.org/servo/source/components/script/dom/htmlimageelement.rs#107 straightforward, but non-compliant] with HTML 5 standards&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/&amp;lt;/ref&amp;gt; in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML 5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/servo/servo Servo] is a [https://en.wikipedia.org/wiki/Web_browser web browser] layout engine written in [https://www.mozilla.org/en-US/?v=b Mozilla]'s new [https://en.wikipedia.org/wiki/System_programming_language systems language] [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust]&amp;lt;ref&amp;gt;https://servo.org/&amp;lt;/ref&amp;gt;. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism&amp;lt;ref&amp;gt;https://www.usenix.org/legacy/event/hotpar09/tech/full_papers/jones/jones.pdf&amp;lt;/ref&amp;gt;, security&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Browser_security&amp;lt;/ref&amp;gt;, modularity&amp;lt;ref&amp;gt;https://msdn.microsoft.com/en-us/library/ff709921.aspx&amp;lt;/ref&amp;gt; and performance. The Servo project is [https://en.wikipedia.org/wiki/Open-source_software open sourced] and receives contributions from individual contributors from around the globe. It currently supports [https://www.linux.com/ Linux], [http://www.apple.com/osx/ OS X], [https://www.microsoft.com/en-us/windows Windows], [https://www.android.com/ Android], and [https://en.wikipedia.org/wiki/Gonk Gonk] (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;. Rust is a [https://en.wikipedia.org/wiki/General-purpose_programming_language general-purpose], [https://developer.mozilla.org/ar/docs/multiparadigmlanguage.html multi-paradigm], [https://en.wikipedia.org/wiki/Compiled_language compiled programming] language, supporting pure-functional, imperative-procedural, and object-oriented styles&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The detailed description of the project can be found [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
===Compilation and Build===&lt;br /&gt;
* The first step is to compile Servo browser and build it on a local machine. The steps for compiling and building Servo are:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
compile Servo and ensure that it runs tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
===Initial Steps===&lt;br /&gt;
The initial steps for the project were completed as a part of OSS project 2. The functionalities implemented were:&lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
The subsequent steps for the project are to be implemented as a part of final semester project. The steps to do are:&lt;br /&gt;
* Replace the code in htmlimageelement.rs that instructs the image cache to fetch a URL with code that directly performs a network request (see HTMLScriptElement::prepare for an example that uses the NetworkListener helper and Document::load_async). The result should be sent to the image cache using the newly-added command. &lt;br /&gt;
* Implement the parse a srcset attribute algorithm by defining a parse_a_srcset_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs (./mach test-unit -p script/dom/htmlimageelement).  &lt;br /&gt;
* Implement the parse a sizes attribute algorithm by defining a parse_a_sizes_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs.&lt;br /&gt;
* Implement the normalize the source densities algorithm - create data types for source set and image source.&lt;br /&gt;
* Implement the update the source set algorithm by defining a update_the_source_set function in htmlimageelement.rs.&lt;br /&gt;
* Implement the select an image source algorithm by defining a select_an_image_source function in htmlimageelement.rs.&lt;br /&gt;
&lt;br /&gt;
==Design Principles==&lt;br /&gt;
&lt;br /&gt;
There were no particular design principles used in this project as it was a modification of existing code. .&lt;br /&gt;
&lt;br /&gt;
We were not supposed to modify the existing design apart from adding a new behaviour/ability for HTMLImageElement. The same principals of the original Servo code can be thought of as being followed by the project.&lt;br /&gt;
The main aim was to increase the code coverage and to make the Servo browser more compliant to HMTL 5 standards when it comes to image loading.&lt;br /&gt;
&lt;br /&gt;
We attempted to follow good OO practices throughout development. While using enums and also while defining new methods, we tried to follow the DRY principle in order to avoid repetition of code. Servo has it's own coding standards which are checked by running following command &lt;br /&gt;
&lt;br /&gt;
 ./mach test-tidy  &lt;br /&gt;
&lt;br /&gt;
Issues reported by test are to be fixed before pull request can be generated. This ensures that developers would adhere to coding standards. We have fixed all the issues reported by tidy-test.&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 [https://github.com/servo/servo/wiki/Image-load-conformance-student-project github page].&lt;br /&gt;
&lt;br /&gt;
====Step 1====&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ImageRequest.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:currentSrc.png]]&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
Since the change is in this single file Htmlimageelement.rs , we haven't made any class diagram , but provided flowcharts for the algorithms we are to implement. &lt;br /&gt;
====Step 1====&lt;br /&gt;
replace the code in  htmlimageelement.rs  that instructs the image cache to fetch a URL with code that directly performs a network request (see  HTMLScriptElement::prepare  for an example that uses the  NetworkListener  helper and  Document::load_async ). The result should be sent to the image cache using the newly-added command.&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
implement the parse a srcset attribute algorithm by defining a  parse_a_srcset_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs  ( ./mach test-unit -p script/dom/htmlimageelement )&lt;br /&gt;
&lt;br /&gt;
The flowchart of the above step is : &lt;br /&gt;
&lt;br /&gt;
[[File:parseAsrcset.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
implement the parse a sizes attribute algorithm by defining a  parse_a_sizes_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs .&lt;br /&gt;
====Step 4====&lt;br /&gt;
implement the normalize the source densities algorithm - create data types for  source set  and  image source  &lt;br /&gt;
====Step 5====&lt;br /&gt;
implement the update the source set algorithm by defining a  update_the_source_set  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc_2.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 6====&lt;br /&gt;
implement the select an image source algorithm by defining a  select_an_image_source  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for HTMLImageElement:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/10134 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101912</id>
		<title>CSC/ECE 517 Spring 2016 M1602 Make image loads conform with the spec</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101912"/>
		<updated>2016-04-05T20:55:12Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Subsequent Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTML5 HTML 5] specifies a complex model for image loading on a web browser. It has specifications&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/#the-picture-element&amp;lt;/ref&amp;gt; for [https://html.spec.whatwg.org/multipage/#the-picture-element picture element] as well as img element, and browsers need to follow these HTML 5 specifications to conform to the standard. Servo's current implementation of image loading is [http://mxr.mozilla.org/servo/source/components/script/dom/htmlimageelement.rs#107 straightforward, but non-compliant] with HTML 5 standards&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/&amp;lt;/ref&amp;gt; in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML 5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/servo/servo Servo] is a [https://en.wikipedia.org/wiki/Web_browser web browser] layout engine written in [https://www.mozilla.org/en-US/?v=b Mozilla]'s new [https://en.wikipedia.org/wiki/System_programming_language systems language] [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust]&amp;lt;ref&amp;gt;https://servo.org/&amp;lt;/ref&amp;gt;. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism&amp;lt;ref&amp;gt;https://www.usenix.org/legacy/event/hotpar09/tech/full_papers/jones/jones.pdf&amp;lt;/ref&amp;gt;, security&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Browser_security&amp;lt;/ref&amp;gt;, modularity&amp;lt;ref&amp;gt;https://msdn.microsoft.com/en-us/library/ff709921.aspx&amp;lt;/ref&amp;gt; and performance. The Servo project is [https://en.wikipedia.org/wiki/Open-source_software open sourced] and receives contributions from individual contributors from around the globe. It currently supports [https://www.linux.com/ Linux], [http://www.apple.com/osx/ OS X], [https://www.microsoft.com/en-us/windows Windows], [https://www.android.com/ Android], and [https://en.wikipedia.org/wiki/Gonk Gonk] (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;. Rust is a [https://en.wikipedia.org/wiki/General-purpose_programming_language general-purpose], [https://developer.mozilla.org/ar/docs/multiparadigmlanguage.html multi-paradigm], [https://en.wikipedia.org/wiki/Compiled_language compiled programming] language, supporting pure-functional, imperative-procedural, and object-oriented styles&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The detailed description of the project can be found [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
===Compilation and Build===&lt;br /&gt;
* The first step is to compile Servo browser and build it on a local machine. The steps for compiling and building Servo are:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
compile Servo and ensure that it runs tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
===Initial Steps===&lt;br /&gt;
The initial steps for the project were completed as a part of OSS project 2. The functionalities implemented were:&lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
The subsequent steps for the project are to be implemented as a part of final semester project. The steps to do are:&lt;br /&gt;
* Replace the code in htmlimageelement.rs that instructs the image cache to fetch a URL with code that directly performs a network request (see HTMLScriptElement::prepare for an example that uses the NetworkListener helper and Document::load_async). The result should be sent to the image cache using the newly-added command. &lt;br /&gt;
* Implement the parse a srcset attribute algorithm by defining a parse_a_srcset_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs (./mach test-unit -p script/dom/htmlimageelement).  &lt;br /&gt;
* Implement the parse a sizes attribute algorithm by defining a parse_a_sizes_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs.&lt;br /&gt;
* Implement the normalize the source densities algorithm - create data types for source set and image source.&lt;br /&gt;
* Implement the update the source set algorithm by defining a update_the_source_set function in htmlimageelement.rs.&lt;br /&gt;
* Implement the select an image source algorithm by defining a select_an_image_source function in htmlimageelement.rs.&lt;br /&gt;
&lt;br /&gt;
==Design Principles==&lt;br /&gt;
&lt;br /&gt;
There were no particular design principles used in this project as it was a modification of existing code. The same principals of the original Servo code can be thought of as being followed by the project. The main aim was to increase the code coverage and to make the Servo browser more compliant to HMTL 5 standards when it comes to image loading.&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 [https://github.com/servo/servo/wiki/Image-load-conformance-student-project github page].&lt;br /&gt;
&lt;br /&gt;
====Step 1====&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ImageRequest.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:currentSrc.png]]&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
Since the change is in this single file Htmlimageelement.rs , we haven't made any class diagram , but provided flowcharts for the algorithms we are to implement. &lt;br /&gt;
====Step 1====&lt;br /&gt;
replace the code in  htmlimageelement.rs  that instructs the image cache to fetch a URL with code that directly performs a network request (see  HTMLScriptElement::prepare  for an example that uses the  NetworkListener  helper and  Document::load_async ). The result should be sent to the image cache using the newly-added command.&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
implement the parse a srcset attribute algorithm by defining a  parse_a_srcset_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs  ( ./mach test-unit -p script/dom/htmlimageelement )&lt;br /&gt;
&lt;br /&gt;
The flowchart of the above step is : &lt;br /&gt;
&lt;br /&gt;
[[File:parseAsrcset.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
implement the parse a sizes attribute algorithm by defining a  parse_a_sizes_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs .&lt;br /&gt;
====Step 4====&lt;br /&gt;
implement the normalize the source densities algorithm - create data types for  source set  and  image source  &lt;br /&gt;
====Step 5====&lt;br /&gt;
implement the update the source set algorithm by defining a  update_the_source_set  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc_2.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 6====&lt;br /&gt;
implement the select an image source algorithm by defining a  select_an_image_source  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for HTMLImageElement:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/10134 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Updatesrc_2.png&amp;diff=101911</id>
		<title>File:Updatesrc 2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Updatesrc_2.png&amp;diff=101911"/>
		<updated>2016-04-05T20:48:26Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101910</id>
		<title>CSC/ECE 517 Spring 2016 M1602 Make image loads conform with the spec</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101910"/>
		<updated>2016-04-05T20:48:17Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Step 5 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTML5 HTML 5] specifies a complex model for image loading on a web browser. It has specifications&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/#the-picture-element&amp;lt;/ref&amp;gt; for [https://html.spec.whatwg.org/multipage/#the-picture-element picture element] as well as img element, and browsers need to follow these HTML 5 specifications to conform to the standard. Servo's current implementation of image loading is [http://mxr.mozilla.org/servo/source/components/script/dom/htmlimageelement.rs#107 straightforward, but non-compliant] with HTML 5 standards&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/&amp;lt;/ref&amp;gt; in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML 5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/servo/servo Servo] is a [https://en.wikipedia.org/wiki/Web_browser web browser] layout engine written in [https://www.mozilla.org/en-US/?v=b Mozilla]'s new [https://en.wikipedia.org/wiki/System_programming_language systems language] [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust]&amp;lt;ref&amp;gt;https://servo.org/&amp;lt;/ref&amp;gt;. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism&amp;lt;ref&amp;gt;https://www.usenix.org/legacy/event/hotpar09/tech/full_papers/jones/jones.pdf&amp;lt;/ref&amp;gt;, security&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Browser_security&amp;lt;/ref&amp;gt;, modularity&amp;lt;ref&amp;gt;https://msdn.microsoft.com/en-us/library/ff709921.aspx&amp;lt;/ref&amp;gt; and performance. The Servo project is [https://en.wikipedia.org/wiki/Open-source_software open sourced] and receives contributions from individual contributors from around the globe. It currently supports [https://www.linux.com/ Linux], [http://www.apple.com/osx/ OS X], [https://www.microsoft.com/en-us/windows Windows], [https://www.android.com/ Android], and [https://en.wikipedia.org/wiki/Gonk Gonk] (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;. Rust is a [https://en.wikipedia.org/wiki/General-purpose_programming_language general-purpose], [https://developer.mozilla.org/ar/docs/multiparadigmlanguage.html multi-paradigm], [https://en.wikipedia.org/wiki/Compiled_language compiled programming] language, supporting pure-functional, imperative-procedural, and object-oriented styles&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The detailed description of the project can be found [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
===Compilation and Build===&lt;br /&gt;
* The first step is to compile Servo browser and build it on a local machine. The steps for compiling and building Servo are:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
compile Servo and ensure that it runs tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
===Initial Steps===&lt;br /&gt;
The initial steps for the project were completed as a part of OSS project 2. The functionalities implemented were:&lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
The subsequent steps for the project are to be implemented as a part of final semester project. The steps to do are:&lt;br /&gt;
* Replace the code in htmlimageelement.rs that instructs the image cache to fetch a URL with code that directly performs a network request (see HTMLScriptElement::prepare for an example that uses the NetworkListener helper and Document::load_async). The result should be sent to the image cache using the newly-added command. &lt;br /&gt;
* Implement the parse a srcset attribute algorithm by defining a parse_a_srcset_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs (./mach test-unit -p script/dom/htmlimageelement).  &lt;br /&gt;
* Implement the parse a sizes attribute algorithm by defining a parse_a_sizes_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs.&lt;br /&gt;
* Implement the normalize the source densities algorithm - create data types for source set and image source.&lt;br /&gt;
* Implement the update the source set algorithm by defining a update_the_source_set function in htmlimageelement.rs.&lt;br /&gt;
* Implement the select an image source algorithm by defining a select_an_image_source function in htmlimageelement.rs.&lt;br /&gt;
&lt;br /&gt;
==Design Principles==&lt;br /&gt;
&lt;br /&gt;
There were no particular design principles used in this project as it was a modification of existing code. The same principals of the original Servo code can be thought of as being followed by the project. The main aim was to increase the code coverage and to make the Servo browser more compliant to HMTL 5 standards when it comes to image loading.&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 [https://github.com/servo/servo/wiki/Image-load-conformance-student-project github page].&lt;br /&gt;
&lt;br /&gt;
====Step 1====&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ImageRequest.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:currentSrc.png]]&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
====Step 1====&lt;br /&gt;
replace the code in  htmlimageelement.rs  that instructs the image cache to fetch a URL with code that directly performs a network request (see  HTMLScriptElement::prepare  for an example that uses the  NetworkListener  helper and  Document::load_async ). The result should be sent to the image cache using the newly-added command.&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
implement the parse a srcset attribute algorithm by defining a  parse_a_srcset_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs  ( ./mach test-unit -p script/dom/htmlimageelement )&lt;br /&gt;
&lt;br /&gt;
The flowchart of the above step is : &lt;br /&gt;
&lt;br /&gt;
[[File:parseAsrcset.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
implement the parse a sizes attribute algorithm by defining a  parse_a_sizes_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs .&lt;br /&gt;
====Step 4====&lt;br /&gt;
implement the normalize the source densities algorithm - create data types for  source set  and  image source  &lt;br /&gt;
====Step 5====&lt;br /&gt;
implement the update the source set algorithm by defining a  update_the_source_set  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc_2.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 6====&lt;br /&gt;
implement the select an image source algorithm by defining a  select_an_image_source  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for HTMLImageElement:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/10134 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Updatesrc.png&amp;diff=101909</id>
		<title>File:Updatesrc.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Updatesrc.png&amp;diff=101909"/>
		<updated>2016-04-05T20:45:20Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101908</id>
		<title>CSC/ECE 517 Spring 2016 M1602 Make image loads conform with the spec</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101908"/>
		<updated>2016-04-05T20:45:11Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Step 5 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTML5 HTML 5] specifies a complex model for image loading on a web browser. It has specifications&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/#the-picture-element&amp;lt;/ref&amp;gt; for [https://html.spec.whatwg.org/multipage/#the-picture-element picture element] as well as img element, and browsers need to follow these HTML 5 specifications to conform to the standard. Servo's current implementation of image loading is [http://mxr.mozilla.org/servo/source/components/script/dom/htmlimageelement.rs#107 straightforward, but non-compliant] with HTML 5 standards&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/&amp;lt;/ref&amp;gt; in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML 5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/servo/servo Servo] is a [https://en.wikipedia.org/wiki/Web_browser web browser] layout engine written in [https://www.mozilla.org/en-US/?v=b Mozilla]'s new [https://en.wikipedia.org/wiki/System_programming_language systems language] [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust]&amp;lt;ref&amp;gt;https://servo.org/&amp;lt;/ref&amp;gt;. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism&amp;lt;ref&amp;gt;https://www.usenix.org/legacy/event/hotpar09/tech/full_papers/jones/jones.pdf&amp;lt;/ref&amp;gt;, security&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Browser_security&amp;lt;/ref&amp;gt;, modularity&amp;lt;ref&amp;gt;https://msdn.microsoft.com/en-us/library/ff709921.aspx&amp;lt;/ref&amp;gt; and performance. The Servo project is [https://en.wikipedia.org/wiki/Open-source_software open sourced] and receives contributions from individual contributors from around the globe. It currently supports [https://www.linux.com/ Linux], [http://www.apple.com/osx/ OS X], [https://www.microsoft.com/en-us/windows Windows], [https://www.android.com/ Android], and [https://en.wikipedia.org/wiki/Gonk Gonk] (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;. Rust is a [https://en.wikipedia.org/wiki/General-purpose_programming_language general-purpose], [https://developer.mozilla.org/ar/docs/multiparadigmlanguage.html multi-paradigm], [https://en.wikipedia.org/wiki/Compiled_language compiled programming] language, supporting pure-functional, imperative-procedural, and object-oriented styles&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The detailed description of the project can be found [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
===Compilation and Build===&lt;br /&gt;
* The first step is to compile Servo browser and build it on a local machine. The steps for compiling and building Servo are:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
compile Servo and ensure that it runs tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
===Initial Steps===&lt;br /&gt;
The initial steps for the project were completed as a part of OSS project 2. The functionalities implemented were:&lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
The subsequent steps for the project are to be implemented as a part of final semester project. The steps to do are:&lt;br /&gt;
* Replace the code in htmlimageelement.rs that instructs the image cache to fetch a URL with code that directly performs a network request (see HTMLScriptElement::prepare for an example that uses the NetworkListener helper and Document::load_async). The result should be sent to the image cache using the newly-added command. &lt;br /&gt;
* Implement the parse a srcset attribute algorithm by defining a parse_a_srcset_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs (./mach test-unit -p script/dom/htmlimageelement).  &lt;br /&gt;
* Implement the parse a sizes attribute algorithm by defining a parse_a_sizes_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs.&lt;br /&gt;
* Implement the normalize the source densities algorithm - create data types for source set and image source.&lt;br /&gt;
* Implement the update the source set algorithm by defining a update_the_source_set function in htmlimageelement.rs.&lt;br /&gt;
* Implement the select an image source algorithm by defining a select_an_image_source function in htmlimageelement.rs.&lt;br /&gt;
&lt;br /&gt;
==Design Principles==&lt;br /&gt;
&lt;br /&gt;
There were no particular design principles used in this project as it was a modification of existing code. The same principals of the original Servo code can be thought of as being followed by the project. The main aim was to increase the code coverage and to make the Servo browser more compliant to HMTL 5 standards when it comes to image loading.&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 [https://github.com/servo/servo/wiki/Image-load-conformance-student-project github page].&lt;br /&gt;
&lt;br /&gt;
====Step 1====&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ImageRequest.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:currentSrc.png]]&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
====Step 1====&lt;br /&gt;
replace the code in  htmlimageelement.rs  that instructs the image cache to fetch a URL with code that directly performs a network request (see  HTMLScriptElement::prepare  for an example that uses the  NetworkListener  helper and  Document::load_async ). The result should be sent to the image cache using the newly-added command.&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
implement the parse a srcset attribute algorithm by defining a  parse_a_srcset_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs  ( ./mach test-unit -p script/dom/htmlimageelement )&lt;br /&gt;
&lt;br /&gt;
The flowchart of the above step is : &lt;br /&gt;
&lt;br /&gt;
[[File:parseAsrcset.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
implement the parse a sizes attribute algorithm by defining a  parse_a_sizes_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs .&lt;br /&gt;
====Step 4====&lt;br /&gt;
implement the normalize the source densities algorithm - create data types for  source set  and  image source  &lt;br /&gt;
====Step 5====&lt;br /&gt;
implement the update the source set algorithm by defining a  update_the_source_set  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 6====&lt;br /&gt;
implement the select an image source algorithm by defining a  select_an_image_source  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for HTMLImageElement:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/10134 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Updatesrc.jpg&amp;diff=101907</id>
		<title>File:Updatesrc.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Updatesrc.jpg&amp;diff=101907"/>
		<updated>2016-04-05T20:40:21Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: uploaded a new version of &amp;amp;quot;File:Updatesrc.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Updatesrc.jpg&amp;diff=101906</id>
		<title>File:Updatesrc.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Updatesrc.jpg&amp;diff=101906"/>
		<updated>2016-04-05T20:37:55Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101905</id>
		<title>CSC/ECE 517 Spring 2016 M1602 Make image loads conform with the spec</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101905"/>
		<updated>2016-04-05T20:37:43Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Step 5 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTML5 HTML 5] specifies a complex model for image loading on a web browser. It has specifications&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/#the-picture-element&amp;lt;/ref&amp;gt; for [https://html.spec.whatwg.org/multipage/#the-picture-element picture element] as well as img element, and browsers need to follow these HTML 5 specifications to conform to the standard. Servo's current implementation of image loading is [http://mxr.mozilla.org/servo/source/components/script/dom/htmlimageelement.rs#107 straightforward, but non-compliant] with HTML 5 standards&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/&amp;lt;/ref&amp;gt; in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML 5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/servo/servo Servo] is a [https://en.wikipedia.org/wiki/Web_browser web browser] layout engine written in [https://www.mozilla.org/en-US/?v=b Mozilla]'s new [https://en.wikipedia.org/wiki/System_programming_language systems language] [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust]&amp;lt;ref&amp;gt;https://servo.org/&amp;lt;/ref&amp;gt;. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism&amp;lt;ref&amp;gt;https://www.usenix.org/legacy/event/hotpar09/tech/full_papers/jones/jones.pdf&amp;lt;/ref&amp;gt;, security&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Browser_security&amp;lt;/ref&amp;gt;, modularity&amp;lt;ref&amp;gt;https://msdn.microsoft.com/en-us/library/ff709921.aspx&amp;lt;/ref&amp;gt; and performance. The Servo project is [https://en.wikipedia.org/wiki/Open-source_software open sourced] and receives contributions from individual contributors from around the globe. It currently supports [https://www.linux.com/ Linux], [http://www.apple.com/osx/ OS X], [https://www.microsoft.com/en-us/windows Windows], [https://www.android.com/ Android], and [https://en.wikipedia.org/wiki/Gonk Gonk] (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;. Rust is a [https://en.wikipedia.org/wiki/General-purpose_programming_language general-purpose], [https://developer.mozilla.org/ar/docs/multiparadigmlanguage.html multi-paradigm], [https://en.wikipedia.org/wiki/Compiled_language compiled programming] language, supporting pure-functional, imperative-procedural, and object-oriented styles&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The detailed description of the project can be found [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
===Compilation and Build===&lt;br /&gt;
* The first step is to compile Servo browser and build it on a local machine. The steps for compiling and building Servo are:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
compile Servo and ensure that it runs tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
===Initial Steps===&lt;br /&gt;
The initial steps for the project were completed as a part of OSS project 2. The functionalities implemented were:&lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
The subsequent steps for the project are to be implemented as a part of final semester project. The steps to do are:&lt;br /&gt;
* Replace the code in htmlimageelement.rs that instructs the image cache to fetch a URL with code that directly performs a network request (see HTMLScriptElement::prepare for an example that uses the NetworkListener helper and Document::load_async). The result should be sent to the image cache using the newly-added command. &lt;br /&gt;
* Implement the parse a srcset attribute algorithm by defining a parse_a_srcset_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs (./mach test-unit -p script/dom/htmlimageelement).  &lt;br /&gt;
* Implement the parse a sizes attribute algorithm by defining a parse_a_sizes_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs.&lt;br /&gt;
* Implement the normalize the source densities algorithm - create data types for source set and image source.&lt;br /&gt;
* Implement the update the source set algorithm by defining a update_the_source_set function in htmlimageelement.rs.&lt;br /&gt;
* Implement the select an image source algorithm by defining a select_an_image_source function in htmlimageelement.rs.&lt;br /&gt;
&lt;br /&gt;
==Design Principles==&lt;br /&gt;
&lt;br /&gt;
There were no particular design principles used in this project as it was a modification of existing code. The same principals of the original Servo code can be thought of as being followed by the project. The main aim was to increase the code coverage and to make the Servo browser more compliant to HMTL 5 standards when it comes to image loading.&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 [https://github.com/servo/servo/wiki/Image-load-conformance-student-project github page].&lt;br /&gt;
&lt;br /&gt;
====Step 1====&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ImageRequest.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:currentSrc.png]]&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
====Step 1====&lt;br /&gt;
replace the code in  htmlimageelement.rs  that instructs the image cache to fetch a URL with code that directly performs a network request (see  HTMLScriptElement::prepare  for an example that uses the  NetworkListener  helper and  Document::load_async ). The result should be sent to the image cache using the newly-added command.&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
implement the parse a srcset attribute algorithm by defining a  parse_a_srcset_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs  ( ./mach test-unit -p script/dom/htmlimageelement )&lt;br /&gt;
&lt;br /&gt;
The flowchart of the above step is : &lt;br /&gt;
&lt;br /&gt;
[[File:parseAsrcset.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
implement the parse a sizes attribute algorithm by defining a  parse_a_sizes_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs .&lt;br /&gt;
====Step 4====&lt;br /&gt;
implement the normalize the source densities algorithm - create data types for  source set  and  image source  &lt;br /&gt;
====Step 5====&lt;br /&gt;
implement the update the source set algorithm by defining a  update_the_source_set  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
[[File:updatesrc.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Step 6====&lt;br /&gt;
implement the select an image source algorithm by defining a  select_an_image_source  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for HTMLImageElement:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/10134 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101904</id>
		<title>CSC/ECE 517 Spring 2016 M1602 Make image loads conform with the spec</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101904"/>
		<updated>2016-04-05T20:37:34Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Step 5 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTML5 HTML 5] specifies a complex model for image loading on a web browser. It has specifications&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/#the-picture-element&amp;lt;/ref&amp;gt; for [https://html.spec.whatwg.org/multipage/#the-picture-element picture element] as well as img element, and browsers need to follow these HTML 5 specifications to conform to the standard. Servo's current implementation of image loading is [http://mxr.mozilla.org/servo/source/components/script/dom/htmlimageelement.rs#107 straightforward, but non-compliant] with HTML 5 standards&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/&amp;lt;/ref&amp;gt; in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML 5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/servo/servo Servo] is a [https://en.wikipedia.org/wiki/Web_browser web browser] layout engine written in [https://www.mozilla.org/en-US/?v=b Mozilla]'s new [https://en.wikipedia.org/wiki/System_programming_language systems language] [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust]&amp;lt;ref&amp;gt;https://servo.org/&amp;lt;/ref&amp;gt;. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism&amp;lt;ref&amp;gt;https://www.usenix.org/legacy/event/hotpar09/tech/full_papers/jones/jones.pdf&amp;lt;/ref&amp;gt;, security&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Browser_security&amp;lt;/ref&amp;gt;, modularity&amp;lt;ref&amp;gt;https://msdn.microsoft.com/en-us/library/ff709921.aspx&amp;lt;/ref&amp;gt; and performance. The Servo project is [https://en.wikipedia.org/wiki/Open-source_software open sourced] and receives contributions from individual contributors from around the globe. It currently supports [https://www.linux.com/ Linux], [http://www.apple.com/osx/ OS X], [https://www.microsoft.com/en-us/windows Windows], [https://www.android.com/ Android], and [https://en.wikipedia.org/wiki/Gonk Gonk] (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;. Rust is a [https://en.wikipedia.org/wiki/General-purpose_programming_language general-purpose], [https://developer.mozilla.org/ar/docs/multiparadigmlanguage.html multi-paradigm], [https://en.wikipedia.org/wiki/Compiled_language compiled programming] language, supporting pure-functional, imperative-procedural, and object-oriented styles&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The detailed description of the project can be found [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
===Compilation and Build===&lt;br /&gt;
* The first step is to compile Servo browser and build it on a local machine. The steps for compiling and building Servo are:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
compile Servo and ensure that it runs tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
===Initial Steps===&lt;br /&gt;
The initial steps for the project were completed as a part of OSS project 2. The functionalities implemented were:&lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
The subsequent steps for the project are to be implemented as a part of final semester project. The steps to do are:&lt;br /&gt;
* Replace the code in htmlimageelement.rs that instructs the image cache to fetch a URL with code that directly performs a network request (see HTMLScriptElement::prepare for an example that uses the NetworkListener helper and Document::load_async). The result should be sent to the image cache using the newly-added command. &lt;br /&gt;
* Implement the parse a srcset attribute algorithm by defining a parse_a_srcset_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs (./mach test-unit -p script/dom/htmlimageelement).  &lt;br /&gt;
* Implement the parse a sizes attribute algorithm by defining a parse_a_sizes_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs.&lt;br /&gt;
* Implement the normalize the source densities algorithm - create data types for source set and image source.&lt;br /&gt;
* Implement the update the source set algorithm by defining a update_the_source_set function in htmlimageelement.rs.&lt;br /&gt;
* Implement the select an image source algorithm by defining a select_an_image_source function in htmlimageelement.rs.&lt;br /&gt;
&lt;br /&gt;
==Design Principles==&lt;br /&gt;
&lt;br /&gt;
There were no particular design principles used in this project as it was a modification of existing code. The same principals of the original Servo code can be thought of as being followed by the project. The main aim was to increase the code coverage and to make the Servo browser more compliant to HMTL 5 standards when it comes to image loading.&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 [https://github.com/servo/servo/wiki/Image-load-conformance-student-project github page].&lt;br /&gt;
&lt;br /&gt;
====Step 1====&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ImageRequest.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:currentSrc.png]]&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
====Step 1====&lt;br /&gt;
replace the code in  htmlimageelement.rs  that instructs the image cache to fetch a URL with code that directly performs a network request (see  HTMLScriptElement::prepare  for an example that uses the  NetworkListener  helper and  Document::load_async ). The result should be sent to the image cache using the newly-added command.&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
implement the parse a srcset attribute algorithm by defining a  parse_a_srcset_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs  ( ./mach test-unit -p script/dom/htmlimageelement )&lt;br /&gt;
&lt;br /&gt;
The flowchart of the above step is : &lt;br /&gt;
&lt;br /&gt;
[[File:parseAsrcset.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
implement the parse a sizes attribute algorithm by defining a  parse_a_sizes_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs .&lt;br /&gt;
====Step 4====&lt;br /&gt;
implement the normalize the source densities algorithm - create data types for  source set  and  image source  &lt;br /&gt;
====Step 5====&lt;br /&gt;
implement the update the source set algorithm by defining a  update_the_source_set  function in  htmlimageelement.rs&lt;br /&gt;
[[File:updatesrc.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Step 6====&lt;br /&gt;
implement the select an image source algorithm by defining a  select_an_image_source  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for HTMLImageElement:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/10134 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101903</id>
		<title>CSC/ECE 517 Spring 2016 M1602 Make image loads conform with the spec</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101903"/>
		<updated>2016-04-05T20:36:38Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Step 5 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTML5 HTML 5] specifies a complex model for image loading on a web browser. It has specifications&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/#the-picture-element&amp;lt;/ref&amp;gt; for [https://html.spec.whatwg.org/multipage/#the-picture-element picture element] as well as img element, and browsers need to follow these HTML 5 specifications to conform to the standard. Servo's current implementation of image loading is [http://mxr.mozilla.org/servo/source/components/script/dom/htmlimageelement.rs#107 straightforward, but non-compliant] with HTML 5 standards&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/&amp;lt;/ref&amp;gt; in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML 5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/servo/servo Servo] is a [https://en.wikipedia.org/wiki/Web_browser web browser] layout engine written in [https://www.mozilla.org/en-US/?v=b Mozilla]'s new [https://en.wikipedia.org/wiki/System_programming_language systems language] [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust]&amp;lt;ref&amp;gt;https://servo.org/&amp;lt;/ref&amp;gt;. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism&amp;lt;ref&amp;gt;https://www.usenix.org/legacy/event/hotpar09/tech/full_papers/jones/jones.pdf&amp;lt;/ref&amp;gt;, security&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Browser_security&amp;lt;/ref&amp;gt;, modularity&amp;lt;ref&amp;gt;https://msdn.microsoft.com/en-us/library/ff709921.aspx&amp;lt;/ref&amp;gt; and performance. The Servo project is [https://en.wikipedia.org/wiki/Open-source_software open sourced] and receives contributions from individual contributors from around the globe. It currently supports [https://www.linux.com/ Linux], [http://www.apple.com/osx/ OS X], [https://www.microsoft.com/en-us/windows Windows], [https://www.android.com/ Android], and [https://en.wikipedia.org/wiki/Gonk Gonk] (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;. Rust is a [https://en.wikipedia.org/wiki/General-purpose_programming_language general-purpose], [https://developer.mozilla.org/ar/docs/multiparadigmlanguage.html multi-paradigm], [https://en.wikipedia.org/wiki/Compiled_language compiled programming] language, supporting pure-functional, imperative-procedural, and object-oriented styles&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The detailed description of the project can be found [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
===Compilation and Build===&lt;br /&gt;
* The first step is to compile Servo browser and build it on a local machine. The steps for compiling and building Servo are:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
compile Servo and ensure that it runs tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
===Initial Steps===&lt;br /&gt;
The initial steps for the project were completed as a part of OSS project 2. The functionalities implemented were:&lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
The subsequent steps for the project are to be implemented as a part of final semester project. The steps to do are:&lt;br /&gt;
* Replace the code in htmlimageelement.rs that instructs the image cache to fetch a URL with code that directly performs a network request (see HTMLScriptElement::prepare for an example that uses the NetworkListener helper and Document::load_async). The result should be sent to the image cache using the newly-added command. &lt;br /&gt;
* Implement the parse a srcset attribute algorithm by defining a parse_a_srcset_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs (./mach test-unit -p script/dom/htmlimageelement).  &lt;br /&gt;
* Implement the parse a sizes attribute algorithm by defining a parse_a_sizes_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs.&lt;br /&gt;
* Implement the normalize the source densities algorithm - create data types for source set and image source.&lt;br /&gt;
* Implement the update the source set algorithm by defining a update_the_source_set function in htmlimageelement.rs.&lt;br /&gt;
* Implement the select an image source algorithm by defining a select_an_image_source function in htmlimageelement.rs.&lt;br /&gt;
&lt;br /&gt;
==Design Principles==&lt;br /&gt;
&lt;br /&gt;
There were no particular design principles used in this project as it was a modification of existing code. The same principals of the original Servo code can be thought of as being followed by the project. The main aim was to increase the code coverage and to make the Servo browser more compliant to HMTL 5 standards when it comes to image loading.&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 [https://github.com/servo/servo/wiki/Image-load-conformance-student-project github page].&lt;br /&gt;
&lt;br /&gt;
====Step 1====&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ImageRequest.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:currentSrc.png]]&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
====Step 1====&lt;br /&gt;
replace the code in  htmlimageelement.rs  that instructs the image cache to fetch a URL with code that directly performs a network request (see  HTMLScriptElement::prepare  for an example that uses the  NetworkListener  helper and  Document::load_async ). The result should be sent to the image cache using the newly-added command.&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
implement the parse a srcset attribute algorithm by defining a  parse_a_srcset_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs  ( ./mach test-unit -p script/dom/htmlimageelement )&lt;br /&gt;
&lt;br /&gt;
The flowchart of the above step is : &lt;br /&gt;
&lt;br /&gt;
[[File:parseAsrcset.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
implement the parse a sizes attribute algorithm by defining a  parse_a_sizes_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs .&lt;br /&gt;
====Step 4====&lt;br /&gt;
implement the normalize the source densities algorithm - create data types for  source set  and  image source  &lt;br /&gt;
====Step 5====&lt;br /&gt;
implement the update the source set algorithm by defining a  update_the_source_set  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
[[update_Src.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Step 6====&lt;br /&gt;
implement the select an image source algorithm by defining a  select_an_image_source  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for HTMLImageElement:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/10134 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ParseAsrcset.jpg&amp;diff=101902</id>
		<title>File:ParseAsrcset.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ParseAsrcset.jpg&amp;diff=101902"/>
		<updated>2016-04-05T20:33:45Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: uploaded a new version of &amp;amp;quot;File:ParseAsrcset.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ParseAsrcset.jpg&amp;diff=101901</id>
		<title>File:ParseAsrcset.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ParseAsrcset.jpg&amp;diff=101901"/>
		<updated>2016-04-05T20:29:01Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101900</id>
		<title>CSC/ECE 517 Spring 2016 M1602 Make image loads conform with the spec</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101900"/>
		<updated>2016-04-05T20:28:53Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Step 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTML5 HTML 5] specifies a complex model for image loading on a web browser. It has specifications&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/#the-picture-element&amp;lt;/ref&amp;gt; for [https://html.spec.whatwg.org/multipage/#the-picture-element picture element] as well as img element, and browsers need to follow these HTML 5 specifications to conform to the standard. Servo's current implementation of image loading is [http://mxr.mozilla.org/servo/source/components/script/dom/htmlimageelement.rs#107 straightforward, but non-compliant] with HTML 5 standards&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/&amp;lt;/ref&amp;gt; in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML 5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/servo/servo Servo] is a [https://en.wikipedia.org/wiki/Web_browser web browser] layout engine written in [https://www.mozilla.org/en-US/?v=b Mozilla]'s new [https://en.wikipedia.org/wiki/System_programming_language systems language] [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust]&amp;lt;ref&amp;gt;https://servo.org/&amp;lt;/ref&amp;gt;. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism&amp;lt;ref&amp;gt;https://www.usenix.org/legacy/event/hotpar09/tech/full_papers/jones/jones.pdf&amp;lt;/ref&amp;gt;, security&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Browser_security&amp;lt;/ref&amp;gt;, modularity&amp;lt;ref&amp;gt;https://msdn.microsoft.com/en-us/library/ff709921.aspx&amp;lt;/ref&amp;gt; and performance. The Servo project is [https://en.wikipedia.org/wiki/Open-source_software open sourced] and receives contributions from individual contributors from around the globe. It currently supports [https://www.linux.com/ Linux], [http://www.apple.com/osx/ OS X], [https://www.microsoft.com/en-us/windows Windows], [https://www.android.com/ Android], and [https://en.wikipedia.org/wiki/Gonk Gonk] (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;. Rust is a [https://en.wikipedia.org/wiki/General-purpose_programming_language general-purpose], [https://developer.mozilla.org/ar/docs/multiparadigmlanguage.html multi-paradigm], [https://en.wikipedia.org/wiki/Compiled_language compiled programming] language, supporting pure-functional, imperative-procedural, and object-oriented styles&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The detailed description of the project can be found [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
===Compilation and Build===&lt;br /&gt;
* The first step is to compile Servo browser and build it on a local machine. The steps for compiling and building Servo are:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
compile Servo and ensure that it runs tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
===Initial Steps===&lt;br /&gt;
The initial steps for the project were completed as a part of OSS project 2. The functionalities implemented were:&lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
The subsequent steps for the project are to be implemented as a part of final semester project. The steps to do are:&lt;br /&gt;
* Replace the code in htmlimageelement.rs that instructs the image cache to fetch a URL with code that directly performs a network request (see HTMLScriptElement::prepare for an example that uses the NetworkListener helper and Document::load_async). The result should be sent to the image cache using the newly-added command. &lt;br /&gt;
* Implement the parse a srcset attribute algorithm by defining a parse_a_srcset_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs (./mach test-unit -p script/dom/htmlimageelement).  &lt;br /&gt;
* Implement the parse a sizes attribute algorithm by defining a parse_a_sizes_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs.&lt;br /&gt;
* Implement the normalize the source densities algorithm - create data types for source set and image source.&lt;br /&gt;
* Implement the update the source set algorithm by defining a update_the_source_set function in htmlimageelement.rs.&lt;br /&gt;
* Implement the select an image source algorithm by defining a select_an_image_source function in htmlimageelement.rs.&lt;br /&gt;
&lt;br /&gt;
==Design Principles==&lt;br /&gt;
&lt;br /&gt;
There were no particular design principles used in this project as it was a modification of existing code. The same principals of the original Servo code can be thought of as being followed by the project. The main aim was to increase the code coverage and to make the Servo browser more compliant to HMTL 5 standards when it comes to image loading.&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 [https://github.com/servo/servo/wiki/Image-load-conformance-student-project github page].&lt;br /&gt;
&lt;br /&gt;
====Step 1====&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ImageRequest.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:currentSrc.png]]&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
====Step 1====&lt;br /&gt;
replace the code in  htmlimageelement.rs  that instructs the image cache to fetch a URL with code that directly performs a network request (see  HTMLScriptElement::prepare  for an example that uses the  NetworkListener  helper and  Document::load_async ). The result should be sent to the image cache using the newly-added command.&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
implement the parse a srcset attribute algorithm by defining a  parse_a_srcset_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs  ( ./mach test-unit -p script/dom/htmlimageelement )&lt;br /&gt;
&lt;br /&gt;
The flowchart of the above step is : &lt;br /&gt;
&lt;br /&gt;
[[File:parseAsrcset.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
implement the parse a sizes attribute algorithm by defining a  parse_a_sizes_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs .&lt;br /&gt;
====Step 4====&lt;br /&gt;
implement the normalize the source densities algorithm - create data types for  source set  and  image source  &lt;br /&gt;
====Step 5====&lt;br /&gt;
implement the update the source set algorithm by defining a  update_the_source_set  function in  htmlimageelement.rs  &lt;br /&gt;
====Step 6====&lt;br /&gt;
implement the select an image source algorithm by defining a  select_an_image_source  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for HTMLImageElement:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/10134 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101899</id>
		<title>CSC/ECE 517 Spring 2016 M1602 Make image loads conform with the spec</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101899"/>
		<updated>2016-04-05T20:19:41Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTML5 HTML 5] specifies a complex model for image loading on a web browser. It has specifications&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/#the-picture-element&amp;lt;/ref&amp;gt; for [https://html.spec.whatwg.org/multipage/#the-picture-element picture element] as well as img element, and browsers need to follow these HTML 5 specifications to conform to the standard. Servo's current implementation of image loading is [http://mxr.mozilla.org/servo/source/components/script/dom/htmlimageelement.rs#107 straightforward, but non-compliant] with HTML 5 standards&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/&amp;lt;/ref&amp;gt; in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML 5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/servo/servo Servo] is a [https://en.wikipedia.org/wiki/Web_browser web browser] layout engine written in [https://www.mozilla.org/en-US/?v=b Mozilla]'s new [https://en.wikipedia.org/wiki/System_programming_language systems language] [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust]&amp;lt;ref&amp;gt;https://servo.org/&amp;lt;/ref&amp;gt;. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism&amp;lt;ref&amp;gt;https://www.usenix.org/legacy/event/hotpar09/tech/full_papers/jones/jones.pdf&amp;lt;/ref&amp;gt;, security&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Browser_security&amp;lt;/ref&amp;gt;, modularity&amp;lt;ref&amp;gt;https://msdn.microsoft.com/en-us/library/ff709921.aspx&amp;lt;/ref&amp;gt; and performance. The Servo project is [https://en.wikipedia.org/wiki/Open-source_software open sourced] and receives contributions from individual contributors from around the globe. It currently supports [https://www.linux.com/ Linux], [http://www.apple.com/osx/ OS X], [https://www.microsoft.com/en-us/windows Windows], [https://www.android.com/ Android], and [https://en.wikipedia.org/wiki/Gonk Gonk] (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;. Rust is a [https://en.wikipedia.org/wiki/General-purpose_programming_language general-purpose], [https://developer.mozilla.org/ar/docs/multiparadigmlanguage.html multi-paradigm], [https://en.wikipedia.org/wiki/Compiled_language compiled programming] language, supporting pure-functional, imperative-procedural, and object-oriented styles&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The detailed description of the project can be found [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
===Compilation and Build===&lt;br /&gt;
* The first step is to compile Servo browser and build it on a local machine. The steps for compiling and building Servo are:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
compile Servo and ensure that it runs tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
===Initial Steps===&lt;br /&gt;
The initial steps for the project were completed as a part of OSS project 2. The functionalities implemented were:&lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
The subsequent steps for the project are to be implemented as a part of final semester project. The steps to do are:&lt;br /&gt;
* Replace the code in htmlimageelement.rs that instructs the image cache to fetch a URL with code that directly performs a network request (see HTMLScriptElement::prepare for an example that uses the NetworkListener helper and Document::load_async). The result should be sent to the image cache using the newly-added command. &lt;br /&gt;
* Implement the parse a srcset attribute algorithm by defining a parse_a_srcset_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs (./mach test-unit -p script/dom/htmlimageelement).  &lt;br /&gt;
* Implement the parse a sizes attribute algorithm by defining a parse_a_sizes_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs.&lt;br /&gt;
* Implement the normalize the source densities algorithm - create data types for source set and image source.&lt;br /&gt;
* Implement the update the source set algorithm by defining a update_the_source_set function in htmlimageelement.rs.&lt;br /&gt;
* Implement the select an image source algorithm by defining a select_an_image_source function in htmlimageelement.rs.&lt;br /&gt;
&lt;br /&gt;
==Design Principles==&lt;br /&gt;
&lt;br /&gt;
There were no particular design principles used in this project as it was a modification of existing code. The same principals of the original Servo code can be thought of as being followed by the project. The main aim was to increase the code coverage and to make the Servo browser more compliant to HMTL 5 standards when it comes to image loading.&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 [https://github.com/servo/servo/wiki/Image-load-conformance-student-project github page].&lt;br /&gt;
&lt;br /&gt;
====Step 1====&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ImageRequest.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:currentSrc.png]]&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
====Step 1====&lt;br /&gt;
replace the code in  htmlimageelement.rs  that instructs the image cache to fetch a URL with code that directly performs a network request (see  HTMLScriptElement::prepare  for an example that uses the  NetworkListener  helper and  Document::load_async ). The result should be sent to the image cache using the newly-added command.&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
implement the parse a srcset attribute algorithm by defining a  parse_a_srcset_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs  ( ./mach test-unit -p script/dom/htmlimageelement )&lt;br /&gt;
&lt;br /&gt;
The flowchart of the above step is : &lt;br /&gt;
&lt;br /&gt;
[[File:parseAsrcset.png]]&lt;br /&gt;
====Step 3====&lt;br /&gt;
implement the parse a sizes attribute algorithm by defining a  parse_a_sizes_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs .&lt;br /&gt;
====Step 4====&lt;br /&gt;
implement the normalize the source densities algorithm - create data types for  source set  and  image source  &lt;br /&gt;
====Step 5====&lt;br /&gt;
implement the update the source set algorithm by defining a  update_the_source_set  function in  htmlimageelement.rs  &lt;br /&gt;
====Step 6====&lt;br /&gt;
implement the select an image source algorithm by defining a  select_an_image_source  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for HTMLImageElement:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/10134 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101898</id>
		<title>CSC/ECE 517 Spring 2016 M1602 Make image loads conform with the spec</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_M1602_Make_image_loads_conform_with_the_spec&amp;diff=101898"/>
		<updated>2016-04-05T20:18:39Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTML5 HTML 5] specifies a complex model for image loading on a web browser. It has specifications&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/#the-picture-element&amp;lt;/ref&amp;gt; for [https://html.spec.whatwg.org/multipage/#the-picture-element picture element] as well as img element, and browsers need to follow these HTML 5 specifications to conform to the standard. Servo's current implementation of image loading is [http://mxr.mozilla.org/servo/source/components/script/dom/htmlimageelement.rs#107 straightforward, but non-compliant] with HTML 5 standards&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/&amp;lt;/ref&amp;gt; in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML 5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/servo/servo Servo] is a [https://en.wikipedia.org/wiki/Web_browser web browser] layout engine written in [https://www.mozilla.org/en-US/?v=b Mozilla]'s new [https://en.wikipedia.org/wiki/System_programming_language systems language] [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust]&amp;lt;ref&amp;gt;https://servo.org/&amp;lt;/ref&amp;gt;. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism&amp;lt;ref&amp;gt;https://www.usenix.org/legacy/event/hotpar09/tech/full_papers/jones/jones.pdf&amp;lt;/ref&amp;gt;, security&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Browser_security&amp;lt;/ref&amp;gt;, modularity&amp;lt;ref&amp;gt;https://msdn.microsoft.com/en-us/library/ff709921.aspx&amp;lt;/ref&amp;gt; and performance. The Servo project is [https://en.wikipedia.org/wiki/Open-source_software open sourced] and receives contributions from individual contributors from around the globe. It currently supports [https://www.linux.com/ Linux], [http://www.apple.com/osx/ OS X], [https://www.microsoft.com/en-us/windows Windows], [https://www.android.com/ Android], and [https://en.wikipedia.org/wiki/Gonk Gonk] (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;. Rust is a [https://en.wikipedia.org/wiki/General-purpose_programming_language general-purpose], [https://developer.mozilla.org/ar/docs/multiparadigmlanguage.html multi-paradigm], [https://en.wikipedia.org/wiki/Compiled_language compiled programming] language, supporting pure-functional, imperative-procedural, and object-oriented styles&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;&amp;lt;ref&amp;gt;http://readwrite.com/2015/07/02/mozilla-rust-programming-language-potential/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The detailed description of the project can be found [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
===Compilation and Build===&lt;br /&gt;
* The first step is to compile Servo browser and build it on a local machine. The steps for compiling and building Servo are:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
compile Servo and ensure that it runs tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
===Initial Steps===&lt;br /&gt;
The initial steps for the project were completed as a part of OSS project 2. The functionalities implemented were:&lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
The subsequent steps for the project are to be implemented as a part of final semester project. The steps to do are:&lt;br /&gt;
* Replace the code in htmlimageelement.rs that instructs the image cache to fetch a URL with code that directly performs a network request (see HTMLScriptElement::prepare for an example that uses the NetworkListener helper and Document::load_async). The result should be sent to the image cache using the newly-added command. &lt;br /&gt;
* Implement the parse a srcset attribute algorithm by defining a parse_a_srcset_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs (./mach test-unit -p script/dom/htmlimageelement).  &lt;br /&gt;
* Implement the parse a sizes attribute algorithm by defining a parse_a_sizes_attribute function in htmlimageelement.rs. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs.&lt;br /&gt;
* Implement the normalize the source densities algorithm - create data types for source set and image source.&lt;br /&gt;
* Implement the update the source set algorithm by defining a update_the_source_set function in htmlimageelement.rs.&lt;br /&gt;
* Implement the select an image source algorithm by defining a select_an_image_source function in htmlimageelement.rs.&lt;br /&gt;
&lt;br /&gt;
==Design Principles==&lt;br /&gt;
&lt;br /&gt;
There were no particular design principles used in this project as it was a modification of existing code. The same principals of the original Servo code can be thought of as being followed by the project. The main aim was to increase the code coverage and to make the Servo browser more compliant to HMTL 5 standards when it comes to image loading.&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 [https://github.com/servo/servo/wiki/Image-load-conformance-student-project github page].&lt;br /&gt;
&lt;br /&gt;
====Step 1====&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ImageRequest.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
====Step 3====&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:currentSrc.png]]&lt;br /&gt;
&lt;br /&gt;
===Subsequent Steps===&lt;br /&gt;
====Step 1====&lt;br /&gt;
replace the code in  htmlimageelement.rs  that instructs the image cache to fetch a URL with code that directly performs a network request (see  HTMLScriptElement::prepare  for an example that uses the  NetworkListener  helper and  Document::load_async ). The result should be sent to the image cache using the newly-added command.&lt;br /&gt;
&lt;br /&gt;
====Step 2====&lt;br /&gt;
implement the parse a srcset attribute algorithm by defining a  parse_a_srcset_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs  ( ./mach test-unit -p script/dom/htmlimageelement )&lt;br /&gt;
====Step 3====&lt;br /&gt;
implement the parse a sizes attribute algorithm by defining a  parse_a_sizes_attribute  function in  htmlimageelement.rs . Write unit tests demonstrating correctness in  tests/unit/script/htmlimageelement.rs .&lt;br /&gt;
====Step 4====&lt;br /&gt;
implement the normalize the source densities algorithm - create data types for  source set  and  image source  &lt;br /&gt;
====Step 5====&lt;br /&gt;
implement the update the source set algorithm by defining a  update_the_source_set  function in  htmlimageelement.rs  &lt;br /&gt;
====Step 6====&lt;br /&gt;
implement the select an image source algorithm by defining a  select_an_image_source  function in  htmlimageelement.rs&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for HTMLImageElement:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/10134 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ImageRequest.png&amp;diff=101098</id>
		<title>File:ImageRequest.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ImageRequest.png&amp;diff=101098"/>
		<updated>2016-03-22T23:39:56Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101097</id>
		<title>CSC/ECE 517 Spring 2016/Mozilla Conforming Image Loading to HTML 5 Specs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101097"/>
		<updated>2016-03-22T23:39:33Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Step 1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTML5 HTML5] specifies a complex model for image loading on a web browser. It has specifications&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/#the-picture-element&amp;lt;/ref&amp;gt; for [https://html.spec.whatwg.org/multipage/#the-picture-element picture element] as well as img element and browsers need to to follow these HTML5 specifications to conform the standard. Servo's current implementation of image loading is [http://mxr.mozilla.org/servo/source/components/script/dom/htmlimageelement.rs#107 straightforward, but non-compliant] with HTML5 standards&amp;lt;ref&amp;gt;https://html.spec.whatwg.org/multipage/&amp;lt;/ref&amp;gt; in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
Servo is a web browser layout engine written in Mozilla's new systems language, Rust. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism, security, modularity and performance. The Servo project is open sourced and receives contributions from individual contributors from around the globe. It currently supports Linux, OSX, Windows, Android, and Gonk (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design. Rust is a general-purpose, multi-paradigm, compiled programming language, supporting pure-functional, imperative-procedural, and object-oriented styles. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===HTML Image Element===&lt;br /&gt;
HTML image element has &amp;quot;image request&amp;quot; parameter which further has 3 parameters:&lt;br /&gt;
* State&lt;br /&gt;
* Current URL &lt;br /&gt;
* Image data&lt;br /&gt;
&lt;br /&gt;
The state parameter can be classified as one of 4 possible states:&lt;br /&gt;
* Unavailable&lt;br /&gt;
The user agent hasn't obtained any image data, or has obtained some or all of the image data but hasn't yet decoded enough of the image to get the image dimensions.&lt;br /&gt;
* Partially available&lt;br /&gt;
The user agent has obtained some of the image data and at least the image dimensions are available.&lt;br /&gt;
* Completely available&lt;br /&gt;
The user agent has obtained all of the image data and at least the image dimensions are available.&lt;br /&gt;
* Broken&lt;br /&gt;
The user agent has obtained all of the image data that it can, but it cannot even decode the image enough to get the image dimensions (e.g. the image is corrupted, or the format is not supported, or no data could be obtained).&lt;br /&gt;
&lt;br /&gt;
Image request can be set to Pending Request, which is initially set to null or Current Request, which usually refers to the img element itself.&lt;br /&gt;
&lt;br /&gt;
==Scope==&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
compile Servo and ensure that it runs on  tests/html/about-mozilla.html  &lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ImageRequest.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:currentSrc.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for HTMLImageElement:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/8182 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101090</id>
		<title>CSC/ECE 517 Spring 2016/Mozilla Conforming Image Loading to HTML 5 Specs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101090"/>
		<updated>2016-03-22T23:21:13Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTML5 HTML5] specifies a complex model for image loading on a web browser. It has specifications[[References 1]] for [https://html.spec.whatwg.org/multipage/#the-picture-element picture element] as well as img element and browsers need to to follow these HTML5 specifications to conform the standard. Servo's current implementation of image loading is straightforward, but non-compliant with HTML5 standards in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
Servo is a web browser layout engine written in Mozilla's new systems language, Rust. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism, security, modularity and performance. The Servo project is open sourced and receives contributions from individual contributors from around the globe. It currently supports Linux, OSX, Windows, Android, and Gonk (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design. Rust is a general-purpose, multi-paradigm, compiled programming language, supporting pure-functional, imperative-procedural, and object-oriented styles. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===HTML Image Element===&lt;br /&gt;
HTML image element has &amp;quot;image request&amp;quot; parameter which further has 3 parameters:&lt;br /&gt;
* State&lt;br /&gt;
* Current URL &lt;br /&gt;
* Image data&lt;br /&gt;
&lt;br /&gt;
The state parameter can be classified as one of 4 possible states:&lt;br /&gt;
* Unavailable&lt;br /&gt;
The user agent hasn't obtained any image data, or has obtained some or all of the image data but hasn't yet decoded enough of the image to get the image dimensions.&lt;br /&gt;
* Partially available&lt;br /&gt;
The user agent has obtained some of the image data and at least the image dimensions are available.&lt;br /&gt;
* Completely available&lt;br /&gt;
The user agent has obtained all of the image data and at least the image dimensions are available.&lt;br /&gt;
* Broken&lt;br /&gt;
The user agent has obtained all of the image data that it can, but it cannot even decode the image enough to get the image dimensions (e.g. the image is corrupted, or the format is not supported, or no data could be obtained).&lt;br /&gt;
&lt;br /&gt;
Image request can be set to Pending Request, which is initially set to null or Current Request, which usually refers to the img element itself.&lt;br /&gt;
&lt;br /&gt;
==Scope==&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
compile Servo and ensure that it runs on  tests/html/about-mozilla.html  &lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Uncomment-overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:currentSrc.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for HTMLImageElement:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/8182 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:CurrentSrc.png&amp;diff=101088</id>
		<title>File:CurrentSrc.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:CurrentSrc.png&amp;diff=101088"/>
		<updated>2016-03-22T23:20:13Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101087</id>
		<title>CSC/ECE 517 Spring 2016/Mozilla Conforming Image Loading to HTML 5 Specs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101087"/>
		<updated>2016-03-22T23:20:01Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Step 3 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
HTML5 specifies a complex model for image loading on a web browser. It has specifications for picture element as well as img element and browsers need to to follow these HTML5 specifications to conform the standard. Servo's current implementation of image loading is straightforward, but non-compliant with HTML5 standards in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
Servo is a web browser layout engine written in Mozilla's new systems language, Rust. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism, security, modularity and performance. The Servo project is open sourced and receives contributions from individual contributors from around the globe. It currently supports Linux, OSX, Windows, Android, and Gonk (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design. Rust is a general-purpose, multi-paradigm, compiled programming language, supporting pure-functional, imperative-procedural, and object-oriented styles. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===HTML Image Element===&lt;br /&gt;
HTML image element has &amp;quot;image request&amp;quot; parameter which further has 3 parameters:&lt;br /&gt;
* State&lt;br /&gt;
* Current URL &lt;br /&gt;
* Image data&lt;br /&gt;
&lt;br /&gt;
The state parameter can be classified as one of 4 possible states:&lt;br /&gt;
* Unavailable&lt;br /&gt;
The user agent hasn't obtained any image data, or has obtained some or all of the image data but hasn't yet decoded enough of the image to get the image dimensions.&lt;br /&gt;
* Partially available&lt;br /&gt;
The user agent has obtained some of the image data and at least the image dimensions are available.&lt;br /&gt;
* Completely available&lt;br /&gt;
The user agent has obtained all of the image data and at least the image dimensions are available.&lt;br /&gt;
* Broken&lt;br /&gt;
The user agent has obtained all of the image data that it can, but it cannot even decode the image enough to get the image dimensions (e.g. the image is corrupted, or the format is not supported, or no data could be obtained).&lt;br /&gt;
&lt;br /&gt;
Image request can be set to Pending Request, which is initially set to null or Current Request, which usually refers to the img element itself.&lt;br /&gt;
&lt;br /&gt;
==Scope==&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
compile Servo and ensure that it runs on  tests/html/about-mozilla.html  &lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Uncomment-overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:currentSrc.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for XMLHttpRequest:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/8182 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101086</id>
		<title>CSC/ECE 517 Spring 2016/Mozilla Conforming Image Loading to HTML 5 Specs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101086"/>
		<updated>2016-03-22T23:18:15Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Step 3 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
HTML5 specifies a complex model for image loading on a web browser. It has specifications for picture element as well as img element and browsers need to to follow these HTML5 specifications to conform the standard. Servo's current implementation of image loading is straightforward, but non-compliant with HTML5 standards in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
Servo is a web browser layout engine written in Mozilla's new systems language, Rust. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism, security, modularity and performance. The Servo project is open sourced and receives contributions from individual contributors from around the globe. It currently supports Linux, OSX, Windows, Android, and Gonk (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design. Rust is a general-purpose, multi-paradigm, compiled programming language, supporting pure-functional, imperative-procedural, and object-oriented styles. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===HTML Image Element===&lt;br /&gt;
HTML image element has &amp;quot;image request&amp;quot; parameter which further has 3 parameters:&lt;br /&gt;
* State&lt;br /&gt;
* Current URL &lt;br /&gt;
* Image data&lt;br /&gt;
&lt;br /&gt;
The state parameter can be classified as one of 4 possible states:&lt;br /&gt;
* Unavailable&lt;br /&gt;
The user agent hasn't obtained any image data, or has obtained some or all of the image data but hasn't yet decoded enough of the image to get the image dimensions.&lt;br /&gt;
* Partially available&lt;br /&gt;
The user agent has obtained some of the image data and at least the image dimensions are available.&lt;br /&gt;
* Completely available&lt;br /&gt;
The user agent has obtained all of the image data and at least the image dimensions are available.&lt;br /&gt;
* Broken&lt;br /&gt;
The user agent has obtained all of the image data that it can, but it cannot even decode the image enough to get the image dimensions (e.g. the image is corrupted, or the format is not supported, or no data could be obtained).&lt;br /&gt;
&lt;br /&gt;
Image request can be set to Pending Request, which is initially set to null or Current Request, which usually refers to the img element itself.&lt;br /&gt;
&lt;br /&gt;
==Scope==&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
compile Servo and ensure that it runs on  tests/html/about-mozilla.html  &lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Uncomment-overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
&lt;br /&gt;
[[File:overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for XMLHttpRequest:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/8182 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101085</id>
		<title>CSC/ECE 517 Spring 2016/Mozilla Conforming Image Loading to HTML 5 Specs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101085"/>
		<updated>2016-03-22T23:17:44Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Step 1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
HTML5 specifies a complex model for image loading on a web browser. It has specifications for picture element as well as img element and browsers need to to follow these HTML5 specifications to conform the standard. Servo's current implementation of image loading is straightforward, but non-compliant with HTML5 standards in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
Servo is a web browser layout engine written in Mozilla's new systems language, Rust. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism, security, modularity and performance. The Servo project is open sourced and receives contributions from individual contributors from around the globe. It currently supports Linux, OSX, Windows, Android, and Gonk (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design. Rust is a general-purpose, multi-paradigm, compiled programming language, supporting pure-functional, imperative-procedural, and object-oriented styles. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===HTML Image Element===&lt;br /&gt;
HTML image element has &amp;quot;image request&amp;quot; parameter which further has 3 parameters:&lt;br /&gt;
* State&lt;br /&gt;
* Current URL &lt;br /&gt;
* Image data&lt;br /&gt;
&lt;br /&gt;
The state parameter can be classified as one of 4 possible states:&lt;br /&gt;
* Unavailable&lt;br /&gt;
The user agent hasn't obtained any image data, or has obtained some or all of the image data but hasn't yet decoded enough of the image to get the image dimensions.&lt;br /&gt;
* Partially available&lt;br /&gt;
The user agent has obtained some of the image data and at least the image dimensions are available.&lt;br /&gt;
* Completely available&lt;br /&gt;
The user agent has obtained all of the image data and at least the image dimensions are available.&lt;br /&gt;
* Broken&lt;br /&gt;
The user agent has obtained all of the image data that it can, but it cannot even decode the image enough to get the image dimensions (e.g. the image is corrupted, or the format is not supported, or no data could be obtained).&lt;br /&gt;
&lt;br /&gt;
Image request can be set to Pending Request, which is initially set to null or Current Request, which usually refers to the img element itself.&lt;br /&gt;
&lt;br /&gt;
==Scope==&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
compile Servo and ensure that it runs on  tests/html/about-mozilla.html  &lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
As we need to define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Uncomment-overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
Finally, we have implemented the overrideMimeType method according to the [https://xhr.spec.whatwg.org/#the-overridemimetype%28%29-method XHR specifications].&lt;br /&gt;
* If the state is loading or done, we have returned Invalid State Error&lt;br /&gt;
* Then we have parsed the mime passed in the argument&lt;br /&gt;
* If the parsing of mime was successful, we have saved the appropriate values in override_mime_type and override_charset&lt;br /&gt;
&lt;br /&gt;
[[File:overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for XMLHttpRequest:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/8182 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101084</id>
		<title>CSC/ECE 517 Spring 2016/Mozilla Conforming Image Loading to HTML 5 Specs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101084"/>
		<updated>2016-03-22T23:17:02Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Step 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
HTML5 specifies a complex model for image loading on a web browser. It has specifications for picture element as well as img element and browsers need to to follow these HTML5 specifications to conform the standard. Servo's current implementation of image loading is straightforward, but non-compliant with HTML5 standards in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
Servo is a web browser layout engine written in Mozilla's new systems language, Rust. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism, security, modularity and performance. The Servo project is open sourced and receives contributions from individual contributors from around the globe. It currently supports Linux, OSX, Windows, Android, and Gonk (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design. Rust is a general-purpose, multi-paradigm, compiled programming language, supporting pure-functional, imperative-procedural, and object-oriented styles. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===HTML Image Element===&lt;br /&gt;
HTML image element has &amp;quot;image request&amp;quot; parameter which further has 3 parameters:&lt;br /&gt;
* State&lt;br /&gt;
* Current URL &lt;br /&gt;
* Image data&lt;br /&gt;
&lt;br /&gt;
The state parameter can be classified as one of 4 possible states:&lt;br /&gt;
* Unavailable&lt;br /&gt;
The user agent hasn't obtained any image data, or has obtained some or all of the image data but hasn't yet decoded enough of the image to get the image dimensions.&lt;br /&gt;
* Partially available&lt;br /&gt;
The user agent has obtained some of the image data and at least the image dimensions are available.&lt;br /&gt;
* Completely available&lt;br /&gt;
The user agent has obtained all of the image data and at least the image dimensions are available.&lt;br /&gt;
* Broken&lt;br /&gt;
The user agent has obtained all of the image data that it can, but it cannot even decode the image enough to get the image dimensions (e.g. the image is corrupted, or the format is not supported, or no data could be obtained).&lt;br /&gt;
&lt;br /&gt;
Image request can be set to Pending Request, which is initially set to null or Current Request, which usually refers to the img element itself.&lt;br /&gt;
&lt;br /&gt;
==Scope==&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
compile Servo and ensure that it runs on  tests/html/about-mozilla.html  &lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
As we need to implement the overrideMimeType() method, we have uncommented the overrideMimeType() method from the XMLHttpRequest interface (components/script/dom/webidls/XMLHttpRequest.webidl).&lt;br /&gt;
&lt;br /&gt;
[[File:Uncomment-overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.rs file&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
Finally, we have implemented the overrideMimeType method according to the [https://xhr.spec.whatwg.org/#the-overridemimetype%28%29-method XHR specifications].&lt;br /&gt;
* If the state is loading or done, we have returned Invalid State Error&lt;br /&gt;
* Then we have parsed the mime passed in the argument&lt;br /&gt;
* If the parsing of mime was successful, we have saved the appropriate values in override_mime_type and override_charset&lt;br /&gt;
&lt;br /&gt;
[[File:overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for XMLHttpRequest:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/8182 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:CrossOrigin.png&amp;diff=101083</id>
		<title>File:CrossOrigin.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:CrossOrigin.png&amp;diff=101083"/>
		<updated>2016-03-22T23:16:20Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: uploaded a new version of &amp;amp;quot;File:CrossOrigin.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101082</id>
		<title>CSC/ECE 517 Spring 2016/Mozilla Conforming Image Loading to HTML 5 Specs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101082"/>
		<updated>2016-03-22T23:15:21Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Step 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
HTML5 specifies a complex model for image loading on a web browser. It has specifications for picture element as well as img element and browsers need to to follow these HTML5 specifications to conform the standard. Servo's current implementation of image loading is straightforward, but non-compliant with HTML5 standards in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
Servo is a web browser layout engine written in Mozilla's new systems language, Rust. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism, security, modularity and performance. The Servo project is open sourced and receives contributions from individual contributors from around the globe. It currently supports Linux, OSX, Windows, Android, and Gonk (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design. Rust is a general-purpose, multi-paradigm, compiled programming language, supporting pure-functional, imperative-procedural, and object-oriented styles. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===HTML Image Element===&lt;br /&gt;
HTML image element has &amp;quot;image request&amp;quot; parameter which further has 3 parameters:&lt;br /&gt;
* State&lt;br /&gt;
* Current URL &lt;br /&gt;
* Image data&lt;br /&gt;
&lt;br /&gt;
The state parameter can be classified as one of 4 possible states:&lt;br /&gt;
* Unavailable&lt;br /&gt;
The user agent hasn't obtained any image data, or has obtained some or all of the image data but hasn't yet decoded enough of the image to get the image dimensions.&lt;br /&gt;
* Partially available&lt;br /&gt;
The user agent has obtained some of the image data and at least the image dimensions are available.&lt;br /&gt;
* Completely available&lt;br /&gt;
The user agent has obtained all of the image data and at least the image dimensions are available.&lt;br /&gt;
* Broken&lt;br /&gt;
The user agent has obtained all of the image data that it can, but it cannot even decode the image enough to get the image dimensions (e.g. the image is corrupted, or the format is not supported, or no data could be obtained).&lt;br /&gt;
&lt;br /&gt;
Image request can be set to Pending Request, which is initially set to null or Current Request, which usually refers to the img element itself.&lt;br /&gt;
&lt;br /&gt;
==Scope==&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
compile Servo and ensure that it runs on  tests/html/about-mozilla.html  &lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
As we need to implement the overrideMimeType() method, we have uncommented the overrideMimeType() method from the XMLHttpRequest interface (components/script/dom/webidls/XMLHttpRequest.webidl).&lt;br /&gt;
&lt;br /&gt;
[[File:Uncomment-overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
Finally, we have implemented the overrideMimeType method according to the [https://xhr.spec.whatwg.org/#the-overridemimetype%28%29-method XHR specifications].&lt;br /&gt;
* If the state is loading or done, we have returned Invalid State Error&lt;br /&gt;
* Then we have parsed the mime passed in the argument&lt;br /&gt;
* If the parsing of mime was successful, we have saved the appropriate values in override_mime_type and override_charset&lt;br /&gt;
&lt;br /&gt;
[[File:overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for XMLHttpRequest:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/8182 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:CrossOrigin_webidl.png&amp;diff=101081</id>
		<title>File:CrossOrigin webidl.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:CrossOrigin_webidl.png&amp;diff=101081"/>
		<updated>2016-03-22T23:14:52Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101078</id>
		<title>CSC/ECE 517 Spring 2016/Mozilla Conforming Image Loading to HTML 5 Specs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101078"/>
		<updated>2016-03-22T23:14:30Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Step 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
HTML5 specifies a complex model for image loading on a web browser. It has specifications for picture element as well as img element and browsers need to to follow these HTML5 specifications to conform the standard. Servo's current implementation of image loading is straightforward, but non-compliant with HTML5 standards in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
Servo is a web browser layout engine written in Mozilla's new systems language, Rust. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism, security, modularity and performance. The Servo project is open sourced and receives contributions from individual contributors from around the globe. It currently supports Linux, OSX, Windows, Android, and Gonk (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design. Rust is a general-purpose, multi-paradigm, compiled programming language, supporting pure-functional, imperative-procedural, and object-oriented styles. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===HTML Image Element===&lt;br /&gt;
HTML image element has &amp;quot;image request&amp;quot; parameter which further has 3 parameters:&lt;br /&gt;
* State&lt;br /&gt;
* Current URL &lt;br /&gt;
* Image data&lt;br /&gt;
&lt;br /&gt;
The state parameter can be classified as one of 4 possible states:&lt;br /&gt;
* Unavailable&lt;br /&gt;
The user agent hasn't obtained any image data, or has obtained some or all of the image data but hasn't yet decoded enough of the image to get the image dimensions.&lt;br /&gt;
* Partially available&lt;br /&gt;
The user agent has obtained some of the image data and at least the image dimensions are available.&lt;br /&gt;
* Completely available&lt;br /&gt;
The user agent has obtained all of the image data and at least the image dimensions are available.&lt;br /&gt;
* Broken&lt;br /&gt;
The user agent has obtained all of the image data that it can, but it cannot even decode the image enough to get the image dimensions (e.g. the image is corrupted, or the format is not supported, or no data could be obtained).&lt;br /&gt;
&lt;br /&gt;
Image request can be set to Pending Request, which is initially set to null or Current Request, which usually refers to the img element itself.&lt;br /&gt;
&lt;br /&gt;
==Scope==&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
compile Servo and ensure that it runs on  tests/html/about-mozilla.html  &lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
As we need to implement the overrideMimeType() method, we have uncommented the overrideMimeType() method from the XMLHttpRequest interface (components/script/dom/webidls/XMLHttpRequest.webidl).&lt;br /&gt;
&lt;br /&gt;
[[File:Uncomment-overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
As we had to implement the crossOrigin attribute , we uncommented it in the HTMLImageElement.webidl file and then we created a getter and setter method for it in the HTMLImageElement.rd file using the  make_enumerated_getter / make_setter  macros .&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin_webidl.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
Finally, we have implemented the overrideMimeType method according to the [https://xhr.spec.whatwg.org/#the-overridemimetype%28%29-method XHR specifications].&lt;br /&gt;
* If the state is loading or done, we have returned Invalid State Error&lt;br /&gt;
* Then we have parsed the mime passed in the argument&lt;br /&gt;
* If the parsing of mime was successful, we have saved the appropriate values in override_mime_type and override_charset&lt;br /&gt;
&lt;br /&gt;
[[File:overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for XMLHttpRequest:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/akhan7/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: It may take around 30-40 mins to build. Check to see if the build is successful by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Servo browser should open and load the about-Mozilla web page.&lt;br /&gt;
Now open terminal and run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for HTML image element. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since the project aims to make image loading on Servo browser more conformant to HTML5 standards. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/8182 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:CrossOrigin.png&amp;diff=101070</id>
		<title>File:CrossOrigin.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:CrossOrigin.png&amp;diff=101070"/>
		<updated>2016-03-22T23:07:26Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: uploaded a new version of &amp;amp;quot;File:CrossOrigin.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:CrossOrigin.png&amp;diff=101069</id>
		<title>File:CrossOrigin.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:CrossOrigin.png&amp;diff=101069"/>
		<updated>2016-03-22T23:07:01Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: uploaded a new version of &amp;amp;quot;File:CrossOrigin.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:CrossOrigin.png&amp;diff=101068</id>
		<title>File:CrossOrigin.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:CrossOrigin.png&amp;diff=101068"/>
		<updated>2016-03-22T23:05:47Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101066</id>
		<title>CSC/ECE 517 Spring 2016/Mozilla Conforming Image Loading to HTML 5 Specs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101066"/>
		<updated>2016-03-22T23:04:33Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Step 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
HTML5 specifies a complex model for image loading on a web browser. It has specifications for picture element as well as img element and browsers need to to follow these HTML5 specifications to conform the standard. Servo's current implementation of image loading is straightforward, but non-compliant with HTML5 standards in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
Servo is a web browser layout engine written in Mozilla's new systems language, Rust. It is currently being developed by Mozilla Research. The aim of the project is not to create a full browser but rather to create better parallelism, security, modularity and performance. The Servo project is open sourced and receives contributions from individual contributors from around the globe. It currently supports Linux, OSX, Windows, Android, and Gonk (Firefox OS).&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
Hatched by Mozilla employee Graydon Hoare back in 2009, Rust was built from the ground up using elements from modern programming language design. Rust is a general-purpose, multi-paradigm, compiled programming language, supporting pure-functional, imperative-procedural, and object-oriented styles. It focuses on performance, parallelization, and memory safety and does so because unlike other programming languages it doesn't suffer from &amp;quot;backward-compatibility requirements&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===XMLHttpRequest===&lt;br /&gt;
&amp;quot;[https://xhr.spec.whatwg.org/ XMLHttpRequest] is a definition of an [https://en.wikipedia.org/wiki/Application_programming_interface API] that provides scripted client functionality for transferring data between a client and a server.&amp;quot;&amp;lt;ref&amp;gt;https://xhr.spec.whatwg.org/&amp;lt;/ref&amp;gt; XMLHttpRequest provides a way for data to be retrieved from a URL without having to retrieve the entire page. It supports protocols other than HTTP and can be used to retrieve any type of data.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Scope==&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
compile Servo and ensure that it runs on  tests/html/about-mozilla.html  &lt;br /&gt;
* Define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* Implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* Implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* Run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* Add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
As we need to implement the overrideMimeType() method, we have uncommented the overrideMimeType() method from the XMLHttpRequest interface (components/script/dom/webidls/XMLHttpRequest.webidl).&lt;br /&gt;
&lt;br /&gt;
[[File:Uncomment-overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
As two new fields are necessary for overrideMimeType() method implementation, override_mime_type to store the mime type of the mime passed in the argument and override_charset to store the charset of the mime passed in the argument. &lt;br /&gt;
Hence, we have added two new fields: override_mime_type and override_charset to the XMLHttpRequest structure.&lt;br /&gt;
&lt;br /&gt;
[[File:CrossOrigin.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
Finally, we have implemented the overrideMimeType method according to the [https://xhr.spec.whatwg.org/#the-overridemimetype%28%29-method XHR specifications].&lt;br /&gt;
* If the state is loading or done, we have returned Invalid State Error&lt;br /&gt;
* Then we have parsed the mime passed in the argument&lt;br /&gt;
* If the parsing of mime was successful, we have saved the appropriate values in override_mime_type and override_charset&lt;br /&gt;
&lt;br /&gt;
[[File:overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for XMLHttpRequest:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/jitendra29/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b test origin/overrideMimeType&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --release&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: It may take around 30 mins to build&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt XMLHttpRequest/ --release&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for XMLHttpRequest. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since it is basically improving some javascript features (XMLHttpRequest) in servo. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/8182 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101055</id>
		<title>CSC/ECE 517 Spring 2016/Mozilla Conforming Image Loading to HTML 5 Specs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101055"/>
		<updated>2016-03-22T22:42:37Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Scope */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
HTML5 specifies a complex model for image loading on a web browser. It has specifications for picture element as well as img element and browsers need to to follow these HTML5 specifications to conform the standard. Servo's current implementation of image loading is straightforward, but non-compliant with HTML5 standards in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
Servo &amp;lt;ref&amp;gt; https://github.com/servo/servo &amp;lt;/ref&amp;gt; is a web browser layout engine written in [https://github.com/rust-lang/rust Rust]&amp;lt;ref&amp;gt;https://github.com/rust-lang/rust&amp;lt;/ref&amp;gt; and is currently being developed by [https://en.wikipedia.org/wiki/Mozilla Mozilla Research]. The aim of the project is not to create a full browser but is rather to create a highly parallel environment that allows for many components be handled by fine-grained, isolated tasks.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Servo is built on top of Rust to provide a secure and reliable foundation and is focused on creating a reliable and fast browser engine.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] is a multi-paradigm, compiled programming language that is a good language for creating highly safe systems. Rust and Servo have a symbiotic relationship as the development of servo has influenced the design of the language.&lt;br /&gt;
&lt;br /&gt;
Rust is a modern, fast, memory safe and multithreaded programming language that focuses on speed and safety for developing reliable and efficient systems. It eliminates all data races by having numerous compile-time safety checks that adds no runtime overhead.&amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/book/README.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===XMLHttpRequest===&lt;br /&gt;
&amp;quot;[https://xhr.spec.whatwg.org/ XMLHttpRequest] is a definition of an [https://en.wikipedia.org/wiki/Application_programming_interface API] that provides scripted client functionality for transferring data between a client and a server.&amp;quot;&amp;lt;ref&amp;gt;https://xhr.spec.whatwg.org/&amp;lt;/ref&amp;gt; XMLHttpRequest provides a way for data to be retrieved from a URL without having to retrieve the entire page. It supports protocols other than HTTP and can be used to retrieve any type of data.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Scope==&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
compile Servo and ensure that it runs on  tests/html/about-mozilla.html  &lt;br /&gt;
* define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
* implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
* implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
* run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
* add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
==Design Pattern==&lt;br /&gt;
Design patterns are not applicable as our task involved just implementing a method. However, the [[CSC/ECE_517_Fall_2015/oss_M1504_JJD#Implementation|Implementation]] section below provides details of the steps as why it was implemented, the way it was implemented.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
As we need to implement the overrideMimeType() method, we have uncommented the overrideMimeType() method from the XMLHttpRequest interface (components/script/dom/webidls/XMLHttpRequest.webidl).&lt;br /&gt;
&lt;br /&gt;
[[File:Uncomment-overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
As two new fields are necessary for overrideMimeType() method implementation, override_mime_type to store the mime type of the mime passed in the argument and override_charset to store the charset of the mime passed in the argument. &lt;br /&gt;
Hence, we have added two new fields: override_mime_type and override_charset to the XMLHttpRequest structure.&lt;br /&gt;
&lt;br /&gt;
[[File:XHRStruct.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
Finally, we have implemented the overrideMimeType method according to the [https://xhr.spec.whatwg.org/#the-overridemimetype%28%29-method XHR specifications].&lt;br /&gt;
* If the state is loading or done, we have returned Invalid State Error&lt;br /&gt;
* Then we have parsed the mime passed in the argument&lt;br /&gt;
* If the parsing of mime was successful, we have saved the appropriate values in override_mime_type and override_charset&lt;br /&gt;
&lt;br /&gt;
[[File:overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for XMLHttpRequest:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/jitendra29/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b test origin/overrideMimeType&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --release&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: It may take around 30 mins to build&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt XMLHttpRequest/ --release&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for XMLHttpRequest. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since it is basically improving some javascript features (XMLHttpRequest) in servo. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/8182 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101052</id>
		<title>CSC/ECE 517 Spring 2016/Mozilla Conforming Image Loading to HTML 5 Specs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101052"/>
		<updated>2016-03-22T22:41:03Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Scope */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
HTML5 specifies a complex model for image loading on a web browser. It has specifications for picture element, img element and browsers need to to follow these HTML5 specifications to conform the standard. Servo's current implementation of image loading is straightforward, but non-compliant with HTML5 standards in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
Servo &amp;lt;ref&amp;gt; https://github.com/servo/servo &amp;lt;/ref&amp;gt; is a web browser layout engine written in [https://github.com/rust-lang/rust Rust]&amp;lt;ref&amp;gt;https://github.com/rust-lang/rust&amp;lt;/ref&amp;gt; and is currently being developed by [https://en.wikipedia.org/wiki/Mozilla Mozilla Research]. The aim of the project is not to create a full browser but is rather to create a highly parallel environment that allows for many components be handled by fine-grained, isolated tasks.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Servo is built on top of Rust to provide a secure and reliable foundation and is focused on creating a reliable and fast browser engine.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] is a multi-paradigm, compiled programming language that is a good language for creating highly safe systems. Rust and Servo have a symbiotic relationship as the development of servo has influenced the design of the language.&lt;br /&gt;
&lt;br /&gt;
Rust is a modern, fast, memory safe and multithreaded programming language that focuses on speed and safety for developing reliable and efficient systems. It eliminates all data races by having numerous compile-time safety checks that adds no runtime overhead.&amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/book/README.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===XMLHttpRequest===&lt;br /&gt;
&amp;quot;[https://xhr.spec.whatwg.org/ XMLHttpRequest] is a definition of an [https://en.wikipedia.org/wiki/Application_programming_interface API] that provides scripted client functionality for transferring data between a client and a server.&amp;quot;&amp;lt;ref&amp;gt;https://xhr.spec.whatwg.org/&amp;lt;/ref&amp;gt; XMLHttpRequest provides a way for data to be retrieved from a URL without having to retrieve the entire page. It supports protocols other than HTTP and can be used to retrieve any type of data.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Scope==&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
compile Servo and ensure that it runs on  tests/html/about-mozilla.html  &lt;br /&gt;
•define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
•implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
•implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
•run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
•add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
==Design Pattern==&lt;br /&gt;
Design patterns are not applicable as our task involved just implementing a method. However, the [[CSC/ECE_517_Fall_2015/oss_M1504_JJD#Implementation|Implementation]] section below provides details of the steps as why it was implemented, the way it was implemented.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
As we need to implement the overrideMimeType() method, we have uncommented the overrideMimeType() method from the XMLHttpRequest interface (components/script/dom/webidls/XMLHttpRequest.webidl).&lt;br /&gt;
&lt;br /&gt;
[[File:Uncomment-overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
As two new fields are necessary for overrideMimeType() method implementation, override_mime_type to store the mime type of the mime passed in the argument and override_charset to store the charset of the mime passed in the argument. &lt;br /&gt;
Hence, we have added two new fields: override_mime_type and override_charset to the XMLHttpRequest structure.&lt;br /&gt;
&lt;br /&gt;
[[File:XHRStruct.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
Finally, we have implemented the overrideMimeType method according to the [https://xhr.spec.whatwg.org/#the-overridemimetype%28%29-method XHR specifications].&lt;br /&gt;
* If the state is loading or done, we have returned Invalid State Error&lt;br /&gt;
* Then we have parsed the mime passed in the argument&lt;br /&gt;
* If the parsing of mime was successful, we have saved the appropriate values in override_mime_type and override_charset&lt;br /&gt;
&lt;br /&gt;
[[File:overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for XMLHttpRequest:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/jitendra29/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b test origin/overrideMimeType&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --release&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: It may take around 30 mins to build&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt XMLHttpRequest/ --release&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for XMLHttpRequest. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since it is basically improving some javascript features (XMLHttpRequest) in servo. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/8182 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101051</id>
		<title>CSC/ECE 517 Spring 2016/Mozilla Conforming Image Loading to HTML 5 Specs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101051"/>
		<updated>2016-03-22T22:40:47Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Scope */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
HTML5 specifies a complex model for image loading on a web browser. It has specifications for picture element, img element and browsers need to to follow these HTML5 specifications to conform the standard. Servo's current implementation of image loading is straightforward, but non-compliant with HTML5 standards in a number of important ways. The goal of this project is to implement image loading behavior on Servo browser that is more compliant with HTML5 so its easy to both implement and verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
Servo &amp;lt;ref&amp;gt; https://github.com/servo/servo &amp;lt;/ref&amp;gt; is a web browser layout engine written in [https://github.com/rust-lang/rust Rust]&amp;lt;ref&amp;gt;https://github.com/rust-lang/rust&amp;lt;/ref&amp;gt; and is currently being developed by [https://en.wikipedia.org/wiki/Mozilla Mozilla Research]. The aim of the project is not to create a full browser but is rather to create a highly parallel environment that allows for many components be handled by fine-grained, isolated tasks.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Servo is built on top of Rust to provide a secure and reliable foundation and is focused on creating a reliable and fast browser engine.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] is a multi-paradigm, compiled programming language that is a good language for creating highly safe systems. Rust and Servo have a symbiotic relationship as the development of servo has influenced the design of the language.&lt;br /&gt;
&lt;br /&gt;
Rust is a modern, fast, memory safe and multithreaded programming language that focuses on speed and safety for developing reliable and efficient systems. It eliminates all data races by having numerous compile-time safety checks that adds no runtime overhead.&amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/book/README.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===XMLHttpRequest===&lt;br /&gt;
&amp;quot;[https://xhr.spec.whatwg.org/ XMLHttpRequest] is a definition of an [https://en.wikipedia.org/wiki/Application_programming_interface API] that provides scripted client functionality for transferring data between a client and a server.&amp;quot;&amp;lt;ref&amp;gt;https://xhr.spec.whatwg.org/&amp;lt;/ref&amp;gt; XMLHttpRequest provides a way for data to be retrieved from a URL without having to retrieve the entire page. It supports protocols other than HTTP and can be used to retrieve any type of data.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Scope==&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Image-load-conformance-student-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
compile Servo and ensure that it runs on  tests/html/about-mozilla.html  &lt;br /&gt;
•define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
•implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
•implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
•run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
•add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned https://github.com/servo/servo/wiki/Image-load-conformance-student-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
==Design Pattern==&lt;br /&gt;
Design patterns are not applicable as our task involved just implementing a method. However, the [[CSC/ECE_517_Fall_2015/oss_M1504_JJD#Implementation|Implementation]] section below provides details of the steps as why it was implemented, the way it was implemented.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
As we need to implement the overrideMimeType() method, we have uncommented the overrideMimeType() method from the XMLHttpRequest interface (components/script/dom/webidls/XMLHttpRequest.webidl).&lt;br /&gt;
&lt;br /&gt;
[[File:Uncomment-overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
As two new fields are necessary for overrideMimeType() method implementation, override_mime_type to store the mime type of the mime passed in the argument and override_charset to store the charset of the mime passed in the argument. &lt;br /&gt;
Hence, we have added two new fields: override_mime_type and override_charset to the XMLHttpRequest structure.&lt;br /&gt;
&lt;br /&gt;
[[File:XHRStruct.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
Finally, we have implemented the overrideMimeType method according to the [https://xhr.spec.whatwg.org/#the-overridemimetype%28%29-method XHR specifications].&lt;br /&gt;
* If the state is loading or done, we have returned Invalid State Error&lt;br /&gt;
* Then we have parsed the mime passed in the argument&lt;br /&gt;
* If the parsing of mime was successful, we have saved the appropriate values in override_mime_type and override_charset&lt;br /&gt;
&lt;br /&gt;
[[File:overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for XMLHttpRequest:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/jitendra29/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b test origin/overrideMimeType&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --release&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: It may take around 30 mins to build&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt XMLHttpRequest/ --release&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for XMLHttpRequest. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since it is basically improving some javascript features (XMLHttpRequest) in servo. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/8182 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101046</id>
		<title>CSC/ECE 517 Spring 2016/Mozilla Conforming Image Loading to HTML 5 Specs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101046"/>
		<updated>2016-03-22T22:37:58Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: /* Scope */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This is change by Ahmad&lt;br /&gt;
Background information: The HTML5 specification defines a surprisingly complex model for loading images in a web page. Servo's current implementation is straightforward, but non-compliant in a number of important ways. The goal of this project is to implement image loading behaviour that is both more correct and easy to verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
Servo &amp;lt;ref&amp;gt; https://github.com/servo/servo &amp;lt;/ref&amp;gt; is a web browser layout engine written in [https://github.com/rust-lang/rust Rust]&amp;lt;ref&amp;gt;https://github.com/rust-lang/rust&amp;lt;/ref&amp;gt; and is currently being developed by [https://en.wikipedia.org/wiki/Mozilla Mozilla Research]. The aim of the project is not to create a full browser but is rather to create a highly parallel environment that allows for many components be handled by fine-grained, isolated tasks.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Servo is built on top of Rust to provide a secure and reliable foundation and is focused on creating a reliable and fast browser engine.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] is a multi-paradigm, compiled programming language that is a good language for creating highly safe systems. Rust and Servo have a symbiotic relationship as the development of servo has influenced the design of the language.&lt;br /&gt;
&lt;br /&gt;
Rust is a modern, fast, memory safe and multithreaded programming language that focuses on speed and safety for developing reliable and efficient systems. It eliminates all data races by having numerous compile-time safety checks that adds no runtime overhead.&amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/book/README.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===XMLHttpRequest===&lt;br /&gt;
&amp;quot;[https://xhr.spec.whatwg.org/ XMLHttpRequest] is a definition of an [https://en.wikipedia.org/wiki/Application_programming_interface API] that provides scripted client functionality for transferring data between a client and a server.&amp;quot;&amp;lt;ref&amp;gt;https://xhr.spec.whatwg.org/&amp;lt;/ref&amp;gt; XMLHttpRequest provides a way for data to be retrieved from a URL without having to retrieve the entire page. It supports protocols other than HTTP and can be used to retrieve any type of data.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Scope==&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
compile Servo and ensure that it runs on  tests/html/about-mozilla.html  &lt;br /&gt;
•define data types to represent the image request concept, and add pending and current requests to the  HTMLImageElement  type in  htmlimageelement.rs . These should subsume the existing fields in  HTMLImageElement  that are used for storing the image's properties, and the fields of the current request should be used instead. &lt;br /&gt;
•implement the crossOrigin attribute using the  make_enumerated_getter / make_setter  macros and uncommenting the attribute in  HTMLImageElement.webidl  &lt;br /&gt;
•implement the currentSrc attribute by adding the appropriate attribute to  HTMLImageElement.webidl  &lt;br /&gt;
•run  ./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html  and adjust the test result expectations according to the documenatation.&lt;br /&gt;
•add a command for the image cache task that accepts a URL and a vector of bytes. This command should instruct the cache to store this data as a newly-complete network request and continue decoding the result into pixel data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
==Design Pattern==&lt;br /&gt;
Design patterns are not applicable as our task involved just implementing a method. However, the [[CSC/ECE_517_Fall_2015/oss_M1504_JJD#Implementation|Implementation]] section below provides details of the steps as why it was implemented, the way it was implemented.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
As we need to implement the overrideMimeType() method, we have uncommented the overrideMimeType() method from the XMLHttpRequest interface (components/script/dom/webidls/XMLHttpRequest.webidl).&lt;br /&gt;
&lt;br /&gt;
[[File:Uncomment-overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
As two new fields are necessary for overrideMimeType() method implementation, override_mime_type to store the mime type of the mime passed in the argument and override_charset to store the charset of the mime passed in the argument. &lt;br /&gt;
Hence, we have added two new fields: override_mime_type and override_charset to the XMLHttpRequest structure.&lt;br /&gt;
&lt;br /&gt;
[[File:XHRStruct.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
Finally, we have implemented the overrideMimeType method according to the [https://xhr.spec.whatwg.org/#the-overridemimetype%28%29-method XHR specifications].&lt;br /&gt;
* If the state is loading or done, we have returned Invalid State Error&lt;br /&gt;
* Then we have parsed the mime passed in the argument&lt;br /&gt;
* If the parsing of mime was successful, we have saved the appropriate values in override_mime_type and override_charset&lt;br /&gt;
&lt;br /&gt;
[[File:overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for XMLHttpRequest:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/jitendra29/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b test origin/overrideMimeType&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --release&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: It may take around 30 mins to build&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt XMLHttpRequest/ --release&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for XMLHttpRequest. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since it is basically improving some javascript features (XMLHttpRequest) in servo. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/8182 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101043</id>
		<title>CSC/ECE 517 Spring 2016/Mozilla Conforming Image Loading to HTML 5 Specs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Mozilla_Conforming_Image_Loading_to_HTML_5_Specs&amp;diff=101043"/>
		<updated>2016-03-22T22:32:29Z</updated>

		<summary type="html">&lt;p&gt;Smshah4: Created page with &amp;quot;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt; Background information: The HTML5 specification defines a surprisingly complex model for loading images in a web...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;Making image load conform with the spec&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Background information: The HTML5 specification defines a surprisingly complex model for loading images in a web page. Servo's current implementation is straightforward, but non-compliant in a number of important ways. The goal of this project is to implement image loading behaviour that is both more correct and easy to verify against the text of the specification.&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
&lt;br /&gt;
Servo &amp;lt;ref&amp;gt; https://github.com/servo/servo &amp;lt;/ref&amp;gt; is a web browser layout engine written in [https://github.com/rust-lang/rust Rust]&amp;lt;ref&amp;gt;https://github.com/rust-lang/rust&amp;lt;/ref&amp;gt; and is currently being developed by [https://en.wikipedia.org/wiki/Mozilla Mozilla Research]. The aim of the project is not to create a full browser but is rather to create a highly parallel environment that allows for many components be handled by fine-grained, isolated tasks.&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Servo is built on top of Rust to provide a secure and reliable foundation and is focused on creating a reliable and fast browser engine.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] is a multi-paradigm, compiled programming language that is a good language for creating highly safe systems. Rust and Servo have a symbiotic relationship as the development of servo has influenced the design of the language.&lt;br /&gt;
&lt;br /&gt;
Rust is a modern, fast, memory safe and multithreaded programming language that focuses on speed and safety for developing reliable and efficient systems. It eliminates all data races by having numerous compile-time safety checks that adds no runtime overhead.&amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/book/README.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===XMLHttpRequest===&lt;br /&gt;
&amp;quot;[https://xhr.spec.whatwg.org/ XMLHttpRequest] is a definition of an [https://en.wikipedia.org/wiki/Application_programming_interface API] that provides scripted client functionality for transferring data between a client and a server.&amp;quot;&amp;lt;ref&amp;gt;https://xhr.spec.whatwg.org/&amp;lt;/ref&amp;gt; XMLHttpRequest provides a way for data to be retrieved from a URL without having to retrieve the entire page. It supports protocols other than HTTP and can be used to retrieve any type of data.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Scope==&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
* compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
* uncomment the overrideMimeType API in XMLHttpRequest.webidl, and add a stub method that allows Servo to compile again to xmlhttprequest.rs.&lt;br /&gt;
* run the tests via ./mach test-wpt tests/wpt/web-platform-tests/XMLHttpRequest/ and adjust the expectations for any that now pass (tests/wpt/metadata/XMLHttpRequest/)&lt;br /&gt;
* add new override_charset and override_mime_type fields to the XMLHttpRequest structure&lt;br /&gt;
* implement the overrideMimeType steps described in the specification&lt;br /&gt;
* update any tests that now pass&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
==Design Pattern==&lt;br /&gt;
Design patterns are not applicable as our task involved just implementing a method. However, the [[CSC/ECE_517_Fall_2015/oss_M1504_JJD#Implementation|Implementation]] section below provides details of the steps as why it was implemented, the way it was implemented.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
As we need to implement the overrideMimeType() method, we have uncommented the overrideMimeType() method from the XMLHttpRequest interface (components/script/dom/webidls/XMLHttpRequest.webidl).&lt;br /&gt;
&lt;br /&gt;
[[File:Uncomment-overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
As two new fields are necessary for overrideMimeType() method implementation, override_mime_type to store the mime type of the mime passed in the argument and override_charset to store the charset of the mime passed in the argument. &lt;br /&gt;
Hence, we have added two new fields: override_mime_type and override_charset to the XMLHttpRequest structure.&lt;br /&gt;
&lt;br /&gt;
[[File:XHRStruct.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
Finally, we have implemented the overrideMimeType method according to the [https://xhr.spec.whatwg.org/#the-overridemimetype%28%29-method XHR specifications].&lt;br /&gt;
* If the state is loading or done, we have returned Invalid State Error&lt;br /&gt;
* Then we have parsed the mime passed in the argument&lt;br /&gt;
* If the parsing of mime was successful, we have saved the appropriate values in override_mime_type and override_charset&lt;br /&gt;
&lt;br /&gt;
[[File:overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for XMLHttpRequest:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/jitendra29/servo.git&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b test origin/overrideMimeType&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build --release&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: It may take around 30 mins to build&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-wpt XMLHttpRequest/ --release&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that all tests pass as expected.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We have not added any new tests to the test suite as servo follows TDD and tests were previously written for XMLHttpRequest. We have just adjusted some of the test expectations for the tests which now pass due to our implementation.&lt;br /&gt;
&lt;br /&gt;
=== Testing From UI ===&lt;br /&gt;
&lt;br /&gt;
Our project cannot be tested from UI since it is basically improving some javascript features (XMLHttpRequest) in servo. However you can check that it doesn't break the existing code and the browser runs correctly by running a test page on servo after performing the build as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Run the following command after the project is build: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Pull Request==&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/8182 pull request]. In the link you can see all code snippets changed due to implementing the above steps, as well as integration test progression information.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smshah4</name></author>
	</entry>
</feed>