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

Side by Side Diff: third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp

Issue 1886063002: Make canvas filters use the font size in effect when the filter is set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again Created 4 years, 8 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 // 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 if (filterString == state().unparsedFilter()) 376 if (filterString == state().unparsedFilter())
377 return; 377 return;
378 378
379 CSSValue* filterValue = CSSParser::parseSingleValue(CSSPropertyWebkitFilter, filterString, CSSParserContext(HTMLStandardMode, 0)); 379 CSSValue* filterValue = CSSParser::parseSingleValue(CSSPropertyWebkitFilter, filterString, CSSParserContext(HTMLStandardMode, 0));
380 380
381 if (!filterValue || filterValue->isInitialValue() || filterValue->isInherite dValue()) 381 if (!filterValue || filterValue->isInitialValue() || filterValue->isInherite dValue())
382 return; 382 return;
383 383
384 modifiableState().setUnparsedFilter(filterString); 384 modifiableState().setUnparsedFilter(filterString);
385 modifiableState().setFilter(filterValue); 385 modifiableState().setFilter(filterValue);
386 snapshotStateForFilter();
386 } 387 }
387 388
388 SVGMatrixTearOff* BaseRenderingContext2D::currentTransform() const 389 SVGMatrixTearOff* BaseRenderingContext2D::currentTransform() const
389 { 390 {
390 return SVGMatrixTearOff::create(state().transform()); 391 return SVGMatrixTearOff::create(state().transform());
391 } 392 }
392 393
393 void BaseRenderingContext2D::setCurrentTransform(SVGMatrixTearOff* matrixTearOff ) 394 void BaseRenderingContext2D::setCurrentTransform(SVGMatrixTearOff* matrixTearOff )
394 { 395 {
395 const AffineTransform& transform = matrixTearOff->value(); 396 const AffineTransform& transform = matrixTearOff->value();
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
1366 1367
1367 imageBuffer()->willOverwriteCanvas(); 1368 imageBuffer()->willOverwriteCanvas();
1368 } 1369 }
1369 1370
1370 DEFINE_TRACE(BaseRenderingContext2D) 1371 DEFINE_TRACE(BaseRenderingContext2D)
1371 { 1372 {
1372 visitor->trace(m_stateStack); 1373 visitor->trace(m_stateStack);
1373 } 1374 }
1374 1375
1375 } // namespace blink 1376 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698