SlideShare a Scribd company logo
1 of 28
Download to read offline
Web Technology features with
  Firefox 3.6 / Gecko 1.9.2
          and later

          Makoto Kato
Technical Advisor, Mozilla Japan
Agenda

• Firefox 3.6 / Gecko 1.9.2やそれ以降のバー
  ジョンでサポートされる新たな規格
 •   File API (Firefox 3.6 / Gecko 1.9.2)
 •   CSS Gradients (Firefox 3.6 / Gecko 1.9.2)
 •   Web Open Font Format (Firefox 3.6 / Gecko
     1.9.2)
 •   WebGL (Firefox.next / Gecko 1.9.3)
• Demo
File API
File API

• <input type=“file”>で選択されたローカル
  フゔ゗ルへのゕクセスを提供
 •   ユーザーの操作にてフゔ゗ルを指定する
 •   valueはそもそもJavaScriptから変更不可
• FileReaderを経由したフゔ゗ルゕクセス
• HTML5 Drag & Dropと組み合わせると、ブラ
  ウザウゖンドウへのDrag & Dropでフゔ゗ル
  にゕクセスすることが可能
File API
•       File゗ンターフェ゗ス
    •    フゔ゗ル名、種類などの取得
•       FileReader ゗ンターフェ゗ス
    •    フゔ゗ルゕクセスの゗ンターフェ゗スを提供
    •    バ゗ナリ / テキスト / DataURLとして読み込む
    •    エラー、進捗、完了などの゗ベントを提供
    •    resultプロパテゖに読み込んだ内容が入る
•       FileReaderSync ゗ンターフェ゗ス
    •    同期ゕクセス用
    •    現時点でFirefox / Geckoでは未実装
    •    readAs*メソッドはFileException例外をスローする
使い方 – File API
<input type=“file” id=“upload” />
<input type=“button” onclick=“clickbutton()” />

<script type=“text/javascript”>
function clickbutton() {
  var file = document.getElementById(“upload”).files;
  for (var i = 0; i < files.length; i++) {
    var file = files[i];
    processFile(file); // フゔ゗ル処理
  }
}

function processFile(file) {
  var reader = new FileReader();
  reader.readAsText(file); // テキストとして読み込む
  reader.onload = function () { /* 完了 */
   window.alert(reader.result); };
  reader.onprogress = function (event) { /* 進捗゗ベント */ };
}
</script>
使い方 (w/ HTML5 Drag & Drop)
<div id=“droptarget”>…</div>

<script type=“text/javascript”>
document.getElementById(“droptarget”).addEventListene
r("drop", dropEvent, true);

function dropEvent(event) {
  var files = event.dataTransfer.files;

 for (var i = 0; i < files.length; i++) {
   var file = files[i];
   processFile(file); // フゔ゗ル処理
 }
}
</script>
CSS Gradients
CSS Gradients

• 現時点で定義されている形は2つ
 •       Linear
 •       Radial
• 繰り返しの形式(repeating)もサポート
• 先に実装されたWebKitでは構文が異なる
 •       WebKitでの先に行われた実装 (例: linear)
     •     background: -webkit-gradient(linear, left top, left bottom,
           from(white), to(gray));

 •       現在のドラフト (例: linear)
     •     background: linear-gradient(top, white, gray);
CSS Gradients

• Firefox 3.6 / Gecko 1.9.2では、”-moz-
  ”prefixを使う必要あり (-moz-linear-gradient)
• 画像を受け入れることができるCSSプロパテゖす
  べてで利用可能
 •   Firefox 3.6ではbackgroundくらいにしか動作しません
Linear Gradients

• linear-gradient( [<point> || <angle>,]?
  <stop>, <stop> [, <stop>]* )


       linear-gradient(
         top,
         blue,
         white
       );

       linear-gradient(
         45deg,
         blue,
         white);
Radial Gradients

• radial-gradient( [<position> || <angle>,]?
  [<shape> || <size>,]? <stop>, <stop>[,
  <stop>]* )

     -moz-radial-gradient(
       red,
       yellow,
       green
     );
Repeating Gradient

• Linerやradialの記述へ”repeating-”のprefix
  を追加

  repeating-linear-gradient(
   top,
   blue 5px,
   white 20px);



   repeating-linear-gradient(
    top left -45deg,
    red,
    red 5px,
    white 5px,
    white 10px);
