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

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

Issue 2727093002: Account for perspective and preserve-3d in mapToVisualRectInAncestorSpace (Closed)
Patch Set: none Created 3 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 // 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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 const LayoutObject& object, 492 const LayoutObject& object,
493 const LayoutBoxModelObject& ancestor, 493 const LayoutBoxModelObject& ancestor,
494 LayoutRect& rect) { 494 LayoutRect& rect) {
495 // TODO(wkorman): The flip below is required because visual rects are 495 // TODO(wkorman): The flip below is required because visual rects are
496 // currently in "physical coordinates with flipped block-flow direction" 496 // currently in "physical coordinates with flipped block-flow direction"
497 // (see LayoutBoxModelObject.h) but we need them to be in physical 497 // (see LayoutBoxModelObject.h) but we need them to be in physical
498 // coordinates. 498 // coordinates.
499 if (object.isBox()) 499 if (object.isBox())
500 toLayoutBox(&object)->flipForWritingMode(rect); 500 toLayoutBox(&object)->flipForWritingMode(rect);
501 501
502 if (object.isLayoutView()) 502 if (object.isLayoutView()) {
503 toLayoutView(object).mapToVisualRectInAncestorSpace( 503 toLayoutView(object).mapToVisualRectInAncestorSpace(
504 &ancestor, rect, InputIsInFrameCoordinates, DefaultVisualRectFlags); 504 &ancestor, rect, InputIsInFrameCoordinates, DefaultVisualRectFlags);
505 else 505 } else {
506 object.mapToVisualRectInAncestorSpace(&ancestor, rect); 506 object.mapToVisualRectInAncestorSpace(&ancestor, rect);
507 }
507 } 508 }
508 509
509 void PaintInvalidationState::mapLocalRectToPaintInvalidationContainer( 510 void PaintInvalidationState::mapLocalRectToPaintInvalidationContainer(
510 LayoutRect& rect) const { 511 LayoutRect& rect) const {
511 #if DCHECK_IS_ON() 512 #if DCHECK_IS_ON()
512 DCHECK(!m_didUpdateForChildren); 513 DCHECK(!m_didUpdateForChildren);
513 #endif 514 #endif
514 515
515 if (m_cachedOffsetsEnabled) { 516 if (m_cachedOffsetsEnabled) {
516 #ifdef CHECK_FAST_PATH_SLOW_PATH_EQUALITY 517 #ifdef CHECK_FAST_PATH_SLOW_PATH_EQUALITY
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 } 630 }
630 631
631 void PaintInvalidatorContextAdapter::mapLocalRectToPaintInvalidationBacking( 632 void PaintInvalidatorContextAdapter::mapLocalRectToPaintInvalidationBacking(
632 const LayoutObject& object, 633 const LayoutObject& object,
633 LayoutRect& rect) const { 634 LayoutRect& rect) const {
634 DCHECK(&object == &m_paintInvalidationState.currentObject()); 635 DCHECK(&object == &m_paintInvalidationState.currentObject());
635 m_paintInvalidationState.mapLocalRectToPaintInvalidationBacking(rect); 636 m_paintInvalidationState.mapLocalRectToPaintInvalidationBacking(rect);
636 } 637 }
637 638
638 } // namespace blink 639 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutView.cpp ('k') | third_party/WebKit/Source/core/layout/VisualRectMappingTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698