OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 */ | 42 */ |
43 | 43 |
44 #include "config.h" | 44 #include "config.h" |
45 #include "core/rendering/RenderLayer.h" | 45 #include "core/rendering/RenderLayer.h" |
46 | 46 |
47 #include "core/CSSPropertyNames.h" | 47 #include "core/CSSPropertyNames.h" |
48 #include "core/HTMLNames.h" | 48 #include "core/HTMLNames.h" |
49 #include "core/css/PseudoStyleRequest.h" | 49 #include "core/css/PseudoStyleRequest.h" |
50 #include "core/dom/Document.h" | 50 #include "core/dom/Document.h" |
51 #include "core/dom/shadow/ShadowRoot.h" | 51 #include "core/dom/shadow/ShadowRoot.h" |
52 #include "core/frame/DeprecatedScheduleStyleRecalcDuringLayout.h" | |
53 #include "core/frame/FrameView.h" | 52 #include "core/frame/FrameView.h" |
54 #include "core/frame/LocalFrame.h" | 53 #include "core/frame/LocalFrame.h" |
55 #include "core/frame/Settings.h" | 54 #include "core/frame/Settings.h" |
56 #include "core/html/HTMLFrameElement.h" | 55 #include "core/html/HTMLFrameElement.h" |
57 #include "core/page/Page.h" | 56 #include "core/page/Page.h" |
58 #include "core/page/scrolling/ScrollingCoordinator.h" | 57 #include "core/page/scrolling/ScrollingCoordinator.h" |
59 #include "core/rendering/ColumnInfo.h" | 58 #include "core/rendering/ColumnInfo.h" |
60 #include "core/rendering/FilterEffectRenderer.h" | 59 #include "core/rendering/FilterEffectRenderer.h" |
61 #include "core/rendering/HitTestRequest.h" | 60 #include "core/rendering/HitTestRequest.h" |
62 #include "core/rendering/HitTestResult.h" | 61 #include "core/rendering/HitTestResult.h" |
(...skipping 3653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3716 // We can optimize away code paths in other places if we know that there
are no software filters. | 3715 // We can optimize away code paths in other places if we know that there
are no software filters. |
3717 renderer()->document().view()->setHasSoftwareFilters(true); | 3716 renderer()->document().view()->setHasSoftwareFilters(true); |
3718 } | 3717 } |
3719 | 3718 |
3720 // If the filter fails to build, remove it from the layer. It will still att
empt to | 3719 // If the filter fails to build, remove it from the layer. It will still att
empt to |
3721 // go through regular processing (e.g. compositing), but never apply anythin
g. | 3720 // go through regular processing (e.g. compositing), but never apply anythin
g. |
3722 if (!filterInfo->renderer()->build(renderer(), computeFilterOperations(rende
rer()->style()))) | 3721 if (!filterInfo->renderer()->build(renderer(), computeFilterOperations(rende
rer()->style()))) |
3723 filterInfo->setRenderer(nullptr); | 3722 filterInfo->setRenderer(nullptr); |
3724 } | 3723 } |
3725 | 3724 |
3726 void RenderLayer::filterNeedsPaintInvalidation() | |
3727 { | |
3728 { | |
3729 DeprecatedScheduleStyleRecalcDuringLayout marker(renderer()->document().
lifecycle()); | |
3730 // It's possible for scheduleSVGFilterLayerUpdateHack to schedule a styl
e recalc, which | |
3731 // is a problem because this function can be called while performing lay
out. | |
3732 // Presumably this represents an illegal data flow of layout or composit
ing | |
3733 // information into the style system. | |
3734 toElement(renderer()->node())->scheduleSVGFilterLayerUpdateHack(); | |
3735 } | |
3736 | |
3737 if (renderer()->view()) { | |
3738 if (renderer()->frameView()->isInPerformLayout()) | |
3739 renderer()->setShouldDoFullPaintInvalidation(true); | |
3740 else | |
3741 renderer()->paintInvalidationForWholeRenderer(); | |
3742 } | |
3743 } | |
3744 | |
3745 void RenderLayer::addLayerHitTestRects(LayerHitTestRects& rects) const | 3725 void RenderLayer::addLayerHitTestRects(LayerHitTestRects& rects) const |
3746 { | 3726 { |
3747 computeSelfHitTestRects(rects); | 3727 computeSelfHitTestRects(rects); |
3748 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) | 3728 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) |
3749 child->addLayerHitTestRects(rects); | 3729 child->addLayerHitTestRects(rects); |
3750 } | 3730 } |
3751 | 3731 |
3752 void RenderLayer::computeSelfHitTestRects(LayerHitTestRects& rects) const | 3732 void RenderLayer::computeSelfHitTestRects(LayerHitTestRects& rects) const |
3753 { | 3733 { |
3754 if (!size().isEmpty()) { | 3734 if (!size().isEmpty()) { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3799 } | 3779 } |
3800 } | 3780 } |
3801 | 3781 |
3802 void showLayerTree(const blink::RenderObject* renderer) | 3782 void showLayerTree(const blink::RenderObject* renderer) |
3803 { | 3783 { |
3804 if (!renderer) | 3784 if (!renderer) |
3805 return; | 3785 return; |
3806 showLayerTree(renderer->enclosingLayer()); | 3786 showLayerTree(renderer->enclosingLayer()); |
3807 } | 3787 } |
3808 #endif | 3788 #endif |
OLD | NEW |