Web Open Font
Format - WOFF
Web Font Support

• Firefox 3.5でWebフォントをサポート
 @font-face { font-family: GentiumTest; src: url(fonts.ttf); }

 •   OpenTypeとTrueTypeフォントのみ
Web Font Support

• Firefox 3.6では新しいWebフォント形式
  (WOFF) をサポート
     @font-face { font-family: GentiumTest; src: url(fonts.woff)
        format("woff"); }

 •   フォントベンダと共同で作成した新しいフォント
     形式
 •   OpenTypeなどよりもサ゗ズは小さい
 •   現状では差分ダウンロードには対応していない
 •   MIMEタ゗プは決まってない




                               16
WebGL
現状のブラウザでのレンダリング

• HTMLなどのレンダリングにはOSのAPIを利用
 •   GDI, Quartz, Cairo and etc…
• チップのハードウェゕ・ゕクセラレーションが
  使われるかどうかは、利用するAPI、OS次第
• プラグ゗ンなしでは、3D画像であってもソフ
  トウェゕで3D画像を計算する必要がある
現在のグラフィック・ハードウェア (GPU)

• 現在のAMD、NVIDIA、IntelなどのPC向けの
  グラフゖック・チップでは3D向けのDirectX9
  やOpenGLのサポートが含まれている
• モバ゗ル分野であっても、TIやQualcomm、
  iPhoneの最新チップセットではOpenGL ES
  2.0のサポートが含まれる
WebGL

• The Khronos GroupでAPI仕様の策定
 •   Apple、Google、Mozilla、Operaが参加
• OpenGL ES 2.0ベースのAPIをJavaScriptから
  ゕクセス
 •   シェーダーやテクスチャも利用可能
• Canvasへの描画
• 最新のGecko (1.9.3) やWebKitで利用可能
 •   Firefoxの開発版で利用する場合は、about:config
     でwebgl.enabled_for_all_sitesをtrueに設定する
     必要あり
シェーダー・サポート

• バーテックス・シェーダー
 <script type=“x-shader/x-vertex”>
• フラグメント・シェーダー (ピクセル・シェー
  ダー)
 <script type=“x-shader/x-fragment”>
使い方
<canvas id=“glcanvas” />

<script type=“text/javascript”>
// Canvas elementの取得
var canvas = document.getElementById(“glcanvas”);

// WebGLのコンテキストの取得
// Geckoでは”moz-webgl”または”experimental-webgl”
// WebKitでは”webkit-3d”
var gl = canvas.getContext(‘webgl’);

// 描画
…
</script>
DEMO
Reference – File API

• File API Draft
  •   http://dev.w3.org/2006/webapi/FileAPI/
• Using files from web applications
  •   https://developer.mozilla.org/en/Using_files_f
      rom_web_applications
• Demo by hacks.mozilla.org
  •   http://hacks.mozilla.org/category/fileapi/
  •   http://www.youtube.com/mozhacks#p/u/2/4
      Us6S0fDV7U
Reference – CSS Gradients

• Gradients – CSS Image Values Module Level
  3 Draft
  •   http://dev.w3.org/csswg/css3-images/#gradients-
• css gradients in Firefox 3.6
  •   http://hacks.mozilla.org/2009/11/css-gradients-
      firefox-36/
• Demo by hacks.mozilla.org
  •   http://demos.hacks.mozilla.org/openweb/cssBackg
      round/gradients/
Reference - WOFF

• Web Open Font Format for Firefox 3.6
 •   http://hacks.mozilla.org/2009/10/woff/
• CSS Fonts Module Level 3
 •   http://dev.w3.org/csswg/css3-fonts
• WOFF File Format Draft
 •   http://people.mozilla.com/~jkew/woff/woff-
     spec-latest.html
Referenece - WebGL
•       Khronos Group
    •     http://www.khronos.org/webgl/
•       WebGL Draft
    •     https://cvs.khronos.org/svn/repos/registry/trunk/public/
          webgl/doc/spec/WebGL-spec.html
•       Mozilla Developer Center
    •     https://developer.mozilla.org/en/WebGL
•       Demo by hacks.mozilla.org
    •     http://hacks.mozilla.org/category/webgl/
•       Demo by Khronos
    •     https://cvs.khronos.org/svn/repos/registry/trunk/public/
          webgl/sdk/demos/webkit/
Any Question?

