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

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

Issue 2371933003: Fix paint invalidation for composited vertical-rl having overflow (Closed)
Patch Set: - Created 4 years, 2 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/layout/PaintInvalidationState.h" 5 #include "core/layout/PaintInvalidationState.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "core/layout/LayoutInline.h" 10 #include "core/layout/LayoutInline.h"
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 if (m_paintInvalidationContainer->layer()->groupedMapping()) 411 if (m_paintInvalidationContainer->layer()->groupedMapping())
412 PaintLayer::mapRectInPaintInvalidationContainerToBacking(*m_paintInvalid ationContainer, rect); 412 PaintLayer::mapRectInPaintInvalidationContainerToBacking(*m_paintInvalid ationContainer, rect);
413 return rect; 413 return rect;
414 } 414 }
415 415
416 static void slowMapToVisualRectInAncestorSpace(const LayoutObject& object, const LayoutBoxModelObject& ancestor, LayoutRect& rect) 416 static void slowMapToVisualRectInAncestorSpace(const LayoutObject& object, const LayoutBoxModelObject& ancestor, LayoutRect& rect)
417 { 417 {
418 // TODO(wkorman): The flip below is required because visual rects are 418 // TODO(wkorman): The flip below is required because visual rects are
419 // currently in "physical coordinates with flipped block-flow direction" 419 // currently in "physical coordinates with flipped block-flow direction"
420 // (see LayoutBoxModelObject.h) but we need them to be in physical 420 // (see LayoutBoxModelObject.h) but we need them to be in physical
421 // coordinates. When we're mapping within exactly one object we keep the 421 // coordinates.
422 // input rect flipped because we'd just have to re-flip in short order, as 422 if (object.isBox())
423 // the output of this method must be in the "physical coordinates with
424 // flipped block-flow direction.
425 if (object.isBox() && object != ancestor)
chrishtr 2016/09/27 00:02:43 Is there an existing test that this is not needed
Xianzhu 2016/09/27 00:26:45 There seems no existing test. The added test paint
426 toLayoutBox(&object)->flipForWritingMode(rect); 423 toLayoutBox(&object)->flipForWritingMode(rect);
427 424
428 if (object.isLayoutView()) 425 if (object.isLayoutView())
429 toLayoutView(object).mapToVisualRectInAncestorSpace(&ancestor, rect, Inp utIsInFrameCoordinates, DefaultVisualRectFlags); 426 toLayoutView(object).mapToVisualRectInAncestorSpace(&ancestor, rect, Inp utIsInFrameCoordinates, DefaultVisualRectFlags);
430 else 427 else
431 object.mapToVisualRectInAncestorSpace(&ancestor, rect); 428 object.mapToVisualRectInAncestorSpace(&ancestor, rect);
432 } 429 }
433 430
434 void PaintInvalidationState::mapLocalRectToPaintInvalidationContainer(LayoutRect & rect) const 431 void PaintInvalidationState::mapLocalRectToPaintInvalidationContainer(LayoutRect & rect) const
435 { 432 {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 } 544 }
548 545
549 546
550 void PaintInvalidatorContextAdapter::mapLocalRectToPaintInvalidationBacking(cons t LayoutObject& object, LayoutRect& rect) const 547 void PaintInvalidatorContextAdapter::mapLocalRectToPaintInvalidationBacking(cons t LayoutObject& object, LayoutRect& rect) const
551 { 548 {
552 DCHECK(&object == &m_paintInvalidationState.currentObject()); 549 DCHECK(&object == &m_paintInvalidationState.currentObject());
553 m_paintInvalidationState.mapLocalRectToPaintInvalidationBacking(rect); 550 m_paintInvalidationState.mapLocalRectToPaintInvalidationBacking(rect);
554 } 551 }
555 552
556 } // namespace blink 553 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698