summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/mac
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/mac')
-rw-r--r--WebCore/platform/mac/ClipboardMac.h1
-rw-r--r--WebCore/platform/mac/ClipboardMac.mm7
-rw-r--r--WebCore/platform/mac/CookieJar.mm12
-rw-r--r--WebCore/platform/mac/PasteboardMac.mm8
-rw-r--r--WebCore/platform/mac/ScrollbarThemeMac.h2
-rw-r--r--WebCore/platform/mac/WheelEventMac.mm8
6 files changed, 33 insertions, 5 deletions
diff --git a/WebCore/platform/mac/ClipboardMac.h b/WebCore/platform/mac/ClipboardMac.h
index 3d3c78e..adde09c 100644
--- a/WebCore/platform/mac/ClipboardMac.h
+++ b/WebCore/platform/mac/ClipboardMac.h
@@ -72,6 +72,7 @@ public:
#endif
virtual void writeRange(Range*, Frame* frame);
virtual void writeURL(const KURL&, const String&, Frame* frame);
+ virtual void writePlainText(const String&);
// Methods for getting info in Cocoa's type system
NSImage *dragNSImage(NSPoint&) const; // loc converted from dragLoc, based on whole image size
diff --git a/WebCore/platform/mac/ClipboardMac.mm b/WebCore/platform/mac/ClipboardMac.mm
index f4321ad..ddfa0d5 100644
--- a/WebCore/platform/mac/ClipboardMac.mm
+++ b/WebCore/platform/mac/ClipboardMac.mm
@@ -367,7 +367,12 @@ void ClipboardMac::writeRange(Range* range, Frame* frame)
ASSERT(frame);
Pasteboard::writeSelection(m_pasteboard.get(), range, frame->editor()->smartInsertDeleteEnabled() && frame->selectionGranularity() == WordGranularity, frame);
}
-
+
+void ClipboardMac::writePlainText(const String& text)
+{
+ Pasteboard::writePlainText(m_pasteboard.get(), text);
+}
+
void ClipboardMac::writeURL(const KURL& url, const String& title, Frame* frame)
{
ASSERT(frame);
diff --git a/WebCore/platform/mac/CookieJar.mm b/WebCore/platform/mac/CookieJar.mm
index e1d3e5a..df24b03 100644
--- a/WebCore/platform/mac/CookieJar.mm
+++ b/WebCore/platform/mac/CookieJar.mm
@@ -86,6 +86,18 @@ String cookies(const Document*, const KURL& url)
return String();
}
+String cookieRequestHeaderFieldValue(const Document*, const KURL& url)
+{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+
+ NSURL *cookieURL = url;
+ NSArray *cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:cookieURL];
+ return [[NSHTTPCookie requestHeaderFieldsWithCookies:cookies] objectForKey:@"Cookie"];
+
+ END_BLOCK_OBJC_EXCEPTIONS;
+ return String();
+}
+
void setCookies(Document* document, const KURL& url, const String& cookieStr)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
diff --git a/WebCore/platform/mac/PasteboardMac.mm b/WebCore/platform/mac/PasteboardMac.mm
index 8aa7f2c..690637a 100644
--- a/WebCore/platform/mac/PasteboardMac.mm
+++ b/WebCore/platform/mac/PasteboardMac.mm
@@ -197,6 +197,14 @@ void Pasteboard::writeSelection(NSPasteboard* pasteboard, Range* selectedRange,
[pasteboard setData:nil forType:WebSmartPastePboardType];
}
}
+
+void Pasteboard::writePlainText(NSPasteboard* pasteboard, const String& text)
+{
+ NSArray *types = [NSArray arrayWithObject:NSStringPboardType];
+ [pasteboard declareTypes:types owner:nil];
+
+ [pasteboard setString:text forType:NSStringPboardType];
+}
void Pasteboard::writeSelection(Range* selectedRange, bool canSmartCopyOrDelete, Frame* frame)
{
diff --git a/WebCore/platform/mac/ScrollbarThemeMac.h b/WebCore/platform/mac/ScrollbarThemeMac.h
index 5af5fd5..c833ee7 100644
--- a/WebCore/platform/mac/ScrollbarThemeMac.h
+++ b/WebCore/platform/mac/ScrollbarThemeMac.h
@@ -57,6 +57,8 @@ protected:
virtual IntRect forwardButtonRect(Scrollbar*, ScrollbarPart, bool painting = false);
virtual IntRect trackRect(Scrollbar*, bool painting = false);
+ virtual int maxOverlapBetweenPages() { return 40; }
+
virtual int minimumThumbLength(Scrollbar*);
virtual bool shouldCenterOnThumb(Scrollbar*, const PlatformMouseEvent&);
diff --git a/WebCore/platform/mac/WheelEventMac.mm b/WebCore/platform/mac/WheelEventMac.mm
index f380e3e..c9a0efc 100644
--- a/WebCore/platform/mac/WheelEventMac.mm
+++ b/WebCore/platform/mac/WheelEventMac.mm
@@ -45,13 +45,13 @@ PlatformWheelEvent::PlatformWheelEvent(NSEvent* event, NSView *windowView)
BOOL continuous;
wkGetWheelEventDeltas(event, &m_deltaX, &m_deltaY, &continuous);
if (continuous) {
- m_wheelTicksX = m_deltaX / static_cast<float>(cScrollbarPixelsPerLineStep);
- m_wheelTicksY = m_deltaY / static_cast<float>(cScrollbarPixelsPerLineStep);
+ m_wheelTicksX = m_deltaX / static_cast<float>(Scrollbar::pixelsPerLineStep());
+ m_wheelTicksY = m_deltaY / static_cast<float>(Scrollbar::pixelsPerLineStep());
} else {
m_wheelTicksX = m_deltaX;
m_wheelTicksY = m_deltaY;
- m_deltaX *= static_cast<float>(cScrollbarPixelsPerLineStep);
- m_deltaY *= static_cast<float>(cScrollbarPixelsPerLineStep);
+ m_deltaX *= static_cast<float>(Scrollbar::pixelsPerLineStep());
+ m_deltaY *= static_cast<float>(Scrollbar::pixelsPerLineStep());
}
}