More Related Content

What's hot

Getting Started .NET Core
Getting Started .NET CoreGetting Started .NET Core
Getting Started .NET CoreYuta Matsumura
 
Windows版 ruby で Officeアプリケーションの制御
Windows版 ruby で Officeアプリケーションの制御Windows版 ruby で Officeアプリケーションの制御
Windows版 ruby で Officeアプリケーションの制御Koichi Shimozono
 
PHP 5.4のビルトインウェブサーバー
PHP 5.4のビルトインウェブサーバーPHP 5.4のビルトインウェブサーバー
PHP 5.4のビルトインウェブサーバーAtsushi Matsuo
 
PHPの今とこれから2007
PHPの今とこれから2007PHPの今とこれから2007
PHPの今とこれから2007Rui Hirokawa
 
ブラウザからWeb OSへ〜Web - TV連携事例からその可能性を探る〜
ブラウザからWeb OSへ〜Web - TV連携事例からその可能性を探る〜ブラウザからWeb OSへ〜Web - TV連携事例からその可能性を探る〜
ブラウザからWeb OSへ〜Web - TV連携事例からその可能性を探る〜Kensaku Komatsu
 
Firefox Security Features
Firefox Security FeaturesFirefox Security Features
Firefox Security Featuresdynamis
 
eZ publish勉強会2013年7月「実装ケーススタディ」
eZ publish勉強会2013年7月「実装ケーススタディ」eZ publish勉強会2013年7月「実装ケーススタディ」
eZ publish勉強会2013年7月「実装ケーススタディ」ericsagnes
 
Falconjsの始め方 (share)
Falconjsの始め方 (share)Falconjsの始め方 (share)
Falconjsの始め方 (share)Jun Funakura
 

What's hot (8)

Getting Started .NET Core
Getting Started .NET CoreGetting Started .NET Core
Getting Started .NET Core
 
Windows版 ruby で Officeアプリケーションの制御
Windows版 ruby で Officeアプリケーションの制御Windows版 ruby で Officeアプリケーションの制御
Windows版 ruby で Officeアプリケーションの制御
 
PHP 5.4のビルトインウェブサーバー
PHP 5.4のビルトインウェブサーバーPHP 5.4のビルトインウェブサーバー
PHP 5.4のビルトインウェブサーバー
 
PHPの今とこれから2007
PHPの今とこれから2007PHPの今とこれから2007
PHPの今とこれから2007
 
ブラウザからWeb OSへ〜Web - TV連携事例からその可能性を探る〜
ブラウザからWeb OSへ〜Web - TV連携事例からその可能性を探る〜ブラウザからWeb OSへ〜Web - TV連携事例からその可能性を探る〜
ブラウザからWeb OSへ〜Web - TV連携事例からその可能性を探る〜
 
Firefox Security Features
Firefox Security FeaturesFirefox Security Features
Firefox Security Features
 
eZ publish勉強会2013年7月「実装ケーススタディ」
eZ publish勉強会2013年7月「実装ケーススタディ」eZ publish勉強会2013年7月「実装ケーススタディ」
eZ publish勉強会2013年7月「実装ケーススタディ」
 
Falconjsの始め方 (share)
Falconjsの始め方 (share)Falconjsの始め方 (share)
Falconjsの始め方 (share)
 

Similar to Web Technology features with Firefox 3.6 / Gecko 1.9.2 and later

CSS3の最新事情
CSS3の最新事情CSS3の最新事情
CSS3の最新事情Makoto Kato
 
PlayFramework 2.0 Javaと WebSocketでつくる リアルタイムMVC Webアプリケーション
PlayFramework 2.0 Javaと WebSocketでつくる リアルタイムMVC WebアプリケーションPlayFramework 2.0 Javaと WebSocketでつくる リアルタイムMVC Webアプリケーション
PlayFramework 2.0 Javaと WebSocketでつくる リアルタイムMVC WebアプリケーションKazuhiro Hara
 
Firefoxの開発プロセス
Firefoxの開発プロセスFirefoxの開発プロセス
Firefoxの開発プロセスMakoto Kato
 
Concentrated HTML5 & Attractive HTML5
Concentrated HTML5 & Attractive HTML5Concentrated HTML5 & Attractive HTML5
Concentrated HTML5 & Attractive HTML5Sho Ito
 
