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 | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
4 * reserved. | 4 * reserved. |
5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1557 } | 1557 } |
1558 if (!AppliedTextDecorationsInternal()) { | 1558 if (!AppliedTextDecorationsInternal()) { |
1559 DEFINE_STATIC_LOCAL(Vector<AppliedTextDecoration>, empty, ()); | 1559 DEFINE_STATIC_LOCAL(Vector<AppliedTextDecoration>, empty, ()); |
1560 return empty; | 1560 return empty; |
1561 } | 1561 } |
1562 | 1562 |
1563 return AppliedTextDecorationsInternal()->GetVector(); | 1563 return AppliedTextDecorationsInternal()->GetVector(); |
1564 } | 1564 } |
1565 | 1565 |
1566 StyleInheritedVariables* ComputedStyle::InheritedVariables() const { | 1566 StyleInheritedVariables* ComputedStyle::InheritedVariables() const { |
1567 return VariablesInternal().Get(); | 1567 return InheritedVariablesInternal().Get(); |
1568 } | 1568 } |
1569 | 1569 |
1570 StyleNonInheritedVariables* ComputedStyle::NonInheritedVariables() const { | 1570 StyleNonInheritedVariables* ComputedStyle::NonInheritedVariables() const { |
1571 return rare_non_inherited_data_->variables_.get(); | 1571 return rare_non_inherited_data_->non_inherited_variables_.get(); |
1572 } | 1572 } |
1573 | 1573 |
1574 StyleInheritedVariables& ComputedStyle::MutableInheritedVariables() { | 1574 StyleInheritedVariables& ComputedStyle::MutableInheritedVariables() { |
1575 RefPtr<StyleInheritedVariables>& variables = MutableVariablesInternal(); | 1575 RefPtr<StyleInheritedVariables>& variables = |
| 1576 MutableInheritedVariablesInternal(); |
1576 if (!variables) | 1577 if (!variables) |
1577 variables = StyleInheritedVariables::Create(); | 1578 variables = StyleInheritedVariables::Create(); |
1578 else if (!variables->HasOneRef()) | 1579 else if (!variables->HasOneRef()) |
1579 variables = variables->Copy(); | 1580 variables = variables->Copy(); |
1580 return *variables; | 1581 return *variables; |
1581 } | 1582 } |
1582 | 1583 |
1583 StyleNonInheritedVariables& ComputedStyle::MutableNonInheritedVariables() { | 1584 StyleNonInheritedVariables& ComputedStyle::MutableNonInheritedVariables() { |
1584 std::unique_ptr<StyleNonInheritedVariables>& variables = | 1585 std::unique_ptr<StyleNonInheritedVariables>& variables = |
1585 rare_non_inherited_data_.Access()->variables_; | 1586 rare_non_inherited_data_.Access()->non_inherited_variables_; |
1586 if (!variables) | 1587 if (!variables) |
1587 variables = StyleNonInheritedVariables::Create(); | 1588 variables = StyleNonInheritedVariables::Create(); |
1588 return *variables; | 1589 return *variables; |
1589 } | 1590 } |
1590 | 1591 |
1591 void ComputedStyle::SetUnresolvedInheritedVariable( | 1592 void ComputedStyle::SetUnresolvedInheritedVariable( |
1592 const AtomicString& name, | 1593 const AtomicString& name, |
1593 RefPtr<CSSVariableData> value) { | 1594 RefPtr<CSSVariableData> value) { |
1594 DCHECK(value && value->NeedsVariableResolution()); | 1595 DCHECK(value && value->NeedsVariableResolution()); |
1595 MutableInheritedVariables().SetVariable(name, std::move(value)); | 1596 MutableInheritedVariables().SetVariable(name, std::move(value)); |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2348 if (value < 0) | 2349 if (value < 0) |
2349 fvalue -= 0.5f; | 2350 fvalue -= 0.5f; |
2350 else | 2351 else |
2351 fvalue += 0.5f; | 2352 fvalue += 0.5f; |
2352 } | 2353 } |
2353 | 2354 |
2354 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); | 2355 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); |
2355 } | 2356 } |
2356 | 2357 |
2357 } // namespace blink | 2358 } // namespace blink |
OLD | NEW |