Geckoの中のアニメ インターネットを知らず

Geckoの中のアニメ
インターネットを知らず

Gecko内でのアニメーション処理の流れ

Script by @craigbuckler sitepoint.com/css3-starwars-scrolling-text/

?

labyrinth Image by Toni Pecoraro
Three cats watching TV Photo by Major Clanger

documentの特定

        // nsIDocument* document;
nsAutoCString spec;
document->GetDocumentURI()->GetSpec(spec);
printf("document: %s\n", spec.get());
      

1. animationの特定 (DOM要素から)

HTML
      
C++
      // Element* element;
nsAutoString id;
element->GetId(id);
printf("element: %s\n",
       NS_ConvertUTF16toUTF8(id).get());
      

2. animationの特定 (nsIFrameから)

      // nsIFrame* frame;
if (frame->GetContent()->IsElement()) {
  // elementから特定できるようになる
  Element* element =
    frame->GetContent()->AsElement();
      

3. animationの特定 (id属性から)

Javascript
      var animation = div.getAnimations()[0];
animation.id = 'オレオレ';
      
C++
      // Animation& animation;
nsAutoString id;
animation.GetId(id);
printf("animation id: %s\n",
       NS_ConvertUTF16toUTF8(id).get());
      

4. animationの特定 (compositorスレッド)

      
       TBD
      
      

デバッガを使う

      // Animation& animation;
nsAutoString id;
animation.GetId(id);
if (id.EqualsLiteral("target")) {
  ... // ここにbreak point
}