Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) | 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 newStyle->inheritUnicodeBidiFrom(parentStyle); | 105 newStyle->inheritUnicodeBidiFrom(parentStyle); |
| 106 newStyle->setDisplay(display); | 106 newStyle->setDisplay(display); |
| 107 return newStyle; | 107 return newStyle; |
| 108 } | 108 } |
| 109 | 109 |
| 110 PassRefPtr<ComputedStyle> ComputedStyle::clone(const ComputedStyle& other) | 110 PassRefPtr<ComputedStyle> ComputedStyle::clone(const ComputedStyle& other) |
| 111 { | 111 { |
| 112 return adoptRef(new ComputedStyle(other)); | 112 return adoptRef(new ComputedStyle(other)); |
| 113 } | 113 } |
| 114 | 114 |
| 115 ALWAYS_INLINE ComputedStyle::ComputedStyle() | 115 ComputedStyle::ComputedStyle() |
|
esprehn
2016/09/12 20:53:12
Why? Performance here is pretty important. :)
| |
| 116 : m_box(initialStyle().m_box) | 116 : m_box(initialStyle().m_box) |
| 117 , m_visual(initialStyle().m_visual) | 117 , m_visual(initialStyle().m_visual) |
| 118 , m_background(initialStyle().m_background) | 118 , m_background(initialStyle().m_background) |
| 119 , m_surround(initialStyle().m_surround) | 119 , m_surround(initialStyle().m_surround) |
| 120 , m_rareNonInheritedData(initialStyle().m_rareNonInheritedData) | 120 , m_rareNonInheritedData(initialStyle().m_rareNonInheritedData) |
| 121 , m_rareInheritedData(initialStyle().m_rareInheritedData) | 121 , m_rareInheritedData(initialStyle().m_rareInheritedData) |
| 122 , m_styleInheritedData(initialStyle().m_styleInheritedData) | 122 , m_styleInheritedData(initialStyle().m_styleInheritedData) |
| 123 , m_svgStyle(initialStyle().m_svgStyle) | 123 , m_svgStyle(initialStyle().m_svgStyle) |
| 124 { | 124 { |
| 125 setBitDefaults(); // Would it be faster to copy this from the default style? | 125 setBitDefaults(); // Would it be faster to copy this from the default style? |
| (...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2045 if (value < 0) | 2045 if (value < 0) |
| 2046 fvalue -= 0.5f; | 2046 fvalue -= 0.5f; |
| 2047 else | 2047 else |
| 2048 fvalue += 0.5f; | 2048 fvalue += 0.5f; |
| 2049 } | 2049 } |
| 2050 | 2050 |
| 2051 return roundForImpreciseConversion<int>(fvalue / zoomFactor); | 2051 return roundForImpreciseConversion<int>(fvalue / zoomFactor); |
| 2052 } | 2052 } |
| 2053 | 2053 |
| 2054 } // namespace blink | 2054 } // namespace blink |
| OLD | NEW |