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

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

Issue 1094133004: Image maps should work for images with alt content (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 5 years, 8 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
« no previous file with comments | « Source/core/layout/HitTestResult.cpp ('k') | Source/core/layout/LayoutImage.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3469 matching lines...) Expand 10 before | Expand all | Expand 10 after
3480 if (isAnonymousBlock() && parent() && parent()->isLayoutBlock()) 3480 if (isAnonymousBlock() && parent() && parent()->isLayoutBlock())
3481 toLayoutBlock(parent())->removeLeftoverAnonymousBlock(this); 3481 toLayoutBlock(parent())->removeLeftoverAnonymousBlock(this);
3482 // |this| may be dead here 3482 // |this| may be dead here
3483 } 3483 }
3484 3484
3485 void LayoutBlock::updateHitTestResult(HitTestResult& result, const LayoutPoint& point) 3485 void LayoutBlock::updateHitTestResult(HitTestResult& result, const LayoutPoint& point)
3486 { 3486 {
3487 if (result.innerNode()) 3487 if (result.innerNode())
3488 return; 3488 return;
3489 3489
3490 if (Node* n = nodeForHitTest()) { 3490 if (Node* n = nodeForHitTest())
3491 result.setInnerNode(n); 3491 result.setNodeAndPosition(n, point);
3492 result.setLocalPoint(point);
3493 }
3494 } 3492 }
3495 3493
3496 // An inline-block uses its inlineBox as the inlineBoxWrapper, 3494 // An inline-block uses its inlineBox as the inlineBoxWrapper,
3497 // so the firstChild() is nullptr if the only child is an empty inline-block. 3495 // so the firstChild() is nullptr if the only child is an empty inline-block.
3498 inline bool LayoutBlock::isInlineBoxWrapperActuallyChild() const 3496 inline bool LayoutBlock::isInlineBoxWrapperActuallyChild() const
3499 { 3497 {
3500 return isInlineBlockOrInlineTable() && !size().isEmpty() && node() && editin gIgnoresContent(node()); 3498 return isInlineBlockOrInlineTable() && !size().isEmpty() && node() && editin gIgnoresContent(node());
3501 } 3499 }
3502 3500
3503 LayoutRect LayoutBlock::localCaretRect(InlineBox* inlineBox, int caretOffset, La youtUnit* extraWidthToEndOfLine) 3501 LayoutRect LayoutBlock::localCaretRect(InlineBox* inlineBox, int caretOffset, La youtUnit* extraWidthToEndOfLine)
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
3913 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const 3911 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const
3914 { 3912 {
3915 showLayoutObject(); 3913 showLayoutObject();
3916 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 3914 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
3917 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 3915 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
3918 } 3916 }
3919 3917
3920 #endif 3918 #endif
3921 3919
3922 } // namespace blink 3920 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/HitTestResult.cpp ('k') | Source/core/layout/LayoutImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698