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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLSelectElement.cpp

Issue 1660863002: Force all LayoutUnit construction to be explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix multicol Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 1999 Antti Koivisto (koivisto@kde.org) 4 * (C) 1999 Antti Koivisto (koivisto@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * 10 *
(...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after
1905 return IntRect(); 1905 return IntRect();
1906 // We don't use absoluteBoundingBoxRect() because it can return an IntRect 1906 // We don't use absoluteBoundingBoxRect() because it can return an IntRect
1907 // larger the actual size by 1px. 1907 // larger the actual size by 1px.
1908 return document().view()->contentsToViewport(roundedIntRect(layoutObject()-> absoluteBoundingBoxFloatRect())); 1908 return document().view()->contentsToViewport(roundedIntRect(layoutObject()-> absoluteBoundingBoxFloatRect()));
1909 } 1909 }
1910 1910
1911 LayoutUnit HTMLSelectElement::clientPaddingLeft() const 1911 LayoutUnit HTMLSelectElement::clientPaddingLeft() const
1912 { 1912 {
1913 if (layoutObject() && layoutObject()->isMenuList()) 1913 if (layoutObject() && layoutObject()->isMenuList())
1914 return toLayoutMenuList(layoutObject())->clientPaddingLeft(); 1914 return toLayoutMenuList(layoutObject())->clientPaddingLeft();
1915 return 0; 1915 return LayoutUnit();
1916 } 1916 }
1917 1917
1918 LayoutUnit HTMLSelectElement::clientPaddingRight() const 1918 LayoutUnit HTMLSelectElement::clientPaddingRight() const
1919 { 1919 {
1920 if (layoutObject() && layoutObject()->isMenuList()) 1920 if (layoutObject() && layoutObject()->isMenuList())
1921 return toLayoutMenuList(layoutObject())->clientPaddingRight(); 1921 return toLayoutMenuList(layoutObject())->clientPaddingRight();
1922 return 0; 1922 return LayoutUnit();
1923 } 1923 }
1924 1924
1925 void HTMLSelectElement::popupDidHide() 1925 void HTMLSelectElement::popupDidHide()
1926 { 1926 {
1927 m_popupIsVisible = false; 1927 m_popupIsVisible = false;
1928 if (AXObjectCache* cache = document().existingAXObjectCache()) { 1928 if (AXObjectCache* cache = document().existingAXObjectCache()) {
1929 if (layoutObject() && layoutObject()->isMenuList()) 1929 if (layoutObject() && layoutObject()->isMenuList())
1930 cache->didHideMenuListPopup(toLayoutMenuList(layoutObject())); 1930 cache->didHideMenuListPopup(toLayoutMenuList(layoutObject()));
1931 } 1931 }
1932 } 1932 }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
2010 m_popupIsVisible = false; 2010 m_popupIsVisible = false;
2011 m_popup = nullptr; 2011 m_popup = nullptr;
2012 } 2012 }
2013 2013
2014 void HTMLSelectElement::resetTypeAheadSessionForTesting() 2014 void HTMLSelectElement::resetTypeAheadSessionForTesting()
2015 { 2015 {
2016 m_typeAhead.resetSession(); 2016 m_typeAhead.resetSession();
2017 } 2017 }
2018 2018
2019 } // namespace blink 2019 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698