Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: Source/WebCore/css/StyleSheetContents.cpp

Issue 13771002: Recalc styles on resize if we have viewport units. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 59
60 StyleSheetContents::StyleSheetContents(StyleRuleImport* ownerRule, const String& originalURL, const CSSParserContext& context) 60 StyleSheetContents::StyleSheetContents(StyleRuleImport* ownerRule, const String& originalURL, const CSSParserContext& context)
61 : m_ownerRule(ownerRule) 61 : m_ownerRule(ownerRule)
62 , m_originalURL(originalURL) 62 , m_originalURL(originalURL)
63 , m_loadCompleted(false) 63 , m_loadCompleted(false)
64 , m_isUserStyleSheet(ownerRule && ownerRule->parentStyleSheet() && ownerRule ->parentStyleSheet()->isUserStyleSheet()) 64 , m_isUserStyleSheet(ownerRule && ownerRule->parentStyleSheet() && ownerRule ->parentStyleSheet()->isUserStyleSheet())
65 , m_hasSyntacticallyValidCSSHeader(true) 65 , m_hasSyntacticallyValidCSSHeader(true)
66 , m_didLoadErrorOccur(false) 66 , m_didLoadErrorOccur(false)
67 , m_usesRemUnits(false) 67 , m_usesRemUnits(false)
68 , m_usesViewportUnits(false)
68 , m_isMutable(false) 69 , m_isMutable(false)
69 , m_isInMemoryCache(false) 70 , m_isInMemoryCache(false)
70 , m_parserContext(context) 71 , m_parserContext(context)
71 { 72 {
72 } 73 }
73 74
74 StyleSheetContents::StyleSheetContents(const StyleSheetContents& o) 75 StyleSheetContents::StyleSheetContents(const StyleSheetContents& o)
75 : RefCounted<StyleSheetContents>() 76 : RefCounted<StyleSheetContents>()
76 , m_ownerRule(0) 77 , m_ownerRule(0)
77 , m_originalURL(o.m_originalURL) 78 , m_originalURL(o.m_originalURL)
78 , m_encodingFromCharsetRule(o.m_encodingFromCharsetRule) 79 , m_encodingFromCharsetRule(o.m_encodingFromCharsetRule)
79 , m_importRules(o.m_importRules.size()) 80 , m_importRules(o.m_importRules.size())
80 , m_childRules(o.m_childRules.size()) 81 , m_childRules(o.m_childRules.size())
81 , m_namespaces(o.m_namespaces) 82 , m_namespaces(o.m_namespaces)
82 , m_loadCompleted(true) 83 , m_loadCompleted(true)
83 , m_isUserStyleSheet(o.m_isUserStyleSheet) 84 , m_isUserStyleSheet(o.m_isUserStyleSheet)
84 , m_hasSyntacticallyValidCSSHeader(o.m_hasSyntacticallyValidCSSHeader) 85 , m_hasSyntacticallyValidCSSHeader(o.m_hasSyntacticallyValidCSSHeader)
85 , m_didLoadErrorOccur(false) 86 , m_didLoadErrorOccur(false)
86 , m_usesRemUnits(o.m_usesRemUnits) 87 , m_usesRemUnits(o.m_usesRemUnits)
88 , m_usesViewportUnits(o.m_usesViewportUnits)
87 , m_isMutable(false) 89 , m_isMutable(false)
88 , m_isInMemoryCache(false) 90 , m_isInMemoryCache(false)
89 , m_parserContext(o.m_parserContext) 91 , m_parserContext(o.m_parserContext)
90 { 92 {
91 ASSERT(o.isCacheable()); 93 ASSERT(o.isCacheable());
92 94
93 // FIXME: Copy import rules. 95 // FIXME: Copy import rules.
94 ASSERT(o.m_importRules.isEmpty()); 96 ASSERT(o.m_importRules.isEmpty());
95 97
96 for (unsigned i = 0; i < m_childRules.size(); ++i) 98 for (unsigned i = 0; i < m_childRules.size(); ++i)
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 info.addMember(m_originalURL, "originalURL"); 524 info.addMember(m_originalURL, "originalURL");
523 info.addMember(m_encodingFromCharsetRule, "encodingFromCharsetRule"); 525 info.addMember(m_encodingFromCharsetRule, "encodingFromCharsetRule");
524 info.addMember(m_importRules, "importRules"); 526 info.addMember(m_importRules, "importRules");
525 info.addMember(m_childRules, "childRules"); 527 info.addMember(m_childRules, "childRules");
526 info.addMember(m_namespaces, "namespaces"); 528 info.addMember(m_namespaces, "namespaces");
527 info.addMember(m_parserContext, "parserContext"); 529 info.addMember(m_parserContext, "parserContext");
528 info.addMember(m_clients, "clients"); 530 info.addMember(m_clients, "clients");
529 } 531 }
530 532
531 } 533 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698