Bug 935523 - Remove setShadowVisibility() as it's not needed anymore (r=sriram)

This commit is contained in:
Lucas Rocha 2013-11-08 15:04:18 +00:00
parent 83979a3943
commit 28776d4176
2 changed files with 0 additions and 37 deletions

View File

@ -136,7 +136,6 @@ public class BrowserToolbar extends GeckoRelativeLayout
public PageActionLayout mPageActionLayout;
private Animation mProgressSpinner;
private TabCounter mTabsCounter;
private ImageView mShadow;
private GeckoImageButton mMenu;
private GeckoImageView mMenuIcon;
private LinearLayout mActionItemBar;
@ -316,13 +315,8 @@ public class BrowserToolbar extends GeckoRelativeLayout
mProgressSpinner = AnimationUtils.loadAnimation(mActivity, R.anim.progress_spinner);
mStop = (ImageButton) findViewById(R.id.stop);
mShadow = (ImageView) findViewById(R.id.shadow);
mPageActionLayout = (PageActionLayout) findViewById(R.id.page_action_layout);
if (Build.VERSION.SDK_INT >= 16) {
mShadow.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
}
mMenu = (GeckoImageButton) findViewById(R.id.menu);
mMenuIcon = (GeckoImageView) findViewById(R.id.menu_icon);
mActionItemBar = (LinearLayout) findViewById(R.id.menu_items);
@ -1072,19 +1066,6 @@ public class BrowserToolbar extends GeckoRelativeLayout
}
}
public void setShadowVisibility(boolean visible) {
Tab tab = Tabs.getInstance().getSelectedTab();
if (tab == null) {
return;
}
String url = tab.getURL();
if ((mShadow.getVisibility() == View.VISIBLE) != visible) {
mShadow.setVisibility(visible ? View.VISIBLE : View.GONE);
}
}
public void onEditSuggestion(String suggestion) {
if (!isEditing()) {
return;

View File

@ -835,7 +835,6 @@ public class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
if (notifyGecko && mGeckoIsReady) {
geometryChanged(null);
}
setShadowVisibility();
}
/*
@ -895,23 +894,6 @@ public class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
public void onPanZoomStopped();
}
private void setShadowVisibility() {
try {
if (BrowserApp.mBrowserToolbar == null) // this will throw if we don't have BrowserApp
return;
ThreadUtils.postToUiThread(new Runnable() {
@Override
public void run() {
if (BrowserApp.mBrowserToolbar == null) {
return;
}
ImmutableViewportMetrics m = mViewportMetrics;
BrowserApp.mBrowserToolbar.setShadowVisibility(m.viewportRectTop >= m.pageRectTop);
}
});
} catch (NoClassDefFoundError ex) {}
}
/** Implementation of PanZoomTarget */
@Override
public void forceRedraw(DisplayPortMetrics displayPort) {