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

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

Issue 8016006: Merge 95671 - Source/WebCore: Not use anonymousContainer on beforeChild calculation (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 3 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 * (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 1807 matching lines...) Expand 10 before | Expand all | Expand 10 after
1818 1818
1819 // Don't check for repaint here; we need to wait until the layer has been 1819 // Don't check for repaint here; we need to wait until the layer has been
1820 // updated by subclasses before we know if we have to repaint (in setStyle() ). 1820 // updated by subclasses before we know if we have to repaint (in setStyle() ).
1821 1821
1822 if (oldStyle && !areCursorsEqual(oldStyle, style())) { 1822 if (oldStyle && !areCursorsEqual(oldStyle, style())) {
1823 if (Frame* frame = this->frame()) 1823 if (Frame* frame = this->frame())
1824 frame->eventHandler()->dispatchFakeMouseMoveEventSoon(); 1824 frame->eventHandler()->dispatchFakeMouseMoveEventSoon();
1825 } 1825 }
1826 } 1826 }
1827 1827
1828 void RenderObject::propagateStyleToAnonymousChildren() 1828 void RenderObject::propagateStyleToAnonymousChildren(bool blockChildrenOnly)
1829 { 1829 {
1830 // FIXME: We could save this call when the change only affected non-inherite d properties.
1830 for (RenderObject* child = firstChild(); child; child = child->nextSibling() ) { 1831 for (RenderObject* child = firstChild(); child; child = child->nextSibling() ) {
1831 if (child->isAnonymous() && !child->isBeforeOrAfterContent()) { 1832 if (!child->isAnonymous() || child->style()->styleType() != NOPSEUDO)
1832 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(sty le()); 1833 continue;
1833 if (style()->specifiesColumns()) { 1834
1834 if (child->style()->specifiesColumns()) 1835 if (blockChildrenOnly && !child->isRenderBlock())
1835 newStyle->inheritColumnPropertiesFrom(style()); 1836 continue;
1836 if (child->style()->columnSpan()) 1837
1837 newStyle->setColumnSpan(true); 1838 #if ENABLE(FULLSCREEN_API)
1838 } 1839 if (child->isRenderFullScreen() || child->isRenderFullScreenPlaceholder( ))
1839 newStyle->setDisplay(child->style()->display()); 1840 continue;
1840 child->setStyle(newStyle.release()); 1841 #endif
1842
1843 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(style() );
1844 if (style()->specifiesColumns()) {
1845 if (child->style()->specifiesColumns())
1846 newStyle->inheritColumnPropertiesFrom(style());
1847 if (child->style()->columnSpan())
1848 newStyle->setColumnSpan(true);
1841 } 1849 }
1850 newStyle->setDisplay(child->style()->display());
1851 child->setStyle(newStyle.release());
1842 } 1852 }
1843 } 1853 }
1844 1854
1845 void RenderObject::updateFillImages(const FillLayer* oldLayers, const FillLayer* newLayers) 1855 void RenderObject::updateFillImages(const FillLayer* oldLayers, const FillLayer* newLayers)
1846 { 1856 {
1847 // Optimize the common case 1857 // Optimize the common case
1848 if (oldLayers && !oldLayers->next() && newLayers && !newLayers->next() && (o ldLayers->image() == newLayers->image())) 1858 if (oldLayers && !oldLayers->next() && newLayers && !newLayers->next() && (o ldLayers->image() == newLayers->image()))
1849 return; 1859 return;
1850 1860
1851 // Go through the new layers and addClients first, to avoid removing all cli ents of an image. 1861 // Go through the new layers and addClients first, to avoid removing all cli ents of an image.
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
2704 { 2714 {
2705 if (object1) { 2715 if (object1) {
2706 const WebCore::RenderObject* root = object1; 2716 const WebCore::RenderObject* root = object1;
2707 while (root->parent()) 2717 while (root->parent())
2708 root = root->parent(); 2718 root = root->parent();
2709 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 2719 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
2710 } 2720 }
2711 } 2721 }
2712 2722
2713 #endif 2723 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698