Modified: trunk/Source/WebCore/ChangeLog (150165 => 150166)
--- trunk/Source/WebCore/ChangeLog 2013-05-16 01:17:58 UTC (rev 150165)
+++ trunk/Source/WebCore/ChangeLog 2013-05-16 01:24:19 UTC (rev 150166)
@@ -1,3 +1,26 @@
+2013-05-15 David Kilzer <[email protected]>
+
+ BUILD FIX (r150140): Frame::editor() should return a reference for iOS, too
+
+ * platform/ios/ClipboardIOS.mm:
+ (WebCore::ClipboardIOS::ClipboardIOS):
+ (WebCore::ClipboardIOS::hasData):
+ (WebCore::ClipboardIOS::clearData):
+ (WebCore::ClipboardIOS::clearAllData):
+ (WebCore::ClipboardIOS::getData):
+ (WebCore::ClipboardIOS::setData):
+ (WebCore::ClipboardIOS::types):
+ (WebCore::ClipboardIOS::writeRange):
+ * platform/ios/PasteboardIOS.mm:
+ (WebCore::Pasteboard::getStringSelection):
+ (WebCore::Pasteboard::writeSelection):
+ (WebCore::Pasteboard::writePlainText):
+ (WebCore::Pasteboard::writeImage):
+ (WebCore::Pasteboard::plainText):
+ (WebCore::documentFragmentWithRTF):
+ (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
+ (WebCore::Pasteboard::documentFragment):
+
2013-05-15 Anders Carlsson <[email protected]>
Stop using the factory pattern in FileIconLoaderClient
Modified: trunk/Source/WebCore/platform/ios/ClipboardIOS.mm (150165 => 150166)
--- trunk/Source/WebCore/platform/ios/ClipboardIOS.mm 2013-05-16 01:17:58 UTC (rev 150165)
+++ trunk/Source/WebCore/platform/ios/ClipboardIOS.mm 2013-05-16 01:24:19 UTC (rev 150166)
@@ -60,7 +60,7 @@
: Clipboard(policy, clipboardType)
, m_frame(frame)
{
- m_changeCount = m_frame->editor()->client()->pasteboardChangeCount();
+ m_changeCount = m_frame->editor().client()->pasteboardChangeCount();
}
ClipboardIOS::~ClipboardIOS()
@@ -69,7 +69,7 @@
bool ClipboardIOS::hasData()
{
- return m_frame->editor()->client()->getPasteboardItemsCount() != 0;
+ return m_frame->editor().client()->getPasteboardItemsCount() != 0;
}
static String utiTypeFromCocoaType(NSString* type)
@@ -138,7 +138,7 @@
if (RetainPtr<NSString> cocoaType = cocoaTypeFromHTMLClipboardType(type)) {
RetainPtr<NSDictionary> representations = adoptNS([[NSMutableDictionary alloc] init]);
[representations.get() setValue:0 forKey:cocoaType.get()];
- m_frame->editor()->client()->writeDataToPasteboard(representations.get());
+ m_frame->editor().client()->writeDataToPasteboard(representations.get());
}
}
@@ -148,7 +148,7 @@
return;
RetainPtr<NSDictionary> representations = adoptNS([[NSMutableDictionary alloc] init]);
- m_frame->editor()->client()->writeDataToPasteboard(representations.get());
+ m_frame->editor().client()->writeDataToPasteboard(representations.get());
}
String ClipboardIOS::getData(const String& type) const
@@ -160,7 +160,7 @@
NSString *cocoaValue = nil;
// Grab the value off the pasteboard corresponding to the cocoaType.
- RetainPtr<NSArray> pasteboardItem = m_frame->editor()->client()->readDataFromPasteboard(cocoaType.get(), 0);
+ RetainPtr<NSArray> pasteboardItem = m_frame->editor().client()->readDataFromPasteboard(cocoaType.get(), 0);
if ([pasteboardItem.get() count] == 0)
return String();
@@ -195,7 +195,7 @@
// Enforce changeCount ourselves for security. We check after reading instead of before to be
// sure it doesn't change between our testing the change count and accessing the data.
- if (cocoaValue && m_changeCount == m_frame->editor()->client()->pasteboardChangeCount())
+ if (cocoaValue && m_changeCount == m_frame->editor().client()->pasteboardChangeCount())
return cocoaValue;
return String();
@@ -214,7 +214,7 @@
if ([cocoaType.get() isEqualToString:(NSString*)kUTTypeURL]) {
RetainPtr<NSURL> url = "" alloc] initWithString:cocoaData]);
[representations.get() setValue:url.get() forKey:(NSString*)kUTTypeURL];
- m_frame->editor()->client()->writeDataToPasteboard(representations.get());
+ m_frame->editor().client()->writeDataToPasteboard(representations.get());
return true;
}
@@ -222,7 +222,7 @@
// Everything else we know of goes on the pboard as the original string
// we received as parameter.
[representations.get() setValue:cocoaData forKey:cocoaType.get()];
- m_frame->editor()->client()->writeDataToPasteboard(representations.get());
+ m_frame->editor().client()->writeDataToPasteboard(representations.get());
return true;
}
@@ -238,7 +238,7 @@
// Enforce changeCount ourselves for security. We check after reading instead of before to be
// sure it doesn't change between our testing the change count and accessing the data.
- if (m_changeCount != m_frame->editor()->client()->pasteboardChangeCount())
+ if (m_changeCount != m_frame->editor().client()->pasteboardChangeCount())
return ListHashSet<String>();
ListHashSet<String> result;
@@ -260,7 +260,7 @@
{
ASSERT(range);
ASSERT(frame);
- Pasteboard::generalPasteboard()->writeSelection(range, frame->editor()->smartInsertDeleteEnabled() && frame->selection()->granularity() == WordGranularity, frame);
+ Pasteboard::generalPasteboard()->writeSelection(range, frame->editor().smartInsertDeleteEnabled() && frame->selection()->granularity() == WordGranularity, frame);
}
void ClipboardIOS::writePlainText(const String& text)
Modified: trunk/Source/WebCore/platform/ios/PasteboardIOS.mm (150165 => 150166)
--- trunk/Source/WebCore/platform/ios/PasteboardIOS.mm 2013-05-16 01:17:58 UTC (rev 150165)
+++ trunk/Source/WebCore/platform/ios/PasteboardIOS.mm 2013-05-16 01:24:19 UTC (rev 150166)
@@ -116,7 +116,7 @@
String Pasteboard::getStringSelection(Frame* frame, ShouldSerializeSelectedTextForClipboard shouldSerializeSelectedTextForClipboard)
{
- String text = shouldSerializeSelectedTextForClipboard == IncludeImageAltTextForClipboard ? frame->editor()->selectedTextForClipboard() : frame->editor()->selectedText();
+ String text = shouldSerializeSelectedTextForClipboard == IncludeImageAltTextForClipboard ? frame->editor().selectedTextForClipboard() : frame->editor().selectedText();
text.replace(noBreakSpace, ' ');
return text;
}
@@ -135,7 +135,7 @@
if (enclosingAnchor && comparePositions(firstPositionInOrBeforeNode(selectedRange->startPosition().anchorNode()), selectedRange->startPosition()) >= 0)
selectedRange->setStart(enclosingAnchor, 0, ec);
- frame->editor()->client()->didSetSelectionTypesForPasteboard();
+ frame->editor().client()->didSetSelectionTypesForPasteboard();
RetainPtr<NSDictionary> representations = adoptNS([[NSMutableDictionary alloc] init]);
@@ -161,7 +161,7 @@
// Put plain string on the pasteboard.
[representations.get() setValue:getStringSelection(frame, shouldSerializeSelectedTextForClipboard) forKey:(NSString *)kUTTypeText];
- frame->editor()->client()->writeDataToPasteboard(representations.get());
+ frame->editor().client()->writeDataToPasteboard(representations.get());
}
void Pasteboard::writePlainText(const String& text, Frame *frame)
@@ -170,7 +170,7 @@
RetainPtr<NSDictionary> representations = adoptNS([[NSMutableDictionary alloc] init]);
[representations.get() setValue:text forKey:(NSString *)kUTTypeText];
- frame->editor()->client()->writeDataToPasteboard(representations.get());
+ frame->editor().client()->writeDataToPasteboard(representations.get());
}
void Pasteboard::writeImage(Node* node, Frame* frame)
@@ -200,7 +200,7 @@
[dictionary.get() setObject:imageData.get() forKey:(NSString *)uti.get()];
[dictionary.get() setObject:(NSString *)node->document()->completeURL(stripLeadingAndTrailingHTMLSpaces(static_cast<HTMLElement*>(node)->getAttribute("src"))) forKey:(NSString *)kUTTypeURL];
}
- frame->editor()->client()->writeDataToPasteboard(dictionary.get());
+ frame->editor().client()->writeDataToPasteboard(dictionary.get());
}
void Pasteboard::writePlainText(const String&, SmartReplaceOption)
@@ -218,7 +218,7 @@
String Pasteboard::plainText(Frame* frame)
{
- RetainPtr<NSArray> pasteboardItem = frame->editor()->client()->readDataFromPasteboard((NSString *)kUTTypeText, 0);
+ RetainPtr<NSArray> pasteboardItem = frame->editor().client()->readDataFromPasteboard((NSString *)kUTTypeText, 0);
if ([pasteboardItem.get() count] == 0)
return String();
@@ -300,7 +300,7 @@
frame->page()->setDefersLoading(true);
Vector<RefPtr<ArchiveResource> > resources;
- RefPtr<DocumentFragment> fragment = frame->editor()->client()->documentFragmentFromAttributedString(string.get(), resources);
+ RefPtr<DocumentFragment> fragment = frame->editor().client()->documentFragmentFromAttributedString(string.get(), resources);
size_t size = resources.size();
if (size) {
@@ -317,20 +317,20 @@
PassRefPtr<DocumentFragment> Pasteboard::documentFragmentForPasteboardItemAtIndex(Frame* frame, int index, bool allowPlainText, bool& chosePlainText)
{
- RefPtr<DocumentFragment> fragment = frame->editor()->client()->documentFragmentFromDelegate(index);
+ RefPtr<DocumentFragment> fragment = frame->editor().client()->documentFragmentFromDelegate(index);
if (fragment)
return fragment.release();
// First try to ask the client about the supported types. It will return null if the client
// has no selection.
- NSArray *supportedTypes = frame->editor()->client()->supportedPasteboardTypesForCurrentSelection();
+ NSArray *supportedTypes = frame->editor().client()->supportedPasteboardTypesForCurrentSelection();
if (!supportedTypes)
supportedTypes = supportedPasteboardTypes();
int numberOfTypes = [supportedTypes count];
for (int i = 0; i < numberOfTypes; i++) {
NSString *type = [supportedTypes objectAtIndex:i];
- RetainPtr<NSArray> pasteboardItem = frame->editor()->client()->readDataFromPasteboard(type, index);
+ RetainPtr<NSArray> pasteboardItem = frame->editor().client()->readDataFromPasteboard(type, index);
if ([pasteboardItem.get() count] == 0)
continue;
@@ -380,7 +380,7 @@
}
NSURL *url = "" *)value;
- if (!frame->editor()->client()->hasRichlyEditableSelection()) {
+ if (!frame->editor().client()->hasRichlyEditableSelection()) {
fragment = createFragmentFromText(frame->selection()->toNormalizedRange().get(), [url absoluteString]);
if (fragment)
return fragment.release();
@@ -427,7 +427,7 @@
if (!frame)
return 0;
- int numberOfItems = frame->editor()->client()->getPasteboardItemsCount();
+ int numberOfItems = frame->editor().client()->getPasteboardItemsCount();
if (!numberOfItems)
return 0;