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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 PaintInvalidationState disabledPaintInvalidationState(childPaint
InvalidationState, *this, paintInvalidationContainerForChild); | 368 PaintInvalidationState disabledPaintInvalidationState(childPaint
InvalidationState, *this, paintInvalidationContainerForChild); |
369 box->invalidateTreeIfNeeded(disabledPaintInvalidationState); | 369 box->invalidateTreeIfNeeded(disabledPaintInvalidationState); |
370 continue; | 370 continue; |
371 } | 371 } |
372 | 372 |
373 // If the positioned layoutObject is absolutely positioned and it is
inside | 373 // If the positioned layoutObject is absolutely positioned and it is
inside |
374 // a relatively positioned inline element, we need to account for | 374 // a relatively positioned inline element, we need to account for |
375 // the inline elements position in PaintInvalidationState. | 375 // the inline elements position in PaintInvalidationState. |
376 if (box->style()->position() == AbsolutePosition) { | 376 if (box->style()->position() == AbsolutePosition) { |
377 LayoutObject* container = box->container(&paintInvalidationConta
inerForChild, 0); | 377 LayoutObject* container = box->container(&paintInvalidationConta
inerForChild, 0); |
378 if (container->isRelPositioned() && container->isLayoutInline())
{ | 378 if (container->isInFlowPositioned() && container->isLayoutInline
()) { |
379 // FIXME: We should be able to use PaintInvalidationState fo
r this. | 379 // FIXME: We should be able to use PaintInvalidationState fo
r this. |
380 // Currently, we will place absolutely positioned elements i
nside | 380 // Currently, we will place absolutely positioned elements i
nside |
381 // relatively positioned inline blocks in the wrong location
. crbug.com/371485 | 381 // relatively positioned inline blocks in the wrong location
. crbug.com/371485 |
382 ForceHorriblySlowRectMapping slowRectMapping(&childPaintInva
lidationState); | 382 ForceHorriblySlowRectMapping slowRectMapping(&childPaintInva
lidationState); |
383 PaintInvalidationState disabledPaintInvalidationState(childP
aintInvalidationState, *this, paintInvalidationContainerForChild); | 383 PaintInvalidationState disabledPaintInvalidationState(childP
aintInvalidationState, *this, paintInvalidationContainerForChild); |
384 box->invalidateTreeIfNeeded(disabledPaintInvalidationState); | 384 box->invalidateTreeIfNeeded(disabledPaintInvalidationState); |
385 continue; | 385 continue; |
386 } | 386 } |
387 } | 387 } |
388 | 388 |
(...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1797 return !ancestor || !ancestor->parent() || (ancestor->hasLayer() && ancestor
->parent()->isLayoutView()) | 1797 return !ancestor || !ancestor->parent() || (ancestor->hasLayer() && ancestor
->parent()->isLayoutView()) |
1798 || ancestor->nonPseudoNode()->hasEditableStyle() == child->nonPseudoNode
()->hasEditableStyle(); | 1798 || ancestor->nonPseudoNode()->hasEditableStyle() == child->nonPseudoNode
()->hasEditableStyle(); |
1799 } | 1799 } |
1800 | 1800 |
1801 // FIXME: This function should go on LayoutObject as an instance method. Then | 1801 // FIXME: This function should go on LayoutObject as an instance method. Then |
1802 // all cases in which positionForPoint recurs could call this instead to | 1802 // all cases in which positionForPoint recurs could call this instead to |
1803 // prevent crossing editable boundaries. This would require many tests. | 1803 // prevent crossing editable boundaries. This would require many tests. |
1804 static PositionWithAffinity positionForPointRespectingEditingBoundaries(LayoutBl
ock* parent, LayoutBox* child, const LayoutPoint& pointInParentCoordinates) | 1804 static PositionWithAffinity positionForPointRespectingEditingBoundaries(LayoutBl
ock* parent, LayoutBox* child, const LayoutPoint& pointInParentCoordinates) |
1805 { | 1805 { |
1806 LayoutPoint childLocation = child->location(); | 1806 LayoutPoint childLocation = child->location(); |
1807 if (child->isRelPositioned()) | 1807 if (child->isInFlowPositioned()) |
1808 childLocation += child->offsetForInFlowPosition(); | 1808 childLocation += child->offsetForInFlowPosition(); |
1809 | 1809 |
1810 // FIXME: This is wrong if the child's writing-mode is different from the pa
rent's. | 1810 // FIXME: This is wrong if the child's writing-mode is different from the pa
rent's. |
1811 LayoutPoint pointInChildCoordinates(toLayoutPoint(pointInParentCoordinates -
childLocation)); | 1811 LayoutPoint pointInChildCoordinates(toLayoutPoint(pointInParentCoordinates -
childLocation)); |
1812 | 1812 |
1813 // If this is an anonymous layoutObject, we just recur normally | 1813 // If this is an anonymous layoutObject, we just recur normally |
1814 Node* childNode = child->nonPseudoNode(); | 1814 Node* childNode = child->nonPseudoNode(); |
1815 if (!childNode) | 1815 if (!childNode) |
1816 return child->positionForPoint(pointInChildCoordinates); | 1816 return child->positionForPoint(pointInChildCoordinates); |
1817 | 1817 |
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2921 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const | 2921 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const |
2922 { | 2922 { |
2923 showLayoutObject(); | 2923 showLayoutObject(); |
2924 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 2924 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
2925 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 2925 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
2926 } | 2926 } |
2927 | 2927 |
2928 #endif | 2928 #endif |
2929 | 2929 |
2930 } // namespace blink | 2930 } // namespace blink |
OLD | NEW |