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

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: Also fix LayoutRectTest.cpp 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 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after
1912 return IntRect(); 1912 return IntRect();
1913 // We don't use absoluteBoundingBoxRect() because it can return an IntRect 1913 // We don't use absoluteBoundingBoxRect() because it can return an IntRect
1914 // larger the actual size by 1px. 1914 // larger the actual size by 1px.
1915 return document().view()->contentsToViewport(roundedIntRect(layoutObject()-> absoluteBoundingBoxFloatRect())); 1915 return document().view()->contentsToViewport(roundedIntRect(layoutObject()-> absoluteBoundingBoxFloatRect()));
1916 } 1916 }
1917 1917
1918 LayoutUnit HTMLSelectElement::clientPaddingLeft() const 1918 LayoutUnit HTMLSelectElement::clientPaddingLeft() const
1919 { 1919 {
1920 if (layoutObject() && layoutObject()->isMenuList()) 1920 if (layoutObject() && layoutObject()->isMenuList())
1921 return toLayoutMenuList(layoutObject())->clientPaddingLeft(); 1921 return toLayoutMenuList(layoutObject())->clientPaddingLeft();
1922 return 0; 1922 return LayoutUnit();
1923 } 1923 }
1924 1924
1925 LayoutUnit HTMLSelectElement::clientPaddingRight() const 1925 LayoutUnit HTMLSelectElement::clientPaddingRight() const
1926 { 1926 {
1927 if (layoutObject() && layoutObject()->isMenuList()) 1927 if (layoutObject() && layoutObject()->isMenuList())
1928 return toLayoutMenuList(layoutObject())->clientPaddingRight(); 1928 return toLayoutMenuList(layoutObject())->clientPaddingRight();
1929 return 0; 1929 return LayoutUnit();
1930 } 1930 }
1931 1931
1932 void HTMLSelectElement::popupDidHide() 1932 void HTMLSelectElement::popupDidHide()
1933 { 1933 {
1934 m_popupIsVisible = false; 1934 m_popupIsVisible = false;
1935 if (AXObjectCache* cache = document().existingAXObjectCache()) { 1935 if (AXObjectCache* cache = document().existingAXObjectCache()) {
1936 if (layoutObject() && layoutObject()->isMenuList()) 1936 if (layoutObject() && layoutObject()->isMenuList())
1937 cache->didHideMenuListPopup(toLayoutMenuList(layoutObject())); 1937 cache->didHideMenuListPopup(toLayoutMenuList(layoutObject()));
1938 } 1938 }
1939 } 1939 }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
2017 m_popupIsVisible = false; 2017 m_popupIsVisible = false;
2018 m_popup = nullptr; 2018 m_popup = nullptr;
2019 } 2019 }
2020 2020
2021 void HTMLSelectElement::resetTypeAheadSessionForTesting() 2021 void HTMLSelectElement::resetTypeAheadSessionForTesting()
2022 { 2022 {
2023 m_typeAhead.resetSession(); 2023 m_typeAhead.resetSession();
2024 } 2024 }
2025 2025
2026 } // namespace blink 2026 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/html/shadow/SliderThumbElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698