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

Side by Side Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 1896793002: Rename (updateLayout/updateStyle).*.() to updateStyleAndLayout.*.() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 528
529 if (node->getNodeType() == TEXT_NODE) 529 if (node->getNodeType() == TEXT_NODE)
530 node = toText(node)->mergeNextSiblingNodesIfPossible(); 530 node = toText(node)->mergeNextSiblingNodesIfPossible();
531 else 531 else
532 node = NodeTraversal::nextPostOrder(*node); 532 node = NodeTraversal::nextPostOrder(*node);
533 } 533 }
534 } 534 }
535 535
536 bool Node::isContentEditable(UserSelectAllTreatment treatment) const 536 bool Node::isContentEditable(UserSelectAllTreatment treatment) const
537 { 537 {
538 document().updateLayoutTree(); 538 document().updateStyleAndLayoutTree();
539 return hasEditableStyle(Editable, treatment); 539 return hasEditableStyle(Editable, treatment);
540 } 540 }
541 541
542 bool Node::isContentRichlyEditable() const 542 bool Node::isContentRichlyEditable() const
543 { 543 {
544 document().updateLayoutTree(); 544 document().updateStyleAndLayoutTree();
545 return hasEditableStyle(RichlyEditable, UserSelectAllIsAlwaysNonEditable); 545 return hasEditableStyle(RichlyEditable, UserSelectAllIsAlwaysNonEditable);
546 } 546 }
547 547
548 bool Node::hasEditableStyle(EditableLevel editableLevel, UserSelectAllTreatment treatment) const 548 bool Node::hasEditableStyle(EditableLevel editableLevel, UserSelectAllTreatment treatment) const
549 { 549 {
550 if (isPseudoElement()) 550 if (isPseudoElement())
551 return false; 551 return false;
552 552
553 // Ideally we'd call DCHECK(!needsStyleRecalc()) here, but 553 // Ideally we'd call DCHECK(!needsStyleRecalc()) here, but
554 // ContainerNode::setFocus() calls setNeedsStyleRecalc(), so the assertion 554 // ContainerNode::setFocus() calls setNeedsStyleRecalc(), so the assertion
(...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
2152 MouseEvent* mouseEvent = toMouseEvent(event); 2152 MouseEvent* mouseEvent = toMouseEvent(event);
2153 if (mouseEvent->button() == MiddleButton) { 2153 if (mouseEvent->button() == MiddleButton) {
2154 if (enclosingLinkEventParentOrSelf()) 2154 if (enclosingLinkEventParentOrSelf())
2155 return; 2155 return;
2156 2156
2157 // Avoid that canBeScrolledAndHasScrollableArea changes layout tree 2157 // Avoid that canBeScrolledAndHasScrollableArea changes layout tree
2158 // structure. 2158 // structure.
2159 // FIXME: We should avoid synchronous layout if possible. We can 2159 // FIXME: We should avoid synchronous layout if possible. We can
2160 // remove this synchronous layout if we avoid synchronous layout in 2160 // remove this synchronous layout if we avoid synchronous layout in
2161 // LayoutTextControlSingleLine::scrollHeight 2161 // LayoutTextControlSingleLine::scrollHeight
2162 document().updateLayoutIgnorePendingStylesheets(); 2162 document().updateStyleAndLayoutIgnorePendingStylesheets();
2163 LayoutObject* layoutObject = this->layoutObject(); 2163 LayoutObject* layoutObject = this->layoutObject();
2164 while (layoutObject && (!layoutObject->isBox() || !toLayoutBox(layou tObject)->canBeScrolledAndHasScrollableArea())) 2164 while (layoutObject && (!layoutObject->isBox() || !toLayoutBox(layou tObject)->canBeScrolledAndHasScrollableArea()))
2165 layoutObject = layoutObject->parent(); 2165 layoutObject = layoutObject->parent();
2166 2166
2167 if (layoutObject) { 2167 if (layoutObject) {
2168 if (LocalFrame* frame = document().frame()) 2168 if (LocalFrame* frame = document().frame())
2169 frame->eventHandler().startPanScrolling(layoutObject); 2169 frame->eventHandler().startPanScrolling(layoutObject);
2170 } 2170 }
2171 } 2171 }
2172 #endif 2172 #endif
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
2424 2424
2425 void showNodePath(const blink::Node* node) 2425 void showNodePath(const blink::Node* node)
2426 { 2426 {
2427 if (node) 2427 if (node)
2428 node->showNodePathForThis(); 2428 node->showNodePathForThis();
2429 else 2429 else
2430 fprintf(stderr, "Cannot showNodePath for (nil)\n"); 2430 fprintf(stderr, "Cannot showNodePath for (nil)\n");
2431 } 2431 }
2432 2432
2433 #endif 2433 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Fullscreen.cpp ('k') | third_party/WebKit/Source/core/dom/Range.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698