Title: [102032] branches/safari-534.53-branch/Source/WebCore

Diff

Modified: branches/safari-534.53-branch/Source/WebCore/ChangeLog (102031 => 102032)


--- branches/safari-534.53-branch/Source/WebCore/ChangeLog	2011-12-05 20:59:24 UTC (rev 102031)
+++ branches/safari-534.53-branch/Source/WebCore/ChangeLog	2011-12-05 21:03:34 UTC (rev 102032)
@@ -1,5 +1,56 @@
 2011-12-05  Lucas Forschler  <[email protected]>
 
+    Merge 94900
+
+    2011-09-09  Beth Dakin  <[email protected]>
+
+            Fix for https://bugs.webkit.org/show_bug.cgi?id=67819
+            Use high resolution platform images when the deviceScaleFactor > 1
+            -and corresponding-
+            <rdar://problem/10003098>
+
+            Reviewed by Darin Adler.
+
+            Add all of the new high resolution images. I also removed some tiffs from the 
+            project and replaced them with png equivalents (that are already checked into 
+            WebCore anyway). Since the high resolution images are pngs, it makes sense to use 
+            pngs for all of the images that load through Image::loadPlatformResource()
+            * WebCore.xcodeproj/project.pbxproj:
+            * platform/graphics/mac/ImageMac.mm:
+            (WebCore::Image::loadPlatformResource):
+
+            Load the @2x resource for deviceScaleFactors >= 2.
+            * editing/DeleteButtonController.cpp:
+            (WebCore::DeleteButtonController::createDeletionUI):
+
+            CachedImage::brokenImage() is no longer a static helper function, but a real 
+            member function. It also now loads the @2x resource for deviceScaleFactors >= 2 
+            and takes a parameter for the deviceScaleFactor. When CachedImage::image() returns 
+            the brokenImage(), it just returns the 1x version. brokenImage() has to be called 
+            directly to reliably return the deviceScaleFactor-appropriate resource.
+            * loader/cache/CachedImage.cpp:
+            (WebCore::CachedImage::brokenImage):
+            (WebCore::CachedImage::image):
+            * loader/cache/CachedImage.h:
+            * rendering/RenderLayer.cpp:
+            (WebCore::RenderLayer::drawPlatformResizerImage):
+            (WebCore::RenderLayer::paintResizer):
+            * rendering/RenderLayer.h:
+
+            New static function to retrieve the deviceScaleFactor for callers that do not have 
+            direct access to a Page.
+            * page/Page.cpp:
+            (WebCore::Page::deviceScaleFactor):
+            * page/Page.h:
+
+            Call CachedImage::brokenImage() for the broken-image image at an accurate 
+            resolution.
+            * rendering/RenderImage.cpp:
+            (WebCore::RenderImage::imageSizeForError):
+            (WebCore::RenderImage::paintReplaced):
+
+2011-12-05  Lucas Forschler  <[email protected]>
+
     Merge 94597
 
     2011-09-06  David Hyatt  <[email protected]>

Copied: branches/safari-534.53-branch/Source/WebCore/Resources/[email protected] (from rev 94900, trunk/Source/WebCore/Resources/[email protected])


(Binary files differ)

Copied: branches/safari-534.53-branch/Source/WebCore/Resources/[email protected] (from rev 94900, trunk/Source/WebCore/Resources/[email protected])


(Binary files differ)

Copied: branches/safari-534.53-branch/Source/WebCore/Resources/[email protected] (from rev 94900, trunk/Source/WebCore/Resources/[email protected])


(Binary files differ)

Copied: branches/safari-534.53-branch/Source/WebCore/Resources/[email protected] (from rev 94900, trunk/Source/WebCore/Resources/[email protected])


(Binary files differ)

Copied: branches/safari-534.53-branch/Source/WebCore/Resources/[email protected] (from rev 94900, trunk/Source/WebCore/Resources/[email protected])


(Binary files differ)

Modified: branches/safari-534.53-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (102031 => 102032)


--- branches/safari-534.53-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2011-12-05 20:59:24 UTC (rev 102031)
+++ branches/safari-534.53-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2011-12-05 21:03:34 UTC (rev 102032)
@@ -534,8 +534,6 @@
 		1C11CCC60AA6093700DADB20 /* DOMDocumentFragment.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 85089CD30A98C42800A275AA /* DOMDocumentFragment.h */; };
 		1C11CCC70AA6093700DADB20 /* DOMCDATASection.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 85089CCF0A98C42700A275AA /* DOMCDATASection.h */; };
 		1C11CCC80AA6093700DADB20 /* DOMHTMLElement.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 85DF2EEB0AA387CB00AD64C5 /* DOMHTMLElement.h */; };
