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

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

Issue 1459553002: Use invalidation sets for :-webkit-drag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « third_party/WebKit/Source/core/css/RuleFeature.cpp ('k') | no next file » | 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 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 2667 matching lines...) Expand 10 before | Expand all | Expand 10 after
2678 { 2678 {
2679 return createPositionWithAffinity(caretMinOffset()); 2679 return createPositionWithAffinity(caretMinOffset());
2680 } 2680 }
2681 2681
2682 void LayoutObject::updateDragState(bool dragOn) 2682 void LayoutObject::updateDragState(bool dragOn)
2683 { 2683 {
2684 bool valueChanged = (dragOn != isDragging()); 2684 bool valueChanged = (dragOn != isDragging());
2685 setIsDragging(dragOn); 2685 setIsDragging(dragOn);
2686 if (valueChanged && node()) { 2686 if (valueChanged && node()) {
2687 if (node()->isElementNode() && toElement(node())->childrenOrSiblingsAffe ctedByDrag()) 2687 if (node()->isElementNode() && toElement(node())->childrenOrSiblingsAffe ctedByDrag())
2688 node()->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonFor Tracing::create(StyleChangeReason::Drag)); 2688 document().styleEngine().pseudoStateChangedForElement(CSSSelector::P seudoDrag, *toElement(node()));
2689 else if (style()->affectedByDrag()) 2689 else if (style()->affectedByDrag())
2690 node()->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTr acing::create(StyleChangeReason::Drag)); 2690 node()->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTr acing::create(StyleChangeReason::Drag));
2691 } 2691 }
2692 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextSibling() ) 2692 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextSibling() )
2693 curr->updateDragState(dragOn); 2693 curr->updateDragState(dragOn);
2694 } 2694 }
2695 2695
2696 CompositingState LayoutObject::compositingState() const 2696 CompositingState LayoutObject::compositingState() const
2697 { 2697 {
2698 return hasLayer() ? toLayoutBoxModelObject(this)->layer()->compositingState( ) : NotComposited; 2698 return hasLayer() ? toLayoutBoxModelObject(this)->layer()->compositingState( ) : NotComposited;
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
3518 const blink::LayoutObject* root = object1; 3518 const blink::LayoutObject* root = object1;
3519 while (root->parent()) 3519 while (root->parent())
3520 root = root->parent(); 3520 root = root->parent();
3521 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3521 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3522 } else { 3522 } else {
3523 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3523 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3524 } 3524 }
3525 } 3525 }
3526 3526
3527 #endif 3527 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/RuleFeature.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698