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

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

Issue 10533037: Merge 118816 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 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
« no previous file with comments | « LayoutTests/fast/text/text-fragment-first-letter-update-crash-expected.txt ('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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after
1775 updateFillImages(oldStyle ? oldStyle->maskLayers() : 0, m_style ? m_style->m askLayers() : 0); 1775 updateFillImages(oldStyle ? oldStyle->maskLayers() : 0, m_style ? m_style->m askLayers() : 0);
1776 1776
1777 updateImage(oldStyle ? oldStyle->borderImage().image() : 0, m_style ? m_styl e->borderImage().image() : 0); 1777 updateImage(oldStyle ? oldStyle->borderImage().image() : 0, m_style ? m_styl e->borderImage().image() : 0);
1778 updateImage(oldStyle ? oldStyle->maskBoxImage().image() : 0, m_style ? m_sty le->maskBoxImage().image() : 0); 1778 updateImage(oldStyle ? oldStyle->maskBoxImage().image() : 0, m_style ? m_sty le->maskBoxImage().image() : 0);
1779 1779
1780 // We need to ensure that view->maximalOutlineSize() is valid for any repain ts that happen 1780 // We need to ensure that view->maximalOutlineSize() is valid for any repain ts that happen
1781 // during styleDidChange (it's used by clippedOverflowRectForRepaint()). 1781 // during styleDidChange (it's used by clippedOverflowRectForRepaint()).
1782 if (m_style->outlineWidth() > 0 && m_style->outlineSize() > maximalOutlineSi ze(PaintPhaseOutline)) 1782 if (m_style->outlineWidth() > 0 && m_style->outlineSize() > maximalOutlineSi ze(PaintPhaseOutline))
1783 toRenderView(document()->renderer())->setMaximalOutlineSize(m_style->out lineSize()); 1783 toRenderView(document()->renderer())->setMaximalOutlineSize(m_style->out lineSize());
1784 1784
1785 bool doesNotNeedLayout = !m_parent || isText();
1786
1785 styleDidChange(diff, oldStyle.get()); 1787 styleDidChange(diff, oldStyle.get());
1786 1788
1787 if (!m_parent || isText()) 1789 // FIXME: |this| might be destroyed here. This can currently happen for a Re nderTextFragment when
1790 // its first-letter block gets an update in RenderTextFragment::styleDidChan ge. For RenderTextFragment(s),
1791 // we will safely bail out with the doesNotNeedLayout flag. We might want to broaden this condition
1792 // in the future as we move renderer changes out of layout and into style ch anges.
1793 if (doesNotNeedLayout)
1788 return; 1794 return;
1789 1795
1790 // Now that the layer (if any) has been updated, we need to adjust the diff again, 1796 // Now that the layer (if any) has been updated, we need to adjust the diff again,
1791 // check whether we should layout now, and decide if we need to repaint. 1797 // check whether we should layout now, and decide if we need to repaint.
1792 StyleDifference updatedDiff = adjustStyleDifference(diff, contextSensitivePr operties); 1798 StyleDifference updatedDiff = adjustStyleDifference(diff, contextSensitivePr operties);
1793 1799
1794 if (diff <= StyleDifferenceLayoutPositionedMovementOnly) { 1800 if (diff <= StyleDifferenceLayoutPositionedMovementOnly) {
1795 if (updatedDiff == StyleDifferenceLayout) 1801 if (updatedDiff == StyleDifferenceLayout)
1796 setNeedsLayoutAndPrefWidthsRecalc(); 1802 setNeedsLayoutAndPrefWidthsRecalc();
1797 else if (updatedDiff == StyleDifferenceLayoutPositionedMovementOnly) 1803 else if (updatedDiff == StyleDifferenceLayoutPositionedMovementOnly)
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
2948 { 2954 {
2949 if (object1) { 2955 if (object1) {
2950 const WebCore::RenderObject* root = object1; 2956 const WebCore::RenderObject* root = object1;
2951 while (root->parent()) 2957 while (root->parent())
2952 root = root->parent(); 2958 root = root->parent();
2953 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 2959 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
2954 } 2960 }
2955 } 2961 }
2956 2962
2957 #endif 2963 #endif
OLDNEW
« no previous file with comments | « LayoutTests/fast/text/text-fragment-first-letter-update-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698