-		1C14E76B0AD8C81C00B6158B /* deleteButtonPressed.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 1C14E7690AD8C81C00B6158B /* deleteButtonPressed.tiff */; };
-		1C14E76C0AD8C81C00B6158B /* deleteButton.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 1C14E76A0AD8C81C00B6158B /* deleteButton.tiff */; };
 		1C26497A0D7E248A00BD10F2 /* DocumentLoaderMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C2649790D7E248A00BD10F2 /* DocumentLoaderMac.cpp */; };
 		1C26497C0D7E24EC00BD10F2 /* PageMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C26497B0D7E24EC00BD10F2 /* PageMac.cpp */; };
 		1C4C8F020AD85D87009475CE /* DeleteButtonController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C4C8F000AD85D87009475CE /* DeleteButtonController.h */; };
@@ -1551,7 +1549,6 @@
 		72626E020EF022FE00A07E20 /* FontFastPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 72626E010EF022FE00A07E20 /* FontFastPath.cpp */; };
 		750D029311D0E7F300BD1B27 /* RenderInputSpeech.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 750D029111D0E7F300BD1B27 /* RenderInputSpeech.cpp */; };
 		750D029411D0E7F300BD1B27 /* RenderInputSpeech.h in Headers */ = {isa = PBXBuildFile; fileRef = 750D029211D0E7F300BD1B27 /* RenderInputSpeech.h */; };
-		750D02C111D0EE7D00BD1B27 /* inputSpeech.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 750D02C011D0EE7D00BD1B27 /* inputSpeech.tiff */; };
 		7535BC9412020CFF0037EC45 /* SpeechInputClientMock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7535BC9212020CFF0037EC45 /* SpeechInputClientMock.cpp */; };
 		7535BC9512020CFF0037EC45 /* SpeechInputClientMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 7535BC9312020CFF0037EC45 /* SpeechInputClientMock.h */; };
 		754133A8102E00E800075D00 /* InspectorTimelineAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 754133A7102E00E800075D00 /* InspectorTimelineAgent.h */; };
@@ -2771,6 +2768,14 @@
 		9307F1D80AF2D59000DBA31A /* HitTestResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 9307F1D60AF2D59000DBA31A /* HitTestResult.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		930908910AF7EDE40081DF01 /* HitTestRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 930908900AF7EDE40081DF01 /* HitTestRequest.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		930FC68A1072B9280045293E /* TextRenderingMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 930FC6891072B9280045293E /* TextRenderingMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		93153BCD1417FBBF00FCF5BE /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 93153BCC1417FBBF00FCF5BE /* [email protected] */; };
+		93153BCF1417FBDB00FCF5BE /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 93153BCE1417FBDB00FCF5BE /* [email protected] */; };
+		93153BDA14181F7A00FCF5BE /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 93153BD914181F7A00FCF5BE /* [email protected] */; };
+		93153BDC141959BC00FCF5BE /* textAreaResizeCorner.png in Resources */ = {isa = PBXBuildFile; fileRef = 93153BDB141959BB00FCF5BE /* textAreaResizeCorner.png */; };
+		93153BDE141959F400FCF5BE /* deleteButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 93153BDD141959F400FCF5BE /* deleteButton.png */; };
+		93153BE014195A2800FCF5BE /* deleteButtonPressed.png in Resources */ = {isa = PBXBuildFile; fileRef = 93153BDF14195A2800FCF5BE /* deleteButtonPressed.png */; };
+		93153BE214195A5700FCF5BE /* missingImage.png in Resources */ = {isa = PBXBuildFile; fileRef = 93153BE114195A5700FCF5BE /* missingImage.png */; };
+		93153BE414195B2A00FCF5BE /* inputSpeech.png in Resources */ = {isa = PBXBuildFile; fileRef = 93153BE314195B2900FCF5BE /* inputSpeech.png */; };
 		931BCC611124DFCB00BE70DD /* MediaCanStartListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 931BCC601124DFCB00BE70DD /* MediaCanStartListener.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		9326DC0C09DAD5D600AFC847 /* CharsetData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 656581AC09D14EE6000E61D7 /* CharsetData.cpp */; };
 		9327A94209968D1A0068A546 /* HTMLOptionsCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9327A94109968D1A0068A546 /* HTMLOptionsCollection.cpp */; };
