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

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

Issue 2211283003: Revert of Replace LayoutObject::skipInvalidationWhenLaidOutChildren() with painted... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 /* 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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 HashSet<LayoutBlock*> processedBlocks; 564 HashSet<LayoutBlock*> processedBlocks;
565 565
566 LayoutObject* end = layoutObjectAfterPosition(m_selectionEnd, m_selectionEnd Pos); 566 LayoutObject* end = layoutObjectAfterPosition(m_selectionEnd, m_selectionEnd Pos);
567 for (LayoutObject* o = m_selectionStart; o && o != end; o = o->nextInPreOrde r()) { 567 for (LayoutObject* o = m_selectionStart; o && o != end; o = o->nextInPreOrde r()) {
568 if (!o->canBeSelectionLeaf() && o != m_selectionStart && o != m_selectio nEnd) 568 if (!o->canBeSelectionLeaf() && o != m_selectionStart && o != m_selectio nEnd)
569 continue; 569 continue;
570 if (o->getSelectionState() == SelectionNone) 570 if (o->getSelectionState() == SelectionNone)
571 continue; 571 continue;
572 572
573 o->setShouldInvalidateSelection(); 573 o->setShouldInvalidateSelection();
574
575 // Blocks are responsible for painting line gaps and margin gaps. They m ust be examined as well.
576 for (LayoutBlock* block = o->containingBlock(); block && !block->isLayou tView(); block = block->containingBlock()) {
577 if (!processedBlocks.add(block).isNewEntry)
578 break;
579 block->setShouldInvalidateSelection();
580 }
574 } 581 }
575 } 582 }
576 583
577 // When exploring the LayoutTree looking for the nodes involved in the Selection , sometimes it's 584 // When exploring the LayoutTree looking for the nodes involved in the Selection , sometimes it's
578 // required to change the traversing direction because the "start" position is b elow the "end" one. 585 // required to change the traversing direction because the "start" position is b elow the "end" one.
579 static inline LayoutObject* getNextOrPrevLayoutObjectBasedOnDirection(const Layo utObject* o, const LayoutObject* stop, bool& continueExploring, bool& exploringB ackwards) 586 static inline LayoutObject* getNextOrPrevLayoutObjectBasedOnDirection(const Layo utObject* o, const LayoutObject* stop, bool& continueExploring, bool& exploringB ackwards)
580 { 587 {
581 LayoutObject* next; 588 LayoutObject* next;
582 if (exploringBackwards) { 589 if (exploringBackwards) {
583 next = o->previousInPreOrder(); 590 next = o->previousInPreOrder();
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 // of this override. All frame scrolling should be handled by 992 // of this override. All frame scrolling should be handled by
986 // ViewportScrollCallback. 993 // ViewportScrollCallback.
987 994
988 if (!frameView()) 995 if (!frameView())
989 return ScrollResult(false, false, delta.width(), delta.height()); 996 return ScrollResult(false, false, delta.width(), delta.height());
990 997
991 return frameView()->getScrollableArea()->userScroll(granularity, delta); 998 return frameView()->getScrollableArea()->userScroll(granularity, delta);
992 } 999 }
993 1000
994 } // namespace blink 1001 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698