FileReader abort case causes Chromium renderer crash
https://bugs.webkit.org/show_bug.cgi?id=99142

Patch by Ningxin Hu <ningxin.hu@intel.com> on 2012-10-26
Reviewed by Kentaro Hara.

Before dispatching load event, FileReader should check if it is
in aborting.

Test: manually launch fast/files/file-reader-abort.html in Chromium
browser and compare the result with
fast/files/file-reader-abort-expected.txt.

* fileapi/FileReader.cpp:
(WebCore::FileReader::didFinishLoading):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-step.html fails every 3 days
https://bugs.webkit.org/show_bug.cgi?id=100480

Reviewed by Pavel Feldman.

Because the date field in the test has step=3, the availability of
[Today] button depends on the current date. We make the test stable by
specifying max attribute.

* platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png:
* platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-step.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Move input method code out of EwkViewImpl
https://bugs.webkit.org/show_bug.cgi?id=100468

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

Move input method code out of EwkViewImpl and into
a new InputMethodContextEfl class to avoid cluttering
the view code.

* PlatformEfl.cmake:
* UIProcess/API/efl/EwkViewImpl.cpp:
(EwkViewImpl::EwkViewImpl):
(EwkViewImpl::inputMethodContext):
* UIProcess/API/efl/EwkViewImpl.h:
(WebKit):
(EwkViewImpl):
* UIProcess/API/efl/ewk_view.cpp:
(_ewk_view_smart_mouse_up):
(_ewk_view_smart_key_down):
* UIProcess/efl/InputMethodContextEfl.cpp: Added.
(WebKit):
(WebKit::InputMethodContextEfl::InputMethodContextEfl):
(WebKit::InputMethodContextEfl::~InputMethodContextEfl):
(WebKit::InputMethodContextEfl::onIMFInputSequenceComplete):
(WebKit::InputMethodContextEfl::onIMFPreeditSequenceChanged):
(WebKit::InputMethodContextEfl::createIMFContext):
(WebKit::InputMethodContextEfl::handleMouseUpEvent):
(WebKit::InputMethodContextEfl::handleKeyDownEvent):
(WebKit::InputMethodContextEfl::updateTextInputState):
* UIProcess/efl/InputMethodContextEfl.h: Added.
(WebKit):
(InputMethodContextEfl):
(WebKit::InputMethodContextEfl::create):
* UIProcess/efl/PageClientImpl.cpp:
(WebKit::PageClientImpl::updateTextInputState):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Unskip svg/foreignObject/viewport-foreignobject-crash.html
https://bugs.webkit.org/show_bug.cgi?id=100467

Unreviewed, EFL gardening.

Removing a test failure expectations, the test was fixed in r132548.

Patch by Jinwoo Song <jinwoo7.song@samsung.com> on 2012-10-26

* platform/efl-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132595 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor calendar picker to remove _x/_y from DaysTable
https://bugs.webkit.org/show_bug.cgi?id=100460

Reviewed by Kent Tamura.

_x/_y properties keep the coordinates for the selection but when we add
week and month picking capabilities, the selection can't be expressed as
a set of coordinates. This change will remove it.

No new tests. Covered by calendar-picker-*.html tests.

* Resources/pagepopups/calendarPicker.js:
(DaysTable): Removed _x/_y properties.
(DaysTable.prototype._hasSelection): Changed to refer to the DOM to see if we have a selection.
(DaysTable.prototype.navigateToMonthAndKeepSelectionPosition): Lookup the selection position.
(DaysTable.prototype.selectDate): Deselect first so we don't have two selections.
(DaysTable.prototype._selectRangeContainingNode): Selects date/week/month containing the given day node.
(DaysTable.prototype._selectRangeAtPosition): Selects date/week/month at the given position.
(DaysTable.prototype._firstNodeInSelectedRange): Returns first selected day node.
(DaysTable.prototype._deselect): Deselects all selections.
(DaysTable.prototype._handleMouseOver): Use _selectRangeContainingNode so we don't have many places handling the selection.
(DaysTable.prototype._handleMouseOut): Use _deselect.
(DaysTable.prototype._handleKey): Lookup the selection position.
(DaysTable.prototype.updateSelection): Use _selectRangeAtPosition.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r132552.
http://trac.webkit.org/changeset/132552
https://bugs.webkit.org/show_bug.cgi?id=100486

