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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 } | 370 } |
371 setHasOverflowClip(shouldClipOverflow); | 371 setHasOverflowClip(shouldClipOverflow); |
372 } | 372 } |
373 | 373 |
374 bool LayoutBlock::allowsOverflowClip() const | 374 bool LayoutBlock::allowsOverflowClip() const |
375 { | 375 { |
376 // If overflow has been propagated to the viewport, it has no effect here. | 376 // If overflow has been propagated to the viewport, it has no effect here. |
377 return node() != document().viewportDefiningElement(); | 377 return node() != document().viewportDefiningElement(); |
378 } | 378 } |
379 | 379 |
380 inline static void invalidateDisplayItemClientForStartOfContinuationsIfNeeded(co
nst LayoutBlock& block) | |
381 { | |
382 // If the block is a continuation or containing block of an inline continuat
ion, invalidate the | |
383 // start object of the continuations if it has focus ring because change of
continuation may change | |
384 // the shape of the focus ring. | |
385 if (!block.isAnonymous()) | |
386 return; | |
387 | |
388 LayoutObject* startOfContinuations = nullptr; | |
389 if (LayoutInline* inlineElementContinuation = block.inlineElementContinuatio
n()) { | |
390 // This block is an anonymous block continuation. | |
391 startOfContinuations = inlineElementContinuation->node()->layoutObject()
; | |
392 } else if (LayoutObject* firstChild = block.firstChild()) { | |
393 // This block is the anonymous containing block of an inline element con
tinuation. | |
394 if (firstChild->isElementContinuation()) | |
395 startOfContinuations = firstChild->node()->layoutObject(); | |
396 } | |
397 if (startOfContinuations && startOfContinuations->styleRef().outlineStyleIsA
uto()) | |
398 startOfContinuations->invalidateDisplayItemClient(*startOfContinuations)
; | |
399 } | |
400 | |
401 void LayoutBlock::invalidateDisplayItemClients(const LayoutBoxModelObject& paint
InvalidationContainer, PaintInvalidationReason invalidationReason) const | |
402 { | |
403 LayoutBox::invalidateDisplayItemClients(paintInvalidationContainer, invalida
tionReason); | |
404 invalidateDisplayItemClientForStartOfContinuationsIfNeeded(*this); | |
405 } | |
406 | |
407 void LayoutBlock::addChildIgnoringContinuation(LayoutObject* newChild, LayoutObj
ect* beforeChild) | 380 void LayoutBlock::addChildIgnoringContinuation(LayoutObject* newChild, LayoutObj
ect* beforeChild) |
408 { | 381 { |
409 if (beforeChild && beforeChild->parent() != this) { | 382 if (beforeChild && beforeChild->parent() != this) { |
410 LayoutObject* beforeChildContainer = beforeChild->parent(); | 383 LayoutObject* beforeChildContainer = beforeChild->parent(); |
411 while (beforeChildContainer->parent() != this) | 384 while (beforeChildContainer->parent() != this) |
412 beforeChildContainer = beforeChildContainer->parent(); | 385 beforeChildContainer = beforeChildContainer->parent(); |
413 ASSERT(beforeChildContainer); | 386 ASSERT(beforeChildContainer); |
414 | 387 |
415 if (beforeChildContainer->isAnonymous()) { | 388 if (beforeChildContainer->isAnonymous()) { |
416 // If the requested beforeChild is not one of our children, then thi
s is because | 389 // If the requested beforeChild is not one of our children, then thi
s is because |
(...skipping 1962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2379 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda
ntSet->begin(); it != end; ++it) { | 2352 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda
ntSet->begin(); it != end; ++it) { |
2380 LayoutBox* currBox = *it; | 2353 LayoutBox* currBox = *it; |
2381 ASSERT(!currBox->needsLayout()); | 2354 ASSERT(!currBox->needsLayout()); |
2382 } | 2355 } |
2383 } | 2356 } |
2384 } | 2357 } |
2385 | 2358 |
2386 #endif | 2359 #endif |
2387 | 2360 |
2388 } // namespace blink | 2361 } // namespace blink |
OLD | NEW |