Adjust date input width.
https://bugs.webkit.org/show_bug.cgi?id=100760.

Patch by Tiancheng Jiang <tijiang@rim.com> on 2013-05-27
Reviewed by Rob Buis.

BlackBerry PR 343497.
Internally Reviewed by Jeff Rogers.

Set width to auto to fit the string length.

* css/themeBlackBerry.css:
(input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="time"], input[type="month"]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][GTK] fast/regions/offsetLeft-offsetTop-in-multiple-regions.html is failing
https://bugs.webkit.org/show_bug.cgi?id=116808

Patch by Radu Stavila <stavila@adobe.com> on 2013-05-27
Reviewed by Anders Carlsson.

The test was failing because of differences between different fonts.

* fast/regions/offsetLeft-offsetTop-in-multiple-regions-expected.txt:
* fast/regions/offsetLeft-offsetTop-in-multiple-regions.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Move PagePopup implementation to WebKitSupport
https://bugs.webkit.org/show_bug.cgi?id=116824

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-05-27
Reviewed by Rob Buis.

Source/WebKit:

* PlatformBlackBerry.cmake: Update new file paths and names.

Source/WebKit/blackberry:

After r150434 PagePopup implementation in BlackBerry port is
independent from WebCore. The classes are now in the
BlackBerry::WebKit namespace so they can be moved from
WebCoresupport to WebKitSupport and renamed to remove the
BlackBerry suffix which is now redundant. Also, now that the
implementation is not shared, it can be simplified a bit more.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): Update to
API changes.
(BlackBerry::WebKit::WebPage::initPopupWebView): Ditto.
(BlackBerry::WebKit::WebPagePrivate::openPagePopup): Ditto.
(BlackBerry::WebKit::WebPagePrivate::closePagePopup): Ditto.
(BlackBerry::WebKit::WebPagePrivate::hasOpenedPopup): Ditto.
* Api/WebPage.h:
(WebKit): Ditto.
* Api/WebPage_p.h:
(WebKit): Ditto.
(WebPagePrivate): Rename m_selectPopup as m_pagePopup, since it
can also point to a color picker or date picker page popup. Also
use RefPtr instead of raw pointer.
* WebKitSupport/ColorPickerClient.cpp: Renamed from Source/WebKit/blackberry/WebCoreSupport/ColorPickerClient.cpp.
(BlackBerry::WebKit::ColorPickerClient::ColorPickerClient):
(BlackBerry::WebKit::ColorPickerClient::generateHTML):
(BlackBerry::WebKit::ColorPickerClient::setValueAndClosePopup):
Return early if popup has been closed already.
(BlackBerry::WebKit::ColorPickerClient::didClosePopup):
* WebKitSupport/ColorPickerClient.h: Renamed from Source/WebKit/blackberry/WebCoreSupport/ColorPickerClient.h.
* WebKitSupport/DatePickerClient.cpp: Renamed from Source/WebKit/blackberry/WebCoreSupport/DatePickerClient.cpp.
(BlackBerry::WebKit::DatePickerClient::DatePickerClient):
(BlackBerry::WebKit::DatePickerClient::~DatePickerClient):
(BlackBerry::WebKit::DatePickerClient::generateHTML):
(BlackBerry::WebKit::DatePickerClient::setValueAndClosePopup):
Return early if popup has been closed already.
(BlackBerry::WebKit::DatePickerClient::didClosePopup):
(BlackBerry::WebKit::DatePickerClient::generateDateLabels):
* WebKitSupport/DatePickerClient.h: Renamed from Source/WebKit/blackberry/WebCoreSupport/DatePickerClient.h.
* WebKitSupport/PagePopup.cpp: Renamed from Source/WebKit/blackberry/WebCoreSupport/PagePopupBlackBerry.cpp.
(BlackBerry::WebKit::PagePopup::PagePopup):
(BlackBerry::WebKit::PagePopup::~PagePopup):
(BlackBerry::WebKit::PagePopup::initialize): Renamed as initialize
and made void, since it always returned true and the callers
ignored the return value.
(BlackBerry::WebKit::PagePopup::writeDocument): Renamed from
generateHTML for consistency with PagePopupClient::writeDocument()
and to avoid confusion with generateHTML method in the clients
that create the HTML contents but they don't write the document.
(BlackBerry::WebKit::PagePopup::setValueAndClosePopupCallback):
Make it static member of PagePopup since the JS object now holds a
reference of PagePopup instance as private data.
(BlackBerry::WebKit::popUpExtensionInitialize): Take a reference
of the PagePopup instance saved as private data of the JS object.
(BlackBerry::WebKit::popUpExtensionFinalize): Unref the PagePopup
instance saved as private data of the JS object.
(BlackBerry::WebKit::PagePopup::installDOMFunction): Instead of
saving the client as private data of the JS object using a wrapper
refcounted object, save the PagePopup instance that is now
refcounted and access the client from the PagePopup instance in
the callback.
(BlackBerry::WebKit::PagePopup::close): Renamed from closePagePopup
since PagePopup::closePagePopup was a bit redundant.
* WebKitSupport/PagePopup.h: Renamed from Source/WebKit/blackberry/WebCoreSupport/PagePopupBlackBerry.h.
(BlackBerry::WebKit::PagePopup::create): Static member to create
instances of PagePopup now that it's refcounted.
* WebKitSupport/PagePopupClient.cpp: Renamed from Source/WebKit/blackberry/WebCoreSupport/PagePopupBlackBerryClient.cpp.
(BlackBerry::WebKit::PagePopupClient::PagePopupClient):
(BlackBerry::WebKit::PagePopupClient::closePopup):
(BlackBerry::WebKit::PagePopupClient::didClosePopup):
(BlackBerry::WebKit::PagePopupClient::contentSize):
(BlackBerry::WebKit::PagePopupClient::writeDocument):
* WebKitSupport/PagePopupClient.h: Renamed from Source/WebKit/blackberry/WebCoreSupport/PagePopupBlackBerryClient.h.
* WebKitSupport/SelectPopupClient.cpp: Renamed from Source/WebKit/blackberry/WebCoreSupport/SelectPopupClient.cpp.
(BlackBerry::WebKit::SelectPopupClient::SelectPopupClient):
(BlackBerry::WebKit::SelectPopupClient::~SelectPopupClient):
(BlackBerry::WebKit::SelectPopupClient::generateHTML):
(BlackBerry::WebKit::SelectPopupClient::setValueAndClosePopup):
Return early if popup has been closed already.
(BlackBerry::WebKit::SelectPopupClient::didClosePopup):
(BlackBerry::WebKit::SelectPopupClient::notifySelectionChange):
* WebKitSupport/SelectPopupClient.h: Renamed from Source/WebKit/blackberry/WebCoreSupport/SelectPopupClient.h.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Remove encoding parameter from FrameLoaderClientBlackBerry::receivedData()
https://bugs.webkit.org/show_bug.cgi?id=116598

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-05-27
Reviewed by Rob Buis.

