| 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 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 } | 407 } |
| 408 } | 408 } |
| 409 return; | 409 return; |
| 410 } | 410 } |
| 411 | 411 |
| 412 if (descendant.isBox()) { | 412 if (descendant.isBox()) { |
| 413 descendant.addOutlineRects(rects, additionalOffset + toLayoutBox(descend
ant).locationOffset()); | 413 descendant.addOutlineRects(rects, additionalOffset + toLayoutBox(descend
ant).locationOffset()); |
| 414 return; | 414 return; |
| 415 } | 415 } |
| 416 | 416 |
| 417 if (descendant.isLayoutInline()) { |
| 418 // As an optimization, an ancestor has added rects for its line boxes co
vering descendants' |
| 419 // line boxes, so descendants don't need to add line boxes again. For ex
ample, if the parent |
| 420 // is a LayoutBlock, it adds rects for its RootOutlineBoxes which cover
the line boxes of |
| 421 // this LayoutInline. So the LayoutInline needs to add rects for childre
n and continuations only. |
| 422 toLayoutInline(descendant).addOutlineRectsForChildrenAndContinuations(re
cts, additionalOffset); |
| 423 return; |
| 424 } |
| 425 |
| 417 descendant.addOutlineRects(rects, additionalOffset); | 426 descendant.addOutlineRects(rects, additionalOffset); |
| 418 } | 427 } |
| 419 | 428 |
| 420 bool LayoutBoxModelObject::calculateHasBoxDecorations() const | 429 bool LayoutBoxModelObject::calculateHasBoxDecorations() const |
| 421 { | 430 { |
| 422 const ComputedStyle& styleToUse = styleRef(); | 431 const ComputedStyle& styleToUse = styleRef(); |
| 423 return hasBackground() || styleToUse.hasBorderDecoration() || styleToUse.has
Appearance() || styleToUse.boxShadow(); | 432 return hasBackground() || styleToUse.hasBorderDecoration() || styleToUse.has
Appearance() || styleToUse.boxShadow(); |
| 424 } | 433 } |
| 425 | 434 |
| 426 bool LayoutBoxModelObject::hasNonEmptyLayoutSize() const | 435 bool LayoutBoxModelObject::hasNonEmptyLayoutSize() const |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1003 if (rootElementStyle->hasBackground()) | 1012 if (rootElementStyle->hasBackground()) |
| 1004 return false; | 1013 return false; |
| 1005 | 1014 |
| 1006 if (node() != document().firstBodyElement()) | 1015 if (node() != document().firstBodyElement()) |
| 1007 return false; | 1016 return false; |
| 1008 | 1017 |
| 1009 return true; | 1018 return true; |
| 1010 } | 1019 } |
| 1011 | 1020 |
| 1012 } // namespace blink | 1021 } // namespace blink |
| OLD | NEW |