@@ -2891,6 +2896,7 @@
 		9362640B0DE1137D009D5A00 /* CSSReflectionDirection.h in Headers */ = {isa = PBXBuildFile; fileRef = 9362640A0DE1137D009D5A00 /* CSSReflectionDirection.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		9363B62C0F8E8FE000803810 /* HistoryPropertyList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9363B62A0F8E8FE000803810 /* HistoryPropertyList.cpp */; };
 		9363B62D0F8E8FE000803810 /* HistoryPropertyList.h in Headers */ = {isa = PBXBuildFile; fileRef = 9363B62B0F8E8FE000803810 /* HistoryPropertyList.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		9370918D1416D86B00477333 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 9370918C1416D86B00477333 /* [email protected] */; };
 		93799EF80BF2743600D0F230 /* RenderWordBreak.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93799EF60BF2743600D0F230 /* RenderWordBreak.cpp */; };
 		93799EF90BF2743600D0F230 /* RenderWordBreak.h in Headers */ = {isa = PBXBuildFile; fileRef = 93799EF70BF2743600D0F230 /* RenderWordBreak.h */; };
 		9380F47309A11AB4001FDB34 /* Widget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9380F47109A11AB4001FDB34 /* Widget.cpp */; };
@@ -4072,7 +4078,6 @@
 		AB247A6C0AFD6383003FA5FD /* RenderSlider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB247A6A0AFD6383003FA5FD /* RenderSlider.cpp */; };
 		AB247A6D0AFD6383003FA5FD /* RenderSlider.h in Headers */ = {isa = PBXBuildFile; fileRef = AB247A6B0AFD6383003FA5FD /* RenderSlider.h */; };
 		AB31C91E10AE1B8E000C7B92 /* LineClampValue.h in Headers */ = {isa = PBXBuildFile; fileRef = AB31C91D10AE1B8E000C7B92 /* LineClampValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		AB4261D80A2F6C9700BDD17D /* missingImage.tiff in Resources */ = {isa = PBXBuildFile; fileRef = AB4261D70A2F6C9700BDD17D /* missingImage.tiff */; };
 		AB4CB4EB0B8BDA3D009F40B0 /* JSHTMLSelectElementCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = AB4CB4EA0B8BDA3D009F40B0 /* JSHTMLSelectElementCustom.h */; };
 		AB67D1A8097F3AE300F9392E /* RenderTextControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB67D1A6097F3AE300F9392E /* RenderTextControl.cpp */; };
 		AB67D1A9097F3AE300F9392E /* RenderTextControl.h in Headers */ = {isa = PBXBuildFile; fileRef = AB67D1A7097F3AE300F9392E /* RenderTextControl.h */; };
@@ -5619,7 +5624,6 @@
 		E4D687790ED7AE4F006EA978 /* PurgeableBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = E4D687780ED7AE4F006EA978 /* PurgeableBuffer.h */; };
 		E4EEFFC80D34550C00469A58 /* JSAudioConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4EEFFC60D34550C00469A58 /* JSAudioConstructor.cpp */; };
 		E4EEFFC90D34550C00469A58 /* JSAudioConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = E4EEFFC70D34550C00469A58 /* JSAudioConstructor.h */; };
