[Webkit-unassigned] [Bug 137631] New: DOMTimer nesting level may not impact each other.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 10 18:14:00 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=137631

           Summary: DOMTimer nesting level may not impact each other.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML Events
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: chenhao at ucweb.com
                CC: barraclough at apple.com


First, there is a long story which come from:
   https://bugs.webkit.org/show_bug.cgi?id=42861

Current situation is the timer could forward the gesture state only if the nesting level is zero. The problem is the nesting level is managed in the Document (ScriptExecutionContext), that means all timers in the same document share one nesting level. If one repeat timer was launched, all other timers after that could not forward the gesture state, due to all of them has a non-zero nesting level.

Below is my testing page, three images at the end of page could delay the onload event. Then follow below steps to reproduce what I met:
1. Click "Start repeating timer" first
2. After the text change to "Running...", click "Goto next page"
3. When WebKit page come out, click back button.

The expected page is the testing page, but it moves to the page before it, because the NavigationScheduler::mustLockBackForwardList refused the creation of new history item.

 <html>
 <head>
 </head>
 <body>
 <input type="button" value="Goto next page" onclick="gotoNextPage();">
 <input type="button" value="Start repeating timer" onclick="startRepeatingTimer();">
 <p>
 <div id="Timer">Paused</div>
 </p>
 <script type="text/javascript">

 function gotoNextPage(){
    setTimeout(function(){location.href="http://www.webkit.org/";},300);
 }

 function startRepeatingTimer(){
   setInterval(function(){document.getElementById("Timer").innerHTML="Running...";},500);
 }
 </script>

 <img src="http://therecoveringpolitician.com/wp-content/uploads/2013/01/moderate.jpg" width="640" height="480">
 <img src="http://cullogo.com/full/wallpapers-high-resolution-widescreen-hd-pk.jpg" width="640" height="480">
 <img src="http://www.highresolutionwallpapers.net/wallpapers/autumn-1680x1050.jpg" width="640" height="480">
 </body>
 </html>

According to Web App APIs defintion(http://www.w3.org/html/wg/drafts/html/CR/webappapis.html#timer-nesting-level), the nesting level of repeating timer will be increased in the loop. I doubt that the nesting level should be owned by the timer itself, do not share with others. Just as described in the definition, that is task's nesting level.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list