When a table row height grows because of pagination, not all cells’ heights are adjusted
https://bugs.webkit.org/show_bug.cgi?id=91043

Reviewed by Sam Weinig.

Source/WebCore: 

The fix for in bug <http://webkit.org/b/83595> in <http://trac.webkit.org/r113738> made table
rows grow as necessary to fit cells that grow as a result of pagination. But it had two bad
side effects: earlier cells on the row would not grow by the same amount, and later cells on
the row would factor the existing growth into their intrinsic padding.

Test: fast/multicol/table-row-height-increase.html

* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layoutRows): Now when a cell becomes taller than the row height,
the additional height needed is recorded, and the cell is shrunk back to row height. Then
after finishing the row, all cells occurring on the row (including cells spanning it but not
starting on it) are grown by the same amount.

LayoutTests: 

* fast/multicol/table-row-height-increase-expected.html: Added.
* fast/multicol/table-row-height-increase.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122408 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix + remove dead code
https://bugs.webkit.org/show_bug.cgi?id=91039

Patch by Adenilson Cavalcanti <cavalcantii@gmail.com> on 2012-07-11
Reviewed by Filip Pizlo.

An unused variable was breaking compilation (thanks to warnings being treated as errors).

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122409 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Sort project.pbxproj

* WebCore.xcodeproj/project.pbxproj: Apply Tools/Scripts/sort-Xcode-project-file

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][EFL] Ewk_View should provide more resource loading notifications
https://bugs.webkit.org/show_bug.cgi?id=90601

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-07-11
Reviewed by Antonio Gomes.

Add new "resource,request,sent", "resource,request,response",
"resource,request,failed" and "resource,request,finished" to
Ewk_View in order to notify the clients of the main resource
load state changes.

Introduce new Ewk_Url_Response type that is used to provide
information to the clients regarding the resource load
responses that are received.

* PlatformEfl.cmake:
* UIProcess/API/efl/EWebKit2.h:
* UIProcess/API/efl/ewk_url_response.cpp: Added.
(_Ewk_Url_Response):
(ewk_url_response_ref):
(ewk_url_response_unref):
(ewk_url_response_url_get):
(ewk_url_response_status_code_get):
(ewk_url_response_mime_type_get):
(ewk_url_response_new):
* UIProcess/API/efl/ewk_url_response.h: Added.
* UIProcess/API/efl/ewk_url_response_private.h: Added.
* UIProcess/API/efl/ewk_view.cpp:
(_Ewk_View_Private_Data):
(ewk_view_resource_load_initiated):
(ewk_view_resource_load_response):
(ewk_view_resource_load_failed):
(ewk_view_resource_load_finished):
(ewk_view_resource_request_sent):
(ewk_view_load_provisional_started):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/ewk_view_private.h:
* UIProcess/API/efl/ewk_view_resource_load_client.cpp:
(toEwkView):
(didInitiateLoadForResource):
(didSendRequestForResource):
(didReceiveResponseForResource):
(didFinishLoadForResource):
(didFailLoadForResource):
(ewk_view_resource_load_client_attach):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122411 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Attempt to fix the Chromium Mac build after r122400.

* platform/text/cf/HyphenationCF.cpp: Ensure that Chromium only compiles the body of this file if
building for a new enough version of OS X.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122412 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Compilation error with GLES2 when using gl2ext.h from ANGLE.
https://bugs.webkit.org/show_bug.cgi?id=91030

Reviewed by Kenneth Russell.

gl2ext.h defines PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG and not
PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC. This is a bug in the original Khronos header,
but we should work around it until fixed headers are integrated.

* platform/graphics/opengl/Extensions3DOpenGLES.h:
(Extensions3DOpenGLES):
    Removed the "PROC" suffix to work around the header bug.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Do not save state of stateless form controls
https://bugs.webkit.org/show_bug.cgi?id=90964

Reviewed by Hajime Morita.

Source/WebCore:

By Bug 89409, we started to store unmodified form control
state. However we don't need to make such state for the following
types.
- password
- submit
- reset
- button
- keygen

Test: fast/forms/state-restore-skip-stateless.html

