OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "modules/canvas2d/BaseRenderingContext2D.h" | 5 #include "modules/canvas2d/BaseRenderingContext2D.h" |
6 | 6 |
7 #include "bindings/core/v8/ExceptionMessages.h" | 7 #include "bindings/core/v8/ExceptionMessages.h" |
8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
9 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 9 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
10 #include "core/css/parser/CSSParser.h" | 10 #include "core/css/parser/CSSParser.h" |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 String BaseRenderingContext2D::filter() const | 370 String BaseRenderingContext2D::filter() const |
371 { | 371 { |
372 return state().unparsedFilter(); | 372 return state().unparsedFilter(); |
373 } | 373 } |
374 | 374 |
375 void BaseRenderingContext2D::setFilter(const String& filterString) | 375 void BaseRenderingContext2D::setFilter(const String& filterString) |
376 { | 376 { |
377 if (filterString == state().unparsedFilter()) | 377 if (filterString == state().unparsedFilter()) |
378 return; | 378 return; |
379 | 379 |
380 CSSValue* filterValue = CSSParser::parseSingleValue(CSSPropertyWebkitFilter,
filterString, CSSParserContext(HTMLStandardMode, 0)); | 380 CSSValue* filterValue = CSSParser::parseSingleValue(CSSPropertyFilter, filte
rString, CSSParserContext(HTMLStandardMode, 0)); |
381 | 381 |
382 if (!filterValue || filterValue->isInitialValue() || filterValue->isInherite
dValue()) | 382 if (!filterValue || filterValue->isInitialValue() || filterValue->isInherite
dValue()) |
383 return; | 383 return; |
384 | 384 |
385 modifiableState().setUnparsedFilter(filterString); | 385 modifiableState().setUnparsedFilter(filterString); |
386 modifiableState().setFilter(filterValue); | 386 modifiableState().setFilter(filterValue); |
387 snapshotStateForFilter(); | 387 snapshotStateForFilter(); |
388 } | 388 } |
389 | 389 |
390 SVGMatrixTearOff* BaseRenderingContext2D::currentTransform() const | 390 SVGMatrixTearOff* BaseRenderingContext2D::currentTransform() const |
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1467 | 1467 |
1468 imageBuffer()->willOverwriteCanvas(); | 1468 imageBuffer()->willOverwriteCanvas(); |
1469 } | 1469 } |
1470 | 1470 |
1471 DEFINE_TRACE(BaseRenderingContext2D) | 1471 DEFINE_TRACE(BaseRenderingContext2D) |
1472 { | 1472 { |
1473 visitor->trace(m_stateStack); | 1473 visitor->trace(m_stateStack); |
1474 } | 1474 } |
1475 | 1475 |
1476 } // namespace blink | 1476 } // namespace blink |
OLD | NEW |