Closed
Bug 753217
Opened 13 years ago
Closed 12 years ago
Move and refactor tab-specific listeners
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: bnicholson, Assigned: bnicholson)
Details
Attachments
(7 files)
7.69 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
54.33 KB,
patch
|
Details | Diff | Splinter Review | |
14.97 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
4.06 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
5.20 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
11.62 KB,
patch
|
Details | Diff | Splinter Review | |
3.19 KB,
patch
|
Details | Diff | Splinter Review |
The coupling between GeckoApp/Tab/Tabs has become tighter and more complicated. This makes it more complicated to fix edge-case bugs, like bug 751650.
If we move tab-specific listeners to the Tab class, we can reduce the number of public method, especially setters/updaters, in Tab. This will help contain tab-specific implementation to the Tabs class and reduce the size of GeckoApp.
Assignee | ||
Comment 1•13 years ago
|
||
Simple refactor for existing listeners
Attachment #622246 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 2•13 years ago
|
||
Moves all tab-specific listeners and methods from GeckoApp to Tab. Removes leftover public methods that are no longer being used.
Attachment #622247 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 3•13 years ago
|
||
Rather than having to use the Tabs singleton everywhere to determine whether a given tab is selected, we can contain this logic by moving it to Tab.
Attachment #622251 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 4•13 years ago
|
||
We're sending a DOMWindowClose event to Java that does the exact same thing as Tab:Close. This patch consolidates them.
Attachment #622253 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 5•13 years ago
|
||
Additional refactoring to remove Tab.setState().
Attachment #622255 -
Flags: review?(mark.finkle)
Updated•13 years ago
|
Attachment #622253 -
Flags: review?(mark.finkle) → review+
Updated•13 years ago
|
Attachment #622251 -
Flags: review?(mark.finkle) → review+
Updated•13 years ago
|
Attachment #622246 -
Flags: review?(mark.finkle) → review+
Comment 6•13 years ago
|
||
Comment on attachment 622247 [details] [diff] [review]
Part 2: Move tab-specific listeners from GeckoApp to Tab class
The first thing that jumps out at me is all the GeckoApp.mXxx code that we are moving into Tab.java. We must not do that. We will very soon have code that runs in chrome and chromeless activities.
The biggest offender is GeckoApp.mBrowserToolbar which leads me to think that BrowserToolbar should start listening for these messages too. Does that make sense to you?
Updated•13 years ago
|
Attachment #622255 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 7•13 years ago
|
||
This patch creates an onTabUpdated() event which is called whenever some UI-related part of the tab is changed. This is handled in Tabs, which does a generic refresh.
Eventually, we probably want the browser toolbar updates to be handled in BrowserToolbar itself. Tabs.java already has lots of references to mBrowserToolbar, so it's easiest to just move it there for now, and we can replace all instances of mBrowserToolbar in Tabs separately.
Attachment #626271 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 8•13 years ago
|
||
Changes mTabsChangedListener to use a LinkedList, initializes it in the constructor, and removes some unnecessary null checks.
Attachment #626273 -
Flags: review?(mark.finkle)
Comment 9•13 years ago
|
||
We have onTabUpdated and onTabChanged events. Should we use just one?
Comment 10•12 years ago
|
||
What here is still relevant?
Assignee | ||
Comment 11•12 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #10)
> What here is still relevant?
Probably everything, though we'll have to essentially redo all of the patches from bitrot.
As you said in comment 6, some of this code introduces more mAppContext references to Tab.java. We should be slowly trying to kill off mAppContext, so I'll have to think about parts of this more.
Assignee | ||
Updated•12 years ago
|
Attachment #622247 -
Flags: review?(mark.finkle)
Assignee | ||
Updated•12 years ago
|
Attachment #626271 -
Flags: review?(mark.finkle)
Assignee | ||
Updated•12 years ago
|
Attachment #626273 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 12•12 years ago
|
||
Parts of this have been fixed in other bugs, and other parts are extremely bitrotten. We could probably still use some cleanup in these areas, but we'd be best starting from scratch. Closing this bug since, as written, it is no longer valid.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Updated•4 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
•