| 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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 } | 442 } |
| 443 | 443 |
| 444 void LayoutBoxModelObject::addOutlineRectsForDescendant(const LayoutObject& desc
endant, Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset, IncludeB
lockVisualOverflowOrNot includeBlockOverflows) const | 444 void LayoutBoxModelObject::addOutlineRectsForDescendant(const LayoutObject& desc
endant, Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset, IncludeB
lockVisualOverflowOrNot includeBlockOverflows) const |
| 445 { | 445 { |
| 446 if (descendant.isText() || descendant.isListMarker()) | 446 if (descendant.isText() || descendant.isListMarker()) |
| 447 return; | 447 return; |
| 448 | 448 |
| 449 if (descendant.hasLayer()) { | 449 if (descendant.hasLayer()) { |
| 450 Vector<LayoutRect> layerOutlineRects; | 450 Vector<LayoutRect> layerOutlineRects; |
| 451 descendant.addOutlineRects(layerOutlineRects, LayoutPoint(), includeBloc
kOverflows); | 451 descendant.addOutlineRects(layerOutlineRects, LayoutPoint(), includeBloc
kOverflows); |
| 452 for (size_t i = 0; i < layerOutlineRects.size(); ++i) { | 452 descendant.localToContainerRects(layerOutlineRects, this, LayoutPoint(),
additionalOffset); |
| 453 FloatQuad quadInBox = toLayoutBoxModelObject(descendant).localToCont
ainerQuad(FloatQuad(FloatRect(layerOutlineRects[i])), this); | 453 rects.appendVector(layerOutlineRects); |
| 454 LayoutRect rect = LayoutRect(quadInBox.boundingBox()); | |
| 455 if (!rect.isEmpty()) { | |
| 456 rect.moveBy(additionalOffset); | |
| 457 rects.append(rect); | |
| 458 } | |
| 459 } | |
| 460 return; | 454 return; |
| 461 } | 455 } |
| 462 | 456 |
| 463 if (descendant.isBox()) { | 457 if (descendant.isBox()) { |
| 464 descendant.addOutlineRects(rects, additionalOffset + toLayoutBox(descend
ant).locationOffset(), includeBlockOverflows); | 458 descendant.addOutlineRects(rects, additionalOffset + toLayoutBox(descend
ant).locationOffset(), includeBlockOverflows); |
| 465 return; | 459 return; |
| 466 } | 460 } |
| 467 | 461 |
| 468 if (descendant.isLayoutInline()) { | 462 if (descendant.isLayoutInline()) { |
| 469 // As an optimization, an ancestor has added rects for its line boxes co
vering descendants' | 463 // As an optimization, an ancestor has added rects for its line boxes co
vering descendants' |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1063 if (rootElementStyle->hasBackground()) | 1057 if (rootElementStyle->hasBackground()) |
| 1064 return false; | 1058 return false; |
| 1065 | 1059 |
| 1066 if (node() != document().firstBodyElement()) | 1060 if (node() != document().firstBodyElement()) |
| 1067 return false; | 1061 return false; |
| 1068 | 1062 |
| 1069 return true; | 1063 return true; |
| 1070 } | 1064 } |
| 1071 | 1065 |
| 1072 } // namespace blink | 1066 } // namespace blink |
| OLD | NEW |