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

Side by Side Diff: Source/core/editing/ApplyStyleCommand.cpp

Issue 1225553002: CSSValue Immediates: Make CSSPrimitiveValue a container (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cssvalue_patch_1
Patch Set: Rebase Created 5 years, 4 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
« no previous file with comments | « Source/core/dom/TextLinkColors.cpp ('k') | Source/core/editing/EditingStyle.cpp » ('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 * Copyright (C) 2005, 2006, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after
1541 return 0; 1541 return 0;
1542 1542
1543 RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDecl aration::create(node); 1543 RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDecl aration::create(node);
1544 if (!style) 1544 if (!style)
1545 return 0; 1545 return 0;
1546 1546
1547 NullableCSSValue value = style->getPropertyCSSValue(CSSPropertyFontSize); 1547 NullableCSSValue value = style->getPropertyCSSValue(CSSPropertyFontSize);
1548 if (!value) 1548 if (!value)
1549 return 0; 1549 return 0;
1550 1550
1551 CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(*value); 1551 CSSPrimitiveValue primitiveValue = toCSSPrimitiveValue(*value);
1552 ASSERT(primitiveValue.primitiveType() == CSSPrimitiveValue::CSS_PX); 1552 ASSERT(primitiveValue.primitiveType() == CSSPrimitiveValue::CSS_PX);
1553 return primitiveValue.getFloatValue(); 1553 return primitiveValue.getFloatValue();
1554 } 1554 }
1555 1555
1556 void ApplyStyleCommand::joinChildTextNodes(ContainerNode* node, const Position& start, const Position& end) 1556 void ApplyStyleCommand::joinChildTextNodes(ContainerNode* node, const Position& start, const Position& end)
1557 { 1557 {
1558 if (!node) 1558 if (!node)
1559 return; 1559 return;
1560 1560
1561 Position newStart = start; 1561 Position newStart = start;
(...skipping 30 matching lines...) Expand all
1592 DEFINE_TRACE(ApplyStyleCommand) 1592 DEFINE_TRACE(ApplyStyleCommand)
1593 { 1593 {
1594 visitor->trace(m_style); 1594 visitor->trace(m_style);
1595 visitor->trace(m_start); 1595 visitor->trace(m_start);
1596 visitor->trace(m_end); 1596 visitor->trace(m_end);
1597 visitor->trace(m_styledInlineElement); 1597 visitor->trace(m_styledInlineElement);
1598 CompositeEditCommand::trace(visitor); 1598 CompositeEditCommand::trace(visitor);
1599 } 1599 }
1600 1600
1601 } 1601 }
OLDNEW
« no previous file with comments | « Source/core/dom/TextLinkColors.cpp ('k') | Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698