<?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=Nradhak2</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=Nradhak2"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Nradhak2"/>
	<updated>2026-05-15T13:26:14Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=134381</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=134381"/>
		<updated>2020-05-01T14:16:57Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: /* Future Work  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;br /&gt;
&lt;br /&gt;
Many of the components of Servo are still under development and one such feature is the [https://www.techopedia.com/definition/792/bitmap-bmp| ImageBitmap].&lt;br /&gt;
&lt;br /&gt;
Major browsers support the ImageBitmap standard which can be used to create images that are ready to be drawn efficiently to [https://en.wikipedia.org/wiki/Canvas_element| HTML canvas elements]. Servo is a new, experimental browser that supports these canvas APIs. &lt;br /&gt;
&lt;br /&gt;
The goal of and motivation behind this project is to implement support for image bitmaps and improve our canvas automated test coverage as a result.&lt;br /&gt;
&lt;br /&gt;
== '''About ImageBitMap and Motivation behind the project''' ==&lt;br /&gt;
We usually decode images for a use with canvas to allow users to customize an avatar, crop an image, or just zoom in on a picture. The problem with decoding images is that it can be CPU intensive, and that can sometimes mean jank or checkerboarding.&lt;br /&gt;
&lt;br /&gt;
But the createImageBitmap() method allows us to decode the image in the background and get access to a new ImageBitmap primitive, which you can draw into a canvas in the same way you would an &amp;lt;img&amp;gt; element, another canvas, or a video.&lt;br /&gt;
&lt;br /&gt;
The aim of this project is to develop the ImageBitmap for the servo environment. &lt;br /&gt;
&lt;br /&gt;
This can be done in the steps mentioned in the following section.&lt;br /&gt;
&lt;br /&gt;
== '''Steps for implementation''' ==&lt;br /&gt;
&lt;br /&gt;
'''Initial Phase'''&lt;br /&gt;
* '''Step 1: '''Add a ImageBitmap WebIDL interface to ''components/script/dom/webidl''s and Rust implementation in components/script/dom/imagebitmap.rs&lt;br /&gt;
* '''Step 2: ''' Add the ''createImageBitmap'' method that takes no extra x/y/w/h parameters in ''component/script/dom/webidls/WindowOrWorkerGlobalScope.webidl'' and implement the method in ''component/script/dom/window.rs'', handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources&lt;br /&gt;
&lt;br /&gt;
'''Subsequent phase'''&lt;br /&gt;
* '''Step 1: '''Implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)&lt;br /&gt;
* '''Step 2: '''Implement the ''createImageBitmap'' overload that accepts x/y/w/h parameters&lt;br /&gt;
* '''Step 3: '''Implement support for ImageBitmaps as canvas image sources in ''components/script/canvas_state.rs''&lt;br /&gt;
[[File:AllSteps.jpg]]&lt;br /&gt;
&lt;br /&gt;
== '''Previous Implementation''' ==&lt;br /&gt;
The steps that have been implemented so far in this project by the previous batch are:&lt;br /&gt;
&lt;br /&gt;
'''Step 1:''' Added the ImageBitmap interface to ''components/script/dom/webidls'' that represents a bitmap image which can be drawn to a &amp;lt;canvas&amp;gt; without undue latency. The interface contains height and weight as its attributes which are read only unsigned long integers.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//[Exposed=(Window,Worker), Serializable, Transferable]&lt;br /&gt;
[Exposed=(Window,Worker)]&lt;br /&gt;
interface ImageBitmap {&lt;br /&gt;
  readonly attribute unsigned long width;&lt;br /&gt;
  readonly attribute unsigned long height;&lt;br /&gt;
  //void close();&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
typedef (CanvasImageSource or&lt;br /&gt;
         Blob or&lt;br /&gt;
         ImageData) ImageBitmapSource;&lt;br /&gt;
&lt;br /&gt;
enum ImageOrientation { &amp;quot;none&amp;quot;, &amp;quot;flipY&amp;quot; };&lt;br /&gt;
enum PremultiplyAlpha { &amp;quot;none&amp;quot;, &amp;quot;premultiply&amp;quot;, &amp;quot;default&amp;quot; };&lt;br /&gt;
enum ColorSpaceConversion { &amp;quot;none&amp;quot;, &amp;quot;default&amp;quot; };&lt;br /&gt;
enum ResizeQuality { &amp;quot;pixelated&amp;quot;, &amp;quot;low&amp;quot;, &amp;quot;medium&amp;quot;, &amp;quot;high&amp;quot; };&lt;br /&gt;
&lt;br /&gt;
dictionary ImageBitmapOptions {&lt;br /&gt;
  ImageOrientation imageOrientation = &amp;quot;none&amp;quot;;&lt;br /&gt;
  PremultiplyAlpha premultiplyAlpha = &amp;quot;default&amp;quot;;&lt;br /&gt;
  ColorSpaceConversion colorSpaceConversion = &amp;quot;default&amp;quot;;&lt;br /&gt;
  [EnforceRange] unsigned long resizeWidth;&lt;br /&gt;
  [EnforceRange] unsigned long resizeHeight;&lt;br /&gt;
  ResizeQuality resizeQuality = &amp;quot;low&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ImageBitmap webidl also defines a dictionary for various ImageBitmap Options that can be used to modify the ImageBitmap object.&lt;br /&gt;
&lt;br /&gt;
'''Step 2:''' Implemented the rust code for the webidl interface at ''components/script/dom/imagebitmap.rs''. For more details on the code [https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_M2000._Implement_ImageBitMap_web_API#Implementation visit]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use crate::dom::bindings::cell::DomRefCell;&lt;br /&gt;
&lt;br /&gt;
use crate::dom::bindings::codegen::Bindings::ImageBitmapBinding::ImageBitmapMethods;&lt;br /&gt;
use crate::dom::bindings::root::DomRoot;&lt;br /&gt;
use crate::dom::globalscope::GlobalScope;&lt;br /&gt;
&lt;br /&gt;
use crate::dom::bindings::error::Fallible;&lt;br /&gt;
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};&lt;br /&gt;
use dom_struct::dom_struct;&lt;br /&gt;
&lt;br /&gt;
use std::vec::Vec;&lt;br /&gt;
&lt;br /&gt;
#[dom_struct]&lt;br /&gt;
pub struct ImageBitmap {&lt;br /&gt;
    reflector_: Reflector,&lt;br /&gt;
    width: u32,&lt;br /&gt;
    height: u32,&lt;br /&gt;
    bitmap_data: DomRefCell&amp;lt;Vec&amp;lt;u8&amp;gt;&amp;gt;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
impl ImageBitmap {&lt;br /&gt;
    fn new_inherited(width_arg: u32, height_arg: u32) -&amp;gt; ImageBitmap {&lt;br /&gt;
        ImageBitmap {&lt;br /&gt;
            reflector_: Reflector::new(),&lt;br /&gt;
            width: width_arg,&lt;br /&gt;
            height: height_arg,&lt;br /&gt;
            bitmap_data: DomRefCell::new(vec![]),&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    #[allow(dead_code)]&lt;br /&gt;
    pub fn new(global: &amp;amp;GlobalScope, width: u32, height: u32) -&amp;gt; Fallible&amp;lt;DomRoot&amp;lt;ImageBitmap&amp;gt;&amp;gt; {&lt;br /&gt;
        //assigning to a variable the return object of new_inherited&lt;br /&gt;
        let imagebitmap = Box::new(ImageBitmap::new_inherited(width, height));&lt;br /&gt;
&lt;br /&gt;
        Ok(reflect_dom_object(imagebitmap, global))&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code also implements the getter methods for height and width attribute of an ImageBitmap object.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
impl ImageBitmapMethods for ImageBitmap {&lt;br /&gt;
    // https://html.spec.whatwg.org/multipage/#dom-imagebitmap-height&lt;br /&gt;
    fn Height(&amp;amp;self) -&amp;gt; u32 {&lt;br /&gt;
        //to do: add a condition for checking detached internal slot&lt;br /&gt;
        //and return 0 if set to true&lt;br /&gt;
        self.height&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // https://html.spec.whatwg.org/multipage/#dom-imagebitmap-width&lt;br /&gt;
    fn Width(&amp;amp;self) -&amp;gt; u32 {&lt;br /&gt;
        //to do: add a condition to check detached internal slot&lt;br /&gt;
        ////and return 0 if set to true&lt;br /&gt;
        self.width&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Proposed Implementation''' ==&lt;br /&gt;
Among the remaining steps in the initial and subsequent phases, the focus will be on step 2 of initial phase and once there is progress made on this step, implementation of the subsequent steps will take place. &lt;br /&gt;
&lt;br /&gt;
;Implementing createImageBitmap web API&lt;br /&gt;
&lt;br /&gt;
:*The createImageBitmap() method creates a bitmap from a given source, optionally cropped to contain only a portion of that source. The method exists on the global scope in both windows and workers. It accepts a variety of different image sources, and returns a Promise which resolves to an ImageBitmap.&lt;br /&gt;
:*This web interface is defined in the file ''components/script/dom/webidls/WindowOrWorkerGlobalScope.webidl'' and rust code is implemented at ''components/script/dom/globalscope.rs''. It is then called in ''components/script/dom/window.rs'' and ''components/script/dom/workerglobalscope.rs''&lt;br /&gt;
:*The syntax of the method looks like&lt;br /&gt;
:::const imageBitmapPromise = createImageBitmap(image[, options]);&lt;br /&gt;
:::const imageBitmapPromise = createImageBitmap(image, sx, sy, sw, sh[, options]);&lt;br /&gt;
::where the parameters indicate:&lt;br /&gt;
:::'''image:''' an image source, which can be an img element, a SVG image element, a video element, a canvas element, a blob object, an ImageData object or another ImageBitmap object.&lt;br /&gt;
:::'''sx, sy, sw, sh:''' if given, source image is cropped to the given pixels.&lt;br /&gt;
:::'''options (Optional):''' the ImageBitmap object's bitmap data is modified according to options. Available options are:&lt;br /&gt;
:::*imageOrientation&lt;br /&gt;
:::*premultiplyAlpha&lt;br /&gt;
:::*colorSpaceConversion&lt;br /&gt;
:::*resizeWidth&lt;br /&gt;
:::*resizeHeight&lt;br /&gt;
:::*resizeQuality&lt;br /&gt;
:::: You can read more about these options [https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/createImageBitmap here]&lt;br /&gt;
::The return value is a Promise that is resolved when a new ImageBitmap is created.&lt;br /&gt;
:* As a first step, we will be implementing the method to handle canvas elements. Subsequently, we will be enhancing the method to handle other image sources and the x/y/w/h parameters.&lt;br /&gt;
&lt;br /&gt;
;Implementing close() method from previous work&lt;br /&gt;
&lt;br /&gt;
:* close() is a method in the ImageBitmap interface. It is implemented in ''components/script/dom/imagebitmap.rs'' file.&lt;br /&gt;
:* This method disposes of all graphical resources associated with an ImageBitmap.&lt;br /&gt;
&lt;br /&gt;
== '''Current Progress''' ==&lt;br /&gt;
&lt;br /&gt;
* Implemented createImageBitmap method for canvas image source(HTMLCanvasElement and OffscreenCanvas) using RUST programming language in the '''components/script/dom/globalscope.rs''' file. The comments in the following code will explain the functionality that it carries out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// https://html.spec.whatwg.org/multipage/#dom-createimagebitmap&lt;br /&gt;
pub fn create_image_bitmap(&lt;br /&gt;
    &amp;amp;self,&lt;br /&gt;
    image: ImageBitmapSource,&lt;br /&gt;
    options: &amp;amp;ImageBitmapOptions,&lt;br /&gt;
) -&amp;gt; Rc&amp;lt;Promise&amp;gt; {&lt;br /&gt;
    let in_realm_proof = AlreadyInRealm::assert(&amp;amp;self);&lt;br /&gt;
    // Created a new promise object p&lt;br /&gt;
    let p = Promise::new_in_current_realm(&amp;amp;self, InRealm::Already(&amp;amp;in_realm_proof));&lt;br /&gt;
&lt;br /&gt;
    // If resizewidth is present and is equal to 0, reject p with InvalidState error&lt;br /&gt;
    if options.resizeWidth.map_or(false, |w| w == 0) {&lt;br /&gt;
        p.reject_error(Error::InvalidState);&lt;br /&gt;
        return p;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // If resizeheight is present and is equal to 0, reject p with InvalidState error&lt;br /&gt;
    if options.resizeHeight.map_or(false, |w| w == 0) {&lt;br /&gt;
        p.reject_error(Error::InvalidState);&lt;br /&gt;
        return p;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // match the image to different types of image source and return the resolved p&lt;br /&gt;
    let promise = match image {&lt;br /&gt;
        // check if image source is HTMLCanvasElement&lt;br /&gt;
        ImageBitmapSource::HTMLCanvasElement(ref canvas) =&amp;gt; {&lt;br /&gt;
            // https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument&lt;br /&gt;
            // check if the image source is valid&lt;br /&gt;
            if !canvas.is_valid() {&lt;br /&gt;
                p.reject_error(Error::InvalidState);&lt;br /&gt;
                return p;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            // the fetch_all_data() method returns the bitmap data and size of the image&lt;br /&gt;
            if let Some((data, size)) = canvas.fetch_all_data() {&lt;br /&gt;
                // convert the data to a &amp;lt;vec&amp;gt; type&lt;br /&gt;
                let data = data&lt;br /&gt;
                    .map(|data| data.to_vec())&lt;br /&gt;
                    .unwrap_or_else(|| vec![0; size.area() as usize * 4]);&lt;br /&gt;
                //create imageBitmap object using the height and width of the image&lt;br /&gt;
                let image_bitmap = ImageBitmap::new(&amp;amp;self, size.width, size.height).unwrap();&lt;br /&gt;
&lt;br /&gt;
                // copy the data to bitmap_data of imageBitmap object&lt;br /&gt;
                image_bitmap.set_bitmap_data(data);&lt;br /&gt;
                // copy the origin clean flag of canvas image to origin_clean flag of imageBitmap object&lt;br /&gt;
                image_bitmap.set_origin_clean(canvas.origin_is_clean());&lt;br /&gt;
                // resolve p with imageBitmap object&lt;br /&gt;
                p.resolve_native(&amp;amp;(image_bitmap));&lt;br /&gt;
            }&lt;br /&gt;
            p&lt;br /&gt;
        },&lt;br /&gt;
        // check if image source is OffscreenCanvas&lt;br /&gt;
        ImageBitmapSource::OffscreenCanvas(ref canvas) =&amp;gt; {&lt;br /&gt;
            // https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument&lt;br /&gt;
            // check if the image source is valid&lt;br /&gt;
            if !canvas.is_valid() {&lt;br /&gt;
                p.reject_error(Error::InvalidState);&lt;br /&gt;
                return p;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            // the fetch_all_data() method returns the bitmap data and size of the image&lt;br /&gt;
            if let Some((data, size)) = canvas.fetch_all_data() {&lt;br /&gt;
                // convert the data to a &amp;lt;vec&amp;gt; type&lt;br /&gt;
                let data = data&lt;br /&gt;
                    .map(|data| data.to_vec())&lt;br /&gt;
                    .unwrap_or_else(|| vec![0; size.area() as usize * 4]);&lt;br /&gt;
                //create imageBitmap object using the height and width of the image&lt;br /&gt;
                let image_bitmap = ImageBitmap::new(&amp;amp;self, size.width, size.height).unwrap();&lt;br /&gt;
&lt;br /&gt;
                // copy the data to bitmap_data of imageBitmap object&lt;br /&gt;
                image_bitmap.set_bitmap_data(data);&lt;br /&gt;
                // copy the origin clean flag of canvas image to origin_clean flag of imageBitmap object&lt;br /&gt;
                image_bitmap.set_origin_clean(canvas.origin_is_clean());&lt;br /&gt;
                // resolve p with imageBitmap object&lt;br /&gt;
                p.resolve_native(&amp;amp;(image_bitmap));&lt;br /&gt;
            }&lt;br /&gt;
            p&lt;br /&gt;
        },&lt;br /&gt;
        _ =&amp;gt; {&lt;br /&gt;
            // if the image source is not HTMLCanvasElement or OffscreenCanvas, reject p with NotSupported Error&lt;br /&gt;
            p.reject_error(Error::NotSupported);&lt;br /&gt;
            return p;&lt;br /&gt;
        },&lt;br /&gt;
    };&lt;br /&gt;
    promise&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Tested the build using ‘mach’ commands&lt;br /&gt;
&lt;br /&gt;
== '''Design of the createImageBitmap() method''' ==&lt;br /&gt;
&lt;br /&gt;
On invoking the createImageBitmap(image, options) or the createImageBitmap(image sx, sy, sw, sh, options) the following in the sequence of actions&lt;br /&gt;
&lt;br /&gt;
[[File:fig1.png|border]] &lt;br /&gt;
&lt;br /&gt;
Switching on the &amp;quot;image&amp;quot; argument the following is the sequence of actions &lt;br /&gt;
&lt;br /&gt;
=== If the image is an SVGImage===&lt;br /&gt;
[[File:fig2.png|border]]&lt;br /&gt;
&lt;br /&gt;
=== If the image is a video===&lt;br /&gt;
[[File:ReFigure3.png|border]] &lt;br /&gt;
&lt;br /&gt;
=== If the image is a canvas===&lt;br /&gt;
[[File:ReFigure4.png|border]]&lt;br /&gt;
 &lt;br /&gt;
=== If the image is an ImageBitmap===&lt;br /&gt;
[[File:ImageBitmap.jpg|border]]&lt;br /&gt;
&lt;br /&gt;
=== If the image is an ImageData===&lt;br /&gt;
[[File:ImageData.jpg|border]]&lt;br /&gt;
&lt;br /&gt;
=='''Test Plan'''==&lt;br /&gt;
The following are the respective steps in testing:&lt;br /&gt;
* &amp;lt;b&amp;gt;Servo check should be successful.&amp;lt;/b&amp;gt;&lt;br /&gt;
The compiling time for servo build takes a lot of time. In order to make sure that our changes didn't break any of the existing features quickly, we run &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For Linux or macOS:&lt;br /&gt;
    ./mach check&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For Windows:&lt;br /&gt;
    mach.bat check&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:machCheck.png]]&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Servo building test should be successful.&amp;lt;/b&amp;gt;&lt;br /&gt;
The compiling time is based on the CPU clock speed and the OS of the system where the file is being run. For a 64-bit Linux OS, it takes from about 1 hour to 2 hours for the entire build. It takes 2.5 hours on Windows OS. This is done to make sure that the end-to-end implementation can be successfully run in a system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For Linux or macOS:&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For Windows:&lt;br /&gt;
    mach.bat build --dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:machBuild.png]]&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Check for the file tidiness (following standards of servo) using the command:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For Linux or macOS:&lt;br /&gt;
    ./mach test-tidy&lt;br /&gt;
    ./mach fmt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For Windows:&lt;br /&gt;
    mach.bat test-tidy&lt;br /&gt;
    mach.bat fmt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:machTestTidy.png]]&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;Servo automated Unit-testing should be successful.&amp;lt;/b&amp;gt;&lt;br /&gt;
Running the following commands will run all the unit-tests&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For Linux or macOS:&lt;br /&gt;
    ./mach test-unit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For Windows:&lt;br /&gt;
    mach.bat test-unit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: A log file can be maintained to make keep a check on the tests that are passing.&lt;br /&gt;
* &amp;lt;b&amp;gt;Update the automated servo Web Platform tests(wpt):&amp;lt;/b&amp;gt;&lt;br /&gt;
For a DOM feature, extensive tests already exist under tests/wpt. Any change in DOM would require updating the expected results in the automated tests.&lt;br /&gt;
&lt;br /&gt;
This first requires storing the log in raw format from a test run, for example by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach test-wpt --log-raw /path/for/storing/log/file/&amp;lt;filename&amp;gt;.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once log is saved, then run to update test expectations&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach update-wpt /path/to/logfile/&amp;lt;filename&amp;gt;.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt; Finally, to run the servo with a webpage (Google.com) to visually confirm that servo is working:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For Linux or macOS:&lt;br /&gt;
    ./mach run https://www.google.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For Windows:&lt;br /&gt;
    mach.bat run https://www.google.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:machRun.png]]&lt;br /&gt;
&lt;br /&gt;
== '''Future Work ''' == &lt;br /&gt;
The createImageBitmap() method can be extended to support the subsequent steps as shown in the steps for implementation. &lt;br /&gt;
 1. The method can be extended to support other image sources such as SVGImage, video sources, ImageData source, and so on. &lt;br /&gt;
 2. Overload the createImageBitmap() method to accept the s/y/w/h parameters &lt;br /&gt;
 3. Also implement support for ImageBitmaps as canvas image sources in the canvas_state.rs file&lt;br /&gt;
&lt;br /&gt;
=='''Code submission and Pull request'''==&lt;br /&gt;
&lt;br /&gt;
'''Code: '''[https://github.com/ramyananth/servo] &amp;lt;br/&amp;gt;&lt;br /&gt;
'''Pull Request: '''[https://github.com/servo/servo/pull/26296]&lt;br /&gt;
&lt;br /&gt;
== '''Team Details''' ==&lt;br /&gt;
 &lt;br /&gt;
Jayalakshmi Vishwanathan (jviswan@ncsu.edu) &lt;br /&gt;
 &lt;br /&gt;
Nita Radhakrishnan (nradhak2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Ramya Ananth (rananth2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sandeep Kundala (skundal@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Mentor Details''' ==&lt;br /&gt;
Jay Modi &lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
 &lt;br /&gt;
* [https://en.wikipedia.org/wiki/Servo_(software)| What is servo?]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Rust_(programming_language)| what is RUST programming?]&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=134380</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=134380"/>
		<updated>2020-05-01T14:15:45Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;br /&gt;
&lt;br /&gt;
Many of the components of Servo are still under development and one such feature is the [https://www.techopedia.com/definition/792/bitmap-bmp| ImageBitmap].&lt;br /&gt;
&lt;br /&gt;
Major browsers support the ImageBitmap standard which can be used to create images that are ready to be drawn efficiently to [https://en.wikipedia.org/wiki/Canvas_element| HTML canvas elements]. Servo is a new, experimental browser that supports these canvas APIs. &lt;br /&gt;
&lt;br /&gt;
The goal of and motivation behind this project is to implement support for image bitmaps and improve our canvas automated test coverage as a result.&lt;br /&gt;
&lt;br /&gt;
== '''About ImageBitMap and Motivation behind the project''' ==&lt;br /&gt;
We usually decode images for a use with canvas to allow users to customize an avatar, crop an image, or just zoom in on a picture. The problem with decoding images is that it can be CPU intensive, and that can sometimes mean jank or checkerboarding.&lt;br /&gt;
&lt;br /&gt;
But the createImageBitmap() method allows us to decode the image in the background and get access to a new ImageBitmap primitive, which you can draw into a canvas in the same way you would an &amp;lt;img&amp;gt; element, another canvas, or a video.&lt;br /&gt;
&lt;br /&gt;
The aim of this project is to develop the ImageBitmap for the servo environment. &lt;br /&gt;
&lt;br /&gt;
This can be done in the steps mentioned in the following section.&lt;br /&gt;
&lt;br /&gt;
== '''Steps for implementation''' ==&lt;br /&gt;
&lt;br /&gt;
'''Initial Phase'''&lt;br /&gt;
* '''Step 1: '''Add a ImageBitmap WebIDL interface to ''components/script/dom/webidl''s and Rust implementation in components/script/dom/imagebitmap.rs&lt;br /&gt;
* '''Step 2: ''' Add the ''createImageBitmap'' method that takes no extra x/y/w/h parameters in ''component/script/dom/webidls/WindowOrWorkerGlobalScope.webidl'' and implement the method in ''component/script/dom/window.rs'', handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources&lt;br /&gt;
&lt;br /&gt;
'''Subsequent phase'''&lt;br /&gt;
* '''Step 1: '''Implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)&lt;br /&gt;
* '''Step 2: '''Implement the ''createImageBitmap'' overload that accepts x/y/w/h parameters&lt;br /&gt;
* '''Step 3: '''Implement support for ImageBitmaps as canvas image sources in ''components/script/canvas_state.rs''&lt;br /&gt;
[[File:AllSteps.jpg]]&lt;br /&gt;
&lt;br /&gt;
== '''Previous Implementation''' ==&lt;br /&gt;
The steps that have been implemented so far in this project by the previous batch are:&lt;br /&gt;
&lt;br /&gt;
'''Step 1:''' Added the ImageBitmap interface to ''components/script/dom/webidls'' that represents a bitmap image which can be drawn to a &amp;lt;canvas&amp;gt; without undue latency. The interface contains height and weight as its attributes which are read only unsigned long integers.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//[Exposed=(Window,Worker), Serializable, Transferable]&lt;br /&gt;
[Exposed=(Window,Worker)]&lt;br /&gt;
interface ImageBitmap {&lt;br /&gt;
  readonly attribute unsigned long width;&lt;br /&gt;
  readonly attribute unsigned long height;&lt;br /&gt;
  //void close();&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
typedef (CanvasImageSource or&lt;br /&gt;
         Blob or&lt;br /&gt;
         ImageData) ImageBitmapSource;&lt;br /&gt;
&lt;br /&gt;
enum ImageOrientation { &amp;quot;none&amp;quot;, &amp;quot;flipY&amp;quot; };&lt;br /&gt;
enum PremultiplyAlpha { &amp;quot;none&amp;quot;, &amp;quot;premultiply&amp;quot;, &amp;quot;default&amp;quot; };&lt;br /&gt;
enum ColorSpaceConversion { &amp;quot;none&amp;quot;, &amp;quot;default&amp;quot; };&lt;br /&gt;
enum ResizeQuality { &amp;quot;pixelated&amp;quot;, &amp;quot;low&amp;quot;, &amp;quot;medium&amp;quot;, &amp;quot;high&amp;quot; };&lt;br /&gt;
&lt;br /&gt;
dictionary ImageBitmapOptions {&lt;br /&gt;
  ImageOrientation imageOrientation = &amp;quot;none&amp;quot;;&lt;br /&gt;
  PremultiplyAlpha premultiplyAlpha = &amp;quot;default&amp;quot;;&lt;br /&gt;
  ColorSpaceConversion colorSpaceConversion = &amp;quot;default&amp;quot;;&lt;br /&gt;
  [EnforceRange] unsigned long resizeWidth;&lt;br /&gt;
  [EnforceRange] unsigned long resizeHeight;&lt;br /&gt;
  ResizeQuality resizeQuality = &amp;quot;low&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ImageBitmap webidl also defines a dictionary for various ImageBitmap Options that can be used to modify the ImageBitmap object.&lt;br /&gt;
&lt;br /&gt;
'''Step 2:''' Implemented the rust code for the webidl interface at ''components/script/dom/imagebitmap.rs''. For more details on the code [https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_M2000._Implement_ImageBitMap_web_API#Implementation visit]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use crate::dom::bindings::cell::DomRefCell;&lt;br /&gt;
&lt;br /&gt;
use crate::dom::bindings::codegen::Bindings::ImageBitmapBinding::ImageBitmapMethods;&lt;br /&gt;
use crate::dom::bindings::root::DomRoot;&lt;br /&gt;
use crate::dom::globalscope::GlobalScope;&lt;br /&gt;
&lt;br /&gt;
use crate::dom::bindings::error::Fallible;&lt;br /&gt;
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};&lt;br /&gt;
use dom_struct::dom_struct;&lt;br /&gt;
&lt;br /&gt;
use std::vec::Vec;&lt;br /&gt;
&lt;br /&gt;
#[dom_struct]&lt;br /&gt;
pub struct ImageBitmap {&lt;br /&gt;
    reflector_: Reflector,&lt;br /&gt;
    width: u32,&lt;br /&gt;
    height: u32,&lt;br /&gt;
    bitmap_data: DomRefCell&amp;lt;Vec&amp;lt;u8&amp;gt;&amp;gt;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
impl ImageBitmap {&lt;br /&gt;
    fn new_inherited(width_arg: u32, height_arg: u32) -&amp;gt; ImageBitmap {&lt;br /&gt;
        ImageBitmap {&lt;br /&gt;
            reflector_: Reflector::new(),&lt;br /&gt;
            width: width_arg,&lt;br /&gt;
            height: height_arg,&lt;br /&gt;
            bitmap_data: DomRefCell::new(vec![]),&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    #[allow(dead_code)]&lt;br /&gt;
    pub fn new(global: &amp;amp;GlobalScope, width: u32, height: u32) -&amp;gt; Fallible&amp;lt;DomRoot&amp;lt;ImageBitmap&amp;gt;&amp;gt; {&lt;br /&gt;
        //assigning to a variable the return object of new_inherited&lt;br /&gt;
        let imagebitmap = Box::new(ImageBitmap::new_inherited(width, height));&lt;br /&gt;
&lt;br /&gt;
        Ok(reflect_dom_object(imagebitmap, global))&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code also implements the getter methods for height and width attribute of an ImageBitmap object.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
impl ImageBitmapMethods for ImageBitmap {&lt;br /&gt;
    // https://html.spec.whatwg.org/multipage/#dom-imagebitmap-height&lt;br /&gt;
    fn Height(&amp;amp;self) -&amp;gt; u32 {&lt;br /&gt;
        //to do: add a condition for checking detached internal slot&lt;br /&gt;
        //and return 0 if set to true&lt;br /&gt;
        self.height&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // https://html.spec.whatwg.org/multipage/#dom-imagebitmap-width&lt;br /&gt;
    fn Width(&amp;amp;self) -&amp;gt; u32 {&lt;br /&gt;
        //to do: add a condition to check detached internal slot&lt;br /&gt;
        ////and return 0 if set to true&lt;br /&gt;
        self.width&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Proposed Implementation''' ==&lt;br /&gt;
Among the remaining steps in the initial and subsequent phases, the focus will be on step 2 of initial phase and once there is progress made on this step, implementation of the subsequent steps will take place. &lt;br /&gt;
&lt;br /&gt;
;Implementing createImageBitmap web API&lt;br /&gt;
&lt;br /&gt;
:*The createImageBitmap() method creates a bitmap from a given source, optionally cropped to contain only a portion of that source. The method exists on the global scope in both windows and workers. It accepts a variety of different image sources, and returns a Promise which resolves to an ImageBitmap.&lt;br /&gt;
:*This web interface is defined in the file ''components/script/dom/webidls/WindowOrWorkerGlobalScope.webidl'' and rust code is implemented at ''components/script/dom/globalscope.rs''. It is then called in ''components/script/dom/window.rs'' and ''components/script/dom/workerglobalscope.rs''&lt;br /&gt;
:*The syntax of the method looks like&lt;br /&gt;
:::const imageBitmapPromise = createImageBitmap(image[, options]);&lt;br /&gt;
:::const imageBitmapPromise = createImageBitmap(image, sx, sy, sw, sh[, options]);&lt;br /&gt;
::where the parameters indicate:&lt;br /&gt;
:::'''image:''' an image source, which can be an img element, a SVG image element, a video element, a canvas element, a blob object, an ImageData object or another ImageBitmap object.&lt;br /&gt;
:::'''sx, sy, sw, sh:''' if given, source image is cropped to the given pixels.&lt;br /&gt;
:::'''options (Optional):''' the ImageBitmap object's bitmap data is modified according to options. Available options are:&lt;br /&gt;
:::*imageOrientation&lt;br /&gt;
:::*premultiplyAlpha&lt;br /&gt;
:::*colorSpaceConversion&lt;br /&gt;
:::*resizeWidth&lt;br /&gt;
:::*resizeHeight&lt;br /&gt;
:::*resizeQuality&lt;br /&gt;
:::: You can read more about these options [https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/createImageBitmap here]&lt;br /&gt;
::The return value is a Promise that is resolved when a new ImageBitmap is created.&lt;br /&gt;
:* As a first step, we will be implementing the method to handle canvas elements. Subsequently, we will be enhancing the method to handle other image sources and the x/y/w/h parameters.&lt;br /&gt;
&lt;br /&gt;
;Implementing close() method from previous work&lt;br /&gt;
&lt;br /&gt;
:* close() is a method in the ImageBitmap interface. It is implemented in ''components/script/dom/imagebitmap.rs'' file.&lt;br /&gt;
:* This method disposes of all graphical resources associated with an ImageBitmap.&lt;br /&gt;
&lt;br /&gt;
== '''Current Progress''' ==&lt;br /&gt;
&lt;br /&gt;
* Implemented createImageBitmap method for canvas image source(HTMLCanvasElement and OffscreenCanvas) using RUST programming language in the '''components/script/dom/globalscope.rs''' file. The comments in the following code will explain the functionality that it carries out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// https://html.spec.whatwg.org/multipage/#dom-createimagebitmap&lt;br /&gt;
pub fn create_image_bitmap(&lt;br /&gt;
    &amp;amp;self,&lt;br /&gt;
    image: ImageBitmapSource,&lt;br /&gt;
    options: &amp;amp;ImageBitmapOptions,&lt;br /&gt;
) -&amp;gt; Rc&amp;lt;Promise&amp;gt; {&lt;br /&gt;
    let in_realm_proof = AlreadyInRealm::assert(&amp;amp;self);&lt;br /&gt;
    // Created a new promise object p&lt;br /&gt;
    let p = Promise::new_in_current_realm(&amp;amp;self, InRealm::Already(&amp;amp;in_realm_proof));&lt;br /&gt;
&lt;br /&gt;
    // If resizewidth is present and is equal to 0, reject p with InvalidState error&lt;br /&gt;
    if options.resizeWidth.map_or(false, |w| w == 0) {&lt;br /&gt;
        p.reject_error(Error::InvalidState);&lt;br /&gt;
        return p;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // If resizeheight is present and is equal to 0, reject p with InvalidState error&lt;br /&gt;
    if options.resizeHeight.map_or(false, |w| w == 0) {&lt;br /&gt;
        p.reject_error(Error::InvalidState);&lt;br /&gt;
        return p;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // match the image to different types of image source and return the resolved p&lt;br /&gt;
    let promise = match image {&lt;br /&gt;
        // check if image source is HTMLCanvasElement&lt;br /&gt;
        ImageBitmapSource::HTMLCanvasElement(ref canvas) =&amp;gt; {&lt;br /&gt;
            // https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument&lt;br /&gt;
            // check if the image source is valid&lt;br /&gt;
            if !canvas.is_valid() {&lt;br /&gt;
                p.reject_error(Error::InvalidState);&lt;br /&gt;
                return p;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            // the fetch_all_data() method returns the bitmap data and size of the image&lt;br /&gt;
            if let Some((data, size)) = canvas.fetch_all_data() {&lt;br /&gt;
                // convert the data to a &amp;lt;vec&amp;gt; type&lt;br /&gt;
                let data = data&lt;br /&gt;
                    .map(|data| data.to_vec())&lt;br /&gt;
                    .unwrap_or_else(|| vec![0; size.area() as usize * 4]);&lt;br /&gt;
                //create imageBitmap object using the height and width of the image&lt;br /&gt;
                let image_bitmap = ImageBitmap::new(&amp;amp;self, size.width, size.height).unwrap();&lt;br /&gt;
&lt;br /&gt;
                // copy the data to bitmap_data of imageBitmap object&lt;br /&gt;
                image_bitmap.set_bitmap_data(data);&lt;br /&gt;
                // copy the origin clean flag of canvas image to origin_clean flag of imageBitmap object&lt;br /&gt;
                image_bitmap.set_origin_clean(canvas.origin_is_clean());&lt;br /&gt;
                // resolve p with imageBitmap object&lt;br /&gt;
                p.resolve_native(&amp;amp;(image_bitmap));&lt;br /&gt;
            }&lt;br /&gt;
            p&lt;br /&gt;
        },&lt;br /&gt;
        // check if image source is OffscreenCanvas&lt;br /&gt;
        ImageBitmapSource::OffscreenCanvas(ref canvas) =&amp;gt; {&lt;br /&gt;
            // https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument&lt;br /&gt;
            // check if the image source is valid&lt;br /&gt;
            if !canvas.is_valid() {&lt;br /&gt;
                p.reject_error(Error::InvalidState);&lt;br /&gt;
                return p;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            // the fetch_all_data() method returns the bitmap data and size of the image&lt;br /&gt;
            if let Some((data, size)) = canvas.fetch_all_data() {&lt;br /&gt;
                // convert the data to a &amp;lt;vec&amp;gt; type&lt;br /&gt;
                let data = data&lt;br /&gt;
                    .map(|data| data.to_vec())&lt;br /&gt;
                    .unwrap_or_else(|| vec![0; size.area() as usize * 4]);&lt;br /&gt;
                //create imageBitmap object using the height and width of the image&lt;br /&gt;
                let image_bitmap = ImageBitmap::new(&amp;amp;self, size.width, size.height).unwrap();&lt;br /&gt;
&lt;br /&gt;
                // copy the data to bitmap_data of imageBitmap object&lt;br /&gt;
                image_bitmap.set_bitmap_data(data);&lt;br /&gt;
                // copy the origin clean flag of canvas image to origin_clean flag of imageBitmap object&lt;br /&gt;
                image_bitmap.set_origin_clean(canvas.origin_is_clean());&lt;br /&gt;
                // resolve p with imageBitmap object&lt;br /&gt;
                p.resolve_native(&amp;amp;(image_bitmap));&lt;br /&gt;
            }&lt;br /&gt;
            p&lt;br /&gt;
        },&lt;br /&gt;
        _ =&amp;gt; {&lt;br /&gt;
            // if the image source is not HTMLCanvasElement or OffscreenCanvas, reject p with NotSupported Error&lt;br /&gt;
            p.reject_error(Error::NotSupported);&lt;br /&gt;
            return p;&lt;br /&gt;
        },&lt;br /&gt;
    };&lt;br /&gt;
    promise&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Tested the build using ‘mach’ commands&lt;br /&gt;
&lt;br /&gt;
== '''Design of the createImageBitmap() method''' ==&lt;br /&gt;
&lt;br /&gt;
On invoking the createImageBitmap(image, options) or the createImageBitmap(image sx, sy, sw, sh, options) the following in the sequence of actions&lt;br /&gt;
&lt;br /&gt;
[[File:fig1.png|border]] &lt;br /&gt;
&lt;br /&gt;
Switching on the &amp;quot;image&amp;quot; argument the following is the sequence of actions &lt;br /&gt;
&lt;br /&gt;
=== If the image is an SVGImage===&lt;br /&gt;
[[File:fig2.png|border]]&lt;br /&gt;
&lt;br /&gt;
=== If the image is a video===&lt;br /&gt;
[[File:ReFigure3.png|border]] &lt;br /&gt;
&lt;br /&gt;
=== If the image is a canvas===&lt;br /&gt;
[[File:ReFigure4.png|border]]&lt;br /&gt;
 &lt;br /&gt;
=== If the image is an ImageBitmap===&lt;br /&gt;
[[File:ImageBitmap.jpg|border]]&lt;br /&gt;
&lt;br /&gt;
=== If the image is an ImageData===&lt;br /&gt;
[[File:ImageData.jpg|border]]&lt;br /&gt;
&lt;br /&gt;
=='''Test Plan'''==&lt;br /&gt;
The following are the respective steps in testing:&lt;br /&gt;
* &amp;lt;b&amp;gt;Servo check should be successful.&amp;lt;/b&amp;gt;&lt;br /&gt;
The compiling time for servo build takes a lot of time. In order to make sure that our changes didn't break any of the existing features quickly, we run &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For Linux or macOS:&lt;br /&gt;
    ./mach check&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For Windows:&lt;br /&gt;
    mach.bat check&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:machCheck.png]]&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Servo building test should be successful.&amp;lt;/b&amp;gt;&lt;br /&gt;
The compiling time is based on the CPU clock speed and the OS of the system where the file is being run. For a 64-bit Linux OS, it takes from about 1 hour to 2 hours for the entire build. It takes 2.5 hours on Windows OS. This is done to make sure that the end-to-end implementation can be successfully run in a system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For Linux or macOS:&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For Windows:&lt;br /&gt;
    mach.bat build --dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:machBuild.png]]&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Check for the file tidiness (following standards of servo) using the command:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For Linux or macOS:&lt;br /&gt;
    ./mach test-tidy&lt;br /&gt;
    ./mach fmt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For Windows:&lt;br /&gt;
    mach.bat test-tidy&lt;br /&gt;
    mach.bat fmt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:machTestTidy.png]]&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;Servo automated Unit-testing should be successful.&amp;lt;/b&amp;gt;&lt;br /&gt;
Running the following commands will run all the unit-tests&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For Linux or macOS:&lt;br /&gt;
    ./mach test-unit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For Windows:&lt;br /&gt;
    mach.bat test-unit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: A log file can be maintained to make keep a check on the tests that are passing.&lt;br /&gt;
* &amp;lt;b&amp;gt;Update the automated servo Web Platform tests(wpt):&amp;lt;/b&amp;gt;&lt;br /&gt;
For a DOM feature, extensive tests already exist under tests/wpt. Any change in DOM would require updating the expected results in the automated tests.&lt;br /&gt;
&lt;br /&gt;
This first requires storing the log in raw format from a test run, for example by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach test-wpt --log-raw /path/for/storing/log/file/&amp;lt;filename&amp;gt;.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once log is saved, then run to update test expectations&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach update-wpt /path/to/logfile/&amp;lt;filename&amp;gt;.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt; Finally, to run the servo with a webpage (Google.com) to visually confirm that servo is working:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For Linux or macOS:&lt;br /&gt;
    ./mach run https://www.google.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For Windows:&lt;br /&gt;
    mach.bat run https://www.google.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:machRun.png]]&lt;br /&gt;
&lt;br /&gt;
== '''Future Work ''' == &lt;br /&gt;
The createImageBitmap() method can be extended to support the subsequent steps as shown in the steps for implementation. &lt;br /&gt;
- The method can be extended to support other image sources such as SVGImage, video sources, ImageData source, and so on. &lt;br /&gt;
- Overload the createImageBitmap() method to accept the s/y/w/h parameters &lt;br /&gt;
- Also implement support for ImageBitmaps as canvas image sources in the canvas_state.rs file &lt;br /&gt;
&lt;br /&gt;
=='''Code submission and Pull request'''==&lt;br /&gt;
&lt;br /&gt;
'''Code: '''[https://github.com/ramyananth/servo] &amp;lt;br/&amp;gt;&lt;br /&gt;
'''Pull Request: '''[https://github.com/servo/servo/pull/26296]&lt;br /&gt;
&lt;br /&gt;
== '''Team Details''' ==&lt;br /&gt;
 &lt;br /&gt;
Jayalakshmi Vishwanathan (jviswan@ncsu.edu) &lt;br /&gt;
 &lt;br /&gt;
Nita Radhakrishnan (nradhak2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Ramya Ananth (rananth2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sandeep Kundala (skundal@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Mentor Details''' ==&lt;br /&gt;
Jay Modi &lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
 &lt;br /&gt;
* [https://en.wikipedia.org/wiki/Servo_(software)| What is servo?]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Rust_(programming_language)| what is RUST programming?]&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133286</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133286"/>
		<updated>2020-04-13T21:19:56Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: /* About ImageBitMap and Motivation behind the project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;br /&gt;
&lt;br /&gt;
Many of the components of Servo are still under development and one such feature is the [https://www.techopedia.com/definition/792/bitmap-bmp| ImageBitmap].&lt;br /&gt;
&lt;br /&gt;
Major browsers support the ImageBitmap standard which can be used to create images that are ready to be drawn efficiently to [https://en.wikipedia.org/wiki/Canvas_element| HTML canvas elements]. Servo is a new, experimental browser that supports these canvas APIs. &lt;br /&gt;
&lt;br /&gt;
The goal of and motivation behind this project is to implement support for image bitmaps and improve our canvas automated test coverage as a result.&lt;br /&gt;
&lt;br /&gt;
== '''About ImageBitMap and Motivation behind the project''' ==&lt;br /&gt;
We usually decode images for a use with canvas to allow users to customize an avatar, crop an image, or just zoom in on a picture. The problem with decoding images is that it can be CPU intensive, and that can sometimes mean jank or checkerboarding.&lt;br /&gt;
&lt;br /&gt;
But the createImageBitmap() method allows us to decode the image in the background and get access to a new ImageBitmap primitive, which you can draw into a canvas in the same way you would an &amp;lt;img&amp;gt; element, another canvas, or a video.&lt;br /&gt;
&lt;br /&gt;
The aim of this project is to develop the ImageBitmap for the servo environment. &lt;br /&gt;
&lt;br /&gt;
This can be done in the steps mentioned in the following section.&lt;br /&gt;
&lt;br /&gt;
== '''Steps for implementation''' ==&lt;br /&gt;
&lt;br /&gt;
'''Initial Phase'''&lt;br /&gt;
* '''Step 1: '''Add a ImageBitmap WebIDL interface to ''components/script/dom/webidl''s and Rust implementation in components/script/dom/imagebitmap.rs&lt;br /&gt;
* '''Step 2: ''' Add and implement the ''createImageBitmap'' method that takes no extra x/y/w/h parameters in ''component/script/dom/webidls/Window.webidl'', handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources&lt;br /&gt;
&lt;br /&gt;
'''Subsequent phase'''&lt;br /&gt;
* '''Step 1: '''Implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)&lt;br /&gt;
* '''Step 2: '''Implement the ''createImageBitmap'' overload that accepts x/y/w/h parameters&lt;br /&gt;
* '''Step 3: '''Implement support for ImageBitmaps as canvas image sources in ''components/script/canvas_state.rs''&lt;br /&gt;
[[File:AllSteps.jpg]]&lt;br /&gt;
&lt;br /&gt;
== '''Details about previous work on implementation''' ==&lt;br /&gt;
&lt;br /&gt;
== '''Details about current work on implementation''' ==&lt;br /&gt;
Among the remaining steps in the initial and subsequent phases, the focus will be on step 2 of initial phase and once there is progress made on this step, implementation of the subsequent steps will take place. &lt;br /&gt;
&lt;br /&gt;
Starting with createImageBitmap()&lt;br /&gt;
&lt;br /&gt;
The concept behind the implementation is as follows&lt;br /&gt;
**For web developers pictures from HTML Standards link&amp;quot;**&lt;br /&gt;
&lt;br /&gt;
The options given in the method call for createImageBitmap() are as given below &lt;br /&gt;
**Dictionary of options picture**&lt;br /&gt;
&lt;br /&gt;
Once the method for createImageBitmap() is created the following steps have to be performed &lt;br /&gt;
&lt;br /&gt;
* The close() method should be implemented &lt;br /&gt;
  1. Set this ImageBitmap object's Detached internal slot value to true.&lt;br /&gt;
  2. Unset this ImageBitmap object's bitmap data.&lt;br /&gt;
&lt;br /&gt;
* The getter for width attribute should be created with the following steps &lt;br /&gt;
  1. If this ImageBitmap object's Detached internal slot's value is true, then return 0.&lt;br /&gt;
  2. Return this ImageBitmap object's width, in CSS pixels.&lt;br /&gt;
&lt;br /&gt;
*The getter for height attribute should be implemented with the following steps &lt;br /&gt;
  1. If this ImageBitmap object's Detached internal slot's value is true, then return 0.&lt;br /&gt;
  2. Return this ImageBitmap object's height, in CSS pixels.&lt;br /&gt;
&lt;br /&gt;
== '''Algorithm to design the createImageBitmap() method''' ==&lt;br /&gt;
&lt;br /&gt;
On invoking the createImageBitmap(image, options) or the createImageBitmap(image sx, sy, sw, sh, options) the following in the sequence of actions&lt;br /&gt;
&lt;br /&gt;
**Figure 1** &lt;br /&gt;
&lt;br /&gt;
Switching on the &amp;quot;image&amp;quot; argument the following is the sequence of actions &lt;br /&gt;
&lt;br /&gt;
If the image is an SVGImage&lt;br /&gt;
**Figure 2**&lt;br /&gt;
If the image is a video &lt;br /&gt;
**Figure 3**&lt;br /&gt;
If the image is a canvas&lt;br /&gt;
**Figure 4** &lt;br /&gt;
If the image is a imageBitmap&lt;br /&gt;
**Figure 5**&lt;br /&gt;
If the image is a imageData &lt;br /&gt;
**Figure 6** &lt;br /&gt;
&lt;br /&gt;
=='''Test Plan'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Team Details''' ==&lt;br /&gt;
Sandeep Kundala (skundal@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Nita Radhakrishnan (nradhak2@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Jayalakshmi Vishwanathan (jviswan@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
Ramya Ananth (rananth2@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
== '''Mentor Details''' ==&lt;br /&gt;
Jay Modi &lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
 &lt;br /&gt;
* [https://en.wikipedia.org/wiki/Servo_(software)| What is servo?]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Rust_(programming_language)| what is RUST programming?]&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133285</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133285"/>
		<updated>2020-04-13T21:19:27Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: /* About ImageBitMap */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;br /&gt;
