OLD | NEW |
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 Loading... |
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 // TODO(wkorman): The flip below is required because visual rects are |
| 393 // currently in "physical coordinates with flipped block-flow direction" |
| 394 // (see LayoutBoxModelObject.h) but we need them to be in physical |
| 395 // coordinates. |
| 396 if (object.isBox()) |
| 397 toLayoutBox(&object)->flipForWritingMode(rect); |
| 398 |
392 if (object.isLayoutView()) | 399 if (object.isLayoutView()) |
393 toLayoutView(object).mapToVisualRectInAncestorSpace(&ancestor, rect, Inp
utIsInFrameCoordinates, DefaultVisualRectFlags); | 400 toLayoutView(object).mapToVisualRectInAncestorSpace(&ancestor, rect, Inp
utIsInFrameCoordinates, DefaultVisualRectFlags); |
394 else | 401 else |
395 object.mapToVisualRectInAncestorSpace(&ancestor, rect); | 402 object.mapToVisualRectInAncestorSpace(&ancestor, rect); |
396 } | 403 } |
397 | 404 |
398 void PaintInvalidationState::mapLocalRectToPaintInvalidationContainer(LayoutRect
& rect) const | 405 void PaintInvalidationState::mapLocalRectToPaintInvalidationContainer(LayoutRect
& rect) const |
399 { | 406 { |
400 ASSERT(!m_didUpdateForChildren); | 407 ASSERT(!m_didUpdateForChildren); |
401 | 408 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 WTFLogAlways("Fast path paint invalidation rect differs from slow path: fast
: %s vs slow: %s", | 494 WTFLogAlways("Fast path paint invalidation rect differs from slow path: fast
: %s vs slow: %s", |
488 fastPathRect.toString().ascii().data(), slowPathRect.toString().ascii().
data()); | 495 fastPathRect.toString().ascii().data(), slowPathRect.toString().ascii().
data()); |
489 showLayoutTree(&m_currentObject); | 496 showLayoutTree(&m_currentObject); |
490 | 497 |
491 ASSERT_NOT_REACHED(); | 498 ASSERT_NOT_REACHED(); |
492 } | 499 } |
493 | 500 |
494 #endif // CHECK_FAST_PATH_SLOW_PATH_EQUALITY | 501 #endif // CHECK_FAST_PATH_SLOW_PATH_EQUALITY |
495 | 502 |
496 } // namespace blink | 503 } // namespace blink |
OLD | NEW |