         self.helper = BrowserToolbarHelper(toolbar: self)
 
         tabsButton.snp_makeConstraints { make in
-            make.centerY.equalTo(self.locationContainer).offset((URLBarViewUX.TabsButtonRotationOffset - 0.5) * URLBarViewUX.TabsButtonHeight)
+            make.centerY.equalTo(self.locationContainer)
             make.trailing.equalTo(self)
             make.width.height.equalTo(AppConstants.ToolbarHeight)
         }

    }

    func updateTabCount(count: Int) {

        // make a 'clone' of the tabs button
        let newTabsButton = InsetButton()
        newTabsButton.setTitleColor(URLBarViewUX.BackgroundColor, forState: UIControlState.Normal)
        newTabsButton.titleLabel?.layer.backgroundColor = UIColor.whiteColor().CGColor
        newTabsButton.titleLabel?.layer.cornerRadius = 2
        newTabsButton.titleLabel?.font = AppConstants.DefaultSmallFontBold
        newTabsButton.titleLabel?.textAlignment = NSTextAlignment.Center

        self.addSubview(newTabsButton)

        // copy constraints from original button for positioning
        newTabsButton.snp_makeConstraints { make in
            make.edges.equalTo(self.tabsButton)
        }

        newTabsButton.titleLabel?.snp_makeConstraints { make in
            make.size.equalTo(URLBarViewUX.TabsButtonHeight)
            return
        }

        if let anchor = tabsButton.titleLabel?.layer.anchorPoint {
            newTabsButton.titleLabel?.layer.anchorPoint = anchor
        }

        newTabsButton.setTitle(count.description, forState: .Normal)

        // setup the rotation matrix
        var flipTransform = CATransform3DIdentity
        flipTransform.m34 = -1.0 / 200.0 // add some perspective
        flipTransform = CATransform3DRotate(flipTransform, CGFloat(-M_PI_2), 1.0, 0.0, 0.0)
        newTabsButton.titleLabel?.layer.transform = flipTransform

        // offset the target rotation by 180º so the new tab comes from the front and the old tab falls back
        flipTransform = CATransform3DRotate(flipTransform, CGFloat(M_PI), 1.0, 0.0, 0.0)


        UIView.animateWithDuration(1.0, delay: 0, usingSpringWithDamping: 0.5, initialSpringVelocity: 0.0, options: UIViewAnimationOptions.CurveEaseInOut, animations: { _ in
                newTabsButton.titleLabel?.layer.transform = CATransform3DIdentity
                self.tabsButton.titleLabel?.layer.transform = flipTransform
                self.tabsButton.alpha = 0
            }, completion: { _ in
                // remove the clone and setup the actual tab button
                newTabsButton.removeFromSuperview()
                self.tabsButton.alpha = 1
                self.tabsButton.titleLabel?.layer.transform = CATransform3DIdentity
                self.tabsButton.setTitle(count.description, forState: UIControlState.Normal)
                self.tabsButton.accessibilityValue = count.description
                self.tabsButton.accessibilityLabel = NSLocalizedString("Show Tabs", comment: "Accessibility label for the tabs button in the (top) browser toolbar")
        })
    }



        // Make sure we hide any views that shouldn't be showing in non-editing mode
        finishEditingAnimation(false)
    }

    private func makeTabsButton(count: Int) -> UIButton {
        let tabsButton = InsetButton()
        tabsButton.setTitle(count.description, forState: UIControlState.Normal)
        tabsButton.setTitleColor(URLBarViewUX.BackgroundColor, forState: UIControlState.Normal)
        tabsButton.titleLabel?.layer.backgroundColor = UIColor.whiteColor().CGColor
        tabsButton.titleLabel?.layer.cornerRadius = 2
        tabsButton.titleLabel?.font = AppConstants.DefaultSmallFontBold
        tabsButton.titleLabel?.textAlignment = NSTextAlignment.Center
        tabsButton.setContentHuggingPriority(1000, forAxis: UILayoutConstraintAxis.Horizontal)
        tabsButton.setContentCompressionResistancePriority(1000, forAxis: UILayoutConstraintAxis.Horizontal)

        self.addSubview(tabsButton)

        tabsButton.titleLabel?.snp_makeConstraints { make in
            make.size.equalTo(URLBarViewUX.TabsButtonHeight)
        }

        return tabsButton
    }

    private func updateToolbarConstraints() {
