SlideShare uma empresa Scribd logo
1 de 54
Baixar para ler offline
Introduction to
   QtWebKit

       ARIYA HIDAYAT
ENGINEERING DIRECTOR, SENCHA


                               1
whoami




         2
Overview




           3
WebKit Everywhere

Browser



Devices



Runtime

                    4
History                                   ~2000 commits/month
            90000
            80000
            70000
            60000
Revisions




            50000
            40000
            30000
            20000
            10000
               0
                    0   1   2   3   4     5     6   7   8   9   10
                                        Years

                                                                      5
Extensive Tests


                  tests
≈ 20,000 tests   904 MB   the rest
                          229 MB




                                     6
Workflow
                        quality control
1   Every commit needs to be reviewed



2   Broken commit must be reverted

              zero-regression policy


                                          7
Level of Involvement
  Contributor
                 after 10-20 patches




                                       after 80 patches
                Committer

      ≈ 130                                               Reviewer
  checks in reviewed patches
                                          ≈ 80
                                         accept or reject patches
                                                                     8
WebKit Reviewers
            Apple
             39




                            Google
                              19
     Misc
      12

 1          RIM     Nokia
             6        6
                                     9
Components of WebKit
  DOM             CSS

        WebCore             SVG

HTML         rendering

                                  JavaScriptCore

           WebKit Library

                                                   10
Platform Abstractions

    Network     Unicode      Clipboard

    Graphics     Theme        Events

     Thread    Geolocation    Timer




                                         11
WebCore
 Di erent “Ports”                           graphics



GraphicsContext       Mac   Chromium        Qt      Gtk


                                 Skia               Cairo
                  CoreGraphics
                                         QPainter


                                   graphics stack

                                                            12
Get + Compile




                13
Using git

git clone git://git.webkit.org/WebKit.git
cd WebKit



                ≈ 1.2 GB .git




                                            14
Build
Tools/Scripts/build-webkit --qt




    --debug for “Debug” mode




                                  15
Launch
Tools/Scripts/run-launcher --qt




                                  16
Use




      17
Using WebView

 QWebView webView;
 webView.show();
 webView.setUrl(QUrl("http://campkde.org"));




                                               18
Capture to Image

QWebPage page;
QImage image(size, QImage::Format_ARGB32_Premultiplied);
image.fill(Qt::transparent);
QPainter p(&image);
page.mainFrame()->render(&p);
p.end();
image.save(fileName);




    http://labs.qt.nokia.com/2009/01/15/capturing-web-pages/
                                                               19
SVG Rasterizer




http://labs.qt.nokia.com/2008/08/06/webkit-based-svg-rasterizer/
                                                                   20
Search + Preview




http://labs.qt.nokia.com/2008/11/04/search-with-thumbnail-preview/
                                                                     21
Hybrid: Native + Web




                       22
Exposing to the Web world

QWebFrame::addToJavaScriptWindowObject(QString, QObject*)



                                    Public functions
                                    Object properties
                                      Child objects




                                                            23
Signal and Slot
        signal
foobar.modified.connect(refresh);

 QObject instance          JavaScript function



foobar.modified.connect(obj, refresh);

                    any object
                                                 24
Coming back to the Native

  QVariant QWebFrame::evaluateJavaScript(QString)




    mostly key-value pair
   (like JavaScript objects)




                                                    25
Other Bridging Solutions


                                    Custom network protocol
                                    QNetworkAccessManager




 http://labs.qt.nokia.com/2010/11/16/some-webkit-hybrid-stu /
                                                                26
Deployment


   O    ine          Packaging
 Cache Manifest
                  QtWebKit boilerplate
  Local Storage




                                         27
Technologies




               28
Key Technologies




                   29
JavaScript




             30
Libraries and Frameworks




                           31
Vector Graphics




        http://raphaeljs.com/polar-clock.html

                                                32
Canvas-based Game




 http://ariya.blogspot.com/2010/09/invade-destroy.html
                                                         33
