[Webkit-unassigned] [Bug 135311] Web Inspector: shown() called on a content view when stepping over an instruction in the debugger

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 29 12:28:48 PDT 2014


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





--- Comment #15 from Timothy Hatcher <timothy at apple.com>  2014-07-29 12:29:01 PST ---
(In reply to comment #14)
> (In reply to comment #13)
> > (In reply to comment #11)
> > > (In reply to comment #10)
> > > > (In reply to comment #7)
> > > > > It looks like this code is at fault:
> > > > > 
> > > > >         if (currentEntry && currentEntry.contentView === contentView && Object.shallowEqual(provisionalEntry.cookie, currentEntry.cookie))
> > > > >             return currentEntry.contentView;
> > > > > 
> > > > > 
> > > > > It only considers the cookie and view when testing if a new entry needs to be pushed. It should also compare scroll positions.
> > > > 
> > > > Okay, I'll look into it. I was actually looking at that code path earlier, and it actually does what it's supposed two thirds of the time. It seems like that code path is travelled down 3 times for each step-over, and on one of the three paths when stepping over, that test fails.
> > > 
> > > Three times sounds like two too many.
> > 
> > Yeah this is a stack trace after stepping over an instruction:
> > 
> > [snip]
> 
> So this is a case of ResourceClusterContentView showing a sub-view, so this is likely correct.
> 
> I think we should add an isEqual function to BackForwardEntry that also looks at _contentView, _cookie and _scrollPositions.

While that would fix some other cases, it will not fix views that use CodeMirror since _scrollPositions is not used for those. So there is another bug with CodeMirror views not saving scroll positions. CodeMirror views do save the last "jump" location to the cookie, which will be used for this with a showSourceCodeLocation call. And the cookie is already compared.

So i think the behavior is correct as-is, where each jump to a new line in the same view pushes a new b/f entry. Not really the best behavior.

Still shown() should not be called if it is already showing the view.

-- 
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