ããã«ã¡ã¯ãHabrïŒ Lin Clarkã«ããèšäºã è¶ é«éCSSãšã³ãžã³ã®å éšïŒQuantum CSSïŒå¥åStyloïŒ ãã®ç¿»èš³ã玹ä»ããŸãã
Project Quantumã®ããšãèããããšããããããããŸãã...ããã¯ãFirefoxã®å éšãå€§å¹ ã«åèšèšããŠãã©ãŠã¶ã®é床ãäžãããããžã§ã¯ãã§ãã äžéšã§ã¯ãå®éšçãªãã©ãŠã¶Servoã®ææã玹ä»ãããšã³ãžã³ã®æ®ãã®èŠçŽ ãå€§å¹ ã«æ¹åããŸãã
ãã®ãããžã§ã¯ãã¯ãé£è¡æ©ã®ãšã³ãžã³ããã®å Žã§äº€æããããšãšæ¯èŒãããŸããã Firefoxã®ã³ã³ããŒãã³ãã¯ã³ã³ããŒãã³ãããšã«å€æŽãããããã次ã®ãã©ãŠã¶ãªãªãŒã¹ã§ãã®å¹æãããã«è©äŸ¡ã§ããŸãã
ã泚æ 翻蚳è ïŒã«ããã®äžã§å€ãã®ã€ã©ã¹ãã ãããã¯ãã¹ãŠã¯ãªãã¯å¯èœã§ãïŒé«è§£å床ã§è¡šç€ºããããïŒã 翻蚳ã®èª€ãããã®ä»ã®ãšã©ãŒã«åºããããå Žåã¯ãã³ã¡ã³ããŸãã¯PMã§å ±åããŠããã ããã°å¹žãã§ãã
ãŸããServoã®æåã®äž»èŠã³ã³ããŒãã³ãã§ããæ°ããQuantum CSS CSSãšã³ãžã³ïŒä»¥åã®StyloïŒã¯ãFirefoxã®ãã€ããªãŒãã«ãã§ã®ãã¹ãã«äœ¿çšã§ããããã«ãªããŸããïŒç¿»èš³è
ã®ã¡ã¢ïŒãã§ã«å®å®ããŠããããšã瀺åãã55ïŒ ã å«ããã«ã¯ã about:config
layout.css.servo.enabled
ãªãã·ã§ã³ã責任ãè² ããŸãã
ãã®æ°ãããšã³ãžã³ã¯ãä»ã®ãã©ãŠã¶ãŒã®æé«ã®é©æ°ãå®çŸããŠããŸãã
Quantum CSSã¯ããã¹ãŠã®ããã»ããµã³ã¢éã§äœæ¥ã䞊ååããããšã«ãããææ°ã®éã掻çšããæ倧2ã4ããŸãã¯18åã®å éãå®çŸããŸãã
ããã«ãä»ã®ãã©ãŠã¶ãŒã®ææ°ã®æé©åãçµã¿åãããŠããããã䞊ååããªããŠãéåžžã«é«éã§ãã
ããããCSSãšã³ãžã³ã¯æ£ç¢ºã«äœãããŸããïŒ æåã«ãCSSãšã³ãžã³å šäœãšãã©ãŠã¶å ã§ã®äœçœ®ãèŠãŠã¿ãŸãããã次ã«ãQuantum CSSããã®å šäœãé«éåããæ¹æ³ãèŠãŠã¿ãŸãããã
CSSãšã³ãžã³ãšã¯äœã§ããïŒ
CSSãšã³ãžã³ã¯ããã©ãŠã¶ãŒã®ã¬ã³ããªã³ã°ãšã³ãžã³ã®äžéšã§ãã ã¬ã³ããªã³ã°ãšã³ãžã³ã¯HTMLããã³CSSãµã€ããã¡ã€ã«ãåãå ¥ããç»é¢äžã®ãã¯ã»ã«ã«å€æããŸãã
åãã©ãŠã¶ã«ã¯ã¬ã³ããªã³ã°ãšã³ãžã³ããããŸãã Chromeã«ã¯BlinkãEdgeã«ã¯EdgeHTMLãSafariã«ã¯WebKitãFirefoxã«ã¯GeckoããããŸãã
ãã¡ã€ã«ããã¯ã»ã«ã«ãã€ãžã§ã¹ãããã«ã¯ããããã¯ãã¹ãŠã»ãŒåãããšãè¡ããŸãã
1ïŒãã¡ã€ã«ã解æããŠãDOMãå«ããã©ãŠã¶ãŒãã¬ã³ããªãŒãªãªããžã§ã¯ãã«ããŸãã ãã®æç¹ã§ãDOMã¯ããŒãžã®æ§é ãç¥ã£ãŠãããèŠçŽ éã®èŠªã®é¢ä¿ãç¥ã£ãŠããŸããããããã®èŠçŽ ãã©ã®ããã«èŠããã¹ãããç¥ããŸããã
2ïŒèŠçŽ ã®å€èŠ³ã®æ±ºå®ã åDOMããŒãã«ã€ããŠãCSSãšã³ãžã³ã¯ã©ã®CSSã«ãŒã«ãé©çšããããå€æããŸãã 次ã«ãåCSSããããã£ã®å€ãå®çŸ©ããŸãã DOMããªãŒã®åããŒããå®ååããèšç®ãããã¹ã¿ã€ã«ãæ·»ä»ããŸãã
3ïŒåããŒãã®ãµã€ãºãšäœçœ®ã ç»é¢ã«è¡šç€ºããå¿ èŠããããã¹ãŠã®ãã®ã«ã€ããŠãããã¯ã¹ãäœæãããŸãã ãããã¯DOMããŒãã ãã§ãªãããããã®å éšã«ãããã®ãè¡šããŸãã ããšãã°ãããã¹ãã®è¡ã
4ïŒæç»ãããã¯ã è€æ°ã®å±€ã§çºçããå¯èœæ§ããããŸãã ããã¯ãæ°æã®åéæã®çŽã«æãããå€ãææãã®ã¢ãã¡ãŒã·ã§ã³ã ãšæããŸãã ããã«ãããä»ã®ã¬ã€ã€ãŒãåæç»ããã«1ã€ã®ã¬ã€ã€ãŒãå€æŽã§ããŸãã
5ïŒã¬ã€ã€ãŒã«ã³ã³ããŒã¶ãŒã®å¿ èŠãªããããã£ïŒå€æãªã©ïŒãé©çšããåŸã1ã€ã®ç»åã«ã¬ã€ã€ãŒãçµåããŸãã ããã¯ãã¬ã€ã€ãŒãçµã¿åãããŠåçãæ®ãæ¹æ³ã§ãã ããã«ããã®ç»åãç»é¢ã«è¡šç€ºãããŸãã
ã€ãŸããCSSãšã³ãžã³ã®å ¥åã§ã¹ã¿ã€ã«ã®èšç®ãéå§ããåã«ã以äžããããŸãã
- DOMããªãŒ
- ã¹ã¿ã€ã«ã«ãŒã«ã®ãªã¹ã
ãããã£ãŠãåDOMããŒãã®ã¹ã¿ã€ã«ã亀äºã«å®çŸ©ããŸãã ã¹ã¿ã€ã«ã·ãŒãã§æå®ãããŠããªãå Žåã§ããåCSSããããã£ã«å€ãå²ãåœãŠãããŸãã
ããã¯ããã¹ãŠã®ãã£ãŒã«ããå¿ èŠãªãã©ãŒã ã«èšå ¥ããããšã ãšæããŸãã DOMããŒãããšã«ãã®ãããªãã©ãŒã ã«èšå ¥ããå¿ èŠããããŸãã
ãããè¡ãã«ã¯ãCSSãšã³ãžã³ã¯2ã€ã®ããšãè¡ãå¿ èŠããããŸãã
- ããŒãã«é©çšããã«ãŒã«ãéžæããŸãïŒã»ã¬ã¯ã¿ãŒãããã³ã°ïŒ
- ãã¹ãŠã®æ¬ æå€ãæšæºå€ã§åãããã芪å€ãç¶æ¿ããŸãïŒã«ã¹ã±ãŒããã«ã¹ã±ãŒãïŒ
äžèŽããã»ã¬ã¯ã¿ãŒ
ãŸãããªã¹ãå ã®ããŒãã«é©çšããããã¹ãŠã®ã«ãŒã«ãéžæããŸãã ããã€ãã®é©åãªã«ãŒã«ãååšããå¯èœæ§ããããããåãããããã£ã®è€æ°ã®å®çŸ©ãå¯èœã§ãã
ããã«ããã©ãŠã¶èªäœãããã€ãã®æšæºã¹ã¿ã€ã«ïŒãŠãŒã¶ãŒãšãŒãžã§ã³ãã¹ã¿ã€ã«ã·ãŒãïŒãè¿œå ããŸãã ã§ã¯ãCSSãšã³ãžã³ã¯ã©ã®å€ã䜿çšããããã©ã®ããã«æ±ºå®ããŸããïŒ
ãããããç¹ç°æ§ã«ãŒã«ããç§ãã¡ã®å©ãã«ãªããšããã§ãã CSSãšã³ãžã³ã¯å®çŸ©ããŒãã«ãäœæãããããããŸããŸãªåã«ãœãŒãããŸãã
æãç¹ç°æ§ã®é«ãã«ãŒã«ãåªå ãããŸãã ãã®ãããªããŒãã«ã«åºã¥ããŠãCSSãšã³ãžã³ã¯ãæå®ããããã¹ãŠã®å€ããã©ãŒã ã«æäŸããŸãã
æ®ãã¯ã«ã¹ã±ãŒãã«ãã£ãŠèšç®ãããŸãã
ã«ã¹ã±ãŒã
ã«ã¹ã±ãŒãã«ãããCSSã®èšè¿°ãšä¿å®ãç°¡åã«ãªããŸãã ãã®ãããã§ã body
color
ããããã£ãèšå®ã§ãã p
ã span
ã li
èŠçŽ ã®ããã¹ãã®è²ãåãã«ãªãããšãç¥ãããšãã§ããŸãïŒèªåã§åå®çŸ©ããªãéãïŒã
CSSãšã³ãžã³ã¯ããã©ãŒã äžã®ç©ºçœãã£ãŒã«ãããã§ãã¯ããŸãã ããããã£ãããã©ã«ãã§ç¶æ¿ãããå ŽåãCSSãšã³ãžã³ã¯ããªãŒãäžã«ç§»åããããããã£ã芪èŠçŽ ã®å€ã«èšå®ãããŠãããã©ããã確èªããŸãã ç¥å ã®ããããå€ã決å®ããªãå ŽåããŸãã¯å€ãç¶æ¿ãããªãå Žåãããã©ã«ãå€ãèšå®ãããŸãã
ããã§ãæå®ãããDOMããŒãã®ãã¹ãŠã®ã¹ã¿ã€ã«ãèšç®ããããã©ãŒã ãåããããŸãã
泚ïŒã¹ã¿ã€ã«æ§é ã®å ±æ
説æãããŠãããã©ãŒã ã¯ãããã«ç°¡ç¥åãããŠããŸãã CSSã«ã¯äœçŸãã®ããããã£ããããŸãã CSSãšã³ãžã³ãåDOMããŒãã®åããããã£ã®å€ãä¿æããŠããå Žåãå©çšå¯èœãªãã¹ãŠã®ã¡ã¢ãªãããã«äœ¿çšããŸãã
代ããã«ããšã³ãžã³ã¯éåžžãã¹ã¿ã€ã«æ§é å ±æã¡ã«ããºã ã䜿çšããŸãã ãããã¯ããã¹ã¿ã€ã«æ§é ããšåŒã°ããå¥ã®ãªããžã§ã¯ãã«äžè¬çã«äžç·ã«äœ¿çšãããå€ïŒãã©ã³ãããããã£ãªã©ïŒãæ ŒçŽããŸãã ããã«ããã¹ãŠã®ããããã£ã1ã€ã®ãªããžã§ã¯ãã«ä¿åãã代ããã«ãèšç®ãããã¹ã¿ã€ã«ã®ãªããžã§ã¯ãã«ã¯ãã€ã³ã¿ãŒã®ã¿ãå«ãŸããŸãã åããããã£ã«ããŽãªã«ã¯ãç®çã®å€ãæã€ã¹ã¿ã€ã«æ§é ãžã®ãã€ã³ã¿ããããŸãã
ããã«ãããã¡ã¢ãªãšæéã®äž¡æ¹ãç¯çŽãããŸãã åæ§ã®ã¹ã¿ã€ã«ãæã€ããŒãã¯ãå ±éã®ããããã£ã®åãã¹ã¿ã€ã«æ§é ãåçŽã«æãããšãã§ããŸãã ãŸããå€ãã®ããããã£ãç¶æ¿ãããããã芪ã¯èªèº«ã®å€ããªãŒããŒã©ã€ãããªãåããŒããšæ§é ãå ±æã§ããŸãã
ããã§ã¯ãã©ãããã°ãããé«éåã§ããŸããïŒ
ããã¯ãæé©åãããŠããªãã¹ã¿ã€ã«ã®èšç®ããã»ã¹ã®æ§åã§ãã
ããã§å€ãã®äœæ¥ãè¡ãããŸãã ãããŠãæåã®ããŒãžã®ããŒãæã ãã§ã¯ãããŸããã ãããŠäœåºŠãäœåºŠããããŒãžãšã®å¯Ÿè©±ã®éçšã§ãèŠçŽ ã«ã«ãŒãœã«ãåãããããDOMãå€æŽãããšãã¹ã¿ã€ã«ã®åèšç®ãåŒã³åºãããŸãã
ããã¯ãCSSã¹ã¿ã€ã«ã®èšç®ãæé©åã®åªããåè£ã§ããããšãæå³ããŸã...ãããŠéå»20幎ã«ããã£ãŠããã©ãŠã¶ãŒã¯ããŸããŸãªæé©åæŠç¥ããã¹ãããŠããŸããã Quantum CSSã¯ããããã®ãã¹ããçµã¿åãããŠãæ°ããè¶ é«éãšã³ãžã³ãäœæããããšããŠããŸãã
ãã¹ãŠãã©ã®ããã«é£æºããããèŠãŠã¿ãŸãããã
䞊åå
Servoãããžã§ã¯ãïŒQuantum CSSã®åºæïŒã¯ãWebããŒãžã®ã¬ã³ããªã³ã°ããã»ã¹ã§ãã¹ãŠã䞊ååããããšããå®éšçãªãã©ãŠã¶ã§ãã ããã¯ã©ãããæå³ã§ããïŒ
ã³ã³ãã¥ãŒã¿ãŒãšè³ãæ¯èŒã§ããŸãã æèã«è²¬ä»»ã®ããèŠçŽ ïŒALUïŒããããŸãã è¿ãã«ã¯çæèšæ¶ïŒã¬ãžã¹ã¿ïŒã®ãããªãã®ããããåŸè ã¯äžå€®åŠçè£ çœ®ã§ã°ã«ãŒãåãããŸãã ããã«ãé·æèšæ¶ïŒRAMïŒããããŸãã
åæã®ã³ã³ãã¥ãŒã¿ãŒã¯ãäžåºŠã«1ã€ã®èãããèããããŸããã§ããã ããããéå»æ°å幎ã«ããã£ãŠãããã»ããµã¯å€åããçŸåšã§ã¯ã«ãŒãã«ã«ã°ã«ãŒãåãããè€æ°ã®ALUãšã¬ãžã¹ã¿ããããŸãã ãã®ãããããã»ããµã¯åæã«è€æ°ã®æèã䞊è¡ããŠèããããšãã§ããŸãã
Quantum CSSã¯ããããå©çšããŠãããŸããŸãªDOMããŒãã®ã¹ã¿ã€ã«èšç®ãããŸããŸãªã³ã¢ã«åå²ããŸãã
ããã¯ç°¡åã«æãããããããŸãã...åã«æšã®æãåå²ããç°ãªãã«ãŒãã«ã§ããããåŠçããŸãã å®éãããã€ãã®çç±ã«ããããã¹ãŠãã¯ããã«è€éã«ãªã£ãŠããŸãã æåã®çç±ã¯ãDOMããªãŒãäžåäžã§ããããšãå€ãããšã§ãã ã€ãŸããäžéšã®ã³ã¢ã¯ä»ã®ã³ã¢ãããããªãå€ãã®äœæ¥ãååŸããŸãã
äœæ¥ãããåçã«åæ£ããããã«ãQuantum CSSã¯äœæ¥ã¹ããŒã«ãšåŒã°ããææ³ã䜿çšããŸãã DOMããŒããåŠçããããšãããã°ã©ã ã¯çŽæ¥ã®åãååŸãããããã1ã€ä»¥äžã®ãäœæ¥åäœãã«åå²ããŸãã ãããã®äœæ¥åäœã¯ãã¥ãŒã«å ¥ããããŸãã
ã«ãŒãã«ã¯ãé çªã«ãã¹ãŠã®äœæ¥ãå®äºãããšãä»ã®ãã¥ãŒã§ãžã§ããæ¢ãããšãã§ããŸãã ãããã£ãŠãããªãŒå šäœã«æž¡ã£ãŠäºåè©äŸ¡ãè¡ãå¿ èŠãªããäœæ¥ãåçã«åæ£ããŸãã
ã»ãšãã©ã®ãã©ãŠã¶ã§ã¯ããããæ£ããå®è£ ããããšã¯å°é£ã§ãã åæå®è¡ã¯æå³çã«å°é£ãªã¿ã¹ã¯ã§ãããCSSãšã³ãžã³èªäœã¯éåžžã«è€éã§ãã ãŸããã¬ã³ããªã³ã°ãšã³ãžã³ã®ä»ã®2ã€ã®æãé£ããéšåã§ããDOMãšããŒã¯ã¢ããã®éã«ãããŸãã äžè¬ã«ãééããç¯ãã®ã¯ç°¡åã§ããã䞊ååã¯ããŒã¿ç«¶åãšåŒã°ããéåžžã«ãããã«ãããã°ã«ã€ãªããå¯èœæ§ããããŸãã ãããã®ãã°ã«ã€ããŠã¯ã å¥ã®èšäºã§è©³ãã説æããŠããŸã ïŒ ãã·ã¢èªãžã®ç¿»èš³ããããŸãïŒã
äœåäžäººãã®è²¢ç®è ããã®ç·šéãåãå ¥ããå Žåãã©ãããã°æããããšãªã䞊è¡æ§ãé©çšã§ããŸããïŒ ããã«ã¯RustããããŸãã
Rustã䜿çšãããšã䜿çšå¯èœãªããŒã¿ã®ç«¶åããªãããšãéçã«ç¢ºèªã§ããŸãã ã€ãŸããè€éãªãã°ãæåã¯ã³ãŒãã«èš±å¯ããªãããšã§åé¿ã§ããŸãã ã³ã³ãã€ã©ãŒã¯åçŽã«ãããèš±å¯ããŸããã ããã«ã€ããŠã¯ãä»åŸã®èšäºã§è©³ãã説æããŸãã ãŸããRustã®åæå®è¡ã«é¢ãã玹ä»ãããªãã ãä»äºã®çé£ãã«é¢ãããã®è©³çŽ°ãªããŒã¯ãèŠãããšãã§ããŸãã
ããã«ãããåé¡ãå€§å¹ ã«ç°¡çŽ åãããŸãã çŸåšãCSSã¹ã¿ã€ã«ã·ãŒããå¹ççã«äžŠè¡ããŠå®è£ ããããšã劚ãããã®ã¯ã»ãšãã©ãããŸããã ããã¯ãç·åœ¢å éã«è¿ã¥ãããšãã§ããããšãæå³ããŸãã ããã»ããµã4ã³ã¢ã®å Žåã䞊ååã«ããé床ãã»ãŒ4åã«ãªããŸãã
ã«ãŒã«ããªãŒã䜿çšããŠå²ãåœãŠãå éãã
DOMããŒãããšã«ãCSSãšã³ãžã³ã¯ãã¹ãŠã®ã«ãŒã«ã«åŸããã»ã¬ã¯ã¿ãŒãšäžèŽããå¿ èŠããããŸãã ã»ãšãã©ã®ããŒãã§ã¯ã察å¿ããã»ã¬ã¯ã¿ãŒã¯ã»ãšãã©å€æŽãããŸããã ããšãã°ããŠãŒã¶ãŒãèŠçŽ ã«ã«ãŒãœã«ãåããããšãããã«å¯Ÿå¿ããã«ãŒã«ãå€æŽãããå ŽåããããŸãã ããããã£ã®ç¶æ¿ãåŠçããã«ã¯ã圌ã®ãã¹ãŠã®åå«ã®ã¹ã¿ã€ã«ãåéèšããå¿ èŠããããŸãã ãã ãããããã®åå«ã«å¯Ÿå¿ããã«ãŒã«ã¯ããããå€æŽãããŸããã
ãããã®åå«ã«å¯Ÿå¿ããã«ãŒã«ãèŠããŠãããšäŸ¿å©ã§ããããã«ãããã»ã¬ã¯ã¿ãŒãååºŠç §åããå¿ èŠããªããªããŸãããŸããFirefoxã®ä»¥åã®ããŒãžã§ã³ããäœæãããã«ãŒã«ããªãŒã¯ãããå®è¡ããŸãã
CSSãšã³ãžã³ã¯ãèŠçŽ ã«äžèŽããã»ã¬ã¯ã¿ãŒãéžæããç¹ç°æ§ã«ãã£ãŠäžŠã¹æ¿ããŸãã çµæã¯ãã«ãŒã«ã®ãªã³ã¯ãªã¹ãã§ãã
ãã®ãªã¹ããããªãŒã«è¿œå ãããŸãã
CSSãšã³ãžã³ã¯ãå¯èœãªéãããªãŒå ã®ãã©ã³ãã®æ°ãæå°éã«æããŠåå©çšããããšããŸãã
ãªã¹ãå ã®ã»ã¬ã¯ã¿ãŒã®ã»ãšãã©ãæ¢åã®ãã©ã³ããšäžèŽããå Žåã¯ãããã«ç¶ããŸãã ãã ãããªã¹ãå ã®æ¬¡ã®ã«ãŒã«ãæ¢åã®ãã©ã³ãã®ã«ãŒã«ãšäžèŽããªããã€ã³ãã«å°éããå¯èœæ§ããããŸãã ãã®å Žåã®ã¿ãæ°ãããã©ã³ããäœæãããŸãã
DOMããŒãã¯ãæåŸã«è¿œå ãããã«ãŒã«ïŒãã®äŸã§ã¯div#warning
ïŒãžã®ãã€ã³ã¿ãŒãåãåããŸãã æãå
·äœçã§ãã
ã¹ã¿ã€ã«ãåèšç®ããå Žåããšã³ãžã³ã¯ã¯ã€ãã¯ãã§ãã¯ãå®è¡ããŠã芪èŠçŽ ã®ã«ãŒã«ã®å€æŽãåã®ã«ãŒã«ã«åœ±é¿ãããã©ããã確èªããŸãã ããã§ãªãå Žåããã¹ãŠã®åå«ã«ã€ããŠããšã³ãžã³ã¯åçŽã«ããªãŒå ã®å¯Ÿå¿ããã«ãŒã«ãžã®ãã€ã³ã¿ãŒã䜿çšã§ããŸãã ã€ãŸããäžèŽããã»ã¬ã¯ã¿ãŒãšãœãŒããå®å šã«ã¹ãããããŸãã
ãããã£ãŠãããã¯ã¹ã¿ã€ã«ãåèšç®ãããšãã«æéãç¯çŽããã®ã«åœ¹ç«ã¡ãŸãããæåã®èšç®ã«ã¯ãŸã æéãããããŸãã ããŒãã10,000åããå Žåãã»ã¬ã¯ã¿ãŒã®ãããã³ã°ã¯10,000åå®è¡ããå¿ èŠããããŸãã ãããããããã¹ããŒãã¢ããããæ¹æ³ããããŸãã
å ±æã¹ã¿ã€ã«ãã£ãã·ã¥ã䜿çšããåæã¬ã³ããªã³ã°ã®é«éå
æ°åã®ããŒããããããŒãžãæ³åããŠãã ããã ãããã®å€ãã¯åãã«ãŒã«ã«åŸããŸãã ããšãã°ãé·ããŠã£ãããã£ã¢ããŒãžãæ³åããŠãã ãããã¡ã€ã³ã³ã³ãã³ãã®æ®µèœã«ã¯ããŸã£ããåãã¹ã¿ã€ã«ã«ãŒã«ãšãŸã£ããåãèšç®ã¹ã¿ã€ã«ãå¿ èŠã§ãã
æé©åãè¡ããªãå ŽåãCSSãšã³ãžã³ã¯ã»ã¬ã¯ã¿ãŒãšäžèŽããå段èœã®ã¹ã¿ã€ã«ãåå¥ã«èšç®ããå¿ èŠããããŸãã ãããããã¹ãŠã®æ®µèœã®ã¹ã¿ã€ã«ãåãã§ããããšã蚌æããæ¹æ³ãããã°ããšã³ãžã³ã¯ãã®äœæ¥ãäžåºŠã ãå®è¡ã§ããåããŒãããåãèšç®ãããã¹ã¿ã€ã«ãæãã ãã§ãã
ããããããSafariãšChromeããã€ã³ã¹ãã¬ãŒã·ã§ã³ãåŸãŠãäžè¬çãªã«ãŒã«ãã£ãã·ã¥ãäœæãããã®ã§ãã èŠçŽ ã®åŠçåŸãèšç®ãããã¹ã¿ã€ã«ã¯ãã£ãã·ã¥ã«é 眮ãããŸãã ããã«ã次ã®èŠçŽ ã®ã¹ã¿ã€ã«ã®èšç®ãéå§ããåã«ããã£ãã·ã¥ããäœãã䜿çšã§ãããã©ããã確èªããããã«ããã€ãã®ãã§ãã¯ãå®è¡ãããŸãã
ãã§ãã¯ã¯æ¬¡ã®ãšããã§ãã
- 2ã€ã®ããŒããåãIDãã¯ã©ã¹ãªã©ãæã£ãŠããã ãããããªãã圌ãã¯åãã«ãŒã«ã«åŸããŸãã
- ã»ã¬ã¯ã¿ãŒã«åºã¥ããŠããªããã¹ãŠã®ãã®ïŒã€ã³ã©ã€ã³ã¹ã¿ã€ã«ãªã©ïŒã«å¯ŸããŠåãå€ãæã£ãŠããŸããïŒ ãã®å Žåãäžèšã®ã«ãŒã«ã¯äžæžããããªãããäž¡æ¹ã§åãããã«åå®çŸ©ãããŸãã
- äž¡æ¹ã®èŠªããèšç®ãããã¹ã¿ã€ã«ã®åããªããžã§ã¯ããæãããã«ããŸãã ãã®å Žåãç¶æ¿ãããå€ãåãã«ãªããŸãã
ãããã®ãã§ãã¯ã¯ãæåããäžè¬çãªã¹ã¿ã€ã«ãã£ãã·ã¥ã®åæããŒãžã§ã³ã«å®è£
ãããŠããŸããã ããããã¹ã¿ã€ã«ãäžèŽããªãå°ããªç¶æ³ãå€ããããŸãã ããšãã°ãCSSã«ãŒã«ã:first-child
ã»ã¬ã¯ã¿ãŒã䜿çšããå Žåãäžèšã®ãã§ãã¯ã§å¥ã®æ¹æ³ã§æå®ãããŠããŠãã2ã€ã®æ®µèœã®ã¹ã¿ã€ã«ãäžèŽããªãå ŽåããããŸãã
ãã®ãããªç¶æ³ã§ã®WebKitãšBlinkã¯ãããããäžè¬çãªã¹ã¿ã€ã«ã®ãã£ãã·ã¥ã䜿çšããŸããã ãŸãããããã®ææ°ã®ã»ã¬ã¯ã¿ãŒã䜿çšãããµã€ããå€ãã»ã©ããã®æé©åã®æçšæ§ã¯äœããªããããBlinkããŒã ã¯æè¿ãã®ã»ã¬ã¯ã¿ãŒãå®å šã«åé€ããŸããã ãããããããã®ãã¹ãŠã®æŽæ°ãšå ±éã¹ã¿ã€ã«ã®ãã£ãã·ã¥ã«ã€ããŠããæ©äŒãããããšãããããŸããã
Quantum CSSã§ã¯ããããã®å¥åŠãªã»ã¬ã¯ã¿ãŒããã¹ãŠåéããããããDOMããŒãã«é©çšããããã©ããã確èªããŸãã 次ã«ããã®ãããªã»ã¬ã¯ã¿ãŒããšã«ããã®ãã§ãã¯ã®çµæãåäœãšãŒããšããŠä¿åããŸãã 2ã€ã®èŠçŽ ã«1ãš0ã®åäžã®ã»ãããããå Žåãããããå®å šã«äžèŽããããšãããããŸãã
DOMããŒãããã§ã«èšç®ãããŠããã¹ã¿ã€ã«ã䜿çšã§ããå Žåãå®éã«ã¯ã»ãšãã©ãã¹ãŠã®äœæ¥ãã¹ããããããŸãã å€ãã®å ŽåãããŒãžã«ã¯åãã¹ã¿ã€ã«ã®ããŒããå€æ°ãããããå ±éã®ã¹ã¿ã€ã«ãã£ãã·ã¥ã䜿çšãããšã¡ã¢ãªãç¯çŽãããäœæ¥ãå€§å¹ ã«é«éåãããŸãã
ãããã«
ããã¯ãServoããFirefoxãžã®æåã®äž»èŠãªæè¡ç§»è»¢ã§ãã Firefoxã®ã³ã¢ã«ææ°ã®é«æ§èœRustã³ãŒããçµã¿èŸŒãæ¹æ³ã«ã€ããŠå€ãã®ããšãåŠã³ãŸããã
Project Quantumã®å€§éšåãããŒã¿çãšããŠäœ¿çšã§ããããã«ãªã£ãããšãéåžžã«å¬ããæããŸãã è©ŠããŠã¿ãŠããšã©ãŒãçºçããå Žåã¯å ±åããŠãã ãã ã
ãªã³ã»ã¯ã©ãŒã¯ã«ã€ããŠ
Linã¯ãMozilla Developer RelationsããŒã ã®ãšã³ãžãã¢ã§ãã JavaScriptãWebAssemblyãRustãããã³Servoã§åäœããŸãã ãŸãã ã³ãŒã挫ç»ãæããŸã ã