<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>28958</bug_id>
          
          <creation_ts>2009-09-03 16:57:18 -0700</creation_ts>
          <short_desc>Make the &apos;position&apos; attribute animatable</short_desc>
          <delta_ts>2009-09-19 12:49:13 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Andy Matuschak">andy</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dino</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>144642</commentid>
    <comment_count>0</comment_count>
    <who name="Andy Matuschak">andy</who>
    <bug_when>2009-09-03 16:57:18 -0700</bug_when>
    <thetext>Consider the following animation: a centered element flies into place from off one edge of the screen. With the current implementation of CSS animations, there&apos;s no way to do that because one position is fixed, and the other is relative. If the &apos;position&apos; attribute were &quot;animatable&quot; (just for computed position purposes), this could be accomplished.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>145870</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2009-09-09 11:36:53 -0700</bug_when>
    <thetext>This isn&apos;t possible, because when something is animated, every intermediate state has to be representable in CSS. There just isn&apos;t a sensible way to animate from &quot;position:fixed&quot; to &quot;position:relative&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>146569</commentid>
    <comment_count>2</comment_count>
    <who name="Andy Matuschak">andy</who>
    <bug_when>2009-09-11 08:23:26 -0700</bug_when>
    <thetext>Yeah, I see why that&apos;s a problem. Can you help me ask the right question to solve the &quot;fly on from off-screen&quot; problem?

Perhaps the object&apos;s position at each keyframe could be computed in advance, then interpolated between with translations. That&apos;s kind of a kludge, though. Any ideas?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>146929</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2009-09-12 08:52:29 -0700</bug_when>
    <thetext>Why does the initial postion have to be &quot;fixed&quot;. Can&apos;t you just keep it as position: relative, and animated from left: -1000px to left: 0 ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>146931</commentid>
    <comment_count>4</comment_count>
    <who name="Andy Matuschak">andy</who>
    <bug_when>2009-09-12 09:27:01 -0700</bug_when>
    <thetext>Good question.

If the object&apos;s initial position is -1000px, then the designer can&apos;t know when it will appear on the page and how long it will spend getting to its final position. He can&apos;t synchronize it with other animations because the apparent delay offset will basically depend on the window size.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>146988</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2009-09-13 07:56:53 -0700</bug_when>
    <thetext>Seems like you could have some JS that gets the final position of the element (e.g. with getBoundingClientRect on an parent), then dynamically sets the initial position of the element that is going to be animated in.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>148526</commentid>
    <comment_count>6</comment_count>
    <who name="Andy Matuschak">andy</who>
    <bug_when>2009-09-19 12:49:13 -0700</bug_when>
    <thetext>Yes, that would absolutely work; I was just hoping you folks would want to find some solution to this common-ish design pattern that didn&apos;t require a JS hack. :)

Not saying the solution has to be anything like the suggestion in the title of this bug, just hoping you&apos;ll maybe keep the problem in mind when doing future revisions to the spec.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>