[Chromium] Bad cast from BitmapImageSingleFrameSkia to BitmapImage
https://bugs.webkit.org/show_bug.cgi?id=113492

Reviewed by Stephen White.

Source/WebCore:

Remove BitmapImageSingleFrameSkia and have ImageBufferSkia construct
BitmapImage objects instead via an intermediate NativeImageSkia.

No new tests, covered by existing tests.

* WebCore.gypi:
* platform/graphics/filters/skia/FEGaussianBlurSkia.cpp: Remove
include for BitmapImageSingleFrameSkia.h header.
* platform/graphics/skia/BitmapImageSingleFrameSkia.cpp: Removed.
* platform/graphics/skia/BitmapImageSingleFrameSkia.h: Removed.
* platform/graphics/skia/ImageBufferSkia.cpp: Construct BitmapImage
objects instead of BitmapImageSingleFrameSkia ones.
(WebCore::ImageBuffer::copyImage):
(WebCore::drawNeedsCopy):
(WebCore::ImageBuffer::draw):
(WebCore::ImageBuffer::drawPattern):
* platform/graphics/skia/ImageSkia.cpp:
(WebCore::BitmapImage::BitmapImage): Implement BitmapImage constructor
that takes an NativeImageSkia* in argument.
(WebCore):
(WebCore::BitmapImage::draw): Remove m_source.initialized() check as
this will return false for BitmapImage objects constructed from a
NativeImageSkia, due to the lack of decoder.
* platform/graphics/skia/NativeImageSkia.cpp:
(WebCore::NativeImageSkia::NativeImageSkia): Add parameter to the
NativeImageSkia constructor so that the caller can request a deep copy
instead of a shallow one. This is needed by the ImageBuffer.
* platform/graphics/skia/NativeImageSkia.h:
* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageFrame::setSkBitmap):

Source/WebKit/chromium:

Update test now that BitmapImageSingleFrameSkia no longer exists.
BitmapImage is now used instead.

* tests/PlatformContextSkiaTest.cpp:
(WebCore::TEST):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147583 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed VS2010 build fix.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
get_by_pname can become confused when iterating over objects with static properties
https://bugs.webkit.org/show_bug.cgi?id=113831

Reviewed by Jer Noble.

Improving the test results to make it more obvious why something failed. Also removed 
absolute paths from the test.

* fast/js/dom-static-property-for-in-iteration-expected.txt:
* fast/js/dom-static-property-for-in-iteration.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Element boundaries prevent Japanese line break opportunities
https://bugs.webkit.org/show_bug.cgi?id=105692

Reviewed by Darin Adler.

Source/WebCore:

Introduce use of prior context when using text break iterators
in non-ASCII path through nextBreakablePosition(). This enables
the use of line break context across an element boundary for
the non-ASCII path. Use of this context with the ASCII path was
enabled by https://bugs.webkit.org/show_bug.cgi?id=17427.

Performance tests of line layout and html5 parsing show that this
patch provides an approximately 4% improvement with Japanese and
no statistically significant regression with ASCII path. Parsing
(html5-full-render) performance is not significantly affected.

Tests: fast/text/line-break-between-text-nodes-cjk.html
       fast/text/line-break-between-text-nodes-latin1.html

Expect rebaselines will be needed due to different line breaks:
       fast/text/international/003.html
       fast/text/international/text-combine-image-test-expected.html
       fast/text/writing-mode/Kusa-Makura-background-canvas.html

