summaryrefslogtreecommitdiff
path: root/Source/WebKit
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-23 10:25:11 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-23 10:25:11 +0200
commit5ea819f80c6840c492386bfafbffb059c7e2091f (patch)
tree42ad0b1d82eff090d14278a088ea0f4840a0f938 /Source/WebKit
parent43a42f108af6bcbd91f2672731c3047c26213af1 (diff)
downloadqtwebkit-5ea819f80c6840c492386bfafbffb059c7e2091f.tar.gz
Imported WebKit commit 20434eb8eb95065803473139d8794e98a7672f75 (http://svn.webkit.org/repository/webkit/trunk@132191)
New snapshot that should fix build with latest qtbase and the QPlastiqueStyle removal
Diffstat (limited to 'Source/WebKit')
-rw-r--r--Source/WebKit/blackberry/ChangeLog18
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp7
-rw-r--r--Source/WebKit/chromium/ChangeLog119
-rw-r--r--Source/WebKit/chromium/DEPS2
-rw-r--r--Source/WebKit/chromium/src/StorageAreaProxy.cpp78
-rw-r--r--Source/WebKit/chromium/src/StorageAreaProxy.h18
-rw-r--r--Source/WebKit/chromium/src/WebFrameImpl.cpp14
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.cpp15
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.h4
-rw-r--r--Source/WebKit/chromium/tests/LocaleMacTest.cpp23
-rw-r--r--Source/WebKit/chromium/tests/LocalizedDateICUTest.cpp28
-rw-r--r--Source/WebKit/qt/ChangeLog11
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QStyleFacadeImp.cpp10
13 files changed, 290 insertions, 57 deletions
diff --git a/Source/WebKit/blackberry/ChangeLog b/Source/WebKit/blackberry/ChangeLog
index 62914fd11..3555feadd 100644
--- a/Source/WebKit/blackberry/ChangeLog
+++ b/Source/WebKit/blackberry/ChangeLog
@@ -1,3 +1,21 @@
+2012-10-22 Mike Fenton <mifenton@rim.com>
+
+ [BlackBerry] Remove specialized handling for isIndex fields.
+ https://bugs.webkit.org/show_bug.cgi?id=100004
+
+ Reviewed by Rob Buis.
+
+ PR 214342.
+
+ Remove special handling for isIndex field as the tag
+ is rewritten.
+
+ Reviewed Internally by Yongxin Dai and Nima Ghanavatian.
+
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::inputStyle):
+ (BlackBerry::WebKit::InputHandler::elementType):
+
2012-10-22 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
[Qt] Fix "ASSERTION FAILED: !document->inPageCache()" when loading a page
diff --git a/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp b/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
index 07397011b..0c23f4acc 100644
--- a/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
@@ -229,7 +229,6 @@ static int64_t inputStyle(BlackBerryInputType type, const Element* element)
// with autocorrect disabled explicitly. Only enable predictions.
return NO_AUTO_TEXT | NO_AUTO_CORRECTION;
}
- case InputTypeIsIndex:
case InputTypePassword:
case InputTypeNumber:
case InputTypeTelephone:
@@ -394,12 +393,6 @@ WTF::String InputHandler::elementText()
BlackBerryInputType InputHandler::elementType(Element* element) const
{
- // <isIndex> is bundled with input so we need to check the formControlName
- // first to differentiate it from input which is essentially the same as
- // isIndex has been deprecated.
- if (element->formControlName() == HTMLNames::isindexTag)
- return InputTypeIsIndex;
-
if (const HTMLInputElement* inputElement = static_cast<const HTMLInputElement*>(element->toInputElement()))
return convertInputType(inputElement);
diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog
index b2a38d2b7..b49e64166 100644
--- a/Source/WebKit/chromium/ChangeLog
+++ b/Source/WebKit/chromium/ChangeLog
@@ -1,3 +1,122 @@
+2012-10-23 Kent Tamura <tkent@chromium.org>
+
+ Support full month names in DateTimeEditElement, and use them in input[type=month] by default
+ https://bugs.webkit.org/show_bug.cgi?id=100060
+
+ Reviewed by Kentaro Hara.
+
+ * tests/LocaleMacTest.cpp:
+ (TEST_F): Follow LocaleMac::monthFormat change.
+ * tests/LocalizedDateICUTest.cpp:
+ (TEST_F): Follow LocaleICU::monthFormat change.
+
+2012-10-23 Dan Carney <dcarney@google.com>
+
+ When blocking localStorage, Firefox throws a security exception on access, and maybe so should we
+ https://bugs.webkit.org/show_bug.cgi?id=63257
+
+ Reviewed by Jochen Eisinger.
+
+ Add security check and security check cache.
+
+ * src/StorageAreaProxy.cpp:
+ (WebCore::StorageAreaProxy::StorageAreaProxy):
+ (WebCore::StorageAreaProxy::length):
+ (WebCore::StorageAreaProxy::key):
+ (WebCore::StorageAreaProxy::getItem):
+ (WebCore::StorageAreaProxy::setItem):
+ (WebCore::StorageAreaProxy::removeItem):
+ (WebCore::StorageAreaProxy::clear):
+ (WebCore::StorageAreaProxy::contains):
+ (WebCore::StorageAreaProxy::canAccessStorage):
+ * src/StorageAreaProxy.h:
+ (StorageAreaProxy):
+ (WebCore::StorageAreaProxy::canAccessStorage):
+
+2012-10-22 James Robinson <jamesr@chromium.org>
+
+ [chromium] Suppress compositor invalidations during FrameView recreation in force-compositing-mode
+ https://bugs.webkit.org/show_bug.cgi?id=99882
+
+ Reviewed by Adrienne Walker.
+
+ In force compositing mode, page navigation temporarily takes us in and out of compositing mode because the
+ root GraphicsLayer is owned by the FrameView which is destroyed and recreated. These changes generate
+ invalidations on the WebViewClient that trigger frames but aren't actually terribly useful. WebCore suppresses
+ repaints too early during page load to avoid flashing white or mostly white and to avoid impacting page load time.
+
+ This suppresses compositor invalidations during FrameView recreation.
+
+ Covered by chromium's page cycler performance tests.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::commitDocumentData):
+ (WebKit::WebFrameImpl::createFrameView):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit::WebViewImpl::suppressInvalidations):
+ (WebKit):
+ (WebKit::WebViewImpl::setRootGraphicsLayer):
+ (WebKit::WebViewImpl::scheduleComposite):
+ * src/WebViewImpl.h:
+ (WebViewImpl):
+
+2012-10-22 Kent Tamura <tkent@chromium.org>
+
+ Introduce Localizer::standAloneMonthLabels
+ https://bugs.webkit.org/show_bug.cgi?id=99963
+
+ Reviewed by Kentaro Hara.
+
+ Note that we don't add tests to LocaleWinTest because new function
+ LocaleWin::standAloneMonthLabels is equivalent to monthLabels.
+
+ * tests/LocaleMacTest.cpp:
+ (LocaleMacTest::standAloneMonthLabel): Added a helper function.
+ (TEST_F): Add some tests. We don't test ru_ru locale because it has
+ different data on OSX versions.
+ * tests/LocalizedDateICUTest.cpp:
+ (LocalizedDateICUTest::standAloneMonthLabel): Added a helper function.
+ (TEST_F): Add some tests.
+
+2012-10-22 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r132119.
+ http://trac.webkit.org/changeset/132119
+ https://bugs.webkit.org/show_bug.cgi?id=100019
+
+ Fails its own test on Mac platforms. (Requested by leviw on
+ #webkit).
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::handleGestureEvent):
+
+2012-10-22 Varun Jain <varunjain@chromium.org>
+
+ Context menu generated from touch gestures on textareas has
+ context of the cursor position instead of the position where the event occurs.
+ https://bugs.webkit.org/show_bug.cgi?id=99520
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Send a synthetic mouse down event for context menu-summoning-gesture events so
+ that textareas can correctly set cursors before receiving the context menu event.
+ Also in this change, WebInputEvent::GestureTwoFingerTap now follows the same
+ code path as WebInputEvent::GestureLongPress, hence fixing this bug for both gestures.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::handleGestureEvent):
+
+2012-10-22 Adam Barth <abarth@webkit.org>
+
+ [Chromium] Roll Chromium DEPS to get new version of V8
+ https://bugs.webkit.org/show_bug.cgi?id=100015
+
+ Unreviewed.
+
+ * DEPS:
+ - Bigger is better.
+
2012-10-22 Keishi Hattori <keishi@webkit.org>
Remove monthFormatInLDML
diff --git a/Source/WebKit/chromium/DEPS b/Source/WebKit/chromium/DEPS
index 42b3e567d..ec98d6853 100644
--- a/Source/WebKit/chromium/DEPS
+++ b/Source/WebKit/chromium/DEPS
@@ -32,7 +32,7 @@
vars = {
'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
- 'chromium_rev': '162983'
+ 'chromium_rev': '163297'
}
deps = {
diff --git a/Source/WebKit/chromium/src/StorageAreaProxy.cpp b/Source/WebKit/chromium/src/StorageAreaProxy.cpp
index 2e33d08fb..e1b35e926 100644
--- a/Source/WebKit/chromium/src/StorageAreaProxy.cpp
+++ b/Source/WebKit/chromium/src/StorageAreaProxy.cpp
@@ -53,6 +53,8 @@ namespace WebCore {
StorageAreaProxy::StorageAreaProxy(WebKit::WebStorageArea* storageArea, StorageType storageType)
: m_storageArea(adoptPtr(storageArea))
, m_storageType(storageType)
+ , m_canAccessStorageCachedResult(false)
+ , m_canAccessStorageCachedFrame(0)
{
}
@@ -60,64 +62,88 @@ StorageAreaProxy::~StorageAreaProxy()
{
}
-unsigned StorageAreaProxy::length(Frame* frame) const
+unsigned StorageAreaProxy::length(ExceptionCode& ec, Frame* frame) const
{
- if (canAccessStorage(frame))
- return m_storageArea->length();
- return 0;
+ if (!canAccessStorage(frame)) {
+ ec = SECURITY_ERR;
+ return 0;
+ }
+ ec = 0;
+ return m_storageArea->length();
}
-String StorageAreaProxy::key(unsigned index, Frame* frame) const
+String StorageAreaProxy::key(unsigned index, ExceptionCode& ec, Frame* frame) const
{
- if (canAccessStorage(frame))
- return m_storageArea->key(index);
- return String();
+ if (!canAccessStorage(frame)) {
+ ec = SECURITY_ERR;
+ return String();
+ }
+ ec = 0;
+ return m_storageArea->key(index);
}
-String StorageAreaProxy::getItem(const String& key, Frame* frame) const
+String StorageAreaProxy::getItem(const String& key, ExceptionCode& ec, Frame* frame) const
{
- if (canAccessStorage(frame))
- return m_storageArea->getItem(key);
- return String();
+ if (!canAccessStorage(frame)) {
+ ec = SECURITY_ERR;
+ return String();
+ }
+ ec = 0;
+ return m_storageArea->getItem(key);
}
void StorageAreaProxy::setItem(const String& key, const String& value, ExceptionCode& ec, Frame* frame)
{
- if (!canAccessStorage(frame))
- ec = QUOTA_EXCEEDED_ERR;
- else {
- WebKit::WebStorageArea::Result result = WebKit::WebStorageArea::ResultOK;
- m_storageArea->setItem(key, value, frame->document()->url(), result);
- ec = (result == WebKit::WebStorageArea::ResultOK) ? 0 : QUOTA_EXCEEDED_ERR;
+ if (!canAccessStorage(frame)) {
+ ec = SECURITY_ERR;
+ return;
}
+ WebKit::WebStorageArea::Result result = WebKit::WebStorageArea::ResultOK;
+ m_storageArea->setItem(key, value, frame->document()->url(), result);
+ ec = (result == WebKit::WebStorageArea::ResultOK) ? 0 : QUOTA_EXCEEDED_ERR;
}
-void StorageAreaProxy::removeItem(const String& key, Frame* frame)
+void StorageAreaProxy::removeItem(const String& key, ExceptionCode& ec, Frame* frame)
{
- if (!canAccessStorage(frame))
+ if (!canAccessStorage(frame)) {
+ ec = SECURITY_ERR;
return;
+ }
+ ec = 0;
m_storageArea->removeItem(key, frame->document()->url());
}
-void StorageAreaProxy::clear(Frame* frame)
+void StorageAreaProxy::clear(ExceptionCode& ec, Frame* frame)
{
- if (!canAccessStorage(frame))
+ if (!canAccessStorage(frame)) {
+ ec = SECURITY_ERR;
return;
+ }
+ ec = 0;
m_storageArea->clear(frame->document()->url());
}
-bool StorageAreaProxy::contains(const String& key, Frame* frame) const
+bool StorageAreaProxy::contains(const String& key, ExceptionCode& ec, Frame* frame) const
{
- return !getItem(key, frame).isNull();
+ if (!canAccessStorage(frame)) {
+ ec = SECURITY_ERR;
+ return false;
+ }
+ return !getItem(key, ec, frame).isNull();
}
bool StorageAreaProxy::canAccessStorage(Frame* frame) const
{
- if (!frame->page())
+ if (!frame || !frame->page())
return false;
+ if (m_canAccessStorageCachedFrame == frame)
+ return m_canAccessStorageCachedResult;
WebKit::WebFrameImpl* webFrame = WebKit::WebFrameImpl::fromFrame(frame);
WebKit::WebViewImpl* webView = webFrame->viewImpl();
- return !webView->permissionClient() || webView->permissionClient()->allowStorage(webFrame, m_storageType == LocalStorage);
+ bool result = !webView->permissionClient() || webView->permissionClient()->allowStorage(webFrame, m_storageType == LocalStorage);
+ m_canAccessStorageCachedFrame = frame;
+ m_canAccessStorageCachedResult = result;
+ return result;
}
size_t StorageAreaProxy::memoryBytesUsedByCache() const
diff --git a/Source/WebKit/chromium/src/StorageAreaProxy.h b/Source/WebKit/chromium/src/StorageAreaProxy.h
index cae359358..4a96c0d81 100644
--- a/Source/WebKit/chromium/src/StorageAreaProxy.h
+++ b/Source/WebKit/chromium/src/StorageAreaProxy.h
@@ -48,15 +48,15 @@ public:
virtual ~StorageAreaProxy();
// The HTML5 DOM Storage API
- virtual unsigned length(Frame* sourceFrame) const;
- virtual String key(unsigned index, Frame* sourceFrame) const;
- virtual String getItem(const String& key, Frame* sourceFrame) const;
+ virtual unsigned length(ExceptionCode&, Frame* sourceFrame) const;
+ virtual String key(unsigned index, ExceptionCode&, Frame* sourceFrame) const;
+ virtual String getItem(const String& key, ExceptionCode&, Frame* sourceFrame) const;
virtual void setItem(const String& key, const String& value, ExceptionCode&, Frame* sourceFrame);
- virtual void removeItem(const String& key, Frame* sourceFrame);
- virtual void clear(Frame* sourceFrame);
- virtual bool contains(const String& key, Frame* sourceFrame) const;
+ virtual void removeItem(const String& key, ExceptionCode&, Frame* sourceFrame);
+ virtual void clear(ExceptionCode&, Frame* sourceFrame);
+ virtual bool contains(const String& key, ExceptionCode&, Frame* sourceFrame) const;
- virtual bool disabledByPrivateBrowsingInFrame(const Frame*) const { return false; }
+ virtual bool canAccessStorage(Frame*) const;
virtual size_t memoryBytesUsedByCache() const;
@@ -69,12 +69,12 @@ public:
WebKit::WebStorageArea* sourceAreaInstance, bool originatedInProcess);
private:
- bool canAccessStorage(Frame*) const;
-
static bool isEventSource(Storage*, WebKit::WebStorageArea* sourceAreaInstance);
OwnPtr<WebKit::WebStorageArea> m_storageArea;
StorageType m_storageType;
+ mutable bool m_canAccessStorageCachedResult;
+ mutable Frame* m_canAccessStorageCachedFrame;
};
} // namespace WebCore
diff --git a/Source/WebKit/chromium/src/WebFrameImpl.cpp b/Source/WebKit/chromium/src/WebFrameImpl.cpp
index 98bec3aba..7eef29343 100644
--- a/Source/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/Source/WebKit/chromium/src/WebFrameImpl.cpp
@@ -1114,7 +1114,15 @@ WebURLLoader* WebFrameImpl::createAssociatedURLLoader(const WebURLLoaderOptions&
void WebFrameImpl::commitDocumentData(const char* data, size_t length)
{
+ WebViewImpl* webView = viewImpl();
+ bool isMainFrame = webView->mainFrameImpl()->frame() == frame();
+ if (isMainFrame)
+ webView->suppressInvalidations(true);
+
frame()->loader()->documentLoader()->commitData(data, length);
+
+ if (isMainFrame)
+ webView->suppressInvalidations(false);
}
unsigned WebFrameImpl::unloadListenerCount() const
@@ -2271,10 +2279,16 @@ void WebFrameImpl::createFrameView()
WebViewImpl* webView = viewImpl();
bool isMainFrame = webView->mainFrameImpl()->frame() == frame();
+ if (isMainFrame)
+ webView->suppressInvalidations(true);
+
frame()->createView(webView->size(), Color::white, webView->isTransparent(), webView->fixedLayoutSize(), IntRect(), isMainFrame ? webView->isFixedLayoutModeEnabled() : 0);
if (webView->shouldAutoResize() && isMainFrame)
frame()->view()->enableAutoSizeMode(true, webView->minAutoSize(), webView->maxAutoSize());
+ if (isMainFrame)
+ webView->suppressInvalidations(false);
+
if (isMainFrame && webView->devToolsAgentPrivate())
webView->devToolsAgentPrivate()->mainFrameViewCreated(this);
}
diff --git a/Source/WebKit/chromium/src/WebViewImpl.cpp b/Source/WebKit/chromium/src/WebViewImpl.cpp
index 9f2a845dd..5277b7b34 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.cpp
+++ b/Source/WebKit/chromium/src/WebViewImpl.cpp
@@ -445,6 +445,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
#endif
, m_flingModifier(0)
, m_validationMessage(ValidationMessageClientImpl::create(*client))
+ , m_suppressInvalidations(false)
{
// WebKit/win/WebView.cpp does the same thing, except they call the
// KJS specific wrapper around this method. We need to have threading
@@ -3766,6 +3767,11 @@ bool WebViewImpl::tabsToLinks() const
return m_tabsToLinks;
}
+void WebViewImpl::suppressInvalidations(bool enable)
+{
+ m_suppressInvalidations = enable;
+}
+
#if USE(ACCELERATED_COMPOSITING)
bool WebViewImpl::allowsAcceleratedCompositing()
{
@@ -3774,6 +3780,8 @@ bool WebViewImpl::allowsAcceleratedCompositing()
void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* layer)
{
+ TemporaryChange<bool> change(m_suppressInvalidations, true);
+
m_rootGraphicsLayer = layer;
m_rootLayer = layer ? layer->platformLayer() : 0;
@@ -3797,7 +3805,7 @@ void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* layer)
}
IntRect damagedRect(0, 0, m_size.width, m_size.height);
- if (!m_isAcceleratedCompositingActive)
+ if (!m_isAcceleratedCompositingActive && !m_suppressInvalidations)
m_client->didInvalidateRect(damagedRect);
}
@@ -4096,6 +4104,11 @@ void WebViewImpl::didRecreateOutputSurface(bool success)
void WebViewImpl::scheduleComposite()
{
+ if (m_suppressInvalidations) {
+ TRACE_EVENT0("webkit", "WebViewImpl invalidations suppressed");
+ return;
+ }
+
ASSERT(!Platform::current()->compositorSupport()->isThreadingEnabled());
m_client->scheduleComposite();
}
diff --git a/Source/WebKit/chromium/src/WebViewImpl.h b/Source/WebKit/chromium/src/WebViewImpl.h
index 47907f124..439e0e6b1 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.h
+++ b/Source/WebKit/chromium/src/WebViewImpl.h
@@ -325,6 +325,8 @@ public:
// WebViewImpl
+ void suppressInvalidations(bool enable);
+
void setIgnoreInputEvents(bool newValue);
WebDevToolsAgentPrivate* devToolsAgentPrivate() { return m_devToolsAgent.get(); }
@@ -872,6 +874,8 @@ private:
OwnPtr<LinkHighlight> m_linkHighlight;
#endif
OwnPtr<ValidationMessageClientImpl> m_validationMessage;
+
+ bool m_suppressInvalidations;
};
} // namespace WebKit
diff --git a/Source/WebKit/chromium/tests/LocaleMacTest.cpp b/Source/WebKit/chromium/tests/LocaleMacTest.cpp
index 91482d94d..e9e55d81c 100644
--- a/Source/WebKit/chromium/tests/LocaleMacTest.cpp
+++ b/Source/WebKit/chromium/tests/LocaleMacTest.cpp
@@ -144,6 +144,12 @@ protected:
return locale->shortMonthLabels()[index];
}
+ String standAloneMonthLabel(const String& localeString, unsigned index)
+ {
+ OwnPtr<LocaleMac> locale = LocaleMac::create(localeString);
+ return locale->standAloneMonthLabels()[index];
+ }
+
String shortStandAloneMonthLabel(const String& localeString, unsigned index)
{
OwnPtr<LocaleMac> locale = LocaleMac::create(localeString);
@@ -256,7 +262,7 @@ TEST_F(LocaleMacTest, isRTL)
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
TEST_F(LocaleMacTest, monthFormat)
{
- EXPECT_STREQ("MMM yyyy", monthFormat("en_US").utf8().data());
+ EXPECT_STREQ("MMMM yyyy", monthFormat("en_US").utf8().data());
EXPECT_STREQ("yyyy\xE5\xB9\xB4M\xE6\x9C\x88", monthFormat("ja_JP").utf8().data());
// fr_FR and ru return different results on OS versions.
@@ -278,6 +284,21 @@ TEST_F(LocaleMacTest, shortTimeFormat)
EXPECT_STREQ("H:mm", shortTimeFormat("ja_JP").utf8().data());
}
+TEST_F(LocaleMacTest, standAloneMonthLabels)
+{
+ EXPECT_STREQ("January", standAloneMonthLabel("en_US", January).utf8().data());
+ EXPECT_STREQ("June", standAloneMonthLabel("en_US", June).utf8().data());
+ EXPECT_STREQ("December", standAloneMonthLabel("en_US", December).utf8().data());
+
+ EXPECT_STREQ("janvier", standAloneMonthLabel("fr_FR", January).utf8().data());
+ EXPECT_STREQ("juin", standAloneMonthLabel("fr_FR", June).utf8().data());
+ EXPECT_STREQ("d\xC3\xA9" "cembre", standAloneMonthLabel("fr_FR", December).utf8().data());
+
+ EXPECT_STREQ("1\xE6\x9C\x88", standAloneMonthLabel("ja_JP", January).utf8().data());
+ EXPECT_STREQ("6\xE6\x9C\x88", standAloneMonthLabel("ja_JP", June).utf8().data());
+ EXPECT_STREQ("12\xE6\x9C\x88", standAloneMonthLabel("ja_JP", December).utf8().data());
+}
+
TEST_F(LocaleMacTest, shortMonthLabels)
{
EXPECT_STREQ("Jan", shortMonthLabel("en_US", 0).utf8().data());
diff --git a/Source/WebKit/chromium/tests/LocalizedDateICUTest.cpp b/Source/WebKit/chromium/tests/LocalizedDateICUTest.cpp
index 88946e84d..03d0e1340 100644
--- a/Source/WebKit/chromium/tests/LocalizedDateICUTest.cpp
+++ b/Source/WebKit/chromium/tests/LocalizedDateICUTest.cpp
@@ -118,6 +118,12 @@ protected:
return locale->shortStandAloneMonthLabels()[index];
}
+ String standAloneMonthLabel(const char* localeString, unsigned index)
+ {
+ OwnPtr<LocaleICU> locale = LocaleICU::create(localeString);
+ return locale->standAloneMonthLabels()[index];
+ }
+
Labels timeAMPMLabels(const char* localeString)
{
OwnPtr<LocaleICU> locale = LocaleICU::create(localeString);
@@ -146,8 +152,8 @@ TEST_F(LocalizedDateICUTest, isRTL)
TEST_F(LocalizedDateICUTest, monthFormat)
{
- EXPECT_STREQ("MMM yyyy", monthFormat("en_US").utf8().data());
- EXPECT_STREQ("MMM yyyy", monthFormat("fr").utf8().data());
+ EXPECT_STREQ("MMMM yyyy", monthFormat("en_US").utf8().data());
+ EXPECT_STREQ("MMMM yyyy", monthFormat("fr").utf8().data());
EXPECT_STREQ("yyyy\xE5\xB9\xB4M\xE6\x9C\x88", monthFormat("ja").utf8().data());
}
@@ -166,6 +172,24 @@ TEST_F(LocalizedDateICUTest, localizedShortDateFormatText)
EXPECT_STREQ("H:mm", localizedShortDateFormatText("ja").utf8().data());
}
+TEST_F(LocalizedDateICUTest, standAloneMonthLabels)
+{
+ EXPECT_STREQ("January", standAloneMonthLabel("en_US", 0).utf8().data());
+ EXPECT_STREQ("June", standAloneMonthLabel("en_US", 5).utf8().data());
+ EXPECT_STREQ("December", standAloneMonthLabel("en_US", 11).utf8().data());
+
+ EXPECT_STREQ("janvier", standAloneMonthLabel("fr_FR", 0).utf8().data());
+ EXPECT_STREQ("juin", standAloneMonthLabel("fr_FR", 5).utf8().data());
+ EXPECT_STREQ("d\xC3\xA9" "cembre", standAloneMonthLabel("fr_FR", 11).utf8().data());
+
+ EXPECT_STREQ("1\xE6\x9C\x88", standAloneMonthLabel("ja_JP", 0).utf8().data());
+ EXPECT_STREQ("6\xE6\x9C\x88", standAloneMonthLabel("ja_JP", 5).utf8().data());
+ EXPECT_STREQ("12\xE6\x9C\x88", standAloneMonthLabel("ja_JP", 11).utf8().data());
+
+ EXPECT_STREQ("\xD0\x9C\xD0\xB0\xD1\x80\xD1\x82", standAloneMonthLabel("ru_RU", 2).utf8().data());
+ EXPECT_STREQ("\xD0\x9C\xD0\xB0\xD0\xB9", standAloneMonthLabel("ru_RU", 4).utf8().data());
+}
+
TEST_F(LocalizedDateICUTest, shortMonthLabels)
{
EXPECT_STREQ("Jan", shortMonthLabel("en_US", 0).utf8().data());
diff --git a/Source/WebKit/qt/ChangeLog b/Source/WebKit/qt/ChangeLog
index 553d7fa20..4cc7e72c2 100644
--- a/Source/WebKit/qt/ChangeLog
+++ b/Source/WebKit/qt/ChangeLog
@@ -1,3 +1,14 @@
+2012-10-23 Simon Hausmann <simon.hausmann@digia.com>
+
+ Unreviewed build fix with newer Qt 5.
+
+ QPlastiqueStyle has been removed, but as pointed out by Jens it's also not
+ maintained anymore and hence safe to remove. We can do tweaks with the new
+ fusion style if required.
+
+ * WebCoreSupport/QStyleFacadeImp.cpp:
+ (WebKit::QStyleFacadeImp::paintInnerSpinButton):
+
2012-10-22 Simon Hausmann <simon.hausmann@digia.com>
[Qt] Fix build without QtWidgets
diff --git a/Source/WebKit/qt/WebCoreSupport/QStyleFacadeImp.cpp b/Source/WebKit/qt/WebCoreSupport/QStyleFacadeImp.cpp
index b9e478709..7fc5cc56e 100644
--- a/Source/WebKit/qt/WebCoreSupport/QStyleFacadeImp.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/QStyleFacadeImp.cpp
@@ -30,9 +30,6 @@
#include <QMacStyle>
#include <QPainter>
#include <QPushButton>
-#ifndef QT_NO_STYLE_PLASTIQUE
-#include <QPlastiqueStyle>
-#endif
#include <QStyleFactory>
#include <QStyleOption>
@@ -373,13 +370,6 @@ void QStyleFacadeImp::paintInnerSpinButton(QPainter* painter, const QStyleFacade
option.state |= QStyle::State_Mini;
}
#endif
-#if !defined(QT_NO_STYLE_PLASTIQUE)
- // QPlastiqueStyle looks best when the spin buttons are flush with the frame's edge.
- if (qobject_cast<QPlastiqueStyle*>(style())) {
- inflateX = 0;
- inflateY = 0;
- }
-#endif
buttonRect.inflateX(inflateX);
buttonRect.inflateY(inflateY);