Firefox with HTML+CSS
Firefox with HTML+CSSFirefox with HTML+CSS
Firefox with HTML+CSSdynamis
 
FirefoxとMozillaでのSVGの取り組み
FirefoxとMozillaでのSVGの取り組みFirefoxとMozillaでのSVGの取り組み
FirefoxとMozillaでのSVGの取り組みMakoto Kato
 
「html5 boilerplate」から考える、これからのマークアップ
「html5 boilerplate」から考える、これからのマークアップ「html5 boilerplate」から考える、これからのマークアップ
「html5 boilerplate」から考える、これからのマークアップYasuhito Yabe
 
JavaScript And Keywords
JavaScript And KeywordsJavaScript And Keywords
JavaScript And Keywordsuupaa
 
Firefox mobile for android internals
Firefox mobile for android internalsFirefox mobile for android internals
Firefox mobile for android internalsMakoto Kato
 
Firefox5+HTML5×5
Firefox5+HTML5×5Firefox5+HTML5×5
Firefox5+HTML5×5dynamis
 
HTML5開発最前線
HTML5開発最前線HTML5開発最前線
HTML5開発最前線yoshikawa_t
 
eZ Publish勉強会2013年3月「eZ Publishの構築を簡単に!」
eZ Publish勉強会2013年3月「eZ Publishの構築を簡単に!」eZ Publish勉強会2013年3月「eZ Publishの構築を簡単に!」
eZ Publish勉強会2013年3月「eZ Publishの構築を簡単に!」ericsagnes
 
Silverlightをあれこれ紹介
Silverlightをあれこれ紹介Silverlightをあれこれ紹介
Silverlightをあれこれ紹介mizusawa
 
Mozillaのビルドインフラ
MozillaのビルドインフラMozillaのビルドインフラ
MozillaのビルドインフラMakoto Kato
 
Firefox 4 with SVG
Firefox 4 with SVGFirefox 4 with SVG
Firefox 4 with SVGMakoto Kato
 
Jjug springセッション
Jjug springセッションJjug springセッション
Jjug springセッションYuichi Hasegawa
 

Similar to Web Technology features with Firefox 3.6 / Gecko 1.9.2 and later (20)

CSS3の最新事情
CSS3の最新事情CSS3の最新事情
CSS3の最新事情
 
PlayFramework 2.0 Javaと WebSocketでつくる リアルタイムMVC Webアプリケーション
PlayFramework 2.0 Javaと WebSocketでつくる リアルタイムMVC WebアプリケーションPlayFramework 2.0 Javaと WebSocketでつくる リアルタイムMVC Webアプリケーション
PlayFramework 2.0 Javaと WebSocketでつくる リアルタイムMVC Webアプリケーション
 
Firefoxの開発プロセス
Firefoxの開発プロセスFirefoxの開発プロセス
Firefoxの開発プロセス
 
Concentrated HTML5 & Attractive HTML5
Concentrated HTML5 & Attractive HTML5Concentrated HTML5 & Attractive HTML5
Concentrated HTML5 & Attractive HTML5
 
20090328
2009032820090328
20090328
 
Firefox with HTML+CSS
Firefox with HTML+CSSFirefox with HTML+CSS
Firefox with HTML+CSS
 
FirefoxとMozillaでのSVGの取り組み
FirefoxとMozillaでのSVGの取り組みFirefoxとMozillaでのSVGの取り組み
FirefoxとMozillaでのSVGの取り組み
 
20060419
2006041920060419
20060419
 
「html5 boilerplate」から考える、これからのマークアップ
「html5 boilerplate」から考える、これからのマークアップ「html5 boilerplate」から考える、これからのマークアップ
「html5 boilerplate」から考える、これからのマークアップ
 
JavaScript And Keywords
JavaScript And KeywordsJavaScript And Keywords
JavaScript And Keywords
 
HTML5最新動向
HTML5最新動向HTML5最新動向
HTML5最新動向
 
Firefox mobile for android internals
Firefox mobile for android internalsFirefox mobile for android internals
Firefox mobile for android internals
 
Mvc conf session_5_isami
Mvc conf session_5_isamiMvc conf session_5_isami
Mvc conf session_5_isami
 
Firefox5+HTML5×5
Firefox5+HTML5×5Firefox5+HTML5×5
Firefox5+HTML5×5
 
HTML5開発最前線
HTML5開発最前線HTML5開発最前線
HTML5開発最前線
 
