Skip to content

Commit

Permalink
This CL fix issue 9837 - RTL: "Pop-ups blocked" bar should be at left…
Browse files Browse the repository at this point in the history
…-bottom for RTL Chrome.

The fix is to position the 'pop-ups blocked' bar at the bottom left for RTL chrome.

Test:
1. Launch Hebrew Chrome
2. load http://www.brg8.com/
3. Observe the 'pop-up blocked' bar after the page load.
Review URL: http://codereview.chromium.org/89004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15691 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
xji@chromium.org committed May 8, 2009
1 parent fff920a commit 9adf1dc
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions chrome/browser/views/blocked_popup_container.cc
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,19 @@ void BlockedPopupContainer::SetPosition() {
int real_height = static_cast<int>(size.height() * visibility_percentage_);
int real_y = anchor_point_.y() - real_height;

// Size this window to the bottom left corner starting at the anchor point.
if (real_height > 0) {
SetWindowPos(HWND_TOP, base_x, real_y, size.width(), real_height, 0);
int x;
if (l10n_util::GetTextDirection() == l10n_util::LEFT_TO_RIGHT) {
// Size this window using the anchor point as top-right corner.
x = base_x;
} else {
// Size this window to the bottom left corner of top client window. In
// Chrome, scrollbars always appear on the right, even for a RTL page or
// when the UI is RTL (see http://crbug.com/6113 for more detail). Thus 0
// is always a safe value for x-axis.
x = 0;
}
SetWindowPos(HWND_TOP, x, real_y, size.width(), real_height, 0);
container_view_->SchedulePaint();
} else {
SetWindowPos(HWND_TOP, 0, 0, 0, 0,
Expand Down

0 comments on commit 9adf1dc

Please sign in to comment.