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 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1409 Color ComputedStyle::VisitedLinkColor() const { | 1409 Color ComputedStyle::VisitedLinkColor() const { |
1410 return inherited_data_->visited_link_color_; | 1410 return inherited_data_->visited_link_color_; |
1411 } | 1411 } |
1412 void ComputedStyle::SetColor(const Color& v) { | 1412 void ComputedStyle::SetColor(const Color& v) { |
1413 SET_VAR(inherited_data_, color_, v); | 1413 SET_VAR(inherited_data_, color_, v); |
1414 } | 1414 } |
1415 void ComputedStyle::SetVisitedLinkColor(const Color& v) { | 1415 void ComputedStyle::SetVisitedLinkColor(const Color& v) { |
1416 SET_VAR(inherited_data_, visited_link_color_, v); | 1416 SET_VAR(inherited_data_, visited_link_color_, v); |
1417 } | 1417 } |
1418 | 1418 |
1419 short ComputedStyle::HorizontalBorderSpacing() const { | |
1420 return inherited_data_->horizontal_border_spacing_; | |
1421 } | |
1422 short ComputedStyle::VerticalBorderSpacing() const { | |
1423 return inherited_data_->vertical_border_spacing_; | |
1424 } | |
1425 void ComputedStyle::SetHorizontalBorderSpacing(short v) { | |
1426 SET_VAR(inherited_data_, horizontal_border_spacing_, v); | |
1427 } | |
1428 void ComputedStyle::SetVerticalBorderSpacing(short v) { | |
1429 SET_VAR(inherited_data_, vertical_border_spacing_, v); | |
1430 } | |
1431 | |
1432 FloatRoundedRect ComputedStyle::GetRoundedBorderFor( | 1419 FloatRoundedRect ComputedStyle::GetRoundedBorderFor( |
1433 const LayoutRect& border_rect, | 1420 const LayoutRect& border_rect, |
1434 bool include_logical_left_edge, | 1421 bool include_logical_left_edge, |
1435 bool include_logical_right_edge) const { | 1422 bool include_logical_right_edge) const { |
1436 FloatRoundedRect rounded_rect(PixelSnappedIntRect(border_rect)); | 1423 FloatRoundedRect rounded_rect(PixelSnappedIntRect(border_rect)); |
1437 if (HasBorderRadius()) { | 1424 if (HasBorderRadius()) { |
1438 FloatRoundedRect::Radii radii = | 1425 FloatRoundedRect::Radii radii = |
1439 CalcRadiiFor(Border(), BorderTopLeftRadius(), BorderTopRightRadius(), | 1426 CalcRadiiFor(Border(), BorderTopLeftRadius(), BorderTopRightRadius(), |
1440 BorderBottomLeftRadius(), BorderBottomRightRadius(), | 1427 BorderBottomLeftRadius(), BorderBottomRightRadius(), |
1441 border_rect.Size()); | 1428 border_rect.Size()); |
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2498 if (value < 0) | 2485 if (value < 0) |
2499 fvalue -= 0.5f; | 2486 fvalue -= 0.5f; |
2500 else | 2487 else |
2501 fvalue += 0.5f; | 2488 fvalue += 0.5f; |
2502 } | 2489 } |
2503 | 2490 |
2504 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); | 2491 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); |
2505 } | 2492 } |
2506 | 2493 |
2507 } // namespace blink | 2494 } // namespace blink |
OLD | NEW |