OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 { | 455 { |
456 setShouldDoFullPaintInvalidation(); | 456 setShouldDoFullPaintInvalidation(); |
457 | 457 |
458 // The only way we know how to hit these ASSERTS below this point is via the
Chromium OS login screen. | 458 // The only way we know how to hit these ASSERTS below this point is via the
Chromium OS login screen. |
459 DisableCompositingQueryAsserts disabler; | 459 DisableCompositingQueryAsserts disabler; |
460 | 460 |
461 if (compositor()->inCompositingMode()) | 461 if (compositor()->inCompositingMode()) |
462 compositor()->fullyInvalidatePaint(); | 462 compositor()->fullyInvalidatePaint(); |
463 } | 463 } |
464 | 464 |
465 void LayoutView::mapRectToPaintInvalidationBacking(const LayoutBoxModelObject* p
aintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* inval
idationState) const | 465 void LayoutView::mapToVisibleRectInContainerSpace(const LayoutBoxModelObject* pa
intInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* invali
dationState) const |
466 { | 466 { |
467 mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, IsNotFix
edPosition, invalidationState); | 467 mapToVisibleRectInContainerSpace(paintInvalidationContainer, rect, IsNotFixe
dPosition, invalidationState); |
468 } | 468 } |
469 | 469 |
470 void LayoutView::mapRectToPaintInvalidationBacking(const LayoutBoxModelObject* p
aintInvalidationContainer, LayoutRect& rect, ViewportConstrainedPosition viewpor
tConstraint, const PaintInvalidationState* state) const | 470 void LayoutView::mapToVisibleRectInContainerSpace(const LayoutBoxModelObject* pa
intInvalidationContainer, LayoutRect& rect, ViewportConstrainedPosition viewport
Constraint, const PaintInvalidationState* state) const |
471 { | 471 { |
472 if (document().printing()) | 472 if (document().printing()) |
473 return; | 473 return; |
474 | 474 |
475 if (style()->isFlippedBlocksWritingMode()) { | 475 if (style()->isFlippedBlocksWritingMode()) { |
476 // We have to flip by hand since the view's logical height has not been
determined. We | 476 // We have to flip by hand since the view's logical height has not been
determined. We |
477 // can use the viewport width and height. | 477 // can use the viewport width and height. |
478 if (style()->isHorizontalWritingMode()) | 478 if (style()->isHorizontalWritingMode()) |
479 rect.setY(viewHeight() - rect.maxY()); | 479 rect.setY(viewHeight() - rect.maxY()); |
480 else | 480 else |
(...skipping 19 matching lines...) Expand all Loading... |
500 // Intersect the viewport with the paint invalidation rect. | 500 // Intersect the viewport with the paint invalidation rect. |
501 LayoutRect viewRectangle = viewRect(); | 501 LayoutRect viewRectangle = viewRect(); |
502 rect.intersect(viewRectangle); | 502 rect.intersect(viewRectangle); |
503 | 503 |
504 // Adjust for scroll offset of the view. | 504 // Adjust for scroll offset of the view. |
505 rect.moveBy(-viewRectangle.location()); | 505 rect.moveBy(-viewRectangle.location()); |
506 } | 506 } |
507 | 507 |
508 // Adjust for frame border. | 508 // Adjust for frame border. |
509 rect.move(obj->contentBoxOffset()); | 509 rect.move(obj->contentBoxOffset()); |
510 obj->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect,
0); | 510 obj->mapToVisibleRectInContainerSpace(paintInvalidationContainer, rect,
0); |
511 } | 511 } |
512 } | 512 } |
513 | 513 |
514 void LayoutView::adjustViewportConstrainedOffset(LayoutRect& rect, ViewportConst
rainedPosition viewportConstraint) const | 514 void LayoutView::adjustViewportConstrainedOffset(LayoutRect& rect, ViewportConst
rainedPosition viewportConstraint) const |
515 { | 515 { |
516 if (viewportConstraint != IsFixedPosition) | 516 if (viewportConstraint != IsFixedPosition) |
517 return; | 517 return; |
518 | 518 |
519 if (m_frameView) { | 519 if (m_frameView) { |
520 rect.move(toIntSize(m_frameView->scrollPosition())); | 520 rect.move(toIntSize(m_frameView->scrollPosition())); |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1006 } | 1006 } |
1007 | 1007 |
1008 void LayoutView::sendMediaPositionChangeNotifications(const IntRect& visibleRect
) | 1008 void LayoutView::sendMediaPositionChangeNotifications(const IntRect& visibleRect
) |
1009 { | 1009 { |
1010 for (auto& media : m_mediaForPositionNotification) { | 1010 for (auto& media : m_mediaForPositionNotification) { |
1011 media->notifyPositionMayHaveChanged(visibleRect); | 1011 media->notifyPositionMayHaveChanged(visibleRect); |
1012 } | 1012 } |
1013 } | 1013 } |
1014 | 1014 |
1015 } // namespace blink | 1015 } // namespace blink |
OLD | NEW |