Makes typeahead tests crash in debug. (Requested by pfeldman
on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-10-26

* DumpRenderTree/DumpRenderTree.gypi:
* DumpRenderTree/chromium/DRTTestRunner.h:
* DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
(WebTestDelegate):
* DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
* DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
(WebTestRunner):
(WebTestRunner::EventSender::doDragDrop):
(WebTestRunner::EventSender::updateClickCountForButton):
(WebTestRunner::EventSender::mouseDown):
(WebTestRunner::EventSender::mouseUp):
(WebTestRunner::EventSender::mouseMoveTo):
(WebTestRunner::EventSender::keyDown):
(WebTestRunner::EventSender::replaySavedEvents):
(WebTestRunner::EventSender::contextClick):
(WebTestRunner::EventSender::beginDragWithFiles):
(WebTestRunner::EventSender::sendCurrentTouchEvent):
(WebTestRunner::EventSender::handleMouseWheel):
(WebTestRunner::EventSender::gestureEvent):
(WebTestRunner::EventSender::gestureFlingCancel):
(WebTestRunner::EventSender::gestureFlingStart):
* DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp: Removed.
* DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.h: Removed.
* DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
(TestDelegate):
* DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
* DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
(WebKit):
(webkit_support):
* DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
(WebTestInterfaces::Internal):
* DumpRenderTree/chromium/WebViewHost.cpp:
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Gardening after bug 99824
https://bugs.webkit.org/show_bug.cgi?id=100469

Unreviewed, EFL gardening.

Unskip following 3 test cases after bug 99824 is resolved.
 - fast/lists/w3-css3-list-styles-alphabetic.html
 - fast/lists/w3-css3-list-styles-fallback-style.html
 - fast/lists/w3-list-styles.html

Patch by Jinwoo Song <jinwoo7.song@samsung.com> on 2012-10-26

* platform/efl-wk1/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
fast/forms/file/input-file-write-files.html should cover correct setting value
https://bugs.webkit.org/show_bug.cgi?id=100085

Patch by Li Yin <li.yin@intel.com> on 2012-10-26
Reviewed by Kentaro Hara.

Source/WebCore:

From Spec: http://dev.w3.org/html5/spec/single-page.html#dom-input-value-filename
On setting, if the new value is the empty string, it must empty the list of selected
files; otherwise, it must throw an InvalidStateError exception.

Test: fast/forms/file/input-file-value.html

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setValue):
(WebCore):
* html/HTMLInputElement.h:
(HTMLInputElement):
* html/HTMLInputElement.idl:

LayoutTests:

The test input-file-value.html is split from input-file-write-test.html.
And add correct setting value for files attribute, verify the files attribute
is writable or not.

* fast/forms/file/input-file-value-expected.txt: Added.
* fast/forms/file/input-file-value.html: Added.
* fast/forms/file/input-file-write-files-expected.txt:
* fast/forms/file/input-file-write-files.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add feature flags for CSS Device Adaptation
https://bugs.webkit.org/show_bug.cgi?id=95960

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-10-26
Reviewed by Kenneth Rohde Christiansen.

.:

* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:
* configure.ac:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:
* GNUmakefile.am:
* GNUmakefile.features.am:

Source/WebKit/chromium:

* features.gypi:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Tools:

* Scripts/webkitperl/FeatureList.pm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132600 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Enable WebGL
https://bugs.webkit.org/show_bug.cgi?id=97652

Patch by Regina Chung <heejin.r.chung@samsung.com> on 2012-10-26
Reviewed by Gyuyoung Kim.

.:

Use Graphics Surface to enable WebGL for WebKit2 EFL.

* Source/cmake/OptionsEfl.cmake:

Source/WebCore:

Implemented GraphicsSurface for EFL to enable WebGL for WebKit2.
Depends on GLX since Evas doesn't provide the necessary functionality.

No new tests. Covered by existing tests.

