Bug 1175094 - Include borderPadding in the combobox's containerWidth, so that dropdown arrow is positioned correctly in RTL. r=smontagu, a=kglazko
authorJonathan Kew <jkew@mozilla.com>
Thu, 09 Jul 2015 19:50:30 +0100
changeset 281480 d1d1000403e50799bfcdc9c65dc18738095a5ef9
parent 281479 7e9b8c0e22db8d92667b5b319b4851a8d41d4521
child 281481 c3e5e5213726c7b24bd199eccd942b9b6ce5096c
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmontagu, kglazko
bugs1175094
milestone41.0a2
Bug 1175094 - Include borderPadding in the combobox's containerWidth, so that dropdown arrow is positioned correctly in RTL. r=smontagu, a=kglazko
layout/forms/nsComboboxControlFrame.cpp
--- a/layout/forms/nsComboboxControlFrame.cpp
+++ b/layout/forms/nsComboboxControlFrame.cpp
@@ -861,17 +861,18 @@ nsComboboxControlFrame::Reflow(nsPresCon
   }
 
   mDisplayISize = aReflowState.ComputedISize() - buttonISize;
 
   nsBlockFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
 
   // The button should occupy the same space as a scrollbar
   WritingMode wm = aReflowState.GetWritingMode();
-  nscoord containerWidth = aReflowState.ComputedWidth();
+  nscoord containerWidth = aReflowState.ComputedWidth() +
+    aReflowState.ComputedPhysicalBorderPadding().LeftRight();
   LogicalRect buttonRect = mButtonFrame->GetLogicalRect(containerWidth);
 
   buttonRect.IStart(wm) =
     aReflowState.ComputedLogicalBorderPadding().IStartEnd(wm) +
     mDisplayISize -
     (aReflowState.ComputedLogicalBorderPadding().IEnd(wm) -
      aReflowState.ComputedLogicalPadding().IEnd(wm));
   buttonRect.ISize(wm) = buttonISize;