Diagrams & Visualization




 JavaScript InfoVis Toolkit   http://thejit.org/
                                                   34
CSS3 Animations




http://mozillademos.org/demos/planetarium/demo.html
                                                      35
Accelerated Composition
                    GPU FTW




                              36
Sencha Animator




                  37
Device Access




     http://ariya.github.com/js/marblebox/
                                             38
WebGL for 3-D




   http://webglsamples.googlecode.com/hg/aquarium/aquarium.html

                                                                  39
PhiloGL: WebGL Framework




       http://senchalabs.github.com/philogl/

                                               40
Tools




        41
Web Inspector




                42
Network Log
28: GET http://www.google.com/m/gp
292: Response 200 application/xhtml+xml; charset=UTF-8 0 bytes http://www.google.com/m/gp
311: GET data:image/gif;base64,R0lGODlhiA...
312: GET data:image/gif;base64,R0lGODlhJA...
312: GET data:image/gif;base64,R0lGODlhGA...
312: Response 0 image/gif 3611 bytes data:image/gif;base64,R0lGODlhiA...
312: Finish fail data:image/gif;base64,R0lGODlhiA...
312: Response 0 image/gif 284 bytes data:image/gif;base64,R0lGODlhJA...
312: Finish fail data:image/gif;base64,R0lGODlhJA...
312: Response 0 image/gif 178 bytes data:image/gif;base64,R0lGODlhGA...
312: Finish fail data:image/gif;base64,R0lGODlhGA...
317: Response 200 application/xhtml+xml; charset=UTF-8 0 bytes http://www.google.com/m/gp
324: Finish fail http://www.google.com/m/gp
328: GET http://www.google.com/m/gn/user?...
329: Finish success http://www.google.com/m/gn/user?...




                                                                                            43
Typical Scenario
                     This is
                   awesome!




               n
       t to ru
  forge ests
     the t




                               REGRESSION
                                            44
Test Framework

specrunner SpecRunner.html
5 specs, 0 failures in 0.013s

specrunner SpecRunner.html
FAIL: 5 specs, 1 failure in 0.014s




         Selenium, Watir, Squish Web, JSUnit,
                 Jasmine, QUnit, ...
                                                45
Headless WebKit

if (phantom.state.length === 0) {
    phantom.state = 'pizza';
    phantom.open('http://www.google.com/m/local?site=local&q=pizza+in+new+york');
} else {
    var list = document.querySelectorAll('div.bf');
    for (var i in list) {
        console.log(list[i].innerText);
    }
    phantom.exit();
}




                           http://phantomjs.org

                                                                                    46
UI Designer




              47
IDE: AKShell




               48
IDE: Cloud9




              49
Recorder and Replayer




                        50
Conclusion




             51
Today
       Web technologies are moving really fast
Various frameworks and libraries boost the productivity
         Hybrid approach helps the migration
                Tools need to catch-up




                                                          52
Future
 More bindings to the native world
 Platinum-grade productivity tools
Ubiquitous mesh and cloud solutions




                                      53
THANK YOU!

       ariya @ kde.org


       ariya.blogspot.com


       ariyahidayat

                            54

Mais conteúdo relacionado

Mais procurados

Reaching the multimedia web from embedded platforms with WPEWebkit
Reaching the multimedia web from embedded platforms with WPEWebkitReaching the multimedia web from embedded platforms with WPEWebkit
Reaching the multimedia web from embedded platforms with WPEWebkit
Igalia
 
Efficient Graphics with Qt
Efficient Graphics with QtEfficient Graphics with Qt
Efficient Graphics with Qt
Ariya Hidayat
 
Build HTML5 App (Intel Elements 2011)
Build HTML5 App (Intel Elements 2011)Build HTML5 App (Intel Elements 2011)
Build HTML5 App (Intel Elements 2011)
Ariya Hidayat
 

Mais procurados (19)

Maximize The Performance of HTML5 Video in RPI2 (Embedded Linux Conference 2016)
Maximize The Performance of HTML5 Video in RPI2 (Embedded Linux Conference 2016)Maximize The Performance of HTML5 Video in RPI2 (Embedded Linux Conference 2016)
Maximize The Performance of HTML5 Video in RPI2 (Embedded Linux Conference 2016)
 
[Webinar] QtSerialBus: Using Modbus and CAN bus with Qt
[Webinar] QtSerialBus: Using Modbus and CAN bus with Qt[Webinar] QtSerialBus: Using Modbus and CAN bus with Qt
[Webinar] QtSerialBus: Using Modbus and CAN bus with Qt
 
Hexagonal Architecture: The Standard for Qt Embedded Applications
Hexagonal Architecture: The Standard for Qt Embedded ApplicationsHexagonal Architecture: The Standard for Qt Embedded Applications
Hexagonal Architecture: The Standard for Qt Embedded Applications
 
IS-4081, Rabbit: Reinventing Video Chat, by Philippe Clavel
IS-4081, Rabbit: Reinventing Video Chat, by Philippe ClavelIS-4081, Rabbit: Reinventing Video Chat, by Philippe Clavel
IS-4081, Rabbit: Reinventing Video Chat, by Philippe Clavel
 
WT-4066, The Making of Turbulenz’ Polycraft WebGL Benchmark, by Ian Ballantyne
WT-4066, The Making of Turbulenz’ Polycraft WebGL Benchmark, by Ian BallantyneWT-4066, The Making of Turbulenz’ Polycraft WebGL Benchmark, by Ian Ballantyne
WT-4066, The Making of Turbulenz’ Polycraft WebGL Benchmark, by Ian Ballantyne
 
Reaching the multimedia web from embedded platforms with WPEWebkit
Reaching the multimedia web from embedded platforms with WPEWebkitReaching the multimedia web from embedded platforms with WPEWebkit
Reaching the multimedia web from embedded platforms with WPEWebkit
 
Maximizing High Performance Applications with CAN Bus
Maximizing High Performance Applications with CAN BusMaximizing High Performance Applications with CAN Bus
Maximizing High Performance Applications with CAN Bus
 
Final lisa opening_keynote_draft_-_v12.1tb
Final lisa opening_keynote_draft_-_v12.1tbFinal lisa opening_keynote_draft_-_v12.1tb
Final lisa opening_keynote_draft_-_v12.1tb
 
Efficient Graphics with Qt
Efficient Graphics with QtEfficient Graphics with Qt
Efficient Graphics with Qt
 
Project meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewProject meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture Overview
 
Overview of the open source Vulkan driver for Raspberry Pi 4 (XDC 2020)
Overview of the open source Vulkan driver for Raspberry Pi 4 (XDC 2020)Overview of the open source Vulkan driver for Raspberry Pi 4 (XDC 2020)
Overview of the open source Vulkan driver for Raspberry Pi 4 (XDC 2020)
 
Build HTML5 App (Intel Elements 2011)
Build HTML5 App (Intel Elements 2011)Build HTML5 App (Intel Elements 2011)
Build HTML5 App (Intel Elements 2011)
 
Writing Tools using WebKit
Writing Tools using WebKitWriting Tools using WebKit
Writing Tools using WebKit
 
Gcn performance ftw by stephan hodes
Gcn performance ftw by stephan hodesGcn performance ftw by stephan hodes
Gcn performance ftw by stephan hodes
 
Analyzing the Performance of Mobile Web
Analyzing the Performance of Mobile WebAnalyzing the Performance of Mobile Web
Analyzing the Performance of Mobile Web
 
Media SDK Webinar 2014
Media SDK Webinar 2014Media SDK Webinar 2014
Media SDK Webinar 2014
 
HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)
HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)
HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)
 
vkFX: Effect(ive) approach for Vulkan API
vkFX: Effect(ive) approach for Vulkan APIvkFX: Effect(ive) approach for Vulkan API
vkFX: Effect(ive) approach for Vulkan API
 