&lt;br /&gt;
Many of the components of Servo are still under development and one such feature is the [https://www.techopedia.com/definition/792/bitmap-bmp| ImageBitmap].&lt;br /&gt;
&lt;br /&gt;
Major browsers support the ImageBitmap standard which can be used to create images that are ready to be drawn efficiently to [https://en.wikipedia.org/wiki/Canvas_element| HTML canvas elements]. Servo is a new, experimental browser that supports these canvas APIs. &lt;br /&gt;
&lt;br /&gt;
The goal of and motivation behind this project is to implement support for image bitmaps and improve our canvas automated test coverage as a result.&lt;br /&gt;
&lt;br /&gt;
== '''About ImageBitMap and Motivation behind the project''' ==&lt;br /&gt;
We usually decode images for a use with canvas to allow users to customize an avatar, crop an image, or just zoom in on a picture. The problem with decoding images is that it can be CPU intensive, and that can sometimes mean jank or checkerboarding.&lt;br /&gt;
&lt;br /&gt;
But the createImageBitmap() method allows us to decode the image in the background and get access to a new ImageBitmap primitive, which you can draw into a canvas in the same way you would an &amp;lt;img&amp;gt; element, another canvas, or a video.&lt;br /&gt;
&lt;br /&gt;
The aim of this project is to develop the ImageBitmap for the servo environment. &lt;br /&gt;
&lt;br /&gt;
This can be done in the following steps.&lt;br /&gt;
&lt;br /&gt;
== '''Steps for implementation''' ==&lt;br /&gt;
&lt;br /&gt;
'''Initial Phase'''&lt;br /&gt;
* '''Step 1: '''Add a ImageBitmap WebIDL interface to ''components/script/dom/webidl''s and Rust implementation in components/script/dom/imagebitmap.rs&lt;br /&gt;
* '''Step 2: ''' Add and implement the ''createImageBitmap'' method that takes no extra x/y/w/h parameters in ''component/script/dom/webidls/Window.webidl'', handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources&lt;br /&gt;
&lt;br /&gt;
'''Subsequent phase'''&lt;br /&gt;
* '''Step 1: '''Implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)&lt;br /&gt;
* '''Step 2: '''Implement the ''createImageBitmap'' overload that accepts x/y/w/h parameters&lt;br /&gt;
* '''Step 3: '''Implement support for ImageBitmaps as canvas image sources in ''components/script/canvas_state.rs''&lt;br /&gt;
[[File:AllSteps.jpg]]&lt;br /&gt;
&lt;br /&gt;
== '''Details about previous work on implementation''' ==&lt;br /&gt;
&lt;br /&gt;
== '''Details about current work on implementation''' ==&lt;br /&gt;
Among the remaining steps in the initial and subsequent phases, the focus will be on step 2 of initial phase and once there is progress made on this step, implementation of the subsequent steps will take place. &lt;br /&gt;
&lt;br /&gt;
Starting with createImageBitmap()&lt;br /&gt;
&lt;br /&gt;
The concept behind the implementation is as follows&lt;br /&gt;
**For web developers pictures from HTML Standards link&amp;quot;**&lt;br /&gt;
&lt;br /&gt;
The options given in the method call for createImageBitmap() are as given below &lt;br /&gt;
**Dictionary of options picture**&lt;br /&gt;
&lt;br /&gt;
Once the method for createImageBitmap() is created the following steps have to be performed &lt;br /&gt;
&lt;br /&gt;
* The close() method should be implemented &lt;br /&gt;
  1. Set this ImageBitmap object's Detached internal slot value to true.&lt;br /&gt;
  2. Unset this ImageBitmap object's bitmap data.&lt;br /&gt;
&lt;br /&gt;
* The getter for width attribute should be created with the following steps &lt;br /&gt;
  1. If this ImageBitmap object's Detached internal slot's value is true, then return 0.&lt;br /&gt;
  2. Return this ImageBitmap object's width, in CSS pixels.&lt;br /&gt;
&lt;br /&gt;
*The getter for height attribute should be implemented with the following steps &lt;br /&gt;
  1. If this ImageBitmap object's Detached internal slot's value is true, then return 0.&lt;br /&gt;
  2. Return this ImageBitmap object's height, in CSS pixels.&lt;br /&gt;
&lt;br /&gt;
== '''Algorithm to design the createImageBitmap() method''' ==&lt;br /&gt;
&lt;br /&gt;
On invoking the createImageBitmap(image, options) or the createImageBitmap(image sx, sy, sw, sh, options) the following in the sequence of actions&lt;br /&gt;
&lt;br /&gt;
**Figure 1** &lt;br /&gt;
&lt;br /&gt;
Switching on the &amp;quot;image&amp;quot; argument the following is the sequence of actions &lt;br /&gt;
&lt;br /&gt;
If the image is an SVGImage&lt;br /&gt;
**Figure 2**&lt;br /&gt;
If the image is a video &lt;br /&gt;
**Figure 3**&lt;br /&gt;
If the image is a canvas&lt;br /&gt;
**Figure 4** &lt;br /&gt;
If the image is a imageBitmap&lt;br /&gt;
**Figure 5**&lt;br /&gt;
If the image is a imageData &lt;br /&gt;
**Figure 6** &lt;br /&gt;
&lt;br /&gt;
=='''Test Plan'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Team Details''' ==&lt;br /&gt;
Sandeep Kundala (skundal@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Nita Radhakrishnan (nradhak2@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Jayalakshmi Vishwanathan (jviswan@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
Ramya Ananth (rananth2@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
== '''Mentor Details''' ==&lt;br /&gt;
Jay Modi &lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
 &lt;br /&gt;
* [https://en.wikipedia.org/wiki/Servo_(software)| What is servo?]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Rust_(programming_language)| what is RUST programming?]&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133282</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133282"/>
		<updated>2020-04-13T21:07:50Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;br /&gt;
&lt;br /&gt;
Many of the components of Servo are still under development and one such feature is the [https://www.techopedia.com/definition/792/bitmap-bmp| ImageBitmap].&lt;br /&gt;
&lt;br /&gt;
Major browsers support the ImageBitmap standard which can be used to create images that are ready to be drawn efficiently to [https://en.wikipedia.org/wiki/Canvas_element| HTML canvas elements]. Servo is a new, experimental browser that supports these canvas APIs. &lt;br /&gt;
&lt;br /&gt;
The goal of and motivation behind this project is to implement support for image bitmaps and improve our canvas automated test coverage as a result.&lt;br /&gt;
&lt;br /&gt;
== '''About ImageBitMap''' ==&lt;br /&gt;
&lt;br /&gt;
== '''Steps for implementation''' ==&lt;br /&gt;
&lt;br /&gt;
'''Initial Phase'''&lt;br /&gt;
* '''Step 1: '''Add a ImageBitmap WebIDL interface to ''components/script/dom/webidl''s and Rust implementation in components/script/dom/imagebitmap.rs&lt;br /&gt;
* '''Step 2: ''' Add and implement the ''createImageBitmap'' method that takes no extra x/y/w/h parameters in ''component/script/dom/webidls/Window.webidl'', handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources&lt;br /&gt;
&lt;br /&gt;
'''Subsequent phase'''&lt;br /&gt;
* '''Step 1: '''Implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)&lt;br /&gt;
* '''Step 2: '''Implement the ''createImageBitmap'' overload that accepts x/y/w/h parameters&lt;br /&gt;
* '''Step 3: '''Implement support for ImageBitmaps as canvas image sources in ''components/script/canvas_state.rs''&lt;br /&gt;
[[File:AllSteps.jpg]]&lt;br /&gt;
&lt;br /&gt;
== '''Details about previous work on implementation''' ==&lt;br /&gt;
&lt;br /&gt;
== '''Details about current work on implementation''' ==&lt;br /&gt;
Among the remaining steps in the initial and subsequent phases, the focus will be on step 2 of initial phase and once there is progress made on this step, implementation of the subsequent steps will take place. &lt;br /&gt;
&lt;br /&gt;
Starting with createImageBitmap()&lt;br /&gt;
&lt;br /&gt;
The concept behind the implementation is as follows&lt;br /&gt;
**For web developers pictures from HTML Standards link&amp;quot;**&lt;br /&gt;
&lt;br /&gt;
The options given in the method call for createImageBitmap() are as given below &lt;br /&gt;
**Dictionary of options picture**&lt;br /&gt;
&lt;br /&gt;
Once the method for createImageBitmap() is created the following steps have to be performed &lt;br /&gt;
&lt;br /&gt;
* The close() method should be implemented &lt;br /&gt;
  1. Set this ImageBitmap object's Detached internal slot value to true.&lt;br /&gt;
  2. Unset this ImageBitmap object's bitmap data.&lt;br /&gt;
&lt;br /&gt;
* The getter for width attribute should be created with the following steps &lt;br /&gt;
  1. If this ImageBitmap object's Detached internal slot's value is true, then return 0.&lt;br /&gt;
  2. Return this ImageBitmap object's width, in CSS pixels.&lt;br /&gt;
&lt;br /&gt;
*The getter for height attribute should be implemented with the following steps &lt;br /&gt;
  1. If this ImageBitmap object's Detached internal slot's value is true, then return 0.&lt;br /&gt;
  2. Return this ImageBitmap object's height, in CSS pixels.&lt;br /&gt;
&lt;br /&gt;
== '''Algorithm to design the createImageBitmap() method''' ==&lt;br /&gt;
&lt;br /&gt;
On invoking the createImageBitmap(image, options) or the createImageBitmap(image sx, sy, sw, sh, options) the following in the sequence of actions&lt;br /&gt;
&lt;br /&gt;
**Figure 1** &lt;br /&gt;
&lt;br /&gt;
Switching on the &amp;quot;image&amp;quot; argument the following is the sequence of actions &lt;br /&gt;
&lt;br /&gt;
If the image is an SVGImage&lt;br /&gt;
**Figure 2**&lt;br /&gt;
If the image is a video &lt;br /&gt;
**Figure 3**&lt;br /&gt;
If the image is a canvas&lt;br /&gt;
**Figure 4** &lt;br /&gt;
If the image is a imageBitmap&lt;br /&gt;
**Figure 5**&lt;br /&gt;
If the image is a imageData &lt;br /&gt;
**Figure 6** &lt;br /&gt;
&lt;br /&gt;
=='''Test Plan'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Team Details''' ==&lt;br /&gt;
Sandeep Kundala (skundal@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Nita Radhakrishnan (nradhak2@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Jayalakshmi Vishwanathan (jviswan@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
Ramya Ananth (rananth2@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
== '''Mentor Details''' ==&lt;br /&gt;
Jay Modi &lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
 &lt;br /&gt;
* [https://en.wikipedia.org/wiki/Servo_(software)| What is servo?]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Rust_(programming_language)| what is RUST programming?]&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133281</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133281"/>
		<updated>2020-04-13T21:06:34Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: /* Details about current work on implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;br /&gt;
&lt;br /&gt;
Many of the components of Servo are still under development and one such feature is the [https://www.techopedia.com/definition/792/bitmap-bmp| ImageBitmap].&lt;br /&gt;
&lt;br /&gt;
Major browsers support the ImageBitmap standard which can be used to create images that are ready to be drawn efficiently to [https://en.wikipedia.org/wiki/Canvas_element| HTML canvas elements]. Servo is a new, experimental browser that supports these canvas APIs. &lt;br /&gt;
&lt;br /&gt;
The goal of and motivation behind this project is to implement support for image bitmaps and improve our canvas automated test coverage as a result.&lt;br /&gt;
&lt;br /&gt;
== '''About ImageBitMap''' ==&lt;br /&gt;
&lt;br /&gt;
== '''Steps for implementation''' ==&lt;br /&gt;
&lt;br /&gt;
'''Initial Phase'''&lt;br /&gt;
* '''Step 1: '''Add a ImageBitmap WebIDL interface to ''components/script/dom/webidl''s and Rust implementation in components/script/dom/imagebitmap.rs&lt;br /&gt;
* '''Step 2: ''' Add and implement the ''createImageBitmap'' method that takes no extra x/y/w/h parameters in ''component/script/dom/webidls/Window.webidl'', handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources&lt;br /&gt;
&lt;br /&gt;
'''Subsequent phase'''&lt;br /&gt;
* '''Step 1: '''Implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)&lt;br /&gt;
* '''Step 2: '''Implement the ''createImageBitmap'' overload that accepts x/y/w/h parameters&lt;br /&gt;
* '''Step 3: '''Implement support for ImageBitmaps as canvas image sources in ''components/script/canvas_state.rs''&lt;br /&gt;
[[File:AllSteps.jpg]]&lt;br /&gt;
&lt;br /&gt;
== '''Details about previous work on implementation''' ==&lt;br /&gt;
&lt;br /&gt;
== '''Details about current work on implementation''' ==&lt;br /&gt;
Among the remaining steps in the initial and subsequent phases, the focus will be on step 2 of initial phase and once there is progress made on this step, implementation of the subsequent steps will take place. &lt;br /&gt;
&lt;br /&gt;
Starting with createImageBitmap()&lt;br /&gt;
&lt;br /&gt;
The concept behind the implementation is as follows&lt;br /&gt;
**For web developers pictures from HTML Standards link&amp;quot;**&lt;br /&gt;
&lt;br /&gt;
The options given in the method call for createImageBitmap() are as given below &lt;br /&gt;
**Dictionary of options picture**&lt;br /&gt;
&lt;br /&gt;
Once the method for createImageBitmap() is created the following steps have to be performed &lt;br /&gt;
&lt;br /&gt;
* The close() method should be implemented &lt;br /&gt;
  1. Set this ImageBitmap object's Detached internal slot value to true.&lt;br /&gt;
  2. Unset this ImageBitmap object's bitmap data.&lt;br /&gt;
&lt;br /&gt;
* The getter for width attribute should be created with the following steps &lt;br /&gt;
  1. If this ImageBitmap object's Detached internal slot's value is true, then return 0.&lt;br /&gt;
  2. Return this ImageBitmap object's width, in CSS pixels.&lt;br /&gt;
&lt;br /&gt;
*The getter for height attribute should be implemented with the following steps &lt;br /&gt;
  1. If this ImageBitmap object's Detached internal slot's value is true, then return 0.&lt;br /&gt;
  2. Return this ImageBitmap object's height, in CSS pixels.&lt;br /&gt;
&lt;br /&gt;
== '''Algorithm to design the createImageBitmap() method''' ==&lt;br /&gt;
&lt;br /&gt;
On invoking the createImageBitmap(image, options) or the createImageBitmap(image sx, sy, sw, sh, options) the following in the sequence of actions&lt;br /&gt;
&lt;br /&gt;
**Figure 1** &lt;br /&gt;
&lt;br /&gt;
Switching on the &amp;quot;image&amp;quot; argument the following is the sequence of actions &lt;br /&gt;
&lt;br /&gt;
If the image is an SVGImage&lt;br /&gt;
**Figure 2**&lt;br /&gt;
If the image is a video &lt;br /&gt;
**Figure 3**&lt;br /&gt;
If the image is a canvas&lt;br /&gt;
**Figure 4** &lt;br /&gt;
If the image is a imageBitmap&lt;br /&gt;
**Figure 5**&lt;br /&gt;
If the image is a imageData &lt;br /&gt;
**Figure 6** &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Team Details''' ==&lt;br /&gt;
Sandeep Kundala (skundal@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Nita Radhakrishnan (nradhak2@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Jayalakshmi Vishwanathan (jviswan@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
Ramya Ananth (rananth2@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
== '''Mentor Details''' ==&lt;br /&gt;
Jay Modi &lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
 &lt;br /&gt;
* [https://en.wikipedia.org/wiki/Servo_(software)| What is servo?]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Rust_(programming_language)| what is RUST programming?]&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133280</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133280"/>
		<updated>2020-04-13T21:06:02Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: /* Details about current work on implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;br /&gt;
&lt;br /&gt;
Many of the components of Servo are still under development and one such feature is the [https://www.techopedia.com/definition/792/bitmap-bmp| ImageBitmap].&lt;br /&gt;
&lt;br /&gt;
Major browsers support the ImageBitmap standard which can be used to create images that are ready to be drawn efficiently to [https://en.wikipedia.org/wiki/Canvas_element| HTML canvas elements]. Servo is a new, experimental browser that supports these canvas APIs. &lt;br /&gt;
&lt;br /&gt;
The goal of and motivation behind this project is to implement support for image bitmaps and improve our canvas automated test coverage as a result.&lt;br /&gt;
&lt;br /&gt;
== '''About ImageBitMap''' ==&lt;br /&gt;
&lt;br /&gt;
== '''Steps for implementation''' ==&lt;br /&gt;
&lt;br /&gt;
'''Initial Phase'''&lt;br /&gt;
* '''Step 1: '''Add a ImageBitmap WebIDL interface to ''components/script/dom/webidl''s and Rust implementation in components/script/dom/imagebitmap.rs&lt;br /&gt;
* '''Step 2: ''' Add and implement the ''createImageBitmap'' method that takes no extra x/y/w/h parameters in ''component/script/dom/webidls/Window.webidl'', handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources&lt;br /&gt;
&lt;br /&gt;
'''Subsequent phase'''&lt;br /&gt;
* '''Step 1: '''Implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)&lt;br /&gt;
* '''Step 2: '''Implement the ''createImageBitmap'' overload that accepts x/y/w/h parameters&lt;br /&gt;
* '''Step 3: '''Implement support for ImageBitmaps as canvas image sources in ''components/script/canvas_state.rs''&lt;br /&gt;
[[File:AllSteps.jpg]]&lt;br /&gt;
&lt;br /&gt;
== '''Details about previous work on implementation''' ==&lt;br /&gt;
&lt;br /&gt;
== '''Details about current work on implementation''' ==&lt;br /&gt;
Among the remaining steps in the initial and subsequent phases, the focus will be on step 2 of initial phase and once there is progress made on this step, implementation of the subsequent steps will take place. &lt;br /&gt;
&lt;br /&gt;
Starting with createImageBitmap()&lt;br /&gt;
&lt;br /&gt;
The concept behind the implementation is as follows&lt;br /&gt;
**For web developers pictures from HTML Standards link&amp;quot;**&lt;br /&gt;
&lt;br /&gt;
The options given in the method call for createImageBitmap() are as given below &lt;br /&gt;
**Dictionary of options picture**&lt;br /&gt;
&lt;br /&gt;
Once the method for createImageBitmap() is created the following steps have to be performed &lt;br /&gt;
&lt;br /&gt;
* The close() method should be implemented &lt;br /&gt;
1. Set this ImageBitmap object's Detached internal slot value to true.&lt;br /&gt;
2. Unset this ImageBitmap object's bitmap data.&lt;br /&gt;
&lt;br /&gt;
* The getter for width attribute should be created with the following steps &lt;br /&gt;
1. If this ImageBitmap object's Detached internal slot's value is true, then return 0.&lt;br /&gt;
2. Return this ImageBitmap object's width, in CSS pixels.&lt;br /&gt;
&lt;br /&gt;
*The getter for height attribute should be implemented with the following steps &lt;br /&gt;
1. If this ImageBitmap object's Detached internal slot's value is true, then return 0.&lt;br /&gt;
2. Return this ImageBitmap object's height, in CSS pixels.&lt;br /&gt;
&lt;br /&gt;
== '''Algorithm to design the createImageBitmap() method''' ==&lt;br /&gt;
&lt;br /&gt;
On invoking the createImageBitmap(image, options) or the createImageBitmap(image sx, sy, sw, sh, options) the following in the sequence of actions&lt;br /&gt;
&lt;br /&gt;
**Figure 1** &lt;br /&gt;
&lt;br /&gt;
Switching on the &amp;quot;image&amp;quot; argument the following is the sequence of actions &lt;br /&gt;
&lt;br /&gt;
If the image is an SVGImage&lt;br /&gt;
**Figure 2**&lt;br /&gt;
If the image is a video &lt;br /&gt;
**Figure 3**&lt;br /&gt;
If the image is a canvas&lt;br /&gt;
**Figure 4** &lt;br /&gt;
If the image is a imageBitmap&lt;br /&gt;
**Figure 5**&lt;br /&gt;
If the image is a imageData &lt;br /&gt;
**Figure 6** &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Team Details''' ==&lt;br /&gt;
Sandeep Kundala (skundal@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Nita Radhakrishnan (nradhak2@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Jayalakshmi Vishwanathan (jviswan@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
Ramya Ananth (rananth2@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
== '''Mentor Details''' ==&lt;br /&gt;
Jay Modi &lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
 &lt;br /&gt;
* [https://en.wikipedia.org/wiki/Servo_(software)| What is servo?]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Rust_(programming_language)| what is RUST programming?]&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133279</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133279"/>
		<updated>2020-04-13T21:05:21Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: /* Details about current work on implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;br /&gt;
&lt;br /&gt;
Many of the components of Servo are still under development and one such feature is the [https://www.techopedia.com/definition/792/bitmap-bmp| ImageBitmap].&lt;br /&gt;
&lt;br /&gt;
Major browsers support the ImageBitmap standard which can be used to create images that are ready to be drawn efficiently to [https://en.wikipedia.org/wiki/Canvas_element| HTML canvas elements]. Servo is a new, experimental browser that supports these canvas APIs. &lt;br /&gt;
&lt;br /&gt;
The goal of and motivation behind this project is to implement support for image bitmaps and improve our canvas automated test coverage as a result.&lt;br /&gt;
&lt;br /&gt;
== '''About ImageBitMap''' ==&lt;br /&gt;
&lt;br /&gt;
== '''Steps for implementation''' ==&lt;br /&gt;
&lt;br /&gt;
'''Initial Phase'''&lt;br /&gt;
* '''Step 1: '''Add a ImageBitmap WebIDL interface to ''components/script/dom/webidl''s and Rust implementation in components/script/dom/imagebitmap.rs&lt;br /&gt;
* '''Step 2: ''' Add and implement the ''createImageBitmap'' method that takes no extra x/y/w/h parameters in ''component/script/dom/webidls/Window.webidl'', handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources&lt;br /&gt;
&lt;br /&gt;
'''Subsequent phase'''&lt;br /&gt;
* '''Step 1: '''Implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)&lt;br /&gt;
* '''Step 2: '''Implement the ''createImageBitmap'' overload that accepts x/y/w/h parameters&lt;br /&gt;
* '''Step 3: '''Implement support for ImageBitmaps as canvas image sources in ''components/script/canvas_state.rs''&lt;br /&gt;
[[File:AllSteps.jpg]]&lt;br /&gt;
&lt;br /&gt;
== '''Details about previous work on implementation''' ==&lt;br /&gt;
&lt;br /&gt;
== '''Details about current work on implementation''' ==&lt;br /&gt;
Among the remaining steps in the initial and subsequent phases, the focus will be on step 2 of initial phase and once there is progress made on this step, implementation of the subsequent steps will take place. &lt;br /&gt;
&lt;br /&gt;
Starting with createImageBitmap()&lt;br /&gt;
&lt;br /&gt;
The concept behind the implementation is as follows&lt;br /&gt;
**For web developers pictures from HTML Standards link&amp;quot;**&lt;br /&gt;
&lt;br /&gt;
The options given in the method call for createImageBitmap() are as given below &lt;br /&gt;
**Dictionary of options picture**&lt;br /&gt;
&lt;br /&gt;
Once the method for createImageBitmap() is created the following steps have to be performed &lt;br /&gt;
&lt;br /&gt;
* The close() method should be implemented &lt;br /&gt;
1. Set this ImageBitmap object's [[Detached]] internal slot value to true.&lt;br /&gt;
2. Unset this ImageBitmap object's bitmap data.&lt;br /&gt;
&lt;br /&gt;
* The getter for width attribute should be created with the following steps &lt;br /&gt;
1. If this ImageBitmap object's [[Detached]] internal slot's value is true, then return 0.&lt;br /&gt;
2. Return this ImageBitmap object's width, in CSS pixels.&lt;br /&gt;
&lt;br /&gt;
*The getter for height attribute should be implemented with the following steps &lt;br /&gt;
1. If this ImageBitmap object's [[Detached]] internal slot's value is true, then return 0.&lt;br /&gt;
2. Return this ImageBitmap object's height, in CSS pixels.&lt;br /&gt;
&lt;br /&gt;
== '''Algorithm to design the createImageBitmap() method''' ==&lt;br /&gt;
&lt;br /&gt;
On invoking the createImageBitmap(image, options) or the createImageBitmap(image sx, sy, sw, sh, options) the following in the sequence of actions&lt;br /&gt;
&lt;br /&gt;
**Figure 1** &lt;br /&gt;
&lt;br /&gt;
Switching on the &amp;quot;image&amp;quot; argument the following is the sequence of actions &lt;br /&gt;
&lt;br /&gt;
If the image is an SVGImage&lt;br /&gt;
**Figure 2**&lt;br /&gt;
If the image is a video &lt;br /&gt;
**Figure 3**&lt;br /&gt;
If the image is a canvas&lt;br /&gt;
**Figure 4** &lt;br /&gt;
If the image is a imageBitmap&lt;br /&gt;
**Figure 5**&lt;br /&gt;
If the image is a imageData &lt;br /&gt;
**Figure 6** &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Team Details''' ==&lt;br /&gt;
Sandeep Kundala (skundal@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Nita Radhakrishnan (nradhak2@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Jayalakshmi Vishwanathan (jviswan@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
Ramya Ananth (rananth2@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
== '''Mentor Details''' ==&lt;br /&gt;
Jay Modi &lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
 &lt;br /&gt;
* [https://en.wikipedia.org/wiki/Servo_(software)| What is servo?]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Rust_(programming_language)| what is RUST programming?]&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133278</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133278"/>
		<updated>2020-04-13T20:59:15Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;br /&gt;
&lt;br /&gt;
Many of the components of Servo are still under development and one such feature is the [https://www.techopedia.com/definition/792/bitmap-bmp| ImageBitmap].&lt;br /&gt;
&lt;br /&gt;
Major browsers support the ImageBitmap standard which can be used to create images that are ready to be drawn efficiently to [https://en.wikipedia.org/wiki/Canvas_element| HTML canvas elements]. Servo is a new, experimental browser that supports these canvas APIs. &lt;br /&gt;
&lt;br /&gt;
The goal of and motivation behind this project is to implement support for image bitmaps and improve our canvas automated test coverage as a result.&lt;br /&gt;
&lt;br /&gt;
== '''About ImageBitMap''' ==&lt;br /&gt;
&lt;br /&gt;
== '''Steps for implementation''' ==&lt;br /&gt;
&lt;br /&gt;
'''Initial Phase'''&lt;br /&gt;
* '''Step 1: '''Add a ImageBitmap WebIDL interface to ''components/script/dom/webidl''s and Rust implementation in components/script/dom/imagebitmap.rs&lt;br /&gt;
* '''Step 2: ''' Add and implement the ''createImageBitmap'' method that takes no extra x/y/w/h parameters in ''component/script/dom/webidls/Window.webidl'', handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources&lt;br /&gt;
&lt;br /&gt;
'''Subsequent phase'''&lt;br /&gt;
* '''Step 1: '''Implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)&lt;br /&gt;
* '''Step 2: '''Implement the ''createImageBitmap'' overload that accepts x/y/w/h parameters&lt;br /&gt;
* '''Step 3: '''Implement support for ImageBitmaps as canvas image sources in ''components/script/canvas_state.rs''&lt;br /&gt;
[[File:AllSteps.jpg]]&lt;br /&gt;
&lt;br /&gt;
== '''Details about previous work on implementation''' ==&lt;br /&gt;
&lt;br /&gt;
== '''Details about current work on implementation''' ==&lt;br /&gt;
Among the remaining steps in the initial and subsequent phases, the focus will be on step 2 of initial phase and once there is progress made on this step, implementation of the subsequent steps will take place. &lt;br /&gt;
&lt;br /&gt;
Starting with createImageBitmap()&lt;br /&gt;
&lt;br /&gt;
The concept behind the implementation is as follows&lt;br /&gt;
**For web developers pictures from HTML Standards link&amp;quot;**&lt;br /&gt;
&lt;br /&gt;
The options given in the method call for createImageBitmap() are as given below &lt;br /&gt;
**Dictionary of options picture**&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Algorithm to design the createImageBitmap() method''' ==&lt;br /&gt;
&lt;br /&gt;
On invoking the createImageBitmap(image, options) or the createImageBitmap(image sx, sy, sw, sh, options) the following in the sequence of actions&lt;br /&gt;
&lt;br /&gt;
**Figure 1** &lt;br /&gt;
&lt;br /&gt;
Switching on the &amp;quot;image&amp;quot; argument the following is the sequence of actions &lt;br /&gt;
&lt;br /&gt;
If the image is an SVGImage&lt;br /&gt;
**Figure 2**&lt;br /&gt;
If the image is a video &lt;br /&gt;
**Figure 3**&lt;br /&gt;
If the image is a canvas&lt;br /&gt;
**Figure 4** &lt;br /&gt;
If the image is a imageBitmap&lt;br /&gt;
**Figure 5**&lt;br /&gt;
If the image is a imageData &lt;br /&gt;
**Figure 6** &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Team Details''' ==&lt;br /&gt;
Sandeep Kundala (skundal@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Nita Radhakrishnan (nradhak2@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Jayalakshmi Vishwanathan (jviswan@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
Ramya Ananth (rananth2@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
== '''Mentor Details''' ==&lt;br /&gt;
Jay Modi &lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
 &lt;br /&gt;
* [https://en.wikipedia.org/wiki/Servo_(software)| What is servo?]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Rust_(programming_language)| what is RUST programming?]&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133277</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133277"/>
		<updated>2020-04-13T20:54:15Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: /* Details about current work on implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;br /&gt;
&lt;br /&gt;
Many of the components of Servo are still under development and one such feature is the [https://www.techopedia.com/definition/792/bitmap-bmp| ImageBitmap].&lt;br /&gt;
&lt;br /&gt;
Major browsers support the ImageBitmap standard which can be used to create images that are ready to be drawn efficiently to [https://en.wikipedia.org/wiki/Canvas_element| HTML canvas elements]. Servo is a new, experimental browser that supports these canvas APIs. &lt;br /&gt;
&lt;br /&gt;
The goal of and motivation behind this project is to implement support for image bitmaps and improve our canvas automated test coverage as a result.&lt;br /&gt;
&lt;br /&gt;
== '''About ImageBitMap''' ==&lt;br /&gt;
&lt;br /&gt;
== '''Steps for implementation''' ==&lt;br /&gt;
&lt;br /&gt;
'''Initial Phase'''&lt;br /&gt;
* '''Step 1: '''Add a ImageBitmap WebIDL interface to ''components/script/dom/webidl''s and Rust implementation in components/script/dom/imagebitmap.rs&lt;br /&gt;
* '''Step 2: ''' Add and implement the ''createImageBitmap'' method that takes no extra x/y/w/h parameters in ''component/script/dom/webidls/Window.webidl'', handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources&lt;br /&gt;
&lt;br /&gt;
'''Subsequent phase'''&lt;br /&gt;
* '''Step 1: '''Implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)&lt;br /&gt;
* '''Step 2: '''Implement the ''createImageBitmap'' overload that accepts x/y/w/h parameters&lt;br /&gt;
* '''Step 3: '''Implement support for ImageBitmaps as canvas image sources in ''components/script/canvas_state.rs''&lt;br /&gt;
[[File:AllSteps.jpg]]&lt;br /&gt;
&lt;br /&gt;
== '''Details about previous work on implementation''' ==&lt;br /&gt;
&lt;br /&gt;
== '''Details about current work on implementation''' ==&lt;br /&gt;
Among the remaining steps in the initial and subsequent phases, the focus will be on step 2 of initial phase and once there is progress made on this step, implementation of the subsequent steps will take place. &lt;br /&gt;
&lt;br /&gt;
Starting with createImageBitmap()&lt;br /&gt;
&lt;br /&gt;
The concept behind the implementation is as follows&lt;br /&gt;
**For web developers pictures from HTML Standards link&amp;quot;**&lt;br /&gt;
&lt;br /&gt;
The options given in the method call for createImageBitmap() are as given below &lt;br /&gt;
**Dictionary of options picture**&lt;br /&gt;
&lt;br /&gt;
== '''Team Details''' ==&lt;br /&gt;
Sandeep Kundala (skundal@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Nita Radhakrishnan (nradhak2@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Jayalakshmi Vishwanathan (jviswan@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
Ramya Ananth (rananth2@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
== '''Mentor Details''' ==&lt;br /&gt;
Jay Modi &lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
 &lt;br /&gt;
* [https://en.wikipedia.org/wiki/Servo_(software)| What is servo?]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Rust_(programming_language)| what is RUST programming?]&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133276</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133276"/>
		<updated>2020-04-13T20:53:46Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;br /&gt;
&lt;br /&gt;
Many of the components of Servo are still under development and one such feature is the [https://www.techopedia.com/definition/792/bitmap-bmp| ImageBitmap].&lt;br /&gt;
&lt;br /&gt;
Major browsers support the ImageBitmap standard which can be used to create images that are ready to be drawn efficiently to [https://en.wikipedia.org/wiki/Canvas_element| HTML canvas elements]. Servo is a new, experimental browser that supports these canvas APIs. &lt;br /&gt;
&lt;br /&gt;
The goal of and motivation behind this project is to implement support for image bitmaps and improve our canvas automated test coverage as a result.&lt;br /&gt;
&lt;br /&gt;
== '''About ImageBitMap''' ==&lt;br /&gt;
&lt;br /&gt;
== '''Steps for implementation''' ==&lt;br /&gt;
&lt;br /&gt;
'''Initial Phase'''&lt;br /&gt;
* '''Step 1: '''Add a ImageBitmap WebIDL interface to ''components/script/dom/webidl''s and Rust implementation in components/script/dom/imagebitmap.rs&lt;br /&gt;
* '''Step 2: ''' Add and implement the ''createImageBitmap'' method that takes no extra x/y/w/h parameters in ''component/script/dom/webidls/Window.webidl'', handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources&lt;br /&gt;
&lt;br /&gt;
'''Subsequent phase'''&lt;br /&gt;
* '''Step 1: '''Implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)&lt;br /&gt;
* '''Step 2: '''Implement the ''createImageBitmap'' overload that accepts x/y/w/h parameters&lt;br /&gt;
* '''Step 3: '''Implement support for ImageBitmaps as canvas image sources in ''components/script/canvas_state.rs''&lt;br /&gt;
[[File:AllSteps.jpg]]&lt;br /&gt;
&lt;br /&gt;
== '''Details about previous work on implementation''' ==&lt;br /&gt;
&lt;br /&gt;
== '''Details about current work on implementation''' ==&lt;br /&gt;
Among the remaining steps in the initial and subsequent phases, the focus will be on step 2 of initial phase and once there is progress made on this step, implementation of the subsequent steps will take place. &lt;br /&gt;
&lt;br /&gt;
Starting with createImageBitmap()&lt;br /&gt;
&lt;br /&gt;
The concept behind the implementation is as follows&lt;br /&gt;
**For web developers pictures from HTML Standards link&amp;quot;**&lt;br /&gt;
&lt;br /&gt;
The options given in the method call for createImageBitmap() are as given below &lt;br /&gt;
**Dictionary of options picture**&lt;br /&gt;
== '''Team Details''' ==&lt;br /&gt;
Sandeep Kundala (skundal@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Nita Radhakrishnan (nradhak2@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Jayalakshmi Vishwanathan (jviswan@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
Ramya Ananth (rananth2@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
== '''Mentor Details''' ==&lt;br /&gt;
Jay Modi &lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
 &lt;br /&gt;
* [https://en.wikipedia.org/wiki/Servo_(software)| What is servo?]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Rust_(programming_language)| what is RUST programming?]&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133275</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133275"/>
		<updated>2020-04-13T20:40:04Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;br /&gt;
&lt;br /&gt;
Many of the components of Servo are still under development and one such feature is the [https://www.techopedia.com/definition/792/bitmap-bmp| ImageBitmap].&lt;br /&gt;
&lt;br /&gt;
Major browsers support the ImageBitmap standard which can be used to create images that are ready to be drawn efficiently to [https://en.wikipedia.org/wiki/Canvas_element| HTML canvas elements]. Servo is a new, experimental browser that supports these canvas APIs. &lt;br /&gt;
&lt;br /&gt;
The goal of and motivation behind this project is to implement support for image bitmaps and improve our canvas automated test coverage as a result.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''About ImageBitMap''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Steps for implementation''' ==&lt;br /&gt;
&lt;br /&gt;
'''Initial Phase'''&lt;br /&gt;
* '''Step 1: '''Add a ImageBitmap WebIDL interface to ''components/script/dom/webidl''s and Rust implementation in components/script/dom/imagebitmap.rs&lt;br /&gt;
* '''Step 2: ''' Add and implement the ''createImageBitmap'' method that takes no extra x/y/w/h parameters in ''component/script/dom/webidls/Window.webidl'', handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources&lt;br /&gt;
&lt;br /&gt;
'''Subsequent phase'''&lt;br /&gt;
* '''Step 1: '''Implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)&lt;br /&gt;
* '''Step 2: '''Implement the ''createImageBitmap'' overload that accepts x/y/w/h parameters&lt;br /&gt;
* '''Step 3: '''Implement support for ImageBitmaps as canvas image sources in ''components/script/canvas_state.rs''&lt;br /&gt;
[[File:AllSteps.jpg]]&lt;br /&gt;
&lt;br /&gt;
== '''Tasks proposed for final project''' ==&lt;br /&gt;
 &lt;br /&gt;
'''Recap of work done in previous stage of development'''  &lt;br /&gt;
&lt;br /&gt;
* ImageBitmap WebIDL interface has been added to ''components/script/dom/webidls''&lt;br /&gt;
* Its Rust code has been implemented in ''components/script/dom/imagebitmap.rs'' &lt;br /&gt;
&lt;br /&gt;
'''Current stage of development'''&lt;br /&gt;
&lt;br /&gt;
In this phase, we propose to complete the remaining tasks in the initial phase. &lt;br /&gt;
&lt;br /&gt;
* Add and implement the ''createImageBitmap'' method that takes no extra x/y/w/h parameters in ''component/script/dom/webidls/Window.webidl'', handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources&lt;br /&gt;
&lt;br /&gt;
Based on the progress of the above task and the time limit, we also propose to complete the tasks in the subsequent phase. &lt;br /&gt;
* '''Step 1: '''Implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)&lt;br /&gt;
* '''Step 2: '''Implement the ''createImageBitmap'' overload that accepts x/y/w/h parameters&lt;br /&gt;
* '''Step 3: '''Implement support for ImageBitmaps as canvas image sources in ''components/script/canvas_state.rs''&lt;br /&gt;
[[File:Status of steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
== '''Team Details''' ==&lt;br /&gt;
Sandeep Kundala (skundal@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Nita Radhakrishnan (nradhak2@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Jayalakshmi Vishwanathan (jviswan@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
Ramya Ananth (rananth2@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
== '''Mentor Details''' ==&lt;br /&gt;
Jay Modi &lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
 &lt;br /&gt;
* [https://en.wikipedia.org/wiki/Servo_(software)| What is servo?]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Rust_(programming_language)| what is RUST programming?]&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133274</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=133274"/>
		<updated>2020-04-13T20:34:08Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: /* Background Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;br /&gt;
&lt;br /&gt;
Many of the components of Servo are still under development and one such feature is the [https://www.techopedia.com/definition/792/bitmap-bmp| ImageBitmap].&lt;br /&gt;
&lt;br /&gt;
Major browsers support the ImageBitmap standard which can be used to create images that are ready to be drawn efficiently to [https://en.wikipedia.org/wiki/Canvas_element| HTML canvas elements]. Servo is a new, experimental browser that supports these canvas APIs. &lt;br /&gt;
&lt;br /&gt;
The goal of and motivation behind this project is to implement support for image bitmaps and improve our canvas automated test coverage as a result.&lt;br /&gt;
&lt;br /&gt;
== '''Steps for implementation''' ==&lt;br /&gt;
&lt;br /&gt;
'''Initial Phase'''&lt;br /&gt;
* '''Step 1: '''Add a ImageBitmap WebIDL interface to ''components/script/dom/webidl''s and Rust implementation in components/script/dom/imagebitmap.rs&lt;br /&gt;
* '''Step 2: ''' Add and implement the ''createImageBitmap'' method that takes no extra x/y/w/h parameters in ''component/script/dom/webidls/Window.webidl'', handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources&lt;br /&gt;
&lt;br /&gt;
'''Subsequent phase'''&lt;br /&gt;
* '''Step 1: '''Implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)&lt;br /&gt;
* '''Step 2: '''Implement the ''createImageBitmap'' overload that accepts x/y/w/h parameters&lt;br /&gt;
* '''Step 3: '''Implement support for ImageBitmaps as canvas image sources in ''components/script/canvas_state.rs''&lt;br /&gt;
[[File:AllSteps.jpg]]&lt;br /&gt;
&lt;br /&gt;
== '''Tasks proposed for final project''' ==&lt;br /&gt;
 &lt;br /&gt;
'''Recap of work done in previous stage of development'''  &lt;br /&gt;
&lt;br /&gt;
* ImageBitmap WebIDL interface has been added to ''components/script/dom/webidls''&lt;br /&gt;
* Its Rust code has been implemented in ''components/script/dom/imagebitmap.rs'' &lt;br /&gt;
&lt;br /&gt;
'''Current stage of development'''&lt;br /&gt;
&lt;br /&gt;
In this phase, we propose to complete the remaining tasks in the initial phase. &lt;br /&gt;
&lt;br /&gt;
* Add and implement the ''createImageBitmap'' method that takes no extra x/y/w/h parameters in ''component/script/dom/webidls/Window.webidl'', handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources&lt;br /&gt;
&lt;br /&gt;
Based on the progress of the above task and the time limit, we also propose to complete the tasks in the subsequent phase. &lt;br /&gt;
* '''Step 1: '''Implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)&lt;br /&gt;
* '''Step 2: '''Implement the ''createImageBitmap'' overload that accepts x/y/w/h parameters&lt;br /&gt;
* '''Step 3: '''Implement support for ImageBitmaps as canvas image sources in ''components/script/canvas_state.rs''&lt;br /&gt;
[[File:Status of steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
== '''Team Details''' ==&lt;br /&gt;
Sandeep Kundala (skundal@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Nita Radhakrishnan (nradhak2@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Jayalakshmi Vishwanathan (jviswan@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
Ramya Ananth (rananth2@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
== '''Mentor Details''' ==&lt;br /&gt;
Jay Modi &lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
 &lt;br /&gt;
* [https://en.wikipedia.org/wiki/Servo_(software)| What is servo?]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Rust_(programming_language)| what is RUST programming?]&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=132883</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=132883"/>
		<updated>2020-04-08T00:45:20Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;br /&gt;
&lt;br /&gt;
Many of the components of Servo are still under development and one such feature is the [https://www.techopedia.com/definition/792/bitmap-bmp| ImageBitmap].&lt;br /&gt;
&lt;br /&gt;
Major browsers support the ImageBitmap standard which can be used to create images that are ready to be drawn efficiently to [https://en.wikipedia.org/wiki/Canvas_element| HTML canvas elements]. Servo is a new, experimental browser that supports these canvas APIs; the goal of this project is to implement support for image bitmaps and improve our canvas automated test coverage as a result.&lt;br /&gt;
&lt;br /&gt;
This project focuses on implementing this feature by following the steps provided in the next section.&lt;br /&gt;
&lt;br /&gt;
== '''Steps for implementation''' ==&lt;br /&gt;
&lt;br /&gt;
'''Initial Phase'''&lt;br /&gt;
* '''Step 1: '''Add a ImageBitmap WebIDL interface to ''components/script/dom/webidl''s and Rust implementation in components/script/dom/imagebitmap.rs&lt;br /&gt;
* '''Step 2: ''' Add and implement the ''createImageBitmap'' method that takes no extra x/y/w/h parameters in ''component/script/dom/webidls/Window.webidl'', handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources&lt;br /&gt;
&lt;br /&gt;
'''Subsequent phase'''&lt;br /&gt;
* '''Step 1: '''Implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)&lt;br /&gt;
* '''Step 2: '''Implement the ''createImageBitmap'' overload that accepts x/y/w/h parameters&lt;br /&gt;
* '''Step 3: '''Implement support for ImageBitmaps as canvas image sources in ''components/script/canvas_state.rs''&lt;br /&gt;
&lt;br /&gt;
== '''Tasks proposed for final project''' ==&lt;br /&gt;
 &lt;br /&gt;
'''Recap of work done in previous stage of development'''  &lt;br /&gt;
&lt;br /&gt;
* ImageBitmap WebIDL interface has been added to ''components/script/dom/webidls''&lt;br /&gt;
* Its Rust code has been implemented in ''components/script/dom/imagebitmap.rs'' &lt;br /&gt;
&lt;br /&gt;
'''Current stage of development'''&lt;br /&gt;
&lt;br /&gt;
In this phase, we propose to complete the remaining tasks in the initial phase. &lt;br /&gt;
&lt;br /&gt;
* Add and implement the ''createImageBitmap'' method that takes no extra x/y/w/h parameters in ''component/script/dom/webidls/Window.webidl'', handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources&lt;br /&gt;
&lt;br /&gt;
Based on the progress of the above task and the time limit, we also propose to complete the tasks in the subsequent phase. &lt;br /&gt;
* '''Step 1: '''Implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)&lt;br /&gt;
* '''Step 2: '''Implement the ''createImageBitmap'' overload that accepts x/y/w/h parameters&lt;br /&gt;
* '''Step 3: '''Implement support for ImageBitmaps as canvas image sources in ''components/script/canvas_state.rs''&lt;br /&gt;
&lt;br /&gt;
== '''Team Details''' ==&lt;br /&gt;
Sandeep Kundala (skundal@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Nita Radhakrishnan (nradhak2@ncsu.edu)&lt;br /&gt;
 &lt;br /&gt;
Jayalakshmi Vishwanathan (jviswan@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
Ramya Ananth (rananth2@ncsu.edu) &lt;br /&gt;
&lt;br /&gt;
== '''Mentor Details''' ==&lt;br /&gt;
Jay Modi &lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
 &lt;br /&gt;
* [https://en.wikipedia.org/wiki/Servo_(software)| What is servo?]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Rust_(programming_language)| what is RUST programming?]&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=132873</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=132873"/>
		<updated>2020-04-08T00:11:41Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: /* Steps for implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;br /&gt;
&lt;br /&gt;
Many of the components of Servo are still under development and one such feature is the [https://www.techopedia.com/definition/792/bitmap-bmp| ImageBitmap].&lt;br /&gt;
&lt;br /&gt;
Major browsers support the ImageBitmap standard which can be used to create images that are ready to be drawn efficiently to [https://en.wikipedia.org/wiki/Canvas_element| HTML canvas elements]. Servo is a new, experimental browser that supports these canvas APIs; the goal of this project is to implement support for image bitmaps and improve our canvas automated test coverage as a result.&lt;br /&gt;
&lt;br /&gt;
This project focuses on implementing this feature by following the steps provided in the next section.&lt;br /&gt;
&lt;br /&gt;
== '''Steps for implementation''' ==&lt;br /&gt;
&lt;br /&gt;
'''Initial Steps'''&lt;br /&gt;
* '''Step 1: '''Add a ImageBitmap WebIDL interface to ''components/script/dom/webidl''s and Rust implementation in components/script/dom/imagebitmap.rs&lt;br /&gt;
* '''Step 2: ''' Add and implement the ''createImageBitmap'' method that takes no extra x/y/w/h parameters in ''component/script/dom/webidls/Window.webidl'', handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources&lt;br /&gt;
&lt;br /&gt;
'''Subsequent steps'''&lt;br /&gt;
* '''Step 1: '''Implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)&lt;br /&gt;
* '''Step 2: '''Implement the ''createImageBitmap'' overload that accepts x/y/w/h parameters&lt;br /&gt;
* '''Step 3: ''' Implement support for ImageBitmaps as canvas image sources in ''components/script/canvas_state.rs''&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=132872</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=132872"/>
		<updated>2020-04-08T00:11:25Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;br /&gt;
&lt;br /&gt;
Many of the components of Servo are still under development and one such feature is the [https://www.techopedia.com/definition/792/bitmap-bmp| ImageBitmap].&lt;br /&gt;
&lt;br /&gt;
Major browsers support the ImageBitmap standard which can be used to create images that are ready to be drawn efficiently to [https://en.wikipedia.org/wiki/Canvas_element| HTML canvas elements]. Servo is a new, experimental browser that supports these canvas APIs; the goal of this project is to implement support for image bitmaps and improve our canvas automated test coverage as a result.&lt;br /&gt;
&lt;br /&gt;
This project focuses on implementing this feature by following the steps provided in the next section.&lt;br /&gt;
&lt;br /&gt;
== '''Steps for implementation''' ==&lt;br /&gt;
&lt;br /&gt;
'''Initial Steps'''&lt;br /&gt;
* '''Step 1:'''Add a ImageBitmap WebIDL interface to ''components/script/dom/webidl''s and Rust implementation in components/script/dom/imagebitmap.rs&lt;br /&gt;
* '''Step 2:''' Add and implement the ''createImageBitmap'' method that takes no extra x/y/w/h parameters in ''component/script/dom/webidls/Window.webidl'', handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources&lt;br /&gt;
&lt;br /&gt;
'''Subsequent steps'''&lt;br /&gt;
* '''Step 1:'''Implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)&lt;br /&gt;
* '''Step 2:'''Implement the ''createImageBitmap'' overload that accepts x/y/w/h parameters&lt;br /&gt;
* '''Step 3:''' Implement support for ImageBitmaps as canvas image sources in ''components/script/canvas_state.rs''&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=132871</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=132871"/>
		<updated>2020-04-08T00:10:44Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;br /&gt;
&lt;br /&gt;
Many of the components of Servo are still under development and one such feature is the [https://www.techopedia.com/definition/792/bitmap-bmp| ImageBitmap].&lt;br /&gt;
&lt;br /&gt;
Major browsers support the ImageBitmap standard which can be used to create images that are ready to be drawn efficiently to [https://en.wikipedia.org/wiki/Canvas_element| HTML canvas elements]. Servo is a new, experimental browser that supports these canvas APIs; the goal of this project is to implement support for image bitmaps and improve our canvas automated test coverage as a result.&lt;br /&gt;
&lt;br /&gt;
This project focuses on implementing this feature by following the steps provided in the next section.&lt;br /&gt;
&lt;br /&gt;
== '''Steps for implementation''' ==&lt;br /&gt;
&lt;br /&gt;
'''Initial Steps'''&lt;br /&gt;
* '''Step 1:'''&lt;br /&gt;
Add a ImageBitmap WebIDL interface to ''components/script/dom/webidl''s and Rust implementation in components/script/dom/imagebitmap.rs&lt;br /&gt;
* '''Step 2:''' &lt;br /&gt;
Add and implement the ''createImageBitmap'' method that takes no extra x/y/w/h parameters in ''component/script/dom/webidls/Window.webidl'', handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources&lt;br /&gt;
&lt;br /&gt;
'''Subsequent steps'''&lt;br /&gt;
* '''Step 1:'''&lt;br /&gt;
Implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)&lt;br /&gt;
* '''Step 2:'''&lt;br /&gt;
Implement the ''createImageBitmap'' overload that accepts x/y/w/h parameters&lt;br /&gt;
* '''Step 3:''' &lt;br /&gt;
Implement support for ImageBitmaps as canvas image sources in ''components/script/canvas_state.rs''&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=132865</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=132865"/>
		<updated>2020-04-08T00:02:46Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;br /&gt;
&lt;br /&gt;
Many of the components of Servo are still under development and one such feature is the [https://www.techopedia.com/definition/792/bitmap-bmp| ImageBitmap].&lt;br /&gt;
&lt;br /&gt;
Major browsers support the ImageBitmap standard which can be used to create images that are ready to be drawn efficiently to [https://en.wikipedia.org/wiki/Canvas_element| HTML canvas elements]. Servo is a new, experimental browser that supports these canvas APIs; the goal of this project is to implement support for image bitmaps and improve our canvas automated test coverage as a result.&lt;br /&gt;
&lt;br /&gt;
This project focuses on implementing this feature by following the steps provided in the next section.&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=132862</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=132862"/>
		<updated>2020-04-07T23:58:26Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;br /&gt;
&lt;br /&gt;
Many of the components of Servo are still under development and one such feature is the ImageBitMap[https://www.techopedia.com/definition/792/bitmap-bmp|ImageBitmap]. This project focuses on implementing this feature by following the steps provided in the next section.&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=132861</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=132861"/>
		<updated>2020-04-07T23:57:33Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;br /&gt;
&lt;br /&gt;
Many of the components of Servo are still under development and one such feature is the ImageBitMap[https://www.techopedia.com/definition/792/bitmap-bmp|ImageBitmap].&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=132860</id>
		<title>CSC/CSC 517 Spring 2020/Implement ImageBitMap WebAPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/CSC_517_Spring_2020/Implement_ImageBitMap_WebAPI&amp;diff=132860"/>
		<updated>2020-04-07T23:49:35Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: Created page with &amp;quot; == '''Background Information''' == This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(usefu...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
This project aims to contribute to Mozilla's experimental browser engine called Servo, which is implemented in a language called RUST(useful for implementing features that need concurrency and memory safety).&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Impersonate_correct_user.jpeg&amp;diff=132578</id>
		<title>File:Impersonate correct user.jpeg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Impersonate_correct_user.jpeg&amp;diff=132578"/>
		<updated>2020-04-01T01:05:19Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Step1.png&amp;diff=132564</id>
		<title>File:Step1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Step1.png&amp;diff=132564"/>
		<updated>2020-04-01T00:30:15Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: Nradhak2 uploaded a new version of File:Step1.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Main_Page/CSC/CSC_517_Spring_2020_Refactor_impersonate_controller&amp;diff=132544</id>
		<title>Main Page/CSC/CSC 517 Spring 2020 Refactor impersonate controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Main_Page/CSC/CSC_517_Spring_2020_Refactor_impersonate_controller&amp;diff=132544"/>
		<updated>2020-03-31T23:57:10Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the work done under E2002 OSS Program for Spring 2020, in the CSC/ECE 517 course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===About Expertiza===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open-source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza is a complete instructor-student usage website where the instructor can assign assignments, deadlines, grades, etc that is required for the course. Similarly, the students can use this website to perform the tasks required as part of the course like project or assignments submission, forming groups and collaborating with them, as well as reviewing projects and teammates.&lt;br /&gt;
&lt;br /&gt;
This project focuses on a specific feature of expertiza which allows administrators, instructors or teaching assistants to impersonate another user (like a student) and access their account. &lt;br /&gt;
The demonstration for the feature is as shown below.&lt;br /&gt;
&lt;br /&gt;
[[File:Impersonate guide.jpg|figure 1|frame|center]]&lt;br /&gt;
         &lt;br /&gt;
&lt;br /&gt;
[[File:Non impersonate.jpg|figure 2|frame|center]]&lt;br /&gt;
         &lt;br /&gt;
[[File:Impersonated view.jpg|figure 3|frame|center]]&lt;br /&gt;
         &lt;br /&gt;
===Problem Statement===&lt;br /&gt;
The aim of the project is to refactor the impersonate controller. The pre-existing code had the following major issues.&lt;br /&gt;
*All functions related to impersonate controller were present in a single method ( from figure 4a and 4b)&lt;br /&gt;
*Presence of repetitive code ( from figure 4a and 4b)&lt;br /&gt;
*3 levels of block nesting (from figure 5)&lt;br /&gt;
* Too many return statements (from figure 6) &lt;br /&gt;
[[File:initial code1.jpg| figure 4a| frame|center]]&lt;br /&gt;
[[File:initial code2.jpg| figure 4b| frame|center]]&lt;br /&gt;
[[File:code climate3.jpg| figure 5| frame|center]]&lt;br /&gt;
[[File:code climate2.jpg| figure 6| frame|center]]&lt;br /&gt;
&lt;br /&gt;
This project is focused on resolving the issues mentioned above. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===About Impersonate Controller===&lt;br /&gt;
Expertiza allows the administrators, instructors or teaching assistants to impersonate another user (like a student) and access their account. For example, an instructor impersonating a student’s account can view their assignments, stage deadlines, peer reviews and anything else that the student can view. &lt;br /&gt;
&lt;br /&gt;
One thing to be noted is that most of these users can only impersonate users for whom they are a parent. For example, instructor6 is a parent of student3841 and not student3836; as a result, instructor6 can impersonate only 3841.&lt;br /&gt;
&lt;br /&gt;
===Impersonate functionality navigation===&lt;br /&gt;
1. Instructor login: username -&amp;gt; instructor6, password -&amp;gt; password&lt;br /&gt;
&lt;br /&gt;
when logged in as an instructor, under the manage option in the ribbon as in Figure 1, select impersonate user. &lt;br /&gt;
Upon redirected to impersonate page, enter the account which needs to be impersonated. It impersonates that user provided that user can be impersonated. Now a new button called revert appears on the ribbon as in figure 3, this can be used to revert the impersonation and return to the instructor profile.&lt;br /&gt;
&lt;br /&gt;
===Problem Solution===&lt;br /&gt;
The above-mentioned issues have been tackled by refactoring the impersonate controller by splitting into many smaller methods which are later called by the main impersonate controller.&lt;br /&gt;
&lt;br /&gt;
The following are the refactored new methods that help in tackling the issue1 apart from each being specifically for some issue rectification:&lt;br /&gt;
*check_if_user_impersonateable&lt;br /&gt;
*display_error_msg&lt;br /&gt;
*overwrite_session&lt;br /&gt;
*check_if_special_char&lt;br /&gt;
*do_main_operartion&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====check_if_user_impersonateable=====&lt;br /&gt;
This method plays the main role in tackling issue3 - 3 levels of block nesting apart from issue1.&lt;br /&gt;
&lt;br /&gt;
'''Intial Code'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if user&lt;br /&gt;
          unless original_user.can_impersonate? user&lt;br /&gt;
            flash[:error] = &amp;quot;You cannot impersonate #{params[:user][:name]}.&amp;quot;&lt;br /&gt;
            redirect_back&lt;br /&gt;
            return&lt;br /&gt;
          end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
''' After recfactoring - Moved to separate method'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    def check_if_user_impersonateable &lt;br /&gt;
    if params[:impersonate].nil?&lt;br /&gt;
          user = User.find_by(name: params[:user][:name])&lt;br /&gt;
          if !@original_user.can_impersonate? user&lt;br /&gt;
            @message = &amp;quot;You cannot impersonate '#{params[:user][:name]}'.&amp;quot;	    &lt;br /&gt;
            temp&lt;br /&gt;
	    AuthController.clear_user_info(session, nil)          &lt;br /&gt;
          else &lt;br /&gt;
            overwrite_session&lt;br /&gt;
	  end&lt;br /&gt;
    else &lt;br /&gt;
          if !params[:impersonate][:name].empty?&lt;br /&gt;
            user = User.find_by(name: params[:impersonate][:name])&lt;br /&gt;
	    overwrite_session&lt;br /&gt;
          end&lt;br /&gt;
    end&lt;br /&gt;
  end &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=====display_error_msg=====&lt;br /&gt;
This method is used to tackle issues1, 2 and 4. All the error message related code is moved to this method.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    def display_error_msg&lt;br /&gt;
    if params[:user]&lt;br /&gt;
          @message = &amp;quot;No user exists with the name '#{params[:user][:name]}'.&amp;quot;&lt;br /&gt;
    elsif params[:impersonate]&lt;br /&gt;
          @message = &amp;quot;No user exists with the name '#{params[:impersonate][:name]}'.&amp;quot;    &lt;br /&gt;
    else	 &lt;br /&gt;
          if params[:impersonate].nil?&lt;br /&gt;
            @message = &amp;quot;You cannot impersonate '#{params[:user][:name]}'.&amp;quot;&lt;br /&gt;
          else&lt;br /&gt;
            if !params[:impersonate][:name].empty?&lt;br /&gt;
              @message = &amp;quot;You cannot impersonate '#{params[:impersonate][:name]}'.&amp;quot;&lt;br /&gt;
            else&lt;br /&gt;
              @message = &amp;quot;No original account was found. Please close your browser and start a new session.&amp;quot;&lt;br /&gt;
           end &lt;br /&gt;
       end&lt;br /&gt;
    end&lt;br /&gt;
    rescue Exception =&amp;gt; e&lt;br /&gt;
      flash[:error] = @message&lt;br /&gt;
      redirect_to :back&lt;br /&gt;
  end &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====overwrite_session=====&lt;br /&gt;
This method reduces the number of return statements used in impersonate controller, apart from reducing the size of the controller.&lt;br /&gt;
&lt;br /&gt;
====== Initial Code======&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if params[:impersonate].nil?&lt;br /&gt;
        # check if special chars /\?&amp;lt;&amp;gt;|&amp;amp;$# are used to avoid html tags or system command&lt;br /&gt;
        if warn_for_special_chars(params[:user][:name], &amp;quot;Username&amp;quot;)&lt;br /&gt;
          redirect_back&lt;br /&gt;
          return&lt;br /&gt;
        end&lt;br /&gt;
        user = User.find_by(name: params[:user][:name])&lt;br /&gt;
        if user&lt;br /&gt;
          unless original_user.can_impersonate? user&lt;br /&gt;
            flash[:error] = &amp;quot;You cannot impersonate #{params[:user][:name]}.&amp;quot;&lt;br /&gt;
            redirect_back&lt;br /&gt;
            return&lt;br /&gt;
          end&lt;br /&gt;
          session[:super_user] = session[:user] if session[:super_user].nil?&lt;br /&gt;
          AuthController.clear_user_info(session, nil)&lt;br /&gt;
          session[:original_user] = original_user&lt;br /&gt;
          session[:impersonate] = true&lt;br /&gt;
          session[:user] = user&lt;br /&gt;
        else&lt;br /&gt;
          flash[:error] = message&lt;br /&gt;
          redirect_back&lt;br /&gt;
          return&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        # Impersonate a new account&lt;br /&gt;
        if !params[:impersonate][:name].empty?&lt;br /&gt;
          # check if special chars /\?&amp;lt;&amp;gt;|&amp;amp;$# are used to avoid html tags or system command&lt;br /&gt;
          if warn_for_special_chars(params[:impersonate][:name], &amp;quot;Username&amp;quot;)&lt;br /&gt;
            redirect_back&lt;br /&gt;
            return&lt;br /&gt;
          end&lt;br /&gt;
          user = User.find_by(name: params[:impersonate][:name])&lt;br /&gt;
          if user&lt;br /&gt;
            unless original_user.can_impersonate? user&lt;br /&gt;
              flash[:error] = &amp;quot;You cannot impersonate #{params[:user][:name]}.&amp;quot;&lt;br /&gt;
              redirect_back&lt;br /&gt;
              return&lt;br /&gt;
            end&lt;br /&gt;
            AuthController.clear_user_info(session, nil)&lt;br /&gt;
            session[:user] = user&lt;br /&gt;
            session[:impersonate] =  true&lt;br /&gt;
            session[:original_user] = original_user&lt;br /&gt;
          else&lt;br /&gt;
            flash[:error] = message&lt;br /&gt;
            redirect_back&lt;br /&gt;
            return&lt;br /&gt;
          end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====== After Refactoring - Moved to a separate method and accessed through the adapter method do_main_operation======&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     def overwrite_session&lt;br /&gt;
    #if not impersonatable, then original user's session remains&lt;br /&gt;
    if params[:impersonate].nil?&lt;br /&gt;
          user = User.find_by(name: params[:user][:name])&lt;br /&gt;
          session[:super_user] = session[:user] if session[:super_user].nil?&lt;br /&gt;
      	  AuthController.clear_user_info(session, nil)&lt;br /&gt;
          session[:original_user] = @original_user&lt;br /&gt;
          session[:impersonate] = true&lt;br /&gt;
          session[:user] = user&lt;br /&gt;
    else&lt;br /&gt;
    #if some user is to be impersonated, their session details are overwritten onto the current to impersonate	&lt;br /&gt;
&lt;br /&gt;
          if !params[:impersonate][:name].empty?&lt;br /&gt;
	    user = User.find_by(name: params[:impersonate][:name])&lt;br /&gt;
	    AuthController.clear_user_info(session, nil)&lt;br /&gt;
            session[:user] = user&lt;br /&gt;
            session[:impersonate] =  true&lt;br /&gt;
            session[:original_user] = @original_user&lt;br /&gt;
          else&lt;br /&gt;
            user = User.find_by(name: params[:user][:name])&lt;br /&gt;
	    AuthController.clear_user_info(session, nil)&lt;br /&gt;
            session[:user] = session[:super_user]&lt;br /&gt;
            user = session[:user]&lt;br /&gt;
            session[:super_user] = nil&lt;br /&gt;
          end&lt;br /&gt;
    end&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====check_if_special_char=====&lt;br /&gt;
This code is used to reduce one functionality performed under the impersonate controller. This method checks to see if the given username is acceptable.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def check_if_special_char&lt;br /&gt;
    if warn_for_special_chars(params[:user][:name], &amp;quot;Username&amp;quot;)&lt;br /&gt;
          redirect_back&lt;br /&gt;
          return&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====do_main_operation=====&lt;br /&gt;
This like an adapter method that is used to interface the impersonate method with display_error_msg and check_if_user_impersonatable. One main purpose to do this is to make the methods flexible for change apart from reducing the number of lines from the impersonate controller.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    def do_main_operation(user)&lt;br /&gt;
     if user&lt;br /&gt;
      check_if_user_impersonateable&lt;br /&gt;
     else&lt;br /&gt;
      display_error_msg&lt;br /&gt;
     end&lt;br /&gt;
  end  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Test Plan ===&lt;br /&gt;
The project can be tested from the UI as follows. &lt;br /&gt;
&lt;br /&gt;
Checking if impersonating a user is working &lt;br /&gt;
   1. Input: User that can be impersonated &lt;br /&gt;
     - Login as the instructor (username -&amp;gt; instructor6 , password -&amp;gt; password &lt;br /&gt;
     - Under &amp;quot;Manage&amp;quot; tab, select &amp;quot;impersonate user&amp;quot; option &lt;br /&gt;
     - In the form, give the user ID as &amp;quot;student5890&amp;quot; &lt;br /&gt;
   Now you will be able to see that user &amp;quot;student5890&amp;quot; has been impersonated.&lt;br /&gt;
   You can now &amp;quot;revert&amp;quot; to the original user to return to the instructor's profile. &lt;br /&gt;
&lt;br /&gt;
   2. Input: User that cannot be impersonated&lt;br /&gt;
     - Login as the instructor (username -&amp;gt; instructor6 , password -&amp;gt; password &lt;br /&gt;
     - Under &amp;quot;Manage&amp;quot; tab, select &amp;quot;impersonate user&amp;quot; option &lt;br /&gt;
     - In the form, give the user ID as &amp;quot;super_administrator2&amp;quot;&lt;br /&gt;
   Now you will be able to see a message being displayed on the screen, that tells that the given user cannot be impersonated. &lt;br /&gt;
&lt;br /&gt;
   3. Input: User that does not exist&lt;br /&gt;
     - Login as the instructor (username -&amp;gt; instructor6 , password -&amp;gt; password &lt;br /&gt;
     - Under &amp;quot;Manage&amp;quot; tab, select &amp;quot;impersonate user&amp;quot; option &lt;br /&gt;
     - In the form, give the user ID as &amp;quot;studentstudent&amp;quot;&lt;br /&gt;
   Now you will be able to see a message being displayed on the screen, that tells that the given user does not exist.&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Main_Page/CSC/CSC_517_Spring_2020_Refactor_impersonate_controller&amp;diff=132524</id>
		<title>Main Page/CSC/CSC 517 Spring 2020 Refactor impersonate controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Main_Page/CSC/CSC_517_Spring_2020_Refactor_impersonate_controller&amp;diff=132524"/>
		<updated>2020-03-31T23:07:02Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the work done under E2002 OSS Program for Spring 2020, in the CSC/ECE 517 course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===About Expertiza===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open-source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza is a complete instructor-student usage website where the instructor can assign assignments, deadlines, grades, etc that is required for the course. Similarly, the students can use this website to perform the tasks required as part of the course like project or assignments submission, forming groups and collaborating with them, as well as reviewing projects and teammates.&lt;br /&gt;
&lt;br /&gt;
This project focuses on a specific feature of expertiza which allows administrators, instructors or teaching assistants to impersonate another user (like a student) and access their account. &lt;br /&gt;
The demonstration for the feature is as shown below.&lt;br /&gt;
&lt;br /&gt;
[[File:Impersonate guide.jpg|figure 1|frame|center]]&lt;br /&gt;
         &lt;br /&gt;
&lt;br /&gt;
[[File:Non impersonate.jpg|figure 2|frame|center]]&lt;br /&gt;
         &lt;br /&gt;
[[File:Impersonated view.jpg|figure 3|frame|center]]&lt;br /&gt;
         &lt;br /&gt;
===Problem Statement===&lt;br /&gt;
The aim of the project is to refactor the impersonate controller. The pre-existing code had the following major issues.&lt;br /&gt;
*All functions related to impersonate controller were present in a single method ( from figure 4a and 4b)&lt;br /&gt;
*Presence of repetitive code ( from figure 4a and 4b)&lt;br /&gt;
*3 levels of block nesting (from figure 5)&lt;br /&gt;
* Too many return statements (from figure 6) &lt;br /&gt;
[[File:initial code1.jpg| figure 4a| frame|center]]&lt;br /&gt;
[[File:initial code2.jpg| figure 4b| frame|center]]&lt;br /&gt;
[[File:code climate3.jpg| figure 5| frame|center]]&lt;br /&gt;
[[File:code climate2.jpg| figure 6| frame|center]]&lt;br /&gt;
&lt;br /&gt;
This project is focused on resolving the issues mentioned above. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===About Impersonate Controller===&lt;br /&gt;
Expertiza allows the administrators, instructors or teaching assistants to impersonate another user (like a student) and access their account. For example, an instructor impersonating a student’s account can view their assignments, stage deadlines, peer reviews and anything else that the student can view. &lt;br /&gt;
&lt;br /&gt;
One thing to be noted is that most of these users can only impersonate users for whom they are a parent. For example, instructor6 is a parent of student3841 and not student3836; as a result, instructor6 can impersonate only 3841.&lt;br /&gt;
&lt;br /&gt;
===Impersonate functionality navigation===&lt;br /&gt;
1. Instructor login: username -&amp;gt; instructor6, password -&amp;gt; password&lt;br /&gt;
&lt;br /&gt;
when logged in as an instructor, under the manage option in the ribbon as in Figure 1, select impersonate user. &lt;br /&gt;
Upon redirected to impersonate page, enter the account which needs to be impersonated. It impersonates that user provided that user can be impersonated. Now a new button called revert appears on the ribbon as in figure 3, this can be used to revert the impersonation and return to the instructor profile.&lt;br /&gt;
&lt;br /&gt;
===Problem Solution===&lt;br /&gt;
The above-mentioned issues have been tackled by refactoring the impersonate controller by splitting into many smaller methods which are later called by the main impersonate controller.&lt;br /&gt;
&lt;br /&gt;
The following are the refactored new methods that help in tackling the issue1 apart from each being specifically for some issue rectification:&lt;br /&gt;
*check_if_user_impersonateable&lt;br /&gt;
*display_error_msg&lt;br /&gt;
*overwrite_session&lt;br /&gt;
*check_if_special_char&lt;br /&gt;
*do_main_operartion&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====check_if_user_impersonateable=====&lt;br /&gt;
This method plays the main role in tackling issue3 - 3 levels of block nesting apart from issue1.&lt;br /&gt;
&lt;br /&gt;
'''Intial Code'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if user&lt;br /&gt;
          unless original_user.can_impersonate? user&lt;br /&gt;
            flash[:error] = &amp;quot;You cannot impersonate #{params[:user][:name]}.&amp;quot;&lt;br /&gt;
            redirect_back&lt;br /&gt;
            return&lt;br /&gt;
          end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
''' After recfactoring - Moved to separate method'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    def check_if_user_impersonateable &lt;br /&gt;
    if params[:impersonate].nil?&lt;br /&gt;
          user = User.find_by(name: params[:user][:name])&lt;br /&gt;
          if !@original_user.can_impersonate? user&lt;br /&gt;
            @message = &amp;quot;You cannot impersonate '#{params[:user][:name]}'.&amp;quot;	    &lt;br /&gt;
            temp&lt;br /&gt;
	    AuthController.clear_user_info(session, nil)          &lt;br /&gt;
          else &lt;br /&gt;
            overwrite_session&lt;br /&gt;
	  end&lt;br /&gt;
    else &lt;br /&gt;
          if !params[:impersonate][:name].empty?&lt;br /&gt;
            user = User.find_by(name: params[:impersonate][:name])&lt;br /&gt;
	    overwrite_session&lt;br /&gt;
          end&lt;br /&gt;
    end&lt;br /&gt;
  end &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=====display_error_msg=====&lt;br /&gt;
This method is used to tackle issues1, 2 and 4. All the error message related code is moved to this method.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    def display_error_msg&lt;br /&gt;
    if params[:user]&lt;br /&gt;
          @message = &amp;quot;No user exists with the name '#{params[:user][:name]}'.&amp;quot;&lt;br /&gt;
    elsif params[:impersonate]&lt;br /&gt;
          @message = &amp;quot;No user exists with the name '#{params[:impersonate][:name]}'.&amp;quot;    &lt;br /&gt;
    else	 &lt;br /&gt;
          if params[:impersonate].nil?&lt;br /&gt;
            @message = &amp;quot;You cannot impersonate '#{params[:user][:name]}'.&amp;quot;&lt;br /&gt;
          else&lt;br /&gt;
            if !params[:impersonate][:name].empty?&lt;br /&gt;
              @message = &amp;quot;You cannot impersonate '#{params[:impersonate][:name]}'.&amp;quot;&lt;br /&gt;
            else&lt;br /&gt;
              @message = &amp;quot;No original account was found. Please close your browser and start a new session.&amp;quot;&lt;br /&gt;
           end &lt;br /&gt;
       end&lt;br /&gt;
    end&lt;br /&gt;
    rescue Exception =&amp;gt; e&lt;br /&gt;
      flash[:error] = @message&lt;br /&gt;
      redirect_to :back&lt;br /&gt;
  end &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====overwrite_session=====&lt;br /&gt;
This method reduces the number of return statements used in impersonate controller, apart from reducing the size of the controller.&lt;br /&gt;
&lt;br /&gt;
====== Initial Code======&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if params[:impersonate].nil?&lt;br /&gt;
        # check if special chars /\?&amp;lt;&amp;gt;|&amp;amp;$# are used to avoid html tags or system command&lt;br /&gt;
        if warn_for_special_chars(params[:user][:name], &amp;quot;Username&amp;quot;)&lt;br /&gt;
          redirect_back&lt;br /&gt;
          return&lt;br /&gt;
        end&lt;br /&gt;
        user = User.find_by(name: params[:user][:name])&lt;br /&gt;
        if user&lt;br /&gt;
          unless original_user.can_impersonate? user&lt;br /&gt;
            flash[:error] = &amp;quot;You cannot impersonate #{params[:user][:name]}.&amp;quot;&lt;br /&gt;
            redirect_back&lt;br /&gt;
            return&lt;br /&gt;
          end&lt;br /&gt;
          session[:super_user] = session[:user] if session[:super_user].nil?&lt;br /&gt;
          AuthController.clear_user_info(session, nil)&lt;br /&gt;
          session[:original_user] = original_user&lt;br /&gt;
          session[:impersonate] = true&lt;br /&gt;
          session[:user] = user&lt;br /&gt;
        else&lt;br /&gt;
          flash[:error] = message&lt;br /&gt;
          redirect_back&lt;br /&gt;
          return&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        # Impersonate a new account&lt;br /&gt;
        if !params[:impersonate][:name].empty?&lt;br /&gt;
          # check if special chars /\?&amp;lt;&amp;gt;|&amp;amp;$# are used to avoid html tags or system command&lt;br /&gt;
          if warn_for_special_chars(params[:impersonate][:name], &amp;quot;Username&amp;quot;)&lt;br /&gt;
            redirect_back&lt;br /&gt;
            return&lt;br /&gt;
          end&lt;br /&gt;
          user = User.find_by(name: params[:impersonate][:name])&lt;br /&gt;
          if user&lt;br /&gt;
            unless original_user.can_impersonate? user&lt;br /&gt;
              flash[:error] = &amp;quot;You cannot impersonate #{params[:user][:name]}.&amp;quot;&lt;br /&gt;
              redirect_back&lt;br /&gt;
              return&lt;br /&gt;
            end&lt;br /&gt;
            AuthController.clear_user_info(session, nil)&lt;br /&gt;
            session[:user] = user&lt;br /&gt;
            session[:impersonate] =  true&lt;br /&gt;
            session[:original_user] = original_user&lt;br /&gt;
          else&lt;br /&gt;
            flash[:error] = message&lt;br /&gt;
            redirect_back&lt;br /&gt;
            return&lt;br /&gt;
          end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====== After Refactoring - Moved to a separate method and accessed through the adapter method do_main_operation======&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     def overwrite_session&lt;br /&gt;
    #if not impersonatable, then original user's session remains&lt;br /&gt;
    if params[:impersonate].nil?&lt;br /&gt;
          user = User.find_by(name: params[:user][:name])&lt;br /&gt;
          session[:super_user] = session[:user] if session[:super_user].nil?&lt;br /&gt;
      	  AuthController.clear_user_info(session, nil)&lt;br /&gt;
          session[:original_user] = @original_user&lt;br /&gt;
          session[:impersonate] = true&lt;br /&gt;
          session[:user] = user&lt;br /&gt;
    else&lt;br /&gt;
    #if some user is to be impersonated, their session details are overwritten onto the current to impersonate	&lt;br /&gt;
&lt;br /&gt;
          if !params[:impersonate][:name].empty?&lt;br /&gt;
	    user = User.find_by(name: params[:impersonate][:name])&lt;br /&gt;
	    AuthController.clear_user_info(session, nil)&lt;br /&gt;
            session[:user] = user&lt;br /&gt;
            session[:impersonate] =  true&lt;br /&gt;
            session[:original_user] = @original_user&lt;br /&gt;
          else&lt;br /&gt;
            user = User.find_by(name: params[:user][:name])&lt;br /&gt;
	    AuthController.clear_user_info(session, nil)&lt;br /&gt;
            session[:user] = session[:super_user]&lt;br /&gt;
            user = session[:user]&lt;br /&gt;
            session[:super_user] = nil&lt;br /&gt;
          end&lt;br /&gt;
    end&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====check_if_special_char=====&lt;br /&gt;
This code is used to reduce one functionality performed under the impersonate controller. This method checks to see if the given username is acceptable.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def check_if_special_char&lt;br /&gt;
    if warn_for_special_chars(params[:user][:name], &amp;quot;Username&amp;quot;)&lt;br /&gt;
          redirect_back&lt;br /&gt;
          return&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====do_main_operation=====&lt;br /&gt;
This like an adapter method that is used to interface the impersonate method with display_error_msg and check_if_user_impersonatable. One main purpose to do this is to make the methods flexible for change apart from reducing the number of lines from the impersonate controller.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    def do_main_operation(user)&lt;br /&gt;
     if user&lt;br /&gt;
      check_if_user_impersonateable&lt;br /&gt;
     else&lt;br /&gt;
      display_error_msg&lt;br /&gt;
     end&lt;br /&gt;
  end  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Test Plan ===&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Main_Page/CSC/CSC_517_Spring_2020_Refactor_impersonate_controller&amp;diff=131406</id>
		<title>Main Page/CSC/CSC 517 Spring 2020 Refactor impersonate controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Main_Page/CSC/CSC_517_Spring_2020_Refactor_impersonate_controller&amp;diff=131406"/>
		<updated>2020-03-21T15:55:09Z</updated>

		<summary type="html">&lt;p&gt;Nradhak2: Created page with &amp;quot;This wiki page describes the work done under E2002 OSS Program for Spring 2020, in the CSC/ECE 517 course.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the work done under E2002 OSS Program for Spring 2020, in the CSC/ECE 517 course.&lt;/div&gt;</summary>
		<author><name>Nradhak2</name></author>
	</entry>
</feed>