SlideShare a Scribd company logo
Web Standards Support
      in WebKit
      허 준 회   (Joone Hur)


          Collabora
About me

• WebKit Committer
• Working for Collabora (http://collabora.com)
• Working on WebKitGtk+, WebKit-Clutter

• Blog: http://opensoftware.kr
• Email: joone.hur@collabora.com
Contents

• Custom scheme and content handlers
• AddSearchProvider
• Navigation Timing
• Device API
   o Battery Status Event
   o Contacts API
   o HTML Media Capture API
• Unified Storage Quota API
• Shadow DOM API
• WebKit News
   o WebCL & WebKit2 based Browser
Custom scheme and content handlers
• 웹 사 이 트 에 서 Protocol 이 나 mimetype 을 임 의 로 등 록 하 여 특 정
  URL 에 서 처 리 하 도 록 함
• Interface
   o window.navigator.registerProtocalHandler(scheme, url, title)
   o window.navigator.registerContentHandler(mineType, url, title)
• References
   o http://dev.w3.org/html5/spec/Overview.html#dom-navigator-
     registerprotocolhandler
   o http://trac.webkit.org/changeset/50477
   o https://developer.mozilla.org/En/DOM:window.navigator.register
     ContentHandler
   o https://developer.mozilla.org/en/DOM/window.navigator.registerP
     rotocolHandler
• Firefox, Chromium 지 원
Example
<head>
    <script type="text/javascript">
        function RegisterHandler () {
            navigator.registerProtocolHandler ("mailto",
"http://help.dottoro.com/protocolHandler.php?uri=%s", "Dottoro mailto
protocol handler");
    }
    </script>
</head>
<body>
    <button onclick="RegisterHandler ();">Register a handler for the mailto
protocol!</button>
</body>
AddSearchProvider




• Search Box 에 검 색 엔 진 을 등 록 하 는 기 능  
• 지 원 하 는 interface
   o window.external.AddSearchProvider()
   o window.external.IsSearchProviderInstalled()


• Firefox, IE, Chromium 에 서   지 원
Navigation Timing

• This specification defines an interface for web applications
  to access timing information related to navigation and
  elements.
• The API will allow web application to gather performance
  metrics about various factors such as page redirect, DNS
  lookup, connection & secure connection statistics,
  request/response time, various events, etc
• Chromium, Firefox Support
• Reference
   o   http://www.w3.org/TR/navigation-timing/
Performance Timing, Performance Navigation
Example

var start = new Date().getTime();
function onLoad() {
  var now = new Date().getTime();
  var latency = now - start;
  alert("page loading time: " + latency);
}


function onLoad() {
  var now = new Date().getTime();
  var page_load_time = now - performance.timing.navigationStart;
  alert("User-perceived page loading time: " + page_load_time);
}
Demo Page for Navigation Timing

http://webtimingdemo.appspot.com/
Device API

• Battery Status Event Specification
   o http://www.w3.org/TR/battery-status/
   o https://bugs.webkit.org/show_bug.cgi?id=62698


• Contacts API
  o http://www.w3.org/TR/2011/WD-contacts-api-20110616/
  o https://bugs.webkit.org/show_bug.cgi?id=63223


• HTML Media Capture
HTML Media Capture
<input type="file" accept="image/*" capture="camera"
id="capture"> 

• HTML Media Capture is the HTML Form Based specification
  that allows the user to take a picture, record a sound file, or
  record a video like the file picker interface.
• The "capture" attribute can have the following values:
   o camera. microphone, camcorder, filesystem
• References
   o http://www.w3.org/TR/html-media-capture/
   o https://bugs.webkit.org/show_bug.cgi?id=63062
Unified Storage Quota API

• The feature/API is to allow webapps to request or query per-
  origin storage quota across multiple storage types (e.g.
  IndexedDB, SQL DB and FileSystemAPI)
• References
   o http://lists.w3.org/Archives/Public/public-
     webapps/2011JanMar/0346.html
   o https://bugs.webkit.org/show_bug.cgi?id=60355
Example
function errorCallback(error)
{
    testFailed("Error occurred: " + error);
    finishJSTest();
}

var grantedQuota;
function quotaCallback(newQuota)
{
    grantedQuota = newQuota;

    // We must be given 0 quota, the same amount as we requested.
    shouldBe("grantedQuota", "0");

    finishJSTest();
}

if (window.webkitStorageInfo) {
    window.jsTestIsAsync = true;

    // Requesting '0' quota for testing 
    // (this request must be almost always granted 
    // without showing any platform specific notification UI).
    webkitStorageInfo.requestQuota(webkitStorageInfo.TEMPORARY, 0, quotaCallback, errorCallback);
} else  
    debug("This test requires window.webkitStorageInfo.");
Shadow DOM API

• Expose the minimum subset of the larger Web Component
  Model
• Shadow DOM refers to the ability of the browser to include a
  subtree of DOM elements into the rendering of a document,
  but not into the main document DOM tree
• API
   o Element.webkitShadow
   o Element.webkitPseudo
   o document.webkitCreateShadow()
   o window.WebKitShadowRootConstructor
   o window.WebKitTreeScopeConstructor
• References
  o   http://lists.w3.org/Archives/Public/public-webapps/2011AprJun/1345.html
Example

<!DOCTYPE HTML> <html> <body> The object's downloading progress:
<progress id="foo" value="33" max="100"></progress> </body> </html>


var download_progress = document.getElementsById("foo");
console.log(download_progress.firstChild); // returns null
root = download_progress.shadowRoot;
Example
#if defined(ENABLE_PROGRESS_TAG) && ENABLE_PROGRESS_TAG
/* progress */

progress {
    -webkit-appearance: progress-bar;
    -webkit-box-sizing: border-box;
    display: inline-block;                <progress>
    height: 1em;
    width: 10em;                            ┗ <div> ::-webkit-progress-bar
    vertical-align: -0.2em;
}
                                                ┗ <div>::-webkit-progress-value
progress::-webkit-progress-bar {
    background-color: gray;
    height: 100%;
    width: 100%;
    -webkit-box-sizing: border-box;
}

progress::-webkit-progress-value {
    background-color: green;
    height: 100%;
    width: 50%; /* should be removed later */
    -webkit-box-sizing: border-box;
}
#endif
WebCL




Samsung has added WebCL JS API to WebKit

WebCL is a new activity in Khronos that is defining JavaScript
bindings to OpenCL

http://code.google.com/p/webcl/
WebKit2 on Nokia N9

• Provides QtWebKit2 based browser
• Reference
   o http://conversations.nokia.com/2011/06/28/nokia-n9-
     opening-the-browser/
고 맙 습 니 다   !

More Related Content

PDF
Hardware Acceleration in WebKit
PDF
Hw accelerated webkitgtk+ on raspberry pi
PDF
Chrome Internals: Paint and Composition
PPTX
Polymer / WebComponents
PDF
Deview 2013 mobile browser internals and trends_20131022
PDF
The WebKit project
PPTX
Google Polymer Introduction
PPTX
Webpack and Web Performance Optimization
Hardware Acceleration in WebKit
Hw accelerated webkitgtk+ on raspberry pi
Chrome Internals: Paint and Composition
Polymer / WebComponents
Deview 2013 mobile browser internals and trends_20131022
The WebKit project
Google Polymer Introduction
Webpack and Web Performance Optimization

What's hot (20)

PDF
Polymer Web Framework - Swecha Boot Camp
PDF
Web Components
PDF
Korea linuxforum2014 html5game-sangseoklim
PPTX
Google Developer Group(GDG) DevFest Event 2012 Android talk
PDF
Efficient multimedia support in QtWebKit on Raspberry Pi (GStreamer Conferenc...
PPTX
Bundling your front-end with Webpack
PPTX
An Overview on Nuxt.js
PPT
Pushing the Boundaries of Sencha and HTML5′s WebRTC
PDF
Native-Javascript Bridging Using WKWebViews in iOS8
PDF
Client vs Server Templating: Speed up initial load for SPA with Angular as an...
PDF
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
PPTX
jQuery Conf 2012
PDF
Web Components Everywhere
PPTX
A High-Performance Solution to Microservice UI Composition @ XConf Hamburg
PDF
Drupal point of vue
PDF
Android Chromium Rendering Pipeline
PPTX
Demystifying HTML5
PPTX
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.es
PDF
Deploy like a pro!
PPTX
SnapyX - ParisJS
Polymer Web Framework - Swecha Boot Camp
Web Components
Korea linuxforum2014 html5game-sangseoklim
Google Developer Group(GDG) DevFest Event 2012 Android talk
Efficient multimedia support in QtWebKit on Raspberry Pi (GStreamer Conferenc...
Bundling your front-end with Webpack
An Overview on Nuxt.js
Pushing the Boundaries of Sencha and HTML5′s WebRTC
Native-Javascript Bridging Using WKWebViews in iOS8
Client vs Server Templating: Speed up initial load for SPA with Angular as an...
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
jQuery Conf 2012
Web Components Everywhere
A High-Performance Solution to Microservice UI Composition @ XConf Hamburg
Drupal point of vue
Android Chromium Rendering Pipeline
Demystifying HTML5
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.es
Deploy like a pro!
SnapyX - ParisJS
Ad

Similar to Web Standards Support in WebKit (20)

PPTX
HTML5 on Mobile
PPTX
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
PDF
Rich Portlet Development in uPortal
PPTX
Performance Metrics in a Day with Selenium
PPTX
Developing your first application using FIWARE
PPTX
Notes on SF W3Conf
PPTX
Developing your first application using FI-WARE
PDF
Automating Research Data Flows and Introduction to the Globus Platform
PDF
An Introduction to Tornado
PPTX
Solving anything in VCL
PDF
Automating Research Data Flows and an Introduction to the Globus Platform
PDF
e10sとアプリ間通信
PDF
Nodejs and WebSockets
PPTX
How to Build Your First Web App in Go
PDF
Intro to JavaScript
PDF
[convergese] Adaptive Images in Responsive Web Design
PDF
HTML for the Mobile Web, Firefox OS
PDF
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
PDF
[HEWEBAR 2012] Adaptive Images in Responsive Web Design
PPT
Top 10 HTML5 Features for Oracle Cloud Developers
HTML5 on Mobile
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
Rich Portlet Development in uPortal
Performance Metrics in a Day with Selenium
Developing your first application using FIWARE
Notes on SF W3Conf
Developing your first application using FI-WARE
Automating Research Data Flows and Introduction to the Globus Platform
An Introduction to Tornado
Solving anything in VCL
Automating Research Data Flows and an Introduction to the Globus Platform
e10sとアプリ間通信
Nodejs and WebSockets
How to Build Your First Web App in Go
Intro to JavaScript
[convergese] Adaptive Images in Responsive Web Design
HTML for the Mobile Web, Firefox OS
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
[HEWEBAR 2012] Adaptive Images in Responsive Web Design
Top 10 HTML5 Features for Oracle Cloud Developers
Ad

More from Joone Hur (9)

PDF
Accelerate graphics performance with ozone-gbm on Intel based Linux desktop s...
ODP
GNOME development on Tizen Mobile
ODP
How to use WebKitGtk+
PDF
WebKitGtk+ Project
PDF
GNOME3 & 그놈 한국 공동체
PDF
웹 브라우저는 어떻게 동작하나? (2)
PDF
웹브라우저는 어떻게 동작하나?
PDF
WebKit at the Future Web Forum 2010
PDF
Fennec의 현재와 미래
Accelerate graphics performance with ozone-gbm on Intel based Linux desktop s...
GNOME development on Tizen Mobile
How to use WebKitGtk+
WebKitGtk+ Project
GNOME3 & 그놈 한국 공동체
웹 브라우저는 어떻게 동작하나? (2)
웹브라우저는 어떻게 동작하나?
WebKit at the Future Web Forum 2010
Fennec의 현재와 미래

Recently uploaded (20)

PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Approach and Philosophy of On baking technology
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPT
Teaching material agriculture food technology
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
KodekX | Application Modernization Development
PPTX
Cloud computing and distributed systems.
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
Unlocking AI with Model Context Protocol (MCP)
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
The AUB Centre for AI in Media Proposal.docx
Approach and Philosophy of On baking technology
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Teaching material agriculture food technology
Review of recent advances in non-invasive hemoglobin estimation
Dropbox Q2 2025 Financial Results & Investor Presentation
KodekX | Application Modernization Development
Cloud computing and distributed systems.
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Big Data Technologies - Introduction.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Encapsulation theory and applications.pdf
Spectral efficient network and resource selection model in 5G networks

Web Standards Support in WebKit

  • 1. Web Standards Support in WebKit 허 준 회 (Joone Hur) Collabora
  • 2. About me • WebKit Committer • Working for Collabora (http://collabora.com) • Working on WebKitGtk+, WebKit-Clutter • Blog: http://opensoftware.kr • Email: joone.hur@collabora.com
  • 3. Contents • Custom scheme and content handlers • AddSearchProvider • Navigation Timing • Device API o Battery Status Event o Contacts API o HTML Media Capture API • Unified Storage Quota API • Shadow DOM API • WebKit News o WebCL & WebKit2 based Browser
  • 4. Custom scheme and content handlers • 웹 사 이 트 에 서 Protocol 이 나 mimetype 을 임 의 로 등 록 하 여 특 정 URL 에 서 처 리 하 도 록 함 • Interface o window.navigator.registerProtocalHandler(scheme, url, title) o window.navigator.registerContentHandler(mineType, url, title) • References o http://dev.w3.org/html5/spec/Overview.html#dom-navigator- registerprotocolhandler o http://trac.webkit.org/changeset/50477 o https://developer.mozilla.org/En/DOM:window.navigator.register ContentHandler o https://developer.mozilla.org/en/DOM/window.navigator.registerP rotocolHandler • Firefox, Chromium 지 원
  • 5. Example <head>     <script type="text/javascript">         function RegisterHandler () {             navigator.registerProtocolHandler ("mailto", "http://help.dottoro.com/protocolHandler.php?uri=%s", "Dottoro mailto protocol handler");     }     </script> </head> <body>     <button onclick="RegisterHandler ();">Register a handler for the mailto protocol!</button> </body>
  • 6. AddSearchProvider • Search Box 에 검 색 엔 진 을 등 록 하 는 기 능   • 지 원 하 는 interface o window.external.AddSearchProvider() o window.external.IsSearchProviderInstalled() • Firefox, IE, Chromium 에 서 지 원
  • 7. Navigation Timing • This specification defines an interface for web applications to access timing information related to navigation and elements. • The API will allow web application to gather performance metrics about various factors such as page redirect, DNS lookup, connection & secure connection statistics, request/response time, various events, etc • Chromium, Firefox Support • Reference o http://www.w3.org/TR/navigation-timing/
  • 9. Example var start = new Date().getTime(); function onLoad() {   var now = new Date().getTime();   var latency = now - start;   alert("page loading time: " + latency); } function onLoad() {   var now = new Date().getTime();   var page_load_time = now - performance.timing.navigationStart;   alert("User-perceived page loading time: " + page_load_time); }
  • 10. Demo Page for Navigation Timing http://webtimingdemo.appspot.com/
  • 11. Device API • Battery Status Event Specification o http://www.w3.org/TR/battery-status/ o https://bugs.webkit.org/show_bug.cgi?id=62698 • Contacts API o http://www.w3.org/TR/2011/WD-contacts-api-20110616/ o https://bugs.webkit.org/show_bug.cgi?id=63223 • HTML Media Capture
  • 12. HTML Media Capture <input type="file" accept="image/*" capture="camera" id="capture">  • HTML Media Capture is the HTML Form Based specification that allows the user to take a picture, record a sound file, or record a video like the file picker interface. • The "capture" attribute can have the following values: o camera. microphone, camcorder, filesystem • References o http://www.w3.org/TR/html-media-capture/ o https://bugs.webkit.org/show_bug.cgi?id=63062
  • 13. Unified Storage Quota API • The feature/API is to allow webapps to request or query per- origin storage quota across multiple storage types (e.g. IndexedDB, SQL DB and FileSystemAPI) • References o http://lists.w3.org/Archives/Public/public- webapps/2011JanMar/0346.html o https://bugs.webkit.org/show_bug.cgi?id=60355
  • 14. Example function errorCallback(error) {     testFailed("Error occurred: " + error);     finishJSTest(); } var grantedQuota; function quotaCallback(newQuota) {     grantedQuota = newQuota;     // We must be given 0 quota, the same amount as we requested.     shouldBe("grantedQuota", "0");     finishJSTest(); } if (window.webkitStorageInfo) {     window.jsTestIsAsync = true;     // Requesting '0' quota for testing      // (this request must be almost always granted      // without showing any platform specific notification UI).     webkitStorageInfo.requestQuota(webkitStorageInfo.TEMPORARY, 0, quotaCallback, errorCallback); } else       debug("This test requires window.webkitStorageInfo.");
  • 15. Shadow DOM API • Expose the minimum subset of the larger Web Component Model • Shadow DOM refers to the ability of the browser to include a subtree of DOM elements into the rendering of a document, but not into the main document DOM tree • API o Element.webkitShadow o Element.webkitPseudo o document.webkitCreateShadow() o window.WebKitShadowRootConstructor o window.WebKitTreeScopeConstructor • References o http://lists.w3.org/Archives/Public/public-webapps/2011AprJun/1345.html
  • 16. Example <!DOCTYPE HTML> <html> <body> The object's downloading progress: <progress id="foo" value="33" max="100"></progress> </body> </html> var download_progress = document.getElementsById("foo"); console.log(download_progress.firstChild); // returns null root = download_progress.shadowRoot;
  • 17. Example #if defined(ENABLE_PROGRESS_TAG) && ENABLE_PROGRESS_TAG /* progress */ progress {     -webkit-appearance: progress-bar;     -webkit-box-sizing: border-box;     display: inline-block; <progress>     height: 1em;     width: 10em; ┗ <div> ::-webkit-progress-bar     vertical-align: -0.2em; } ┗ <div>::-webkit-progress-value progress::-webkit-progress-bar {     background-color: gray;     height: 100%;     width: 100%;     -webkit-box-sizing: border-box; } progress::-webkit-progress-value {     background-color: green;     height: 100%;     width: 50%; /* should be removed later */     -webkit-box-sizing: border-box; } #endif
  • 18. WebCL Samsung has added WebCL JS API to WebKit WebCL is a new activity in Khronos that is defining JavaScript bindings to OpenCL http://code.google.com/p/webcl/
  • 19. WebKit2 on Nokia N9 • Provides QtWebKit2 based browser • Reference o http://conversations.nokia.com/2011/06/28/nokia-n9- opening-the-browser/
  • 20. 고 맙 습 니 다 !