summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/RenderSkinCombo.cpp8
-rw-r--r--WebKit/android/RenderSkinRadio.cpp10
-rw-r--r--WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp18
-rw-r--r--WebKit/android/WebCoreSupport/ChromeClientAndroid.h7
-rw-r--r--WebKit/android/WebCoreSupport/EditorClientAndroid.cpp1
-rw-r--r--WebKit/android/WebCoreSupport/EditorClientAndroid.h1
-rw-r--r--WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp30
-rw-r--r--WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h1
-rw-r--r--WebKit/android/jni/JavaBridge.cpp11
-rw-r--r--WebKit/android/jni/WebCoreFrameBridge.cpp11
-rw-r--r--WebKit/android/jni/WebCoreResourceLoader.cpp9
-rw-r--r--WebKit/android/jni/WebHistory.cpp2
-rw-r--r--WebKit/android/jni/WebViewCore.cpp11
-rw-r--r--WebKit/android/stl/algorithm18
14 files changed, 84 insertions, 54 deletions
diff --git a/WebKit/android/RenderSkinCombo.cpp b/WebKit/android/RenderSkinCombo.cpp
index a336257..870c13e 100644
--- a/WebKit/android/RenderSkinCombo.cpp
+++ b/WebKit/android/RenderSkinCombo.cpp
@@ -27,7 +27,7 @@
#include "RenderSkinCombo.h"
#include "Document.h"
-#include "FormControlElement.h"
+#include "Element.h"
#include "Node.h"
#include "SkCanvas.h"
#include "SkNinePatch.h"
@@ -59,12 +59,8 @@ bool RenderSkinCombo::Draw(SkCanvas* canvas, Node* element, int x, int y, int wi
{
if (!s_decoded)
return true;
- bool enabled = false;
- if (FormControlElement* controlElement = toFormControlElement(static_cast<Element*>(element))) {
- enabled = controlElement->isEnabled();
- }
- State state = enabled ? kNormal : kDisabled;
+ State state = (element->isElementNode() && static_cast<Element*>(element)->isEnabledFormControl()) ? kNormal : kDisabled;
if (height < (s_margin<<1) + 1) {
height = (s_margin<<1) + 1;
}
diff --git a/WebKit/android/RenderSkinRadio.cpp b/WebKit/android/RenderSkinRadio.cpp
index 831403a..ff5e908 100644
--- a/WebKit/android/RenderSkinRadio.cpp
+++ b/WebKit/android/RenderSkinRadio.cpp
@@ -28,7 +28,7 @@
#include "android_graphics.h"
#include "Document.h"
-#include "FormControlElement.h"
+#include "Element.h"
#include "InputElement.h"
#include "IntRect.h"
#include "Node.h"
@@ -66,12 +66,8 @@ void RenderSkinRadio::Draw(SkCanvas* canvas, Node* element, const IntRect& ir,
int saveLayerCount = 0;
int saveScaleCount = 0;
- bool enabled = false;
- if (FormControlElement* control = toFormControlElement(static_cast<Element*>(element))) {
- enabled = control->isEnabled();
- }
-
- if (!enabled) {
+ if (!element->isElementNode() ||
+ !static_cast<Element*>(element)->isEnabledFormControl()) {
saveLayerCount = canvas->saveLayerAlpha(&r, 0x80);
}
SkScalar width = r.width();
diff --git a/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp b/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
index 6e97ae5..39bc004 100644
--- a/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
+++ b/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
@@ -145,7 +145,7 @@ void ChromeClientAndroid::setResizable(bool) { notImplemented(); }
// This function is called by the JavaScript bindings to print usually an error to
// a message console. Pass the message to the java side so that the client can
// handle it as it sees fit.
-void ChromeClientAndroid::addMessageToConsole(const String& message, unsigned int lineNumber, const String& sourceID) {
+void ChromeClientAndroid::addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned int lineNumber, const String& sourceID) {
android::WebViewCore::getWebViewCore(m_webFrame->page()->mainFrame()->view())->addMessageToConsole(message, lineNumber, sourceID);
}
@@ -168,7 +168,7 @@ void ChromeClientAndroid::closeWindowSoon()
mainFrame->loader()->stopAllLoaders();
// Remove all event listeners so that no javascript can execute as a result
// of mouse/keyboard events.
- mainFrame->document()->removeAllEventListenersFromAllNodes();
+ mainFrame->document()->removeAllEventListeners();
// Close the window.
m_webFrame->closeWindow(android::WebViewCore::getWebViewCore(mainFrame->view()));
}
@@ -249,13 +249,16 @@ PlatformWidget ChromeClientAndroid::platformWindow() const {
return viewBridge;
}
-// new to webkit4 (Feb 27, 2009)
void ChromeClientAndroid::contentsSizeChanged(Frame*, const IntSize&) const
{
notImplemented();
}
-// new to webkit4 (Feb 27, 2009)
+void ChromeClientAndroid::scrollRectIntoView(const IntRect&, const ScrollView*) const
+{
+ notImplemented();
+}
+
void ChromeClientAndroid::formStateDidChange(const Node*)
{
notImplemented();
@@ -309,8 +312,13 @@ void ChromeClientAndroid::exceededDatabaseQuota(Frame* frame, const String& name
}
#endif
-// new to change 38068 (Nov 6, 2008)
+void ChromeClientAndroid::requestGeolocationPermissionForFrame(Frame*, Geolocation*) { notImplemented(); }
void ChromeClientAndroid::runOpenPanel(Frame*, PassRefPtr<FileChooser>) { notImplemented(); }
+bool ChromeClientAndroid::setCursor(PlatformCursorHandle)
+{
+ notImplemented();
+ return false;
+}
void ChromeClientAndroid::wakeUpMainThreadWithNewQuota(long newQuota) {
MutexLocker locker(m_quotaThreadLock);
diff --git a/WebKit/android/WebCoreSupport/ChromeClientAndroid.h b/WebKit/android/WebCoreSupport/ChromeClientAndroid.h
index 00c45b9..966d5c7 100644
--- a/WebKit/android/WebCoreSupport/ChromeClientAndroid.h
+++ b/WebKit/android/WebCoreSupport/ChromeClientAndroid.h
@@ -77,7 +77,7 @@ namespace android {
virtual void setResizable(bool);
- virtual void addMessageToConsole(const String& message, unsigned int lineNumber, const String& sourceID);
+ virtual void addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned int lineNumber, const String& sourceID);
virtual bool canRunBeforeUnloadConfirmPanel();
virtual bool runBeforeUnloadConfirmPanel(const String& message, Frame* frame);
@@ -100,6 +100,7 @@ namespace android {
virtual IntRect windowToScreen(const IntRect&) const;
virtual PlatformWidget platformWindow() const;
virtual void contentsSizeChanged(Frame*, const IntSize&) const;
+ virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const;
// End methods used by HostWindow.
virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned int);
@@ -110,12 +111,16 @@ namespace android {
#if ENABLE(DATABASE)
virtual void exceededDatabaseQuota(Frame*, const String&);
#endif
+ virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
+ virtual bool setCursor(PlatformCursorHandle);
// Notification that the given form element has changed. This function
// will be called frequently, so handling should be very fast.
virtual void formStateDidChange(const Node*);
+ virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
+
// Android-specific
void setWebFrame(android::WebFrame* webframe);
void wakeUpMainThreadWithNewQuota(long newQuota);
diff --git a/WebKit/android/WebCoreSupport/EditorClientAndroid.cpp b/WebKit/android/WebCoreSupport/EditorClientAndroid.cpp
index 8629731..4918ee9 100644
--- a/WebKit/android/WebCoreSupport/EditorClientAndroid.cpp
+++ b/WebKit/android/WebCoreSupport/EditorClientAndroid.cpp
@@ -219,6 +219,7 @@ void EditorClientAndroid::getGuessesForWord(String const&, WTF::Vector<String>&)
bool EditorClientAndroid::spellingUIIsShowing() { return false; }
void EditorClientAndroid::checkGrammarOfString(unsigned short const*, int, WTF::Vector<GrammarDetail>&, int*, int*) {}
void EditorClientAndroid::checkSpellingOfString(unsigned short const*, int, int*, int*) {}
+String EditorClientAndroid::getAutoCorrectSuggestionForMisspelledWord(const String&) { return String(); }
void EditorClientAndroid::textFieldDidEndEditing(Element*) {}
void EditorClientAndroid::textDidChangeInTextArea(Element*) {}
void EditorClientAndroid::textDidChangeInTextField(Element*) {}
diff --git a/WebKit/android/WebCoreSupport/EditorClientAndroid.h b/WebKit/android/WebCoreSupport/EditorClientAndroid.h
index 763b097..9697d66 100644
--- a/WebKit/android/WebCoreSupport/EditorClientAndroid.h
+++ b/WebKit/android/WebCoreSupport/EditorClientAndroid.h
@@ -94,6 +94,7 @@ public:
virtual void ignoreWordInSpellDocument(const String&);
virtual void learnWord(const String&);
virtual void checkSpellingOfString(const UChar*, int length, int* misspellingLocation, int* misspellingLength);
+ virtual String getAutoCorrectSuggestionForMisspelledWord(const String& misspelledWorld);
virtual void checkGrammarOfString(const UChar*, int length, WTF::Vector<GrammarDetail>&, int* badGrammarLocation, int* badGrammarLength);
virtual void updateSpellingUIWithGrammarString(const String&, const GrammarDetail& detail);
virtual void updateSpellingUIWithMisspelledWord(const String&);
diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
index 274280e..0f0509d 100644
--- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
+++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
@@ -191,6 +191,10 @@ bool FrameLoaderClientAndroid::dispatchDidLoadResourceFromMemoryCache(DocumentLo
return false;
}
+void FrameLoaderClientAndroid::dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const ScriptString&) {
+ return;
+}
+
void FrameLoaderClientAndroid::dispatchDidHandleOnloadEvents() {
}
@@ -226,10 +230,12 @@ void FrameLoaderClientAndroid::dispatchDidReceiveIcon() {
WebCore::Image* icon = WebCore::iconDatabase()->iconForPageURL(
url, WebCore::IntSize(16, 16));
// If the request fails, try the original request url.
- if (!icon)
+ if (!icon) {
+ DocumentLoader* docLoader = m_frame->loader()->activeDocumentLoader();
+ KURL originalURL = docLoader->originalRequest().url();
icon = WebCore::iconDatabase()->iconForPageURL(
- m_frame->loader()->originalRequestURL().string(),
- WebCore::IntSize(16, 16));
+ originalURL, WebCore::IntSize(16, 16));
+ }
// There is a bug in webkit where cancelling an icon load is treated as a
// failure. When this is fixed, we can ASSERT again that we have an icon.
if (icon) {
@@ -746,8 +752,7 @@ void FrameLoaderClientAndroid::didFinishLoad() {
}
void FrameLoaderClientAndroid::prepareForDataSourceReplacement() {
- ASSERT(m_frame);
- m_frame->loader()->detachChildren();
+ verifiedOk();
}
PassRefPtr<DocumentLoader> FrameLoaderClientAndroid::createDocumentLoader(
@@ -790,19 +795,16 @@ void FrameLoaderClientAndroid::transitionToCommittedForNewPage() {
m_frame->setView(NULL);
// Create a new FrameView and associate it with the saved webFrameView
- FrameView* view = new FrameView(m_frame);
- webFrameView->setView(view);
+ RefPtr<FrameView> view = FrameView::create(m_frame);
+ webFrameView->setView(view.get());
Release(webFrameView);
// Give the new FrameView to the Frame
m_frame->setView(view);
- // Deref since FrameViews are created with a ref of 1
- view->deref();
-
if (m_frame->ownerRenderer())
- m_frame->ownerRenderer()->setWidget(view);
+ m_frame->ownerRenderer()->setWidget(view.get());
m_frame->view()->initScrollbars();
@@ -834,15 +836,13 @@ WTF::PassRefPtr<WebCore::Frame> FrameLoaderClientAndroid::createFrame(const KURL
parent->tree()->appendChild(newFrame);
newFrame->tree()->setName(name);
// Create a new FrameView and WebFrameView for the child frame to draw into.
- FrameView* frameView = new WebCore::FrameView(newFrame);
- WebFrameView* webFrameView = new WebFrameView(frameView,
+ RefPtr<FrameView> frameView = FrameView::create(newFrame);
+ WebFrameView* webFrameView = new WebFrameView(frameView.get(),
WebViewCore::getWebViewCore(parent->view()));
// frameView Retains webFrameView, so call Release for webFrameView
Release(webFrameView);
// Attach the frameView to the newFrame.
newFrame->setView(frameView);
- // setView() refs the frameView so call deref on the frameView
- frameView->deref();
newFrame->init();
newFrame->selection()->setFocused(true);
LOGV("::WebCore:: createSubFrame returning %p", newFrame);
diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h
index 2816c78..d491750 100644
--- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h
+++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h
@@ -71,6 +71,7 @@ namespace android {
virtual void dispatchDidFinishLoading(DocumentLoader*, unsigned long identifier);
virtual void dispatchDidFailLoading(DocumentLoader*, unsigned long identifier, const ResourceError&);
virtual bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int length);
+ virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const ScriptString&);
virtual void dispatchDidHandleOnloadEvents();
virtual void dispatchDidReceiveServerRedirectForProvisionalLoad();
diff --git a/WebKit/android/jni/JavaBridge.cpp b/WebKit/android/jni/JavaBridge.cpp
index 6cb2167..98d7c43 100644
--- a/WebKit/android/jni/JavaBridge.cpp
+++ b/WebKit/android/jni/JavaBridge.cpp
@@ -70,7 +70,7 @@ public:
virtual void setSharedTimer(long long timemillis);
virtual void stopSharedTimer();
- virtual void setCookies(WebCore::KURL const& url, WebCore::KURL const& docURL, WebCore::String const& value);
+ virtual void setCookies(WebCore::KURL const& url, WebCore::String const& value);
virtual WebCore::String cookies(WebCore::KURL const& url);
virtual bool cookiesEnabled();
@@ -114,7 +114,7 @@ JavaBridge::JavaBridge(JNIEnv* env, jobject obj)
mSetSharedTimer = env->GetMethodID(clazz, "setSharedTimer", "(J)V");
mStopSharedTimer = env->GetMethodID(clazz, "stopSharedTimer", "()V");
- mSetCookies = env->GetMethodID(clazz, "setCookies", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
+ mSetCookies = env->GetMethodID(clazz, "setCookies", "(Ljava/lang/String;Ljava/lang/String;)V");
mCookies = env->GetMethodID(clazz, "cookies", "(Ljava/lang/String;)Ljava/lang/String;");
mCookiesEnabled = env->GetMethodID(clazz, "cookiesEnabled", "()Z");
mGetPluginDirectories = env->GetMethodID(clazz, "getPluginDirectories", "()[Ljava/lang/String;");
@@ -160,19 +160,16 @@ JavaBridge::stopSharedTimer()
}
void
-JavaBridge::setCookies(WebCore::KURL const& url, WebCore::KURL const& docUrl, WebCore::String const& value)
+JavaBridge::setCookies(WebCore::KURL const& url, WebCore::String const& value)
{
JNIEnv* env = JSC::Bindings::getJNIEnv();
const WebCore::String& urlStr = url.string();
jstring jUrlStr = env->NewString(urlStr.characters(), urlStr.length());
- const WebCore::String& docUrlStr = docUrl.string();
- jstring jDocUrlStr = env->NewString(docUrlStr.characters(), docUrlStr.length());
jstring jValueStr = env->NewString(value.characters(), value.length());
AutoJObject obj = getRealObject(env, mJavaObject);
- env->CallVoidMethod(obj.get(), mSetCookies, jUrlStr, jDocUrlStr, jValueStr);
+ env->CallVoidMethod(obj.get(), mSetCookies, jUrlStr, jValueStr);
env->DeleteLocalRef(jUrlStr);
- env->DeleteLocalRef(jDocUrlStr);
env->DeleteLocalRef(jValueStr);
}
diff --git a/WebKit/android/jni/WebCoreFrameBridge.cpp b/WebKit/android/jni/WebCoreFrameBridge.cpp
index 8c3f69e..7860b8c 100644
--- a/WebKit/android/jni/WebCoreFrameBridge.cpp
+++ b/WebKit/android/jni/WebCoreFrameBridge.cpp
@@ -41,6 +41,7 @@
#include "EditorClientAndroid.h"
#include "Element.h"
#include "Font.h"
+#include "FormState.h"
#include "Frame.h"
#include "FrameLoader.h"
#include "FrameLoaderClientAndroid.h"
@@ -48,6 +49,7 @@
#include "FrameView.h"
#include "GraphicsContext.h"
#include "HistoryItem.h"
+#include "HTMLCollection.h"
#include "HTMLElement.h"
#include "HTMLFormElement.h"
#include "HTMLInputElement.h"
@@ -739,17 +741,15 @@ static void CreateFrame(JNIEnv* env, jobject obj, jobject javaview, jobject jAss
WebViewCore* webViewCore = new WebViewCore(env, javaview, frame);
// Create a FrameView
- WebCore::FrameView* frameView = new WebCore::FrameView(frame);
+ RefPtr<WebCore::FrameView> frameView = WebCore::FrameView::create(frame);
// Create a WebFrameView
- WebFrameView* webFrameView = new WebFrameView(frameView, webViewCore);
+ WebFrameView* webFrameView = new WebFrameView(frameView.get(), webViewCore);
// As webFrameView Retains webViewCore, release our ownership
Release(webViewCore);
// As frameView Retains webFrameView, release our ownership
Release(webFrameView);
// Attach the frameView to the frame and release our ownership
frame->setView(frameView);
- frameView->deref();
-
// Set the frame to active to turn on keyboard focus.
frame->init();
frame->selection()->setFocused(true);
@@ -831,6 +831,9 @@ static void PostUrl(JNIEnv *env, jobject obj, jstring url, jbyteArray postData)
}
LOGV("PostUrl %s", kurl.string().latin1().data());
+ // FIXME klobag, WebCore changed FrameLoader::loadPostRequest to private,
+ // I temporarily made it public in FrameLoader.h, please figure out
+ // if we can use FrameLoader::load(...) to send POST request.
pFrame->loader()->loadPostRequest(request, String(), String(), false,
WebCore::FrameLoadTypeStandard, 0, 0, true);
}
diff --git a/WebKit/android/jni/WebCoreResourceLoader.cpp b/WebKit/android/jni/WebCoreResourceLoader.cpp
index d4eda81..8e8d44d 100644
--- a/WebKit/android/jni/WebCoreResourceLoader.cpp
+++ b/WebKit/android/jni/WebCoreResourceLoader.cpp
@@ -160,10 +160,11 @@ jint WebCoreResourceLoader::CreateResponse(JNIEnv* env, jobject obj, jstring url
response->setHTTPStatusText(status);
LOGV("Response setStatusText: %s", status.latin1().data());
}
- // FIXME: This assumes that time_t is a long and that long is the same size as int.
- if ((unsigned long)expireTime > INT_MAX)
- expireTime = INT_MAX;
- response->setExpirationDate((time_t)expireTime);
+ // FIXME klobag, WebCore::ResourceResponse changed the way of setting
+ // expiration date. Now it has to set the HTTP header as,
+ // 'expires':<date format string>.
+ // Temporarily disable the code.
+ // response->setHTTPHeaderField("expires", expireTime);
return (int)response;
}
diff --git a/WebKit/android/jni/WebHistory.cpp b/WebKit/android/jni/WebHistory.cpp
index 01fd543..aa80bf0 100644
--- a/WebKit/android/jni/WebHistory.cpp
+++ b/WebKit/android/jni/WebHistory.cpp
@@ -120,7 +120,7 @@ static void WebHistoryClose(JNIEnv* env, jobject obj, jint frame)
while (child) {
// Use the old history item since the current one may have a
// deleted parent.
- WebCore::HistoryItem* item = parent->childItemWithName(child->tree()->name());
+ WebCore::HistoryItem* item = parent->childItemWithTarget(child->tree()->name());
child->loader()->setCurrentHistoryItem(item);
// Append the first child to the queue if it exists.
if (WebCore::Frame* f = child->tree()->firstChild())
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index 685b41f..0d5a3dd 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -1522,9 +1522,11 @@ public:
if (!m_select || !CacheBuilder::validNode(m_viewImpl->m_mainFrame,
m_frame, m_select))
return;
+ // FIXME: scroggo, listToOptionIndex was made private in HTMLSelectElement.
int optionIndex = m_select->listToOptionIndex(index);
m_select->setSelectedIndex(optionIndex, true, false);
- m_select->onChange();
+ // FIXME: scroggo, onChange is removed from HTMLSelectElement.
+ // m_select->onChange();
m_viewImpl->contentInvalidate(m_select->getRect());
}
@@ -1541,7 +1543,7 @@ public:
// If count is 1 or 0, use replyInt.
SkASSERT(count > 1);
- const WTF::Vector<HTMLElement*>& items = m_select->listItems();
+ const WTF::Vector<Element*>& items = m_select->listItems();
int totalItems = static_cast<int>(items.size());
// Keep track of the position of the value we are comparing against.
int arrayIndex = 0;
@@ -1563,7 +1565,8 @@ public:
option->setSelectedState(false);
}
}
- m_select->onChange();
+ // FIXME scroggo, onChange is removed from HTMLSelectElement
+ // m_select->onChange();
m_viewImpl->contentInvalidate(m_select->getRect());
}
private:
@@ -1747,7 +1750,7 @@ bool WebViewCore::handleMouseClick(WebCore::Frame* framePtr, WebCore::Node* node
WebCore::RenderObject* renderer = nodePtr->renderer();
if (renderer && renderer->isMenuList()) {
WebCore::HTMLSelectElement* select = static_cast<WebCore::HTMLSelectElement*>(nodePtr);
- const WTF::Vector<WebCore::HTMLElement*>& listItems = select->listItems();
+ const WTF::Vector<WebCore::Element*>& listItems = select->listItems();
SkTDArray<const uint16_t*> names;
SkTDArray<int> enabledArray;
SkTDArray<int> selectedArray;
diff --git a/WebKit/android/stl/algorithm b/WebKit/android/stl/algorithm
index 4453ea3..131fe0d 100644
--- a/WebKit/android/stl/algorithm
+++ b/WebKit/android/stl/algorithm
@@ -71,6 +71,24 @@ namespace std
__b = __tmp;
}
+ template<typename _Tp>
+ inline void
+ reverse(_Tp* __first, _Tp* __last)
+ {
+ while(true)
+ {
+ if (__first == __last || __first == --__last)
+ return;
+ else
+ {
+ _Tp __tmp = *__first;
+ *__first = *__last;
+ *__last = __tmp;
+ }
+ ++__first;
+ }
+ }
+
#undef min
#undef max