* platform/text/TextBreakIterator.cpp:
(WebCore::acquireLineBreakIterator): Pass prior context to non-ICU path.
* platform/text/TextBreakIterator.h:
(WebCore::LazyLineBreakIterator::priorContextLength): Added.
(WebCore::LazyLineBreakIterator::get): Pass prior context to ICU path.
(WebCore::LazyLineBreakIterator::resetStringAndReleaseIterator): Editorial.
* platform/text/TextBreakIteratorICU.cpp:
Use prior context from line break iterators. Requires
adding new UTF16 (UChar*) text provider and reimplementing
Latin1 (LChar*) text provider. Implementation is optimized
by using generic functionality that applies to both string
sources.
(WebCore::textPinIndex): Added.
(WebCore::textNativeLength): Added.
(WebCore::textFixPointer): Added.
(WebCore::textClone): Added.
(WebCore::textExtract): Added.
(WebCore::textClose): Added.
(WebCore::textGetContext): Added.
(WebCore::textLatin1GetCurrentContext): Added.
(WebCore::textLatin1MoveInPrimaryContext): Added.
(WebCore::textLatin1SwitchToPrimaryContext): Added.
(WebCore::textLatin1MoveInPriorContext): Added.
(WebCore::textLatin1SwitchToPriorContext): Added.
(WebCore::textInChunkOrOutOfRange): Added.
(WebCore::textLatin1Access): Added.
(WebCore::textInit): Added.
(WebCore::textOpenLatin1): Added.
(WebCore::textUTF16GetCurrentContext): Added.
(WebCore::textUTF16MoveInPrimaryContext): Added.
(WebCore::textUTF16SwitchToPrimaryContext): Added.
(WebCore::textUTF16MoveInPriorContext): Added.
(WebCore::textUTF16SwitchToPriorContext): Added.
(WebCore::textUTF16Access): Added.
(WebCore::textOpenUTF16): Added.
(WebCore::acquireLineBreakIterator): Use new text providers with prior context.
* platform/text/wchar/TextBreakIteratorWchar.cpp:
(WebCore::acquireLineBreakIterator): Pass prior context to non-ICU path.
* rendering/break_lines.cpp:
(WebCore::nextBreakablePosition): Use prior context in ICU path.

LayoutTests:

* fast/text/line-break-between-text-nodes-cjk-expected.html: Added.
* fast/text/line-break-between-text-nodes-cjk.html: Added.
* fast/text/line-break-between-text-nodes-latin1-expected.html: Added.
* fast/text/line-break-between-text-nodes-latin1.html: Added.
* platform/chromium-linux/fast/text/international/003-expected.png: Rebaselined.
* platform/chromium-linux/fast/text/international/003-expected.txt: Rebaselined.
* platform/chromium-linux/fast/text/international/text-combine-image-test-expected.png: Rebaselined.
* platform/chromium-linux/fast/text/international/text-combine-image-test-expected.txt: Added (previously missing).
* platform/chromium-linux/fast/writing-mode/Kusa-Makura-background-canvas-expected.png: Rebaselined.
* platform/chromium-linux/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt: Rebaselined.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unable to focus on embedded plugins such as Flash via javascript focus()
https://bugs.webkit.org/show_bug.cgi?id=32292

Patch by Dave Michael <dmichael@chromium.org> on 2013-04-03
Reviewed by Ryosuke Niwa.

Source/WebCore:

Make embed, object, and applet elements support focus() when
appropriate. Prior to this patch, javascript focus() had no effect on
embed, object, or applet elements unless tabindex or contenteditable is
set. With this patch, focus() will focus the element unless the plugin
content has failed to load (i.e., we are showing either fallback content
or an unavailable plugin indicator).

Test: plugins/focus.html
      java/focus.html

* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::supportsFocus):
Overridden to return true except when the plugin content has failed to load.
* html/HTMLPlugInElement.h:
(WebCore::HTMLPlugInElement::useFallbackContent):
Moved up from HTMLPlugInImageElement.
(WebCore::HTMLPlugInElement::supportsFocus):
* html/HTMLPlugInElement.h:
(WebCore::HTMLPlugInImageElement::useFallbackContent):
Removed. Now the implementation is inherited from HTMLPlugInElement.

LayoutTests:

Add/update testing to ensure embed, object, and applet tags now support
focus except when plugin content did not load.

* fast/events/resources/tabindex-focus-blur-all-frame1.html: Change embed and object
    elements to reference an invalid plugin, to be consistent with applet. These
    element types are not focusable when there is valid plugin content.
* fast/events/resources/tabindex-focus-blur-all-frame2.html: Same as above.
* fast/events/resources/tabindex-focus-blur-all-iframe1.html: Same as above.
* fast/events/resources/tabindex-focus-blur-all-iframe2.html: Same as above.
* java/focus-expected.txt: Added.
* java/focus.html: Added.
* plugins/focus-expected.txt: Added.
* plugins/focus.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147591 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Enable process suppression when no windows in the application have drawn recently.
<http://webkit.org/b/113854> / <rdar://problem/13540351>

Reviewed by Darin Adler.

