Changeset 15722 in webkit
- Timestamp:
- Jul 31, 2006, 7:25:43 PM (19 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r15721 r15722 1 2006-07-31 David Hyatt <hyatt@apple.com> 2 3 Fix for bug 10179, digg.com scrolls slowly. Improve fixed positioning 4 and fixed backgrounds so that a count of them is kept on the FrameView. 5 This allows us to switch slow scrolling on and off as these objects come 6 and go. 7 8 * css/cssstyleselector.cpp: 9 (WebCore::CSSStyleSelector::adjustRenderStyle): 10 (WebCore::CSSStyleSelector::applyProperty): 11 * page/FrameView.cpp: 12 (WebCore::FrameViewPrivate::reset): 13 (WebCore::FrameView::layout): 14 (WebCore::FrameView::useSlowRepaints): 15 (WebCore::FrameView::setUseSlowRepaints): 16 (WebCore::FrameView::addSlowRepaintObject): 17 (WebCore::FrameView::removeSlowRepaintObject): 18 * page/FrameView.h: 19 * rendering/RenderBox.cpp: 20 (WebCore::RenderBox::paintBackgroundExtended): 21 * rendering/RenderObject.cpp: 22 (WebCore::RenderObject::setStyle): 23 * rendering/RenderView.cpp: 24 (WebCore::RenderView::paintBoxDecorations): 25 1 26 2006-07-31 David Hyatt <hyatt@apple.com> 2 27 -
trunk/WebCore/css/cssstyleselector.cpp
r15514 r15722 1087 1087 theme()->adjustStyle(this, style, e); 1088 1088 } 1089 1090 // Only use slow repaints if we actually have a background image.1091 // FIXME: We only need to invalidate the fixed regions when scrolling. It's total overkill to1092 // prevent the entire view from blitting on a scroll.1093 if (style->hasFixedBackgroundImage() && view)1094 view->useSlowRepaints();1095 1089 } 1096 1090 … … 2212 2206 { 2213 2207 case CSS_VAL_STATIC: 2214 p = StaticPosition; break; 2208 p = StaticPosition; 2209 break; 2215 2210 case CSS_VAL_RELATIVE: 2216 p = RelativePosition; break; 2211 p = RelativePosition; 2212 break; 2217 2213 case CSS_VAL_ABSOLUTE: 2218 p = AbsolutePosition; break; 2214 p = AbsolutePosition; 2215 break; 2219 2216 case CSS_VAL_FIXED: 2220 { 2221 if (view) 2222 view->useSlowRepaints(); 2223 p = FixedPosition; 2224 break; 2225 } 2217 p = FixedPosition; 2218 break; 2226 2219 default: 2227 2220 return; -
trunk/WebCore/page/FrameView.cpp
r15644 r15722 90 90 linkPressed = false; 91 91 useSlowRepaints = false; 92 slowRepaintObjectCount = 0; 92 93 dragTarget = 0; 93 94 borderTouched = false; … … 128 129 bool linkPressed; 129 130 bool useSlowRepaints; 131 unsigned slowRepaintObjectCount; 130 132 bool ignoreWheelEvents; 131 133 … … 513 515 return; 514 516 } 515 setStaticBackground( d->useSlowRepaints);517 setStaticBackground(useSlowRepaints()); 516 518 517 519 if (document->hasListenerType(Document::OVERFLOWCHANGED_LISTENER)) … … 1020 1022 } 1021 1023 1022 void FrameView::useSlowRepaints() 1024 bool FrameView::useSlowRepaints() const 1025 { 1026 return d->useSlowRepaints || d->slowRepaintObjectCount > 0; 1027 } 1028 1029 void FrameView::setUseSlowRepaints() 1023 1030 { 1024 1031 d->useSlowRepaints = true; 1025 1032 setStaticBackground(true); 1033 } 1034 1035 void FrameView::addSlowRepaintObject() 1036 { 1037 if (d->slowRepaintObjectCount == 0) 1038 setStaticBackground(true); 1039 d->slowRepaintObjectCount++; 1040 } 1041 1042 void FrameView::removeSlowRepaintObject() 1043 { 1044 d->slowRepaintObjectCount--; 1045 if (d->slowRepaintObjectCount == 0) 1046 setStaticBackground(d->useSlowRepaints); 1026 1047 } 1027 1048 -
trunk/WebCore/page/FrameView.h
r15498 r15722 208 208 void focusNextPrevNode(bool next); 209 209 210 void useSlowRepaints(); 210 bool useSlowRepaints() const; 211 void setUseSlowRepaints(); 212 void addSlowRepaintObject(); 213 void removeSlowRepaintObject(); 211 214 212 215 void setIgnoreWheelEvents(bool e); -
trunk/WebCore/rendering/RenderBox.cpp
r15666 r15722 500 500 501 501 if (isTransparent) 502 view()->frameView()-> useSlowRepaints(); // The parent must show behind the child.502 view()->frameView()->setUseSlowRepaints(); // The parent must show behind the child. 503 503 else 504 504 bgColor = Color::white; -
trunk/WebCore/rendering/RenderObject.cpp
r15639 r15722 2129 2129 } 2130 2130 2131 if (view()->frameView()) { 2132 // FIXME: A better solution would be to only invalidate the fixed regions when scrolling. It's overkill to 2133 // prevent the entire view from blitting on a scroll. 2134 bool oldStyleSlowScroll = style && (style->position() == FixedPosition || style->hasFixedBackgroundImage()); 2135 bool newStyleSlowScroll = m_style && (m_style->position() == FixedPosition || m_style->hasFixedBackgroundImage()); 2136 if (oldStyleSlowScroll != newStyleSlowScroll) { 2137 if (oldStyleSlowScroll) 2138 view()->frameView()->removeSlowRepaintObject(); 2139 if (newStyleSlowScroll) 2140 view()->frameView()->addSlowRepaintObject(); 2141 } 2142 } 2143 2131 2144 RenderStyle *oldStyle = m_style; 2132 2145 m_style = style; -
trunk/WebCore/rendering/RenderView.cpp
r15581 r15722 189 189 RenderLayer* layer = elt->renderer()->enclosingLayer(); 190 190 if (layer->isTransparent() || layer->transparentAncestor()) 191 frameView()-> useSlowRepaints();191 frameView()->setUseSlowRepaints(); 192 192 } 193 193 … … 199 199 // no background in the child document should show the parent's background. 200 200 if (elt || view()->isTransparent()) 201 frameView()-> useSlowRepaints(); // The parent must show behind the child.201 frameView()->setUseSlowRepaints(); // The parent must show behind the child. 202 202 else 203 203 i.p->fillRect(i.r, Color(Color::white));
Note:
See TracChangeset
for help on using the changeset viewer.