diff options
author | schenney@chromium.org <schenney@chromium.org> | 2015-03-27 18:03:05 +0000 |
---|---|---|
committer | schenney@chromium.org <schenney@chromium.org> | 2015-03-27 18:03:05 +0000 |
commit | 257585a8bdf587ba027177d78f5a85be10651262 (patch) | |
tree | 3205979444a8dd383fd81eb15560f7bca3ee3c3c /third_party/WebKit/Source/core/layout/LayoutPart.cpp | |
parent | 626a9f4840226996026badb9d956e3811093b15a (diff) | |
download | chromium_src-257585a8bdf587ba027177d78f5a85be10651262.zip chromium_src-257585a8bdf587ba027177d78f5a85be10651262.tar.gz chromium_src-257585a8bdf587ba027177d78f5a85be10651262.tar.bz2 |
Delay paint invalidation in Widget-derived classes
Paint invalidation must happen in the paint invalidation
phase of the document life cycle. This invariant was violated
for WebPluginContainer in several cases: during initial
attachment to the render tree, when scheduleAnimaiton is called,
again when resize() is called, and when paint is called and
layout is required.
This patch caches a pending paint invalidation rectangle and
applies the invalidation when invalidateTreeIfNeeded is invoked.
R=dsinclair,chrishtr,pdr
BUG=457054
Review URL: https://codereview.chromium.org/1034713005
git-svn-id: svn://svn.chromium.org/blink/trunk@192695 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/Source/core/layout/LayoutPart.cpp')
-rw-r--r-- | third_party/WebKit/Source/core/layout/LayoutPart.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/third_party/WebKit/Source/core/layout/LayoutPart.cpp b/third_party/WebKit/Source/core/layout/LayoutPart.cpp index 245a36c..c6565f9 100644 --- a/third_party/WebKit/Source/core/layout/LayoutPart.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutPart.cpp @@ -218,6 +218,19 @@ void LayoutPart::paintContents(const PaintInfo& paintInfo, const LayoutPoint& pa PartPainter(*this).paintContents(paintInfo, paintOffset); } +PaintInvalidationReason LayoutPart::invalidatePaintIfNeeded(PaintInvalidationState& paintInvalidationState, const LayoutBoxModelObject& newPaintInvalidationContainer) +{ + PaintInvalidationReason reason = LayoutReplaced::invalidatePaintIfNeeded(paintInvalidationState, newPaintInvalidationContainer); + + // Allow the widget to perform any invalidation + if (Widget* widget = this->widget()) { + widget->issuePaintInvalidations(); + } + + return reason; +} + + CursorDirective LayoutPart::getCursor(const LayoutPoint& point, Cursor& cursor) const { if (widget() && widget()->isPluginView()) { |