It's no longer needed since the encoder now checks the override encoding.

* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::committedLoad): Call
receivedData() passing the DocumentLoader instead of the text
encoding.
(WebCore::FrameLoaderClientBlackBerry::receivedData): Call
DocumentLoader::commitData() directly.
* WebCoreSupport/FrameLoaderClientBlackBerry.h:
(FrameLoaderClientBlackBerry):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reset all clients on WebPage close
https://bugs.webkit.org/show_bug.cgi?id=112334

Patch by Xan Lopez <xlopez@igalia.com> on 2013-05-27
Reviewed by Anders Carlsson.

We do not reset the clients on WebPage::close(), so there's a
small chance that someone will try to access them after that. This
won't work and will generally cause runtime warnings, crashes or
other issues. Reset them all to null to prevent this situation.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::close):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Reveal HTTP error code for XHR even if there is no response body
https://bugs.webkit.org/show_bug.cgi?id=116543

Reviewed by Rob Buis.
Reviewed internally by Joe Mason.

It's a regression introduced by r132556.
BlackBerry is doing friendly HTTP error handling: if there is no response body
for an HTTP error it will display an error message made by the port. But for a
XHR request, which usually does not result in displaying error messages to the
end user, HTTP error code should be revealed to let the JavaScript know what
the actual server error code is.

Covered by existing tests:
ManualTests/blackberry/head-xhr-nonexistant-file.html
LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-check-head-readystate-for-404.html
LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-check-get-readystate-for-404-without-body.html

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::shouldNotifyClientFailed):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] REGRESSION(r150071): Animation performance issues in some websites with CSS transforms
https://bugs.webkit.org/show_bug.cgi?id=116724

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-05-27
Reviewed by Rob Buis.

