OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> | 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. |
4 * All rights reserved. | 4 * All rights reserved. |
5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. | 7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Lesser General Public | 10 * modify it under the terms of the GNU Lesser General Public |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "core/CSSPropertyNames.h" | 28 #include "core/CSSPropertyNames.h" |
29 #include "core/css/CSSIdentifierValue.h" | 29 #include "core/css/CSSIdentifierValue.h" |
30 #include "core/css/CSSPrimitiveValue.h" | 30 #include "core/css/CSSPrimitiveValue.h" |
31 #include "core/css/CSSPrimitiveValueMappings.h" | 31 #include "core/css/CSSPrimitiveValueMappings.h" |
32 #include "core/css/CSSPropertyIDTemplates.h" | 32 #include "core/css/CSSPropertyIDTemplates.h" |
33 #include "core/css/CSSPropertyMetadata.h" | 33 #include "core/css/CSSPropertyMetadata.h" |
34 #include "core/css/CSSSelector.h" | 34 #include "core/css/CSSSelector.h" |
35 #include "core/css/CSSVariableData.h" | 35 #include "core/css/CSSVariableData.h" |
36 #include "core/css/ComputedStyleCSSValueMapping.h" | 36 #include "core/css/ComputedStyleCSSValueMapping.h" |
37 #include "core/css/parser/CSSParser.h" | 37 #include "core/css/parser/CSSParser.h" |
38 #include "core/css/resolver/StyleResolver.h" | |
39 #include "core/dom/Document.h" | 38 #include "core/dom/Document.h" |
40 #include "core/dom/ExceptionCode.h" | 39 #include "core/dom/ExceptionCode.h" |
41 #include "core/dom/PseudoElement.h" | 40 #include "core/dom/PseudoElement.h" |
| 41 #include "core/dom/StyleEngine.h" |
42 #include "core/layout/LayoutObject.h" | 42 #include "core/layout/LayoutObject.h" |
43 #include "core/style/ComputedStyle.h" | 43 #include "core/style/ComputedStyle.h" |
44 #include "wtf/text/StringBuilder.h" | 44 #include "wtf/text/StringBuilder.h" |
45 | 45 |
46 namespace blink { | 46 namespace blink { |
47 | 47 |
48 // List of all properties we know how to compute, omitting shorthands. | 48 // List of all properties we know how to compute, omitting shorthands. |
49 // NOTE: Do not use this list, use computableProperties() instead | 49 // NOTE: Do not use this list, use computableProperties() instead |
50 // to respect runtime enabling of CSS properties. | 50 // to respect runtime enabling of CSS properties. |
51 static const CSSPropertyID staticComputableProperties[] = { | 51 static const CSSPropertyID staticComputableProperties[] = { |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 // replaced if it was a PseudoElement so we need to update it. | 393 // replaced if it was a PseudoElement so we need to update it. |
394 styledNode = this->styledNode(); | 394 styledNode = this->styledNode(); |
395 LayoutObject* layoutObject = styledNode->layoutObject(); | 395 LayoutObject* layoutObject = styledNode->layoutObject(); |
396 | 396 |
397 const ComputedStyle* style = computeComputedStyle(); | 397 const ComputedStyle* style = computeComputedStyle(); |
398 | 398 |
399 bool forceFullLayout = | 399 bool forceFullLayout = |
400 isLayoutDependent(propertyID, style, layoutObject) || | 400 isLayoutDependent(propertyID, style, layoutObject) || |
401 styledNode->isInShadowTree() || | 401 styledNode->isInShadowTree() || |
402 (document.localOwner() && | 402 (document.localOwner() && |
403 document.ensureStyleResolver().hasViewportDependentMediaQueries()); | 403 document.styleEngine().hasViewportDependentMediaQueries()); |
404 | 404 |
405 if (forceFullLayout) { | 405 if (forceFullLayout) { |
406 document.updateStyleAndLayoutIgnorePendingStylesheetsForNode(styledNode); | 406 document.updateStyleAndLayoutIgnorePendingStylesheetsForNode(styledNode); |
407 styledNode = this->styledNode(); | 407 styledNode = this->styledNode(); |
408 style = computeComputedStyle(); | 408 style = computeComputedStyle(); |
409 layoutObject = styledNode->layoutObject(); | 409 layoutObject = styledNode->layoutObject(); |
410 } | 410 } |
411 | 411 |
412 if (!style) | 412 if (!style) |
413 return nullptr; | 413 return nullptr; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 "These styles are computed, and therefore the '" + | 559 "These styles are computed, and therefore the '" + |
560 getPropertyNameString(id) + "' property is read-only."); | 560 getPropertyNameString(id) + "' property is read-only."); |
561 } | 561 } |
562 | 562 |
563 DEFINE_TRACE(CSSComputedStyleDeclaration) { | 563 DEFINE_TRACE(CSSComputedStyleDeclaration) { |
564 visitor->trace(m_node); | 564 visitor->trace(m_node); |
565 CSSStyleDeclaration::trace(visitor); | 565 CSSStyleDeclaration::trace(visitor); |
566 } | 566 } |
567 | 567 |
568 } // namespace blink | 568 } // namespace blink |
OLD | NEW |