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

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

Issue 2073563002: Rework mapToVisualRectInAncestorSpace to handle flipped blocks correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't need to flip in CLM. Created 4 years, 5 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 rect = SVGLayoutSupport::clippedOverflowRectForPaintInvalidation(m_curre ntObject, *m_paintInvalidationContainer); 382 rect = SVGLayoutSupport::clippedOverflowRectForPaintInvalidation(m_curre ntObject, *m_paintInvalidationContainer);
383 } 383 }
384 384
385 if (m_paintInvalidationContainer->layer()->groupedMapping()) 385 if (m_paintInvalidationContainer->layer()->groupedMapping())
386 PaintLayer::mapRectInPaintInvalidationContainerToBacking(*m_paintInvalid ationContainer, rect); 386 PaintLayer::mapRectInPaintInvalidationContainerToBacking(*m_paintInvalid ationContainer, rect);
387 return rect; 387 return rect;
388 } 388 }
389 389
390 static void slowMapToVisualRectInAncestorSpace(const LayoutObject& object, const LayoutBoxModelObject& ancestor, LayoutRect& rect) 390 static void slowMapToVisualRectInAncestorSpace(const LayoutObject& object, const LayoutBoxModelObject& ancestor, LayoutRect& rect)
391 { 391 {
392 if (object.isBox())
chrishtr 2016/07/09 00:15:57 Why is this necessary?
wkorman 2016/07/09 01:16:08 Don't we need to flip to respect object's writing
chrishtr 2016/07/11 17:35:56 Let's discuss/debug offline. Maybe I'm misundersta
393 toLayoutBox(&object)->flipForWritingMode(rect);
394
392 if (object.isLayoutView()) 395 if (object.isLayoutView())
393 toLayoutView(object).mapToVisualRectInAncestorSpace(&ancestor, rect, Inp utIsInFrameCoordinates, DefaultVisualRectFlags); 396 toLayoutView(object).mapToVisualRectInAncestorSpace(&ancestor, rect, Inp utIsInFrameCoordinates, DefaultVisualRectFlags);
394 else 397 else
395 object.mapToVisualRectInAncestorSpace(&ancestor, rect); 398 object.mapToVisualRectInAncestorSpace(&ancestor, rect);
396 } 399 }
397 400
398 void PaintInvalidationState::mapLocalRectToPaintInvalidationContainer(LayoutRect & rect) const 401 void PaintInvalidationState::mapLocalRectToPaintInvalidationContainer(LayoutRect & rect) const
399 { 402 {
400 ASSERT(!m_didUpdateForChildren); 403 ASSERT(!m_didUpdateForChildren);
401 404
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 WTFLogAlways("Fast path paint invalidation rect differs from slow path: fast : %s vs slow: %s", 490 WTFLogAlways("Fast path paint invalidation rect differs from slow path: fast : %s vs slow: %s",
488 fastPathRect.toString().ascii().data(), slowPathRect.toString().ascii(). data()); 491 fastPathRect.toString().ascii().data(), slowPathRect.toString().ascii(). data());
489 showLayoutTree(&m_currentObject); 492 showLayoutTree(&m_currentObject);
490 493
491 ASSERT_NOT_REACHED(); 494 ASSERT_NOT_REACHED();
492 } 495 }
493 496
494 #endif // CHECK_FAST_PATH_SLOW_PATH_EQUALITY 497 #endif // CHECK_FAST_PATH_SLOW_PATH_EQUALITY
495 498
496 } // namespace blink 499 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698