* PlatformEfl.cmake:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
(WebCore::GraphicsContext3D::createGraphicsSurfaces):
* platform/graphics/efl/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
(WebCore):
(WebCore::GraphicsContext3DPrivate::createGraphicsSurfaces):
(WebCore::GraphicsContext3DPrivate::copyToGraphicsSurface):
(WebCore::GraphicsContext3DPrivate::graphicsSurfaceToken):
* platform/graphics/efl/GraphicsContext3DPrivate.h:
(GraphicsContext3DPrivate):
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::reshape):
* platform/graphics/surfaces/efl: Added.
* platform/graphics/surfaces/efl/GraphicsSurfaceEfl.cpp: Added.
(WebCore):
(WebCore::OffScreenRootWindow::get):
(WebCore::OffScreenRootWindow::~OffScreenRootWindow):
(WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
(WebCore::GraphicsSurfacePrivate::createSurface):
(WebCore::GraphicsSurfacePrivate::makeCurrent):
(WebCore::GraphicsSurfacePrivate::doneCurrent):
(WebCore::GraphicsSurfacePrivate::swapBuffers):
(WebCore::GraphicsSurface::platformBeginPaint):
(WebCore::GraphicsSurface::createReadOnlyImage):
* platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
* platform/graphics/surfaces/qt/GraphicsSurfaceGLX.h: Added.
(WebCore):
(OffScreenRootWindow):
(WebCore::OffScreenRootWindow::OffScreenRootWindow):
(GraphicsSurfacePrivate):
(WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
(WebCore::GraphicsSurfacePrivate::createPixmap):
(WebCore::GraphicsSurfacePrivate::copyFromTexture):
(WebCore::GraphicsSurfacePrivate::display):
(WebCore::GraphicsSurfacePrivate::glxPixmap):
(WebCore::GraphicsSurfacePrivate::size):
(WebCore::GraphicsSurfacePrivate::glContext):
(WebCore::resolveGLMethods):
* platform/graphics/surfaces/qt/GraphicsSurfaceQt.cpp:
(WebCore):
(WebCore::OffScreenRootWindow::OffScreenRootWindow::get):
(WebCore::OffScreenRootWindow::~OffScreenRootWindow):
(WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
(WebCore::GraphicsSurfacePrivate::createSurface):
(WebCore::GraphicsSurfacePrivate::makeCurrent):
(WebCore::GraphicsSurfacePrivate::doneCurrent):
(WebCore::GraphicsSurfacePrivate::swapBuffers):

Source/WebKit2:

Set WebGLEnabled to true when WebGL is enabled.

* UIProcess/API/efl/ewk_view.cpp:
(_ewk_view_initialize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132601 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSSRegions] Add support for auto-height regions with region-breaks
https://bugs.webkit.org/show_bug.cgi?id=99952

Reviewed by David Hyatt.

Source/WebCore:

This patch takes region breaks into account when computing the height for auto logical height regions.
When a region break is encountered before/after an element from within a flow thread and we are in the layout
phase in which we lay out the flow threads in regions unconstrained, we use the region break to
compute the region override logical content height if the region break fits inside an auto logical height region.
A region break inside an auto logical height region determines the region override logical content height, taking
min/max height into account.

Tests: fast/regions/autoheight-allregions-nobreaks.html
       fast/regions/autoheight-allregions.html
       fast/regions/autoheight-breakafteralways-maxheight.html
       fast/regions/autoheight-breakbeforealways.html
       fast/regions/autoheight-firstregion-breakalways.html
       fast/regions/autoheight-lastregion-overflowauto-breaksignored.html
       fast/regions/autoheight-lastregion-overflowauto.html
       fast/regions/autoheight-middleregion.html
       fast/regions/autoheight-secondregion-breakoutside.html
       fast/regions/autoheight-secondregion.html
       fast/regions/autoheight-singleregion-breakafteralways-maxheight.html
       fast/regions/autoheight-singleregion-breakafteralways.html
       fast/regions/autoheight-singleregion-breakaftermargin.html
       fast/regions/autoheight-singleregion-breakbeforealways-minheight.html
       fast/regions/autoheight-singleregion-breakbeforealways.html
       fast/regions/autoheight-singleregion-multiplebreaks.html
       fast/regions/autoheight-singleregion-overflowauto-breaksignored.html
       fast/regions/autoheight-singleregion-overflowauto.html

* rendering/RenderBlock.cpp: When encounter a region break before/after an element inside a flow thread,
try to use it to determine the override logical content height for auto logical height regions.
(WebCore::RenderBlock::applyBeforeBreak):
(WebCore::RenderBlock::applyAfterBreak):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::computeOverflowStateForRegions):
Simulate a region break at the end of the flow thread content.
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
(WebCore::RenderFlowThread::clearOverrideLogicalContentHeightInRegions):
Helper method used to clear the overrideLogicalContentHeight for auto logical height regions.
(WebCore::RenderFlowThread::addForcedRegionBreak):
Extend the method to process region breaks. The method returns true if at least one auto logical height region
has its override logical content height computed.
* rendering/RenderFlowThread.h:
* rendering/RenderRegion.cpp: Make these methods work with auto logical height regions.
(WebCore::RenderRegion::pageLogicalHeight):
(WebCore::RenderRegion::logicalHeightOfAllFlowThreadContent):

LayoutTests:

Add tests for auto logical height regions with content having region breaks.

* fast/regions/autoheight-allregions-expected.html: Added.
* fast/regions/autoheight-allregions-nobreaks-expected.html: Added.
* fast/regions/autoheight-allregions-nobreaks.html: Added.
* fast/regions/autoheight-allregions.html: Added.
* fast/regions/autoheight-breakafteralways-maxheight-expected.html: Added.
* fast/regions/autoheight-breakafteralways-maxheight.html: Added.
* fast/regions/autoheight-breakbeforealways-expected.html: Added.
* fast/regions/autoheight-breakbeforealways.html: Added.
* fast/regions/autoheight-firstregion-breakalways-expected.html: Added.
* fast/regions/autoheight-firstregion-breakalways.html: Added.
* fast/regions/autoheight-lastregion-overflowauto-breaksignored-expected.html: Added.
* fast/regions/autoheight-lastregion-overflowauto-breaksignored.html: Added.
* fast/regions/autoheight-lastregion-overflowauto-expected.html: Added.
* fast/regions/autoheight-lastregion-overflowauto.html: Added.
* fast/regions/autoheight-middleregion-expected.html: Added.
* fast/regions/autoheight-middleregion.html: Added.
* fast/regions/autoheight-secondregion-breakoutside-expected.html: Added.
* fast/regions/autoheight-secondregion-breakoutside.html: Added.
* fast/regions/autoheight-secondregion-expected.html: Added.
* fast/regions/autoheight-secondregion.html: Added.
* fast/regions/autoheight-singleregion-breakafteralways-expected.html: Added.
* fast/regions/autoheight-singleregion-breakafteralways-maxheight-expected.html: Added.
* fast/regions/autoheight-singleregion-breakafteralways-maxheight.html: Added.
* fast/regions/autoheight-singleregion-breakafteralways.html: Added.
* fast/regions/autoheight-singleregion-breakaftermargin-expected.html: Added.
* fast/regions/autoheight-singleregion-breakaftermargin.html: Added.
* fast/regions/autoheight-singleregion-breakbeforealways-expected.html: Added.
* fast/regions/autoheight-singleregion-breakbeforealways-minheight-expected.html: Added.
* fast/regions/autoheight-singleregion-breakbeforealways-minheight.html: Added.
* fast/regions/autoheight-singleregion-breakbeforealways.html: Added.
* fast/regions/autoheight-singleregion-multiplebreaks-expected.html: Added.
* fast/regions/autoheight-singleregion-multiplebreaks.html: Added.
* fast/regions/autoheight-singleregion-overflowauto-breaksignored-expected.html: Added.
* fast/regions/autoheight-singleregion-overflowauto-breaksignored.html: Added.
* fast/regions/autoheight-singleregion-overflowauto-expected.html: Added.
* fast/regions/autoheight-singleregion-overflowauto.html: Added.


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