Fix deprecation warnings introduced with upgrade to GWT 2.6.1
Change-Id: I53a4a82deb96a1cf22436b9428c2c4b4f5dec430
This commit is contained in:
parent
9662b50bb1
commit
fe5d46536f
@ -75,7 +75,7 @@ public class KeyHelpPopup extends PluginSafePopupPanel implements
|
||||
|
||||
final FlowPanel body = new FlowPanel();
|
||||
body.add(header);
|
||||
DOM.appendChild(body.getElement(), DOM.createElement("hr"));
|
||||
body.getElement().appendChild(DOM.createElement("hr"));
|
||||
body.add(lists);
|
||||
|
||||
focus = new FocusPanel(body);
|
||||
|
@ -165,7 +165,7 @@ public class ApprovalTable extends Composite {
|
||||
&& !change.mergeable()) {
|
||||
addMissingLabel(Util.C.messageNeedsRebaseOrHasDependency());
|
||||
}
|
||||
missing.setVisible(DOM.getChildCount(missing.getElement()) > 0);
|
||||
missing.setVisible(missing.getElement().getChildCount() > 0);
|
||||
addReviewer.setVisible(Gerrit.isSignedIn());
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,6 @@ import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.event.dom.client.KeyPressEvent;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
|
||||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.HTMLTable.Cell;
|
||||
@ -332,7 +331,7 @@ public class ChangeTable2 extends NavigationTable<ChangeInfo> {
|
||||
if (highlightUnreviewed && !c.reviewed()) {
|
||||
needHighlight = true;
|
||||
}
|
||||
final Element tr = DOM.getParent(fmt.getElement(row, 0));
|
||||
final Element tr = fmt.getElement(row, 0).getParentElement();
|
||||
UIObject.setStyleName(tr, Gerrit.RESOURCES.css().needsReview(),
|
||||
needHighlight);
|
||||
|
||||
|
@ -134,8 +134,8 @@ public abstract class FancyFlexTable<RowItem> extends Composite {
|
||||
|
||||
protected void scrollIntoView(final int topRow, final int endRow) {
|
||||
final CellFormatter fmt = table.getCellFormatter();
|
||||
final Element top = DOM.getParent(fmt.getElement(topRow, C_ARROW));
|
||||
final Element end = DOM.getParent(fmt.getElement(endRow, C_ARROW));
|
||||
final Element top = fmt.getElement(topRow, C_ARROW).getParentElement();
|
||||
final Element end = fmt.getElement(endRow, C_ARROW).getParentElement();
|
||||
|
||||
final int rTop = top.getAbsoluteTop();
|
||||
final int rEnd = end.getAbsoluteTop() + end.getOffsetHeight();
|
||||
|
@ -168,7 +168,7 @@ public abstract class NavigationTable<RowItem> extends FancyFlexTable<RowItem> {
|
||||
final int sEnd = sTop + Document.get().getClientHeight();
|
||||
|
||||
while (0 <= row && row < max) {
|
||||
final Element cur = DOM.getParent(fmt.getElement(row, C_ARROW));
|
||||
final Element cur = fmt.getElement(row, C_ARROW).getParentElement();
|
||||
final int cTop = cur.getAbsoluteTop();
|
||||
final int cEnd = cTop + cur.getOffsetHeight();
|
||||
|
||||
@ -194,13 +194,13 @@ public abstract class NavigationTable<RowItem> extends FancyFlexTable<RowItem> {
|
||||
final CellFormatter fmt = table.getCellFormatter();
|
||||
final boolean clear = 0 <= currentRow && currentRow < table.getRowCount();
|
||||
if (clear) {
|
||||
final Element tr = DOM.getParent(fmt.getElement(currentRow, C_ARROW));
|
||||
final Element tr = fmt.getElement(currentRow, C_ARROW).getParentElement();
|
||||
UIObject.setStyleName(tr, Gerrit.RESOURCES.css().activeRow(), false);
|
||||
}
|
||||
if (0 <= newRow && newRow < table.getRowCount()
|
||||
&& getRowItem(newRow) != null) {
|
||||
table.setWidget(newRow, C_ARROW, pointer);
|
||||
final Element tr = DOM.getParent(fmt.getElement(newRow, C_ARROW));
|
||||
final Element tr = fmt.getElement(newRow, C_ARROW).getParentElement();
|
||||
UIObject.setStyleName(tr, Gerrit.RESOURCES.css().activeRow(), true);
|
||||
if (scroll && isAttached()) {
|
||||
scrollIntoView(tr);
|
||||
|
Loading…
Reference in New Issue
Block a user