* html/BaseButtonInputType.cpp:
(WebCore::BaseButtonInputType::shouldSaveAndRestoreFormControlState):
Added. Disable saving state for submit, reset, and button types.
* html/BaseButtonInputType.h:
(BaseButtonInputType): Add shouldSaveAndRestoreFormControlState.
* html/HTMLFormControlElementWithState.h:
(HTMLFormControlElementWithState): Make shouldSaveAndRestoreFormControlState virtual.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::shouldSaveAndRestoreFormControlState):
Added. Checks InputType::shouldSaveAndRestoreFormControlState first.
* html/HTMLInputElement.h:
(HTMLInputElement): Override shouldSaveAndRestoreFormControlState.
* html/HTMLKeygenElement.cpp:
(WebCore::HTMLKeygenElement::shouldSaveAndRestoreFormControlState)
Added. Disable saving state for <keygen>.:
* html/HTMLKeygenElement.h: Override shouldSaveAndRestoreFormControlState.
* html/InputType.cpp:
(WebCore::InputType::shouldSaveAndRestoreFormControlState):
Added. Enable saving state for all types by default.
* html/InputType.h:
(InputType): Add shouldSaveAndRestoreFormControlState.
* html/PasswordInputType.cpp:
(WebCore::PasswordInputType::shouldSaveAndRestoreFormControlState):
Added. Disabled saving state.
(WebCore::PasswordInputType::saveFormControlState):
Because shouldSaveAndRestoreFormControlState() returns false,
saveFormControlState should be never called.
* html/PasswordInputType.h:
(PasswordInputType): Override shouldSaveAndRestoreFormControlState.

LayoutTests:

* fast/forms/resources/state-restore-skip-stateless-dump.html: Added.
* fast/forms/state-restore-skip-stateless-expected.txt: Added.
* fast/forms/state-restore-skip-stateless.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122414 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening.
html5lib/runner.html started crashing after r122359.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122415 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Updated expected results for this test after r122408, which fixed it.

* platform/mac/fast/multicol/table-vertical-align-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122416 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Actually commit the results for r122416.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Accessing width or height of a detached image input element causes crash
https://bugs.webkit.org/show_bug.cgi?id=90885

Reviewed by Kentaro Hara.

Source/WebCore:

Test: fast/forms/image/width-and-height-of-detached-input.html

* html/ImageInputType.cpp:
(WebCore::ImageInputType::height): Add null check for m_imageLoader.
(WebCore::ImageInputType::width): ditto.

LayoutTests:

* fast/forms/image/width-and-height-of-detached-input-expected.txt: Added.
* fast/forms/image/width-and-height-of-detached-input.html: Added.

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

* platform/chromium/TestExpectations: Started TIMEOUT on Mac.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122419 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add dialog element feature toggle to InternalSettings
https://bugs.webkit.org/show_bug.cgi?id=90934

Patch by Matt Falkenhagen <falken@chromium.org> on 2012-07-11
Reviewed by Hajime Morita.

.:

* Source/autotools/symbols.filter: Added newly exported symbol.

Source/WebCore:

This enables layout tests to be written for dialog although the feature is disabled by default.

Tests: fast/dom/HTMLDialogElement/dialog-disabled.html
       fast/dom/HTMLDialogElement/dialog-enabled.html

* WebCore.exp.in: Added newly exported symbol.
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup): Backup dialog feature flag.
(WebCore::InternalSettings::Backup::restoreTo): Restore dialog feature flag.
(WebCore::InternalSettings::setDialogElementEnabled): Added.
(WebCore):
* testing/InternalSettings.h: Added support for dialog.
(Backup):
(InternalSettings):
* testing/InternalSettings.idl: Added support for dialog.

LayoutTests:

* fast/dom/HTMLDialogElement/dialog-disabled-expected.txt: Added.
* fast/dom/HTMLDialogElement/dialog-disabled.html: Added.
* fast/dom/HTMLDialogElement/dialog-enabled-expected.txt: Added.
* fast/dom/HTMLDialogElement/dialog-enabled.html: Added.
* platform/efl/TestExpectations: Skipped because ENABLE_DIALOG_ELEMENT is off by default.
* platform/gtk/TestExpectations: Ditto.
* platform/mac/TestExpectations: Ditto.
* platform/qt/TestExpectations: Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122420 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<http://webkit.org/b/91051> Fix the Qt Mac build after r122400.

Qt on Mac builds with a deployment target of OS X 10.5. However, it was not been setting
BUILDING_ON_LEOPARD / TARGETING_LEOPARD and thus was falling down code paths in DisplaySleepDisabler.cpp
that were specific to Snow Leopard and newer. After the removal of BUILDING_ON_LEOPARD
and TARGETING_LEOPARD it ended up falling down the correct Leopard-compatible code path,
which revealed that the code made assumptions about which headers had already been included.

