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.
All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. | 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. |
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 Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "core/CSSPropertyNames.h" | 27 #include "core/CSSPropertyNames.h" |
28 #include "core/css/CSSPrimitiveValueMappings.h" | 28 #include "core/css/CSSPrimitiveValueMappings.h" |
29 #include "core/css/CSSPropertyIDTemplates.h" | 29 #include "core/css/CSSPropertyIDTemplates.h" |
30 #include "core/css/CSSPropertyMetadata.h" | 30 #include "core/css/CSSPropertyMetadata.h" |
31 #include "core/css/CSSSelector.h" | 31 #include "core/css/CSSSelector.h" |
32 #include "core/css/CSSValuePool.h" | 32 #include "core/css/CSSValuePool.h" |
33 #include "core/css/CSSVariableData.h" | 33 #include "core/css/CSSVariableData.h" |
34 #include "core/css/ComputedStyleCSSValueMapping.h" | 34 #include "core/css/ComputedStyleCSSValueMapping.h" |
35 #include "core/css/parser/CSSParser.h" | 35 #include "core/css/parser/CSSParser.h" |
36 #include "core/css/parser/CSSVariableParser.h" | 36 #include "core/css/parser/CSSVariableParser.h" |
37 #include "core/css/resolver/StyleResolver.h" | |
38 #include "core/dom/Document.h" | 37 #include "core/dom/Document.h" |
39 #include "core/dom/ExceptionCode.h" | 38 #include "core/dom/ExceptionCode.h" |
40 #include "core/dom/PseudoElement.h" | 39 #include "core/dom/PseudoElement.h" |
| 40 #include "core/dom/StyleEngine.h" |
41 #include "core/layout/LayoutObject.h" | 41 #include "core/layout/LayoutObject.h" |
42 #include "core/style/ComputedStyle.h" | 42 #include "core/style/ComputedStyle.h" |
43 #include "wtf/text/StringBuilder.h" | 43 #include "wtf/text/StringBuilder.h" |
44 | 44 |
45 namespace blink { | 45 namespace blink { |
46 | 46 |
47 // List of all properties we know how to compute, omitting shorthands. | 47 // List of all properties we know how to compute, omitting shorthands. |
48 // NOTE: Do not use this list, use computableProperties() instead | 48 // NOTE: Do not use this list, use computableProperties() instead |
49 // to respect runtime enabling of CSS properties. | 49 // to respect runtime enabling of CSS properties. |
50 static const CSSPropertyID staticComputableProperties[] = { | 50 static const CSSPropertyID staticComputableProperties[] = { |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 | 547 |
548 // The style recalc could have caused the styled node to be discarded or rep
laced | 548 // The style recalc could have caused the styled node to be discarded or rep
laced |
549 // if it was a PseudoElement so we need to update it. | 549 // if it was a PseudoElement so we need to update it. |
550 styledNode = this->styledNode(); | 550 styledNode = this->styledNode(); |
551 LayoutObject* layoutObject = styledNode->layoutObject(); | 551 LayoutObject* layoutObject = styledNode->layoutObject(); |
552 | 552 |
553 const ComputedStyle* style = computeComputedStyle(); | 553 const ComputedStyle* style = computeComputedStyle(); |
554 | 554 |
555 bool forceFullLayout = isLayoutDependent(propertyID, style, layoutObject) | 555 bool forceFullLayout = isLayoutDependent(propertyID, style, layoutObject) |
556 || styledNode->isInShadowTree() | 556 || styledNode->isInShadowTree() |
557 || (document.localOwner() && document.ensureStyleResolver().hasViewportD
ependentMediaQueries()); | 557 || (document.localOwner() && document.styleEngine().hasViewportDependent
MediaQueries()); |
558 | 558 |
559 if (forceFullLayout) { | 559 if (forceFullLayout) { |
560 document.updateStyleAndLayoutIgnorePendingStylesheetsForNode(styledNode)
; | 560 document.updateStyleAndLayoutIgnorePendingStylesheetsForNode(styledNode)
; |
561 styledNode = this->styledNode(); | 561 styledNode = this->styledNode(); |
562 style = computeComputedStyle(); | 562 style = computeComputedStyle(); |
563 layoutObject = styledNode->layoutObject(); | 563 layoutObject = styledNode->layoutObject(); |
564 } | 564 } |
565 | 565 |
566 if (!style) | 566 if (!style) |
567 return nullptr; | 567 return nullptr; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 exceptionState.throwDOMException(NoModificationAllowedError, "These styles a
re computed, and therefore the '" + getPropertyNameString(id) + "' property is r
ead-only."); | 694 exceptionState.throwDOMException(NoModificationAllowedError, "These styles a
re computed, and therefore the '" + getPropertyNameString(id) + "' property is r
ead-only."); |
695 } | 695 } |
696 | 696 |
697 DEFINE_TRACE(CSSComputedStyleDeclaration) | 697 DEFINE_TRACE(CSSComputedStyleDeclaration) |
698 { | 698 { |
699 visitor->trace(m_node); | 699 visitor->trace(m_node); |
700 CSSStyleDeclaration::trace(visitor); | 700 CSSStyleDeclaration::trace(visitor); |
701 } | 701 } |
702 | 702 |
703 } // namespace blink | 703 } // namespace blink |
OLD | NEW |