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

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

Issue 926193003: Move rendering/RenderBox to layout/LayoutBox. (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/Position.cpp » ('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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 #include "core/events/UIEvent.h" 75 #include "core/events/UIEvent.h"
76 #include "core/events/WheelEvent.h" 76 #include "core/events/WheelEvent.h"
77 #include "core/frame/EventHandlerRegistry.h" 77 #include "core/frame/EventHandlerRegistry.h"
78 #include "core/frame/LocalDOMWindow.h" 78 #include "core/frame/LocalDOMWindow.h"
79 #include "core/frame/LocalFrame.h" 79 #include "core/frame/LocalFrame.h"
80 #include "core/frame/Settings.h" 80 #include "core/frame/Settings.h"
81 #include "core/html/HTMLAnchorElement.h" 81 #include "core/html/HTMLAnchorElement.h"
82 #include "core/html/HTMLDialogElement.h" 82 #include "core/html/HTMLDialogElement.h"
83 #include "core/html/HTMLFrameOwnerElement.h" 83 #include "core/html/HTMLFrameOwnerElement.h"
84 #include "core/html/HTMLStyleElement.h" 84 #include "core/html/HTMLStyleElement.h"
85 #include "core/layout/LayoutBox.h"
85 #include "core/page/ContextMenuController.h" 86 #include "core/page/ContextMenuController.h"
86 #include "core/page/EventHandler.h" 87 #include "core/page/EventHandler.h"
87 #include "core/page/Page.h" 88 #include "core/page/Page.h"
88 #include "core/rendering/RenderBox.h"
89 #include "core/svg/graphics/SVGImage.h" 89 #include "core/svg/graphics/SVGImage.h"
90 #include "platform/EventDispatchForbiddenScope.h" 90 #include "platform/EventDispatchForbiddenScope.h"
91 #include "platform/Partitions.h" 91 #include "platform/Partitions.h"
92 #include "platform/TraceEvent.h" 92 #include "platform/TraceEvent.h"
93 #include "platform/TracedValue.h" 93 #include "platform/TracedValue.h"
94 #include "wtf/HashSet.h" 94 #include "wtf/HashSet.h"
95 #include "wtf/PassOwnPtr.h" 95 #include "wtf/PassOwnPtr.h"
96 #include "wtf/RefCountedLeakCounter.h" 96 #include "wtf/RefCountedLeakCounter.h"
97 #include "wtf/Vector.h" 97 #include "wtf/Vector.h"
98 #include "wtf/text/CString.h" 98 #include "wtf/text/CString.h"
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 589
590 ASSERT(document().settings() && document().settings()->accessibilityEnabled( )); 590 ASSERT(document().settings() && document().settings()->accessibilityEnabled( ));
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 LayoutBox* Node::layoutBox() const
600 { 600 {
601 LayoutObject* renderer = this->renderer(); 601 LayoutObject* renderer = this->renderer();
602 return renderer && renderer->isBox() ? toRenderBox(renderer) : nullptr; 602 return renderer && renderer->isBox() ? toLayoutBox(renderer) : nullptr;
603 } 603 }
604 604
605 LayoutBoxModelObject* Node::layoutBoxModelObject() const 605 LayoutBoxModelObject* Node::layoutBoxModelObject() const
606 { 606 {
607 LayoutObject* renderer = this->renderer(); 607 LayoutObject* renderer = this->renderer();
608 return renderer && renderer->isBoxModelObject() ? toLayoutBoxModelObject(ren derer) : nullptr; 608 return renderer && renderer->isBoxModelObject() ? toLayoutBoxModelObject(ren derer) : nullptr;
609 } 609 }
610 610
611 LayoutRect Node::boundingBox() const 611 LayoutRect Node::boundingBox() const
612 { 612 {
(...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after
2136 if (enclosingLinkEventParentOrSelf()) 2136 if (enclosingLinkEventParentOrSelf())
2137 return; 2137 return;
2138 2138
2139 // Avoid that canBeScrolledAndHasScrollableArea changes render tree 2139 // Avoid that canBeScrolledAndHasScrollableArea changes render tree
2140 // structure. 2140 // structure.
2141 // FIXME: We should avoid synchronous layout if possible. We can 2141 // FIXME: We should avoid synchronous layout if possible. We can
2142 // remove this synchronous layout if we avoid synchronous layout in 2142 // remove this synchronous layout if we avoid synchronous layout in
2143 // LayoutTextControlSingleLine::scrollHeight 2143 // LayoutTextControlSingleLine::scrollHeight
2144 document().updateLayoutIgnorePendingStylesheets(); 2144 document().updateLayoutIgnorePendingStylesheets();
2145 LayoutObject* renderer = this->renderer(); 2145 LayoutObject* renderer = this->renderer();
2146 while (renderer && (!renderer->isBox() || !toRenderBox(renderer)->ca nBeScrolledAndHasScrollableArea())) 2146 while (renderer && (!renderer->isBox() || !toLayoutBox(renderer)->ca nBeScrolledAndHasScrollableArea()))
2147 renderer = renderer->parent(); 2147 renderer = renderer->parent();
2148 2148
2149 if (renderer) { 2149 if (renderer) {
2150 if (LocalFrame* frame = document().frame()) 2150 if (LocalFrame* frame = document().frame())
2151 frame->eventHandler().startPanScrolling(renderer); 2151 frame->eventHandler().startPanScrolling(renderer);
2152 } 2152 }
2153 } 2153 }
2154 #endif 2154 #endif
2155 } else if ((eventType == EventTypeNames::wheel || eventType == EventTypeName s::mousewheel) && event->hasInterface(EventNames::WheelEvent)) { 2155 } else if ((eventType == EventTypeNames::wheel || eventType == EventTypeName s::mousewheel) && event->hasInterface(EventNames::WheelEvent)) {
2156 WheelEvent* wheelEvent = toWheelEvent(event); 2156 WheelEvent* wheelEvent = toWheelEvent(event);
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
2438 node->showTreeForThis(); 2438 node->showTreeForThis();
2439 } 2439 }
2440 2440
2441 void showNodePath(const blink::Node* node) 2441 void showNodePath(const blink::Node* node)
2442 { 2442 {
2443 if (node) 2443 if (node)
2444 node->showNodePathForThis(); 2444 node->showNodePathForThis();
2445 } 2445 }
2446 2446
2447 #endif 2447 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/dom/Position.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698