* platform/mac/DisplaySleepDisabler.cpp: Include CoreServices/CoreServices.h to pull in
a declaration of UpdateSystemActivity when targeting Leopard.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122421 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Do not save the form state signature if nothing is saved
https://bugs.webkit.org/show_bug.cgi?id=91050

Reviewed by Hajime Morita.

Source/WebCore:

This change will reduce the size of HistoyItem.

Test: fast/forms/state-restore-empty-state.html

* html/FormController.cpp:
(WebCore::FormController::formElementsState):
If stateVector has only the signature string, clear it.

LayoutTests:

* fast/forms/resources/state-restore-empty-state-1.html: Added.
* fast/forms/state-restore-empty-state-expected.txt: Added.
* fast/forms/state-restore-empty-state.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122422 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove dead code after r122392.
https://bugs.webkit.org/show_bug.cgi?id=91049

Reviewed by Filip Pizlo.

* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122423 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor RenderSVGShape bounding box code
https://bugs.webkit.org/show_bug.cgi?id=90655

Reviewed by Nikolas Zimmermann.

RenderSVGShape::objectBoundingBox worked differently than RenderSVGShape::strokeBoundingBox by
not caching the object bounding box and instead computing it on each call. For consistency and
performance objectBoundingBox has been refactored to return a cached value.

createShape has been renamed updateShapeFromElement for understandability. updateShapeFromElement
now updates the internal state of the shape (bounding boxes, etc) from the associated element.
RenderSVGShape::inflateWithStrokeAndMarkerBounds has been merged into
RenderSVGShape::calculateStrokeBoundingBox which is called from updateShapeFromElement.

After this change all bounding box computation is now handled in updateShapeFromElement. Because
subclasses override updateShapeFromElement it will be easy for them to have custom bounding box
code there (as will happen for RenderSVGPath in a followup patch).

strokeBoundingBox and objectBoundingBox are now able to return their cached values immediately
in RenderSVGRect and RenderSVGEllipse instead of checking their fallback state on each call.

Additionally, to save space RenderSVGEllipse and RenderSVGRect now use the m_fillBoundingBox and
m_strokeBoundingBox of RenderSVGShape instead of having their own.

This patch also removes setStrokeAndMarkerBoundingBox that was previously dead code.

No new tests, just a refactoring.

* rendering/svg/RenderSVGEllipse.cpp:
(WebCore::RenderSVGEllipse::updateShapeFromElement):
(WebCore):
(WebCore::RenderSVGEllipse::fillShape):
(WebCore::RenderSVGEllipse::strokeShape):
(WebCore::RenderSVGEllipse::shapeDependentStrokeContains):
* rendering/svg/RenderSVGEllipse.h:
(RenderSVGEllipse):
(WebCore::RenderSVGEllipse::isEmpty):
* rendering/svg/RenderSVGRect.cpp:
(WebCore::RenderSVGRect::updateShapeFromElement):
(WebCore):
(WebCore::RenderSVGRect::fillShape):
(WebCore::RenderSVGRect::strokeShape):
(WebCore::RenderSVGRect::shapeDependentStrokeContains):
(WebCore::RenderSVGRect::shapeDependentFillContains):
* rendering/svg/RenderSVGRect.h:
(RenderSVGRect):
(WebCore::RenderSVGRect::isEmpty):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::updateShapeFromElement):
(WebCore):
(WebCore::RenderSVGShape::layout):
(WebCore::RenderSVGShape::calculateObjectBoundingBox):
(WebCore::RenderSVGShape::calculateStrokeBoundingBox):
(WebCore::RenderSVGShape::updateRepaintBoundingBox):
* rendering/svg/RenderSVGShape.h:
(RenderSVGShape):
(WebCore::RenderSVGShape::objectBoundingBox):
(WebCore::RenderSVGShape::strokeBoundingBox):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122424 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add webkit_cookie_manager_set_persistent_storage() to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=83016

Reviewed by Martin Robinson.

Source/WebCore:

* platform/network/soup/CookieStorageSoup.cpp:
(WebCore::soupCookiesChanged): Do not notify about changes in
other cookie jars than the current one.

Source/WebKit2:

Add a custom implementation of SoupCookieJarSqlite based on
libsoup code but using WebCore SQLite classes. SoupCookieJarSqlite
is part of libsoup-gnome, it's not a lot of code and it doesn't
change often, so it's better to simply have our own implementation
instead of making this important feature depend on an optional
dependency. There are plans to move the implementation to libsoup,
if that eventually happens we will remove our code to use libsoup
directly.

* GNUmakefile.am: Add new dirs to include path.
* GNUmakefile.list.am: Add new files to compilation.
* PlatformEfl.cmake: Ditto.
* Shared/soup/SoupCookiePersistentStorageType.h: Added.
* UIProcess/API/gtk/WebKitCookieManager.cpp:
(webkit_cookie_manager_set_persistent_storage): Set a persistent
storage for cookies.
* UIProcess/API/gtk/WebKitCookieManager.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols
* UIProcess/API/gtk/tests/TestCookieManager.cpp:
(testCookieManagerPersistentStorage):
(serverCallback):
(beforeAll):
(afterAll):
* UIProcess/WebCookieManagerProxy.h:
(WebCookieManagerProxy): Add setCookiePersistentStorage() method
when using soup.
* UIProcess/soup/WebCookieManagerProxySoup.cpp: Added.
(WebKit::WebCookieManagerProxy::setCookiePersistentStorage): Send
SetCookiePersistentStorage message to the web process.
* WebProcess/Cookies/WebCookieManager.h:
(WebCookieManager): Add setCookiePersistentStorage() method when
using soup.
* WebProcess/Cookies/WebCookieManager.messages.in: Add
SetCookiePersistentStorage message when using soup.
* WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
(WebKit::WebCookieManager::setCookiePersistentStorage): Create a
new cookie jar for the given filename and storage type and add it
to the soup session.
* WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp: Added.
(webkitSoupCookieJarSqliteOpenDatabase): Open SQLite database.
(webkitSoupCookieJarSqliteCreateTable): Create moz_cookies if it
doesn't exist.
(webkitSoupCookieJarSqliteLoad): Load the initial set of cookies
from the database.
(webkitSoupCookieJarSqliteInsertCookie): Insert a new cookie into
the database.
(webkitSoupCookieJarSqliteDeleteCookie): Delete an exising cookie
from the database.
(webkitSoupCookieJarSqliteChanged): Insert/delete cookies
depending on the change.
(webkitSoupCookieJarSqliteFinalize):
(webkit_soup_cookie_jar_sqlite_init):
(webkit_soup_cookie_jar_sqlite_class_init):
(webkitSoupCookieJarSqliteNew):
* WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.h: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122425 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][EFL] Add policy client to Ewk_View
https://bugs.webkit.org/show_bug.cgi?id=90953

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-07-12
Reviewed by Kenneth Rohde Christiansen.

Emit new "policy,decision,navigation" and "policy,decision,new,window"
on the Ewk_View when policy decisions should be taken by the client.

A new Ewk_Navigation_Policy_Decision type is introduced to provide
information about the navigation request and make a decision.
By default, the navigation request is accepted.

* PlatformEfl.cmake:
* UIProcess/API/efl/EWebKit2.h:
* UIProcess/API/efl/ewk_navigation_policy_decision.cpp: Added.
(_Ewk_Navigation_Policy_Decision):
(ewk_navigation_policy_decision_free):
(ewk_navigation_policy_navigation_type_get):
(ewk_navigation_policy_mouse_button_get):
(ewk_navigation_policy_modifiers_get):
(ewk_navigation_policy_frame_name_get):
(ewk_navigation_policy_request_get):
(ewk_navigation_policy_decision_accept):
(ewk_navigation_policy_decision_reject):
(ewk_navigation_policy_decision_download):
(ewk_navigation_policy_decision_new):
* UIProcess/API/efl/ewk_navigation_policy_decision.h: Added.
* UIProcess/API/efl/ewk_navigation_policy_decision_private.h: Added.
* UIProcess/API/efl/ewk_private.h: Added.
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_base_add):
(ewk_view_navigation_policy_decision):
(ewk_view_new_window_policy_decision):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/ewk_view_policy_client.cpp: Added.
(toEwkView):
(decidePolicyForNavigationAction):
(decidePolicyForNewWindowAction):
(ewk_view_policy_client_attach):
* UIProcess/API/efl/ewk_view_policy_client_private.h: Added.
* UIProcess/API/efl/ewk_view_private.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122426 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Typo in path in generate-webkitversion.pl
https://bugs.webkit.org/show_bug.cgi?id=90883

Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2012-07-12
Reviewed by Mark Rowe.

Correct default path to version config file. In practice it wasn't a problem because only the Qt
build system seems to use the script right now and passes the path to the version file as a
command line parameter.

* scripts/generate-webkitversion.pl:

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