Commit 6cf3506a authored by Theresa's avatar Theresa Committed by Commit Bot

Fix LocationBarLayout#getUrlContainerMarginEnd

BUG=897592,814528

Change-Id: I2c9adf2ff533446c10be19d12ec3c83a8b1e0323
Reviewed-on: https://chromium-review.googlesource.com/c/1294131Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Commit-Queue: Theresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601637}
parent 907a940f
......@@ -602,17 +602,13 @@ public class LocationBarLayout extends FrameLayout
*/
@Override
public int getUrlContainerMarginEnd() {
boolean addMarginForActionsContainer = !mUrlFocusChangeInProgress || isUrlBarFocused();
int urlContainerMarginEnd = 0;
if (addMarginForActionsContainer) {
for (View childView : getUrlContainerViewsForMargin()) {
ViewGroup.MarginLayoutParams childLayoutParams =
(ViewGroup.MarginLayoutParams) childView.getLayoutParams();
urlContainerMarginEnd += childLayoutParams.width
+ MarginLayoutParamsCompat.getMarginStart(childLayoutParams)
+ MarginLayoutParamsCompat.getMarginEnd(childLayoutParams);
}
for (View childView : getUrlContainerViewsForMargin()) {
ViewGroup.MarginLayoutParams childLayoutParams =
(ViewGroup.MarginLayoutParams) childView.getLayoutParams();
urlContainerMarginEnd += childLayoutParams.width
+ MarginLayoutParamsCompat.getMarginStart(childLayoutParams)
+ MarginLayoutParamsCompat.getMarginEnd(childLayoutParams);
}
return urlContainerMarginEnd;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment