summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/platform/Timer.cpp5
-rw-r--r--WebCore/platform/android/PlatformBridge.h5
-rw-r--r--WebCore/platform/network/android/Cookie.cpp20
-rw-r--r--WebCore/platform/network/android/CookieClient.h46
-rw-r--r--WebCore/rendering/RenderPartObject.cpp15
5 files changed, 19 insertions, 72 deletions
diff --git a/WebCore/platform/Timer.cpp b/WebCore/platform/Timer.cpp
index 4804540..ea3effd 100644
--- a/WebCore/platform/Timer.cpp
+++ b/WebCore/platform/Timer.cpp
@@ -37,11 +37,6 @@
#include <wtf/HashSet.h>
#include <wtf/Vector.h>
-#if PLATFORM(ANDROID)
-#include "stl_iterator_base.h"
-#include "heap.h"
-#endif
-
using namespace std;
namespace WebCore {
diff --git a/WebCore/platform/android/PlatformBridge.h b/WebCore/platform/android/PlatformBridge.h
index e3f3b98..fcdfac7 100644
--- a/WebCore/platform/android/PlatformBridge.h
+++ b/WebCore/platform/android/PlatformBridge.h
@@ -48,6 +48,10 @@ public:
// KeyGenerator
static WTF::Vector<String> getSupportedKeyStrengthList();
static String getSignedPublicKeyAndChallengeString(unsigned index, const String& challenge, const KURL&);
+ // Cookies
+ static void setCookies(const KURL&, const String& value);
+ static String cookies(const KURL&);
+ static bool cookiesEnabled();
// These ids need to be in sync with the constants in BrowserFrame.java
enum rawResId {
NoDomain = 1,
@@ -59,5 +63,6 @@ public:
};
static String* globalLocalizedName(rawResId resId);
};
+
}
#endif // PlatformBridge_h
diff --git a/WebCore/platform/network/android/Cookie.cpp b/WebCore/platform/network/android/Cookie.cpp
index 3d10e4a..c0b7c7b 100644
--- a/WebCore/platform/network/android/Cookie.cpp
+++ b/WebCore/platform/network/android/Cookie.cpp
@@ -25,10 +25,7 @@
#include "config.h"
-#include "CookieClient.h"
-#include "JavaSharedClient.h"
-
-using namespace android;
+#include "PlatformBridge.h"
namespace WebCore {
@@ -36,22 +33,17 @@ class Document;
void setCookies(Document*, const KURL& url, const String& value)
{
- if (JavaSharedClient::GetCookieClient())
- JavaSharedClient::GetCookieClient()->setCookies(url, value);
+ PlatformBridge::setCookies(url, value);
}
-String cookies(const Document* , const KURL& url)
+String cookies(const Document*, const KURL& url)
{
- if (JavaSharedClient::GetCookieClient())
- return JavaSharedClient::GetCookieClient()->cookies(url);
- return String();
+ return PlatformBridge::cookies(url);
}
-bool cookiesEnabled(const Document* )
+bool cookiesEnabled(const Document*)
{
- if (JavaSharedClient::GetCookieClient())
- return JavaSharedClient::GetCookieClient()->cookiesEnabled();
- return false;
+ return PlatformBridge::cookiesEnabled();
}
}
diff --git a/WebCore/platform/network/android/CookieClient.h b/WebCore/platform/network/android/CookieClient.h
deleted file mode 100644
index be2963e..0000000
--- a/WebCore/platform/network/android/CookieClient.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2007, The Android Open Source Project
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef COOKIE_CLIENT_H
-#define COOKIE_CLIENT_H
-
-#include "KURL.h"
-#include "PlatformString.h"
-
-using namespace WebCore;
-
-namespace android {
-
-class CookieClient {
-
-public:
- virtual ~CookieClient() {}
- virtual void setCookies(const KURL& url, const String& value) = 0;
- virtual String cookies(const KURL& url) = 0;
- virtual bool cookiesEnabled() = 0;
-};
-
-}
-#endif
diff --git a/WebCore/rendering/RenderPartObject.cpp b/WebCore/rendering/RenderPartObject.cpp
index f864c00..8e9118e 100644
--- a/WebCore/rendering/RenderPartObject.cpp
+++ b/WebCore/rendering/RenderPartObject.cpp
@@ -322,10 +322,15 @@ void RenderPartObject::layout()
#ifdef FLATTEN_IFRAME
RenderPart::calcWidth();
RenderPart::calcHeight();
+ // Calculate the styled dimensions by subtracting the border and padding.
+ int extraWidth = paddingLeft() + paddingRight() + borderLeft() + borderRight();
+ int extraHeight = paddingTop() + paddingBottom() + borderTop() + borderBottom();
+ int styleWidth = width() - extraWidth;
+ int styleHeight = height() - extraHeight;
// Some IFrames have a width and/or height of 1 when they are meant to be
// hidden. If that is the case, do not try to expand.
- if (node()->hasTagName(iframeTag) && widget() && widget()->isFrameView()
- && width() > 1 && height() > 1) {
+ if (node()->hasTagName(iframeTag) && widget() && widget()->isFrameView() &&
+ styleWidth > 1 && styleHeight > 1) {
HTMLIFrameElement* element = static_cast<HTMLIFrameElement*>(node());
bool scrolling = element->scrollingMode() != ScrollbarAlwaysOff;
bool widthIsFixed = style()->width().isFixed();
@@ -336,15 +341,11 @@ void RenderPartObject::layout()
if (scrolling || !widthIsFixed || !heightIsFixed) {
FrameView* view = static_cast<FrameView*>(widget());
RenderView* root = view ? view->frame()->contentRenderer() : NULL;
- RenderPart* owner = view->frame()->ownerRenderer();
- if (root && style()->visibility() != HIDDEN
- && (!owner || owner->style()->visibility() != HIDDEN)) {
+ if (root && style()->visibility() != HIDDEN) {
// Update the dimensions to get the correct minimum preferred
// width
updateWidgetPosition();
- int extraWidth = paddingLeft() + paddingRight() + borderLeft() + borderRight();
- int extraHeight = paddingTop() + paddingBottom() + borderTop() + borderBottom();
// Use the preferred width if it is larger and only if
// scrollbars are visible or the width style is not fixed.
if (scrolling || !widthIsFixed)