Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: Source/core/layout/LayoutBlock.cpp

Issue 978603003: [New Multicolumn] Make positionForPoint() work. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More tests Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 2500 matching lines...) Expand 10 before | Expand all | Expand 10 after
2511 } 2511 }
2512 2512
2513 // Can't reach this. We have a root line box, but it has no kids. 2513 // Can't reach this. We have a root line box, but it has no kids.
2514 // FIXME: This should ASSERT_NOT_REACHED(), but clicking on placeholder text 2514 // FIXME: This should ASSERT_NOT_REACHED(), but clicking on placeholder text
2515 // seems to hit this code path. 2515 // seems to hit this code path.
2516 return createPositionWithAffinity(0, DOWNSTREAM); 2516 return createPositionWithAffinity(0, DOWNSTREAM);
2517 } 2517 }
2518 2518
2519 static inline bool isChildHitTestCandidate(LayoutBox* box) 2519 static inline bool isChildHitTestCandidate(LayoutBox* box)
2520 { 2520 {
2521 return box->size().height() && box->style()->visibility() == VISIBLE && !box ->isFloatingOrOutOfFlowPositioned(); 2521 return box->size().height() && box->style()->visibility() == VISIBLE && !box ->isFloatingOrOutOfFlowPositioned() && !box->isLayoutFlowThread();
2522 } 2522 }
2523 2523
2524 PositionWithAffinity LayoutBlock::positionForPoint(const LayoutPoint& point) 2524 PositionWithAffinity LayoutBlock::positionForPoint(const LayoutPoint& point)
2525 { 2525 {
2526 if (isTable()) 2526 if (isTable())
2527 return LayoutBox::positionForPoint(point); 2527 return LayoutBox::positionForPoint(point);
2528 2528
2529 if (isReplaced()) { 2529 if (isReplaced()) {
2530 // FIXME: This seems wrong when the object's writing-mode doesn't match the line's writing-mode. 2530 // FIXME: This seems wrong when the object's writing-mode doesn't match the line's writing-mode.
2531 LayoutUnit pointLogicalLeft = isHorizontalWritingMode() ? point.x() : po int.y(); 2531 LayoutUnit pointLogicalLeft = isHorizontalWritingMode() ? point.x() : po int.y();
(...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after
3922 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const 3922 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const
3923 { 3923 {
3924 showLayoutObject(); 3924 showLayoutObject();
3925 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 3925 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
3926 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 3926 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
3927 } 3927 }
3928 3928
3929 #endif 3929 #endif
3930 3930
3931 } // namespace blink 3931 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698