[webkit-dev] Why does isLocationChange() return false for redirection?

Maciej Stachowiak mjs at apple.com
Tue Aug 17 00:28:58 PDT 2010


On Aug 16, 2010, at 10:58 PM, Eric Zhou wrote:

> Hi all, 
> 
> following is the related code. My question is why it returns false when ScheduledRedirection.type is redirection.
> From the name of the function, I think if the url changes, it should return true. Thus, for most of redirection, it should return true.

For these functions, I wouldn't assume that the name is necessarily logical. In any case it looks like you are looking at old-ish code - this code has been refactored on current trunk.

Regards,
Maciej

> 
> //FrameLoader.cpp
> bool FrameLoader::isLocationChange(const ScheduledRedirection& redirection)
> {
>     switch (redirection.type) {
>         case ScheduledRedirection::redirection:
>             return false;
>         case ScheduledRedirection::historyNavigation:
>         case ScheduledRedirection::locationChange:
>         case ScheduledRedirection::formSubmission:
>             return true;
>     }
>     ASSERT_NOT_REACHED();
>     return false;
> }
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev



More information about the webkit-dev mailing list