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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 1407123011: Use a converter to resolve style for -webkit-filter and backdrop-filter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp ('k') | no next file » | 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 state.style()->setClipPath(nullptr); 565 state.style()->setClipPath(nullptr);
566 } 566 }
567 if (value->isURIValue()) { 567 if (value->isURIValue()) {
568 String cssURLValue = toCSSURIValue(value)->value(); 568 String cssURLValue = toCSSURIValue(value)->value();
569 KURL url = state.document().completeURL(cssURLValue); 569 KURL url = state.document().completeURL(cssURLValue);
570 // FIXME: It doesn't work with forward or external SVG references (see h ttps://bugs.webkit.org/show_bug.cgi?id=90405) 570 // FIXME: It doesn't work with forward or external SVG references (see h ttps://bugs.webkit.org/show_bug.cgi?id=90405)
571 state.style()->setClipPath(ReferenceClipPathOperation::create(cssURLValu e, AtomicString(url.fragmentIdentifier()))); 571 state.style()->setClipPath(ReferenceClipPathOperation::create(cssURLValu e, AtomicString(url.fragmentIdentifier())));
572 } 572 }
573 } 573 }
574 574
575 void StyleBuilderFunctions::applyValueCSSPropertyWebkitFilter(StyleResolverState & state, CSSValue* value)
576 {
577 // FIXME: We should just make this a converter
578 FilterOperations operations;
579 FilterOperationResolver::createFilterOperations(*value, state.cssToLengthCon versionData(), operations, state);
580 state.style()->setFilter(operations);
581 }
582
583 void StyleBuilderFunctions::applyValueCSSPropertyBackdropFilter(StyleResolverSta te& state, CSSValue* value)
584 {
585 // FIXME: We should just make this a converter
586 FilterOperations operations;
587 FilterOperationResolver::createFilterOperations(*value, state.cssToLengthCon versionData(), operations, state);
588 state.style()->setBackdropFilter(operations);
589 }
590
591 void StyleBuilderFunctions::applyInitialCSSPropertyWebkitTextEmphasisStyle(Style ResolverState& state) 575 void StyleBuilderFunctions::applyInitialCSSPropertyWebkitTextEmphasisStyle(Style ResolverState& state)
592 { 576 {
593 state.style()->setTextEmphasisFill(ComputedStyle::initialTextEmphasisFill()) ; 577 state.style()->setTextEmphasisFill(ComputedStyle::initialTextEmphasisFill()) ;
594 state.style()->setTextEmphasisMark(ComputedStyle::initialTextEmphasisMark()) ; 578 state.style()->setTextEmphasisMark(ComputedStyle::initialTextEmphasisMark()) ;
595 state.style()->setTextEmphasisCustomMark(ComputedStyle::initialTextEmphasisC ustomMark()); 579 state.style()->setTextEmphasisCustomMark(ComputedStyle::initialTextEmphasisC ustomMark());
596 } 580 }
597 581
598 void StyleBuilderFunctions::applyInheritCSSPropertyWebkitTextEmphasisStyle(Style ResolverState& state) 582 void StyleBuilderFunctions::applyInheritCSSPropertyWebkitTextEmphasisStyle(Style ResolverState& state)
599 { 583 {
600 state.style()->setTextEmphasisFill(state.parentStyle()->textEmphasisFill()); 584 state.style()->setTextEmphasisFill(state.parentStyle()->textEmphasisFill());
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 return; 826 return;
843 case CSSValueSuper: 827 case CSSValueSuper:
844 svgStyle.setBaselineShift(BS_SUPER); 828 svgStyle.setBaselineShift(BS_SUPER);
845 return; 829 return;
846 default: 830 default:
847 ASSERT_NOT_REACHED(); 831 ASSERT_NOT_REACHED();
848 } 832 }
849 } 833 }
850 834
851 } // namespace blink 835 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698