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

Side by Side Diff: Source/WebCore/rendering/RenderListMarker.cpp

Issue 9695005: Merge 110323 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 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
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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed.
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
6 * Copyright (C) 2010 Daniel Bates (dbates@intudata.com) 6 * Copyright (C) 2010 Daniel Bates (dbates@intudata.com)
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 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after
1687 if (!style()->isHorizontalWritingMode()) { 1687 if (!style()->isHorizontalWritingMode()) {
1688 relativeRect = relativeRect.transposedRect(); 1688 relativeRect = relativeRect.transposedRect();
1689 relativeRect.setX(width() - relativeRect.x() - relativeRect.width()); 1689 relativeRect.setX(width() - relativeRect.x() - relativeRect.width());
1690 } 1690 }
1691 1691
1692 return relativeRect; 1692 return relativeRect;
1693 } 1693 }
1694 1694
1695 void RenderListMarker::setSelectionState(SelectionState state) 1695 void RenderListMarker::setSelectionState(SelectionState state)
1696 { 1696 {
1697 // The selection state for our containing block hierarchy is updated by the base class call.
1697 RenderBox::setSelectionState(state); 1698 RenderBox::setSelectionState(state);
1698 if (InlineBox* box = inlineBoxWrapper()) 1699
1699 if (RootInlineBox* root = box->root()) 1700 if (m_inlineBoxWrapper && canUpdateSelectionOnRootLineBoxes())
1701 if (RootInlineBox* root = m_inlineBoxWrapper->root())
1700 root->setHasSelectedChildren(state != SelectionNone); 1702 root->setHasSelectedChildren(state != SelectionNone);
1701 containingBlock()->setSelectionState(state);
1702 } 1703 }
1703 1704
1704 LayoutRect RenderListMarker::selectionRectForRepaint(RenderBoxModelObject* repai ntContainer, bool clipToVisibleContent) 1705 LayoutRect RenderListMarker::selectionRectForRepaint(RenderBoxModelObject* repai ntContainer, bool clipToVisibleContent)
1705 { 1706 {
1706 ASSERT(!needsLayout()); 1707 ASSERT(!needsLayout());
1707 1708
1708 if (selectionState() == SelectionNone || !inlineBoxWrapper()) 1709 if (selectionState() == SelectionNone || !inlineBoxWrapper())
1709 return LayoutRect(); 1710 return LayoutRect();
1710 1711
1711 RootInlineBox* root = inlineBoxWrapper()->root(); 1712 RootInlineBox* root = inlineBoxWrapper()->root();
1712 LayoutRect rect(0, root->selectionTop() - y(), width(), root->selectionHeigh t()); 1713 LayoutRect rect(0, root->selectionTop() - y(), width(), root->selectionHeigh t());
1713 1714
1714 if (clipToVisibleContent) 1715 if (clipToVisibleContent)
1715 computeRectForRepaint(repaintContainer, rect); 1716 computeRectForRepaint(repaintContainer, rect);
1716 else 1717 else
1717 rect = localToContainerQuad(FloatRect(rect), repaintContainer).enclosing BoundingBox(); 1718 rect = localToContainerQuad(FloatRect(rect), repaintContainer).enclosing BoundingBox();
1718 1719
1719 return rect; 1720 return rect;
1720 } 1721 }
1721 1722
1722 } // namespace WebCore 1723 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderBoxModelObject.cpp ('k') | Source/WebCore/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698