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

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

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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/dom/Node.h ('k') | Source/core/dom/NodeRareData.h » ('j') | 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) 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 setFlag(HasRareDataFlag); 359 setFlag(HasRareDataFlag);
360 return *rareData(); 360 return *rareData();
361 } 361 }
362 362
363 #if !ENABLE(OILPAN) 363 #if !ENABLE(OILPAN)
364 void Node::clearRareData() 364 void Node::clearRareData()
365 { 365 {
366 ASSERT(hasRareData()); 366 ASSERT(hasRareData());
367 ASSERT(!transientMutationObserverRegistry() || transientMutationObserverRegi stry()->isEmpty()); 367 ASSERT(!transientMutationObserverRegistry() || transientMutationObserverRegi stry()->isEmpty());
368 368
369 RenderObject* renderer = m_data.m_rareData->renderer(); 369 LayoutObject* renderer = m_data.m_rareData->renderer();
370 if (isElementNode()) 370 if (isElementNode())
371 delete static_cast<ElementRareData*>(m_data.m_rareData); 371 delete static_cast<ElementRareData*>(m_data.m_rareData);
372 else 372 else
373 delete static_cast<NodeRareData*>(m_data.m_rareData); 373 delete static_cast<NodeRareData*>(m_data.m_rareData);
374 m_data.m_renderer = renderer; 374 m_data.m_renderer = renderer;
375 clearFlag(HasRareDataFlag); 375 clearFlag(HasRareDataFlag);
376 } 376 }
377 #endif 377 #endif
378 378
379 Node* Node::toNode() 379 Node* Node::toNode()
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 ASSERT(document().existingAXObjectCache()); 591 ASSERT(document().existingAXObjectCache());
592 592
593 if (AXObjectCache* cache = document().existingAXObjectCache()) 593 if (AXObjectCache* cache = document().existingAXObjectCache())
594 return cache->rootAXEditableElement(this); 594 return cache->rootAXEditableElement(this);
595 595
596 return false; 596 return false;
597 } 597 }
598 598
599 RenderBox* Node::renderBox() const 599 RenderBox* Node::renderBox() const
600 { 600 {
601 RenderObject* renderer = this->renderer(); 601 LayoutObject* renderer = this->renderer();
602 return renderer && renderer->isBox() ? toRenderBox(renderer) : nullptr; 602 return renderer && renderer->isBox() ? toRenderBox(renderer) : nullptr;
603 } 603 }
604 604
605 RenderBoxModelObject* Node::renderBoxModelObject() const 605 RenderBoxModelObject* Node::renderBoxModelObject() const
606 { 606 {
607 RenderObject* renderer = this->renderer(); 607 LayoutObject* renderer = this->renderer();
608 return renderer && renderer->isBoxModelObject() ? toRenderBoxModelObject(ren derer) : nullptr; 608 return renderer && renderer->isBoxModelObject() ? toRenderBoxModelObject(ren derer) : nullptr;
609 } 609 }
610 610
611 LayoutRect Node::boundingBox() const 611 LayoutRect Node::boundingBox() const
612 { 612 {
613 if (renderer()) 613 if (renderer())
614 return renderer()->absoluteBoundingBoxRect(); 614 return renderer()->absoluteBoundingBoxRect();
615 return LayoutRect(); 615 return LayoutRect();
616 } 616 }
617 617
(...skipping 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after
2131 if (mouseEvent->button() == MiddleButton) { 2131 if (mouseEvent->button() == MiddleButton) {
2132 if (enclosingLinkEventParentOrSelf()) 2132 if (enclosingLinkEventParentOrSelf())
2133 return; 2133 return;
2134 2134
2135 // Avoid that canBeScrolledAndHasScrollableArea changes render tree 2135 // Avoid that canBeScrolledAndHasScrollableArea changes render tree
2136 // structure. 2136 // structure.
2137 // FIXME: We should avoid synchronous layout if possible. We can 2137 // FIXME: We should avoid synchronous layout if possible. We can
2138 // remove this synchronous layout if we avoid synchronous layout in 2138 // remove this synchronous layout if we avoid synchronous layout in
2139 // RenderTextControlSingleLine::scrollHeight 2139 // RenderTextControlSingleLine::scrollHeight
2140 document().updateLayoutIgnorePendingStylesheets(); 2140 document().updateLayoutIgnorePendingStylesheets();
2141 RenderObject* renderer = this->renderer(); 2141 LayoutObject* renderer = this->renderer();
2142 while (renderer && (!renderer->isBox() || !toRenderBox(renderer)->ca nBeScrolledAndHasScrollableArea())) 2142 while (renderer && (!renderer->isBox() || !toRenderBox(renderer)->ca nBeScrolledAndHasScrollableArea()))
2143 renderer = renderer->parent(); 2143 renderer = renderer->parent();
2144 2144
2145 if (renderer) { 2145 if (renderer) {
2146 if (LocalFrame* frame = document().frame()) 2146 if (LocalFrame* frame = document().frame())
2147 frame->eventHandler().startPanScrolling(renderer); 2147 frame->eventHandler().startPanScrolling(renderer);
2148 } 2148 }
2149 } 2149 }
2150 #endif 2150 #endif
2151 } else if ((eventType == EventTypeNames::wheel || eventType == EventTypeName s::mousewheel) && event->hasInterface(EventNames::WheelEvent)) { 2151 } else if ((eventType == EventTypeNames::wheel || eventType == EventTypeName s::mousewheel) && event->hasInterface(EventNames::WheelEvent)) {
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
2434 node->showTreeForThis(); 2434 node->showTreeForThis();
2435 } 2435 }
2436 2436
2437 void showNodePath(const blink::Node* node) 2437 void showNodePath(const blink::Node* node)
2438 { 2438 {
2439 if (node) 2439 if (node)
2440 node->showNodePathForThis(); 2440 node->showNodePathForThis();
2441 } 2441 }
2442 2442
2443 #endif 2443 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/dom/NodeRareData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698