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) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 2324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2335 if (TrackedLayoutBoxListHashSet* positionedObjects = this->positionedObj
ects()) { | 2335 if (TrackedLayoutBoxListHashSet* positionedObjects = this->positionedObj
ects()) { |
2336 for (auto* box : *positionedObjects) | 2336 for (auto* box : *positionedObjects) |
2337 addOutlineRectsForDescendant(*box, rects, additionalOffset, incl
udeBlockOverflows); | 2337 addOutlineRectsForDescendant(*box, rects, additionalOffset, incl
udeBlockOverflows); |
2338 } | 2338 } |
2339 } | 2339 } |
2340 | 2340 |
2341 if (inlineElementContinuation) | 2341 if (inlineElementContinuation) |
2342 inlineElementContinuation->addOutlineRects(rects, additionalOffset + (in
lineElementContinuation->containingBlock()->location() - location()), includeBlo
ckOverflows); | 2342 inlineElementContinuation->addOutlineRects(rects, additionalOffset + (in
lineElementContinuation->containingBlock()->location() - location()), includeBlo
ckOverflows); |
2343 } | 2343 } |
2344 | 2344 |
2345 void LayoutBlock::computeSelfHitTestRects(Vector<LayoutRect>& rects, const Layou
tPoint& layerOffset) const | |
2346 { | |
2347 LayoutBox::computeSelfHitTestRects(rects, layerOffset); | |
2348 | |
2349 if (hasHorizontalLayoutOverflow() || hasVerticalLayoutOverflow()) { | |
2350 for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBo
x()) { | |
2351 LayoutUnit top = std::max<LayoutUnit>(curr->lineTop(), curr->top()); | |
2352 LayoutUnit bottom = std::min<LayoutUnit>(curr->lineBottom(), curr->t
op() + curr->height()); | |
2353 LayoutRect rect(layerOffset.x() + curr->x(), layerOffset.y() + top,
curr->width(), bottom - top); | |
2354 // It's common for this rect to be entirely contained in our box, so
exclude that simple case. | |
2355 if (!rect.isEmpty() && (rects.isEmpty() || !rects[0].contains(rect))
) | |
2356 rects.append(rect); | |
2357 } | |
2358 } | |
2359 } | |
2360 | |
2361 LayoutBox* LayoutBlock::createAnonymousBoxWithSameTypeAs(const LayoutObject* par
ent) const | 2345 LayoutBox* LayoutBlock::createAnonymousBoxWithSameTypeAs(const LayoutObject* par
ent) const |
2362 { | 2346 { |
2363 return createAnonymousWithParentAndDisplay(parent, style()->display()); | 2347 return createAnonymousWithParentAndDisplay(parent, style()->display()); |
2364 } | 2348 } |
2365 | 2349 |
2366 LayoutUnit LayoutBlock::nextPageLogicalTop(LayoutUnit logicalOffset, PageBoundar
yRule pageBoundaryRule) const | 2350 LayoutUnit LayoutBlock::nextPageLogicalTop(LayoutUnit logicalOffset, PageBoundar
yRule pageBoundaryRule) const |
2367 { | 2351 { |
2368 LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset); | 2352 LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset); |
2369 if (!pageLogicalHeight) | 2353 if (!pageLogicalHeight) |
2370 return logicalOffset; | 2354 return logicalOffset; |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2646 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const | 2630 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const |
2647 { | 2631 { |
2648 showLayoutObject(); | 2632 showLayoutObject(); |
2649 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 2633 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
2650 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 2634 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
2651 } | 2635 } |
2652 | 2636 |
2653 #endif | 2637 #endif |
2654 | 2638 |
2655 } // namespace blink | 2639 } // namespace blink |
OLD | NEW |