| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
| 35 #include "wtf/Allocator.h" | 35 #include "wtf/Allocator.h" |
| 36 #include "wtf/Forward.h" | 36 #include "wtf/Forward.h" |
| 37 #include "wtf/Vector.h" | 37 #include "wtf/Vector.h" |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 // This class corresponds to a dimension as described in HTML5 by the | 41 // This class corresponds to a dimension as described in HTML5 by the |
| 42 // "rules for parsing a list of dimensions" (section 2.4.4.6). | 42 // "rules for parsing a list of dimensions" (section 2.4.4.6). |
| 43 class HTMLDimension { | 43 class HTMLDimension { |
| 44 ALLOW_ONLY_INLINE_ALLOCATION(); | 44 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 45 public: | 45 public: |
| 46 enum HTMLDimensionType { | 46 enum HTMLDimensionType { |
| 47 Relative, Percentage, Absolute | 47 Relative, Percentage, Absolute |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 HTMLDimension() | 50 HTMLDimension() |
| 51 : m_type(Absolute) | 51 : m_type(Absolute) |
| 52 , m_value(0) | 52 , m_value(0) |
| 53 { | 53 { |
| 54 } | 54 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 76 private: | 76 private: |
| 77 HTMLDimensionType m_type; | 77 HTMLDimensionType m_type; |
| 78 double m_value; | 78 double m_value; |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 CORE_EXPORT Vector<HTMLDimension> parseListOfDimensions(const String&); | 81 CORE_EXPORT Vector<HTMLDimension> parseListOfDimensions(const String&); |
| 82 | 82 |
| 83 } // namespace blink | 83 } // namespace blink |
| 84 | 84 |
| 85 #endif // HTMLDimension_h | 85 #endif // HTMLDimension_h |
| OLD | NEW |