[EFL][DRT] Support Geolocation
https://bugs.webkit.org/show_bug.cgi?id=97427

Source/WebKit:

Patch by Seonae Kim <sunaeluv.kim@samsung.com> on 2012-11-01
Reviewed by Gyuyoung Kim.

Add a mock directory to use GeolocationClientMock in DumpRenderTree.

* PlatformEfl.cmake:

Source/WebKit/efl:

Patch by Seonae Kim <sunaeluv.kim@samsung.com> on 2012-11-01
Reviewed by Gyuyoung Kim.

Implement methods to use GeolocationClientMock in DumpRenderTree.
This client attaches to the page whenever a view is created.

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::attachClientToPage):
(DumpRenderTreeSupportEfl::resetGeolocationClientMock):
(DumpRenderTreeSupportEfl::setMockGeolocationPermission):
(DumpRenderTreeSupportEfl::setMockGeolocationPosition):
(DumpRenderTreeSupportEfl::setMockGeolocationPositionUnavailableError):
(DumpRenderTreeSupportEfl::numberOfPendingGeolocationPermissionRequests):
* WebCoreSupport/DumpRenderTreeSupportEfl.h:

Tools:

Patch by Seonae Kim <sunaeluv.kim@samsung.com> on 2012-11-01
Reviewed by Gyuyoung Kim.

Implement methods to use GeolocationClientMock in DumpRenderTree.
This client attaches to the page whenever a view is created.

* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(DumpRenderTreeChrome::createView):
(DumpRenderTreeChrome::resetDefaultsToConsistentValues):
* DumpRenderTree/efl/TestRunnerEfl.cpp:
(TestRunner::setMockGeolocationPosition):
(TestRunner::setMockGeolocationPositionUnavailableError):
(TestRunner::setGeolocationPermission):
(TestRunner::numberOfPendingGeolocationPermissionRequests):

LayoutTests:

Patch by Seonae Kim <sunaeluv.kim@samsung.com> on 2012-11-01
Reviewed by Gyuyoung Kim.

Change the comment of Geolocation test cases.

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133266 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Make File Chooser dialog modal in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=100962

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-11-01
Reviewed by Gyuyoung Kim.

Make File Chooser dialog modal in MiniBrowser and make
sure it is closed and freed when its parent window is
closed.

* MiniBrowser/efl/main.c:
(close_file_picker):
(on_filepicker_parent_deletion):
(on_file_chooser_request):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Shadow] Element should have getter and setter of attribute 'pseudo'
https://bugs.webkit.org/show_bug.cgi?id=100831

Reviewed by Hajime Morita.

Source/WebCore:

We expose 'pseudo' attribute in Element. When nothing is assigned to 'pseudo', it should return null.

Test: fast/dom/shadow/pseudo-attribute.html

* dom/Element.cpp:
(WebCore::Element::pseudo):
(WebCore):
(WebCore::Element::setPseudo):
* dom/Element.h:
(Element):
* dom/Element.idl:
* html/HTMLAttributeNames.in:

LayoutTests:

* fast/dom/shadow/pseudo-attribute-expected.txt: Added.
* fast/dom/shadow/pseudo-attribute.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133268 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Remove redundant internal function
https://bugs.webkit.org/show_bug.cgi?id=100969

Patch by Jinwoo Song <jinwoo7.song@samsung.com> on 2012-11-02
Reviewed by Gyuyoung Kim.

Remove ewk_view_text_found() in ewk_view.cpp which is not used anymore.
Now, "text,found" signal is emitted by DECLARE_EWK_VIEW_CALLBACK(TextFound, "text,found", unsigned)
in EwkViewCallback.h

* UIProcess/API/efl/ewk_view.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133269 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Coordinated Graphics: Manage the lifecycle of shareable surfaces precisely.
https://bugs.webkit.org/show_bug.cgi?id=100797

Patch by Huang Dongsung <luxtella@company100.net> on 2012-11-02
Reviewed by Noam Rosenthal.

Internal Review by Gwang Yoon Hwang and Jae Hyun Park.

This patch makes UpdateAtlas manage the lifecycle of shareable surfaces
containing the updates in the way how CoordinatedTile manages the lifecycle of
tiles. Currently, UI Process creates the shareable surface when receiving an
UpdateTileForLayer message, but there is no exact point to remove the shareable
surface. Now, we introduce new two messages to handle the lifecycle:
CreateUpdateAtlas and RemoveUpdateAtlas.

This patch gives us two benefits.
1. Reduce file and mmap operations. Web Process does not need to duplicate a
file handle every tile update. UI Process does not need to create a
ShareableSurface every UpdateTileForLayer message.
2. Save memory. We can remove a ShareableSurface in UI Process when UpdateAtlas
in Web Process is removed.

