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

Side by Side Diff: third_party/WebKit/Source/core/editing/CaretDisplayItemClient.cpp

Issue 2888253002: Skip both paint and raster invalidation for LayoutSVGHiddenContainer subtree (Closed)
Patch Set: Rebaseline-cl Created 3 years, 7 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) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 if (layout_block_ == previous_layout_block_) 248 if (layout_block_ == previous_layout_block_)
249 previous_layout_block_ = nullptr; 249 previous_layout_block_ = nullptr;
250 250
251 ObjectPaintInvalidatorWithContext object_invalidator(*layout_block_, context); 251 ObjectPaintInvalidatorWithContext object_invalidator(*layout_block_, context);
252 if (!needs_paint_invalidation_ && new_visual_rect == visual_rect_) { 252 if (!needs_paint_invalidation_ && new_visual_rect == visual_rect_) {
253 // The caret may change paint offset without changing visual rect, and we 253 // The caret may change paint offset without changing visual rect, and we
254 // need to invalidate the display item client if the block is doing full 254 // need to invalidate the display item client if the block is doing full
255 // paint invalidation. 255 // paint invalidation.
256 if (IsImmediateFullPaintInvalidationReason( 256 if (IsImmediateFullPaintInvalidationReason(
257 layout_block_->FullPaintInvalidationReason()) || 257 layout_block_->FullPaintInvalidationReason()) ||
258 // For non-SPv2, ForcedSubtreeInvalidationChecking may hint change of 258 // For non-SPv2, kSubtreeInvalidationChecking may hint change of
259 // paint offset. See ObjectPaintInvalidatorWithContext:: 259 // paint offset. See ObjectPaintInvalidatorWithContext::
260 // invalidatePaintIfNeededWithComputedReason(). 260 // invalidatePaintIfNeededWithComputedReason().
261 (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && 261 (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() &&
262 (context.forced_subtree_invalidation_flags & 262 (context.subtree_flags &
263 PaintInvalidatorContext::kForcedSubtreeInvalidationChecking))) { 263 PaintInvalidatorContext::kSubtreeInvalidationChecking))) {
264 object_invalidator.InvalidateDisplayItemClient( 264 object_invalidator.InvalidateDisplayItemClient(
265 *this, PaintInvalidationReason::kCaret); 265 *this, PaintInvalidationReason::kCaret);
266 } 266 }
267 return; 267 return;
268 } 268 }
269 269
270 needs_paint_invalidation_ = false; 270 needs_paint_invalidation_ = false;
271 271
272 if (!IsImmediateFullPaintInvalidationReason( 272 if (!IsImmediateFullPaintInvalidationReason(
273 layout_block_->FullPaintInvalidationReason())) { 273 layout_block_->FullPaintInvalidationReason())) {
(...skipping 27 matching lines...) Expand all
301 301
302 String CaretDisplayItemClient::DebugName() const { 302 String CaretDisplayItemClient::DebugName() const {
303 return "Caret"; 303 return "Caret";
304 } 304 }
305 305
306 LayoutRect CaretDisplayItemClient::VisualRect() const { 306 LayoutRect CaretDisplayItemClient::VisualRect() const {
307 return visual_rect_; 307 return visual_rect_;
308 } 308 }
309 309
310 } // namespace blink 310 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698