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

Side by Side Diff: Source/core/css/CSSComputedStyleDeclaration.cpp

Issue 134473008: Remove CSS regions support, keeping a bare minimum to support "region-based" multicol. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master Created 6 years, 10 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/core.gypi ('k') | Source/core/css/CSSGrammar.y » ('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) 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 CSSPropertyWebkitTransformOrigin, 319 CSSPropertyWebkitTransformOrigin,
320 CSSPropertyWebkitTransformStyle, 320 CSSPropertyWebkitTransformStyle,
321 CSSPropertyWebkitTransitionDelay, 321 CSSPropertyWebkitTransitionDelay,
322 CSSPropertyWebkitTransitionDuration, 322 CSSPropertyWebkitTransitionDuration,
323 CSSPropertyWebkitTransitionProperty, 323 CSSPropertyWebkitTransitionProperty,
324 CSSPropertyWebkitTransitionTimingFunction, 324 CSSPropertyWebkitTransitionTimingFunction,
325 CSSPropertyWebkitUserDrag, 325 CSSPropertyWebkitUserDrag,
326 CSSPropertyWebkitUserModify, 326 CSSPropertyWebkitUserModify,
327 CSSPropertyWebkitUserSelect, 327 CSSPropertyWebkitUserSelect,
328 CSSPropertyWebkitWritingMode, 328 CSSPropertyWebkitWritingMode,
329 CSSPropertyWebkitFlowInto,
330 CSSPropertyWebkitFlowFrom,
331 CSSPropertyWebkitRegionBreakAfter,
332 CSSPropertyWebkitRegionBreakBefore,
333 CSSPropertyWebkitRegionBreakInside,
334 CSSPropertyWebkitRegionFragment,
335 CSSPropertyWebkitAppRegion, 329 CSSPropertyWebkitAppRegion,
336 CSSPropertyWebkitWrapFlow, 330 CSSPropertyWebkitWrapFlow,
337 CSSPropertyWebkitWrapThrough, 331 CSSPropertyWebkitWrapThrough,
338 CSSPropertyBufferedRendering, 332 CSSPropertyBufferedRendering,
339 CSSPropertyClipPath, 333 CSSPropertyClipPath,
340 CSSPropertyClipRule, 334 CSSPropertyClipRule,
341 CSSPropertyMask, 335 CSSPropertyMask,
342 CSSPropertyFilter, 336 CSSPropertyFilter,
343 CSSPropertyFloodColor, 337 CSSPropertyFloodColor,
344 CSSPropertyFloodOpacity, 338 CSSPropertyFloodOpacity,
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
1324 const CounterContent* counter = static_cast<const CounterContentData *>(contentData)->counter(); 1318 const CounterContent* counter = static_cast<const CounterContentData *>(contentData)->counter();
1325 ASSERT(counter); 1319 ASSERT(counter);
1326 list->append(cssValuePool().createValue(counter->identifier(), CSSPr imitiveValue::CSS_COUNTER_NAME)); 1320 list->append(cssValuePool().createValue(counter->identifier(), CSSPr imitiveValue::CSS_COUNTER_NAME));
1327 } else if (contentData->isImage()) { 1321 } else if (contentData->isImage()) {
1328 const StyleImage* image = static_cast<const ImageContentData*>(conte ntData)->image(); 1322 const StyleImage* image = static_cast<const ImageContentData*>(conte ntData)->image();
1329 ASSERT(image); 1323 ASSERT(image);
1330 list->append(image->cssValue()); 1324 list->append(image->cssValue());
1331 } else if (contentData->isText()) 1325 } else if (contentData->isText())
1332 list->append(cssValuePool().createValue(static_cast<const TextConten tData*>(contentData)->text(), CSSPrimitiveValue::CSS_STRING)); 1326 list->append(cssValuePool().createValue(static_cast<const TextConten tData*>(contentData)->text(), CSSPrimitiveValue::CSS_STRING));
1333 } 1327 }
1334 if (style.hasFlowFrom())
1335 list->append(cssValuePool().createValue(style.regionThread(), CSSPrimiti veValue::CSS_STRING));
1336 return list.release(); 1328 return list.release();
1337 } 1329 }
1338 1330
1339 static PassRefPtr<CSSValue> valueForCounterDirectives(const RenderStyle& style, CSSPropertyID propertyID) 1331 static PassRefPtr<CSSValue> valueForCounterDirectives(const RenderStyle& style, CSSPropertyID propertyID)
1340 { 1332 {
1341 const CounterDirectiveMap* map = style.counterDirectives(); 1333 const CounterDirectiveMap* map = style.counterDirectives();
1342 if (!map) 1334 if (!map)
1343 return 0; 1335 return 0;
1344 1336
1345 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ; 1337 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ;
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1811 case CSSPropertyWebkitColumnBreakBefore: 1803 case CSSPropertyWebkitColumnBreakBefore:
1812 return cssValuePool().createValue(style->columnBreakBefore()); 1804 return cssValuePool().createValue(style->columnBreakBefore());
1813 case CSSPropertyWebkitColumnBreakInside: 1805 case CSSPropertyWebkitColumnBreakInside:
1814 return cssValuePool().createValue(style->columnBreakInside()); 1806 return cssValuePool().createValue(style->columnBreakInside());
1815 case CSSPropertyWebkitColumnWidth: 1807 case CSSPropertyWebkitColumnWidth:
1816 if (style->hasAutoColumnWidth()) 1808 if (style->hasAutoColumnWidth())
1817 return cssValuePool().createIdentifierValue(CSSValueAuto); 1809 return cssValuePool().createIdentifierValue(CSSValueAuto);
1818 return zoomAdjustedPixelValue(style->columnWidth(), *style); 1810 return zoomAdjustedPixelValue(style->columnWidth(), *style);
1819 case CSSPropertyTabSize: 1811 case CSSPropertyTabSize:
1820 return cssValuePool().createValue(style->tabSize(), CSSPrimitiveValu e::CSS_NUMBER); 1812 return cssValuePool().createValue(style->tabSize(), CSSPrimitiveValu e::CSS_NUMBER);
1821 case CSSPropertyWebkitRegionBreakAfter:
1822 return cssValuePool().createValue(style->regionBreakAfter());
1823 case CSSPropertyWebkitRegionBreakBefore:
1824 return cssValuePool().createValue(style->regionBreakBefore());
1825 case CSSPropertyWebkitRegionBreakInside:
1826 return cssValuePool().createValue(style->regionBreakInside());
1827 case CSSPropertyCursor: { 1813 case CSSPropertyCursor: {
1828 RefPtrWillBeRawPtr<CSSValueList> list; 1814 RefPtrWillBeRawPtr<CSSValueList> list;
1829 CursorList* cursors = style->cursors(); 1815 CursorList* cursors = style->cursors();
1830 if (cursors && cursors->size() > 0) { 1816 if (cursors && cursors->size() > 0) {
1831 list = CSSValueList::createCommaSeparated(); 1817 list = CSSValueList::createCommaSeparated();
1832 for (unsigned i = 0; i < cursors->size(); ++i) 1818 for (unsigned i = 0; i < cursors->size(); ++i)
1833 if (StyleImage* image = cursors->at(i).image()) 1819 if (StyleImage* image = cursors->at(i).image())
1834 list->append(image->cssValue()); 1820 list->append(image->cssValue());
1835 } 1821 }
1836 RefPtr<CSSValue> value = cssValuePool().createValue(style->cursor()) ; 1822 RefPtr<CSSValue> value = cssValuePool().createValue(style->cursor()) ;
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
2599 case CSSPropertyCounterReset: 2585 case CSSPropertyCounterReset:
2600 return valueForCounterDirectives(*style, propertyID); 2586 return valueForCounterDirectives(*style, propertyID);
2601 case CSSPropertyWebkitClipPath: 2587 case CSSPropertyWebkitClipPath:
2602 if (ClipPathOperation* operation = style->clipPath()) { 2588 if (ClipPathOperation* operation = style->clipPath()) {
2603 if (operation->type() == ClipPathOperation::SHAPE) 2589 if (operation->type() == ClipPathOperation::SHAPE)
2604 return valueForBasicShape(*style, toShapeClipPathOperation(o peration)->basicShape()); 2590 return valueForBasicShape(*style, toShapeClipPathOperation(o peration)->basicShape());
2605 if (operation->type() == ClipPathOperation::REFERENCE) 2591 if (operation->type() == ClipPathOperation::REFERENCE)
2606 return CSSPrimitiveValue::create(toReferenceClipPathOperatio n(operation)->url(), CSSPrimitiveValue::CSS_URI); 2592 return CSSPrimitiveValue::create(toReferenceClipPathOperatio n(operation)->url(), CSSPrimitiveValue::CSS_URI);
2607 } 2593 }
2608 return cssValuePool().createIdentifierValue(CSSValueNone); 2594 return cssValuePool().createIdentifierValue(CSSValueNone);
2609 case CSSPropertyWebkitFlowInto:
2610 if (style->flowThread().isNull())
2611 return cssValuePool().createIdentifierValue(CSSValueNone);
2612 return cssValuePool().createValue(style->flowThread(), CSSPrimitiveV alue::CSS_STRING);
2613 case CSSPropertyWebkitFlowFrom:
2614 if (!style->hasFlowFrom())
2615 return cssValuePool().createIdentifierValue(CSSValueNone);
2616 return cssValuePool().createValue(style->regionThread(), CSSPrimitiv eValue::CSS_STRING);
2617 case CSSPropertyWebkitRegionFragment:
2618 return cssValuePool().createValue(style->regionFragment());
2619 case CSSPropertyWebkitWrapFlow: 2595 case CSSPropertyWebkitWrapFlow:
2620 return cssValuePool().createValue(style->wrapFlow()); 2596 return cssValuePool().createValue(style->wrapFlow());
2621 case CSSPropertyShapeMargin: 2597 case CSSPropertyShapeMargin:
2622 return cssValuePool().createValue(style->shapeMargin()); 2598 return cssValuePool().createValue(style->shapeMargin());
2623 case CSSPropertyShapePadding: 2599 case CSSPropertyShapePadding:
2624 return cssValuePool().createValue(style->shapePadding()); 2600 return cssValuePool().createValue(style->shapePadding());
2625 case CSSPropertyShapeImageThreshold: 2601 case CSSPropertyShapeImageThreshold:
2626 return cssValuePool().createValue(style->shapeImageThreshold(), CSSP rimitiveValue::CSS_NUMBER); 2602 return cssValuePool().createValue(style->shapeImageThreshold(), CSSP rimitiveValue::CSS_NUMBER);
2627 case CSSPropertyShapeInside: 2603 case CSSPropertyShapeInside:
2628 if (!style->shapeInside()) 2604 if (!style->shapeInside())
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
3042 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 3018 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
3043 CSSPropertyB ackgroundClip }; 3019 CSSPropertyB ackgroundClip };
3044 3020
3045 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSlashSeparated() ; 3021 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSlashSeparated() ;
3046 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator)))); 3022 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator))));
3047 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator)))); 3023 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator))));
3048 return list.release(); 3024 return list.release();
3049 } 3025 }
3050 3026
3051 } // namespace WebCore 3027 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/css/CSSGrammar.y » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698