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

Side by Side Diff: Source/core/rendering/RenderReplaced.cpp

Issue 301843002: Store repaint rects in the coordinate space of their backing GraphicsLayer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Changed name. Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderObject.cpp ('k') | Source/core/rendering/RenderTableCell.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) 3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 540
541 LayoutRect RenderReplaced::selectionRectForRepaint(const RenderLayerModelObject* repaintContainer, bool clipToVisibleContent) 541 LayoutRect RenderReplaced::selectionRectForRepaint(const RenderLayerModelObject* repaintContainer, bool clipToVisibleContent)
542 { 542 {
543 ASSERT(!needsLayout()); 543 ASSERT(!needsLayout());
544 544
545 if (!isSelected()) 545 if (!isSelected())
546 return LayoutRect(); 546 return LayoutRect();
547 547
548 LayoutRect rect = localSelectionRect(); 548 LayoutRect rect = localSelectionRect();
549 if (clipToVisibleContent) 549 if (clipToVisibleContent)
550 computeRectForRepaint(repaintContainer, rect); 550 mapRectToRepaintBacking(repaintContainer, rect);
551 else 551 else
552 rect = localToContainerQuad(FloatRect(rect), repaintContainer).enclosing BoundingBox(); 552 rect = localToContainerQuad(FloatRect(rect), repaintContainer).enclosing BoundingBox();
553 553
554 return rect; 554 return rect;
555 } 555 }
556 556
557 LayoutRect RenderReplaced::localSelectionRect(bool checkWhetherSelected) const 557 LayoutRect RenderReplaced::localSelectionRect(bool checkWhetherSelected) const
558 { 558 {
559 if (checkWhetherSelected && !isSelected()) 559 if (checkWhetherSelected && !isSelected())
560 return LayoutRect(); 560 return LayoutRect();
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 // for repainting to avoid selection painting glitches. 618 // for repainting to avoid selection painting glitches.
619 LayoutRect r = isSelected() ? localSelectionRect() : visualOverflowRect(); 619 LayoutRect r = isSelected() ? localSelectionRect() : visualOverflowRect();
620 620
621 RenderView* v = view(); 621 RenderView* v = view();
622 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && v) { 622 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && v) {
623 // FIXME: layoutDelta needs to be applied in parts before/after transfor ms and 623 // FIXME: layoutDelta needs to be applied in parts before/after transfor ms and
624 // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308 624 // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308
625 r.move(v->layoutDelta()); 625 r.move(v->layoutDelta());
626 } 626 }
627 627
628 computeRectForRepaint(repaintContainer, r); 628 mapRectToRepaintBacking(repaintContainer, r);
629 return r; 629 return r;
630 } 630 }
631 631
632 } 632 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderObject.cpp ('k') | Source/core/rendering/RenderTableCell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698