Closed
Bug 887268
Opened 11 years ago
Closed 11 years ago
Open items from "tabs from last time" page on a new tabs
Categories
(Firefox for Android Graveyard :: Awesomescreen, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 26
People
(Reporter: lucasr, Assigned: lucasr)
References
Details
(Whiteboard: fixed-fig)
Attachments
(3 files, 1 obsolete file)
1.73 KB,
patch
|
bnicholson
:
review+
|
Details | Diff | Splinter Review |
3.85 KB,
patch
|
bnicholson
:
review+
|
Details | Diff | Splinter Review |
6.10 KB,
patch
|
bnicholson
:
review+
|
Details | Diff | Splinter Review |
Instead of simply opening the URL in the current tab.
Updated•11 years ago
|
Priority: -- → P1
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #773280 -
Flags: review?(bnicholson)
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #773281 -
Flags: review?(bnicholson)
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #773282 -
Flags: review?(bnicholson)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → lucasr.at.mozilla
Updated•11 years ago
|
Attachment #773280 -
Flags: review?(bnicholson) → review+
Updated•11 years ago
|
Attachment #773281 -
Flags: review?(bnicholson) → review+
Comment 4•11 years ago
|
||
Comment on attachment 773282 [details] [diff] [review] (3/3) Open items from "tabs from last time" on a new tabs Review of attachment 773282 [details] [diff] [review]: ----------------------------------------------------------------- Since we have a single method called openUrl() in BrowserApp that's overloaded to handle both behaviors, wouldn't it be more consistent to add another onUrlOpen() method that accepts an EditingTarget? This could be added to the existing OnUrlOpenListener interface instead of creating a new one.
Assignee | ||
Comment 5•11 years ago
|
||
(In reply to Brian Nicholson (:bnicholson) from comment #4) > Comment on attachment 773282 [details] [diff] [review] > (3/3) Open items from "tabs from last time" on a new tabs > > Review of attachment 773282 [details] [diff] [review]: > ----------------------------------------------------------------- > > Since we have a single method called openUrl() in BrowserApp that's > overloaded to handle both behaviors, wouldn't it be more consistent to add > another onUrlOpen() method that accepts an EditingTarget? This could be > added to the existing OnUrlOpenListener interface instead of creating a new > one. I considered doing that but EditingTarget is an implementation detail of toolbar/editing mode in the main UI. I don't want to leak this into the about:home interface. I feel that the new listener creates a more clear/concise contract between the two components.
Assignee | ||
Comment 6•11 years ago
|
||
Attachment #774036 -
Flags: review?(bnicholson)
Assignee | ||
Updated•11 years ago
|
Attachment #773282 -
Attachment is obsolete: true
Attachment #773282 -
Flags: review?(bnicholson)
Assignee | ||
Comment 7•11 years ago
|
||
Changes the OnNewTabsListener interface to better support the fix for bug 887269.
Comment 8•11 years ago
|
||
Comment on attachment 774036 [details] [diff] [review] Open items from "tabs from last time" on a new tabs Review of attachment 774036 [details] [diff] [review]: ----------------------------------------------------------------- I don't understand the reasoning behind an array here. In bug 887269, you're iterating through the cursors, building an array, passing it to onNewTabs(), then iterating through that array. Wouldn't it be more straightforward to simply call mNewTabsListener.onNewTab() directly for each item in the cursor? From an API perspective, it's also cleaner IMO to pass a single URL over an array of them. I guess one advantage of using an array would be that you could execute some kind of pre/post batch operation without needing a separate callback, but I don't see you using that here. Any reason you can't just use the single onNewTab() callback you used before? ::: mobile/android/base/BrowserApp.java @@ +1966,5 @@ > > + // HomePager.OnNewTabsListener > + @Override > + public void onNewTabs(String[] urls) { > + for (int i = 0; i < urls.length; i++) { Nit: use a for each loop
Assignee | ||
Comment 9•11 years ago
|
||
(In reply to Brian Nicholson (:bnicholson) from comment #8) > Comment on attachment 774036 [details] [diff] [review] > Open items from "tabs from last time" on a new tabs > > Review of attachment 774036 [details] [diff] [review]: > ----------------------------------------------------------------- > > I don't understand the reasoning behind an array here. In bug 887269, you're > iterating through the cursors, building an array, passing it to onNewTabs(), > then iterating through that array. Wouldn't it be more straightforward to > simply call mNewTabsListener.onNewTab() directly for each item in the > cursor? From an API perspective, it's also cleaner IMO to pass a single URL > over an array of them. The reason is simple: about:home is guaranteed to be closed once the onNewTab listener is used (see the last few lines in openUrl() for reference). We can't assume the state of the HomePager fragments will be alive once onNewTab is called. In other words, the operation to open new tabs has to done in one step. Hence the list-of-tabs approach. I'm open to suggestions for a better API though. Just let me know. > ::: mobile/android/base/BrowserApp.java > @@ +1966,5 @@ > > > > + // HomePager.OnNewTabsListener > > + @Override > > + public void onNewTabs(String[] urls) { > > + for (int i = 0; i < urls.length; i++) { > > Nit: use a for each loop Done.
Comment 10•11 years ago
|
||
Comment on attachment 774036 [details] [diff] [review] Open items from "tabs from last time" on a new tabs Review of attachment 774036 [details] [diff] [review]: ----------------------------------------------------------------- OK, makes sense.
Attachment #774036 -
Flags: review?(bnicholson) → review+
Assignee | ||
Comment 11•11 years ago
|
||
Pushed: http://hg.mozilla.org/projects/fig/rev/45ae7d54666f http://hg.mozilla.org/projects/fig/rev/dca194f33a36 http://hg.mozilla.org/projects/fig/rev/c5d17b84a826
Whiteboard: good-first-bug-fig → fixed-fig
Comment 12•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/45ae7d54666f https://hg.mozilla.org/mozilla-central/rev/dca194f33a36 https://hg.mozilla.org/mozilla-central/rev/c5d17b84a826
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•