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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 1648573002: Transition to explicit constructors in LayoutUnit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove int constructors for size/point... they result in incorrect conversions until LayoutUnit is … 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 1932 matching lines...) Expand 10 before | Expand all | Expand 10 after
1943 return value / style.effectiveZoom(); 1943 return value / style.effectiveZoom();
1944 } 1944 }
1945 1945
1946 inline double adjustDoubleForAbsoluteZoom(double value, const ComputedStyle& sty le) 1946 inline double adjustDoubleForAbsoluteZoom(double value, const ComputedStyle& sty le)
1947 { 1947 {
1948 return value / style.effectiveZoom(); 1948 return value / style.effectiveZoom();
1949 } 1949 }
1950 1950
1951 inline LayoutUnit adjustLayoutUnitForAbsoluteZoom(LayoutUnit value, const Comput edStyle& style) 1951 inline LayoutUnit adjustLayoutUnitForAbsoluteZoom(LayoutUnit value, const Comput edStyle& style)
1952 { 1952 {
1953 return value / style.effectiveZoom(); 1953 return LayoutUnit(value / style.effectiveZoom());
1954 } 1954 }
1955 1955
1956 inline double adjustScrollForAbsoluteZoom(double scrollOffset, float zoomFactor) 1956 inline double adjustScrollForAbsoluteZoom(double scrollOffset, float zoomFactor)
1957 { 1957 {
1958 return scrollOffset / zoomFactor; 1958 return scrollOffset / zoomFactor;
1959 } 1959 }
1960 1960
1961 inline double adjustScrollForAbsoluteZoom(double scrollOffset, const ComputedSty le& style) 1961 inline double adjustScrollForAbsoluteZoom(double scrollOffset, const ComputedSty le& style)
1962 { 1962 {
1963 return adjustScrollForAbsoluteZoom(scrollOffset, style.effectiveZoom()); 1963 return adjustScrollForAbsoluteZoom(scrollOffset, style.effectiveZoom());
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
2021 } 2021 }
2022 2022
2023 inline bool ComputedStyle::hasPseudoElementStyle() const 2023 inline bool ComputedStyle::hasPseudoElementStyle() const
2024 { 2024 {
2025 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; 2025 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK;
2026 } 2026 }
2027 2027
2028 } // namespace blink 2028 } // namespace blink
2029 2029
2030 #endif // ComputedStyle_h 2030 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp ('k') | third_party/WebKit/Source/core/style/NinePieceImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698