* UIProcess/mac/WebContextMac.mm:
(WebKit::applicationWindowModificationsStarted): Note that modifications are no longer stopped.
(WebKit::applicationWindowModificationsStopped): Note that modifications have stopped.
(WebKit::registerOcclusionNotificationHandlers): Register handlers for the start and stop notifications.
(WebKit::unregisterOcclusionNotificationHandlers): Unregister handlers for the start and stop notifications.
(WebKit::WebContext::canEnableProcessSuppressionForNetworkProcess): Allow suppression if the application is occluded
or the application has not drawn recently.
(WebKit::WebContext::canEnableProcessSuppressionForWebProcess): Ditto.
(WebKit::WebContext::canEnableProcessSuppressionForGlobalChildProcesses): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<http://webkit.org/b/113898> Eliminate some code duplication by introducing an array of handlers to register / unregister.

Reviewed by Antti Koivisto.

* UIProcess/mac/WebContextMac.mm:
(OcclusionNotificationHandler): Structure containing the notification name, type and handler.
(WebKit::registerOcclusionNotificationHandlers): Register all of the handlers in the array.
(WebKit::unregisterOcclusionNotificationHandlers): Unregister all of the handlers in the array.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Switch MediaPlayerPrivateBlackBerry.cpp's timer to use CLOCK_MONOTONIC
https://bugs.webkit.org/show_bug.cgi?id=113900

Patch by Otto Derek Cheung <otcheung@rim.com> on 2013-04-03
Reviewed by Rob Buis.
Internally Reviewed by Jeff Rogers.

Timers should use CLOCK_MONOTONIC to avoid undesirable effects when
the user switches the system time.

* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::drawBufferingAnimation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Enable HAVE_MADV_FREE_REUSE on iOS
https://bugs.webkit.org/show_bug.cgi?id=113892
<rdar://problem/12787563>

Reviewed by Mark Rowe.

* wtf/Platform.h:

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

* platform/win/TestExpectations:
* platform/win/fast/lists/inlineBoxWrapperNullCheck-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Exclusions] Removed ExclusionShape dead code
https://bugs.webkit.org/show_bug.cgi?id=113904

Reviewed by Dirk Schulze.

No new tests, just removing dead code.

* rendering/ExclusionShape.cpp:
(WebCore::ExclusionShape::createExclusionShape):
* rendering/ExclusionShape.h:
(ExclusionShape):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't try to set the exception port for server connections
https://bugs.webkit.org/show_bug.cgi?id=113910
<rdar://problem/11248925>

Reviewed by Darin Adler.

Treat a SetExceptionPort message to the server connection as an invalid message.

* Platform/CoreIPC/mac/ConnectionMac.cpp:
(CoreIPC::Connection::receiveSourceEventHandler):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening. Rebaseline after r147588.

* platform/chromium-mac-lion/fast/text/international/003-expected.png:
* platform/chromium-mac-lion/fast/text/international/text-combine-image-test-expected.png:
* platform/chromium-mac-lion/fast/text/international/text-combine-image-test-expected.txt:
* platform/chromium-mac-lion/fast/writing-mode/Kusa-Makura-background-canvas-expected.png:
* platform/chromium-mac-lion/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt:
* platform/chromium-mac-snowleopard/fast/text/international/text-combine-image-test-expected.png: Removed.
* platform/chromium-mac-snowleopard/fast/text/international/text-combine-image-test-expected.txt: Removed.
* platform/chromium-mac-snowleopard/fast/writing-mode/Kusa-Makura-background-canvas-expected.png:
* platform/chromium-mac/fast/text/international/003-expected.png:
* platform/chromium-mac/fast/text/international/003-expected.txt: Added.
* platform/chromium-mac/fast/text/international/text-combine-image-test-expected.png:
* platform/chromium-mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/chromium-mac/fast/writing-mode/Kusa-Makura-background-canvas-expected.png:
* platform/chromium-mac/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt:
* platform/chromium-win/fast/text/international/003-expected.png:
* platform/chromium-win/fast/text/international/003-expected.txt:
* platform/chromium-win/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt:
* platform/chromium/TestExpectations:
* platform/chromium/fast/text/international/003-expected.txt: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add comment to clarify isStackingContext() in RenderLayer.h
https://bugs.webkit.org/show_bug.cgi?id=113909

Reviewed by Simon Fraser.

It was not obvious how the implementation of isStackingContext()
was correct, a comment is appropriate here for anyone who reads
this code in the future.