eZ Publish勉強会2013年3月「eZ Publishの構築を簡単に!」
eZ Publish勉強会2013年3月「eZ Publishの構築を簡単に!」eZ Publish勉強会2013年3月「eZ Publishの構築を簡単に!」
eZ Publish勉強会2013年3月「eZ Publishの構築を簡単に!」
 
Silverlightをあれこれ紹介
Silverlightをあれこれ紹介Silverlightをあれこれ紹介
Silverlightをあれこれ紹介
 
Mozillaのビルドインフラ
MozillaのビルドインフラMozillaのビルドインフラ
Mozillaのビルドインフラ
 
Firefox 4 with SVG
Firefox 4 with SVGFirefox 4 with SVG
Firefox 4 with SVG
 
Jjug springセッション
Jjug springセッションJjug springセッション
Jjug springセッション
 

More from Makoto Kato

Active scripting
Active scriptingActive scripting
Active scriptingMakoto Kato
 
e10sとアプリ間通信
e10sとアプリ間通信e10sとアプリ間通信
e10sとアプリ間通信Makoto Kato
 
Firefox OSのアーキテクチャと構成技術
Firefox OSのアーキテクチャと構成技術Firefox OSのアーキテクチャと構成技術
Firefox OSのアーキテクチャと構成技術Makoto Kato
 
Openness, Innovation and Opptunity
Openness, Innovation and OpptunityOpenness, Innovation and Opptunity
Openness, Innovation and OpptunityMakoto Kato
 
Firefox 4 and Mobile
Firefox 4 and MobileFirefox 4 and Mobile
Firefox 4 and MobileMakoto Kato
 
Firefox for mobile
Firefox for mobileFirefox for mobile
Firefox for mobileMakoto Kato
 
ブラウザの歴史
ブラウザの歴史ブラウザの歴史
ブラウザの歴史Makoto Kato
 
Thunderbird 3のご紹介と企業に求められるカスタマイズ
Thunderbird 3のご紹介と企業に求められるカスタマイズThunderbird 3のご紹介と企業に求められるカスタマイズ
Thunderbird 3のご紹介と企業に求められるカスタマイズMakoto Kato
 
js-ctypes - ネイティブコードを呼び出す新しいカタチ
js-ctypes - ネイティブコードを呼び出す新しいカタチjs-ctypes - ネイティブコードを呼び出す新しいカタチ
js-ctypes - ネイティブコードを呼び出す新しいカタチMakoto Kato
 

More from Makoto Kato (18)

Active scripting
Active scriptingActive scripting
Active scripting
 
e10sとアプリ間通信
e10sとアプリ間通信e10sとアプリ間通信
e10sとアプリ間通信
 
Emoji
EmojiEmoji
Emoji
 
Moz2D
Moz2DMoz2D
Moz2D
 
Firefox OSのアーキテクチャと構成技術
Firefox OSのアーキテクチャと構成技術Firefox OSのアーキテクチャと構成技術
Firefox OSのアーキテクチャと構成技術
 
Openness, Innovation and Opptunity
Openness, Innovation and OpptunityOpenness, Innovation and Opptunity
Openness, Innovation and Opptunity
 
Mobile Web
Mobile WebMobile Web
Mobile Web
 
Firefox Mobile
Firefox MobileFirefox Mobile
Firefox Mobile
 
Firefox 4 and Mobile
Firefox 4 and MobileFirefox 4 and Mobile
Firefox 4 and Mobile
 
Mobile addon
Mobile addonMobile addon
Mobile addon
 
keep it real
keep it realkeep it real
keep it real
 
Think.next
Think.nextThink.next
Think.next
 
Firefox for mobile
Firefox for mobileFirefox for mobile
Firefox for mobile
 
"Open"
"Open""Open"
"Open"
 
ブラウザの歴史
ブラウザの歴史ブラウザの歴史
ブラウザの歴史
 
Raindrop
RaindropRaindrop
Raindrop
 
Thunderbird 3のご紹介と企業に求められるカスタマイズ
Thunderbird 3のご紹介と企業に求められるカスタマイズThunderbird 3のご紹介と企業に求められるカスタマイズ
Thunderbird 3のご紹介と企業に求められるカスタマイズ
 
