Changeset 86359 in webkit
- Timestamp:
- May 12, 2011 11:06:04 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r86358 r86359 1 2011-05-12 Levi Weintraub <leviw@chromium.org> 2 3 Reviewed by Simon Fraser. 4 5 Switch calculateBackgroundImageGeometry to use IntRect 6 https://bugs.webkit.org/show_bug.cgi?id=60671 7 8 Replacing the four ints passed into calculateBackgroundImageGeometry with an IntRect. 9 10 No new tests since this is just refactoring. 11 12 * rendering/RenderBox.cpp: 13 (WebCore::RenderBox::maskClipRect): 14 (WebCore::RenderBox::repaintLayerRectsForImage): 15 * rendering/RenderBoxModelObject.cpp: 16 (WebCore::RenderBoxModelObject::paintFillLayerExtended): 17 (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): 18 * rendering/RenderBoxModelObject.h: 19 1 20 2011-05-12 Carol Szabo <carol@webkit.org> 2 21 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r86315 r86359 1359 1359 51EC92650CE90DD400F90308 /* JSCustomSQLStatementErrorCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51EC925D0CE90DD400F90308 /* JSCustomSQLStatementErrorCallback.cpp */; }; 1360 1360 51FAFE340CECBF2D00BB3F24 /* DatabaseTrackerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FAFE330CECBF2D00BB3F24 /* DatabaseTrackerClient.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1361 51FB54F5113E364200821176 /* CloseEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FB54F4113E364200821176 /* CloseEvent.h */; }; 1362 51FB5504113E3E9100821176 /* JSCloseEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FB5502113E3E9100821176 /* JSCloseEvent.h */; }; 1363 51FB5505113E3E9100821176 /* JSCloseEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51FB5503113E3E9100821176 /* JSCloseEvent.cpp */; }; 1361 1364 521D46F611AEC98100514613 /* KillRingMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 521D46F511AEC98100514613 /* KillRingMac.mm */; }; 1362 1365 521D46F811AEC9B100514613 /* KillRing.h in Headers */ = {isa = PBXBuildFile; fileRef = 521D46F711AEC9B100514613 /* KillRing.h */; }; 1363 1366 54C50F7B0E801DF3009832A0 /* XMLDocumentParserLibxml2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 54C50F7A0E801DF3009832A0 /* XMLDocumentParserLibxml2.cpp */; }; 1364 51FB54F5113E364200821176 /* CloseEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FB54F4113E364200821176 /* CloseEvent.h */; };1365 1367 550A0BC9085F6039007353D6 /* QualifiedName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 550A0BC7085F6039007353D6 /* QualifiedName.cpp */; }; 1366 1368 550A0BCA085F6039007353D6 /* QualifiedName.h in Headers */ = {isa = PBXBuildFile; fileRef = 550A0BC8085F6039007353D6 /* QualifiedName.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 1417 1419 5D925B670F64D4DD00B847F0 /* ScrollBehavior.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D925B650F64D4DD00B847F0 /* ScrollBehavior.cpp */; }; 1418 1420 5D925B680F64D4DD00B847F0 /* ScrollBehavior.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D925B660F64D4DD00B847F0 /* ScrollBehavior.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1419 51FB5505113E3E9100821176 /* JSCloseEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51FB5503113E3E9100821176 /* JSCloseEvent.cpp */; };1420 51FB5504113E3E9100821176 /* JSCloseEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FB5502113E3E9100821176 /* JSCloseEvent.h */; };1421 1421 5DA5E0FC102B953800088CF9 /* JSWebSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DA5E0FA102B953800088CF9 /* JSWebSocket.cpp */; }; 1422 1422 5DA5E0FD102B953800088CF9 /* JSWebSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DA5E0FB102B953800088CF9 /* JSWebSocket.h */; }; … … 7883 7883 51F6A3D60663BF04004D2919 /* HTMLCanvasElement.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = HTMLCanvasElement.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 7884 7884 51FAFE330CECBF2D00BB3F24 /* DatabaseTrackerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseTrackerClient.h; sourceTree = "<group>"; }; 7885 51FB54F4113E364200821176 /* CloseEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CloseEvent.h; sourceTree = "<group>"; }; 7886 51FB54F6113E365900821176 /* CloseEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CloseEvent.idl; sourceTree = "<group>"; }; 7887 51FB5502113E3E9100821176 /* JSCloseEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCloseEvent.h; sourceTree = "<group>"; }; 7888 51FB5503113E3E9100821176 /* JSCloseEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCloseEvent.cpp; sourceTree = "<group>"; }; 7885 7889 521D46F511AEC98100514613 /* KillRingMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KillRingMac.mm; sourceTree = "<group>"; }; 7886 7890 521D46F711AEC9B100514613 /* KillRing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KillRing.h; sourceTree = "<group>"; }; 7887 7891 54C50F7A0E801DF3009832A0 /* XMLDocumentParserLibxml2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLDocumentParserLibxml2.cpp; sourceTree = "<group>"; }; 7888 51FB54F4113E364200821176 /* CloseEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CloseEvent.h; sourceTree = "<group>"; };7889 51FB54F6113E365900821176 /* CloseEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CloseEvent.idl; sourceTree = "<group>"; };7890 7892 550A0BC7085F6039007353D6 /* QualifiedName.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = QualifiedName.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 7891 7893 550A0BC8085F6039007353D6 /* QualifiedName.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = QualifiedName.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; … … 7943 7945 5D925B650F64D4DD00B847F0 /* ScrollBehavior.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollBehavior.cpp; sourceTree = "<group>"; }; 7944 7946 5D925B660F64D4DD00B847F0 /* ScrollBehavior.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollBehavior.h; sourceTree = "<group>"; }; 7945 51FB5503113E3E9100821176 /* JSCloseEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSCloseEvent.cpp; path = JSCloseEvent.cpp; sourceTree = "<group>"; };7946 51FB5502113E3E9100821176 /* JSCloseEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSCloseEvent.h; path = JSCloseEvent.h; sourceTree = "<group>"; };7947 7947 5DA5E0FA102B953800088CF9 /* JSWebSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebSocket.cpp; sourceTree = "<group>"; }; 7948 7948 5DA5E0FB102B953800088CF9 /* JSWebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebSocket.h; sourceTree = "<group>"; }; -
trunk/Source/WebCore/rendering/RenderBox.cpp
r86303 r86359 975 975 IntPoint phase; 976 976 IntSize tileSize; 977 calculateBackgroundImageGeometry(maskLayer, bbox .x(), bbox.y(), bbox.width(), bbox.height(), maskRect, phase, tileSize);977 calculateBackgroundImageGeometry(maskLayer, bbox, maskRect, phase, tileSize); 978 978 result.unite(maskRect); 979 979 } … … 1069 1069 IntPoint phase; 1070 1070 IntSize tileSize; 1071 layerRenderer->calculateBackgroundImageGeometry(curLayer, rendererRect .x(), rendererRect.y(), rendererRect.width(), rendererRect.height(), repaintRect, phase, tileSize);1071 layerRenderer->calculateBackgroundImageGeometry(curLayer, rendererRect, repaintRect, phase, tileSize); 1072 1072 layerRenderer->repaintRectangle(repaintRect); 1073 1073 if (repaintRect == rendererRect) -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r86303 r86359 760 760 IntSize tileSize; 761 761 762 calculateBackgroundImageGeometry(bgLayer, scrolledPaintRect .x(), scrolledPaintRect.y(), scrolledPaintRect.width(), scrolledPaintRect.height(), destRect, phase, tileSize);762 calculateBackgroundImageGeometry(bgLayer, scrolledPaintRect, destRect, phase, tileSize); 763 763 IntPoint destOrigin = destRect.location(); 764 764 destRect.intersect(paintInfo.rect); … … 835 835 } 836 836 837 void RenderBoxModelObject::calculateBackgroundImageGeometry(const FillLayer* fillLayer, int tx, int ty, int w, int h,837 void RenderBoxModelObject::calculateBackgroundImageGeometry(const FillLayer* fillLayer, const IntRect& paintRect, 838 838 IntRect& destRect, IntPoint& phase, IntSize& tileSize) 839 839 { … … 857 857 858 858 if (!fixedAttachment) { 859 destRect = IntRect(tx, ty, w, h);859 destRect = paintRect; 860 860 861 861 int right = 0; … … 883 883 top += marginTop(); 884 884 } else 885 positioningAreaSize = IntSize( w - left - right, h- top - bottom);885 positioningAreaSize = IntSize(paintRect.width() - left - right, paintRect.height() - top - bottom); 886 886 } else { 887 887 destRect = viewRect(); … … 913 913 914 914 if (fixedAttachment) 915 phase.move(max( tx - destRect.x(), 0), max(ty- destRect.y(), 0));916 917 destRect.intersect( IntRect(tx, ty, w, h));915 phase.move(max(paintRect.x() - destRect.x(), 0), max(paintRect.y() - destRect.y(), 0)); 916 917 destRect.intersect(paintRect); 918 918 } 919 919 -
trunk/Source/WebCore/rendering/RenderBoxModelObject.h
r86303 r86359 135 135 virtual void setSelectionState(SelectionState s); 136 136 protected: 137 void calculateBackgroundImageGeometry(const FillLayer*, int tx, int ty, int w, int h, IntRect& destRect, IntPoint& phase, IntSize& tileSize);137 void calculateBackgroundImageGeometry(const FillLayer*, const IntRect& paintRect, IntRect& destRect, IntPoint& phase, IntSize& tileSize); 138 138 void getBorderEdgeInfo(class BorderEdge[], bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const; 139 139 bool borderObscuresBackgroundEdge(const FloatSize& contextScale) const;
Note: See TracChangeset
for help on using the changeset viewer.