DocumentLoader::isLoading() just returns m_loading, but the logic for setting m_loading is circuitous to say the least. It gets set consistently by some functions (e.g., addSubresourceLoader), but it also is set by updateLoading(), which sets it based on FrameLoader::isLoading(), which is based on a bunch of different DocumentLoader functions. I've got a patch that greatly simplifies this logic that I will post shortly. Then again, I might be stepping on a landmine :)
Created attachment 133585 [details] patch
Comment on attachment 133585 [details] patch This looks great.
Comment on attachment 133585 [details] patch Clearing flags on attachment: 133585 Committed r112144: <http://trac.webkit.org/changeset/112144>
All reviewed patches have been landed. Closing bug.