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 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 { | 1277 { |
1278 BlockPainter(*this).paintObject(paintInfo, paintOffset); | 1278 BlockPainter(*this).paintObject(paintInfo, paintOffset); |
1279 } | 1279 } |
1280 | 1280 |
1281 LayoutInline* LayoutBlock::inlineElementContinuation() const | 1281 LayoutInline* LayoutBlock::inlineElementContinuation() const |
1282 { | 1282 { |
1283 LayoutBoxModelObject* continuation = this->continuation(); | 1283 LayoutBoxModelObject* continuation = this->continuation(); |
1284 return continuation && continuation->isInline() ? toLayoutInline(continuatio
n) : 0; | 1284 return continuation && continuation->isInline() ? toLayoutInline(continuatio
n) : 0; |
1285 } | 1285 } |
1286 | 1286 |
1287 ContinuationOutlineTableMap* continuationOutlineTable() | |
1288 { | |
1289 DEFINE_STATIC_LOCAL(ContinuationOutlineTableMap, table, ()); | |
1290 return &table; | |
1291 } | |
1292 | |
1293 void LayoutBlock::addContinuationWithOutline(LayoutInline* flow) | |
1294 { | |
1295 // We can't make this work if the inline is in a layer. We'll just rely on
the broken | |
1296 // way of painting. | |
1297 ASSERT(!flow->layer() && !flow->isInlineElementContinuation()); | |
1298 | |
1299 ContinuationOutlineTableMap* table = continuationOutlineTable(); | |
1300 ListHashSet<LayoutInline*>* continuations = table->get(this); | |
1301 if (!continuations) { | |
1302 continuations = new ListHashSet<LayoutInline*>; | |
1303 table->set(this, adoptPtr(continuations)); | |
1304 } | |
1305 | |
1306 continuations->add(flow); | |
1307 } | |
1308 | |
1309 bool LayoutBlock::isSelectionRoot() const | 1287 bool LayoutBlock::isSelectionRoot() const |
1310 { | 1288 { |
1311 if (isPseudoElement()) | 1289 if (isPseudoElement()) |
1312 return false; | 1290 return false; |
1313 ASSERT(node() || isAnonymous()); | 1291 ASSERT(node() || isAnonymous()); |
1314 | 1292 |
1315 // FIXME: Eventually tables should have to learn how to fill gaps between ce
lls, at least in simple non-spanning cases. | 1293 // FIXME: Eventually tables should have to learn how to fill gaps between ce
lls, at least in simple non-spanning cases. |
1316 if (isTable()) | 1294 if (isTable()) |
1317 return false; | 1295 return false; |
1318 | 1296 |
(...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2869 | 2847 |
2870 if (TrackedLayoutBoxListHashSet* positionedDescendantSet = positionedObjects
()) { | 2848 if (TrackedLayoutBoxListHashSet* positionedDescendantSet = positionedObjects
()) { |
2871 TrackedLayoutBoxListHashSet::const_iterator end = positionedDescendantSe
t->end(); | 2849 TrackedLayoutBoxListHashSet::const_iterator end = positionedDescendantSe
t->end(); |
2872 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda
ntSet->begin(); it != end; ++it) { | 2850 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda
ntSet->begin(); it != end; ++it) { |
2873 LayoutBox* currBox = *it; | 2851 LayoutBox* currBox = *it; |
2874 ASSERT(!currBox->needsLayout()); | 2852 ASSERT(!currBox->needsLayout()); |
2875 } | 2853 } |
2876 } | 2854 } |
2877 } | 2855 } |
2878 | 2856 |
2879 bool LayoutBlock::paintsContinuationOutline(LayoutInline* flow) | |
2880 { | |
2881 ContinuationOutlineTableMap* table = continuationOutlineTable(); | |
2882 if (table->isEmpty()) | |
2883 return false; | |
2884 | |
2885 ListHashSet<LayoutInline*>* continuations = table->get(this); | |
2886 if (!continuations) | |
2887 return false; | |
2888 | |
2889 return continuations->contains(flow); | |
2890 } | |
2891 | |
2892 #endif | 2857 #endif |
2893 | 2858 |
2894 #ifndef NDEBUG | 2859 #ifndef NDEBUG |
2895 | 2860 |
2896 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const | 2861 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const |
2897 { | 2862 { |
2898 showLayoutObject(); | 2863 showLayoutObject(); |
2899 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 2864 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
2900 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 2865 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
2901 } | 2866 } |
2902 | 2867 |
2903 #endif | 2868 #endif |
2904 | 2869 |
2905 } // namespace blink | 2870 } // namespace blink |
OLD | NEW |