Just a change in comment, no test needed.

* rendering/RenderLayer.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147600 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Unreviewed gardening. Rebaseline after r147588.

* platform/gtk-wk1/fast/writing-mode: Added.
* platform/gtk-wk1/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147601 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Input value/placeholder is not redrawn when the input height grows
https://bugs.webkit.org/show_bug.cgi?id=113845

Reviewed by Ojan Vafai.

Source/WebCore:

Test: fast/forms/text/text-height-grow.html

* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::styleDidChange):
We need relayout of the inner text element.

LayoutTests:

* fast/forms/text/text-height-grow-expected.html: Added.
* fast/forms/text/text-height-grow.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Re-enable WinEWS tests.

* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(WinEWS):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147603 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Below tests aren't related to bug 87619. It just needs to do rebaseline.

* platform/efl/TestExpectations:
* platform/efl/fast/forms/number/number-appearance-rtl-expected.png:
* platform/efl/fast/forms/number/number-appearance-rtl-expected.txt:
* platform/efl/fast/forms/number/number-appearance-spinbutton-disabled-readonly-expected.png:
* platform/efl/fast/forms/number/number-appearance-spinbutton-disabled-readonly-expected.txt:
* platform/efl/fast/forms/number/number-appearance-spinbutton-layer-expected.png:
* platform/efl/fast/forms/number/number-appearance-spinbutton-layer-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Add a decoration image to search input field
https://bugs.webkit.org/show_bug.cgi?id=113552

Reviewed by Laszlo Gombos.

Source/WebCore:

Though EFL port has a decoration image for search input field, we didn't use it.
Start to show it.

Tests: fast/forms/search-cancel-button-style-sharing.html
       fast/forms/search-rtl.html
       fast/css/input-search-padding.html
       fast/css/text-input-with-webkit-border-radius.html
       fast/css/text-overflow-input.html
       fast/forms/box-shadow-override.html
       fast/forms/control-restrict-line-height.html
       fast/forms/input-appearance-height.html
       fast/forms/placeholder-position.html
       fast/forms/placeholder-pseudo-style.html
       fast/forms/search-styled.html
       fast/forms/search-vertical-alignment.html
       fast/forms/searchfield-heights.html
       fast/repaint/search-field-cancel.html
       fast/replaced/width100percent-searchfield.html

* platform/efl/RenderThemeEfl.cpp:
(WebCore):
(WebCore::RenderThemeEfl::supportsDataListUI):
(WebCore::RenderThemeEfl::adjustSearchFieldDecorationStyle):

LayoutTests:

Rebaseline related to input search field.

* platform/efl/fast/css/input-search-padding-expected.png:
* platform/efl/fast/css/input-search-padding-expected.txt:
* platform/efl/fast/css/text-input-with-webkit-border-radius-expected.png:
* platform/efl/fast/css/text-input-with-webkit-border-radius-expected.txt:
* platform/efl/fast/css/text-overflow-input-expected.png:
* platform/efl/fast/css/text-overflow-input-expected.txt:
* platform/efl/fast/forms/box-shadow-override-expected.png:
* platform/efl/fast/forms/box-shadow-override-expected.txt:
* platform/efl/fast/forms/control-restrict-line-height-expected.png:
* platform/efl/fast/forms/control-restrict-line-height-expected.txt:
* platform/efl/fast/forms/input-appearance-height-expected.png:
* platform/efl/fast/forms/input-appearance-height-expected.txt:
* platform/efl/fast/forms/placeholder-position-expected.png:
* platform/efl/fast/forms/placeholder-position-expected.txt:
* platform/efl/fast/forms/placeholder-pseudo-style-expected.png:
* platform/efl/fast/forms/placeholder-pseudo-style-expected.txt:
* platform/efl/fast/forms/search-cancel-button-style-sharing-expected.png:
* platform/efl/fast/forms/search-cancel-button-style-sharing-expected.txt:
* platform/efl/fast/forms/searchfield-heights-expected.png:
* platform/efl/fast/forms/searchfield-heights-expected.txt:
* platform/efl/fast/repaint/search-field-cancel-expected.png:
* platform/efl/fast/repaint/search-field-cancel-expected.txt:
* platform/efl/fast/replaced/width100percent-searchfield-expected.png:
* platform/efl/fast/replaced/width100percent-searchfield-expected.txt:


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

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