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

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: Code review: Revert changes in Source/devtools/Inspector-1.1.json 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
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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 CSSPropertyWebkitTransformOrigin, 322 CSSPropertyWebkitTransformOrigin,
323 CSSPropertyWebkitTransformStyle, 323 CSSPropertyWebkitTransformStyle,
324 CSSPropertyWebkitTransitionDelay, 324 CSSPropertyWebkitTransitionDelay,
325 CSSPropertyWebkitTransitionDuration, 325 CSSPropertyWebkitTransitionDuration,
326 CSSPropertyWebkitTransitionProperty, 326 CSSPropertyWebkitTransitionProperty,
327 CSSPropertyWebkitTransitionTimingFunction, 327 CSSPropertyWebkitTransitionTimingFunction,
328 CSSPropertyWebkitUserDrag, 328 CSSPropertyWebkitUserDrag,
329 CSSPropertyWebkitUserModify, 329 CSSPropertyWebkitUserModify,
330 CSSPropertyWebkitUserSelect, 330 CSSPropertyWebkitUserSelect,
331 CSSPropertyWebkitWritingMode, 331 CSSPropertyWebkitWritingMode,
332 CSSPropertyWebkitFlowInto,
333 CSSPropertyWebkitFlowFrom,
334 CSSPropertyWebkitRegionBreakAfter,
335 CSSPropertyWebkitRegionBreakBefore,
336 CSSPropertyWebkitRegionBreakInside,
337 CSSPropertyWebkitRegionFragment,
338 CSSPropertyWebkitAppRegion, 332 CSSPropertyWebkitAppRegion,
339 CSSPropertyWebkitWrapFlow, 333 CSSPropertyWebkitWrapFlow,
340 CSSPropertyWebkitWrapThrough, 334 CSSPropertyWebkitWrapThrough,
341 CSSPropertyBufferedRendering, 335 CSSPropertyBufferedRendering,
342 CSSPropertyClipPath, 336 CSSPropertyClipPath,
343 CSSPropertyClipRule, 337 CSSPropertyClipRule,
344 CSSPropertyMask, 338 CSSPropertyMask,
345 CSSPropertyFilter, 339 CSSPropertyFilter,
346 CSSPropertyFloodColor, 340 CSSPropertyFloodColor,
347 CSSPropertyFloodOpacity, 341 CSSPropertyFloodOpacity,
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
1327 const CounterContent* counter = static_cast<const CounterContentData *>(contentData)->counter(); 1321 const CounterContent* counter = static_cast<const CounterContentData *>(contentData)->counter();
1328 ASSERT(counter); 1322 ASSERT(counter);
1329 list->append(cssValuePool().createValue(counter->identifier(), CSSPr imitiveValue::CSS_COUNTER_NAME)); 1323 list->append(cssValuePool().createValue(counter->identifier(), CSSPr imitiveValue::CSS_COUNTER_NAME));
1330 } else if (contentData->isImage()) { 1324 } else if (contentData->isImage()) {
1331 const StyleImage* image = static_cast<const ImageContentData*>(conte ntData)->image(); 1325 const StyleImage* image = static_cast<const ImageContentData*>(conte ntData)->image();
1332 ASSERT(image); 1326 ASSERT(image);
1333 list->append(image->cssValue()); 1327 list->append(image->cssValue());
1334 } else if (contentData->isText()) 1328 } else if (contentData->isText())
1335 list->append(cssValuePool().createValue(static_cast<const TextConten tData*>(contentData)->text(), CSSPrimitiveValue::CSS_STRING)); 1329 list->append(cssValuePool().createValue(static_cast<const TextConten tData*>(contentData)->text(), CSSPrimitiveValue::CSS_STRING));
1336 } 1330 }
1337 if (style.hasFlowFrom())
1338 list->append(cssValuePool().createValue(style.regionThread(), CSSPrimiti veValue::CSS_STRING));
1339 return list.release(); 1331 return list.release();
1340 } 1332 }
1341 1333
1342 static PassRefPtr<CSSValue> valueForCounterDirectives(const RenderStyle& style, CSSPropertyID propertyID) 1334 static PassRefPtr<CSSValue> valueForCounterDirectives(const RenderStyle& style, CSSPropertyID propertyID)
1343 { 1335 {
1344 const CounterDirectiveMap* map = style.counterDirectives(); 1336 const CounterDirectiveMap* map = style.counterDirectives();
1345 if (!map) 1337 if (!map)
1346 return 0; 1338 return 0;
1347 1339
1348 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ; 1340 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ;
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1814 case CSSPropertyWebkitColumnBreakBefore: 1806 case CSSPropertyWebkitColumnBreakBefore:
1815 return cssValuePool().createValue(style->columnBreakBefore()); 1807 return cssValuePool().createValue(style->columnBreakBefore());
1816 case CSSPropertyWebkitColumnBreakInside: 1808 case CSSPropertyWebkitColumnBreakInside:
1817 return cssValuePool().createValue(style->columnBreakInside()); 1809 return cssValuePool().createValue(style->columnBreakInside());
1818 case CSSPropertyWebkitColumnWidth: 1810 case CSSPropertyWebkitColumnWidth:
1819 if (style->hasAutoColumnWidth()) 1811 if (style->hasAutoColumnWidth())
1820 return cssValuePool().createIdentifierValue(CSSValueAuto); 1812 return cssValuePool().createIdentifierValue(CSSValueAuto);
1821 return zoomAdjustedPixelValue(style->columnWidth(), *style); 1813 return zoomAdjustedPixelValue(style->columnWidth(), *style);
1822 case CSSPropertyTabSize: 1814 case CSSPropertyTabSize:
1823 return cssValuePool().createValue(style->tabSize(), CSSPrimitiveValu e::CSS_NUMBER); 1815 return cssValuePool().createValue(style->tabSize(), CSSPrimitiveValu e::CSS_NUMBER);
1824 case CSSPropertyWebkitRegionBreakAfter:
1825 return cssValuePool().createValue(style->regionBreakAfter());
1826 case CSSPropertyWebkitRegionBreakBefore:
1827 return cssValuePool().createValue(style->regionBreakBefore());
1828 case CSSPropertyWebkitRegionBreakInside:
1829 return cssValuePool().createValue(style->regionBreakInside());
1830 case CSSPropertyCursor: { 1816 case CSSPropertyCursor: {
1831 RefPtrWillBeRawPtr<CSSValueList> list; 1817 RefPtrWillBeRawPtr<CSSValueList> list;
1832 CursorList* cursors = style->cursors(); 1818 CursorList* cursors = style->cursors();
1833 if (cursors && cursors->size() > 0) { 1819 if (cursors && cursors->size() > 0) {
1834 list = CSSValueList::createCommaSeparated(); 1820 list = CSSValueList::createCommaSeparated();
1835 for (unsigned i = 0; i < cursors->size(); ++i) 1821 for (unsigned i = 0; i < cursors->size(); ++i)
1836 if (StyleImage* image = cursors->at(i).image()) 1822 if (StyleImage* image = cursors->at(i).image())
1837 list->append(image->cssValue()); 1823 list->append(image->cssValue());
1838 } 1824 }
1839 RefPtr<CSSValue> value = cssValuePool().createValue(style->cursor()) ; 1825 RefPtr<CSSValue> value = cssValuePool().createValue(style->cursor()) ;
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
2610 case CSSPropertyCounterReset: 2596 case CSSPropertyCounterReset:
2611 return valueForCounterDirectives(*style, propertyID); 2597 return valueForCounterDirectives(*style, propertyID);
2612 case CSSPropertyWebkitClipPath: 2598 case CSSPropertyWebkitClipPath:
2613 if (ClipPathOperation* operation = style->clipPath()) { 2599 if (ClipPathOperation* operation = style->clipPath()) {
2614 if (operation->type() == ClipPathOperation::SHAPE) 2600 if (operation->type() == ClipPathOperation::SHAPE)
2615 return valueForBasicShape(*style, toShapeClipPathOperation(o peration)->basicShape()); 2601 return valueForBasicShape(*style, toShapeClipPathOperation(o peration)->basicShape());
2616 if (operation->type() == ClipPathOperation::REFERENCE) 2602 if (operation->type() == ClipPathOperation::REFERENCE)
2617 return CSSPrimitiveValue::create(toReferenceClipPathOperatio n(operation)->url(), CSSPrimitiveValue::CSS_URI); 2603 return CSSPrimitiveValue::create(toReferenceClipPathOperatio n(operation)->url(), CSSPrimitiveValue::CSS_URI);
2618 } 2604 }
2619 return cssValuePool().createIdentifierValue(CSSValueNone); 2605 return cssValuePool().createIdentifierValue(CSSValueNone);
2620 case CSSPropertyWebkitFlowInto:
2621 if (style->flowThread().isNull())
2622 return cssValuePool().createIdentifierValue(CSSValueNone);
2623 return cssValuePool().createValue(style->flowThread(), CSSPrimitiveV alue::CSS_STRING);
2624 case CSSPropertyWebkitFlowFrom:
2625 if (!style->hasFlowFrom())
2626 return cssValuePool().createIdentifierValue(CSSValueNone);
2627 return cssValuePool().createValue(style->regionThread(), CSSPrimitiv eValue::CSS_STRING);
2628 case CSSPropertyWebkitRegionFragment:
2629 return cssValuePool().createValue(style->regionFragment());
2630 case CSSPropertyWebkitWrapFlow: 2606 case CSSPropertyWebkitWrapFlow:
2631 return cssValuePool().createValue(style->wrapFlow()); 2607 return cssValuePool().createValue(style->wrapFlow());
2632 case CSSPropertyShapeMargin: 2608 case CSSPropertyShapeMargin:
2633 return cssValuePool().createValue(style->shapeMargin()); 2609 return cssValuePool().createValue(style->shapeMargin());
2634 case CSSPropertyShapePadding: 2610 case CSSPropertyShapePadding:
2635 return cssValuePool().createValue(style->shapePadding()); 2611 return cssValuePool().createValue(style->shapePadding());
2636 case CSSPropertyShapeImageThreshold: 2612 case CSSPropertyShapeImageThreshold:
2637 return cssValuePool().createValue(style->shapeImageThreshold(), CSSP rimitiveValue::CSS_NUMBER); 2613 return cssValuePool().createValue(style->shapeImageThreshold(), CSSP rimitiveValue::CSS_NUMBER);
2638 case CSSPropertyShapeInside: 2614 case CSSPropertyShapeInside:
2639 if (!style->shapeInside()) 2615 if (!style->shapeInside())
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
3053 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 3029 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
3054 CSSPropertyB ackgroundClip }; 3030 CSSPropertyB ackgroundClip };
3055 3031
3056 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSlashSeparated() ; 3032 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSlashSeparated() ;
3057 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator)))); 3033 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator))));
3058 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator)))); 3034 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator))));
3059 return list.release(); 3035 return list.release();
3060 } 3036 }
3061 3037
3062 } // namespace WebCore 3038 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/css/CSSGrammar.y » ('j') | Source/core/dom/Node.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698