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

Side by Side Diff: Source/core/rendering/RenderBlock.cpp

Issue 331373006: Make inline blocks correctly update their line box selection state. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/rendering/RenderBlock.h ('k') | no next file » | 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 2496 matching lines...) Expand 10 before | Expand all | Expand 10 after
2507 2507
2508 RenderObject* child = beforeBlock->lastChild(); 2508 RenderObject* child = beforeBlock->lastChild();
2509 while (child && child->isRenderBlock()) { 2509 while (child && child->isRenderBlock()) {
2510 beforeBlock = toRenderBlock(child); 2510 beforeBlock = toRenderBlock(child);
2511 offset += LayoutSize(beforeBlock->logicalLeft(), beforeBlock->logicalTop ()); 2511 offset += LayoutSize(beforeBlock->logicalLeft(), beforeBlock->logicalTop ());
2512 child = beforeBlock->lastChild(); 2512 child = beforeBlock->lastChild();
2513 } 2513 }
2514 return beforeBlock; 2514 return beforeBlock;
2515 } 2515 }
2516 2516
2517 void RenderBlock::setSelectionState(SelectionState state)
2518 {
2519 RenderBox::setSelectionState(state);
2520
2521 if (inlineBoxWrapper() && canUpdateSelectionOnRootLineBoxes())
2522 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone );
2523 }
2524
2517 void RenderBlock::insertIntoTrackedRendererMaps(RenderBox* descendant, TrackedDe scendantsMap*& descendantsMap, TrackedContainerMap*& containerMap) 2525 void RenderBlock::insertIntoTrackedRendererMaps(RenderBox* descendant, TrackedDe scendantsMap*& descendantsMap, TrackedContainerMap*& containerMap)
2518 { 2526 {
2519 if (!descendantsMap) { 2527 if (!descendantsMap) {
2520 descendantsMap = new TrackedDescendantsMap; 2528 descendantsMap = new TrackedDescendantsMap;
2521 containerMap = new TrackedContainerMap; 2529 containerMap = new TrackedContainerMap;
2522 } 2530 }
2523 2531
2524 TrackedRendererListHashSet* descendantSet = descendantsMap->get(this); 2532 TrackedRendererListHashSet* descendantSet = descendantsMap->get(this);
2525 if (!descendantSet) { 2533 if (!descendantSet) {
2526 descendantSet = new TrackedRendererListHashSet; 2534 descendantSet = new TrackedRendererListHashSet;
(...skipping 2476 matching lines...) Expand 10 before | Expand all | Expand 10 after
5003 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 5011 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
5004 { 5012 {
5005 showRenderObject(); 5013 showRenderObject();
5006 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 5014 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
5007 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 5015 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
5008 } 5016 }
5009 5017
5010 #endif 5018 #endif
5011 5019
5012 } // namespace WebCore 5020 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlock.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698