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

Side by Side Diff: Source/core/layout/svg/LayoutSVGText.cpp

Issue 1331053002: Propagate resource-triggered repaints to text node children of <text> (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Name/comment updates. Created 5 years, 3 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Apple Computer, Inc. 2 * Copyright (C) 2006 Apple Computer, Inc.
3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> 3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org>
4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> 4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
5 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 5 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
6 * Copyright (C) 2008 Rob Buis <buis@kde.org> 6 * Copyright (C) 2008 Rob Buis <buis@kde.org>
7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
8 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. 8 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved.
9 * Copyright (C) 2012 Google Inc. 9 * Copyright (C) 2012 Google Inc.
10 * 10 *
11 * This library is free software; you can redistribute it and/or 11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Library General Public 12 * modify it under the terms of the GNU Library General Public
13 * License as published by the Free Software Foundation; either 13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version. 14 * version 2 of the License, or (at your option) any later version.
15 * 15 *
16 * This library is distributed in the hope that it will be useful, 16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Library General Public License for more details. 19 * Library General Public License for more details.
20 * 20 *
21 * You should have received a copy of the GNU Library General Public License 21 * You should have received a copy of the GNU Library General Public License
22 * along with this library; see the file COPYING.LIB. If not, write to 22 * along with this library; see the file COPYING.LIB. If not, write to
23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA. 24 * Boston, MA 02110-1301, USA.
25 */ 25 */
26 26
27 #include "config.h" 27 #include "config.h"
28
29 #include "core/layout/svg/LayoutSVGText.h" 28 #include "core/layout/svg/LayoutSVGText.h"
30 29
31 #include "core/editing/PositionWithAffinity.h" 30 #include "core/editing/PositionWithAffinity.h"
32 #include "core/layout/HitTestRequest.h" 31 #include "core/layout/HitTestRequest.h"
33 #include "core/layout/HitTestResult.h" 32 #include "core/layout/HitTestResult.h"
34 #include "core/layout/LayoutAnalyzer.h" 33 #include "core/layout/LayoutAnalyzer.h"
35 #include "core/layout/LayoutState.h" 34 #include "core/layout/LayoutState.h"
35 #include "core/layout/LayoutView.h"
36 #include "core/layout/PointerEventsHitRules.h" 36 #include "core/layout/PointerEventsHitRules.h"
37 #include "core/layout/api/LineLayoutItem.h" 37 #include "core/layout/api/LineLayoutItem.h"
38 #include "core/layout/svg/LayoutSVGInline.h" 38 #include "core/layout/svg/LayoutSVGInline.h"
39 #include "core/layout/svg/LayoutSVGInlineText.h" 39 #include "core/layout/svg/LayoutSVGInlineText.h"
40 #include "core/layout/svg/LayoutSVGRoot.h" 40 #include "core/layout/svg/LayoutSVGRoot.h"
41 #include "core/layout/svg/SVGLayoutSupport.h" 41 #include "core/layout/svg/SVGLayoutSupport.h"
42 #include "core/layout/svg/SVGResourcesCache.h" 42 #include "core/layout/svg/SVGResourcesCache.h"
43 #include "core/layout/svg/line/SVGRootInlineBox.h" 43 #include "core/layout/svg/line/SVGRootInlineBox.h"
44 #include "core/paint/SVGTextPainter.h" 44 #include "core/paint/SVGTextPainter.h"
45 #include "core/style/ShadowList.h" 45 #include "core/style/ShadowList.h"
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 { 510 {
511 SVGResourcesCache::clientWillBeRemovedFromTree(child); 511 SVGResourcesCache::clientWillBeRemovedFromTree(child);
512 512
513 Vector<SVGTextLayoutAttributes*, 2> affectedAttributes; 513 Vector<SVGTextLayoutAttributes*, 2> affectedAttributes;
514 FontCachePurgePreventer fontCachePurgePreventer; 514 FontCachePurgePreventer fontCachePurgePreventer;
515 subtreeChildWillBeRemoved(child, affectedAttributes); 515 subtreeChildWillBeRemoved(child, affectedAttributes);
516 LayoutSVGBlock::removeChild(child); 516 LayoutSVGBlock::removeChild(child);
517 subtreeChildWasRemoved(affectedAttributes); 517 subtreeChildWasRemoved(affectedAttributes);
518 } 518 }
519 519
520 void LayoutSVGText::invalidateTreeIfNeeded(PaintInvalidationState& paintInvalida tionState)
521 {
522 ASSERT(!needsLayout());
523
524 if (!shouldCheckForPaintInvalidation(paintInvalidationState))
525 return;
526
527 PaintInvalidationReason reason = invalidatePaintIfNeeded(paintInvalidationSt ate, paintInvalidationState.paintInvalidationContainer());
528 clearPaintInvalidationState(paintInvalidationState);
529
530 if (reason == PaintInvalidationDelayedFull)
531 paintInvalidationState.pushDelayedPaintInvalidationTarget(*this);
532
533 ForceHorriblySlowRectMapping slowRectMapping(&paintInvalidationState);
534 PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, pai ntInvalidationState.paintInvalidationContainer());
535 if (reason == PaintInvalidationSVGResourceChange)
536 childTreeWalkState.setForceSubtreeInvalidationWithinContainer();
537 invalidatePaintOfSubtreesIfNeeded(childTreeWalkState);
520 } 538 }
539
540 }
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGText.h ('k') | Source/platform/graphics/PaintInvalidationReason.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698