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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.cpp

Issue 1643663002: Conditionally create PaintLayer's scrollable area object (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@PaintLayerClipper
Patch Set: Created 4 years, 9 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 /* 1 /*
2 * Copyright (C) 2006 Apple Computer, Inc. 2 * Copyright (C) 2006 Apple Computer, Inc.
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 17 matching lines...) Expand all
28 #include "core/style/ShadowList.h" 28 #include "core/style/ShadowList.h"
29 #include "core/svg/SVGElement.h" 29 #include "core/svg/SVGElement.h"
30 30
31 namespace blink { 31 namespace blink {
32 32
33 LayoutSVGBlock::LayoutSVGBlock(SVGElement* element) 33 LayoutSVGBlock::LayoutSVGBlock(SVGElement* element)
34 : LayoutBlockFlow(element) 34 : LayoutBlockFlow(element)
35 { 35 {
36 } 36 }
37 37
38 void LayoutSVGBlock::updateFromStyle() 38 bool LayoutSVGBlock::allowsOverflowClip() const
39 { 39 {
40 LayoutBlock::updateFromStyle(); 40 // LayoutSVGlock, used by Layout(SVGText|ForeignObject), is not allowed to h ave overflow clip.
41
42 // LayoutSVGlock, used by Layout(SVGText|ForeignObject), is not allowed to c all setHasOverflowClip(true).
43 // LayoutBlock assumes a layer to be present when the overflow clip function ality is requested. Both 41 // LayoutBlock assumes a layer to be present when the overflow clip function ality is requested. Both
44 // Layout(SVGText|ForeignObject) return 'NoPaintLayer' on 'layerTypeRequired '. Fine for LayoutSVGText. 42 // Layout(SVGText|ForeignObject) return 'NoPaintLayer' on 'layerTypeRequired '. Fine for LayoutSVGText.
45 // 43 //
46 // If we want to support overflow rules for <foreignObject> we can choose be tween two solutions: 44 // If we want to support overflow rules for <foreignObject> we can choose be tween two solutions:
47 // a) make LayoutSVGForeignObject require layers and SVG layer aware 45 // a) make LayoutSVGForeignObject require layers and SVG layer aware
48 // b) reactor overflow logic out of Layer (as suggested by dhyatt), which is a large task 46 // b) reactor overflow logic out of Layer (as suggested by dhyatt), which is a large task
49 // 47 //
50 // Until this is resolved, disable overflow support. Opera/FF don't support it as well at the moment (Feb 2010). 48 // Until this is resolved, disable overflow support. Opera/FF don't support it as well at the moment (Feb 2010).
51 // 49 //
52 // Note: This does NOT affect overflow handling on outer/inner <svg> element s - this is handled 50 // Note: This does NOT affect overflow handling on outer/inner <svg> element s - this is handled
53 // manually by LayoutSVGRoot - which owns the documents enclosing root layer and thus works fine. 51 // manually by LayoutSVGRoot - which owns the documents enclosing root layer and thus works fine.
54 setHasOverflowClip(false); 52 return false;
55 } 53 }
56 54
57 void LayoutSVGBlock::absoluteRects(Vector<IntRect>&, const LayoutPoint&) const 55 void LayoutSVGBlock::absoluteRects(Vector<IntRect>&, const LayoutPoint&) const
58 { 56 {
59 // This code path should never be taken for SVG, as we're assuming useTransf orms=true everywhere, absoluteQuads should be used. 57 // This code path should never be taken for SVG, as we're assuming useTransf orms=true everywhere, absoluteQuads should be used.
60 ASSERT_NOT_REACHED(); 58 ASSERT_NOT_REACHED();
61 } 59 }
62 60
63 void LayoutSVGBlock::willBeDestroyed() 61 void LayoutSVGBlock::willBeDestroyed()
64 { 62 {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 void LayoutSVGBlock::invalidateTreeIfNeeded(PaintInvalidationState& paintInvalid ationState) 113 void LayoutSVGBlock::invalidateTreeIfNeeded(PaintInvalidationState& paintInvalid ationState)
116 { 114 {
117 if (!shouldCheckForPaintInvalidation(paintInvalidationState)) 115 if (!shouldCheckForPaintInvalidation(paintInvalidationState))
118 return; 116 return;
119 117
120 ForceHorriblySlowRectMapping slowRectMapping(&paintInvalidationState); 118 ForceHorriblySlowRectMapping slowRectMapping(&paintInvalidationState);
121 LayoutBlockFlow::invalidateTreeIfNeeded(paintInvalidationState); 119 LayoutBlockFlow::invalidateTreeIfNeeded(paintInvalidationState);
122 } 120 }
123 121
124 } // namespace blink 122 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698