* Shared/SurfaceUpdateInfo.cpp:
(WebKit::SurfaceUpdateInfo::encode):
(WebKit::SurfaceUpdateInfo::decode):
* Shared/SurfaceUpdateInfo.h:
(SurfaceUpdateInfo):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
(WebKit::LayerTreeCoordinatorProxy::updateTileForLayer):
(WebKit::LayerTreeCoordinatorProxy::createUpdateAtlas):
(WebKit):
(WebKit::LayerTreeCoordinatorProxy::removeUpdateAtlas):
(WebKit::LayerTreeCoordinatorProxy::purgeBackingStores):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
(LayerTreeCoordinatorProxy):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::beginContentUpdate):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayerClient):
(CoordinatedGraphicsLayer):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.cpp:
(WebKit::CoordinatedTile::updateBackBuffer):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.h:
(CoordinatedTileClient):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::createUpdateAtlas):
(WebKit):
(WebKit::LayerTreeCoordinator::removeUpdateAtlas):
(WebKit::LayerTreeCoordinator::beginContentUpdate):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
(LayerTreeCoordinator):
* WebProcess/WebPage/UpdateAtlas.cpp:
(WebKit::UpdateAtlas::UpdateAtlas):
(WebKit):
(WebKit::UpdateAtlas::~UpdateAtlas):
(WebKit::UpdateAtlas::beginPaintingOnAvailableBuffer):
* WebProcess/WebPage/UpdateAtlas.h:
(UpdateAtlasClient):
(WebKit):
(UpdateAtlas):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133270 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: a small defect in "WorkersSidebarPanel.js"
https://bugs.webkit.org/show_bug.cgi?id=101022

Patch by Peter Wang <peter.wang@torchmobile.com.cn> on 2012-11-02
Reviewed by Yury Semikhatsky.

In "autoattachToWorkersClicked", the "event.target.checked" doesn't alwyas valid, since the
"event.target" might be a label.

The problem just causes an error report, doesn't effect function, so no new test case.

* inspector/front-end/WorkersSidebarPane.js:
(WebInspector.WorkersSidebarPane.prototype._autoattachToWorkersClicked):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133271 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Memory instrumentation: do not call checkCountedObject with wrong pointers
https://bugs.webkit.org/show_bug.cgi?id=100958

Reviewed by Alexander Pavlov.

Source/WebCore:

Removed redundant call to checkCountedObject.

* inspector/MemoryInstrumentationImpl.cpp:
(WebCore::MemoryInstrumentationClientImpl::countObjectSize):

Source/WTF:

Removed calls to checkCountedObject from places where the pointer may contain
an address of a base class which may differ from the actual object pointer. Instead
checkCountedObject is only called right after processing deferred pointer where
we know real address.

* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::addObjectImpl):
(WTF::::process):

Tools:

* TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp: test that if there
if there is class A derived from classes B and C and we have pointer B* to an
object of class A then MemoryInstrumentationClient::checkoutCountedObject won't
be called for B* but only for A*

Also MemoryInstrumentation implementation used in the test was refactored to
allow passing client as a parameter. The client implementation was extracted into
a top-level class MemoryInstrumentationTestClient.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133272 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Cookie info in Network Resources Cookies tab shows "Invalid Date"
https://bugs.webkit.org/show_bug.cgi?id=97471

Reviewed by Pavel Feldman.

Source/WebCore:

This patch is partly based on patch by Otto Derek Cheung <otcheung@rim.com>.
Refactored CookieParser so that all cookies in front-end were WebInspector.Cookie object.
Cookie table can now show Max-Age as well as Expires attribute of a cookie.
Fixed expiresDate calculation.
Removed getters from CookieParser for better compilation.

* English.lproj/localizedStrings.js:
* inspector/front-end/AuditRules.js:
(WebInspector.AuditRules.CookieRuleBase.prototype.mapResourceCookies):
(WebInspector.AuditRules.CookieSizeRule.prototype._average):
(WebInspector.AuditRules.CookieSizeRule.prototype._max):
(WebInspector.AuditRules.StaticCookielessRule.prototype._collectorCallback):
* inspector/front-end/CookieItemsView.js:
(WebInspector.CookieItemsView.prototype._filterCookiesForDomain):
* inspector/front-end/CookieParser.js:
(WebInspector.CookieParser.prototype.cookies):
(WebInspector.CookieParser.prototype._flushCookie):
(WebInspector.CookieParser.prototype._addCookie):
(WebInspector.Cookie.prototype.httpOnly):
(WebInspector.Cookie.prototype.secure):
(WebInspector.Cookie.prototype.session):
(WebInspector.Cookie.prototype.path):
(WebInspector.Cookie.prototype.domain):
(WebInspector.Cookie.prototype.expires):
(WebInspector.Cookie.prototype.maxAge):
(WebInspector.Cookie.prototype.size):
(WebInspector.Cookie.prototype.setSize):
(WebInspector.Cookie.prototype.expiresDate):
(WebInspector.Cookie.prototype.attributes):
(WebInspector.Cookies.getCookiesAsync):
(WebInspector.Cookies.buildCookiesFromString):
(WebInspector.Cookies.buildCookieProtocolObject):
(WebInspector.Cookies.cookieMatchesResourceURL):
(WebInspector.Cookies.cookieDomainMatchesResourceDomain):
* inspector/front-end/CookiesTable.js:
(WebInspector.CookiesTable):
(WebInspector.CookiesTable.prototype._totalSize):
(WebInspector.CookiesTable.prototype._sortCookies.expiresCompare):
(WebInspector.CookiesTable.prototype._sortCookies):
(WebInspector.CookiesTable.prototype._createGridNode):
* inspector/front-end/HAREntry.js:
(WebInspector.HAREntry.prototype._buildCookie):

LayoutTests:

* http/tests/inspector/resource-main-cookies.php:
* inspector/cookie-parser.html:

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