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

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

Issue 962543003: Simplify RenderLayer's handling of filters. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 | « sky/engine/core/core.gni ('k') | sky/engine/core/css/CSSFilterValue.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 * 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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 return cssValuePool().createIdentifierValue(CSSValueNone); 624 return cssValuePool().createIdentifierValue(CSSValueNone);
625 625
626 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); 626 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
627 627
628 RefPtr<CSSFilterValue> filterValue = nullptr; 628 RefPtr<CSSFilterValue> filterValue = nullptr;
629 629
630 Vector<RefPtr<FilterOperation> >::const_iterator end = style.filter().operat ions().end(); 630 Vector<RefPtr<FilterOperation> >::const_iterator end = style.filter().operat ions().end();
631 for (Vector<RefPtr<FilterOperation> >::const_iterator it = style.filter().op erations().begin(); it != end; ++it) { 631 for (Vector<RefPtr<FilterOperation> >::const_iterator it = style.filter().op erations().begin(); it != end; ++it) {
632 FilterOperation* filterOperation = it->get(); 632 FilterOperation* filterOperation = it->get();
633 switch (filterOperation->type()) { 633 switch (filterOperation->type()) {
634 case FilterOperation::REFERENCE:
635 filterValue = CSSFilterValue::create(CSSFilterValue::ReferenceFilter Operation);
636 filterValue->append(cssValuePool().createValue(toReferenceFilterOper ation(filterOperation)->url(), CSSPrimitiveValue::CSS_STRING));
637 break;
638 case FilterOperation::GRAYSCALE: 634 case FilterOperation::GRAYSCALE:
639 filterValue = CSSFilterValue::create(CSSFilterValue::GrayscaleFilter Operation); 635 filterValue = CSSFilterValue::create(CSSFilterValue::GrayscaleFilter Operation);
640 filterValue->append(cssValuePool().createValue(toBasicColorMatrixFil terOperation(filterOperation)->amount(), CSSPrimitiveValue::CSS_NUMBER)); 636 filterValue->append(cssValuePool().createValue(toBasicColorMatrixFil terOperation(filterOperation)->amount(), CSSPrimitiveValue::CSS_NUMBER));
641 break; 637 break;
642 case FilterOperation::SEPIA: 638 case FilterOperation::SEPIA:
643 filterValue = CSSFilterValue::create(CSSFilterValue::SepiaFilterOper ation); 639 filterValue = CSSFilterValue::create(CSSFilterValue::SepiaFilterOper ation);
644 filterValue->append(cssValuePool().createValue(toBasicColorMatrixFil terOperation(filterOperation)->amount(), CSSPrimitiveValue::CSS_NUMBER)); 640 filterValue->append(cssValuePool().createValue(toBasicColorMatrixFil terOperation(filterOperation)->amount(), CSSPrimitiveValue::CSS_NUMBER));
645 break; 641 break;
646 case FilterOperation::SATURATE: 642 case FilterOperation::SATURATE:
647 filterValue = CSSFilterValue::create(CSSFilterValue::SaturateFilterO peration); 643 filterValue = CSSFilterValue::create(CSSFilterValue::SaturateFilterO peration);
(...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after
2313 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 2309 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
2314 CSSPropertyB ackgroundClip }; 2310 CSSPropertyB ackgroundClip };
2315 2311
2316 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); 2312 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
2317 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator)))); 2313 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator))));
2318 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator)))); 2314 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator))));
2319 return list.release(); 2315 return list.release();
2320 } 2316 }
2321 2317
2322 } // namespace blink 2318 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/core.gni ('k') | sky/engine/core/css/CSSFilterValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698