Fix empty URL input bar when switching to a tab after it loaded in the
background. git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@503 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
committed by
Alexandre Deckner
parent
1f009b1e11
commit
402459960e
@@ -188,9 +188,9 @@ public:
|
|||||||
fURLInputContents = text;
|
fURLInputContents = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* URLInputContents() const
|
const BString& URLInputContents() const
|
||||||
{
|
{
|
||||||
return fURLInputContents.String();
|
return fURLInputContents;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetURLInputSelection(int32 selectionStart, int32 selectionEnd)
|
void SetURLInputSelection(int32 selectionStart, int32 selectionEnd)
|
||||||
@@ -946,7 +946,10 @@ BrowserWindow::SetCurrentWebView(BWebView* webView)
|
|||||||
|
|
||||||
if (userData != NULL) {
|
if (userData != NULL) {
|
||||||
fURLInputGroup->SetPageIcon(userData->PageIcon());
|
fURLInputGroup->SetPageIcon(userData->PageIcon());
|
||||||
fURLInputGroup->SetText(userData->URLInputContents());
|
if (userData->URLInputContents().Length())
|
||||||
|
fURLInputGroup->SetText(userData->URLInputContents());
|
||||||
|
else
|
||||||
|
fURLInputGroup->SetText(webView->MainFrameURL());
|
||||||
if (userData->URLInputSelectionStart() >= 0) {
|
if (userData->URLInputSelectionStart() >= 0) {
|
||||||
fURLInputGroup->TextView()->Select(
|
fURLInputGroup->TextView()->Select(
|
||||||
userData->URLInputSelectionStart(),
|
userData->URLInputSelectionStart(),
|
||||||
|
|||||||
Reference in New Issue
Block a user