| 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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 bool isRootObject = isRoot(); | 326 bool isRootObject = isRoot(); |
| 327 bool isViewObject = isRenderView(); | 327 bool isViewObject = isRenderView(); |
| 328 | 328 |
| 329 // The root and the RenderView always paint their backgrounds/borders. | 329 // The root and the RenderView always paint their backgrounds/borders. |
| 330 if (isRootObject || isViewObject) | 330 if (isRootObject || isViewObject) |
| 331 setHasBoxDecorations(true); | 331 setHasBoxDecorations(true); |
| 332 | 332 |
| 333 setFloating(!isOutOfFlowPositioned() && styleToUse->isFloating()); | 333 setFloating(!isOutOfFlowPositioned() && styleToUse->isFloating()); |
| 334 | 334 |
| 335 bool boxHasOverflowClip = false; | 335 bool boxHasOverflowClip = false; |
| 336 // We also handle <body> and <html>, whose overflow applies to the viewport. | 336 if (!styleToUse->isOverflowVisible() && isRenderBlock() && !isViewObject) { |
| 337 if (!styleToUse->isOverflowVisible() && !isRootObject && isRenderBlock()) { | 337 // If overflow has been propagated to the viewport, it has no effect her
e. |
| 338 // Overflow on the body can propagate to the viewport under the followin
g conditions. | 338 if (node() != document().viewportDefiningElement()) { |
| 339 // (1) The root element is <html>. | |
| 340 // (2) We are the primary <body> (can be checked by looking at document.
body). | |
| 341 // (3) The root element has visible overflow. | |
| 342 if (isBody() && document().documentElement()->hasTagName(htmlTag) | |
| 343 && document().body() == node() | |
| 344 && document().documentElement()->renderer()->style()->isOverflowVisi
ble()) { | |
| 345 boxHasOverflowClip = false; | |
| 346 } else { | |
| 347 boxHasOverflowClip = true; | 339 boxHasOverflowClip = true; |
| 348 if (!hasOverflowClip()) { | 340 if (!hasOverflowClip()) { |
| 349 // If we are getting an overflow clip, preemptively erase any ov
erflowing content. | 341 // If we are getting an overflow clip, preemptively erase any ov
erflowing content. |
| 350 // FIXME: This should probably consult RenderOverflow. | 342 // FIXME: This should probably consult RenderOverflow. |
| 351 repaint(); | 343 repaint(); |
| 352 } | 344 } |
| 353 } | 345 } |
| 354 } | 346 } |
| 355 setHasOverflowClip(boxHasOverflowClip); | 347 setHasOverflowClip(boxHasOverflowClip); |
| 356 | 348 |
| (...skipping 4560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4917 return 0; | 4909 return 0; |
| 4918 | 4910 |
| 4919 if (!layoutState && !flowThreadContainingBlock()) | 4911 if (!layoutState && !flowThreadContainingBlock()) |
| 4920 return 0; | 4912 return 0; |
| 4921 | 4913 |
| 4922 RenderBlock* containerBlock = containingBlock(); | 4914 RenderBlock* containerBlock = containingBlock(); |
| 4923 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); | 4915 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); |
| 4924 } | 4916 } |
| 4925 | 4917 |
| 4926 } // namespace WebCore | 4918 } // namespace WebCore |
| OLD | NEW |