js-ctypes - ネイティブコードを呼び出す新しいカタチ
js-ctypes - ネイティブコードを呼び出す新しいカタチjs-ctypes - ネイティブコードを呼び出す新しいカタチ
js-ctypes - ネイティブコードを呼び出す新しいカタチ
 

Recently uploaded

スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムsugiuralab
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdftaisei2219
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)Hiroki Ichikura
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略Ryo Sasaki
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A surveyToru Tamaki
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものですiPride Co., Ltd.
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...Toru Tamaki
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Yuma Ohgami
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNetToru Tamaki
 

Recently uploaded (9)

スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
 

Web Technology features with Firefox 3.6 / Gecko 1.9.2 and later

  • 1. Web Technology features with Firefox 3.6 / Gecko 1.9.2 and later Makoto Kato Technical Advisor, Mozilla Japan
  • 2. Agenda • Firefox 3.6 / Gecko 1.9.2やそれ以降のバー ジョンでサポートされる新たな規格 • File API (Firefox 3.6 / Gecko 1.9.2) • CSS Gradients (Firefox 3.6 / Gecko 1.9.2) • Web Open Font Format (Firefox 3.6 / Gecko 1.9.2) • WebGL (Firefox.next / Gecko 1.9.3) • Demo
  • 4. File API • <input type=“file”>で選択されたローカル フゔ゗ルへのゕクセスを提供 • ユーザーの操作にてフゔ゗ルを指定する • valueはそもそもJavaScriptから変更不可 • FileReaderを経由したフゔ゗ルゕクセス • HTML5 Drag & Dropと組み合わせると、ブラ ウザウゖンドウへのDrag & Dropでフゔ゗ル にゕクセスすることが可能
  • 5. File API • File゗ンターフェ゗ス • フゔ゗ル名、種類などの取得 • FileReader ゗ンターフェ゗ス • フゔ゗ルゕクセスの゗ンターフェ゗スを提供 • バ゗ナリ / テキスト / DataURLとして読み込む • エラー、進捗、完了などの゗ベントを提供 • resultプロパテゖに読み込んだ内容が入る • FileReaderSync ゗ンターフェ゗ス • 同期ゕクセス用 • 現時点でFirefox / Geckoでは未実装 • readAs*メソッドはFileException例外をスローする
  • 6. 使い方 – File API <input type=“file” id=“upload” /> <input type=“button” onclick=“clickbutton()” /> <script type=“text/javascript”> function clickbutton() { var file = document.getElementById(“upload”).files; for (var i = 0; i < files.length; i++) { var file = files[i]; processFile(file); // フゔ゗ル処理 } } function processFile(file) { var reader = new FileReader(); reader.readAsText(file); // テキストとして読み込む reader.onload = function () { /* 完了 */ window.alert(reader.result); }; reader.onprogress = function (event) { /* 進捗゗ベント */ }; } </script>
  • 7. 使い方 (w/ HTML5 Drag & Drop) <div id=“droptarget”>…</div> <script type=“text/javascript”> document.getElementById(“droptarget”).addEventListene r("drop", dropEvent, true); function dropEvent(event) { var files = event.dataTransfer.files; for (var i = 0; i < files.length; i++) { var file = files[i]; processFile(file); // フゔ゗ル処理 } } </script>
  • 9. CSS Gradients • 現時点で定義されている形は2つ • Linear • Radial • 繰り返しの形式(repeating)もサポート • 先に実装されたWebKitでは構文が異なる • WebKitでの先に行われた実装 (例: linear) • background: -webkit-gradient(linear, left top, left bottom, from(white), to(gray)); • 現在のドラフト (例: linear) • background: linear-gradient(top, white, gray);
  • 10. CSS Gradients • Firefox 3.6 / Gecko 1.9.2では、”-moz- ”prefixを使う必要あり (-moz-linear-gradient) • 画像を受け入れることができるCSSプロパテゖす べてで利用可能 • Firefox 3.6ではbackgroundくらいにしか動作しません
  • 11. Linear Gradients • linear-gradient( [<point> || <angle>,]? <stop>, <stop> [, <stop>]* ) linear-gradient( top, blue, white ); linear-gradient( 45deg, blue, white);
  • 12. Radial Gradients • radial-gradient( [<position> || <angle>,]? [<shape> || <size>,]? <stop>, <stop>[, <stop>]* ) -moz-radial-gradient( red, yellow, green );
  • 13. Repeating Gradient • Linerやradialの記述へ”repeating-”のprefix を追加 repeating-linear-gradient( top, blue 5px, white 20px); repeating-linear-gradient( top left -45deg, red, red 5px, white 5px, white 10px);
  • 15. Web Font Support • Firefox 3.5でWebフォントをサポート @font-face { font-family: GentiumTest; src: url(fonts.ttf); } • OpenTypeとTrueTypeフォントのみ
  • 16. Web Font Support • Firefox 3.6では新しいWebフォント形式 (WOFF) をサポート @font-face { font-family: GentiumTest; src: url(fonts.woff) format("woff"); } • フォントベンダと共同で作成した新しいフォント 形式 • OpenTypeなどよりもサ゗ズは小さい • 現状では差分ダウンロードには対応していない • MIMEタ゗プは決まってない 16
  • 17. WebGL
  • 18. 現状のブラウザでのレンダリング • HTMLなどのレンダリングにはOSのAPIを利用 • GDI, Quartz, Cairo and etc… • チップのハードウェゕ・ゕクセラレーションが 使われるかどうかは、利用するAPI、OS次第 • プラグ゗ンなしでは、3D画像であってもソフ トウェゕで3D画像を計算する必要がある
  • 19. 現在のグラフィック・ハードウェア (GPU) • 現在のAMD、NVIDIA、IntelなどのPC向けの グラフゖック・チップでは3D向けのDirectX9 やOpenGLのサポートが含まれている • モバ゗ル分野であっても、TIやQualcomm、 iPhoneの最新チップセットではOpenGL ES 2.0のサポートが含まれる
  • 20. WebGL • The Khronos GroupでAPI仕様の策定 • Apple、Google、Mozilla、Operaが参加 • OpenGL ES 2.0ベースのAPIをJavaScriptから ゕクセス • シェーダーやテクスチャも利用可能 • Canvasへの描画 • 最新のGecko (1.9.3) やWebKitで利用可能 • Firefoxの開発版で利用する場合は、about:config でwebgl.enabled_for_all_sitesをtrueに設定する 必要あり
  • 21. シェーダー・サポート • バーテックス・シェーダー <script type=“x-shader/x-vertex”> • フラグメント・シェーダー (ピクセル・シェー ダー) <script type=“x-shader/x-fragment”>
  • 22. 使い方 <canvas id=“glcanvas” /> <script type=“text/javascript”> // Canvas elementの取得 var canvas = document.getElementById(“glcanvas”); // WebGLのコンテキストの取得 // Geckoでは”moz-webgl”または”experimental-webgl” // WebKitでは”webkit-3d” var gl = canvas.getContext(‘webgl’); // 描画 … </script>
  • 23. DEMO
  • 24. Reference – File API • File API Draft • http://dev.w3.org/2006/webapi/FileAPI/ • Using files from web applications • https://developer.mozilla.org/en/Using_files_f rom_web_applications • Demo by hacks.mozilla.org • http://hacks.mozilla.org/category/fileapi/ • http://www.youtube.com/mozhacks#p/u/2/4 Us6S0fDV7U
  • 25. Reference – CSS Gradients • Gradients – CSS Image Values Module Level 3 Draft • http://dev.w3.org/csswg/css3-images/#gradients- • css gradients in Firefox 3.6 • http://hacks.mozilla.org/2009/11/css-gradients- firefox-36/ • Demo by hacks.mozilla.org • http://demos.hacks.mozilla.org/openweb/cssBackg round/gradients/
  • 26. Reference - WOFF • Web Open Font Format for Firefox 3.6 • http://hacks.mozilla.org/2009/10/woff/ • CSS Fonts Module Level 3 • http://dev.w3.org/csswg/css3-fonts • WOFF File Format Draft • http://people.mozilla.com/~jkew/woff/woff- spec-latest.html
  • 27. Referenece - WebGL • Khronos Group • http://www.khronos.org/webgl/ • WebGL Draft • https://cvs.khronos.org/svn/repos/registry/trunk/public/ webgl/doc/spec/WebGL-spec.html • Mozilla Developer Center • https://developer.mozilla.org/en/WebGL • Demo by hacks.mozilla.org • http://hacks.mozilla.org/category/webgl/ • Demo by Khronos • https://cvs.khronos.org/svn/repos/registry/trunk/public/ webgl/sdk/demos/webkit/