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

Side by Side Diff: sky/engine/core/css/StylePropertySet.cpp

Issue 780483002: Remove the CSSOM. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « sky/engine/core/css/StylePropertySet.h ('k') | sky/engine/core/css/StyleRule.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved.
5 * Copyright (C) 2013 Intel Corporation. All rights reserved. 5 * Copyright (C) 2013 Intel Corporation. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 list.append(CSSProperty(properties[i], value.release(), false)); 491 list.append(CSSProperty(properties[i], value.release(), false));
492 } 492 }
493 return MutableStylePropertySet::create(list.data(), list.size()); 493 return MutableStylePropertySet::create(list.data(), list.size());
494 } 494 }
495 495
496 CSSStyleDeclaration* MutableStylePropertySet::ensureCSSStyleDeclaration() 496 CSSStyleDeclaration* MutableStylePropertySet::ensureCSSStyleDeclaration()
497 { 497 {
498 // FIXME: get rid of this weirdness of a CSSStyleDeclaration inside of a 498 // FIXME: get rid of this weirdness of a CSSStyleDeclaration inside of a
499 // style property set. 499 // style property set.
500 if (m_cssomWrapper) { 500 if (m_cssomWrapper) {
501 ASSERT(!static_cast<CSSStyleDeclaration*>(m_cssomWrapper.get())->parentR ule());
502 ASSERT(!m_cssomWrapper->parentElement()); 501 ASSERT(!m_cssomWrapper->parentElement());
503 return m_cssomWrapper.get(); 502 return m_cssomWrapper.get();
504 } 503 }
505 m_cssomWrapper = adoptPtr(new PropertySetCSSStyleDeclaration(*this)); 504 m_cssomWrapper = adoptPtr(new PropertySetCSSStyleDeclaration(*this));
506 return m_cssomWrapper.get(); 505 return m_cssomWrapper.get();
507 } 506 }
508 507
509 int MutableStylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const 508 int MutableStylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const
510 { 509 {
511 // Convert here propertyID into an uint16_t to compare it with the metadata' s m_propertyID to avoid 510 // Convert here propertyID into an uint16_t to compare it with the metadata' s m_propertyID to avoid
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 result.appendLiteral(": "); 563 result.appendLiteral(": ");
565 result.append(propertyValue()->cssText()); 564 result.append(propertyValue()->cssText());
566 if (isImportant()) 565 if (isImportant())
567 result.appendLiteral(" !important"); 566 result.appendLiteral(" !important");
568 result.append(';'); 567 result.append(';');
569 return result.toString(); 568 return result.toString();
570 } 569 }
571 570
572 571
573 } // namespace blink 572 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/css/StylePropertySet.h ('k') | sky/engine/core/css/StyleRule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698