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

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

Issue 547823002: Track reasons for |Node::SetNeedsStyleRecalc| (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: reasons as tuple Created 6 years, 3 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 * (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 2514 matching lines...) Expand 10 before | Expand all | Expand 10 after
2525 { 2525 {
2526 return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM); 2526 return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM);
2527 } 2527 }
2528 2528
2529 void RenderObject::updateDragState(bool dragOn) 2529 void RenderObject::updateDragState(bool dragOn)
2530 { 2530 {
2531 bool valueChanged = (dragOn != isDragging()); 2531 bool valueChanged = (dragOn != isDragging());
2532 setIsDragging(dragOn); 2532 setIsDragging(dragOn);
2533 if (valueChanged && node()) { 2533 if (valueChanged && node()) {
2534 if (node()->isElementNode() && toElement(node())->childrenOrSiblingsAffe ctedByDrag()) 2534 if (node()->isElementNode() && toElement(node())->childrenOrSiblingsAffe ctedByDrag())
2535 node()->setNeedsStyleRecalc(SubtreeStyleChange); 2535 node()->setNeedsStyleRecalc(StyleChangeReasonForTracing::create(Styl eChangeReason::Drag), SubtreeStyleChange);
2536 else if (style()->affectedByDrag()) 2536 else if (style()->affectedByDrag())
2537 node()->setNeedsStyleRecalc(LocalStyleChange); 2537 node()->setNeedsStyleRecalc(StyleChangeReasonForTracing::create(Styl eChangeReason::Drag), LocalStyleChange);
2538 } 2538 }
2539 for (RenderObject* curr = slowFirstChild(); curr; curr = curr->nextSibling() ) 2539 for (RenderObject* curr = slowFirstChild(); curr; curr = curr->nextSibling() )
2540 curr->updateDragState(dragOn); 2540 curr->updateDragState(dragOn);
2541 } 2541 }
2542 2542
2543 CompositingState RenderObject::compositingState() const 2543 CompositingState RenderObject::compositingState() const
2544 { 2544 {
2545 return hasLayer() ? toRenderLayerModelObject(this)->layer()->compositingStat e() : NotComposited; 2545 return hasLayer() ? toRenderLayerModelObject(this)->layer()->compositingStat e() : NotComposited;
2546 } 2546 }
2547 2547
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
3165 { 3165 {
3166 if (object1) { 3166 if (object1) {
3167 const blink::RenderObject* root = object1; 3167 const blink::RenderObject* root = object1;
3168 while (root->parent()) 3168 while (root->parent())
3169 root = root->parent(); 3169 root = root->parent();
3170 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3170 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3171 } 3171 }
3172 } 3172 }
3173 3173
3174 #endif 3174 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698