| 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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 ComputedStyle* ComputedStyle::addCachedPseudoStyle( | 472 ComputedStyle* ComputedStyle::addCachedPseudoStyle( |
| 473 PassRefPtr<ComputedStyle> pseudo) { | 473 PassRefPtr<ComputedStyle> pseudo) { |
| 474 if (!pseudo) | 474 if (!pseudo) |
| 475 return 0; | 475 return 0; |
| 476 | 476 |
| 477 ASSERT(pseudo->styleType() > PseudoIdNone); | 477 ASSERT(pseudo->styleType() > PseudoIdNone); |
| 478 | 478 |
| 479 ComputedStyle* result = pseudo.get(); | 479 ComputedStyle* result = pseudo.get(); |
| 480 | 480 |
| 481 if (!m_cachedPseudoStyles) | 481 if (!m_cachedPseudoStyles) |
| 482 m_cachedPseudoStyles = wrapUnique(new PseudoStyleCache); | 482 m_cachedPseudoStyles = WTF::wrapUnique(new PseudoStyleCache); |
| 483 | 483 |
| 484 m_cachedPseudoStyles->append(pseudo); | 484 m_cachedPseudoStyles->append(pseudo); |
| 485 | 485 |
| 486 return result; | 486 return result; |
| 487 } | 487 } |
| 488 | 488 |
| 489 void ComputedStyle::removeCachedPseudoStyle(PseudoId pid) { | 489 void ComputedStyle::removeCachedPseudoStyle(PseudoId pid) { |
| 490 if (!m_cachedPseudoStyles) | 490 if (!m_cachedPseudoStyles) |
| 491 return; | 491 return; |
| 492 for (size_t i = 0; i < m_cachedPseudoStyles->size(); ++i) { | 492 for (size_t i = 0; i < m_cachedPseudoStyles->size(); ++i) { |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 m_rareInheritedData->visitedLinkCaretColor() != | 1134 m_rareInheritedData->visitedLinkCaretColor() != |
| 1135 other.m_rareInheritedData->visitedLinkCaretColor())) { | 1135 other.m_rareInheritedData->visitedLinkCaretColor())) { |
| 1136 diff.setTextDecorationOrColorChanged(); | 1136 diff.setTextDecorationOrColorChanged(); |
| 1137 } | 1137 } |
| 1138 } | 1138 } |
| 1139 } | 1139 } |
| 1140 | 1140 |
| 1141 void ComputedStyle::addPaintImage(StyleImage* image) { | 1141 void ComputedStyle::addPaintImage(StyleImage* image) { |
| 1142 if (!m_rareNonInheritedData.access()->m_paintImages) { | 1142 if (!m_rareNonInheritedData.access()->m_paintImages) { |
| 1143 m_rareNonInheritedData.access()->m_paintImages = | 1143 m_rareNonInheritedData.access()->m_paintImages = |
| 1144 makeUnique<Vector<Persistent<StyleImage>>>(); | 1144 WTF::makeUnique<Vector<Persistent<StyleImage>>>(); |
| 1145 } | 1145 } |
| 1146 m_rareNonInheritedData.access()->m_paintImages->append(image); | 1146 m_rareNonInheritedData.access()->m_paintImages->append(image); |
| 1147 } | 1147 } |
| 1148 | 1148 |
| 1149 void ComputedStyle::addCursor(StyleImage* image, | 1149 void ComputedStyle::addCursor(StyleImage* image, |
| 1150 bool hotSpotSpecified, | 1150 bool hotSpotSpecified, |
| 1151 const IntPoint& hotSpot) { | 1151 const IntPoint& hotSpot) { |
| 1152 if (!m_rareInheritedData.access()->cursorData) | 1152 if (!m_rareInheritedData.access()->cursorData) |
| 1153 m_rareInheritedData.access()->cursorData = new CursorList; | 1153 m_rareInheritedData.access()->cursorData = new CursorList; |
| 1154 m_rareInheritedData.access()->cursorData->append( | 1154 m_rareInheritedData.access()->cursorData->append( |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1557 } | 1557 } |
| 1558 | 1558 |
| 1559 const CounterDirectiveMap* ComputedStyle::counterDirectives() const { | 1559 const CounterDirectiveMap* ComputedStyle::counterDirectives() const { |
| 1560 return m_rareNonInheritedData->m_counterDirectives.get(); | 1560 return m_rareNonInheritedData->m_counterDirectives.get(); |
| 1561 } | 1561 } |
| 1562 | 1562 |
| 1563 CounterDirectiveMap& ComputedStyle::accessCounterDirectives() { | 1563 CounterDirectiveMap& ComputedStyle::accessCounterDirectives() { |
| 1564 std::unique_ptr<CounterDirectiveMap>& map = | 1564 std::unique_ptr<CounterDirectiveMap>& map = |
| 1565 m_rareNonInheritedData.access()->m_counterDirectives; | 1565 m_rareNonInheritedData.access()->m_counterDirectives; |
| 1566 if (!map) | 1566 if (!map) |
| 1567 map = wrapUnique(new CounterDirectiveMap); | 1567 map = WTF::wrapUnique(new CounterDirectiveMap); |
| 1568 return *map; | 1568 return *map; |
| 1569 } | 1569 } |
| 1570 | 1570 |
| 1571 const CounterDirectives ComputedStyle::getCounterDirectives( | 1571 const CounterDirectives ComputedStyle::getCounterDirectives( |
| 1572 const AtomicString& identifier) const { | 1572 const AtomicString& identifier) const { |
| 1573 if (const CounterDirectiveMap* directives = counterDirectives()) | 1573 if (const CounterDirectiveMap* directives = counterDirectives()) |
| 1574 return directives->get(identifier); | 1574 return directives->get(identifier); |
| 1575 return CounterDirectives(); | 1575 return CounterDirectives(); |
| 1576 } | 1576 } |
| 1577 | 1577 |
| (...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2466 if (value < 0) | 2466 if (value < 0) |
| 2467 fvalue -= 0.5f; | 2467 fvalue -= 0.5f; |
| 2468 else | 2468 else |
| 2469 fvalue += 0.5f; | 2469 fvalue += 0.5f; |
| 2470 } | 2470 } |
| 2471 | 2471 |
| 2472 return roundForImpreciseConversion<int>(fvalue / zoomFactor); | 2472 return roundForImpreciseConversion<int>(fvalue / zoomFactor); |
| 2473 } | 2473 } |
| 2474 | 2474 |
| 2475 } // namespace blink | 2475 } // namespace blink |
| OLD | NEW |