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

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

Issue 2431473003: Intersection Observer support for OOPIF (Closed)
Patch Set: Fixed test issue Created 4 years, 1 month 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 /* 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. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 451
452 bool LayoutView::mapToVisualRectInAncestorSpace( 452 bool LayoutView::mapToVisualRectInAncestorSpace(
453 const LayoutBoxModelObject* ancestor, 453 const LayoutBoxModelObject* ancestor,
454 LayoutRect& rect, 454 LayoutRect& rect,
455 MapCoordinatesFlags mode, 455 MapCoordinatesFlags mode,
456 VisualRectFlags visualRectFlags) const { 456 VisualRectFlags visualRectFlags) const {
457 if (mode & IsFixed) 457 if (mode & IsFixed)
458 rect.move(offsetForFixedPosition(true)); 458 rect.move(offsetForFixedPosition(true));
459 459
460 // Apply our transform if we have one (because of full page zooming). 460 // Apply our transform if we have one (because of full page zooming).
461 if (!ancestor && layer() && layer()->transform()) 461 if (layer() && layer()->transform())
462 rect = layer()->transform()->mapRect(rect); 462 rect = layer()->transform()->mapRect(rect);
463 463
464 ASSERT(ancestor);
465 if (ancestor == this) 464 if (ancestor == this)
466 return true; 465 return true;
467 466
468 Element* owner = document().localOwner(); 467 Element* owner = document().localOwner();
469 if (!owner) 468 if (!owner) {
469 // This is the case of a Frame with a remote parent.
470 if (!document().frame()->isMainFrame()) {
471 DCHECK(!ancestor);
472 LayoutRect viewportIntersectionRect(
473 frameView()->remoteViewportIntersection());
474 rect.intersect(viewportIntersectionRect);
475 if (rect.isEmpty())
476 return false;
477 }
470 return true; 478 return true;
479 }
471 480
472 if (LayoutBox* obj = owner->layoutBox()) { 481 if (LayoutBox* obj = owner->layoutBox()) {
473 if (!(mode & InputIsInFrameCoordinates)) { 482 if (!(mode & InputIsInFrameCoordinates)) {
474 // Intersect the viewport with the visual rect. 483 // Intersect the viewport with the visual rect.
475 LayoutRect viewRectangle = viewRect(); 484 LayoutRect viewRectangle = viewRect();
476 if (visualRectFlags & EdgeInclusive) { 485 if (visualRectFlags & EdgeInclusive) {
477 if (!rect.inclusiveIntersect(viewRectangle)) 486 if (!rect.inclusiveIntersect(viewRectangle))
478 return false; 487 return false;
479 } else { 488 } else {
480 rect.intersect(viewRectangle); 489 rect.intersect(viewRectangle);
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 if (block) 1047 if (block)
1039 block->adjustChildDebugRect(rect); 1048 block->adjustChildDebugRect(rect);
1040 1049
1041 rect.setWidth(LayoutUnit(viewWidth(IncludeScrollbars))); 1050 rect.setWidth(LayoutUnit(viewWidth(IncludeScrollbars)));
1042 rect.setHeight(LayoutUnit(viewHeight(IncludeScrollbars))); 1051 rect.setHeight(LayoutUnit(viewHeight(IncludeScrollbars)));
1043 1052
1044 return rect; 1053 return rect;
1045 } 1054 }
1046 1055
1047 } // namespace blink 1056 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698