提交 291b86b8 编写于 作者: A Alex Dima

#38414: Remove some more unused code

上级 9544e5fa
...@@ -477,22 +477,13 @@ const sizeUtils = { ...@@ -477,22 +477,13 @@ const sizeUtils = {
getBorderTopWidth: function (element: HTMLElement): number { getBorderTopWidth: function (element: HTMLElement): number {
return getDimension(element, 'border-top-width', 'borderTopWidth'); return getDimension(element, 'border-top-width', 'borderTopWidth');
}, },
getBorderRightWidth: function (element: HTMLElement): number {
return getDimension(element, 'border-right-width', 'borderRightWidth');
},
getBorderBottomWidth: function (element: HTMLElement): number { getBorderBottomWidth: function (element: HTMLElement): number {
return getDimension(element, 'border-bottom-width', 'borderBottomWidth'); return getDimension(element, 'border-bottom-width', 'borderBottomWidth');
}, },
getPaddingLeft: function (element: HTMLElement): number {
return getDimension(element, 'padding-left', 'paddingLeft');
},
getPaddingTop: function (element: HTMLElement): number { getPaddingTop: function (element: HTMLElement): number {
return getDimension(element, 'padding-top', 'paddingTop'); return getDimension(element, 'padding-top', 'paddingTop');
}, },
getPaddingRight: function (element: HTMLElement): number {
return getDimension(element, 'padding-right', 'paddingRight');
},
getPaddingBottom: function (element: HTMLElement): number { getPaddingBottom: function (element: HTMLElement): number {
return getDimension(element, 'padding-bottom', 'paddingBottom'); return getDimension(element, 'padding-bottom', 'paddingBottom');
}, },
...@@ -588,14 +579,6 @@ export const StandardWindow: IStandardWindow = new class { ...@@ -588,14 +579,6 @@ export const StandardWindow: IStandardWindow = new class {
} }
}; };
// Adapted from WinJS
// Gets the width of the content of the specified element. The content width does not include borders or padding.
export function getContentWidth(element: HTMLElement): number {
let border = sizeUtils.getBorderLeftWidth(element) + sizeUtils.getBorderRightWidth(element);
let padding = sizeUtils.getPaddingLeft(element) + sizeUtils.getPaddingRight(element);
return element.offsetWidth - border - padding;
}
// Adapted from WinJS // Adapted from WinJS
// Gets the width of the element, including margins. // Gets the width of the element, including margins.
export function getTotalWidth(element: HTMLElement): number { export function getTotalWidth(element: HTMLElement): number {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册