| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 #include "platform/geometry/FloatRoundedRect.h" | 71 #include "platform/geometry/FloatRoundedRect.h" |
| 72 #include "platform/geometry/LayoutRectOutsets.h" | 72 #include "platform/geometry/LayoutRectOutsets.h" |
| 73 #include "platform/graphics/Color.h" | 73 #include "platform/graphics/Color.h" |
| 74 #include "platform/graphics/GraphicsTypes.h" | 74 #include "platform/graphics/GraphicsTypes.h" |
| 75 #include "platform/scroll/ScrollableArea.h" | 75 #include "platform/scroll/ScrollableArea.h" |
| 76 #include "platform/text/TextDirection.h" | 76 #include "platform/text/TextDirection.h" |
| 77 #include "platform/text/TextRun.h" | 77 #include "platform/text/TextRun.h" |
| 78 #include "platform/text/UnicodeBidi.h" | 78 #include "platform/text/UnicodeBidi.h" |
| 79 #include "platform/transforms/TransformOperations.h" | 79 #include "platform/transforms/TransformOperations.h" |
| 80 #include "wtf/Forward.h" | 80 #include "wtf/Forward.h" |
| 81 #include "wtf/LeakAnnotations.h" |
| 81 #include "wtf/OwnPtr.h" | 82 #include "wtf/OwnPtr.h" |
| 82 #include "wtf/RefCounted.h" | 83 #include "wtf/RefCounted.h" |
| 83 #include "wtf/StdLibExtras.h" | 84 #include "wtf/StdLibExtras.h" |
| 84 #include "wtf/Vector.h" | 85 #include "wtf/Vector.h" |
| 85 | 86 |
| 86 template<typename T, typename U> inline bool compareEqual(const T& t, const U& u
) { return t == static_cast<T>(u); } | 87 template<typename T, typename U> inline bool compareEqual(const T& t, const U& u
) { return t == static_cast<T>(u); } |
| 87 | 88 |
| 88 #define SET_VAR(group, variable, value) \ | 89 #define SET_VAR(group, variable, value) \ |
| 89 if (!compareEqual(group->variable, value)) \ | 90 if (!compareEqual(group->variable, value)) \ |
| 90 group.access()->variable = value | 91 group.access()->variable = value |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 | 343 |
| 343 enum InitialStyleTag { | 344 enum InitialStyleTag { |
| 344 InitialStyle | 345 InitialStyle |
| 345 }; | 346 }; |
| 346 ALWAYS_INLINE explicit ComputedStyle(InitialStyleTag); | 347 ALWAYS_INLINE explicit ComputedStyle(InitialStyleTag); |
| 347 ALWAYS_INLINE ComputedStyle(const ComputedStyle&); | 348 ALWAYS_INLINE ComputedStyle(const ComputedStyle&); |
| 348 | 349 |
| 349 static PassRefPtr<ComputedStyle> createInitialStyle(); | 350 static PassRefPtr<ComputedStyle> createInitialStyle(); |
| 350 static inline ComputedStyle* initialStyle() | 351 static inline ComputedStyle* initialStyle() |
| 351 { | 352 { |
| 353 WTF_ANNOTATE_SCOPED_MEMORY_LEAK; |
| 352 DEFINE_STATIC_REF(ComputedStyle, s_initialStyle, (ComputedStyle::createI
nitialStyle())); | 354 DEFINE_STATIC_REF(ComputedStyle, s_initialStyle, (ComputedStyle::createI
nitialStyle())); |
| 353 return s_initialStyle; | 355 return s_initialStyle; |
| 354 } | 356 } |
| 355 | 357 |
| 356 public: | 358 public: |
| 357 static PassRefPtr<ComputedStyle> create(); | 359 static PassRefPtr<ComputedStyle> create(); |
| 358 static PassRefPtr<ComputedStyle> createAnonymousStyleWithDisplay(const Compu
tedStyle& parentStyle, EDisplay); | 360 static PassRefPtr<ComputedStyle> createAnonymousStyleWithDisplay(const Compu
tedStyle& parentStyle, EDisplay); |
| 359 static PassRefPtr<ComputedStyle> clone(const ComputedStyle&); | 361 static PassRefPtr<ComputedStyle> clone(const ComputedStyle&); |
| 360 | 362 |
| 361 // Computes how the style change should be propagated down the tree. | 363 // Computes how the style change should be propagated down the tree. |
| (...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1994 } | 1996 } |
| 1995 | 1997 |
| 1996 inline bool ComputedStyle::hasPseudoElementStyle() const | 1998 inline bool ComputedStyle::hasPseudoElementStyle() const |
| 1997 { | 1999 { |
| 1998 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; | 2000 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; |
| 1999 } | 2001 } |
| 2000 | 2002 |
| 2001 } // namespace blink | 2003 } // namespace blink |
| 2002 | 2004 |
| 2003 #endif // ComputedStyle_h | 2005 #endif // ComputedStyle_h |
| OLD | NEW |