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
[EFL][WK2] Add ewk_security_origin and ewk_storage_manager APIs
https://bugs.webkit.org/show_bug.cgi?id=92827

Patch by Jihye Kang <jye.kang@samsung.com> on 2012-11-02
Reviewed by Gyuyoung Kim.

Add ewk_security_origin APIs to get security origin.
These APIs will be used to get host, protocol and port of security
origin.
Add ewk_storage_manager to manage web storage and
ewk_storage_manager_origins_get to get origins list of web storage.
Add Unit tests for ewk_storage_manager and ewk_security_origin APIs.

* PlatformEfl.cmake:
* UIProcess/API/efl/EWebKit2.h:
* UIProcess/API/efl/ewk_context.cpp:
(Ewk_Context::storageManager):
(ewk_context_storage_manager_get):
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_context_private.h:
(Ewk_Context):
* UIProcess/API/efl/ewk_security_origin.cpp: Added.
(Ewk_Security_Origin::Ewk_Security_Origin):
(Ewk_Security_Origin::host):
(Ewk_Security_Origin::protocol):
(Ewk_Security_Origin::port):
(ewk_security_origin_ref):
(ewk_security_origin_unref):
(ewk_security_origin_host_get):
(ewk_security_origin_protocol_get):
(ewk_security_origin_port_get):
* UIProcess/API/efl/ewk_security_origin.h: Added.
* UIProcess/API/efl/ewk_security_origin_private.h: Added.
(Ewk_Security_Origin):
(Ewk_Security_Origin::create):
* UIProcess/API/efl/ewk_storage_manager.cpp: Added.
(Ewk_Storage_Manager::Ewk_Storage_Manager):
(Ewk_Storage_Manager::getStorageOrigins):
(Ewk_Storage_Manager::createOriginList):
(_Ewk_Storage_Origins_Async_Get_Context):
(_Ewk_Storage_Origins_Async_Get_Context::_Ewk_Storage_Origins_Async_Get_Context):
(getStorageOriginsCallback):
(ewk_storage_manager_origins_get):
* UIProcess/API/efl/ewk_storage_manager.h: Added.
* UIProcess/API/efl/ewk_storage_manager_private.h: Added.
(Ewk_Storage_Manager):
(Ewk_Storage_Manager::create):
* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(TEST_F):
* UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp: Added.
(getStorageOriginsCallback):
(TEST_F):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: NMI instrument ShadowRoot. It gives us ~400k on plus.google.com
https://bugs.webkit.org/show_bug.cgi?id=100866

Reviewed by Yury Semikhatsky.

Plain vanilla memory instrumentation code for HTMLInputElement which has a ElementShadow.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* dom/DocumentOrderedMap.cpp:
(WebCore::DocumentOrderedMap::reportMemoryUsage):
(WebCore):
* dom/DocumentOrderedMap.h:
(DocumentOrderedMap):
* dom/Element.cpp:
(WebCore::Element::reportMemoryUsage):
(WebCore):
* dom/Element.h:
* dom/ElementRareData.cpp: Added.
(WebCore):
(WebCore::ElementRareData::reportMemoryUsage):
* dom/ElementRareData.h:
(ElementRareData):
* dom/ElementShadow.cpp:
(WebCore::ElementShadow::reportMemoryUsage):
(WebCore):
* dom/ElementShadow.h:
(ElementShadow):
* dom/Node.cpp:
(WebCore::Node::reportMemoryUsage):
* dom/NodeRareData.cpp: Added.
(WebCore):
(WebCore::NodeListsNodeData::reportMemoryUsage):
(WebCore::NodeRareData::reportMemoryUsage):
* dom/NodeRareData.h:
(NodeListsNodeData):
(NodeRareData):
* dom/ShadowRoot.cpp:
(WebCore):
(WebCore::ShadowRoot::reportMemoryUsage):
* dom/ShadowRoot.h:
(ShadowRoot):
* dom/TreeScope.cpp:
(WebCore::TreeScope::reportMemoryUsage):
(WebCore):
* dom/TreeScope.h:
(TreeScope):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::reportMemoryUsage):
(WebCore):
* html/HTMLFormControlElement.h:
(HTMLFormControlElement):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::reportMemoryUsage):
(WebCore):
* html/HTMLInputElement.h:
(HTMLInputElement):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::reportMemoryUsage):
(WebCore):
* html/HTMLTextFormControlElement.h:
(HTMLTextFormControlElement):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][Mac][Win] Unreviewed build fix after r133182
https://bugs.webkit.org/show_bug.cgi?id=100995

Remove two methods' OVERRIDE and virtual modifiers, because they cannot be found in any base class.
Also relocate their prototypes, because they mix with the overridden ones.

Patch by Nandor Huszka <hnandor@inf.u-szeged.hu> on 2012-11-02

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Middle click closes an editor and pastes selection into current editor on Linux
https://bugs.webkit.org/show_bug.cgi?id=100743

Reviewed by Alexander Pavlov.

Editor now consumes all middle mouse button mouse ups except for the ones in the main panel.
TabbedPane now consumes all middle mouse button mouse ups as well.
Navigator view does not pass focus anymore if element was selected with middle mouse button.

* inspector/front-end/DefaultTextEditor.js:
(.preventDefaultOnMouseUp):
(.consumeMouseUp):
* inspector/front-end/NavigatorView.js:
(WebInspector.NavigatorSourceTreeElement.prototype.ondblclick):
* inspector/front-end/TabbedPane.js:
(WebInspector.TabbedPane):
(WebInspector.TabbedPane.prototype.onMouseUp):
(WebInspector.TabbedPane.prototype.onMouseClick):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Common ref and unref functions for EFL WK2 objects
https://bugs.webkit.org/show_bug.cgi?id=100751

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-11-02
Reviewed by Kenneth Rohde Christiansen.

Added common Ewk_Object class with ref/unref API also added several aux functions for safe
Ewk_Object conversion. Used new approach on ewk_back_forward_list_item as example.

* PlatformEfl.cmake:
* UIProcess/API/efl/EWebKit2.h:
* UIProcess/API/efl/ewk_back_forward_list.cpp:
(Ewk_Back_Forward_List::getFromCacheOrCreate):
(Ewk_Back_Forward_List::createEinaList):
* UIProcess/API/efl/ewk_back_forward_list_item.cpp:
(EwkBackForwardListItem::EwkBackForwardListItem):
(EwkBackForwardListItem::url):
(EwkBackForwardListItem::title):
(EwkBackForwardListItem::originalURL):
(ewk_back_forward_list_item_url_get):
(ewk_back_forward_list_item_title_get):
(ewk_back_forward_list_item_original_url_get):
* UIProcess/API/efl/ewk_back_forward_list_item.h:
* UIProcess/API/efl/ewk_back_forward_list_item_private.h:
(EwkBackForwardListItem):
(EwkBackForwardListItem::create):
* UIProcess/API/efl/ewk_back_forward_list_private.h:
* UIProcess/API/efl/ewk_object.cpp: Copied from Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item_private.h.
(ewk_object_ref):
(ewk_object_unref):
* UIProcess/API/efl/ewk_object.h: Copied from Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item_private.h.
* UIProcess/API/efl/ewk_object_private.h: Added.
(Ewk_Object):
(Ewk_Object::~Ewk_Object):
(ewk_object_is_of_type):
(ewk_object_cast_check):
(ewk_object_cast):
* UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp:
(freeEinaList):

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