CSC/ECE 517 Spring 2016/Implement private browsing: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
 
(26 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Implement Private Browsing'''
'''Implement Private Browsing'''


Servo[1] is a prototype web browser engine written in the RUST language. Servo currently does not support the mode where the cookies, login, history and downloads are forgotten after the session ends. The goal of this project is to implement this feature in Servo.
Servo<ref>https://github.com/servo/servo</ref> is a prototype web browser engine written in the RUST language. Servo currently does not support the mode where the cookies, login, history and downloads are forgotten after the session ends. The goal of this project is to implement incognito/private browsing feature in Servo.




==Introduction==
==Introduction==


Servo is an experimental web browser layout engine being developed by Mozilla Research. Servo is written in the Rust language, which is also being developed by Mozilla Research. The language is being refined through feedback from Servo development, and writing the Rust compiler itself. Rust is a systems programming language similar to C and C++ in syntax (but semantically very different). The emphasis is on speed, safety, concurrency and control of memory layout.
Servo is an experimental web browser layout engine being developed by Mozilla Research. Servo is written in the Rust<ref> https://doc.rust-lang.org/ </ref> language, which is also being developed by Mozilla Research. The language is being refined through feedback from Servo development, and writing the Rust compiler itself. Rust is a systems programming language similar to C and C++ in syntax (but semantically very different). The emphasis is on speed, safety, concurrency and control of memory layout.
 
==Motivation==
 
When a user browses the web, Firefox remembers lots of information for the user - like the sites visited. There may be times, however, when the users don't want people with access to their computer to see this information, such as when shopping for a present. Private Browsing allows the users to browse the Internet without saving any information about which sites and pages they have visited. Private Browsing also includes Tracking Protection in Private Browsing, which prevents companies from tracking the browsing history across multiple sites.[https://support.mozilla.org/en-US/kb/private-browsing-use-firefox-without-history]


==Installing Servo==
==Installing Servo==


'''Prerequisites on Debian based linuxes'''
===Prerequisites on Debian based linuxes===
 
<pre>
     sudo apt-get install curl freeglut3-dev autoconf \
     sudo apt-get install curl freeglut3-dev autoconf \
     libfreetype6-dev libgl1-mesa-dri libglib2.0-dev xorg-dev \
     libfreetype6-dev libgl1-mesa-dri libglib2.0-dev xorg-dev \
Line 17: Line 21:
     libssl-dev libbz2-dev libosmesa6-dev libxmu6 libxmu-dev \
     libssl-dev libbz2-dev libosmesa6-dev libxmu6 libxmu-dev \
     libglu1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev
     libglu1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev
</pre>


'''Building Servo'''
===Building Servo===
 
<pre>
git clone https://github.com/servo/servo
git clone https://github.com/servo/servo
cd servo
cd servo
./mach build --dev
./mach build --dev
./mach run tests/html/about-mozilla.html
</pre>


'''Running Servo'''
===Running Servo===


./mach run [url]
<pre>
./mach run [url] --devtools <port number>
</pre>


==Implementation==
==Implementation==


The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Private-browsing-student-project].
The below mentioned steps were followed to implement private browsing. The detailed requirements are described in the document available here:[https://github.com/servo/servo/wiki/Private-browsing-student-project].


===Step 1===
===Step 1===


As required we have added the is_private member to the struct IFrameLoadInfo to check if it's a private iframe or not
As per the requirement, we have added the is_private member to the struct IFrameLoadInfo to check if it's a private iframe or not


[[File: Selection_001.png ]]
[[File: Selection_001.png ]]




We are working on implementing the function to set this member based on the mozprivatebrowsing attribute. We are in touch with Josh regarding the same as currently there is no mozprivatebrowsing attribute in the servo project and hence we are trying to understand how it can be implemented. We have written a basic stub for the same which is as below.
We have implemented the function to set this member based on the mozprivatebrowsing attribute.


[[File: Selection_002.png ]]
[[File: MozprivateBrowsing.png]]


===Step 2===
===Step 2===


We have created an enum that holds an isPrivate message containing pipelineId and sender as attributes
We have created an enum 'ConstellationMsg' that holds an isPrivate message containing pipelineId and sender as attributes.


[[File: Selection_003.png ]]
[[File: Enum_Struct.png]]


The below member has been added to the pipeline struct to check if it's private
The below member has been added to the pipeline struct to check if it's private
Line 54: Line 61:
[[File: Selection_004.png ]]
[[File: Selection_004.png ]]


===Step 2===
===Step 3===
 
The below function has been implemented to check whether the pipeline is private or not.
 
 
[[File:Pipeline_Function.png]]


We are working on implementing the below function to check if the pipeline is private
===Design Pattern===
As per the design document, we have added few fields/members, defined an enum and added a method. The requirements did not require any design pattern to be implemented as such and thus, we have not used any other design pattern apart from the existing servo design strategy. Details about the servo design can be found [https://github.com/servo/servo/wiki/Design here].


===Testing===
For this particular project, an automated test is to be created to test the functionality which is part of the subsequent steps and is not included in the initial steps, and hence at this point of time the users/reviewers are not supposed perform any manual testing or testing from GUI. More details about writing the automated test for this project can be found [https://github.com/servo/servo/blob/master/tests/wpt/README.md#writing-new-tests here].


[[File: Selection_005.png ]]
==References==
<references/>

Latest revision as of 23:03, 3 April 2016

Implement Private Browsing

Servo<ref>https://github.com/servo/servo</ref> is a prototype web browser engine written in the RUST language. Servo currently does not support the mode where the cookies, login, history and downloads are forgotten after the session ends. The goal of this project is to implement incognito/private browsing feature in Servo.


Introduction

Servo is an experimental web browser layout engine being developed by Mozilla Research. Servo is written in the Rust<ref> https://doc.rust-lang.org/ </ref> language, which is also being developed by Mozilla Research. The language is being refined through feedback from Servo development, and writing the Rust compiler itself. Rust is a systems programming language similar to C and C++ in syntax (but semantically very different). The emphasis is on speed, safety, concurrency and control of memory layout.

Motivation

When a user browses the web, Firefox remembers lots of information for the user - like the sites visited. There may be times, however, when the users don't want people with access to their computer to see this information, such as when shopping for a present. Private Browsing allows the users to browse the Internet without saving any information about which sites and pages they have visited. Private Browsing also includes Tracking Protection in Private Browsing, which prevents companies from tracking the browsing history across multiple sites.[1]

Installing Servo

Prerequisites on Debian based linuxes

    sudo apt-get install curl freeglut3-dev autoconf \
    libfreetype6-dev libgl1-mesa-dri libglib2.0-dev xorg-dev \
    gperf g++ build-essential cmake virtualenv python-pip \
    libssl-dev libbz2-dev libosmesa6-dev libxmu6 libxmu-dev \
    libglu1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev

Building Servo

git clone https://github.com/servo/servo
cd servo
./mach build --dev

Running Servo

./mach run [url] --devtools <port number>

Implementation

The below mentioned steps were followed to implement private browsing. The detailed requirements are described in the document available here:[2].

Step 1

As per the requirement, we have added the is_private member to the struct IFrameLoadInfo to check if it's a private iframe or not


We have implemented the function to set this member based on the mozprivatebrowsing attribute.

Step 2

We have created an enum 'ConstellationMsg' that holds an isPrivate message containing pipelineId and sender as attributes.

The below member has been added to the pipeline struct to check if it's private

Step 3

The below function has been implemented to check whether the pipeline is private or not.


Design Pattern

As per the design document, we have added few fields/members, defined an enum and added a method. The requirements did not require any design pattern to be implemented as such and thus, we have not used any other design pattern apart from the existing servo design strategy. Details about the servo design can be found here.

Testing

For this particular project, an automated test is to be created to test the functionality which is part of the subsequent steps and is not included in the initial steps, and hence at this point of time the users/reviewers are not supposed perform any manual testing or testing from GUI. More details about writing the automated test for this project can be found here.

References

<references/>