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

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

Issue 140053005: Use LocalStyleChange for updating :-webkit-drag. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed review issue. Created 6 years, 10 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/css/DragUpdateTest.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 2751 matching lines...) Expand 10 before | Expand all | Expand 10 after
2762 2762
2763 PositionWithAffinity RenderObject::positionForPoint(const LayoutPoint&) 2763 PositionWithAffinity RenderObject::positionForPoint(const LayoutPoint&)
2764 { 2764 {
2765 return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM); 2765 return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM);
2766 } 2766 }
2767 2767
2768 void RenderObject::updateDragState(bool dragOn) 2768 void RenderObject::updateDragState(bool dragOn)
2769 { 2769 {
2770 bool valueChanged = (dragOn != isDragging()); 2770 bool valueChanged = (dragOn != isDragging());
2771 setIsDragging(dragOn); 2771 setIsDragging(dragOn);
2772 if (valueChanged && node() && (style()->affectedByDrag() || (node()->isEleme ntNode() && toElement(node())->childrenAffectedByDrag()))) 2772 if (valueChanged && node()) {
2773 node()->setNeedsStyleRecalc(SubtreeStyleChange); 2773 if (node()->isElementNode() && toElement(node())->childrenAffectedByDrag ())
2774 node()->setNeedsStyleRecalc(SubtreeStyleChange);
2775 else if (style()->affectedByDrag())
2776 node()->setNeedsStyleRecalc(LocalStyleChange);
2777 }
2774 for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) 2778 for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling())
2775 curr->updateDragState(dragOn); 2779 curr->updateDragState(dragOn);
2776 } 2780 }
2777 2781
2778 CompositingState RenderObject::compositingState() const 2782 CompositingState RenderObject::compositingState() const
2779 { 2783 {
2780 return hasLayer() ? toRenderLayerModelObject(this)->layer()->compositingStat e() : NotComposited; 2784 return hasLayer() ? toRenderLayerModelObject(this)->layer()->compositingStat e() : NotComposited;
2781 } 2785 }
2782 2786
2783 bool RenderObject::acceleratedCompositingForOverflowScrollEnabled() const 2787 bool RenderObject::acceleratedCompositingForOverflowScrollEnabled() const
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
3386 { 3390 {
3387 if (object1) { 3391 if (object1) {
3388 const WebCore::RenderObject* root = object1; 3392 const WebCore::RenderObject* root = object1;
3389 while (root->parent()) 3393 while (root->parent())
3390 root = root->parent(); 3394 root = root->parent();
3391 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3395 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3392 } 3396 }
3393 } 3397 }
3394 3398
3395 #endif 3399 #endif
OLDNEW
« no previous file with comments | « Source/core/css/DragUpdateTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698