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 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * | 10 * |
(...skipping 2957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2968 if (view()) | 2968 if (view()) |
2969 view()->scheduleRelayout(); | 2969 view()->scheduleRelayout(); |
2970 } | 2970 } |
2971 | 2971 |
2972 if (m_mediaQueryMatcher) | 2972 if (m_mediaQueryMatcher) |
2973 m_mediaQueryMatcher->styleSelectorChanged(); | 2973 m_mediaQueryMatcher->styleSelectorChanged(); |
2974 } | 2974 } |
2975 | 2975 |
2976 void Document::addStyleSheetCandidateNode(Node* node, bool createdByParser) | 2976 void Document::addStyleSheetCandidateNode(Node* node, bool createdByParser) |
2977 { | 2977 { |
| 2978 if (!node->inDocument()) |
| 2979 return; |
| 2980 |
2978 // Until the <body> exists, we have no choice but to compare document positi
ons, | 2981 // Until the <body> exists, we have no choice but to compare document positi
ons, |
2979 // since styles outside of the body and head continue to be shunted into the
head | 2982 // since styles outside of the body and head continue to be shunted into the
head |
2980 // (and thus can shift to end up before dynamically added DOM content that i
s also | 2983 // (and thus can shift to end up before dynamically added DOM content that i
s also |
2981 // outside the body). | 2984 // outside the body). |
2982 if ((createdByParser && body()) || m_styleSheetCandidateNodes.isEmpty()) { | 2985 if ((createdByParser && body()) || m_styleSheetCandidateNodes.isEmpty()) { |
2983 m_styleSheetCandidateNodes.add(node); | 2986 m_styleSheetCandidateNodes.add(node); |
2984 return; | 2987 return; |
2985 } | 2988 } |
2986 | 2989 |
2987 // Determine an appropriate insertion point. | 2990 // Determine an appropriate insertion point. |
(...skipping 2092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5080 // This functions is used for checking such possibility of FOUCs. | 5083 // This functions is used for checking such possibility of FOUCs. |
5081 // Note that the implementation considers only empty or <head> only contents
as a FOUC cause | 5084 // Note that the implementation considers only empty or <head> only contents
as a FOUC cause |
5082 // rather than missing <body>, because non-HTML document like SVG and arbitr
ary XML from foreign namespace | 5085 // rather than missing <body>, because non-HTML document like SVG and arbitr
ary XML from foreign namespace |
5083 // should be painted even if there is no <body>. | 5086 // should be painted even if there is no <body>. |
5084 if (didLayoutWithPendingStylesheets()) | 5087 if (didLayoutWithPendingStylesheets()) |
5085 return true; | 5088 return true; |
5086 return !hasHeadSibling(this); | 5089 return !hasHeadSibling(this); |
5087 } | 5090 } |
5088 | 5091 |
5089 } // namespace WebCore | 5092 } // namespace WebCore |
OLD | NEW |