OLD | NEW |
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 17 matching lines...) Expand all Loading... |
28 #include "core/rendering/RenderObject.h" | 28 #include "core/rendering/RenderObject.h" |
29 | 29 |
30 #include "HTMLNames.h" | 30 #include "HTMLNames.h" |
31 #include "core/accessibility/AXObjectCache.h" | 31 #include "core/accessibility/AXObjectCache.h" |
32 #include "core/css/resolver/StyleResolver.h" | 32 #include "core/css/resolver/StyleResolver.h" |
33 #include "core/editing/EditingBoundary.h" | 33 #include "core/editing/EditingBoundary.h" |
34 #include "core/editing/FrameSelection.h" | 34 #include "core/editing/FrameSelection.h" |
35 #include "core/editing/htmlediting.h" | 35 #include "core/editing/htmlediting.h" |
36 #include "core/html/HTMLAnchorElement.h" | 36 #include "core/html/HTMLAnchorElement.h" |
37 #include "core/html/HTMLElement.h" | 37 #include "core/html/HTMLElement.h" |
| 38 #include "core/html/HTMLHtmlElement.h" |
38 #include "core/html/HTMLTableElement.h" | 39 #include "core/html/HTMLTableElement.h" |
39 #include "core/page/EventHandler.h" | 40 #include "core/page/EventHandler.h" |
40 #include "core/page/Frame.h" | 41 #include "core/page/Frame.h" |
41 #include "core/page/FrameView.h" | 42 #include "core/page/FrameView.h" |
42 #include "core/page/Page.h" | 43 #include "core/page/Page.h" |
43 #include "core/page/Settings.h" | 44 #include "core/page/Settings.h" |
44 #include "core/page/animation/AnimationController.h" | 45 #include "core/page/animation/AnimationController.h" |
45 #include "core/platform/graphics/FloatQuad.h" | 46 #include "core/platform/graphics/FloatQuad.h" |
46 #include "core/platform/graphics/GraphicsContext.h" | 47 #include "core/platform/graphics/GraphicsContext.h" |
47 #include "core/platform/graphics/transforms/TransformState.h" | 48 #include "core/platform/graphics/transforms/TransformState.h" |
(...skipping 2232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2280 | 2281 |
2281 if (view) | 2282 if (view) |
2282 *view = const_cast<RenderView*>(toRenderView(o)); | 2283 *view = const_cast<RenderView*>(toRenderView(o)); |
2283 | 2284 |
2284 return true; | 2285 return true; |
2285 } | 2286 } |
2286 | 2287 |
2287 RenderObject* RenderObject::rendererForRootBackground() | 2288 RenderObject* RenderObject::rendererForRootBackground() |
2288 { | 2289 { |
2289 ASSERT(isRoot()); | 2290 ASSERT(isRoot()); |
2290 if (!hasBackground() && node() && node()->hasTagName(HTMLNames::htmlTag)) { | 2291 if (!hasBackground() && node() && isHTMLHtmlElement(node())) { |
2291 // Locate the <body> element using the DOM. This is easier than trying | 2292 // Locate the <body> element using the DOM. This is easier than trying |
2292 // to crawl around a render tree with potential :before/:after content a
nd | 2293 // to crawl around a render tree with potential :before/:after content a
nd |
2293 // anonymous blocks created by inline <body> tags etc. We can locate the
<body> | 2294 // anonymous blocks created by inline <body> tags etc. We can locate the
<body> |
2294 // render object very easily via the DOM. | 2295 // render object very easily via the DOM. |
2295 HTMLElement* body = document()->body(); | 2296 HTMLElement* body = document()->body(); |
2296 RenderObject* bodyObject = (body && body->hasLocalName(bodyTag)) ? body-
>renderer() : 0; | 2297 RenderObject* bodyObject = (body && body->hasLocalName(bodyTag)) ? body-
>renderer() : 0; |
2297 if (bodyObject) | 2298 if (bodyObject) |
2298 return bodyObject; | 2299 return bodyObject; |
2299 } | 2300 } |
2300 | 2301 |
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3238 { | 3239 { |
3239 if (object1) { | 3240 if (object1) { |
3240 const WebCore::RenderObject* root = object1; | 3241 const WebCore::RenderObject* root = object1; |
3241 while (root->parent()) | 3242 while (root->parent()) |
3242 root = root->parent(); | 3243 root = root->parent(); |
3243 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3244 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3244 } | 3245 } |
3245 } | 3246 } |
3246 | 3247 |
3247 #endif | 3248 #endif |
OLD | NEW |