Make ismap images not overwrite the query part of the URL (bug 185169), r+sr=bzbarsky@mit.edu

This commit is contained in:
jkeiser%netscape.com 2003-03-12 21:22:21 +00:00
Родитель 8e26074947
Коммит 56680b1637
2 изменённых файлов: 8 добавлений и 18 удалений

Просмотреть файл

@ -1753,15 +1753,10 @@ nsImageFrame::HandleEvent(nsIPresContext* aPresContext,
// mouse is over the border.
if (p.x < 0) p.x = 0;
if (p.y < 0) p.y = 0;
nsCOMPtr<nsIURL> url = do_QueryInterface(uri);
if (url) {
url->SetQuery(nsPrintfCString("%d,%d", p.x, p.y));
} else {
nsCAutoString spec;
uri->GetSpec(spec);
spec += nsPrintfCString("?%d,%d", p.x, p.y);
uri->SetSpec(spec);
}
nsCAutoString spec;
uri->GetSpec(spec);
spec += nsPrintfCString("?%d,%d", p.x, p.y);
uri->SetSpec(spec);
PRBool clicked = PR_FALSE;
if (aEvent->message == NS_MOUSE_LEFT_BUTTON_UP) {

Просмотреть файл

@ -1753,15 +1753,10 @@ nsImageFrame::HandleEvent(nsIPresContext* aPresContext,
// mouse is over the border.
if (p.x < 0) p.x = 0;
if (p.y < 0) p.y = 0;
nsCOMPtr<nsIURL> url = do_QueryInterface(uri);
if (url) {
url->SetQuery(nsPrintfCString("%d,%d", p.x, p.y));
} else {
nsCAutoString spec;
uri->GetSpec(spec);
spec += nsPrintfCString("?%d,%d", p.x, p.y);
uri->SetSpec(spec);
}
nsCAutoString spec;
uri->GetSpec(spec);
spec += nsPrintfCString("?%d,%d", p.x, p.y);
uri->SetSpec(spec);
PRBool clicked = PR_FALSE;
if (aEvent->message == NS_MOUSE_LEFT_BUTTON_UP) {