Changeset 156312 in webkit
- Timestamp:
- Sep 23, 2013, 5:55:44 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r156311 r156312 1 2013-09-23 Antti Koivisto <antti@apple.com> 2 3 Move style change analysis code to RenderElement 4 https://bugs.webkit.org/show_bug.cgi?id=121812 5 6 Reviewed by Andreas Kling. 7 8 Text renderers don't need this. There is no text renderer specific invalidation and text 9 style never changes independent from the containing RenderElement. 10 1 11 2013-09-23 Commit Queue <commit-queue@webkit.org> 2 12 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r156285 r156312 326 326 } 327 327 328 propagateStyleToAnonymousChildren( true);328 propagateStyleToAnonymousChildren(PropagateToBlockChildrenOnly); 329 329 m_lineHeight = -1; 330 330 -
trunk/Source/WebCore/rendering/RenderElement.cpp
r156310 r156312 28 28 #include "AXObjectCache.h" 29 29 #include "ContentData.h" 30 #include "CursorList.h" 31 #include "EventHandler.h" 32 #include "Frame.h" 30 33 #include "HTMLElement.h" 31 34 #include "HTMLNames.h" … … 51 54 #include "SVGRenderSupport.h" 52 55 56 #if USE(ACCELERATED_COMPOSITING) 57 #include "RenderLayerCompositor.h" 58 #endif 59 53 60 namespace WebCore { 61 62 bool RenderElement::s_affectsParentBlock = false; 63 bool RenderElement::s_noLongerAffectsParentBlock = false; 54 64 55 65 RenderElement::RenderElement(Element* element) … … 445 455 } 446 456 457 void RenderElement::propagateStyleToAnonymousChildren(StylePropagationType propagationType) 458 { 459 // FIXME: We could save this call when the change only affected non-inherited properties. 460 for (RenderObject* child = firstChild(); child; child = child->nextSibling()) { 461 if (!child->isAnonymous() || child->style()->styleType() != NOPSEUDO) 462 continue; 463 464 if (propagationType == PropagateToBlockChildrenOnly && !child->isRenderBlock()) 465 continue; 466 467 #if ENABLE(FULLSCREEN_API) 468 if (child->isRenderFullScreen() || child->isRenderFullScreenPlaceholder()) 469 continue; 470 #endif 471 472 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(style(), child->style()->display()); 473 if (style()->specifiesColumns()) { 474 if (child->style()->specifiesColumns()) 475 newStyle->inheritColumnPropertiesFrom(style()); 476 if (child->style()->columnSpan()) 477 newStyle->setColumnSpan(ColumnSpanAll); 478 } 479 480 // Preserve the position style of anonymous block continuations as they can have relative or sticky position when 481 // they contain block descendants of relative or sticky positioned inlines. 482 if (child->isInFlowPositioned() && toRenderBlock(child)->isAnonymousBlockContinuation()) 483 newStyle->setPosition(child->style()->position()); 484 485 child->setStyle(newStyle.release()); 486 } 487 } 488 489 // On low-powered/mobile devices, preventing blitting on a scroll can cause noticeable delays 490 // when scrolling a page with a fixed background image. As an optimization, assuming there are 491 // no fixed positoned elements on the page, we can acclerate scrolling (via blitting) if we 492 // ignore the CSS property "background-attachment: fixed". 493 static bool shouldRepaintFixedBackgroundsOnScroll(FrameView* frameView) 494 { 495 #if !ENABLE(FAST_MOBILE_SCROLLING) || !PLATFORM(QT) 496 UNUSED_PARAM(frameView); 497 #endif 498 499 bool repaintFixedBackgroundsOnScroll = true; 500 #if ENABLE(FAST_MOBILE_SCROLLING) 501 #if PLATFORM(QT) 502 if (frameView->delegatesScrolling()) 503 repaintFixedBackgroundsOnScroll = false; 504 #else 505 repaintFixedBackgroundsOnScroll = false; 506 #endif 507 #endif 508 return repaintFixedBackgroundsOnScroll; 509 } 510 511 static inline bool rendererHasBackground(const RenderObject* renderer) 512 { 513 return renderer && renderer->hasBackground(); 514 } 515 516 void RenderElement::styleWillChange(StyleDifference diff, const RenderStyle* newStyle) 517 { 518 if (m_style) { 519 // If our z-index changes value or our visibility changes, 520 // we need to dirty our stacking context's z-order list. 521 if (newStyle) { 522 bool visibilityChanged = m_style->visibility() != newStyle->visibility() 523 || m_style->zIndex() != newStyle->zIndex() 524 || m_style->hasAutoZIndex() != newStyle->hasAutoZIndex(); 525 #if ENABLE(DASHBOARD_SUPPORT) || ENABLE(DRAGGABLE_REGION) 526 if (visibilityChanged) 527 document().setAnnotatedRegionsDirty(true); 528 #endif 529 if (visibilityChanged) { 530 if (AXObjectCache* cache = document().existingAXObjectCache()) 531 cache->childrenChanged(parent()); 532 } 533 534 // Keep layer hierarchy visibility bits up to date if visibility changes. 535 if (m_style->visibility() != newStyle->visibility()) { 536 if (RenderLayer* layer = enclosingLayer()) { 537 if (newStyle->visibility() == VISIBLE) 538 layer->setHasVisibleContent(); 539 else if (layer->hasVisibleContent() && (this == &layer->renderer() || layer->renderer().style()->visibility() != VISIBLE)) { 540 layer->dirtyVisibleContentStatus(); 541 if (diff > StyleDifferenceRepaintLayer) 542 repaint(); 543 } 544 } 545 } 546 } 547 548 if (m_parent && (newStyle->outlineSize() < m_style->outlineSize() || shouldRepaintForStyleDifference(diff))) 549 repaint(); 550 if (isFloating() && (m_style->floating() != newStyle->floating())) 551 // For changes in float styles, we need to conceivably remove ourselves 552 // from the floating objects list. 553 toRenderBox(this)->removeFloatingOrPositionedChildFromBlockLists(); 554 else if (isOutOfFlowPositioned() && (m_style->position() != newStyle->position())) 555 // For changes in positioning styles, we need to conceivably remove ourselves 556 // from the positioned objects list. 557 toRenderBox(this)->removeFloatingOrPositionedChildFromBlockLists(); 558 559 s_affectsParentBlock = isFloatingOrOutOfFlowPositioned() 560 && (!newStyle->isFloating() && !newStyle->hasOutOfFlowPosition()) 561 && parent() && (parent()->isRenderBlockFlow() || parent()->isRenderInline()); 562 563 s_noLongerAffectsParentBlock = ((!isFloating() && newStyle->isFloating()) || (!isOutOfFlowPositioned() && newStyle->hasOutOfFlowPosition())) 564 && parent() && parent()->isRenderBlock(); 565 566 // reset style flags 567 if (diff == StyleDifferenceLayout || diff == StyleDifferenceLayoutPositionedMovementOnly) { 568 setFloating(false); 569 clearPositionedState(); 570 } 571 setHorizontalWritingMode(true); 572 setHasBoxDecorations(false); 573 setHasOverflowClip(false); 574 setHasTransform(false); 575 setHasReflection(false); 576 } else { 577 s_affectsParentBlock = false; 578 s_noLongerAffectsParentBlock = false; 579 } 580 581 bool repaintFixedBackgroundsOnScroll = shouldRepaintFixedBackgroundsOnScroll(&view().frameView()); 582 583 bool newStyleSlowScroll = newStyle && repaintFixedBackgroundsOnScroll && newStyle->hasFixedBackgroundImage(); 584 bool oldStyleSlowScroll = m_style && repaintFixedBackgroundsOnScroll && m_style->hasFixedBackgroundImage(); 585 586 #if USE(ACCELERATED_COMPOSITING) 587 bool drawsRootBackground = isRoot() || (isBody() && !rendererHasBackground(document().documentElement()->renderer())); 588 if (drawsRootBackground && repaintFixedBackgroundsOnScroll) { 589 if (view().compositor().supportsFixedRootBackgroundCompositing()) { 590 if (newStyleSlowScroll && newStyle->hasEntirelyFixedBackground()) 591 newStyleSlowScroll = false; 592 593 if (oldStyleSlowScroll && m_style->hasEntirelyFixedBackground()) 594 oldStyleSlowScroll = false; 595 } 596 } 597 #endif 598 if (oldStyleSlowScroll != newStyleSlowScroll) { 599 if (oldStyleSlowScroll) 600 view().frameView().removeSlowRepaintObject(this); 601 602 if (newStyleSlowScroll) 603 view().frameView().addSlowRepaintObject(this); 604 } 605 } 606 607 static bool areNonIdenticalCursorListsEqual(const RenderStyle* a, const RenderStyle* b) 608 { 609 ASSERT(a->cursors() != b->cursors()); 610 return a->cursors() && b->cursors() && *a->cursors() == *b->cursors(); 611 } 612 613 static inline bool areCursorsEqual(const RenderStyle* a, const RenderStyle* b) 614 { 615 return a->cursor() == b->cursor() && (a->cursors() == b->cursors() || areNonIdenticalCursorListsEqual(a, b)); 616 } 617 618 void RenderElement::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) 619 { 620 if (s_affectsParentBlock) 621 handleDynamicFloatPositionChange(); 622 623 if (s_noLongerAffectsParentBlock) 624 removeAnonymousWrappersForInlinesIfNecessary(); 625 #if ENABLE(SVG) 626 SVGRenderSupport::styleChanged(this); 627 #endif 628 629 if (!m_parent) 630 return; 631 632 if (diff == StyleDifferenceLayout || diff == StyleDifferenceSimplifiedLayout) { 633 RenderCounter::rendererStyleChanged(this, oldStyle, m_style.get()); 634 635 // If the object already needs layout, then setNeedsLayout won't do 636 // any work. But if the containing block has changed, then we may need 637 // to mark the new containing blocks for layout. The change that can 638 // directly affect the containing block of this object is a change to 639 // the position style. 640 if (needsLayout() && oldStyle->position() != m_style->position()) 641 markContainingBlocksForLayout(); 642 643 if (diff == StyleDifferenceLayout) 644 setNeedsLayoutAndPrefWidthsRecalc(); 645 else 646 setNeedsSimplifiedNormalFlowLayout(); 647 } else if (diff == StyleDifferenceSimplifiedLayoutAndPositionedMovement) { 648 setNeedsPositionedMovementLayout(oldStyle); 649 setNeedsSimplifiedNormalFlowLayout(); 650 } else if (diff == StyleDifferenceLayoutPositionedMovementOnly) 651 setNeedsPositionedMovementLayout(oldStyle); 652 653 // Don't check for repaint here; we need to wait until the layer has been 654 // updated by subclasses before we know if we have to repaint (in setStyle()). 655 656 if (oldStyle && !areCursorsEqual(oldStyle, style())) 657 frame().eventHandler().scheduleCursorUpdate(); 658 } 659 447 660 void RenderElement::insertedIntoTree() 448 661 { … … 481 694 removeLayers(layer); 482 695 } 696 697 bool repaintFixedBackgroundsOnScroll = shouldRepaintFixedBackgroundsOnScroll(&view().frameView()); 698 if (repaintFixedBackgroundsOnScroll && m_style && m_style->hasFixedBackgroundImage()) 699 view().frameView().removeSlowRepaintObject(this); 700 701 if (isOutOfFlowPositioned() && parent()->childrenInline()) 702 parent()->dirtyLinesFromChangedChild(this); 483 703 484 704 RenderObject::willBeRemovedFromTree(); -
trunk/Source/WebCore/rendering/RenderElement.h
r156310 r156312 67 67 bool layerCreationAllowedForSubtree() const; 68 68 69 enum StylePropagationType { PropagateToAllChildren, PropagateToBlockChildrenOnly }; 70 void propagateStyleToAnonymousChildren(StylePropagationType); 71 69 72 LayoutUnit valueForLength(const Length&, LayoutUnit maximumValue, bool roundPercentages = false) const; 70 73 LayoutUnit minimumValueForLength(const Length&, LayoutUnit maximumValue, bool roundPercentages = false) const; … … 74 77 void destroyLeftoverChildren(); 75 78 79 virtual void styleWillChange(StyleDifference, const RenderStyle*) OVERRIDE; 80 virtual void styleDidChange(StyleDifference, const RenderStyle*) OVERRIDE; 76 81 virtual void insertedIntoTree() OVERRIDE; 77 82 virtual void willBeRemovedFromTree() OVERRIDE; … … 85 90 void isRenderElement() const WTF_DELETED_FUNCTION; 86 91 87 virtual RenderObject* firstChildSlow() const { return firstChild(); }88 virtual RenderObject* lastChildSlow() const { return lastChild(); }92 virtual RenderObject* firstChildSlow() const OVERRIDE FINAL { return firstChild(); } 93 virtual RenderObject* lastChildSlow() const OVERRIDE FINAL { return lastChild(); } 89 94 90 95 RenderObject* m_firstChild; 91 96 RenderObject* m_lastChild; 97 98 // FIXME: Get rid of this hack. 99 // Store state between styleWillChange and styleDidChange 100 static bool s_affectsParentBlock; 101 static bool s_noLongerAffectsParentBlock; 92 102 }; 93 103 -
trunk/Source/WebCore/rendering/RenderObject.cpp
r156310 r156312 30 30 #include "AXObjectCache.h" 31 31 #include "AnimationController.h" 32 #include "CursorList.h"33 32 #include "EventHandler.h" 34 33 #include "FloatQuad.h" … … 66 65 #include <wtf/StackStats.h> 67 66 68 #if USE(ACCELERATED_COMPOSITING)69 #include "RenderLayerCompositor.h"70 #endif71 72 67 #if ENABLE(SVG) 73 68 #include "RenderSVGResourceContainer.h" … … 107 102 108 103 COMPILE_ASSERT(sizeof(RenderObject) == sizeof(SameSizeAsRenderObject), RenderObject_should_stay_small); 109 110 // On low-powered/mobile devices, preventing blitting on a scroll can cause noticeable delays111 // when scrolling a page with a fixed background image. As an optimization, assuming there are112 // no fixed positoned elements on the page, we can acclerate scrolling (via blitting) if we113 // ignore the CSS property "background-attachment: fixed".114 static bool shouldRepaintFixedBackgroundsOnScroll(FrameView* frameView)115 {116 #if !ENABLE(FAST_MOBILE_SCROLLING) || !PLATFORM(QT)117 UNUSED_PARAM(frameView);118 #endif119 120 bool repaintFixedBackgroundsOnScroll = true;121 #if ENABLE(FAST_MOBILE_SCROLLING)122 #if PLATFORM(QT)123 if (frameView->delegatesScrolling())124 repaintFixedBackgroundsOnScroll = false;125 #else126 repaintFixedBackgroundsOnScroll = false;127 #endif128 #endif129 return repaintFixedBackgroundsOnScroll;130 }131 132 bool RenderObject::s_affectsParentBlock = false;133 bool RenderObject::s_noLongerAffectsParentBlock = false;134 104 135 105 RenderObjectAncestorLineboxDirtySet* RenderObject::s_ancestorLineboxDirtySet = 0; … … 1789 1759 } 1790 1760 1791 inlinebool RenderObject::shouldRepaintForStyleDifference(StyleDifference diff) const1761 bool RenderObject::shouldRepaintForStyleDifference(StyleDifference diff) const 1792 1762 { 1793 1763 return diff == StyleDifferenceRepaint || (diff == StyleDifferenceRepaintIfText && hasImmediateNonWhitespaceTextChild()); … … 1863 1833 // not having an outline to having an outline. 1864 1834 repaint(); 1865 }1866 }1867 1868 static inline bool rendererHasBackground(const RenderObject* renderer)1869 {1870 return renderer && renderer->hasBackground();1871 }1872 1873 void RenderObject::styleWillChange(StyleDifference diff, const RenderStyle* newStyle)1874 {1875 if (m_style) {1876 // If our z-index changes value or our visibility changes,1877 // we need to dirty our stacking context's z-order list.1878 if (newStyle) {1879 bool visibilityChanged = m_style->visibility() != newStyle->visibility()1880 || m_style->zIndex() != newStyle->zIndex()1881 || m_style->hasAutoZIndex() != newStyle->hasAutoZIndex();1882 #if ENABLE(DASHBOARD_SUPPORT) || ENABLE(DRAGGABLE_REGION)1883 if (visibilityChanged)1884 document().setAnnotatedRegionsDirty(true);1885 #endif1886 if (visibilityChanged) {1887 if (AXObjectCache* cache = document().existingAXObjectCache())1888 cache->childrenChanged(parent());1889 }1890 1891 // Keep layer hierarchy visibility bits up to date if visibility changes.1892 if (m_style->visibility() != newStyle->visibility()) {1893 if (RenderLayer* l = enclosingLayer()) {1894 if (newStyle->visibility() == VISIBLE)1895 l->setHasVisibleContent();1896 else if (l->hasVisibleContent() && (this == &l->renderer() || l->renderer().style()->visibility() != VISIBLE)) {1897 l->dirtyVisibleContentStatus();1898 if (diff > StyleDifferenceRepaintLayer)1899 repaint();1900 }1901 }1902 }1903 }1904 1905 if (m_parent && (newStyle->outlineSize() < m_style->outlineSize() || shouldRepaintForStyleDifference(diff)))1906 repaint();1907 if (isFloating() && (m_style->floating() != newStyle->floating()))1908 // For changes in float styles, we need to conceivably remove ourselves1909 // from the floating objects list.1910 toRenderBox(this)->removeFloatingOrPositionedChildFromBlockLists();1911 else if (isOutOfFlowPositioned() && (m_style->position() != newStyle->position()))1912 // For changes in positioning styles, we need to conceivably remove ourselves1913 // from the positioned objects list.1914 toRenderBox(this)->removeFloatingOrPositionedChildFromBlockLists();1915 1916 s_affectsParentBlock = isFloatingOrOutOfFlowPositioned()1917 && (!newStyle->isFloating() && !newStyle->hasOutOfFlowPosition())1918 && parent() && (parent()->isRenderBlockFlow() || parent()->isRenderInline());1919 1920 s_noLongerAffectsParentBlock = ((!isFloating() && newStyle->isFloating()) || (!isOutOfFlowPositioned() && newStyle->hasOutOfFlowPosition()))1921 && parent() && parent()->isRenderBlock();1922 1923 // reset style flags1924 if (diff == StyleDifferenceLayout || diff == StyleDifferenceLayoutPositionedMovementOnly) {1925 setFloating(false);1926 clearPositionedState();1927 }1928 setHorizontalWritingMode(true);1929 setHasBoxDecorations(false);1930 setHasOverflowClip(false);1931 setHasTransform(false);1932 setHasReflection(false);1933 } else {1934 s_affectsParentBlock = false;1935 s_noLongerAffectsParentBlock = false;1936 }1937 1938 bool repaintFixedBackgroundsOnScroll = shouldRepaintFixedBackgroundsOnScroll(&view().frameView());1939 1940 bool newStyleSlowScroll = newStyle && repaintFixedBackgroundsOnScroll && newStyle->hasFixedBackgroundImage();1941 bool oldStyleSlowScroll = m_style && repaintFixedBackgroundsOnScroll && m_style->hasFixedBackgroundImage();1942 1943 #if USE(ACCELERATED_COMPOSITING)1944 bool drawsRootBackground = isRoot() || (isBody() && !rendererHasBackground(document().documentElement()->renderer()));1945 if (drawsRootBackground && repaintFixedBackgroundsOnScroll) {1946 if (view().compositor().supportsFixedRootBackgroundCompositing()) {1947 if (newStyleSlowScroll && newStyle->hasEntirelyFixedBackground())1948 newStyleSlowScroll = false;1949 1950 if (oldStyleSlowScroll && m_style->hasEntirelyFixedBackground())1951 oldStyleSlowScroll = false;1952 }1953 }1954 #endif1955 if (oldStyleSlowScroll != newStyleSlowScroll) {1956 if (oldStyleSlowScroll)1957 view().frameView().removeSlowRepaintObject(this);1958 1959 if (newStyleSlowScroll)1960 view().frameView().addSlowRepaintObject(this);1961 }1962 }1963 1964 static bool areNonIdenticalCursorListsEqual(const RenderStyle* a, const RenderStyle* b)1965 {1966 ASSERT(a->cursors() != b->cursors());1967 return a->cursors() && b->cursors() && *a->cursors() == *b->cursors();1968 }1969 1970 static inline bool areCursorsEqual(const RenderStyle* a, const RenderStyle* b)1971 {1972 return a->cursor() == b->cursor() && (a->cursors() == b->cursors() || areNonIdenticalCursorListsEqual(a, b));1973 }1974 1975 void RenderObject::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)1976 {1977 if (s_affectsParentBlock)1978 handleDynamicFloatPositionChange();1979 1980 if (s_noLongerAffectsParentBlock)1981 removeAnonymousWrappersForInlinesIfNecessary();1982 #if ENABLE(SVG)1983 SVGRenderSupport::styleChanged(this);1984 #endif1985 1986 if (!m_parent)1987 return;1988 1989 if (diff == StyleDifferenceLayout || diff == StyleDifferenceSimplifiedLayout) {1990 RenderCounter::rendererStyleChanged(this, oldStyle, m_style.get());1991 1992 // If the object already needs layout, then setNeedsLayout won't do1993 // any work. But if the containing block has changed, then we may need1994 // to mark the new containing blocks for layout. The change that can1995 // directly affect the containing block of this object is a change to1996 // the position style.1997 if (needsLayout() && oldStyle->position() != m_style->position())1998 markContainingBlocksForLayout();1999 2000 if (diff == StyleDifferenceLayout)2001 setNeedsLayoutAndPrefWidthsRecalc();2002 else2003 setNeedsSimplifiedNormalFlowLayout();2004 } else if (diff == StyleDifferenceSimplifiedLayoutAndPositionedMovement) {2005 setNeedsPositionedMovementLayout(oldStyle);2006 setNeedsSimplifiedNormalFlowLayout();2007 } else if (diff == StyleDifferenceLayoutPositionedMovementOnly)2008 setNeedsPositionedMovementLayout(oldStyle);2009 2010 // Don't check for repaint here; we need to wait until the layer has been2011 // updated by subclasses before we know if we have to repaint (in setStyle()).2012 2013 if (oldStyle && !areCursorsEqual(oldStyle, style()))2014 frame().eventHandler().scheduleCursorUpdate();2015 }2016 2017 void RenderObject::propagateStyleToAnonymousChildren(bool blockChildrenOnly)2018 {2019 // FIXME: We could save this call when the change only affected non-inherited properties.2020 for (RenderObject* child = firstChildSlow(); child; child = child->nextSibling()) {2021 if (!child->isAnonymous() || child->style()->styleType() != NOPSEUDO)2022 continue;2023 2024 if (blockChildrenOnly && !child->isRenderBlock())2025 continue;2026 2027 #if ENABLE(FULLSCREEN_API)2028 if (child->isRenderFullScreen() || child->isRenderFullScreenPlaceholder())2029 continue;2030 #endif2031 2032 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(style(), child->style()->display());2033 if (style()->specifiesColumns()) {2034 if (child->style()->specifiesColumns())2035 newStyle->inheritColumnPropertiesFrom(style());2036 if (child->style()->columnSpan())2037 newStyle->setColumnSpan(ColumnSpanAll);2038 }2039 2040 // Preserve the position style of anonymous block continuations as they can have relative or sticky position when2041 // they contain block descendants of relative or sticky positioned inlines.2042 if (child->isInFlowPositioned() && toRenderBlock(child)->isAnonymousBlockContinuation())2043 newStyle->setPosition(child->style()->position());2044 2045 child->setStyle(newStyle.release());2046 1835 } 2047 1836 } … … 2466 2255 { 2467 2256 // FIXME: We should ASSERT(isRooted()) but we have some out-of-order removals which would need to be fixed first. 2468 2469 if (!isText()) {2470 bool repaintFixedBackgroundsOnScroll = shouldRepaintFixedBackgroundsOnScroll(&view().frameView());2471 if (repaintFixedBackgroundsOnScroll && m_style && m_style->hasFixedBackgroundImage())2472 view().frameView().removeSlowRepaintObject(this);2473 }2474 2475 if (isOutOfFlowPositioned() && parent()->childrenInline())2476 parent()->dirtyLinesFromChangedChild(this);2477 2257 2478 2258 removeFromRenderFlowThread(); -
trunk/Source/WebCore/rendering/RenderObject.h
r156310 r156312 967 967 protected: 968 968 // Overrides should call the superclass at the end 969 virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);969 virtual void styleWillChange(StyleDifference, const RenderStyle*) { } 970 970 // Overrides should call the superclass at the start 971 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); 972 void propagateStyleToAnonymousChildren(bool blockChildrenOnly = false); 971 virtual void styleDidChange(StyleDifference, const RenderStyle*) { } 973 972 974 973 void drawLineForBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, BoxSide, … … 1152 1151 void setIsDragging(bool b) { m_bitfields.setIsDragging(b); } 1153 1152 void setEverHadLayout(bool b) { m_bitfields.setEverHadLayout(b); } 1154 1155 private:1156 // Store state between styleWillChange and styleDidChange1157 static bool s_affectsParentBlock;1158 static bool s_noLongerAffectsParentBlock;1159 1153 }; 1160 1154 -
trunk/Source/WebCore/rendering/RenderRuby.cpp
r156285 r156312 122 122 { 123 123 RenderInline::styleDidChange(diff, oldStyle); 124 propagateStyleToAnonymousChildren( );124 propagateStyleToAnonymousChildren(PropagateToAllChildren); 125 125 } 126 126 … … 228 228 { 229 229 RenderBlock::styleDidChange(diff, oldStyle); 230 propagateStyleToAnonymousChildren( );230 propagateStyleToAnonymousChildren(PropagateToAllChildren); 231 231 } 232 232 -
trunk/Source/WebCore/rendering/RenderTable.cpp
r156285 r156312 79 79 { 80 80 RenderBlock::styleDidChange(diff, oldStyle); 81 propagateStyleToAnonymousChildren( );81 propagateStyleToAnonymousChildren(PropagateToAllChildren); 82 82 83 83 ETableLayout oldTableLayout = oldStyle ? oldStyle->tableLayout() : TAUTO; -
trunk/Source/WebCore/rendering/RenderTableRow.cpp
r156285 r156312 67 67 68 68 RenderBox::styleDidChange(diff, oldStyle); 69 propagateStyleToAnonymousChildren( );69 propagateStyleToAnonymousChildren(PropagateToAllChildren); 70 70 71 71 if (section() && oldStyle && style()->logicalHeight() != oldStyle->logicalHeight()) -
trunk/Source/WebCore/rendering/RenderTableSection.cpp
r156285 r156312 107 107 { 108 108 RenderBox::styleDidChange(diff, oldStyle); 109 propagateStyleToAnonymousChildren( );109 propagateStyleToAnonymousChildren(PropagateToAllChildren); 110 110 111 111 // If border was changed, notify table.
Note:
See TracChangeset
for help on using the changeset viewer.