-		ED048ABC0833F132006E1E67 /* textAreaResizeCorner.tiff in Resources */ = {isa = PBXBuildFile; fileRef = ED048ABB0833F132006E1E67 /* textAreaResizeCorner.tiff */; };
 		ED2BA83C09A24B91006C0AC4 /* DocumentMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = ED2BA83B09A24B91006C0AC4 /* DocumentMarker.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		ED501DC60B249F2900AE18D9 /* EditorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED501DC50B249F2900AE18D9 /* EditorMac.mm */; };
 		EDE3A5000C7A430600956A37 /* ColorMac.h in Headers */ = {isa = PBXBuildFile; fileRef = EDE3A4FF0C7A430600956A37 /* ColorMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -6961,8 +6965,6 @@
 		1AFE118C0CBFFC4E003017FA /* SQLResultSetRowList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SQLResultSetRowList.idl; sourceTree = "<group>"; };
 		1AFE11970CBFFCC4003017FA /* JSSQLResultSetRowList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSQLResultSetRowList.cpp; sourceTree = "<group>"; };
 		1AFE11980CBFFCC4003017FA /* JSSQLResultSetRowList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSQLResultSetRowList.h; sourceTree = "<group>"; };
-		1C14E7690AD8C81C00B6158B /* deleteButtonPressed.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = deleteButtonPressed.tiff; sourceTree = "<group>"; };
-		1C14E76A0AD8C81C00B6158B /* deleteButton.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = deleteButton.tiff; sourceTree = "<group>"; };
 		1C2649790D7E248A00BD10F2 /* DocumentLoaderMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentLoaderMac.cpp; sourceTree = "<group>"; };
 		1C26497B0D7E24EC00BD10F2 /* PageMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageMac.cpp; sourceTree = "<group>"; };
 		1C4C8EFF0AD85D87009475CE /* DeleteButtonController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeleteButtonController.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
@@ -8104,7 +8106,6 @@
 		72626E010EF022FE00A07E20 /* FontFastPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontFastPath.cpp; sourceTree = "<group>"; };
 		750D029111D0E7F300BD1B27 /* RenderInputSpeech.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderInputSpeech.cpp; sourceTree = "<group>"; };
 		750D029211D0E7F300BD1B27 /* RenderInputSpeech.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderInputSpeech.h; sourceTree = "<group>"; };
-		750D02C011D0EE7D00BD1B27 /* inputSpeech.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = inputSpeech.tiff; sourceTree = "<group>"; };
 		7535BC9212020CFF0037EC45 /* SpeechInputClientMock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SpeechInputClientMock.cpp; path = mock/SpeechInputClientMock.cpp; sourceTree = "<group>"; };
 		7535BC9312020CFF0037EC45 /* SpeechInputClientMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SpeechInputClientMock.h; path = mock/SpeechInputClientMock.h; sourceTree = "<group>"; };
 		754133A7102E00E800075D00 /* InspectorTimelineAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorTimelineAgent.h; sourceTree = "<group>"; };
@@ -9296,6 +9297,14 @@
 		9307F1D60AF2D59000DBA31A /* HitTestResult.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HitTestResult.h; sourceTree = "<group>"; };
 		930908900AF7EDE40081DF01 /* HitTestRequest.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HitTestRequest.h; sourceTree = "<group>"; };
 		930FC6891072B9280045293E /* TextRenderingMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextRenderingMode.h; sourceTree = "<group>"; };
+		93153BCC1417FBBF00FCF5BE /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
+		93153BCE1417FBDB00FCF5BE /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
+		93153BD914181F7A00FCF5BE /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
+		93153BDB141959BB00FCF5BE /* textAreaResizeCorner.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = textAreaResizeCorner.png; sourceTree = "<group>"; };
+		93153BDD141959F400FCF5BE /* deleteButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = deleteButton.png; sourceTree = "<group>"; };
+		93153BDF14195A2800FCF5BE /* deleteButtonPressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = deleteButtonPressed.png; sourceTree = "<group>"; };
+		93153BE114195A5700FCF5BE /* missingImage.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = missingImage.png; sourceTree = "<group>"; };
+		93153BE314195B2900FCF5BE /* inputSpeech.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = inputSpeech.png; sourceTree = "<group>"; };
 		931BCC601124DFCB00BE70DD /* MediaCanStartListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaCanStartListener.h; sourceTree = "<group>"; };
 		9327A94109968D1A0068A546 /* HTMLOptionsCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLOptionsCollection.cpp; sourceTree = "<group>"; };
 		932871BF0B20DEB70049035A /* PlatformMenuDescription.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PlatformMenuDescription.h; sourceTree = "<group>"; };
@@ -9417,6 +9426,7 @@
 		9363B62A0F8E8FE000803810 /* HistoryPropertyList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HistoryPropertyList.cpp; sourceTree = "<group>"; };
 		9363B62B0F8E8FE000803810 /* HistoryPropertyList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HistoryPropertyList.h; sourceTree = "<group>"; };
 		936DD03A09CEAC270056AE8C /* Range.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Range.idl; sourceTree = "<group>"; };
+		9370918C1416D86B00477333 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
 		93799EF60BF2743600D0F230 /* RenderWordBreak.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderWordBreak.cpp; sourceTree = "<group>"; };
 		93799EF70BF2743600D0F230 /* RenderWordBreak.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderWordBreak.h; sourceTree = "<group>"; };
 		9380F47109A11AB4001FDB34 /* Widget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Widget.cpp; sourceTree = "<group>"; };
@@ -10344,7 +10354,6 @@
 		AB247A6A0AFD6383003FA5FD /* RenderSlider.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSlider.cpp; sourceTree = "<group>"; };
 		AB247A6B0AFD6383003FA5FD /* RenderSlider.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderSlider.h; sourceTree = "<group>"; };
 		AB31C91D10AE1B8E000C7B92 /* LineClampValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LineClampValue.h; path = style/LineClampValue.h; sourceTree = "<group>"; };
-		AB4261D70A2F6C9700BDD17D /* missingImage.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = missingImage.tiff; sourceTree = "<group>"; };
 		AB4CB4EA0B8BDA3D009F40B0 /* JSHTMLSelectElementCustom.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSHTMLSelectElementCustom.h; sourceTree = "<group>"; };
 		AB67D1A6097F3AE300F9392E /* RenderTextControl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTextControl.cpp; sourceTree = "<group>"; };
 		AB67D1A7097F3AE300F9392E /* RenderTextControl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderTextControl.h; sourceTree = "<group>"; };
@@ -12114,7 +12123,6 @@
 		E4D687780ED7AE4F006EA978 /* PurgeableBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PurgeableBuffer.h; sourceTree = "<group>"; };
 		E4EEFFC60D34550C00469A58 /* JSAudioConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioConstructor.cpp; sourceTree = "<group>"; };
 		E4EEFFC70D34550C00469A58 /* JSAudioConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAudioConstructor.h; sourceTree = "<group>"; };
-		ED048ABB0833F132006E1E67 /* textAreaResizeCorner.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = textAreaResizeCorner.tiff; sourceTree = "<group>"; };
 		ED2BA83B09A24B91006C0AC4 /* DocumentMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentMarker.h; sourceTree = "<group>"; };
 		ED501DC50B249F2900AE18D9 /* EditorMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = EditorMac.mm; path = mac/EditorMac.mm; sourceTree = "<group>"; };
 		EDE3A4FF0C7A430600956A37 /* ColorMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorMac.h; sourceTree = "<group>"; };
@@ -12765,15 +12773,18 @@
 				46D4F2460AF97E810035385A /* cellCursor.png */,
 				46D4F2470AF97E810035385A /* contextMenuCursor.png */,
 				4614A1FD0B23A8D600446E1C /* copyCursor.png */,
-				1C14E76A0AD8C81C00B6158B /* deleteButton.tiff */,
-				1C14E7690AD8C81C00B6158B /* deleteButtonPressed.tiff */,
+				93153BDD141959F400FCF5BE /* deleteButton.png */,
+				93153BCC1417FBBF00FCF5BE /* [email protected] */,
+				93153BDF14195A2800FCF5BE /* deleteButtonPressed.png */,
+				93153BCE1417FBDB00FCF5BE /* [email protected] */,
 				85136C890AED665800F90A3D /* eastResizeCursor.png */,
 				85136C8A0AED665800F90A3D /* eastWestResizeCursor.png */,
 				85136C8B0AED665800F90A3D /* helpCursor.png */,
-				750D02C011D0EE7D00BD1B27 /* inputSpeech.tiff */,
+				93153BE314195B2900FCF5BE /* inputSpeech.png */,
 				85136C8C0AED665800F90A3D /* linkCursor.png */,
 				BCAD1808131C7A0D00990406 /* Localizable.strings */,
-				AB4261D70A2F6C9700BDD17D /* missingImage.tiff */,
+				93153BE114195A5700FCF5BE /* missingImage.png */,
+				93153BD914181F7A00FCF5BE /* [email protected] */,
 				85136C8D0AED665800F90A3D /* moveCursor.png */,
 				46F9D5DB0B0D60170028EE36 /* noDropCursor.png */,
 				46BD16E20B279473001F0839 /* noneCursor.png */,
@@ -12787,7 +12798,8 @@
 				85136C940AED665900F90A3D /* southEastResizeCursor.png */,
 				85136C950AED665900F90A3D /* southResizeCursor.png */,
 				85136C960AED665900F90A3D /* southWestResizeCursor.png */,
-				ED048ABB0833F132006E1E67 /* textAreaResizeCorner.tiff */,
+				93153BDB141959BB00FCF5BE /* textAreaResizeCorner.png */,
+				9370918C1416D86B00477333 /* [email protected] */,
 				46D4F2480AF97E810035385A /* verticalTextCursor.png */,
 				85136C970AED665900F90A3D /* waitCursor.png */,
 				85136C980AED665900F90A3D /* westResizeCursor.png */,
@@ -22932,16 +22944,12 @@
 				46D4F2490AF97E810035385A /* cellCursor.png in Resources */,
 				46D4F24A0AF97E810035385A /* contextMenuCursor.png in Resources */,
 				4614A1FE0B23A8D600446E1C /* copyCursor.png in Resources */,
-				1C14E76C0AD8C81C00B6158B /* deleteButton.tiff in Resources */,
-				1C14E76B0AD8C81C00B6158B /* deleteButtonPressed.tiff in Resources */,
 				85136C990AED665900F90A3D /* eastResizeCursor.png in Resources */,
 				85136C9A0AED665900F90A3D /* eastWestResizeCursor.png in Resources */,
 				85136C9B0AED665900F90A3D /* helpCursor.png in Resources */,
-				750D02C111D0EE7D00BD1B27 /* inputSpeech.tiff in Resources */,
 				85136C9C0AED665900F90A3D /* linkCursor.png in Resources */,
 				BCAD180A131C7A0D00990406 /* Localizable.strings in Resources */,
 				1CDC14050DD3934C006EACD3 /* localizedStrings.js in Resources */,
-				AB4261D80A2F6C9700BDD17D /* missingImage.tiff in Resources */,
 				85136C9D0AED665900F90A3D /* moveCursor.png in Resources */,
 				46F9D5DE0B0D60170028EE36 /* noDropCursor.png in Resources */,
 				46BD16E30B279473001F0839 /* noneCursor.png in Resources */,
@@ -22955,12 +22963,20 @@
 				85136CA40AED665900F90A3D /* southEastResizeCursor.png in Resources */,
 				85136CA50AED665900F90A3D /* southResizeCursor.png in Resources */,
 				85136CA60AED665900F90A3D /* southWestResizeCursor.png in Resources */,
-				ED048ABC0833F132006E1E67 /* textAreaResizeCorner.tiff in Resources */,
 				46D4F24B0AF97E810035385A /* verticalTextCursor.png in Resources */,
 				85136CA70AED665900F90A3D /* waitCursor.png in Resources */,
 				85136CA80AED665900F90A3D /* westResizeCursor.png in Resources */,
 				1AB1AE7A0C051FDE00139F4F /* zoomInCursor.png in Resources */,
 				1AB1AE7B0C051FDE00139F4F /* zoomOutCursor.png in Resources */,
+				9370918D1416D86B00477333 /* [email protected] in Resources */,
+				93153BCD1417FBBF00FCF5BE /* [email protected] in Resources */,
+				93153BCF1417FBDB00FCF5BE /* [email protected] in Resources */,
+				93153BDA14181F7A00FCF5BE /* [email protected] in Resources */,
+				93153BDC141959BC00FCF5BE /* textAreaResizeCorner.png in Resources */,
+				93153BDE141959F400FCF5BE /* deleteButton.png in Resources */,
+				93153BE014195A2800FCF5BE /* deleteButtonPressed.png in Resources */,
+				93153BE214195A5700FCF5BE /* missingImage.png in Resources */,
+				93153BE414195B2A00FCF5BE /* inputSpeech.png in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

Modified: branches/safari-534.53-branch/Source/WebCore/editing/DeleteButtonController.cpp (102031 => 102032)


--- branches/safari-534.53-branch/Source/WebCore/editing/DeleteButtonController.cpp	2011-12-05 20:59:24 UTC (rev 102031)
+++ branches/safari-534.53-branch/Source/WebCore/editing/DeleteButtonController.cpp	2011-12-05 21:03:34 UTC (rev 102032)
@@ -41,6 +41,7 @@
 #include "HTMLNames.h"
 #include "Image.h"
 #include "Node.h"
+#include "Page.h"
 #include "Range.h"
 #include "RemoveNodeCommand.h"
 #include "RenderBox.h"
@@ -240,7 +241,13 @@
     style->setProperty(CSSPropertyHeight, String::number(buttonHeight) + "px");
     style->setProperty(CSSPropertyVisibility, CSSValueVisible);
 
-    RefPtr<Image> buttonImage = Image::loadPlatformResource("deleteButton");
+    float deviceScaleFactor = Page::deviceScaleFactor(m_frame);
+    RefPtr<Image> buttonImage;
+    if (deviceScaleFactor >= 2)
+        buttonImage = Image::loadPlatformResource("deleteButton@2x");
+    else
+        buttonImage = Image::loadPlatformResource("deleteButton");
+
     if (buttonImage->isNull())
         return;
 

Modified: branches/safari-534.53-branch/Source/WebCore/loader/cache/CachedImage.cpp (102031 => 102032)


--- branches/safari-534.53-branch/Source/WebCore/loader/cache/CachedImage.cpp	2011-12-05 20:59:24 UTC (rev 102031)
+++ branches/safari-534.53-branch/Source/WebCore/loader/cache/CachedImage.cpp	2011-12-05 21:03:34 UTC (rev 102032)
@@ -113,18 +113,27 @@
         m_decodedDataDeletionTimer.startOneShot(interval);
 }
 
-static Image* brokenImage()
+Image* CachedImage::brokenImage(float deviceScaleFactor) const
 {
-    DEFINE_STATIC_LOCAL(RefPtr<Image>, brokenImage, (Image::loadPlatformResource("missingImage")));
-    return brokenImage.get();
+    if (deviceScaleFactor >= 2) {
+        DEFINE_STATIC_LOCAL(Image*, brokenImageHiRes, (Image::loadPlatformResource("missingImage@2x").leakRef()));
+        return brokenImageHiRes;
+    }
+
+    DEFINE_STATIC_LOCAL(Image*, brokenImageLoRes, (Image::loadPlatformResource("missingImage").leakRef()));
+    return brokenImageLoRes;
 }
 
 Image* CachedImage::image() const
 {
     ASSERT(!isPurgeable());
 
-    if (errorOccurred() && m_shouldPaintBrokenImage)
-        return brokenImage();
+    if (errorOccurred() && m_shouldPaintBrokenImage) {
+        // Returning the 1x broken image is non-ideal, but we cannot reliably access the appropriate
+        // deviceScaleFactor from here. It is critical that callers use CachedImage::brokenImage() 
+        // when they need the real, deviceScaleFactor-appropriate broken image icon. 
+        return brokenImage(1);
+    }
 
     if (m_image)
         return m_image.get();

Modified: branches/safari-534.53-branch/Source/WebCore/loader/cache/CachedImage.h (102031 => 102032)


--- branches/safari-534.53-branch/Source/WebCore/loader/cache/CachedImage.h	2011-12-05 20:59:24 UTC (rev 102031)
+++ branches/safari-534.53-branch/Source/WebCore/loader/cache/CachedImage.h	2011-12-05 21:03:34 UTC (rev 102032)
@@ -47,6 +47,8 @@
     Image* image() const; // Returns the nullImage() if the image is not available yet.
     bool hasImage() const { return m_image.get(); }
 
+    Image* brokenImage(float deviceScaleFactor) const;
+
     bool canRender(float multiplier) const { return !errorOccurred() && !imageSize(multiplier).isEmpty(); }
 
     // These are only used for SVGImage right now

Modified: branches/safari-534.53-branch/Source/WebCore/page/Page.cpp (102031 => 102032)


--- branches/safari-534.53-branch/Source/WebCore/page/Page.cpp	2011-12-05 20:59:24 UTC (rev 102031)
+++ branches/safari-534.53-branch/Source/WebCore/page/Page.cpp	2011-12-05 21:03:34 UTC (rev 102032)
@@ -610,6 +610,16 @@
     backForward()->markPagesForFullStyleRecalc();
 }
 
+float Page::deviceScaleFactor(Frame* frame)
+{
+    if (!frame)
+        return 1;
+    Page* page = frame->page();
+    if (!page)
+        return 1;
+    return page->deviceScaleFactor();
+}
+
 void Page::didMoveOnscreen()
 {
     for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext()) {

Modified: branches/safari-534.53-branch/Source/WebCore/page/Page.h (102031 => 102032)


--- branches/safari-534.53-branch/Source/WebCore/page/Page.h	2011-12-05 20:59:24 UTC (rev 102031)
+++ branches/safari-534.53-branch/Source/WebCore/page/Page.h	2011-12-05 21:03:34 UTC (rev 102032)
@@ -245,6 +245,7 @@
 
         float deviceScaleFactor() const { return m_deviceScaleFactor; }
         void setDeviceScaleFactor(float);
+        static float deviceScaleFactor(Frame*);
 
         // Notifications when the Page starts and stops being presented via a native window.
         void didMoveOnscreen();

Modified: branches/safari-534.53-branch/Source/WebCore/platform/graphics/mac/ImageMac.mm (102031 => 102032)


--- branches/safari-534.53-branch/Source/WebCore/platform/graphics/mac/ImageMac.mm	2011-12-05 20:59:24 UTC (rev 102031)
+++ branches/safari-534.53-branch/Source/WebCore/platform/graphics/mac/ImageMac.mm	2011-12-05 21:03:34 UTC (rev 102032)
@@ -55,7 +55,7 @@
 PassRefPtr<Image> Image::loadPlatformResource(const char *name)
 {
     NSBundle *bundle = [NSBundle bundleForClass:[WebCoreBundleFinder class]];
-    NSString *imagePath = [bundle pathForResource:[NSString stringWithUTF8String:name] ofType:@"tiff"];
+    NSString *imagePath = [bundle pathForResource:[NSString stringWithUTF8String:name] ofType:@"png"];
     NSData *namedImageData = [NSData dataWithContentsOfFile:imagePath];
     if (namedImageData) {
         RefPtr<Image> image = BitmapImage::create();

Modified: branches/safari-534.53-branch/Source/WebCore/rendering/RenderImage.cpp (102031 => 102032)


--- branches/safari-534.53-branch/Source/WebCore/rendering/RenderImage.cpp	2011-12-05 20:59:24 UTC (rev 102031)
+++ branches/safari-534.53-branch/Source/WebCore/rendering/RenderImage.cpp	2011-12-05 21:03:34 UTC (rev 102032)
@@ -85,9 +85,11 @@
     ASSERT_ARG(newImage, newImage);
     ASSERT_ARG(newImage, newImage->image());
 
+    Image* brokenImage = newImage->brokenImage(Page::deviceScaleFactor(frame())); 
+
     // imageSize() returns 0 for the error image. We need the true size of the
     // error image, so we have to get it by grabbing image() directly.
-    return IntSize(paddingWidth + newImage->image()->width() * style()->effectiveZoom(), paddingHeight + newImage->image()->height() * style()->effectiveZoom());
+    return IntSize(paddingWidth + brokenImage->width() * style()->effectiveZoom(), paddingHeight + brokenImage->height() * style()->effectiveZoom()); 
 }
 
 // Sets the image height and width to fit the alt text.  Returns true if the
@@ -265,16 +267,22 @@
             RefPtr<Image> image = m_imageResource->image();
 
             if (m_imageResource->errorOccurred() && !image->isNull() && usableWidth >= image->width() && usableHeight >= image->height()) {
+                float deviceScaleFactor = Page::deviceScaleFactor(frame());
+                // Call brokenImage() explicitly to ensure we get the broken image icon at the appropriate resolution.
+                image = m_imageResource->cachedImage()->brokenImage(deviceScaleFactor);
+                IntSize imageSize = image->size();
+                if (deviceScaleFactor >= 2)
+                    imageSize.scale(0.5);
                 // Center the error image, accounting for border and padding.
-                int centerX = (usableWidth - image->width()) / 2;
+                int centerX = (usableWidth - imageSize.width()) / 2; 
                 if (centerX < 0)
                     centerX = 0;
-                int centerY = (usableHeight - image->height()) / 2;
+                int centerY = (usableHeight - imageSize.height()) / 2; 
                 if (centerY < 0)
                     centerY = 0;
                 imageX = leftBorder + leftPad + centerX + 1;
                 imageY = topBorder + topPad + centerY + 1;
-                context->drawImage(image.get(), style()->colorSpace(), IntPoint(tx + imageX, ty + imageY));
+                context->drawImage(image.get(), style()->colorSpace(), IntRect(tx + imageX, ty + imageY, imageSize.width(), imageSize.height()));
                 errorPictureDrawn = true;
             }
 

Modified: branches/safari-534.53-branch/Source/WebCore/rendering/RenderLayer.cpp (102031 => 102032)


--- branches/safari-534.53-branch/Source/WebCore/rendering/RenderLayer.cpp	2011-12-05 20:59:24 UTC (rev 102031)
+++ branches/safari-534.53-branch/Source/WebCore/rendering/RenderLayer.cpp	2011-12-05 21:03:34 UTC (rev 102032)
@@ -2363,6 +2363,27 @@
         context->fillRect(absRect, Color::white, box->style()->colorSpace());
 }
 
+void RenderLayer::drawPlatformResizerImage(GraphicsContext* context, IntRect resizerCornerRect)
+{
+    float deviceScaleFactor = Page::deviceScaleFactor(renderer()->frame());
+
+    RefPtr<Image> resizeCornerImage;
+    IntSize cornerResizerSize;
+    if (deviceScaleFactor >= 2) {
+        DEFINE_STATIC_LOCAL(Image*, resizeCornerImageHiRes, (Image::loadPlatformResource("textAreaResizeCorner@2x").leakRef()));
+        resizeCornerImage = resizeCornerImageHiRes;
+        cornerResizerSize = resizeCornerImage->size();
+        cornerResizerSize.scale(0.5);
+    } else {
+        DEFINE_STATIC_LOCAL(Image*, resizeCornerImageLoRes, (Image::loadPlatformResource("textAreaResizeCorner").leakRef()));
+        resizeCornerImage = resizeCornerImageLoRes;
+        cornerResizerSize = resizeCornerImage->size();
+    }
+
+    IntRect imageRect(resizerCornerRect.maxXMaxYCorner() - cornerResizerSize, cornerResizerSize);
+    context->drawImage(resizeCornerImage.get(), renderer()->style()->colorSpace(), imageRect);
+}
+
 void RenderLayer::paintResizer(GraphicsContext* context, int tx, int ty, const IntRect& damageRect)
 {
     if (renderer()->style()->resize() == RESIZE_NONE)
@@ -2386,10 +2407,7 @@
         return;
     }
 
-    // Paint the resizer control.
-    DEFINE_STATIC_LOCAL(RefPtr<Image>, resizeCornerImage, (Image::loadPlatformResource("textAreaResizeCorner")));
-    IntPoint imagePoint(absRect.maxX() - resizeCornerImage->width(), absRect.maxY() - resizeCornerImage->height());
-    context->drawImage(resizeCornerImage.get(), box->style()->colorSpace(), imagePoint);
+    drawPlatformResizerImage(context, absRect);
 
     // Draw a frame around the resizer (1px grey line) if there are any scrollbars present.
     // Clipping will exclude the right and bottom edges of this frame.

Modified: branches/safari-534.53-branch/Source/WebCore/rendering/RenderLayer.h (102031 => 102032)


--- branches/safari-534.53-branch/Source/WebCore/rendering/RenderLayer.h	2011-12-05 20:59:24 UTC (rev 102031)
+++ branches/safari-534.53-branch/Source/WebCore/rendering/RenderLayer.h	2011-12-05 21:03:34 UTC (rev 102032)
@@ -595,6 +595,8 @@
     void updateScrollCornerStyle();
     void updateResizerStyle();
 
+    void drawPlatformResizerImage(GraphicsContext*, IntRect resizerCornerRect);
+
     void updatePagination();
     bool isPaginated() const { return m_isPaginated; }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to