QtQuick Day 2
QtQuick Day 2QtQuick Day 2
QtQuick Day 2
 

Semelhante a Introduction to QtWebKit

Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKit
Ariya Hidayat
 
Google io bootcamp_2010
Google io bootcamp_2010Google io bootcamp_2010
Google io bootcamp_2010
Chris Ramsdale
 
Google Developer Fest 2010
Google Developer Fest 2010Google Developer Fest 2010
Google Developer Fest 2010
Chris Ramsdale
 

Semelhante a Introduction to QtWebKit (20)

Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKit
 
Hybrid Apps (Native + Web) using WebKit
Hybrid Apps (Native + Web) using WebKitHybrid Apps (Native + Web) using WebKit
Hybrid Apps (Native + Web) using WebKit
 
Hybrid Apps (Native + Web) using WebKit
Hybrid Apps (Native + Web) using WebKitHybrid Apps (Native + Web) using WebKit
Hybrid Apps (Native + Web) using WebKit
 
Google io bootcamp_2010
Google io bootcamp_2010Google io bootcamp_2010
Google io bootcamp_2010
 
Developments in the Qt WebKit Integration
Developments in the Qt WebKit IntegrationDevelopments in the Qt WebKit Integration
Developments in the Qt WebKit Integration
 
JBoss World 2010
JBoss World 2010JBoss World 2010
JBoss World 2010
 
Building Web Apps Sanely - EclipseCon 2010
Building Web Apps Sanely - EclipseCon 2010Building Web Apps Sanely - EclipseCon 2010
Building Web Apps Sanely - EclipseCon 2010
 
Guides To Analyzing WebKit Performance
Guides To Analyzing WebKit PerformanceGuides To Analyzing WebKit Performance
Guides To Analyzing WebKit Performance
 
Google Developer Fest 2010
Google Developer Fest 2010Google Developer Fest 2010
Google Developer Fest 2010
 
My key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAIMy key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAI
 
Docker Enterprise Workshop - Technical
Docker Enterprise Workshop - TechnicalDocker Enterprise Workshop - Technical
Docker Enterprise Workshop - Technical
 
CiklumCPPSat: Alexey Podoba "Automatic assembly. Cmake"
CiklumCPPSat: Alexey Podoba "Automatic assembly. Cmake"CiklumCPPSat: Alexey Podoba "Automatic assembly. Cmake"
CiklumCPPSat: Alexey Podoba "Automatic assembly. Cmake"
 
Igalia and WebKit: Status update and plans
Igalia and WebKit: Status update and plansIgalia and WebKit: Status update and plans
Igalia and WebKit: Status update and plans
 
Node.js on microsoft azure april 2014
Node.js on microsoft azure april 2014Node.js on microsoft azure april 2014
Node.js on microsoft azure april 2014
 
From Code to Kubernetes
From Code to KubernetesFrom Code to Kubernetes
From Code to Kubernetes
 
Apache Tomcat 7 by Filip Hanik
Apache Tomcat 7 by Filip HanikApache Tomcat 7 by Filip Hanik
Apache Tomcat 7 by Filip Hanik
 
WebRTC in WPE/GTK Ports: Current status and challenges
WebRTC in WPE/GTK Ports: Current status and challengesWebRTC in WPE/GTK Ports: Current status and challenges
WebRTC in WPE/GTK Ports: Current status and challenges
 
The WebKit project
The WebKit projectThe WebKit project
The WebKit project
 
WebKit and GStreamer (GStreamer Conference 2013)
WebKit and GStreamer (GStreamer Conference 2013)WebKit and GStreamer (GStreamer Conference 2013)
WebKit and GStreamer (GStreamer Conference 2013)
 
WebKit2 And You (GUADEC 2013)
WebKit2 And You (GUADEC 2013)WebKit2 And You (GUADEC 2013)
WebKit2 And You (GUADEC 2013)
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Último (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

Introduction to QtWebKit