OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2004, 2005, 2006, 2009, 2011 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2009, 2011 Apple Inc. 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 23 matching lines...) Expand all Loading... |
34 | 34 |
35 namespace blink { | 35 namespace blink { |
36 | 36 |
37 namespace { | 37 namespace { |
38 | 38 |
39 // Adapt a double to the allowed range of a LayoutUnit and narrow it to float | 39 // Adapt a double to the allowed range of a LayoutUnit and narrow it to float |
40 // precision. | 40 // precision. |
41 float ClampCoordinate(double value) { | 41 float ClampCoordinate(double value) { |
42 return LayoutUnit(value).ToFloat(); | 42 return LayoutUnit(value).ToFloat(); |
43 } | 43 } |
44 } | 44 } // namespace |
45 | 45 |
46 using namespace HTMLNames; | 46 using namespace HTMLNames; |
47 | 47 |
48 inline HTMLAreaElement::HTMLAreaElement(Document& document) | 48 inline HTMLAreaElement::HTMLAreaElement(Document& document) |
49 : HTMLAnchorElement(areaTag, document), shape_(kRect) {} | 49 : HTMLAnchorElement(areaTag, document), shape_(kRect) {} |
50 | 50 |
51 // An explicit empty destructor should be in HTMLAreaElement.cpp, because | 51 // An explicit empty destructor should be in HTMLAreaElement.cpp, because |
52 // if an implicit destructor is used or an empty destructor is defined in | 52 // if an implicit destructor is used or an empty destructor is defined in |
53 // HTMLAreaElement.h, when including HTMLAreaElement.h, msvc tries to expand | 53 // HTMLAreaElement.h, when including HTMLAreaElement.h, msvc tries to expand |
54 // the destructor and causes a compile error because of lack of blink::Path | 54 // the destructor and causes a compile error because of lack of blink::Path |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 SelectionBehaviorOnFocus selection_behavior) { | 225 SelectionBehaviorOnFocus selection_behavior) { |
226 GetDocument().UpdateStyleAndLayoutTreeForNode(this); | 226 GetDocument().UpdateStyleAndLayoutTreeForNode(this); |
227 if (!IsFocusable()) | 227 if (!IsFocusable()) |
228 return; | 228 return; |
229 | 229 |
230 if (HTMLImageElement* image_element = this->ImageElement()) | 230 if (HTMLImageElement* image_element = this->ImageElement()) |
231 image_element->UpdateFocusAppearance(selection_behavior); | 231 image_element->UpdateFocusAppearance(selection_behavior); |
232 } | 232 } |
233 | 233 |
234 } // namespace blink | 234 } // namespace blink |
OLD | NEW |