Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Unified Diff: chrome/browser/ui/tabs/tab_resources.cc

Issue 7657009: Revert 96674 - Gtk: Make click target of tabs match their appearance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/tabs/tab_resources.h ('k') | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/tabs/tab_resources.cc
===================================================================
--- chrome/browser/ui/tabs/tab_resources.cc (revision 96939)
+++ chrome/browser/ui/tabs/tab_resources.cc (working copy)
@@ -1,44 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/tabs/tab_resources.h"
-
-#include "base/logging.h"
-#include "ui/gfx/path.h"
-
-namespace {
-
-// Hit mask constants.
-const SkScalar kTabCapWidth = 15;
-const SkScalar kTabTopCurveWidth = 4;
-const SkScalar kTabBottomCurveWidth = 3;
-
-} // namespace
-
-// static
-void TabResources::GetHitTestMask(int width, int height, gfx::Path* path) {
- DCHECK(path);
-
- SkScalar h = SkIntToScalar(height);
- SkScalar w = SkIntToScalar(width);
-
- path->moveTo(0, h);
-
- // Left end cap.
- path->lineTo(kTabBottomCurveWidth, h - kTabBottomCurveWidth);
- path->lineTo(kTabCapWidth - kTabTopCurveWidth, kTabTopCurveWidth);
- path->lineTo(kTabCapWidth, 0);
-
- // Connect to the right cap.
- path->lineTo(w - kTabCapWidth, 0);
-
- // Right end cap.
- path->lineTo(w - kTabCapWidth + kTabTopCurveWidth, kTabTopCurveWidth);
- path->lineTo(w - kTabBottomCurveWidth, h - kTabBottomCurveWidth);
- path->lineTo(w, h);
-
- // Close out the path.
- path->lineTo(0, h);
- path->close();
-}
« no previous file with comments | « chrome/browser/ui/tabs/tab_resources.h ('k') | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698