Changeset 14414 in webkit
- Timestamp:
- May 16, 2006, 2:30:22 AM (19 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 deleted
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r14413 r14414 1 2006-05-16 Anders Carlsson <acarlsson@apple.com> 2 3 Reviewed by Maciej. 4 5 http://bugzilla.opendarwin.org/show_bug.cgi?id=8921 6 Use WebCore to render full-frame images. 7 8 * css2.1/t0801-c412-hz-box-00-b-a-expected.txt: 9 * dom/xhtml/level2/html/frame-expected.checksum: 10 * dom/xhtml/level2/html/frame-expected.png: 11 * dom/xhtml/level2/html/frame-expected.txt: 12 * dom/xhtml/level2/html/iframe-expected.checksum: 13 * dom/xhtml/level2/html/iframe-expected.png: 14 * dom/xhtml/level2/html/iframe-expected.txt: 15 * tables/mozilla/bugs/bug50695-2-expected.txt: 16 Update tests. 17 1 18 2006-05-16 Eric Seidel <eseidel@apple.com> 2 19 -
trunk/LayoutTests/css2.1/t0801-c412-hz-box-00-b-a-expected.txt
r13869 r14414 13 13 RenderBlock {P} at (0,56) size 784x154 14 14 RenderPartObject {OBJECT} at (0,0) size 300x150 15 layer at (0,0) size 600x135 16 RenderCanvas at (0,0) size 300x135 17 layer at (0,0) size 600x44 18 RenderBlock {HTML} at (0,0) size 300x44 19 RenderBody {BODY} at (0,0) size 300x44 20 RenderImage {IMG} at (0,0) size 600x40 15 21 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/dom/xhtml/level2/html/frame-expected.checksum
r11995 r14414 1 b9450a3e59fe332228de2775caf02a6e 1 98bb7e11c17ebf4f2b4a6e0ce246f8b4 -
trunk/LayoutTests/dom/xhtml/level2/html/frame-expected.txt
r13869 r14414 6 6 RenderFrameSet {frameset} at (0,0) size 159x600 7 7 RenderFrame {frame} at (0,0) size 159x198 8 layer at (0,0) size 157x194 9 RenderCanvas at (0,0) size 157x194 10 layer at (0,0) size 157x18 11 RenderBlock {HTML} at (0,0) size 157x18 12 RenderBody {BODY} at (0,0) size 157x18 13 RenderImage {IMG} at (0,3) size 17x11 8 14 RenderFrame {frame} at (163,0) size 637x600 15 layer at (0,0) size 635x596 16 RenderCanvas at (0,0) size 635x596 17 layer at (0,0) size 635x52 18 RenderBlock {HTML} at (0,0) size 635x52 19 RenderBody {BODY} at (0,0) size 635x52 20 RenderImage {IMG} at (0,0) size 315x48 -
trunk/LayoutTests/dom/xhtml/level2/html/iframe-expected.checksum
r11995 r14414 1 0e025222ec84509671c451a6111ff44e 1 d22fe9e9c656b78abd845529b36dbd41 -
trunk/LayoutTests/dom/xhtml/level2/html/iframe-expected.txt
r13869 r14414 5 5 RenderBody {body} at (8,8) size 784x50 6 6 RenderPartObject {iframe} at (0,0) size 60x50 7 layer at (0,0) size 58x46 8 RenderCanvas at (0,0) size 58x46 9 layer at (0,0) size 58x18 10 RenderBlock {HTML} at (0,0) size 58x18 11 RenderBody {BODY} at (0,0) size 58x18 12 RenderImage {IMG} at (0,3) size 17x11 7 13 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/tables/mozilla/bugs/bug50695-2-expected.txt
r13869 r14414 6 6 RenderBlock {FORM} at (0,0) size 784x300 7 7 RenderPartObject {IFRAME} at (0,0) size 300x300 8 layer at (0,0) size 300x300 9 RenderCanvas at (0,0) size 300x300 10 layer at (0,0) size 300x174 11 RenderBlock {HTML} at (0,0) size 300x174 12 RenderBody {BODY} at (0,0) size 300x174 13 RenderImage {IMG} at (0,0) size 250x170 8 14 RenderText {#text} at (0,0) size 0x0 -
trunk/WebCore/ChangeLog
r14413 r14414 1 2006-05-16 Anders Carlsson <acarlsson@apple.com> 2 3 Reviewed by Maciej. 4 5 http://bugzilla.opendarwin.org/show_bug.cgi?id=8921 6 Use WebCore to render full-frame images. 7 8 * WebCore.xcodeproj/project.pbxproj: 9 Add ImageDocument. 10 11 * bridge/mac/WebCoreFrameBridge.h: 12 Add mainResourceURLResponse and imageTitleForFilename. 13 14 * bridge/mac/WebCoreFrameBridge.mm: 15 (+[WebCoreFrameBridge supportedNonImageMIMETypes]): 16 This used to be supportedMIMETypes but WebKit requires that we handle the 17 image MIME types separately. 18 19 (+[WebCoreFrameBridge supportedImageMIMETypes]): 20 Add image types from WebCoreImageRendererFactory. 21 22 (-[WebCoreFrameBridge canProvideDocumentSource]): 23 Return no for image types. 24 25 * dom/xml_tokenizer.h: 26 (WebCore::Tokenizer::wantsRawData): 27 (WebCore::Tokenizer::writeRawData): 28 New virtual functions which tokenizers can override if they want to get 29 raw data (which isn't fed through the decoder) 30 31 * html/HTMLImageElement.h: 32 (WebCore::HTMLImageElement::setLoadManually): 33 New function which calls HTMLImageLoader::setLoadManually 34 35 * html/HTMLImageLoader.cpp: 36 (WebCore::HTMLImageLoader::HTMLImageLoader): 37 (WebCore::HTMLImageLoader::updateFromElement): 38 Don't request the image from the loader if the load is set to be manual. 39 40 * html/HTMLImageLoader.h: 41 (WebCore::HTMLImageLoader::setLoadManually): 42 New function which decides if the image data should be fed manually or loaded 43 by the loader. 44 45 * loader/DocLoader.h: 46 Add HTMLImageLoader as a friend. 47 48 * loader/ImageDocument.cpp: Added. 49 (WebCore::ImageTokenizer::ImageTokenizer): 50 (WebCore::ImageTokenizer::wantsRawData): 51 (WebCore::ImageTokenizer::write): 52 (WebCore::ImageTokenizer::writeRawData): 53 (WebCore::ImageTokenizer::stopParsing): 54 (WebCore::ImageTokenizer::finish): 55 (WebCore::ImageTokenizer::isWaitingForScripts): 56 (WebCore::ImageDocument::ImageDocument): 57 (WebCore::ImageDocument::createTokenizer): 58 * loader/ImageDocument.h: Added. 59 Add new ImageDocument class which will feed its data to a created image element. 60 61 * loader/TextDocument.h: 62 Inherit from HTMLDocument here too, in case any broken web pages want to manipulate 63 the DOM of any plain text documents. 64 65 * page/Frame.cpp: 66 (WebCore::Frame::begin): 67 (WebCore::Frame::write): 68 Don't create or use the decoder if the tokenizer is in "raw mode". 69 1 70 2006-05-16 Eric Seidel <eseidel@apple.com> 2 71 -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r14413 r14414 101 101 1A762C790A074F2600989F5B /* JSXPathResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A762C710A074F2600989F5B /* JSXPathResult.cpp */; }; 102 102 1A762C7A0A074F2600989F5B /* JSXPathResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A762C720A074F2600989F5B /* JSXPathResult.h */; }; 103 1A820D910A13EBA600AF843C /* ImageDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A820D8F0A13EBA600AF843C /* ImageDocument.cpp */; settings = {COMPILER_FLAGS = "-xobjective-c++"; }; }; 104 1A820D920A13EBA600AF843C /* ImageDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A820D900A13EBA600AF843C /* ImageDocument.h */; }; 103 105 550A0BC9085F6039007353D6 /* QualifiedName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 550A0BC7085F6039007353D6 /* QualifiedName.cpp */; }; 104 106 550A0BCA085F6039007353D6 /* QualifiedName.h in Headers */ = {isa = PBXBuildFile; fileRef = 550A0BC8085F6039007353D6 /* QualifiedName.h */; }; … … 1543 1545 1A762C710A074F2600989F5B /* JSXPathResult.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSXPathResult.cpp; sourceTree = "<group>"; }; 1544 1546 1A762C720A074F2600989F5B /* JSXPathResult.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSXPathResult.h; sourceTree = "<group>"; }; 1547 1A820D8F0A13EBA600AF843C /* ImageDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ImageDocument.cpp; sourceTree = "<group>"; }; 1548 1A820D900A13EBA600AF843C /* ImageDocument.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ImageDocument.h; sourceTree = "<group>"; }; 1545 1549 2D90660B0665D937006B6F1A /* ClipboardMac.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = ClipboardMac.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 1546 1550 2D90660C0665D937006B6F1A /* ClipboardMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ClipboardMac.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; … … 4454 4458 93ABCE5D06E1A42E0085925B /* FormData.cpp */, 4455 4459 93ABCE5E06E1A42E0085925B /* FormData.h */, 4460 1A820D8F0A13EBA600AF843C /* ImageDocument.cpp */, 4461 1A820D900A13EBA600AF843C /* ImageDocument.h */, 4456 4462 BCB16C130979C3BD00467741 /* loader.cpp */, 4457 4463 BCB16C140979C3BD00467741 /* loader.h */, … … 5579 5585 1A494E350A12358B00FDAFC1 /* JSHTMLDocument.h in Headers */, 5580 5586 1A494EDF0A123F4C00FDAFC1 /* JSDocumentFragment.h in Headers */, 5587 1A820D920A13EBA600AF843C /* ImageDocument.h in Headers */, 5581 5588 A871DB250A150BD600B12A68 /* HTMLTableSectionElement.h in Headers */, 5582 5589 A871DB270A150BD600B12A68 /* HTMLTableElement.h in Headers */, … … 6419 6426 1A494E340A12358B00FDAFC1 /* JSHTMLDocument.cpp in Sources */, 6420 6427 1A494EDE0A123F4C00FDAFC1 /* JSDocumentFragment.cpp in Sources */, 6428 1A820D910A13EBA600AF843C /* ImageDocument.cpp in Sources */, 6421 6429 A871DB260A150BD600B12A68 /* HTMLTableSectionElement.cpp in Sources */, 6422 6430 A871DB280A150BD600B12A68 /* HTMLTableElement.cpp in Sources */, -
trunk/WebCore/bridge/mac/WebCoreFrameBridge.h
r14376 r14414 187 187 - (id)initSubframeWithRenderer:(WebCoreRenderPart *)renderer; 188 188 189 + (NSArray *)supportedMIMETypes; 189 + (NSArray *)supportedNonImageMIMETypes; 190 + (NSArray *)supportedImageMIMETypes; 190 191 191 192 - (void)initializeSettings:(WebCoreSettings *)settings; … … 665 666 - (WebCoreKeyboardUIMode)keyboardUIMode; 666 667 668 - (NSURLResponse*)mainResourceURLResponse; 669 - (NSString*)imageTitleForFilename:(NSString*)filename size:(NSSize)size; 670 667 671 @end 668 672 -
trunk/WebCore/bridge/mac/WebCoreFrameBridge.mm
r14393 r14414 49 49 #import "Page.h" 50 50 #import "SelectionController.h" 51 #import "WebCoreImageRendererFactory.h" 51 52 #import "WebCorePageBridge.h" 52 53 #import "WebCoreSettings.h" … … 58 59 #import "htmlediting.h" 59 60 #import "HTMLNames.h" 61 #import "Image.h" 60 62 #import "kjs_proxy.h" 61 63 #import "kjs_window.h" … … 361 363 } 362 364 363 + (NSArray *)supported MIMETypes364 { 365 return [NSArray arrayWithObjects: 365 + (NSArray *)supportedNonImageMIMETypes 366 { 367 return [NSArray arrayWithObjects: 366 368 @"text/html", 367 369 @"text/xml", … … 379 381 #endif 380 382 nil]; 383 } 384 385 + (NSArray *)supportedImageMIMETypes 386 { 387 static NSMutableArray *mimeTypes = nil; 388 if (mimeTypes == nil) { 389 mimeTypes = [[[WebCoreImageRendererFactory sharedFactory] supportedMIMETypes] mutableCopy]; 390 [mimeTypes removeObject:@"application/pdf"]; 391 [mimeTypes removeObject:@"application/postscript"]; 392 } 393 return mimeTypes; 381 394 } 382 395 … … 2462 2475 String mimeType = m_frame->resourceRequest().m_responseMIMEType; 2463 2476 2464 if (WebCore::DOMImplementation::isTextMIMEType(mimeType)) 2477 if (WebCore::DOMImplementation::isTextMIMEType(mimeType) || 2478 Image::supportsType(mimeType)) 2465 2479 return NO; 2466 2480 -
trunk/WebCore/dom/xml_tokenizer.h
r14273 r14414 54 54 virtual int executingScript() const { return 0; } 55 55 56 virtual bool wantsRawData() const { return false; } 57 virtual bool writeRawData(const char* data, int len) { return false; } 58 56 59 protected: 57 60 // The tokenizer has buffers, so parsing may continue even after -
trunk/WebCore/html/HTMLImageElement.h
r14393 r14414 65 65 CachedImage* cachedImage() const { return m_imageLoader.image(); } 66 66 67 void setLoadManually (bool loadManually) { m_imageLoader.setLoadManually(loadManually); } 68 67 69 String name() const; 68 70 void setName(const String&); -
trunk/WebCore/html/HTMLImageLoader.cpp
r14393 r14414 45 45 , m_firedLoad(true) 46 46 , m_imageComplete(true) 47 , m_loadManually(false) 47 48 { 48 49 } … … 75 76 // Treat a lack of src or empty string for src as no image at all. 76 77 CachedImage *newImage = 0; 77 if (!attr.isEmpty()) 78 newImage = doc->docLoader()->requestImage(parseURL(attr)); 79 78 if (!attr.isEmpty()) { 79 if (m_loadManually) { 80 newImage = new CachedImage(doc->docLoader(), parseURL(attr), KIO::CC_Verify, 0); 81 doc->docLoader()->m_docObjects.set(newImage->url(), newImage); 82 } else 83 newImage = doc->docLoader()->requestImage(parseURL(attr)); 84 } 85 80 86 CachedImage *oldImage = m_image; 81 87 if (newImage != oldImage) { -
trunk/WebCore/html/HTMLImageLoader.h
r14393 r14414 45 45 CachedImage* image() const { return m_image; } 46 46 47 void setLoadManually(bool loadManually) { m_loadManually = loadManually; } 48 47 49 // CachedObjectClient API 48 50 virtual void notifyFinished(CachedObject*); … … 56 58 bool m_firedLoad : 1; 57 59 bool m_imageComplete : 1; 60 bool m_loadManually : 1; 58 61 }; 59 62 -
trunk/WebCore/loader/DocLoader.h
r14256 r14414 46 46 class Document; 47 47 class Frame; 48 48 class HTMLImageLoader; 49 49 50 /** 50 51 * Manages the loading of scripts/images/stylesheets for a particular document … … 89 90 friend class Cache; 90 91 friend class WebCore::Document; 92 friend class WebCore::HTMLImageLoader; 91 93 92 94 DeprecatedStringList m_reloadedURLs; -
trunk/WebCore/page/Frame.cpp
r14407 r14414 51 51 #include "HTMLNames.h" 52 52 #include "HTMLObjectElement.h" 53 #include "ImageDocument.h" 53 54 #include "MouseEventWithHitTestResults.h" 54 55 #include "NodeList.h" … … 601 602 d->m_doc = DOMImplementation::instance()->createDocument(d->m_view.get()); 602 603 else if (DOMImplementation::isTextMIMEType(d->m_request.m_responseMIMEType)) 603 d->m_doc = DOMImplementation::instance()->createTextDocument(d->m_view.get()); 604 d->m_doc = new TextDocument(DOMImplementation::instance(), d->m_view.get()); 605 else if (Image::supportsType(d->m_request.m_responseMIMEType)) 606 d->m_doc = new ImageDocument(DOMImplementation::instance(), d->m_view.get()); 604 607 else 605 608 d->m_doc = DOMImplementation::instance()->createHTMLDocument(d->m_view.get()); … … 632 635 void Frame::write(const char* str, int len) 633 636 { 637 if (len == 0) 638 return; 639 640 if (len == -1) 641 len = strlen(str); 642 643 if (Tokenizer* t = d->m_doc->tokenizer()) { 644 if (t->wantsRawData()) { 645 t->writeRawData(str, len); 646 return; 647 } 648 } 649 634 650 if (!d->m_decoder) { 635 651 d->m_decoder = new Decoder; … … 643 659 d->m_doc->setDecoder(d->m_decoder.get()); 644 660 } 645 if (len == 0)646 return;647 648 if (len == -1)649 len = strlen(str);650 651 661 DeprecatedString decoded = d->m_decoder->decode(str, len); 652 662 … … 664 674 } 665 675 666 if (Tokenizer* t = d->m_doc->tokenizer()) 676 if (Tokenizer* t = d->m_doc->tokenizer()) { 677 ASSERT(!t->wantsRawData()); 667 678 t->write(decoded, true); 679 } 668 680 } 669 681 -
trunk/WebKit/ChangeLog
r14397 r14414 1 2006-05-16 Anders Carlsson <acarlsson@apple.com> 2 3 Reviewed by Maciej. 4 5 http://bugzilla.opendarwin.org/show_bug.cgi?id=8921 6 Use WebCore to render full-frame images 7 8 * WebCoreSupport/WebFrameBridge.m: 9 (-[WebFrameBridge determineObjectFromMIMEType:URL:]): 10 Remove WebImageView handling. 11 12 (-[WebFrameBridge mainResourceURLResponse]): 13 New function which returns the URL response for the main resource. This is used by the 14 manual loading of images. 15 16 (-[WebFrameBridge imageTitleForFilename:size:]): 17 New function which returns a correctly translated image title given a filename and a size. 18 19 * WebCoreSupport/WebImageRenderer.m: 20 (-[WebImageRenderer _startOrContinueAnimationIfNecessary]): 21 Remove WebImageView handling. 22 23 * WebKit.xcodeproj/project.pbxproj: 24 Remove WebImageRepresentation and WebImageView. 25 26 * WebView/WebArchiver.h: 27 * WebView/WebArchiver.m: 28 (+[WebArchiver archiveMainResourceForFrame:]): 29 New functions which returns a WebArchive with just the main resource, ignoring any subresources. 30 31 * WebView/WebDataSource.m: 32 (+[WebDataSource _repTypesAllowImageTypeOmission:]): 33 Use MIME types from WebHTMLRepresentation instead of WebImageRepresentation. 34 35 * WebView/WebFrameView.m: 36 (+[WebFrameView _viewTypesAllowImageTypeOmission:]): 37 Use MIME types from WebHTMLRepresentation instead of WebImageRepresentation. 38 39 (+[WebHTMLRepresentation supportedMIMETypes]): 40 Create an array of image and non-image MIME Types. 41 42 (+[WebHTMLRepresentation supportedNonImageMIMETypes]): 43 (+[WebHTMLRepresentation supportedImageMIMETypes]): 44 New functions, separating the list of MIME types into image and non-image ones. 45 46 * WebView/WebHTMLView.m: 47 (+[WebHTMLView supportedImageMIMETypes]): 48 (+[WebHTMLView supportedNonImageMIMETypes]): 49 New functions which call down to WebHTMLRepresentation. 50 51 (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]): 52 If the image element comes from an ImageDocument, just use an archive of the main resource 53 instead of the generated HTML document. 54 55 * WebView/WebHTMLViewPrivate.h: 56 Declare new functions. 57 58 * WebView/WebImageRepresentation.h: Removed. 59 * WebView/WebImageRepresentation.m: Removed. 60 * WebView/WebImageView.h: Removed. 61 * WebView/WebImageView.m: Removed. 62 1 63 2006-05-15 Tim Omernick <timo@apple.com> 2 64 -
trunk/WebKit/WebCoreSupport/WebFrameBridge.m
r14333 r14414 44 44 #import "WebHTMLViewInternal.h" 45 45 #import "WebHistoryItemPrivate.h" 46 #import "WebImageView.h"47 46 #import "WebJavaPlugIn.h" 48 47 #import "WebJavaScriptTextInputPanel.h" … … 1134 1133 } 1135 1134 1136 if ([viewClass isSubclassOfClass:[WebImageView class]])1137 return ObjectElementImage;1138 1139 1135 // If we're a supported type other than a plugin, we want to make a frame. 1140 1136 // Ultimately we should just use frames for all mime types (plugins and HTML/XML/text documents), … … 1625 1621 } 1626 1622 1623 - (NSURLResponse*)mainResourceURLResponse 1624 { 1625 return [[_frame dataSource] response]; 1626 } 1627 1628 - (NSString*)imageTitleForFilename:(NSString*)filename size:(NSSize)size 1629 { 1630 return [NSString stringWithFormat:UI_STRING("%@ %.0f×%.0f pixels", "window title for a standalone image (uses multiplication symbol, not x)"), filename, size.width, size.height]; 1631 } 1632 1627 1633 @end -
trunk/WebKit/WebCoreSupport/WebImageRenderer.m
r14021 r14414 34 34 #import <WebKit/WebImageData.h> 35 35 #import <WebKit/WebImageRendererFactory.h> 36 #import <WebKit/WebImageView.h>37 36 #import <WebKit/WebNSObjectExtras.h> 38 37 #import <WebKitSystemInterface.h> … … 195 194 // like <rdar://problem/3966973>, which describes a third party application that renders thumbnails of 196 195 // the page into a alternate view. 197 if ( ([targetView isKindOfClass:[WebHTMLView class]] || [targetView isKindOfClass:[WebImageView class]])196 if ([targetView isKindOfClass:[WebHTMLView class]] 198 197 && [imageData shouldAnimate] && [MIMEType isEqual:@"image/gif"]) { 199 198 [imageData addAnimatingRenderer:self inView:targetView]; -
trunk/WebKit/WebKit.xcodeproj/project.pbxproj
r14383 r14414 112 112 939810570824BF01008DF038 /* WebHTMLView.h in Headers */ = {isa = PBXBuildFile; fileRef = 35081D9402B6D4D80ACA2ACA /* WebHTMLView.h */; settings = {ATTRIBUTES = (Private, ); }; }; 113 113 939810580824BF01008DF038 /* WebHTMLViewPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 35081D9602B6D4D80ACA2ACA /* WebHTMLViewPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 114 939810590824BF01008DF038 /* WebImageRepresentation.h in Headers */ = {isa = PBXBuildFile; fileRef = 35081D9802B6D4D80ACA2ACA /* WebImageRepresentation.h */; };115 9398105A0824BF01008DF038 /* WebImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 35081D9A02B6D4D80ACA2ACA /* WebImageView.h */; settings = {ATTRIBUTES = (); }; };116 114 9398105B0824BF01008DF038 /* WebFrameLoadDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 5152FAE5033FC52200CA2ACD /* WebFrameLoadDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 117 115 9398105C0824BF01008DF038 /* WebMainResourceLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D538E802441F2601A80181 /* WebMainResourceLoader.h */; }; … … 234 232 939810F30824BF01008DF038 /* WebHTMLRepresentation.m in Sources */ = {isa = PBXBuildFile; fileRef = 35081D9302B6D4D80ACA2ACA /* WebHTMLRepresentation.m */; }; 235 233 939810F40824BF01008DF038 /* WebHTMLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 35081D9502B6D4D80ACA2ACA /* WebHTMLView.m */; }; 236 939810F50824BF01008DF038 /* WebImageRepresentation.m in Sources */ = {isa = PBXBuildFile; fileRef = 35081D9902B6D4D80ACA2ACA /* WebImageRepresentation.m */; };237 939810F60824BF01008DF038 /* WebImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 35081D9B02B6D4D80ACA2ACA /* WebImageView.m */; };238 234 939810F70824BF01008DF038 /* WebMainResourceLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = F5D538EC02441FDD01A80181 /* WebMainResourceLoader.m */; }; 239 235 939810F80824BF01008DF038 /* WebPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = F5AEBB3D024A527601C1A526 /* WebPreferences.m */; }; … … 295 291 /* End PBXBuildFile section */ 296 292 293 /* Begin PBXBuildStyle section */ 294 1AF77F6B0A193B680058FFAF /* Development */ = { 295 isa = PBXBuildStyle; 296 buildSettings = { 297 COPY_PHASE_STRIP = NO; 298 }; 299 name = Development; 300 }; 301 1AF77F6C0A193B680058FFAF /* Deployment */ = { 302 isa = PBXBuildStyle; 303 buildSettings = { 304 COPY_PHASE_STRIP = YES; 305 }; 306 name = Deployment; 307 }; 308 /* End PBXBuildStyle section */ 309 297 310 /* Begin PBXFileReference section */ 298 311 1C68F640095B5FC100C2984E /* webInspector */ = {isa = PBXFileReference; lastKnownFileType = folder; name = webInspector; path = WebInspector/webInspector; sourceTree = SOURCE_ROOT; }; … … 324 337 35081D9502B6D4D80ACA2ACA /* WebHTMLView.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebHTMLView.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 325 338 35081D9602B6D4D80ACA2ACA /* WebHTMLViewPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebHTMLViewPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 326 35081D9802B6D4D80ACA2ACA /* WebImageRepresentation.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebImageRepresentation.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };327 35081D9902B6D4D80ACA2ACA /* WebImageRepresentation.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebImageRepresentation.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };328 35081D9A02B6D4D80ACA2ACA /* WebImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebImageView.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };329 35081D9B02B6D4D80ACA2ACA /* WebImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebImageView.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };330 339 35081DAE02B6D4F50ACA2ACA /* WebDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDocument.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 331 340 35F3577F0198AAB80ACA1520 /* English */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; … … 865 874 6550B7C6099EFAE90090D781 /* WebArchiver.m */, 866 875 F52CA6BD02DF9D0F018635CA /* HTML */, 867 F52CA6BE02DF9D49018635CA /* Image */,868 876 51E94C0706C02CA300A9B09E /* PDF */, 869 877 8373435A0624EE0D00F3B289 /* WebArchive.h */, … … 936 944 ); 937 945 name = HTML; 938 sourceTree = "<group>";939 };940 F52CA6BE02DF9D49018635CA /* Image */ = {941 isa = PBXGroup;942 children = (943 35081D9802B6D4D80ACA2ACA /* WebImageRepresentation.h */,944 35081D9902B6D4D80ACA2ACA /* WebImageRepresentation.m */,945 35081D9A02B6D4D80ACA2ACA /* WebImageView.h */,946 35081D9B02B6D4D80ACA2ACA /* WebImageView.m */,947 );948 name = Image;949 946 sourceTree = "<group>"; 950 947 }; … … 1149 1146 939810570824BF01008DF038 /* WebHTMLView.h in Headers */, 1150 1147 939810580824BF01008DF038 /* WebHTMLViewPrivate.h in Headers */, 1151 939810590824BF01008DF038 /* WebImageRepresentation.h in Headers */,1152 9398105A0824BF01008DF038 /* WebImageView.h in Headers */,1153 1148 9398105B0824BF01008DF038 /* WebFrameLoadDelegate.h in Headers */, 1154 1149 9398105C0824BF01008DF038 /* WebMainResourceLoader.h in Headers */, … … 1293 1288 isa = PBXProject; 1294 1289 buildConfigurationList = 149C283208902B0F008A9EFC /* Build configuration list for PBXProject "WebKit" */; 1290 buildSettings = { 1291 }; 1292 buildStyles = ( 1293 1AF77F6B0A193B680058FFAF /* Development */, 1294 1AF77F6C0A193B680058FFAF /* Deployment */, 1295 ); 1295 1296 hasScannedForEncodings = 1; 1296 1297 knownRegions = ( … … 1655 1656 939810F30824BF01008DF038 /* WebHTMLRepresentation.m in Sources */, 1656 1657 939810F40824BF01008DF038 /* WebHTMLView.m in Sources */, 1657 939810F50824BF01008DF038 /* WebImageRepresentation.m in Sources */,1658 939810F60824BF01008DF038 /* WebImageView.m in Sources */,1659 1658 939810F70824BF01008DF038 /* WebMainResourceLoader.m in Sources */, 1660 1659 939810F80824BF01008DF038 /* WebPreferences.m in Sources */, -
trunk/WebKit/WebView/WebArchiver.h
r13090 r14414 42 42 + (WebArchive *)archiveSelectionInFrame:(WebFrame *)frame; 43 43 + (WebArchive *)archiveFrame:(WebFrame *)frame; 44 + (WebArchive *)archiveMainResourceForFrame:(WebFrame *)frame; 44 45 45 46 @end -
trunk/WebKit/WebView/WebArchiver.m
r14021 r14414 58 58 subresources:[[frame dataSource] subresources] 59 59 subframeArchives:[self _subframeArchivesForFrame:frame]] autorelease]; 60 } 61 62 + (WebArchive *)archiveMainResourceForFrame:(WebFrame *)frame; 63 { 64 return [[[WebArchive alloc] initWithMainResource:[[frame dataSource] mainResource] 65 subresources:nil 66 subframeArchives:nil] autorelease]; 60 67 } 61 68 -
trunk/WebKit/WebView/WebDataSource.m
r14333 r14414 49 49 #import <WebKit/WebIconLoader.h> 50 50 #import <WebKit/WebImageRendererFactory.h> 51 #import <WebKit/WebImageRepresentation.h>52 #import <WebKit/WebImageView.h>53 51 #import <WebKit/WebKitErrorsPrivate.h> 54 52 #import <WebKit/WebKitLogging.h> … … 712 710 if (!repTypes) { 713 711 repTypes = [[NSMutableDictionary alloc] init]; 714 addTypesFromClass(repTypes, [WebHTMLRepresentation class], [WebHTMLRepresentation supported MIMETypes]);712 addTypesFromClass(repTypes, [WebHTMLRepresentation class], [WebHTMLRepresentation supportedNonImageMIMETypes]); 715 713 716 714 // Since this is a "secret default" we don't both registering it. … … 721 719 722 720 if (!addedImageTypes && !allowImageTypeOmission) { 723 addTypesFromClass(repTypes, [Web ImageRepresentation class], [WebImageRepresentation supportedMIMETypes]);721 addTypesFromClass(repTypes, [WebHTMLRepresentation class], [WebHTMLRepresentation supportedImageMIMETypes]); 724 722 addedImageTypes = YES; 725 723 } -
trunk/WebKit/WebView/WebFrameView.m
r14293 r14414 41 41 #import "WebImageRenderer.h" 42 42 #import "WebImageRendererFactory.h" 43 #import "WebImageView.h"44 43 #import "WebKeyGenerator.h" 45 44 #import "WebKitErrorsPrivate.h" … … 260 259 if (!viewTypes) { 261 260 viewTypes = [[NSMutableDictionary alloc] init]; 262 addTypesFromClass(viewTypes, [WebHTMLView class], [WebHTMLView supported MIMETypes]);261 addTypesFromClass(viewTypes, [WebHTMLView class], [WebHTMLView supportedNonImageMIMETypes]); 263 262 264 263 // Since this is a "secret default" we don't both registering it. … … 269 268 270 269 if (!addedImageTypes && !allowImageTypeOmission) { 271 addTypesFromClass(viewTypes, [Web ImageView class], [WebImageView supportedMIMETypes]);270 addTypesFromClass(viewTypes, [WebHTMLView class], [WebHTMLView supportedImageMIMETypes]); 272 271 addedImageTypes = YES; 273 272 } -
trunk/WebKit/WebView/WebHTMLRepresentation.h
r11962 r14414 50 50 51 51 + (NSArray *)supportedMIMETypes; 52 + (NSArray *)supportedNonImageMIMETypes; 53 + (NSArray *)supportedImageMIMETypes; 52 54 53 55 - (NSAttributedString *)attributedStringFrom:(DOMNode *)startNode startOffset:(int)startOffset to:(DOMNode *)endNode endOffset:(int)endOffset; -
trunk/WebKit/WebView/WebHTMLRepresentation.m
r14376 r14414 36 36 #import <WebKit/WebDocumentPrivate.h> 37 37 #import <WebKit/WebFramePrivate.h> 38 #import <WebKit/WebImageRendererFactory.h> 38 39 #import <WebKit/WebKitNSStringExtras.h> 39 40 #import <WebKit/WebKitStatisticsPrivate.h> … … 67 68 + (NSArray *)supportedMIMETypes 68 69 { 69 return [WebCoreFrameBridge supportedMIMETypes]; 70 static NSMutableArray *mimeTypes 71 = nil; 72 73 if (!mimeTypes) { 74 mimeTypes = [[self supportedNonImageMIMETypes] mutableCopy]; 75 [mimeTypes addObjectsFromArray:[self supportedImageMIMETypes]]; 76 } 77 78 return mimeTypes; 79 } 80 81 + (NSArray *)supportedNonImageMIMETypes 82 { 83 return [WebCoreFrameBridge supportedNonImageMIMETypes]; 84 } 85 86 + (NSArray *)supportedImageMIMETypes 87 { 88 [WebImageRendererFactory createSharedFactory]; 89 return [WebCoreFrameBridge supportedImageMIMETypes]; 70 90 } 71 91 -
trunk/WebKit/WebView/WebHTMLView.m
r14387 r14414 699 699 } 700 700 701 + (NSArray *)supportedImageMIMETypes 702 { 703 return [WebHTMLRepresentation supportedImageMIMETypes]; 704 } 705 706 + (NSArray *)supportedNonImageMIMETypes 707 { 708 return [WebHTMLRepresentation supportedNonImageMIMETypes]; 709 } 710 701 711 + (NSArray *)unsupportedTextMIMETypes 702 712 { … … 1289 1299 [webView setSelectedDOMRange:[[[self _bridge] DOMDocument] _createRangeWithNode:imageElement] affinity:NSSelectionAffinityDownstream]; 1290 1300 _private->draggingImageURL = [imageURL retain]; 1301 1302 WebArchive *archive; 1303 1304 // If the image element comes from an ImageDocument, we don't want to 1305 // create a web archive from the image element. 1306 if ([[self _bridge] canSaveAsWebArchive]) 1307 archive = [imageElement webArchive]; 1308 else 1309 archive = [WebArchiver archiveMainResourceForFrame:[self _frame]]; 1310 1291 1311 source = [pasteboard _web_declareAndWriteDragImage:nil 1292 1312 element:imageElement 1293 1313 URL:linkURL ? linkURL : imageURL 1294 1314 title:[element objectForKey:WebElementImageAltStringKey] 1295 archive: [imageElement webArchive]1315 archive:archive 1296 1316 source:self]; 1297 1317 } -
trunk/WebKit/WebView/WebHTMLViewPrivate.h
r14258 r14414 41 41 - (void)_reset; 42 42 + (NSArray *)supportedMIMETypes; 43 + (NSArray *)supportedImageMIMETypes; 44 + (NSArray *)supportedNonImageMIMETypes; 43 45 + (NSArray *)unsupportedTextMIMETypes; 44 46
Note:
See TracChangeset
for help on using the changeset viewer.