Add another bool variable m_previousFrameDone to make sure we
don't start a new frame until the previous one has been done. Also
make sure we pass the animation start time to
serviceScriptedAnimations().

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): Initialize
m_previousFrameDone and m_monotonicAnimationStartTime.
(BlackBerry::WebKit::WebPagePrivate::animationFrameChanged):
Return early if previous frame is not done. Otherwise set
m_previousFrameDone to false and save the animation start time.
(BlackBerry::WebKit::WebPagePrivate::serviceAnimations): Call
serviceScriptedAnimations() passing the saved animation start time
and reset m_animationScheduled and m_previousFrameDone.
(BlackBerry::WebKit::WebPagePrivate::handleServiceScriptedAnimationsOnMainThread):
Call WebPagePrivate::serviceAnimations().
* Api/WebPage_p.h:
(WebPagePrivate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSSRegions] Prevent unnecessary copy of LayoutRect objects
https://bugs.webkit.org/show_bug.cgi?id=116828

Reviewed by Andreas Kling.

Use const references for parameter passing.
No functional change, no new tests.

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::paintFlowThreadPortionInRegion):
(WebCore::RenderFlowThread::hitTestFlowThreadPortionInRegion):
* rendering/RenderFlowThread.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::overflowRectForFlowThreadPortion):
* rendering/RenderRegion.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tighten FontGlyphs::glyphDataAndPageForCharacter to take FontDescription
https://bugs.webkit.org/show_bug.cgi?id=116823

Reviewed by Andreas Kling.

FontGlyphs does not need to know about Font anymore.

* platform/graphics/Font.cpp:
(WebCore::Font::Font):
(WebCore::Font::operator=):
* platform/graphics/Font.h:
(WebCore::Font::isPlatformFont):
(WebCore::Font::glyphDataAndPageForCharacter):
(Font):
* platform/graphics/FontCache.h:
* platform/graphics/FontFallbackList.cpp:
(WebCore::FontGlyphs::FontGlyphs):
(WebCore::FontGlyphs::glyphDataAndPageForCharacter):
* platform/graphics/FontFallbackList.h:
(WebCore):
(WebCore::FontGlyphs::createForPlatformFont):
        
    Tweaked the name.

(WebCore::FontGlyphs::isForPlatformFont):
        
    Move knowledge about platform font to FontGlyphs as it is needed for resolving system fallback on Mac.

* platform/graphics/blackberry/FontCacheBlackBerry.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/qt/FontCacheQt.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/wince/FontCacheWinCE.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
        
    More descriptive name and tighter interface.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] WebKitWebView child widgets are not rendered with recent GTK+
https://bugs.webkit.org/show_bug.cgi?id=116794

Reviewed by Xan Lopez.

Since rev d22fd7223c75f4720ddb982c659efb0d8d7543c4 of GTK+ expose
events are not propagated to child GdkWindows anymore, and child
widgets are rendered via gtk_container_propagate_draw(). Since all
our children have its own GdkWindow (auth widget, inspector view
and windowed plugins) we don't propagate the draw signal making
them invisible with current GTK+.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDraw): Chain up to the parent draw(), so it's
propagated to the children. This shouldn't have any effect in
previous versions of GTK+ because gtk_container_propagate_draw()
returned early when the child widget had its own GdkWindow.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][CoordinatedGraphics] Misuse of DrawingAreaProxy::setVisibleContentsRect() in WebView::updateViewportSize()
https://bugs.webkit.org/show_bug.cgi?id=116688

Reviewed by Noam Rosenthal.

Visible contents area passed to DrawingAreaProxy::setVisibleContentsRect()
must be calculated including the page scale factor and avoid crossing the
boundaries of the page contents size. In other words the DrawingArea
must know the actual dimensions of what it being drawn. If the
DrawingArea thinks the visible rectangle is bigger than it is, the
contents will be drawn pixelated and blurry.

* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::didChangeContentsSize):
(WebKit::WebView::updateViewportSize):
(WebKit::WebView::visibleContentsSize):
(WebKit):
* UIProcess/CoordinatedGraphics/WebView.h:
(WebKit::WebView::contentsSize):
(WebView):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150764 268f45cc-cd09-0410-ab3c-d52691b4dbfc