WebKit-https.git
8 years agoSupport !ENABLE(VIDEO) builds with horizontally layed out video controls.
ossy@webkit.org [Tue, 12 Jun 2012 17:52:57 +0000 (17:52 +0000)]
Support !ENABLE(VIDEO) builds with horizontally layed out video controls.
https://bugs.webkit.org/show_bug.cgi?id=88881

Patch by Silvia Pfeiffer <silviapf@chromium.org> on 2012-06-12
Reviewed by Csaba Osztrogonác.

No new tests as this is a regression from WK87835.

* html/shadow/SliderThumbElement.cpp:
(WebCore::hasVerticalAppearance):
Ifdef out video related functionality, since usesVerticalVolumeSlider
does not exist in that case.

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

8 years ago[BlackBerry] Fix crash in InputHandler
commit-queue@webkit.org [Tue, 12 Jun 2012 17:28:59 +0000 (17:28 +0000)]
[BlackBerry] Fix crash in InputHandler
https://bugs.webkit.org/show_bug.cgi?id=88808

Patch by Crystal Zhang <haizhang@rim.com> on 2012-06-12
Reviewed by Antonio Gomes.

m_page is destroyed before InputHandler, so should move the call to destroy popup to chromeDestroyed().

* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::chromeDestroyed():
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::~InputHandler):

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

8 years agoWeb Inspector: allow clearing revision history.
pfeldman@chromium.org [Tue, 12 Jun 2012 16:57:12 +0000 (16:57 +0000)]
Web Inspector: allow clearing revision history.
https://bugs.webkit.org/show_bug.cgi?id=88847

Reviewed by Vsevolod Vlasov.

This change also renames "Revision history" to "Local modifications".
I intend to list modifications to all files in that view in the subsequent change.

* English.lproj/localizedStrings.js:
* inspector/front-end/Resource.js:
(WebInspector.Resource._clearResourceHistory):
* inspector/front-end/RevisionHistoryView.js:
(WebInspector.RevisionHistoryView.else.clearHistory):
(WebInspector.RevisionHistoryView):
(WebInspector.RevisionHistoryView.prototype._revisionAdded):
(WebInspector.RevisionHistoryTreeElement):
(WebInspector.RevisionHistoryTreeElement.prototype._createLine):
(WebInspector.RevisionHistoryTreeElement.prototype.allowRevert):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype.appendApplicableItems):

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

8 years agoWeb Inspector: use jsdifflib for revision diff calculation.
pfeldman@chromium.org [Tue, 12 Jun 2012 16:44:28 +0000 (16:44 +0000)]
Web Inspector: use jsdifflib for revision diff calculation.
https://bugs.webkit.org/show_bug.cgi?id=88791

Reviewed by Vsevolod Vlasov.

Present diff calculation is incomplete, it does not properly handle the following case:
    [a, b, c, d, e, f, g, h] => [c, d, e, f, g, h, a, b]
We should not be implementing diff by ourselves. I imported jsdifflib from
https://github.com/cemerick/jsdifflib. It has BSD license that is compatible with WebKit.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/front-end/RevisionHistoryView.js:
(WebInspector.RevisionHistoryTreeElement.prototype.onexpand.step2):
(WebInspector.RevisionHistoryTreeElement.prototype.onexpand):
(WebInspector.RevisionHistoryTreeElement.prototype._createLine.appendLineNumber):
(WebInspector.RevisionHistoryTreeElement.prototype._createLine):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/externs.js:
(difflib.stringAsLines):
(difflib.SequenceMatcher):
(difflib.SequenceMatcher.prototype.get_opcodes):
* inspector/front-end/inspector.html:
* inspector/front-end/jsdifflib.js: Added.
(difflib.defaultJunkFunction):
(difflib.stripLinebreaks):
(difflib.stringAsLines):
(difflib.__reduce):
(difflib.__ntuplecomp):
(difflib.__calculate_ratio):
(difflib.__dictget):
(difflib.SequenceMatcher.this.set_seqs):
(difflib.SequenceMatcher.this.set_seq1):
(difflib.SequenceMatcher.this.set_seq2):
(difflib.SequenceMatcher.this.__chain_b):
(difflib.SequenceMatcher.this.find_longest_match):
(difflib.SequenceMatcher.this.get_matching_blocks):
(difflib.SequenceMatcher.this.get_opcodes):
(difflib.SequenceMatcher.this.get_grouped_opcodes):
(difflib.SequenceMatcher.this.quick_ratio):
(difflib.SequenceMatcher.this.real_quick_ratio):
* inspector/front-end/revisionHistory.css:
(.revision-history-line-separator .webkit-line-number):

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

8 years ago[EFL] enable LEGACY_WEBKIT_BLOB_BUILDER flag
commit-queue@webkit.org [Tue, 12 Jun 2012 16:32:58 +0000 (16:32 +0000)]
[EFL] enable LEGACY_WEBKIT_BLOB_BUILDER flag
https://bugs.webkit.org/show_bug.cgi?id=88715

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-06-12
Reviewed by Noam Rosenthal.

.:

Enable LEGACY_WEBKIT_BLOB_BUILDER flag by default on EFL port.

* Source/cmake/OptionsEfl.cmake:
* Source/cmakeconfig.h.cmake:

Tools:

Enable LEGACY_WEBKIT_BLOB_BUILDER flag by default on EFL port.

* Scripts/webkitperl/FeatureList.pm:

LayoutTests:

Unskip fast/files/blob-builder-crash.html now that
LEGACY_WEBKIT_BLOB_BUILDER flag is enabled by default
on EFL port.

* platform/efl/Skipped:

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

8 years ago[Qt] Fix -Werror for the buildbots
ossy@webkit.org [Tue, 12 Jun 2012 16:28:36 +0000 (16:28 +0000)]
[Qt] Fix -Werror for the buildbots
https://bugs.webkit.org/show_bug.cgi?id=88223

Rubber-stamped by Tor Arne Vestbø.

Revert a part of r119269 to enable Werror again for non qt-developer-builds. (for bots for example)

* qmake/mkspecs/features/unix/default_post.prf:

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

8 years ago[GStreamer] http/tests/media/video-buffered-range-contains-currentTime.html is failing
commit-queue@webkit.org [Tue, 12 Jun 2012 16:15:05 +0000 (16:15 +0000)]
[GStreamer] http/tests/media/video-buffered-range-contains-currentTime.html is failing
https://bugs.webkit.org/show_bug.cgi?id=87575

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-06-12
Reviewed by Philippe Normand.

Source/WebCore:

When EOS is reached in forward playback, the position does not necessarily
match the duration. This confuses HTMLMediaElement and causes the "ended"
event not to be fired. To avoid this, we synchronize position and duration
values in this case.

Test: http/tests/media/video-buffered-range-contains-currentTime.html

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

LayoutTests:

Unskip http/tests/media/video-buffered-range-contains-currentTime.html for both
GTK and EFL ports now that MediaPlayerPrivateGStreamer correctly reports EOS and
now that the "ended" event is properly fired.

* platform/efl/TestExpectations:
* platform/efl/http/tests/media/video-buffered-range-contains-currentTime-expected.png: Added.
* platform/gtk/TestExpectations:
* platform/gtk/http/tests/media/video-buffered-range-contains-currentTime-expected.png: Added.

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

8 years agoRefactor InputType::receiveDroppedFiles to take DragData
kinuko@chromium.org [Tue, 12 Jun 2012 15:34:15 +0000 (15:34 +0000)]
Refactor InputType::receiveDroppedFiles to take DragData
https://bugs.webkit.org/show_bug.cgi?id=88860

Reviewed by Kent Tamura.

So that we can centralize the file paths related code into FileInputType
and makes it easier to extract more data from DragData for
<input type=file> (like bug 88293 for directory drag-and-drop).

No new tests as this has no behavioral changes.

* html/FileInputType.cpp:
(WebCore::FileInputType::receiveDroppedFiles):
* html/FileInputType.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::receiveDroppedFiles):
* html/HTMLInputElement.h:
* html/InputType.cpp:
(WebCore::InputType::receiveDroppedFiles):
* html/InputType.h:
* page/DragController.cpp:
(WebCore::DragController::concludeEditDrag):

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

8 years agoGenerate -webkit-box-decoration-break property only when the feature is enabled
commit-queue@webkit.org [Tue, 12 Jun 2012 15:29:33 +0000 (15:29 +0000)]
Generate -webkit-box-decoration-break property only when the feature is enabled
https://bugs.webkit.org/show_bug.cgi?id=88861

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-06-12
Reviewed by Alexis Menard.

Otherwise it will hit an assertion if the property is present on the
style but the feature disabled. Also fixes a compilation warning when
the feature is disabled.

* css/CSSPropertyNames.in:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):

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

8 years ago[Gtk] Many tests revealed as passing after moving from Skipped to test_expectations.txt
mario@webkit.org [Tue, 12 Jun 2012 15:11:35 +0000 (15:11 +0000)]
[Gtk] Many tests revealed as passing after moving from Skipped to test_expectations.txt
https://bugs.webkit.org/show_bug.cgi?id=85591

Reviewed by Martin Robinson.

Remove FAIL text expectations for sputnik tests that have been
consistently passing on all the Gtk builders.

* platform/gtk/TestExpectations:

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

8 years agoTweaked the Mac export file a bit more, adding more-correct iOS cases.
darin@apple.com [Tue, 12 Jun 2012 15:10:06 +0000 (15:10 +0000)]
Tweaked the Mac export file a bit more, adding more-correct iOS cases.

Reviewed by David Kilzer.

* WebCore.exp.in: Rearrangement.

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

8 years agoUnreviewed build fix.
kenneth@webkit.org [Tue, 12 Jun 2012 15:06:31 +0000 (15:06 +0000)]
Unreviewed build fix.

* UIProcess/qt/QtViewportHandler.cpp:
(WebKit::QtViewportHandler::initialRect):

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

8 years agoUsing extrernal ICU library on case unsensitive drives will not work
jocelyn.turcotte@nokia.com [Tue, 12 Jun 2012 15:04:41 +0000 (15:04 +0000)]
Using extrernal ICU library on case unsensitive drives will not work
https://bugs.webkit.org/show_bug.cgi?id=70913

Reviewed by Csaba Osztrogonác.

Source/WebCore:

* platform/graphics/surfaces/GraphicsSurface.h:

Source/WebKit2:

* WebProcess/WebPage/UpdateAtlas.cpp:

Source/WTF:

Properly set the include path for the WTF module and for modules using it.
The path should include Source/WTF/wtf only when building WTF itself. Other
modules are expected to include the headers as #include <wtf/Header.h>, so
only add Source/WTF to their include path.

"unicode/utf8.h" should now then always reference to ICU in the include path
and "wtf/unicode/UTF8.h" reference to the WTF version.
This will work as long as WTF object files don't depend on ICU themselves.

Removed gobject, qt and unicode from the include path as those directories
don't exist anymore.

* WTF.pri:
* WTF.pro:

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

8 years ago[Qt] Do not move/scale content while the user is interacting with it
kenneth@webkit.org [Tue, 12 Jun 2012 14:55:14 +0000 (14:55 +0000)]
[Qt] Do not move/scale content while the user is interacting with it
https://bugs.webkit.org/show_bug.cgi?id=88872

Reviewed by Simon Hausmann.

Don't try moving content into valid bounds when the content
size changes and the user is interacting with the content.

Only apply the viewport initial scale after user interaction
has ended.

* UIProcess/qt/QtViewportHandler.cpp:
(WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer):
(WebKit::QtViewportHandler::setInitialScaleIfNeeded):
(WebKit::QtViewportHandler::viewportAttributesChanged):
(WebKit::QtViewportHandler::pageContentsSizeChanged):
(WebKit::QtViewportHandler::initialRect):
(WebKit):
* UIProcess/qt/QtViewportHandler.h:
(QtViewportHandler):

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

8 years ago[BlackBerry] Use a safer way to shrink JS memory usage
commit-queue@webkit.org [Tue, 12 Jun 2012 14:51:18 +0000 (14:51 +0000)]
[BlackBerry] Use a safer way to shrink JS memory usage
https://bugs.webkit.org/show_bug.cgi?id=88811

Patch by Yong Li <yoli@rim.com> on 2012-06-12
Reviewed by Antonio Gomes.

We should just make a GC request and JSC will check if it is safe to do anything.

* Api/BlackBerryGlobal.cpp:
(BlackBerry::WebKit::clearMemoryCaches):

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

8 years ago[chromium] Use TextureDrawQuad for video layer output when it produces a single GL...
danakj@chromium.org [Tue, 12 Jun 2012 14:39:24 +0000 (14:39 +0000)]
[chromium] Use TextureDrawQuad for video layer output when it produces a single GL texture
https://bugs.webkit.org/show_bug.cgi?id=88814

Reviewed by Adrienne Walker.

When a CCVideLayerImpl produces quads for a frame that is contained
in a single GL texture, then use the TextureDrawQuad instead of the
VideoDrawQuad. Moves the computation for the RGBA(software) and
NativeTexture (hardware) cases from LayerRendererChromium into
CCVideoLayerImpl, so it can embed these values in the TextureDrawQuad.

No new tests, behaviour should be the same.

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawStreamTexture):
(WebCore::LayerRendererChromium::drawVideoQuad):
* platform/graphics/chromium/LayerRendererChromium.h:
(LayerRendererChromium):
* platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
(WebCore::CCVideoLayerImpl::appendQuads):

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

8 years agoChange the volume slider to horizontal rendering for Chrome video controls.
commit-queue@webkit.org [Tue, 12 Jun 2012 14:31:59 +0000 (14:31 +0000)]
Change the volume slider to horizontal rendering for Chrome video controls.
https://bugs.webkit.org/show_bug.cgi?id=87835

Patch by Silvia Pfeiffer <silviapf@chromium.org> on 2012-06-12
Reviewed by Eric Carlson.

Source/WebCore:

No new tests - final patch in the Chrome controls update series will contain rebaselined tests.

The Chrome video controls are receiving a visual update. The volume slider is moved into
the controls with horizontal rendering, the volume slider container is removed. The visual
update itself is in a separate patch.

* css/mediaControlsChromium.css:
(audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
Removed relative positioning to render all controls elements equally in DOM order.
(audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
Removed absolute positioning to render all controls elements equally in DOM order.
(audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
Removed absolute positioning to render all controls elements equally in DOM order.
(audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
Removed volume slider container - it's not necessary any more.
(audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
Remove flexbox and introduce inline display to always display this field.
(audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
Removed absolute positioning to render all controls elements equally in DOM order.
* html/shadow/MediaControlRootElementChromium.cpp:
(WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
Removed volume slider container - it's not necessary any more.
(WebCore::MediaControlRootElementChromium::create):
Appended the volume slider and the mute button directly to the panel, removed volume slider container.
(WebCore::MediaControlRootElementChromium::setMediaController):
Removed volume slider container.
(WebCore::MediaControlRootElementChromium::reportedError):
Removed volume slider container.
(WebCore::MediaControlRootElementChromium::showVolumeSlider):
Removed volume slider container.
* html/shadow/MediaControlRootElementChromium.h:
(WebCore):
(MediaControlRootElementChromium):
Removed volume slider container.
* html/shadow/SliderThumbElement.cpp:
(WebCore::hasVerticalAppearance):
Allow use of horizontal media volume slider.
(WebCore::RenderSliderThumb::layout):
Reuse hasVerticalAppearance function.
* rendering/RenderMediaControlsChromium.cpp:
(WebCore::RenderMediaControlsChromium::paintMediaVolumeSlider):
Change line drawing from vertical to horizontal.
* rendering/RenderTheme.h:
(WebCore::RenderTheme::usesVerticalVolumeSlider):
Add usesVerticalVolumeSlider function to allow horizontal volume sliders.
* rendering/RenderThemeChromiumMac.h:
(WebCore::RenderThemeChromiumMac::usesVerticalVolumeSlider):
Add usesVerticalVolumeSlider function to allow horizontal volume sliders.
Add usesVerticalVolumeSlider function to allow horizontal volume sliders.
* rendering/RenderThemeChromiumSkia.h:
(WebCore::RenderThemeChromiumSkia::usesVerticalVolumeSlider):
Add usesVerticalVolumeSlider function to allow horizontal volume sliders.

LayoutTests:

The Chrome video controls are receiving a visual update. The volume slider is included into
the controls with horizontal rendering, the volume slider container is removed. The visual
update itself is in a separate patch.

* platform/chromium/TestExpectations:
Temporarily skip tests related to volume controls rendering for Chromium.

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

8 years ago[CSSRegions]NamedFlow::overset should return true when there's no region chain attached
commit-queue@webkit.org [Tue, 12 Jun 2012 14:21:41 +0000 (14:21 +0000)]
[CSSRegions]NamedFlow::overset should return true when there's no region chain attached
https://bugs.webkit.org/show_bug.cgi?id=88515

The CSS Regions specifies that the "overset" attribute needs to return true if the content overflows, there's no region attached to the flow
or if the NamedFlow is in the NULL state:
http://www.w3.org/TR/css3-regions/#dom-named-flow-overset

Source/WebCore:

This patch updates WebKit's behavior in the last two situations to match the one in the spec.

Patch by Andrei Bucur <abucur@adobe.com> on 2012-06-12
Reviewed by Andreas Kling.

Test: fast/regions/webkit-named-flow-overset.html was updated

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
(WebCore::RenderFlowThread::computeOverflowStateForRegions): If the last valid region is null, the flow has not region chain attached or it's in the NULL state.

LayoutTests:

The overset test was updated to cover the attribute value in case of a flow in the NULL state.

Patch by Andrei Bucur <abucur@adobe.com> on 2012-06-12
Reviewed by Andreas Kling.

* fast/regions/webkit-named-flow-overset-expected.txt:
* fast/regions/webkit-named-flow-overset.html:

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

8 years agoWeb Inspector: Provide context menu for deleting recorded profile on Profiles Panel
pfeldman@chromium.org [Tue, 12 Jun 2012 13:58:05 +0000 (13:58 +0000)]
Web Inspector: Provide context menu for deleting recorded profile on Profiles Panel
https://bugs.webkit.org/show_bug.cgi?id=88286

Added the context menu to delete the selected profile.

Patch by Rahul Tiwari <rahultiwari.cse.iitr@gmail.com> on 2012-06-12
Reviewed by Pavel Feldman.

No new tests required as UI related change

* English.lproj/localizedStrings.js: Removed property svn:mime-type.
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent):

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

8 years ago2012-06-12 Pavel Feldman <pfeldman@chromium.org>
pfeldman@chromium.org [Tue, 12 Jun 2012 13:52:07 +0000 (13:52 +0000)]
2012-06-12  Pavel Feldman  <pfeldman@chromium.org>

        Not reviewed: removed svn:mime-type property from English.lproj/localizedStrings.js

        * English.lproj/localizedStrings.js

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

8 years agoTried to fix the notification-enabled build after r120044.
mitz@apple.com [Tue, 12 Jun 2012 13:45:34 +0000 (13:45 +0000)]
Tried to fix the notification-enabled build after r120044.

* notifications/NotificationController.cpp:
(WebCore::NotificationController::NotificationController):
(WebCore::NotificationController::create):
(WebCore::provideNotification):
* notifications/NotificationController.h:
(NotificationController):

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

8 years agoUnreviewed gardening. Skip test failing randomly in GTK bots after r120040.
mario@webkit.org [Tue, 12 Jun 2012 13:40:19 +0000 (13:40 +0000)]
Unreviewed gardening. Skip test failing randomly in GTK bots after r120040.

* platform/gtk/TestExpectations:

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

8 years ago[Qt][Texmap] Falling leaves demo missing clipping.
commit-queue@webkit.org [Tue, 12 Jun 2012 13:33:36 +0000 (13:33 +0000)]
[Qt][Texmap] Falling leaves demo missing clipping.
https://bugs.webkit.org/show_bug.cgi?id=88704

The bug originated from begining native painting mode of QPainter after enabling
scissor test, because begining native painting mode disables scissor test.

Covered by existing compositing tests.

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

* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::beginPainting):

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

8 years ago[Qt][Win] Buildfix related to fromWinHBITMAP
ossy@webkit.org [Tue, 12 Jun 2012 13:30:54 +0000 (13:30 +0000)]
[Qt][Win] Buildfix related to fromWinHBITMAP
https://bugs.webkit.org/show_bug.cgi?id=88863

Reviewed by Jocelyn Turcotte.

* platform/graphics/qt/GraphicsContextQt.cpp: Add qt_pixmapFromWinHBITMAP and HBitmapFormat enum.
(WebCore):
(WebCore::GraphicsContext::releaseWindowsContext):
* platform/graphics/qt/ImageQt.cpp:
(WebCore): Move qt_pixmapFromWinHBITMAP to outside of WebCore namespace. (Fix after r119924.)

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

8 years ago[CMake] Enabled CSS_BOX_DECORATION_BREAK by default
commit-queue@webkit.org [Tue, 12 Jun 2012 13:19:07 +0000 (13:19 +0000)]
[CMake] Enabled CSS_BOX_DECORATION_BREAK by default
https://bugs.webkit.org/show_bug.cgi?id=88850

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-06-12
Reviewed by Alexis Menard.

Enabled it by default on CMake ports like in other ports.
This patch is a follow up to r120029.

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

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

8 years ago[REGRESSION][WTR] Build fail with werror after r120054
kbalazs@webkit.org [Tue, 12 Jun 2012 12:51:16 +0000 (12:51 +0000)]
[REGRESSION][WTR] Build fail with werror after r120054
https://bugs.webkit.org/show_bug.cgi?id=88862

Reviewed by Csaba Osztrogonác.

Some static helpers become unused after counterValueForElementById
has moved to Internals. Let's remove them.

* WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
(WTR):

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

8 years ago[Shadow DOM] <style> inside Shadow subtree should be scoped inside the subtree.
commit-queue@webkit.org [Tue, 12 Jun 2012 12:28:29 +0000 (12:28 +0000)]
[Shadow DOM] <style> inside Shadow subtree should be scoped inside the subtree.
https://bugs.webkit.org/show_bug.cgi?id=87805

Source/WebCore:

Modified HTMLStyleElement to be treated as a scoped style independent
of its "scoped" attribute's value if HTMLStyleElement is in shadow
subtree. HTMLStyleElement has the following four cases talking about
"scoped" attribute and whether is in shadow subtree or not:
1, HTMLStyleElement is "scoped" and is in document tree,
2, HTMLStyleElement is "scoped" and is in shadow subtree,
3, HTMLStyleElement is not "scoped" and is in document tree, and
4, HTMLStyleElement is not "scoped" and is in shadow subtree.
The case 1 and 2 are not changed. This patch affected the case 4.
At the case 4, the HTMLStyleElement's scoping node is the shadow root.
This change is the first step for fixing style scope bug,
i.e. HTMLStyleElements in shadow subtree are applied to any element
in document tree.

Patch by Takashi Sakamoto <tasak@google.com> on 2012-06-12
Reviewed by Dimitri Glazkov.

Test: fast/css/style-scoped/style-scoped-change-scoped-in-shadow.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::determineScope):
Modified to return a shadow root if a targeted stylesheet owner node is
not scoped but in some shadow DOM subtree.
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::HTMLStyleElement):
(WebCore::HTMLStyleElement::parseAttribute):
Modified to use the below scopedAttributeChanged when a changed
attribute's name is "scoped".
(WebCore::HTMLStyleElement::scopedAttributeChanged):
Newly added. According to new scoped value and isInShadowTree,
add or remove style rules to/from scopedAuthorRules via
registerWithScopingNode or unregisterWithScopingNode.
(WebCore::HTMLStyleElement::registerWithScopingNode):
Added one boolean argument to determine whether HTMLStyleElement is
scoped or not. The reason why not using scoped() is the comment:
"We cannot rely on the scoped element already being present when this
method is invoked. Therefore we cannot rely on scoped()"
(WebCore::HTMLStyleElement::unregisterWithScopingNode):
Changed the code for updating m_isRegisteredWithScopingNode. Now
set m_scopedStyleRegistrationState to be NotRegistered.
(WebCore::HTMLStyleElement::insertedInto):
Modified to invoke registerWithScopingNode when an element is not
scoped but in some shadow subtree.
(WebCore::HTMLStyleElement::removedFrom):
Modified to invoke unregisterWithScopingNode when an element is not
scoped but in some shadow subtree.
* html/HTMLStyleElement.h:
(HTMLStyleElement):
Modified the type of m_isRegisteredWithScopingNode from bool to
enum and renamed to m_scopedStyleRegistrationState. Now the member
variable keeps what HTMLStyleElement's scoping node is, i.e.
none (this means, not in shadow subtree and not scoped), shadow root or
parent node.
Added one new method scopedAttributeChanged's declaration and
modified the declaration of registerWithScopingNode.

LayoutTests:

Patch by Takashi Sakamoto <tasak@google.com> on 2012-06-12
Reviewed by Dimitri Glazkov.

* fast/css/style-scoped/registering-shadowroot-expected.txt:
* fast/css/style-scoped/registering-shadowroot.html:
* fast/css/style-scoped/style-scoped-change-scoped-in-shadow-expected.txt: Added.
* fast/css/style-scoped/style-scoped-change-scoped-in-shadow.html: Added.

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

8 years agoRemoving unused parameter Page
commit-queue@webkit.org [Tue, 12 Jun 2012 12:06:20 +0000 (12:06 +0000)]
Removing unused parameter Page
https://bugs.webkit.org/show_bug.cgi?id=88848

Patch by Amy Ousterhout <aousterh@chromium.org> on 2012-06-12
Reviewed by Kentaro Hara.

Removed the unused parameter Page* supplied to the create function
and constructor in DeviceOrientationController.

The parameter Page* was previously stored in an instance variable
m_page, but this was removed (see https://bugs.webkit.org/show_bug.cgi?id=88812).

No new tests because the removed parameter was unused and untested.

* dom/DeviceOrientationController.cpp:
(WebCore::DeviceOrientationController::DeviceOrientationController):
(WebCore::DeviceOrientationController::create):
(WebCore::provideDeviceOrientationTo):
* dom/DeviceOrientationController.h:
(DeviceOrientationController):

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

8 years ago[Qt] Slave losts cause build break on bots
ossy@webkit.org [Tue, 12 Jun 2012 11:53:23 +0000 (11:53 +0000)]
[Qt] Slave losts cause build break on bots
https://bugs.webkit.org/show_bug.cgi?id=38980

Minor fix after r59261.

Reviewed by Tor Arne Vestbø.

* Scripts/build-webkit:
(unlinkZeroFiles): Don't remove 0 byte sized directories, because they are always 0 byte sized on Windows.

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

8 years agoUnreviewed. Add reference to bug 88859 for test skipped in r120055.
mario@webkit.org [Tue, 12 Jun 2012 11:48:47 +0000 (11:48 +0000)]
Unreviewed. Add reference to bug 88859 for test skipped in r120055.

* platform/efl/Skipped:
* platform/gtk/TestExpectations:
* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:
* platform/wincairo/Skipped:

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

8 years ago[Chromium] Unreviewed: Add expectations for speech-recognition-event-constructor
dominicc@chromium.org [Tue, 12 Jun 2012 11:30:42 +0000 (11:30 +0000)]
[Chromium] Unreviewed: Add expectations for speech-recognition-event-constructor

This looks like it was failing as it was added in r120053. Filed
bug 88856.

* platform/chromium/TestExpectations:

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

8 years agoUnreviewed, rolling out r120051.
commit-queue@webkit.org [Tue, 12 Jun 2012 11:18:18 +0000 (11:18 +0000)]
Unreviewed, rolling out r120051.
http://trac.webkit.org/changeset/120051
https://bugs.webkit.org/show_bug.cgi?id=88852

some tests are crashing (Requested by morrita on #webkit).

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

Source/WebCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/generic/ContextEnabledFeatures.cpp: Renamed from Source/WebKit/chromium/src/ContextFeaturesClientImpl.cpp.
(WebCore):
(WebCore::ContextEnabledFeatures::shadowDOMEnabled):
(WebCore::ContextEnabledFeatures::styleScopedEnabled):
(WebCore::ContextEnabledFeatures::pagePopupEnabled):
* bindings/generic/ContextEnabledFeatures.h: Renamed from Source/WebKit/chromium/src/ContextFeaturesClientImpl.h.
(WebCore):
(ContextEnabledFeatures):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateImplementation):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::determineScope):
* dom/ContextFeatures.cpp: Removed.
* dom/ContextFeatures.h: Removed.
* dom/DOMAllInOne.cpp:
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
(WebCore::DOMImplementation::createHTMLDocument):
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
(WebCore):
(Document):
* dom/Position.cpp:
(WebCore::Position::Position):
(WebCore::Position::findParent):
* dom/TreeScope.cpp:
(WebCore::TreeScope::getSelection):
* dom/make_names.pl:
(printConstructorInterior):
(printFactoryCppFile):
(printWrapperFunctions):
(printWrapperFactoryCppFile):
* editing/markup.cpp:
(WebCore::createFragmentFromMarkupWithContext):
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::registerWithScopingNode):
(WebCore::HTMLStyleElement::unregisterWithScopingNode):
* html/shadow/HTMLContentElement.cpp:
(WebCore::contentTagName):
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::patchDocument):
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::allowShadowDOM):
(WebCore::FrameLoaderClient::allowStyleScoped):
(FrameLoaderClient):
(WebCore::FrameLoaderClient::allowPagePopup):
* platform/RefCountedSupplement.h: Removed.
* platform/Supplementable.h:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::responseXML):

Source/WebKit/chromium:

* WebKit.gyp:
* public/WebPermissionClient.h:
(WebKit::WebPermissionClient::allowWebComponents):
* src/FrameLoaderClientImpl.cpp:
(WebKit::FrameLoaderClientImpl::allowShadowDOM):
(WebKit):
(WebKit::FrameLoaderClientImpl::allowStyleScoped):
* src/FrameLoaderClientImpl.h:
(FrameLoaderClientImpl):
* src/WebPagePopupImpl.cpp:
(WebKit::WebPagePopupImpl::initPage):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setPermissionClient):
(WebKit::WebViewImpl::WebViewImpl):
* src/WebViewImpl.h:
(WebKit):

LayoutTests:

* fast/dom/shadow/elements-in-frameless-document-expected.txt: Removed.
* fast/dom/shadow/elements-in-frameless-document.html: Removed.

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

8 years ago[Qt] Diverging test results on 32/64 bit architectures
ossy@webkit.org [Tue, 12 Jun 2012 11:09:00 +0000 (11:09 +0000)]
[Qt] Diverging test results on 32/64 bit architectures
https://bugs.webkit.org/show_bug.cgi?id=82601

Unreviewed gardening, update expected files.

* platform/qt/Skipped: Unskip svg/transforms/transform-origin-css-property.xhtml, because it passes now.
* platform/qt/fast/repaint/moving-shadow-on-container-expected.png:
* platform/qt/fast/repaint/moving-shadow-on-path-expected.png:
* platform/qt/svg/W3C-SVG-1.1/paths-data-03-f-expected.png:
* platform/qt/svg/custom/use-on-symbol-inside-pattern-expected.png:
* platform/qt/svg/custom/use-on-symbol-inside-pattern-expected.txt:
* platform/qt/svg/transforms/transform-origin-css-property-expected.png: Removed, because it is a reftest.
* platform/qt/svg/transforms/transform-origin-css-property-expected.txt: Removed, because it is a reftest.

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

8 years agoUnreviewed; skipping the new XHR blob test on the platforms where XHR_RESPONSE_BLOB...
kinuko@chromium.org [Tue, 12 Jun 2012 11:05:01 +0000 (11:05 +0000)]
Unreviewed; skipping the new XHR blob test on the platforms where XHR_RESPONSE_BLOB is not enabled.
http/tests/xmlhttprequest/response-blob-size.html

* platform/efl/Skipped:
* platform/gtk/TestExpectations:
* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:
* platform/wincairo/Skipped:

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

8 years ago[DRT] LTC:: counterValueForElementById() could be moved to Internals.
kaustubh@motorola.com [Tue, 12 Jun 2012 10:47:39 +0000 (10:47 +0000)]
[DRT] LTC:: counterValueForElementById() could be moved to Internals.
https://bugs.webkit.org/show_bug.cgi?id=84406

Reviewed by Hajime Morita.

.:

Exporting Internals::counterValueForElement symbols for the Gtk build.

* Source/autotools/symbols.filter:

Source/WebCore:

Move the counterValueForElementById from LayoutTestCotroller to Internals and
remove the old platform specific implementations as it exclusively tests WebCore functionality.

Covered by existing test cases.

* testing/Internals.cpp:
(WebCore::Internals::counterValue):
(WebCore):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:

Source/WebKit/efl:

Move the counterValueForElementById from LayoutTestCotroller to Internals and
remove the old platform specific implementations as it exclusively tests WebCore functionality.

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:

Source/WebKit/gtk:

Move the counterValueForElementById from LayoutTestCotroller to Internals and
remove the old platform specific implementations as it exclusively tests WebCore functionality.

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
* WebCoreSupport/DumpRenderTreeSupportGtk.h:
(DumpRenderTreeSupportGtk):

Source/WebKit/qt:

Move the counterValueForElementById from LayoutTestCotroller to Internals and
remove the old platform specific implementations as it exclusively tests WebCore functionality.

* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
* WebCoreSupport/DumpRenderTreeSupportQt.h:

Source/WebKit/win:

Move the counterValueForElementById from LayoutTestCotroller to Internals and
remove the old platform specific implementations as it exclusively tests WebCore functionality.

* Interfaces/IWebFramePrivate.idl:
* WebFrame.cpp:
* WebFrame.h:

Source/WebKit2:

Exporting Internals::counterValueForElement symbols for the win build.

* win/WebKit2.def:

Tools:

Move the counterValueForElementById from LayoutTestCotroller to Internals and
remove the old platform specific implementations as it exclusively tests WebCore functionality.

* DumpRenderTree/LayoutTestController.cpp:
(LayoutTestController::staticFunctions):
* DumpRenderTree/LayoutTestController.h:
(LayoutTestController):
* DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp:
* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::LayoutTestController):
(LayoutTestController::setPOSIXLocale):
* DumpRenderTree/chromium/LayoutTestController.h:
(LayoutTestController):
* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
* DumpRenderTree/qt/LayoutTestControllerQt.h:
(LayoutTestController):
* DumpRenderTree/win/LayoutTestControllerWin.cpp:
* DumpRenderTree/wx/LayoutTestControllerWx.cpp:
* WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
* WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
(WTR):
* WebKitTestRunner/InjectedBundle/LayoutTestController.h:
(LayoutTestController):

LayoutTests:

Move the counterValueForElementById from LayoutTestCotroller to Internals and
remove the old platform specific implementations as it exclusively tests WebCore functionality.

* fast/css/counters/2displays-expected.txt:
* fast/css/counters/2displays.html:
* fast/css/counters/adding-nodes.html:
* fast/css/counters/after-continuation-expected.txt:
* fast/css/counters/after-continuation.html:
* fast/css/counters/content-021-expected.txt:
* fast/css/counters/content-021.html:
* fast/css/counters/counter-before-content-not-incremented.html:
* fast/css/counters/counter-increment-000-expected.txt:
* fast/css/counters/counter-increment-000.html:
* fast/css/counters/counter-increment-001-expected.txt:
* fast/css/counters/counter-increment-001.html:
* fast/css/counters/counter-increment-002.html:
* fast/css/counters/counter-increment-inherit-expected.txt:
* fast/css/counters/counter-increment-inherit.htm:
* fast/css/counters/counter-increment-overflow.html:
* fast/css/counters/counter-increment-tests-expected.txt:
* fast/css/counters/counter-increment-tests.htm:
* fast/css/counters/counter-reset-000.html:
* fast/css/counters/counter-reset-001.html:
* fast/css/counters/counter-reset-002.html:
* fast/css/counters/counterValueForElementById-expected.txt:
* fast/css/counters/counterValueForElementById.html:
* fast/css/counters/deep-before-expected.txt:
* fast/css/counters/deep-before.html:
* fast/css/counters/invalidate-cached-counter-node.html:
* fast/css/counters/nesting.html:

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

8 years agoSpeech JavaScript API: Make SpeechRecognitionError an Event
hans@chromium.org [Tue, 12 Jun 2012 10:38:39 +0000 (10:38 +0000)]
Speech JavaScript API: Make SpeechRecognitionError an Event
https://bugs.webkit.org/show_bug.cgi?id=88784

Reviewed by Adam Barth.

Source/WebCore:

Make SpeechRecognitionError an Event. The spec was updated to make it
an event in its own right, rather than an attribute of
SpeechRecognitionEvent.

Test: fast/speech/scripted/speechrecognition-errors.html

* Modules/speech/SpeechRecognition.cpp:
(WebCore::SpeechRecognition::didReceiveError):
* Modules/speech/SpeechRecognitionError.cpp:
(WebCore::SpeechRecognitionError::SpeechRecognitionError):
(WebCore::SpeechRecognitionError::interfaceName):
(WebCore):
* Modules/speech/SpeechRecognitionError.h:
(WebCore::SpeechRecognitionError::create):
(SpeechRecognitionError):
* Modules/speech/SpeechRecognitionError.idl:
* Modules/speech/SpeechRecognitionEvent.cpp:
(WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent):
* Modules/speech/SpeechRecognitionEvent.h:
(SpeechRecognitionEventInit):
(SpeechRecognitionEvent):
* Modules/speech/SpeechRecognitionEvent.idl:
* dom/EventNames.in:

Tools:

Make it possible to have MockWebSpeechRecognizer fire error events.

* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::LayoutTestController):
(LayoutTestController::setMockSpeechRecognitionError):
* DumpRenderTree/chromium/LayoutTestController.h:
(LayoutTestController):
* DumpRenderTree/chromium/MockWebSpeechRecognizer.cpp:
(WebKit):
(ErrorTask):
(WebKit::ErrorTask::ErrorTask):
(MockWebSpeechRecognizer::addMockResult):
(MockWebSpeechRecognizer::setError):
* DumpRenderTree/chromium/MockWebSpeechRecognizer.h:
(MockWebSpeechRecognizer):

LayoutTests:

Add a layout test that fires a SpeechRecognitionError.

* fast/speech/scripted/speechrecognition-errors-expected.txt: Added.
* fast/speech/scripted/speechrecognition-errors.html: Added.

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

8 years agoUnreviewed gardening. Skip test failing on GTK bots after r119947.
mario@webkit.org [Tue, 12 Jun 2012 10:13:08 +0000 (10:13 +0000)]
Unreviewed gardening. Skip test failing on GTK bots after r119947.

* platform/gtk/TestExpectations: Skip test.

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

8 years agoREGRESSION(r118098): <content> element does not render distributed children when...
morrita@google.com [Tue, 12 Jun 2012 09:49:54 +0000 (09:49 +0000)]
REGRESSION(r118098): <content> element does not render distributed children when cloned from another document
https://bugs.webkit.org/show_bug.cgi?id=88148

Source/WebCore:

Reviewed by Dimitri Glazkov.

The shadow DOM availability was decided through FrameLoaderClient.
But there are documents which don't have any associated frames, in
which any shadow DOM related elements cannot be constructed.  That
resulsted the regression.

This change introduces a Page-based client called
ContextFeaturesClient which takes the role from FrameLoaderClient
to decide the feature availability, and ContextFeatures which is a
proxy of ContextFeaturesClient.  ContextEnabledFeatures is is
replaced with ContextFeatures.

Each ContextFeatures object is owned by a Page, and is attached to
each Document in the page even if the page itself has no referenct
to Frames or Pages. With ContextFeatures, each Document can decide
the feature availability even if it cannot reach Page or Frame.

On RefCountedSupplement: Document instance can live longer than a
Page where it is shwon. This means that ContextFeatures instance
needs to survive after owner Page destruction because it's
referenced from possibly surviving Documents. RefCountedSupplement
is introduced to cover this scenario: It allows supplement classes
to live after Page's destruction.

RefCountedSupplement::hostDestroyed() is notified when the hosting
page is gone. ContextFeatures clears its reference to the client
using this notification.

Test: fast/dom/shadow/elements-in-frameless-document.html

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateImplementation):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::determineScope):
* dom/ContextFeatures.cpp: Added.
(WebCore):
(WebCore::ContextFeaturesClient::empty):
(WebCore::ContextFeatures::supplementName):
(WebCore::ContextFeatures::defaultSwitch):
(WebCore::ContextFeatures::shadowDOMEnabled):
(WebCore::ContextFeatures::styleScopedEnabled):
(WebCore::ContextFeatures::pagePopupEnabled):
(WebCore::provideContextFeaturesTo):
(WebCore::provideContextFeaturesToDocumentFrom):
* dom/ContextFeatures.h: Added.
(WebCore):
(ContextFeatures):
(WebCore::ContextFeatures::ContextFeatures):
(WebCore::ContextFeatures::hostDestroyed):
(ContextFeaturesClient):
(WebCore::ContextFeaturesClient::~ContextFeaturesClient):
(WebCore::ContextFeaturesClient::isEnabled):
(WebCore::ContextFeatures::create):
(WebCore::ContextFeatures::isEnabled):
* dom/DOMAllInOne.cpp:
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
(WebCore::DOMImplementation::createHTMLDocument):
* dom/Document.h:
(WebCore::Document::contextFeatures):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::setContextFeatures):
* dom/Position.cpp:
(WebCore::Position::Position):
(WebCore::Position::findParent):
* dom/TreeScope.cpp:
(WebCore::TreeScope::getSelection):
* dom/make_names.pl:
(printConstructorInterior):
(printFactoryCppFile):
(printWrapperFunctions):
(printWrapperFactoryCppFile):
* editing/markup.cpp:
(WebCore::createFragmentFromMarkupWithContext):
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::registerWithScopingNode):
(WebCore::HTMLStyleElement::unregisterWithScopingNode):
* html/shadow/HTMLContentElement.cpp:
(WebCore::contentTagName):
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::patchDocument):
* loader/FrameLoaderClient.h:
* platform/RefCountedSupplement.h: Copied from Source/WebCore/platform/Supplementable.h.
(WebCore):
(RefCountedSupplement):
(WebCore::RefCountedSupplement::hostDestroyed):
(Wrapper):
(WebCore::RefCountedSupplement::Wrapper::Wrapper):
(WebCore::RefCountedSupplement::Wrapper::~Wrapper):
(WebCore::RefCountedSupplement::Wrapper::wrapped):
(WebCore::RefCountedSupplement::provideTo):
(WebCore::RefCountedSupplement::from):
* platform/Supplementable.h:
(WebCore::Supplement::isRefCountedWrapper):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::responseXML):

Source/WebKit/chromium:

Reviewed by Dimitri Glazkov.

- Added ContextFeaturesClientImpl which implements WebCore::ContextFeaturesClient.
- Replaced PagePopupFrameLoaderClient with PagePopupFeaturesClient.

* WebKit.gyp:
* public/WebPermissionClient.h:
(WebKit):
(WebKit::WebPermissionClient::allowWebComponents):
* src/ContextFeaturesClientImpl.cpp: Renamed from Source/WebCore/bindings/generic/ContextEnabledFeatures.cpp.
(WebKit):
(WebKit::ContextFeaturesClientImpl::isEnabled):
* src/ContextFeaturesClientImpl.h: Renamed from Source/WebCore/bindings/generic/ContextEnabledFeatures.h.
(WebKit):
(ContextFeaturesClientImpl):
(WebKit::ContextFeaturesClientImpl::ContextFeaturesClientImpl):
(WebKit::ContextFeaturesClientImpl::setPermissionClient):
* src/FrameLoaderClientImpl.cpp:
* src/FrameLoaderClientImpl.h:
(FrameLoaderClientImpl):
* src/WebPagePopupImpl.cpp:
(PagePopupFeaturesClient):
(WebKit::PagePopupFeaturesClient::isEnabled):
(WebKit):
(WebKit::WebPagePopupImpl::initPage):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setPermissionClient):
(WebKit::WebViewImpl::WebViewImpl):
* src/WebViewImpl.h:
(WebKit):

LayoutTests:

Reviewed by Dimitri Glazkov.

* fast/dom/shadow/elements-in-frameless-document-expected.txt: Added.
* fast/dom/shadow/elements-in-frameless-document.html: Added.

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

8 years ago[Chromium] Unreviewed: Rebaseline gradient-after-transparent-border
dominicc@chromium.org [Tue, 12 Jun 2012 09:21:06 +0000 (09:21 +0000)]
[Chromium] Unreviewed: Rebaseline gradient-after-transparent-border

Font antialiasing differences are causing this to fail after
rebaseline in r120043.

* platform/chromium-linux/fast/gradients/gradient-after-transparent-border-expected.png:

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

8 years agoRemove unnecessary functions: setName() and formControlName()
tkent@chromium.org [Tue, 12 Jun 2012 09:10:04 +0000 (09:10 +0000)]
Remove unnecessary functions: setName() and formControlName()
https://bugs.webkit.org/show_bug.cgi?id=88392

Reviewed by Kentaro Hara.

Source/WebCore:

'name' IDL attributes of form-related elements should be [Reflected],
and we don't need to have setName(). We used formControlName() for
name() implementation, and formControlName() is not needed because it
just converts a null attribute to an empty string. Our binding code does it.

We don't remove FormAssociatedElement::name() because many C++ code use it.

FormAssociatedElement::name() is virtual, and HTMLInputElement overrides
it so that it returns a cache of the name attribtue value because
CheckedRadioButtons class needs to know an old name attribute value when
the name attribtue is changed.

References:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#dom-object-name
http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#dom-form-name
http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#dom-fe-name

Test: fast/forms/name-attribute.html

* dom/Element.h: Remove formControlName().
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::name):
Copied from formControlName() implementation of HTMLFormControlElement.
* html/FormAssociatedElement.h:
(FormAssociatedElement): Make name() virtual, remove formControlName().
* html/FormController.cpp:
(WebCore::FormController::formElementsState):
Use name() instead of formControlName().
* html/HTMLFormControlElement.cpp:
Remove formControlName() and setName().
* html/HTMLFormControlElement.h: ditto.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::name): Renamed from formControlName().
* html/HTMLInputElement.h:
(HTMLInputElement): Renamed formControlName() to name(), and make it public.
* html/HTMLKeygenElement.idl: Make 'name' [Reflected].
* html/HTMLObjectElement.cpp: Remove formControlName().
* html/HTMLObjectElement.h: ditto.
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::appendFormData):
Use name() instead of formControlName().
* html/HTMLSelectElement.idl: Make 'name' [Reflected].
* html/HTMLTextAreaElement.idl: Make 'name' [Reflected].

LayoutTests:

* fast/forms/name-attribute-expected.txt: Added.
* fast/forms/name-attribute.html: Added.

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

8 years agoUnreviewed gardening. Skip test crashing on GTK debug bots.
mario@webkit.org [Tue, 12 Jun 2012 08:58:28 +0000 (08:58 +0000)]
Unreviewed gardening. Skip test crashing on GTK debug bots.

* platform/gtk/TestExpectations: Skip test.

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

8 years ago[Chromium] video-media-source-add-and-remove-ids.html needs to be skipped
annacc@chromium.org [Tue, 12 Jun 2012 08:21:27 +0000 (08:21 +0000)]
[Chromium] video-media-source-add-and-remove-ids.html needs to be skipped
until a chromium patch lands that will cause different expectations.

Unreviewed.

* platform/chromium/TestExpectations:

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

8 years ago[Chromium] Unreviewed: Rebaseline gradients tests
dominicc@chromium.org [Tue, 12 Jun 2012 07:46:19 +0000 (07:46 +0000)]
[Chromium] Unreviewed: Rebaseline gradients tests

Rebaseline two gradients tests after r120033 that I missed in
rebaselines in r120043.

* platform/chromium-linux-x86/fast/gradients/css3-radial-gradients2-expected.png: Removed.
* platform/chromium-linux/fast/gradients/css3-radial-gradients2-expected.png:
* platform/chromium-linux/fast/gradients/gradient-after-transparent-border-expected.png:

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

8 years agoProperty names of the built-in object cannot be retrieved
commit-queue@webkit.org [Tue, 12 Jun 2012 07:08:14 +0000 (07:08 +0000)]
Property names of the built-in object cannot be retrieved
after trying to delete one of its properties
https://bugs.webkit.org/show_bug.cgi?id=86461

Patch by Hojong Han <hojong.han@samsung.com> on 2012-06-12
Reviewed by Gavin Barraclough.

Source/JavaScriptCore:

* runtime/JSObject.cpp:
(JSC::getClassPropertyNames):
(JSC::JSObject::getOwnPropertyNames):

LayoutTests:

* fast/js/delete-syntax-expected.txt:
* fast/js/script-tests/delete-syntax.js:

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

8 years agoRemove unused member variables found by clang's -Wunused-private-field
thakis@chromium.org [Tue, 12 Jun 2012 06:24:48 +0000 (06:24 +0000)]
Remove unused member variables found by clang's -Wunused-private-field
https://bugs.webkit.org/show_bug.cgi?id=88812

Reviewed by Anders Carlsson.

Source/WebCore:

Change a few |class|s that were used only to pin down the size of
existing classes to |struct|, so that clang doesn't warn about these
memvars.

No intended behavior change.

* Modules/geolocation/GeolocationController.cpp:
(WebCore::GeolocationController::GeolocationController):
* Modules/geolocation/GeolocationController.h:
(GeolocationController):
* Modules/webaudio/AudioContext.h:
(AudioContext):
* Modules/webaudio/AudioParamTimeline.h:
(AudioParamTimeline):
* accessibility/AccessibilityScrollbar.h:
(AccessibilityScrollbar):
* bindings/v8/ScriptScope.cpp:
(WebCore::ScriptScope::ScriptScope):
* bindings/v8/ScriptScope.h:
(ScriptScope):
* css/CSSValue.cpp:
* css/StylePropertySet.cpp:
* dom/DeviceOrientationController.cpp:
(WebCore::DeviceOrientationController::DeviceOrientationController):
* dom/DeviceOrientationController.h:
(DeviceOrientationController):
* editing/ReplaceSelectionCommand.cpp:
(ReplacementFragment):
(WebCore::ReplacementFragment::ReplacementFragment):
* editing/TextIterator.cpp:
(WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
* editing/TextIterator.h:
(SimplifiedBackwardsTextIterator):
(BackwardsCharacterIterator):
* html/HTMLFormCollection.cpp:
(WebCore::HTMLFormCollection::HTMLFormCollection):
* html/HTMLFormCollection.h:
(HTMLFormCollection):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement):
* html/shadow/MediaControlElements.h:
(MediaControlFullscreenButtonElement):
* html/shadow/MediaControlRootElementChromium.cpp:
(WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
* html/shadow/MediaControlRootElementChromium.h:
(MediaControlRootElementChromium):
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::LoadableTextTrack):
* html/track/LoadableTextTrack.h:
(LoadableTextTrack):
* inspector/CodeGeneratorInspector.py:
(Generator.go):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::InspectorCSSAgent):
* inspector/InspectorCSSAgent.h:
(InspectorCSSAgent):
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
* inspector/InspectorDOMDebuggerAgent.h:
(InspectorDOMDebuggerAgent):
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
* inspector/InspectorMemoryAgent.h:
(InspectorMemoryAgent):
* notifications/NotificationController.cpp:
(WebCore::NotificationController::NotificationController):
* notifications/NotificationController.h:
(NotificationController):
* page/animation/CompositeAnimation.h:
(WebCore::CompositeAnimation::CompositeAnimation):
(CompositeAnimation):
* platform/Length.cpp:
* platform/audio/ReverbConvolver.cpp:
(WebCore::ReverbConvolver::ReverbConvolver):
* platform/audio/ReverbConvolver.h:
(ReverbConvolver):
* platform/audio/ReverbConvolverStage.cpp:
(WebCore::ReverbConvolverStage::ReverbConvolverStage):
* platform/audio/ReverbConvolverStage.h:
(ReverbConvolverStage):
* platform/graphics/TextRun.cpp:
(ExpectedTextRunSize):
* platform/graphics/chromium/cc/CCThreadProxy.h:
(CCThreadProxy):
* platform/graphics/filters/FECustomFilter.cpp:
(WebCore::FECustomFilter::FECustomFilter):
* platform/graphics/filters/FECustomFilter.h:
(FECustomFilter):
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(JPEGImageReader):
* platform/leveldb/LevelDBTransaction.cpp:
(WebCore::LevelDBTransaction::TreeIterator::next):
* platform/text/TextCodecICU.cpp:
(WebCore::TextCodecICU::TextCodecICU):
* platform/text/TextCodecICU.h:
(TextCodecICU):
* rendering/InlineBox.cpp:
* rendering/InlineFlowBox.cpp:
* rendering/RenderText.cpp:
* rendering/style/KeyframeList.h:
(WebCore::KeyframeList::KeyframeList):
(KeyframeList):
* rendering/svg/RenderSVGTextPath.cpp:
(WebCore::RenderSVGTextPath::RenderSVGTextPath):
* rendering/svg/RenderSVGTextPath.h:
* rendering/svg/SVGInlineTextBox.cpp:
* svg/SVGPathByteStreamSource.cpp:
* svg/SVGPathByteStreamSource.h:
* svg/SVGPathTraversalStateBuilder.cpp:
(WebCore::SVGPathTraversalStateBuilder::SVGPathTraversalStateBuilder):
* svg/SVGPathTraversalStateBuilder.h:
(SVGPathTraversalStateBuilder):
* xml/XSLStyleSheet.h:

Source/WebKit/chromium:

* src/AudioDestinationChromium.cpp:
(WebCore::AudioDestinationChromium::AudioDestinationChromium):
* src/AudioDestinationChromium.h:
(AudioDestinationChromium):
* src/InspectorFrontendClientImpl.cpp:
(WebKit::InspectorFrontendClientImpl::InspectorFrontendClientImpl):
* src/InspectorFrontendClientImpl.h:
(InspectorFrontendClientImpl):
* src/WebFrameImpl.cpp:
(ChromePluginPrintContext):
* src/WebInputEvent.cpp:
* src/WorkerAsyncFileSystemChromium.cpp:
(WebCore::WorkerAsyncFileSystemChromium::createWorkerFileSystemCallbacksBridge):
* src/WorkerAsyncFileWriterChromium.cpp:
(WebCore::WorkerAsyncFileWriterChromium::WorkerAsyncFileWriterChromium):
* src/WorkerAsyncFileWriterChromium.h:
(WorkerAsyncFileWriterChromium):
* tests/CCLayerTreeHostTest.cpp:
(WTF::CCLayerTreeHostTestSetVisible::CCLayerTreeHostTestSetVisible):
(CCLayerTreeHostTestSetVisible):

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

8 years ago[Chromium] Unreviewed: Rebaseline gradients tests
dominicc@chromium.org [Tue, 12 Jun 2012 06:22:49 +0000 (06:22 +0000)]
[Chromium] Unreviewed: Rebaseline gradients tests

r120033 added IMAGE failures for bunch of gradient tests that will
need rebaselining as a result of that change. This is that
rebaseline.

(File list elided because it is too long.)

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

8 years agoXHR returns size==0 Blob
kinuko@chromium.org [Tue, 12 Jun 2012 06:17:27 +0000 (06:17 +0000)]
XHR returns size==0 Blob
https://bugs.webkit.org/show_bug.cgi?id=88750

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Response Blob's .size field must have the correct response size.

Test: http/tests/xmlhttprequest/response-blob-size.html

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::responseBlob):

LayoutTests:

* http/tests/xmlhttprequest/response-blob-size-expected.txt: Added.
* http/tests/xmlhttprequest/response-blob-size.html: Added.

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

8 years ago[CMAKE][WK2] Make WebProcess target name more clear.
ryuan.choi@samsung.com [Tue, 12 Jun 2012 06:03:08 +0000 (06:03 +0000)]
[CMAKE][WK2] Make WebProcess target name more clear.
https://bugs.webkit.org/show_bug.cgi?id=88767

Reviewed by Ryosuke Niwa.

* CMakeLists.txt: Change WebProcess_NAME to WebProcess_EXECUTABLE_NAME.

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

8 years agoIntroduce an Enclosure Element for Chromium video controls.
commit-queue@webkit.org [Tue, 12 Jun 2012 05:40:04 +0000 (05:40 +0000)]
Introduce an Enclosure Element for Chromium video controls.
https://bugs.webkit.org/show_bug.cgi?id=87683

Patch by Silvia Pfeiffer <silviapf@chromium.org> on 2012-06-11
Reviewed by Eric Carlson.

Source/WebCore:

Updated tests.

The Chrome video controls are receiving a visual update. A new enclosure div is required
to provide for a offset space from the video's boundaries. The visual update itself is in
a separate patch.

* css/mediaControlsChromium.css:
(video::-webkit-media-controls-enclosure):
Introduce CSS for enclosure div so it doesn't show yet.
* html/shadow/MediaControlRootElementChromium.cpp:
(WebCore::MediaControlChromiumEnclosureElement::MediaControlChromiumEnclosureElement):
Definition of the new enclosure element.
(WebCore::MediaControlChromiumEnclosureElement::create):
Definition of a create operator for the new enclosure element.
(WebCore::MediaControlChromiumEnclosureElement::shadowPseudoId):
Definition of the shadowPseudoId of -webkit-media-controls-enclosure for the enclosure div.
(WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
Initialize member element for enclosure div.
(WebCore::MediaControlRootElementChromium::create):
Instantiate enclosure div and add into DOM between controls and panel elements.
(WebCore::MediaControlRootElementChromium::setMediaController):
Set media controller for enclosure div.
(WebCore::MediaControlRootElementChromium::createTextTrackDisplay):
Insert text track display container to enclosure rather than panel.
* html/shadow/MediaControlRootElementChromium.h:
(WebCore):
(MediaControlChromiumEnclosureElement):
(WebCore::MediaControlChromiumEnclosureElement::setMediaController):
(WebCore::MediaControlChromiumEnclosureElement::mediaController):
(WebCore::MediaControlChromiumEnclosureElement::isMediaControlElement):
Add declaration of the new enclosure element and its member functions.
(MediaControlRootElementChromium):
Add member variable to controls root element to hold the enclosure element.

LayoutTests:

Change fullscreen/video-controls-override.html, media/media-controls-invalid-url.html and
media/track/track-cue-rendering-snap-to-lines-not-set.html to deal with the new enclosure
div in Chromium controls and use the mediaControlsElement() helper function to find elements
inside the controls.
Fail video controls tests in test expectations.

* fullscreen/video-controls-override-expected.txt: Updated.
* fullscreen/video-controls-override.html: Use mediaControlsElement helper function.
* media/media-controls-invalid-url.html: Use mediaControlsElement helper function.
* media/track/track-cue-rendering-snap-to-lines-not-set.html: Height is provided by enclosure element.
* platform/chromium/TestExpectations: Fail video controls tests.

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

8 years agoDon't show the ASAN builders in garden-o-matic since they don't get block WebKit...
ojan@chromium.org [Tue, 12 Jun 2012 05:32:29 +0000 (05:32 +0000)]
Don't show the ASAN builders in garden-o-matic since they don't get block WebKit rolls.
https://bugs.webkit.org/show_bug.cgi?id=88836

Reviewed by Dirk Pranke.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders_unittests.js:

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

8 years ago[Chromium] Unreviewed: Expectations for track-cues-cuechange.html
dominicc@chromium.org [Tue, 12 Jun 2012 04:23:34 +0000 (04:23 +0000)]
[Chromium] Unreviewed: Expectations for track-cues-cuechange.html
https://bugs.webkit.org/show_bug.cgi?id=88833

media/track/track-cues-cuechange.html is timing out flakily like
some other media tests noted in bug 88833.

* platform/chromium/TestExpectations:

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

8 years agoWebKit doesn't allow replacing the document element with a DocumentFragment containin...
commit-queue@webkit.org [Tue, 12 Jun 2012 04:10:42 +0000 (04:10 +0000)]
WebKit doesn't allow replacing the document element with a DocumentFragment containing one element
https://bugs.webkit.org/show_bug.cgi?id=88681

Patch by Elliott Sprehn <esprehn@gmail.com> on 2012-06-11
Reviewed by Ojan Vafai.

Source/WebCore:

Fix bug where replacing an immediate child of a Document with a DocumentFragment
would throw a HIERARCHY_REQUEST_ERR instead of replacing the node as required by DOM4.
http://www.w3.org/TR/domcore/#mutation-algorithms

* dom/Document.cpp:
(WebCore::Document::canReplaceChild):
    When the newChild was a DocumentFragment we incorrectly
    iterated over the document's children twice instead of the
    fragment when counting the total number of elements and
    doctypes to enfoce that there's only one of each.

LayoutTests:

Re-enables a bunch of disabled tests that are long since fixed and rewrites
the tests to use a more modern js-test-pre.js style.
https://bugs.webkit.org/show_bug.cgi?id=12751

* fast/dom/Document/replace-child-expected.txt:
* fast/dom/Document/replace-child.html:

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

8 years ago[BlackBerry] Add handling of notifyDataReceived in NetworkJob even there's no data...
mary.wu@torchmobile.com.cn [Tue, 12 Jun 2012 03:46:36 +0000 (03:46 +0000)]
[BlackBerry] Add handling of notifyDataReceived in NetworkJob even there's no data inside
https://bugs.webkit.org/show_bug.cgi?id=88773

Reviewed by Rob Buis.

Handling notifyDataReceived event even if there is no data inside.
This event was critical because it gives downloadFilterStream a chance
to follow up NetworkStream close event, and it also make pluginView in
FrameLoaderBlackBerry return normal logic.

RIM PR# 164563

Reviewed internally by Leo Yang.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::handleNotifyDataReceived):

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

8 years ago[BlackBerry] Wrong mimetype for empty file link
mary.wu@torchmobile.com.cn [Tue, 12 Jun 2012 03:44:38 +0000 (03:44 +0000)]
[BlackBerry] Wrong mimetype for empty file link
https://bugs.webkit.org/show_bug.cgi?id=88642

Reviewed by Rob Buis.

RIM PR# 164164

For empty file link, we shouldn't give "application/octet-stream"
which will lead to download.

Reviewed internally by Charles Wei.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::sendResponseIfNeeded):

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

8 years ago[Chromium] Unreviewed: Update test expectations with bugs for media test timeouts
dominicc@chromium.org [Tue, 12 Jun 2012 03:21:24 +0000 (03:21 +0000)]
[Chromium] Unreviewed: Update test expectations with bugs for media test timeouts

* platform/chromium/TestExpectations:

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

8 years agoGeneratorGeneratedImage should cache images for the non-tiled case
commit-queue@webkit.org [Tue, 12 Jun 2012 03:04:38 +0000 (03:04 +0000)]
GeneratorGeneratedImage should cache images for the non-tiled case
https://bugs.webkit.org/show_bug.cgi?id=87094

Patch by Jin Yang <jin.a.yang@intel.com> on 2012-06-11
Reviewed by Simon Fraser.

Source/WebCore:

We cache the generated image if generator is not changed. By compared
with generating image on the fly, it will lose a little pixel precision
and several layout tests should be rebaselined. With this patch, the IE test
drive benchmark "Bayou" can gain about 50%.

No new tests. Performance optimization.

* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::draw):

LayoutTests:

Update expectations: added failures for baselines to come.

* platform/chromium/TestExpectations:

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

8 years ago[EFL] Remove CMakeCache.txt before building
commit-queue@webkit.org [Tue, 12 Jun 2012 03:04:28 +0000 (03:04 +0000)]
[EFL] Remove CMakeCache.txt before building
https://bugs.webkit.org/show_bug.cgi?id=88717

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

Remove CMake cache file before every build to avoid using outdated
build flags when new features get enabled. This will avoid unexpected
failures on the bots due to outdated build flags.

* Scripts/webkitdirs.pm:
(generateBuildSystemFromCMakeProject):

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

8 years agoAdd new Pointer Lock spec attribute webkitPointerLockElement.
scheib@chromium.org [Tue, 12 Jun 2012 03:02:16 +0000 (03:02 +0000)]
Add new Pointer Lock spec attribute webkitPointerLockElement.
https://bugs.webkit.org/show_bug.cgi?id=88799

Source/WebCore:

Reviewed by Dimitri Glazkov.

Part of a series of refactoring changes to update pointer lock API to
the fullscreen locking style. https://bugs.webkit.org/show_bug.cgi?id=84402

New attribute webkitPointerLockElement added. Follow up patches
will remove the previous isLocked attribute. Tests updated to use
the new attribute.

* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::webkitPointerLockElementEnabled):
* dom/Document.cpp:
(WebCore):
(WebCore::Document::webkitPointerLockElement):
* dom/Document.h:
(Document):
* dom/Document.idl:
* page/PointerLockController.h:
(WebCore::PointerLockController::element):

Tools:

Reviewed by Dimitri Glazkov.

Part of a series of refactoring changes to update pointer lock API to
the fullscreen locking style. https://bugs.webkit.org/show_bug.cgi?id=84402

New attribute webkitPointerLockElement added. Follow up patches
will remove the previous isLocked attribute. Tests updated to use
the new attribute.

WebViewHost logic required modification to correctly repond to
a lock, unlock, pointerLockElement call series. Specifically,
unlocking must be queued after a lock command is issued always
as the lock state may not be set yet with a lock request in flight.

* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::requestPointerUnlock): Always post didLosePointerLock task.
(WebViewHost::didLosePointerLock): Signal didLosePointerLock only if pointer was locked.

LayoutTests:

Part of a series of refactoring changes to update pointer lock API to
the fullscreen locking style. https://bugs.webkit.org/show_bug.cgi?id=84402

New attribute webkitPointerLockElement added. Follow up patches
will remove the previous isLocked attribute. Tests updated to use
the new attribute.

Reviewed by Dimitri Glazkov.

* pointer-lock/lock-already-locked-expected.txt:
* pointer-lock/lock-already-locked.html:
* pointer-lock/pointer-lock-api-expected.txt:
* pointer-lock/pointer-lock-api.html:
* pointer-lock/pointerlocklost-event-expected.txt:
* pointer-lock/pointerlocklost-event.html:

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

8 years agoConsolidate Pointer Lock runtime enabled flags to just one.
scheib@chromium.org [Tue, 12 Jun 2012 02:51:59 +0000 (02:51 +0000)]
Consolidate Pointer Lock runtime enabled flags to just one.
https://bugs.webkit.org/show_bug.cgi?id=88810

Reviewed by Dimitri Glazkov.

Source/WebCore:

No new tests.

* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::pointerLockEnabled):
(WebCore::RuntimeEnabledFeatures::setPointerLockEnabled):
* dom/MouseEvent.idl:
* page/Navigator.idl:

Source/WebKit/chromium:

* src/WebRuntimeFeatures.cpp:
(WebKit::WebRuntimeFeatures::enablePointerLock):
(WebKit::WebRuntimeFeatures::isPointerLockEnabled):

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

8 years ago[CSS3 Backgrounds and Borders] Protect box-decoration-break behind a feature flag.
alexis.menard@openbossa.org [Tue, 12 Jun 2012 02:21:42 +0000 (02:21 +0000)]
[CSS3 Backgrounds and Borders] Protect box-decoration-break behind a feature flag.
https://bugs.webkit.org/show_bug.cgi?id=88804

Reviewed by Tony Chang.

Protect box-decoration-break behind a feature flag enabled by default.

.:

* configure.ac:

Source/WebCore:

No new tests : no behavior change here.

* Configurations/FeatureDefines.xcconfig:
* GNUmakefile.am:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSValueKeywords.in:
* css/StyleBuilder.cpp:
(WebCore::StyleBuilder::StyleBuilder):
* rendering/style/RenderStyle.h:
* rendering/style/StyleBoxData.cpp:
(WebCore::StyleBoxData::StyleBoxData):
(WebCore::StyleBoxData::operator==):
* rendering/style/StyleBoxData.h:
(StyleBoxData):

Source/WebKit/chromium:

* features.gypi:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Tools:

* Scripts/webkitperl/FeatureList.pm:
* qmake/mkspecs/features/features.pri:

WebKitLibraries:

* win/tools/vsprops/FeatureDefines.vsprops:
* win/tools/vsprops/FeatureDefinesCairo.vsprops:

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

8 years ago[Chromium] Unreviewed: http/tests/xmlhttprequest/origin-exact-matching.html is timing...
dominicc@chromium.org [Tue, 12 Jun 2012 02:05:52 +0000 (02:05 +0000)]
[Chromium] Unreviewed: http/tests/xmlhttprequest/origin-exact-matching.html is timing out on XP about half the time

* platform/chromium/TestExpectations:

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

8 years agoUnreviewed expected result update after r120017.
jchaffraix@webkit.org [Tue, 12 Jun 2012 01:48:57 +0000 (01:48 +0000)]
Unreviewed expected result update after r120017.

* platform/gtk/fast/block/basic/fieldset-stretch-to-legend-expected.txt:
Rebaselined gtk.

* platform/efl/Skipped:
* platform/qt/Skipped:
Skipped the test with some explanation on those platforms as I couldn't get
the new baseline.

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

8 years agoUpdated expected results for this test after r120017.
mitz@apple.com [Tue, 12 Jun 2012 01:42:34 +0000 (01:42 +0000)]
Updated expected results for this test after r120017.

* platform/mac/fast/block/basic/fieldset-stretch-to-legend-expected.png:
* platform/mac/fast/block/basic/fieldset-stretch-to-legend-expected.txt:

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

8 years agoAdded http/tests/security/mixedContent/blob-url-in-iframe.html back to the Mac skip...
mitz@apple.com [Tue, 12 Jun 2012 01:12:20 +0000 (01:12 +0000)]
Added http/tests/security/mixedContent/blob-url-in-iframe.html back to the Mac skip list, as
it is still failing intermittently. <http://webkit.org/b/88736> will track this.

* platform/mac/Skipped:

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

8 years ago[CMAKE][EFL] Remove duplicated executable output path
gyuyoung.kim@samsung.com [Tue, 12 Jun 2012 00:58:24 +0000 (00:58 +0000)]
[CMAKE][EFL] Remove duplicated executable output path
https://bugs.webkit.org/show_bug.cgi?id=88765

Reviewed by Daniel Bates.

CMake files for EFL port have redefined executable output path. However, EFL port doesn't
need to define again because it is already defined in top-level CMake file.

Source/JavaScriptCore:

* shell/CMakeLists.txt:

Source/WebKit2:

* CMakeLists.txt:

Tools:

* DumpRenderTree/efl/CMakeLists.txt:
* EWebLauncher/CMakeLists.txt:

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

8 years ago[chromium] Port DrawingBufferChromium from TextureLayerChromium over to WebExternalTe...
jamesr@google.com [Tue, 12 Jun 2012 00:39:18 +0000 (00:39 +0000)]
[chromium] Port DrawingBufferChromium from TextureLayerChromium over to WebExternalTextureLayer
https://bugs.webkit.org/show_bug.cgi?id=86273

Reviewed by Adrienne Walker.

Source/Platform:

* Platform.gypi:
* chromium/public/WebExternalTextureLayer.h:
(WebKit):
(WebExternalTextureLayer):
* chromium/public/WebExternalTextureLayerClient.h: Copied from Source/WebKit/chromium/src/WebExternalTextureLayer.cpp.
(WebKit):
(WebTextureUpdater):
(WebKit::WebTextureUpdater::~WebTextureUpdater):
(WebExternalTextureLayerClient):
(WebKit::WebExternalTextureLayerClient::~WebExternalTextureLayerClient):

Source/WebCore:

This converts more WebCore code over to using public APIs instead of internal compositor layer types.

Refactor only, no change in behavior thus no new tests.

* platform/graphics/chromium/DrawingBufferChromium.cpp:
(WebCore::DrawingBufferPrivate::DrawingBufferPrivate):
(WebCore::DrawingBufferPrivate::~DrawingBufferPrivate):
(WebCore::DrawingBufferPrivate::layer):
(DrawingBufferPrivate):
* platform/graphics/chromium/TextureLayerChromium.cpp:
(WebCore::TextureLayerChromium::~TextureLayerChromium):
(WebCore::TextureLayerChromium::setRateLimitContext):
(WebCore::TextureLayerChromium::setNeedsDisplayRect):
(WebCore::TextureLayerChromium::update):
* platform/graphics/chromium/TextureLayerChromium.h:
(WebKit):
(TextureLayerChromiumClient):

Source/WebKit/chromium:

* src/WebExternalTextureLayer.cpp:
(WebTextureUpdaterImpl):
(WebKit::WebTextureUpdaterImpl::WebTextureUpdaterImpl):
(WebKit):
(WebExternalTextureLayerImpl):
(WebKit::WebExternalTextureLayerImpl::WebExternalTextureLayerImpl):
(WebKit::WebExternalTextureLayer::create):
(WebKit::WebExternalTextureLayer::clearClient):
(WebKit::WebExternalTextureLayer::setOpaque):
(WebKit::WebExternalTextureLayer::setPremultipliedAlpha):

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

8 years ago[BlackBerry] Autofill feature implementation for BlackBerry porting
commit-queue@webkit.org [Tue, 12 Jun 2012 00:32:10 +0000 (00:32 +0000)]
[BlackBerry] Autofill feature implementation for BlackBerry porting
https://bugs.webkit.org/show_bug.cgi?id=85577

Patch by Jonathan Dong <jonathan.dong@torchmobile.com.cn> on 2012-06-11
Reviewed by Rob Buis.

Remove the autofill saving procedure out of dispatchWillSubmitForm, this procedure
is same as the procedure in dispatchWillSendSubmitEvent.
Some sites will redirect to other url in its login process, which will cause the
user get notified to save credentials for this provisional redirecting url if we
put this saving procedure in dispatchWillSubmitForm. So we should remove it to make
sure we only save the autofill data before the submit event is fired.

* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::dispatchWillSubmitForm):

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

8 years agoPass the right color space over to the web process so we can set it on our CA context
andersca@apple.com [Tue, 12 Jun 2012 00:29:34 +0000 (00:29 +0000)]
Pass the right color space over to the web process so we can set it on our CA context
https://bugs.webkit.org/show_bug.cgi?id=88819
<rdar://problem/11629050>

Reviewed by John Sullivan.

Source/WebKit2:

* Platform/mac/LayerHostingContext.h:
(LayerHostingContext):
* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::createForPort):
(WebKit::LayerHostingContext::createForWindowServer):
Use a single constructor and explicitly set up the parameters of the constructed object.

(WebKit::LayerHostingContext::setColorSpace):
(WebKit::LayerHostingContext::colorSpace):
Add getter and setter.

* Scripts/webkit2/messages.py:
(struct_or_class):
WebKit::ColorSpaceData is a struct.

* Shared/WebPageCreationParameters.cpp:
Encode and decode the color space parameter.

* Shared/WebPageCreationParameters.h:
Add the color space.

* Shared/mac/ColorSpaceData.h: Added.
* Shared/mac/ColorSpaceData.mm: Added.
Add a new class that represents a color space that can be sent over the wire.

* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::colorSpace):
Call through to the WKView.

* UIProcess/API/mac/WKView.mm:
(-[WKView _windowDidChangeBackingProperties:]):
Fix whitespace.

(-[WKView viewDidChangeBackingProperties]):
Check if our new color space is different from the current one and null the current one out if that is the case,
it will be reinitialized by the next call to -[WKView _colorSpace].

(-[WKView _colorSpace:]):
Compute the color space. If we're not in a window we'll get the main screen's color space.

* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::colorSpaceDidChange):
Add empty stub.

* UIProcess/PageClient.h:
Add colorSpace getter.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
Initialize the color space.

* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::colorSpaceDidChange):
Send the new color space over to the web process.

* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::colorSpace):
Call through to the page client.

* WebKit2.xcodeproj/project.pbxproj:
Add ColorSpaceData.h and ColorSpaceData.mm.

* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingArea.messages.in:
Add SetColorSpace message.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
Set the color space from the creation parameters.

(WebKit::TiledCoreAnimationDrawingArea::setColorSpace):
Set the color space on the layer hosting context.

(WebKit::TiledCoreAnimationDrawingArea::updateLayerHostingContext):
Make sure we apply the color space from the previous layer hosting context if one exists.

WebKitLibraries:

Add WKCAContextSetColorSpace and WKCAContextGetColorSpace.

* WebKitSystemInterface.h:
* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceSnowLeopard.a:

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

8 years ago[BlackBerry] Seek calls are being unnecessarily delayed
commit-queue@webkit.org [Tue, 12 Jun 2012 00:02:08 +0000 (00:02 +0000)]
[BlackBerry] Seek calls are being unnecessarily delayed
https://bugs.webkit.org/show_bug.cgi?id=88732

Patch by Max Feil <mfeil@rim.com> on 2012-06-11
Reviewed by Antonio Gomes.

There is a problem with the way the m_userDrivenSeekTimer is
implemented. When MediaPlayerPrivate::seek() is called, there
is always a 100ms delay even if the timer is not running. The
timer is supposed to space out (i.e. throttle) repeated seeks
that come in too soon after a previous seek, but currently it
is slowing down even single seeks and seeks that come in with
adequate delay after a previous seek. I fixed this in my patch
by improving the way the timer fired function is called.

A note on the new m_lastSeekTimePending flag: This flag is
needed so that userDrivenSeekTimerFired() knows whether or not
to perform the seek. The only case where this flag will not be
set is if no MediaPlayerPrivate::seek() call came in while the
timer was active, in which case it's important to do nothing.
I could encode this flag's information into the m_lastSeekTime
float, for example by initializing it and resetting it to NAN
and using isnan(). But I feel that using a separate bool is a
more portable approach.

No new tests. I would like to propose not including a layout test
with this fix. Doing timing tests for 100ms delays is tricky
from Javascript, and I don't think the benefit of such a test
outweighs the extra time it would take to develop one. The test
would also be a problem to maintain as it may give different
results over different runs and across different target hardware.

* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
(WebCore::MediaPlayerPrivate::seek):
(WebCore::MediaPlayerPrivate::userDrivenSeekTimerFired):
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
(MediaPlayerPrivate):

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

8 years agoDon't consider show warnings in the garden-o-matic UI for non-layout test failures
ojan@chromium.org [Mon, 11 Jun 2012 23:48:11 +0000 (23:48 +0000)]
Don't consider show warnings in the garden-o-matic UI for non-layout test failures
https://bugs.webkit.org/show_bug.cgi?id=88816

Reviewed by Dirk Pranke.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js:
Expose a way to clear AsynchronousCaches.
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders_unittests.js:
Clear the buildInfo cache at the beginning of each test in order to avoid having one test affect another.

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

8 years ago[BlackBerry] Unexpected repeats of short media
commit-queue@webkit.org [Mon, 11 Jun 2012 23:18:15 +0000 (23:18 +0000)]
[BlackBerry] Unexpected repeats of short media
https://bugs.webkit.org/show_bug.cgi?id=88733

Patch by Max Feil <mfeil@rim.com> on 2012-06-11
Reviewed by Antonio Gomes.

Source/WebCore:

The m_userDrivenSeekTimer is causing unwanted repeats of short
media such as sound effects because it is causing the current
time to not reflect that the media has finished playing.
This problem only affects media whose duration is close to
or less than the SeekSubmissionDelay, which is currently
set to 100ms. My fix is to ignore the userDrivenSeekTimer in
MediaPlayerPrivate::currentTime() if the duration of the media
is within twice the SeekSubmissionDelay. Seek drag smoothness
is a non-issue for such short media.

Test: platform/blackberry/media/short-media-repeats-correctly.html

* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
(WebCore):
(WebCore::MediaPlayerPrivate::currentTime):
(WebCore::MediaPlayerPrivate::seek):
(WebCore::MediaPlayerPrivate::userDrivenSeekTimerFired):
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
(MediaPlayerPrivate):

LayoutTests:

Test for problem where short media repeats unintentionally.

* media/content/short.wav: Added.
* platform/blackberry/media/short-media-repeats-correctly-expected.txt: Added.
* platform/blackberry/media/short-media-repeats-correctly.html: Added.

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

8 years agoAccount for margin after when laying out <legend> element
jchaffraix@webkit.org [Mon, 11 Jun 2012 23:14:38 +0000 (23:14 +0000)]
Account for margin after when laying out <legend> element
https://bugs.webkit.org/show_bug.cgi?id=35981

Reviewed by Abhishek Arya.

Source/WebCore:

Tests: fast/forms/legend-after-margin-horizontal-writing-mode.html
       fast/forms/legend-after-margin-vertical-writing-mode.html
       fast/forms/legend-after-margin-with-before-border-horizontal-mode.html
       fast/forms/legend-small-after-margin-before-border-horizontal-mode.html

The existing code would ignore margin after when layouting out the <legend>. This
change only adds the code to handle the margin after, the margin before is still
ignored as it's not obvious how it should be working.

* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::layoutSpecialExcludedChild):
Split the code in 2 code paths to reflect how we position and size. Those are covered by the
tests above.

LayoutTests:

* fast/forms/legend-after-margin-horizontal-writing-mode-expected.html: Added.
* fast/forms/legend-after-margin-horizontal-writing-mode.html: Added.
* fast/forms/legend-after-margin-vertical-writing-mode-expected.html: Added.
* fast/forms/legend-after-margin-vertical-writing-mode.html: Added.
* fast/forms/legend-after-margin-with-before-border-horizontal-mode-expected.html: Added.
* fast/forms/legend-after-margin-with-before-border-horizontal-mode.html: Added.
* fast/forms/legend-small-after-margin-before-border-horizontal-mode-expected.html: Added.
* fast/forms/legend-small-after-margin-before-border-horizontal-mode.html: Added.

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

8 years ago[chromium] Use WebGraphicsContext3D in rate limiting logic inside compositor
jamesr@google.com [Mon, 11 Jun 2012 23:12:28 +0000 (23:12 +0000)]
[chromium] Use WebGraphicsContext3D in rate limiting logic inside compositor
https://bugs.webkit.org/show_bug.cgi?id=86259

Reviewed by Adrienne Walker.

This refactors the compositor's rate limiting implementation to use the Platform API's WebGraphicsContext3D
directly instead of WebCore::GraphicsContext3D to cut down on the number of spurious WebCore dependencies in the
compositor.  The one change in contract is that the caller to CCLayerTreeHost::startRateLimit() now has to call
CCLayerTreeHost::stopRateLimit() before allowing the referenced context to go away since CCLayerTreeHost no
longer retains a reference, but this was always happening already.

* platform/graphics/chromium/Canvas2DLayerChromium.cpp:
(WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium):
(WebCore::Canvas2DLayerChromium::setNeedsDisplayRect):
* platform/graphics/chromium/RateLimiter.cpp:
(WebCore::RateLimiter::create):
(WebCore::RateLimiter::RateLimiter):
(WebCore::RateLimiter::start):
(WebCore::RateLimiter::rateLimitContext):
* platform/graphics/chromium/RateLimiter.h:
(WebKit):
(RateLimiter):
* platform/graphics/chromium/TextureLayerChromium.cpp:
(WebCore::TextureLayerChromium::~TextureLayerChromium):
(WebCore::TextureLayerChromium::setRateLimitContext):
(WebCore::TextureLayerChromium::setNeedsDisplayRect):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::startRateLimiter):
(WebCore::CCLayerTreeHost::stopRateLimiter):
(WebCore::CCLayerTreeHost::rateLimit):
(WebCore):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(CCLayerTreeHost):

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

8 years ago[chromium] Separate CCVideoDrawQuad and from the layer tree and video provider by...
danakj@chromium.org [Mon, 11 Jun 2012 22:58:16 +0000 (22:58 +0000)]
[chromium] Separate CCVideoDrawQuad and from the layer tree and video provider by removing ManagedTexture and WebVideoFrame pointers from the quad
https://bugs.webkit.org/show_bug.cgi?id=88363

Reviewed by Adrienne Walker.

Source/Platform:

* Platform.gypi:
* chromium/public/WebVideoFrame.h:
* chromium/src/WebVideoFrame.cpp: Removed.

Source/WebCore:

CCVideoDrawQuad should not contain any pointers to data in the layer
tree so we are able to serialize it across process boundaries. This
patch removes the ManagedTexture pointers from the quad class,
replacing them with texture ids. It removes the WebVideoFrame* from
the quad, replacing it with the frame provider's texture id included
in the WebVideoFrame structure. And it uses a WebTransformationMatrix
instead of a pointer to an array of floats.

Texture allocation is done in CCVideoLayerImpl via the
contentsTextureAllocator, so that the memory usage can be tracked.

We move the copyPlaneToTextures() method back from LayerRendererChromium
to CCVideoLayerImpl, as this method uses the texture data pointer in the
WebVideoFrame, and we do not want to give this pointer to the quad
class. Instead, this method makes use of the LayerTextureSubImage class
to copy the pixel data into the texture.

LayerTextureSubImage is updated to allow non-4byte texture formats.

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawYUV):
(WebCore::LayerRendererChromium::drawRGBA):
(WebCore::LayerRendererChromium::drawNativeTexture2D):
(WebCore::LayerRendererChromium::drawStreamTexture):
(WebCore::LayerRendererChromium::drawVideoQuad):
* platform/graphics/chromium/LayerTextureSubImage.cpp:
(WebCore::LayerTextureSubImage::uploadWithTexSubImage):
(WebCore::LayerTextureSubImage::uploadWithMapTexSubImage):
* platform/graphics/chromium/TextureCopier.cpp:
* platform/graphics/chromium/cc/CCVideoDrawQuad.cpp:
(WebCore::CCVideoDrawQuad::create):
(WebCore::CCVideoDrawQuad::CCVideoDrawQuad):
* platform/graphics/chromium/cc/CCVideoDrawQuad.h:
(CCVideoDrawQuad):
(WebCore::CCVideoDrawQuad::planes):
(WebCore::CCVideoDrawQuad::frameProviderTextureId):
* platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
(WebCore::CCVideoLayerImpl::~CCVideoLayerImpl):
(WebCore::CCVideoLayerImpl::willDraw):
(WebCore::CCVideoLayerImpl::willDrawInternal):
(WebCore::CCVideoLayerImpl::appendQuads):
(WebCore::CCVideoLayerImpl::didDraw):
(WebCore::CCVideoLayerImpl::FramePlane::allocateData):
(WebCore):
(WebCore::CCVideoLayerImpl::FramePlane::freeData):
(WebCore::CCVideoLayerImpl::allocatePlaneData):
(WebCore::CCVideoLayerImpl::copyPlaneData):
(WebCore::CCVideoLayerImpl::freePlaneData):
(WebCore::CCVideoLayerImpl::freeUnusedPlaneData):
(WebCore::CCVideoLayerImpl::didLoseContext):
* platform/graphics/chromium/cc/CCVideoLayerImpl.h:
(FramePlane):
(WebCore::CCVideoLayerImpl::FramePlane::FramePlane):

Source/WebKit/chromium:

* tests/CCLayerTreeHostImplTest.cpp:
* tests/CCTiledLayerTestCommon.h:
(WebKitTests::FakeTextureCopier::copyToTexture):
* tests/Canvas2DLayerChromiumTest.cpp:

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

8 years agoIndexedDB: Object stores are not successfully deleted
jsbell@chromium.org [Mon, 11 Jun 2012 22:41:55 +0000 (22:41 +0000)]
IndexedDB: Object stores are not successfully deleted
https://bugs.webkit.org/show_bug.cgi?id=88788

Reviewed by Tony Chang.

Source/WebCore:

Discovered while working on http://webkit.org/b/83074 - object stores are not
being deleted from the backing store. Deletion would succeed in the in-memory
data structures, but after closing/re-opening the backing store the object store
(but not its indexes/data) would reappear. Due to 83074, this isn't detectable
by DRT without a full restart.

Test: [chromium] webkit_unit_tests --gtest_filter='IDBLevelDBCodingTest.ComparisonTest'

* Modules/indexeddb/IDBLevelDBCoding.cpp:
(WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::compare):

Source/WebKit/chromium:

* tests/IDBLevelDBCodingTest.cpp:
(IDBLevelDBCoding::TEST):

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

8 years agoCrash in fast/files/read tests during Garbage Collection
ericu@chromium.org [Mon, 11 Jun 2012 22:29:32 +0000 (22:29 +0000)]
Crash in fast/files/read tests during Garbage Collection
https://bugs.webkit.org/show_bug.cgi?id=87165

Reviewed by Michael Saboff

Source/WebCore:

Fix previous fix for hasPendingActivity, and fix a bug in a complex
abort case as well--abort during the final progress event of a write
would hang the writer.

* Modules/filesystem/FileWriter.cpp:
(WebCore::FileWriter::stop):
(WebCore::FileWriter::write):
(WebCore::FileWriter::truncate):
(WebCore::FileWriter::didWrite):
(WebCore::FileWriter::didTruncate):
(WebCore::FileWriter::didFail):
(WebCore::FileWriter::completeAbort):
(WebCore::FileWriter::doOperation):
(WebCore::FileWriter::signalCompletion):

LayoutTests:

Simplify file-writer-abort-continue.js a bit, and add a new test case
for a write that gets aborted in the final progress event, which
previously would have hung the FileWriter.

* fast/filesystem/file-writer-abort-continue-expected.txt:
* fast/filesystem/resources/file-writer-abort-continue.js:

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

8 years ago.: Replace obsolete mkdir_p variable with MKDIR_P
commit-queue@webkit.org [Mon, 11 Jun 2012 22:16:11 +0000 (22:16 +0000)]
.: Replace obsolete mkdir_p variable with MKDIR_P
https://bugs.webkit.org/show_bug.cgi?id=88790

Patch by Arnaud Renevier <arno@renevier.net> on 2012-06-11
Reviewed by Martin Robinson.

* GNUmakefile.am:
* configure.ac:

Source/WebKit/gtk/po: Replace obsolete mkdir_p variables with MKDIR_P
https://bugs.webkit.org/show_bug.cgi?id=88790

Patch by Arnaud Renevier <arno@renevier.net> on 2012-06-11
Reviewed by Martin Robinson.

* GNUmakefile.am:

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

8 years agoWebAudio tests need to set WebKitWebAudioEnabled.
commit-queue@webkit.org [Mon, 11 Jun 2012 22:05:36 +0000 (22:05 +0000)]
WebAudio tests need to set WebKitWebAudioEnabled.
https://bugs.webkit.org/show_bug.cgi?id=88624

Patch by Dongwoo Im <dw.im@samsung.com> on 2012-06-11
Reviewed by Chris Rogers.

* webaudio/audiochannelmerger-basic.html: Set WebKitWebAudioEnabled by including 'audio-testing.js'.
* webaudio/audionode-connect-order.html: ditto.
* webaudio/biquadfilternode-basic.html: ditto.
* webaudio/delaynode-maxdelay.html: ditto.
* webaudio/delaynode-scheduling.html: ditto.
* webaudio/delaynode.html: ditto.
* webaudio/javascriptaudionode-downmix8-2channel-input.html: ditto.
* webaudio/javascriptaudionode-upmix2-8channel-input.html: ditto.
* webaudio/mediaelementaudiosourcenode-gc.html: ditto.
* webaudio/mediaelementaudiosourcenode.html: ditto.
* webaudio/realtimeanalyser-fft-sizing.html: ditto.
* webaudio/stereo2mono-down-mixing.html: ditto.

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

8 years ago[BlackBerry] [BlackBerry] browser video player fullscreen mode (portrait) does not...
tonikitoo@webkit.org [Mon, 11 Jun 2012 22:04:07 +0000 (22:04 +0000)]
[BlackBerry] [BlackBerry] browser video player fullscreen mode (portrait) does not play well with rotation
https://bugs.webkit.org/show_bug.cgi?id=88809

Reviewed by Rob Buis.
Patch by Antonio Gomes <agomes@rim.com>

Adjust the media container dimensions, whenever the FrameView::frameRect
(aka viewport rect) changes

Reviewed internally by Jacky Jiang.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::updateViewportSize):
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):

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

8 years agobrowser video player fullscreen mode (portrait) does not play well with viewport...
tonikitoo@webkit.org [Mon, 11 Jun 2012 22:03:55 +0000 (22:03 +0000)]
browser video player fullscreen mode (portrait) does not play well with viewport metatag - Controls are off screen so cannot exit fullscreen https://bugs.webkit.org/show_bug.cgi?id=88719 PR #164026

Reviewed by Rob Buis.
Patch by Antonio Gomes <agomes@rim.com>

Instead of using WebPage's viewport size, which suffers from
dealing with transformed coordinates, viewport metatag changes,
etc, lets use WebCore::FrameView's visibleContentRect::Size::Width,
which abstract all these variations.

It fixes an overscale issue we were having when video player entered
fullscreen, and webpage had viewport metatag set.

* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):

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

8 years ago[chromium] Implement position:fixed in compositor thread
shawnsingh@chromium.org [Mon, 11 Jun 2012 21:37:44 +0000 (21:37 +0000)]
[chromium] Implement position:fixed in compositor thread
https://bugs.webkit.org/show_bug.cgi?id=70103

Reviewed by Adrienne Walker.

Source/WebCore:

Significant contributions to this patch by Alpha Lam and Sami Kyostila.

This patch is the compositor-side change that adds support for
fixed-position layers to be composited layers. Before this patch,
fixed-position elements were positioned only by WebCore (i.e. main
thread when painting), and the compositor did not have enough
knowledge on its own to position it properly. This patch adds the
necessary math and plumbs the necessary layer information so that
the impl thread can properly position fixed-position elements on
its own. This support is necessary for correctness of composited
fixed-position elements, which can greatly help to avoid
repainting container layers when scrolling with a fixed-position
layer.

There also needs to be WebCore-side support for this, which is
addressed in https://bugs.webkit.org/show_bug.cgi?id=78864

Unit tests added to CCLayerTreeHostCommonTest:
  CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithDirectContainer
  CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithTransformedDirectContainer
  CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithDistantContainer
  CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithDistantContainerAndTransforms
  CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithMultipleScrollDeltas
  CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithIntermediateSurfaceAndTransforms
  CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithMultipleIntermediateSurfaces
  CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithContainerLayerThatHasSurface
  CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerThatIsAlsoFixedPositionContainer
  CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerThatHasNoContainer

* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::LayerChromium):
(WebCore::LayerChromium::pushPropertiesTo):
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::setIsContainerForFixedPositionLayers):
(WebCore::LayerChromium::isContainerForFixedPositionLayers):
(LayerChromium):
(WebCore::LayerChromium::setFixedToContainerLayerVisibleRect):
(WebCore::LayerChromium::fixedToContainerLayerVisibleRect):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::CCLayerImpl):
* platform/graphics/chromium/cc/CCLayerImpl.h:
(WebCore::CCLayerImpl::setIsContainerForFixedPositionLayers):
(WebCore::CCLayerImpl::isContainerForFixedPositionLayers):
(CCLayerImpl):
(WebCore::CCLayerImpl::setFixedToContainerLayerVisibleRect):
(WebCore::CCLayerImpl::fixedToContainerLayerVisibleRect):
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::computeScrollCompensationForThisLayer):
(WebCore):
(WebCore::computeScrollCompensationMatrixForChildren):
(WebCore::calculateDrawTransformsInternal):
(WebCore::CCLayerTreeHostCommon::calculateDrawTransforms):

Source/WebKit/chromium:

* tests/CCLayerTreeHostCommonTest.cpp:

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

8 years agonrwt exits early too frequently
dpranke@chromium.org [Mon, 11 Jun 2012 21:17:58 +0000 (21:17 +0000)]
nrwt exits early too frequently
https://bugs.webkit.org/show_bug.cgi?id=73843

Reviewed by Ryosuke Niwa.

Change the defaults for new-run-webkit-tests for both
--exit-after-n-failures and --exit-after-n-crashes-or-timeouts
to zero (i.e., we will never exit early by default).

If people want their buildbots to exit early it is their
responsibility to update their buildbot configs appropriately.

Note that we have tests that ensure that these flags work for
non-zero numbers, but we don't have tests that either test the
default or ensure that zero means "run all of the tests". I
think that's okay but can add tests if others disagree.

Also note that it looks like no changes on the build.webkit.org
master.cfg are necessary; all of the bots seem to be using the
RunWebKitTests wrapper which is already setting the flags. There
is a NewRunWebKitTests wrapper, but that looks to be unused; I
will delete that in a separate patch.

* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):

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

8 years agoRemove support for disconnected/excluded from search frames, they are not used by...
weinig@apple.com [Mon, 11 Jun 2012 20:52:14 +0000 (20:52 +0000)]
Remove support for disconnected/excluded from search frames, they are not used by Safari anymore
https://bugs.webkit.org/show_bug.cgi?id=88723

Reviewed by Dan Bernstein.

Source/WebCore:

* WebCore.exp.in:
Update export.
* editing/Editor.cpp:
(WebCore::Editor::rangeOfString):
(WebCore::Editor::countMatchesForText):
* editing/Editor.h:
(Editor):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::findFrameForNavigation):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::parent):
(WebCore::DOMWindow::top):
* page/EventHandler.cpp:
(WebCore::EventHandler::hitTestResultAtPoint):
* page/Frame.cpp:
(WebCore::Frame::Frame):
* page/Frame.h:
(Frame):
* page/FrameTree.cpp:
(WebCore::FrameTree::parent):
(WebCore::FrameTree::top):
* page/FrameTree.h:
(FrameTree):
* page/Location.cpp:
(WebCore::Location::ancestorOrigins):
* xml/XMLTreeViewer.cpp:
(WebCore::XMLTreeViewer::hasNoStyleInformation):
Update for the removal of disconnected frames and text search exclusions concepts.

Source/WebKit/blackberry:

* WebKitSupport/InPageSearchManager.cpp:
(BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):

Source/WebKit/chromium:

* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::scopeStringMatches):

Source/WebKit/mac:

* WebView/WebFrame.mm:
* WebView/WebFramePrivate.h:
Remove -[WebFrame _setIsDisconnected:] and -[WebFrame _setExcludeFromTextSearch:]

Source/WebKit/win:

* WebFrame.cpp:
(WebFrame::setIsDisconnected):
(WebFrame::setExcludeFromTextSearch):
Stop doing anything in these functions.

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

8 years agoLast large slew of Chromium windows png rebaselines. See http://crbug.com/131829...
ojan@chromium.org [Mon, 11 Jun 2012 20:30:42 +0000 (20:30 +0000)]
Last large slew of Chromium windows png rebaselines. See  crbug.com/131829 for more information.
List of rebaselined files excluded because it's too long.

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

8 years ago[chromium] WebInputEvent::isGestureEventType should return true for GestureTwoFingerTap
commit-queue@webkit.org [Mon, 11 Jun 2012 20:22:00 +0000 (20:22 +0000)]
[chromium] WebInputEvent::isGestureEventType should return true for GestureTwoFingerTap
https://bugs.webkit.org/show_bug.cgi?id=88789

Patch by Varun Jain <varunjain@chromium.org> on 2012-06-11
Reviewed by Adam Barth.

* public/WebInputEvent.h:
(WebKit::WebInputEvent::isGestureEventType):

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

8 years agoCrash when a plug-in tries to use the NPRuntime API with JavaScript disabled
andersca@apple.com [Mon, 11 Jun 2012 20:16:58 +0000 (20:16 +0000)]
Crash when a plug-in tries to use the NPRuntime API with JavaScript disabled
https://bugs.webkit.org/show_bug.cgi?id=88797
<rdar://problem/11574844>

Reviewed by Brady Eidson.

* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::initialize):
Handle the windowNPObjectID being 0.

(WebKit::PluginControllerProxy::windowScriptNPObject):
Handle m_windownPObject being null.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::windowScriptNPObject):
Return null if JavaScript is disabled.

(WebKit::PluginView::pluginElementNPObject):
Ditto.

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

8 years ago[EFL] [DRT] Reset CacheModel before running each test
commit-queue@webkit.org [Mon, 11 Jun 2012 20:16:27 +0000 (20:16 +0000)]
[EFL] [DRT] Reset CacheModel before running each test
https://bugs.webkit.org/show_bug.cgi?id=87534

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-06-11
Reviewed by Gustavo Noronha Silva.

Reset cache model to default before running each test to fix some
flaky tests on EFL build bots. Also fix case value in setCacheModel.

* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(DumpRenderTreeChrome::resetDefaultsToConsistentValues):
* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
(LayoutTestController::setCacheModel):

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

8 years agoSVGImageCache leaks image data
wangxianzhu@chromium.org [Mon, 11 Jun 2012 20:15:47 +0000 (20:15 +0000)]
SVGImageCache leaks image data
https://bugs.webkit.org/show_bug.cgi?id=87792

Source/WebCore:

There are two functions to remove a client from a CachedImage:
- CachedResource::removeClient()
- CachedImage::removeClientForRenderer().
It's easy to make error to call the former which will leak the cached
image buffers in SVGImageCache.

This change combined the two by adding the virtual
CachedResource::didRemoveClient(). CachedImage will do SVGImageCache
cleanup in the function.

Reviewed by Nikolas Zimmermann.

Test: svg/as-image/svg-image-leak-cached-data.html

* loader/cache/CachedFont.h:
(WebCore::CachedFontClient::resourceClientType): Added 'const'.
* loader/cache/CachedImage.cpp:
(WebCore):
(WebCore::CachedImage::didRemoveClient): Removes the client from SVGImageCache.
(WebCore::CachedImage::lookupOrCreateImageForRenderer):
* loader/cache/CachedImage.h:
(CachedImage):
(WebCore::CachedImageClient::resourceClientType): Added 'const'.
* loader/cache/CachedRawResource.h:
(WebCore::CachedRawResourceClient::resourceClientType): Added 'const'.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::removeClient): Added invocation of didRemoveClient().
* loader/cache/CachedResource.h:
(WebCore::CachedResource::didRemoveClient): Added for subclasses to do additional works.
* loader/cache/CachedResourceClient.h:
(WebCore::CachedResourceClient::resourceClientType): Added 'const'.
* loader/cache/CachedSVGDocument.h:
(WebCore::CachedSVGDocumentClient::resourceClientType): Added 'const'.
* loader/cache/CachedStyleSheetClient.h:
(WebCore::CachedStyleSheetClient::resourceClientType): Added 'const'.
* rendering/style/StyleCachedImage.cpp:
(WebCore::StyleCachedImage::removeClient):
* rendering/style/StyleCachedImageSet.cpp:
(WebCore::StyleCachedImageSet::removeClient):
* svg/graphics/SVGImageCache.cpp:
(WebCore::SVGImageCache::~SVGImageCache): Added checking for leaks.
(WebCore::SVGImageCache::removeClientFromCache):
(WebCore::SVGImageCache::setRequestedSizeAndScales):
(WebCore::SVGImageCache::requestedSizeAndScales):
(WebCore::SVGImageCache::lookupOrCreateBitmapImageForClient):
* svg/graphics/SVGImageCache.h:
(WebCore):
(SVGImageCache):

LayoutTests:

Reviewed by Nikolas Zimmermann.

New test case.

* svg/as-image/svg-image-leak-cached-data-expected.txt: Added.
* svg/as-image/svg-image-leak-cached-data.html: Added.

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

8 years ago[GTK] Memory leaks in DRT EventSender.cpp
commit-queue@webkit.org [Mon, 11 Jun 2012 19:50:00 +0000 (19:50 +0000)]
[GTK] Memory leaks in DRT EventSender.cpp
https://bugs.webkit.org/show_bug.cgi?id=88774

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-06-11
Reviewed by Martin Robinson.

Fix a few possible memory leaks in EventSender code.

* DumpRenderTree/gtk/EventSender.cpp:
(contextClickCallback): Free the event returned by gdk_event_new().
(mouseDownCallback): Ditto.
(mouseUpCallback): Ditto.

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

8 years ago[EFL] REGRESSION (r119788): tests rely on pathToLocalResource are failing after r119788
commit-queue@webkit.org [Mon, 11 Jun 2012 19:45:20 +0000 (19:45 +0000)]
[EFL] REGRESSION (r119788): tests rely on pathToLocalResource are failing after r119788
https://bugs.webkit.org/show_bug.cgi?id=88661

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-06-11
Reviewed by Dirk Pranke.

Tools:

Pass string length explicitly when creating String object from
non-null-terminated UChar* returned by characters().

* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
(LayoutTestController::pathToLocalResource):

LayoutTests:

Unskip test cases which rely on pathToLocalResource().

* platform/efl/TestExpectations:

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

8 years ago[Chromium] Call shared timer functions directly
pilgrim@chromium.org [Mon, 11 Jun 2012 18:54:52 +0000 (18:54 +0000)]
[Chromium] Call shared timer functions directly
https://bugs.webkit.org/show_bug.cgi?id=88781

Reviewed by Adam Barth.

Part of a refactoring series. See tracking bug 82948.

Source/WebCore:

* platform/chromium/PlatformSupport.h:
(PlatformSupport):
* platform/chromium/SharedTimerChromium.cpp:
(WebCore::setSharedTimerFiredFunction):
(WebCore::setSharedTimerFireInterval):

Source/WebKit/chromium:

* src/PlatformSupport.cpp:
(WebCore):

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

8 years agoRelative pos. input fields in columns vanish when you start typing in them
commit-queue@webkit.org [Mon, 11 Jun 2012 18:48:47 +0000 (18:48 +0000)]
Relative pos. input fields in columns vanish when you start typing in them
https://bugs.webkit.org/show_bug.cgi?id=76834

Patch by Pravin D <pravind.2k4@gmail.com> on 2012-06-11
Reviewed by Julien Chaffraix.

Source/WebCore:

Test: fast/multicol/multicol-with-child-renderLayer-for-input.html

* page/FrameView.cpp:
(WebCore::updateLayerPositionFlags):
Helper function to prepare the UpdateLayerPositionsFlags based on the input parameters.
If didFullRepaint flag is set, then CheckForRepaints flag is removed from the default flags.
Also during a relayout of a subtree, if the RenderLayer of the subtree root is paginated then updatePagination flag is
included in the flags.

(WebCore):
(WebCore::FrameView::layout):
Now uses the helper function updateLayerPositionFlags() to get the final set of UpdateLayerPositionsFlags.

* rendering/RenderLayer.h:
(WebCore::RenderLayer::isPaginated):
(RenderLayer):
isPaginated function is made public so that FrameView class can use it prepare UpdateLayerPositionsFlags.

LayoutTests:

* fast/multicol/multicol-with-child-renderLayer-for-input-expected.html: Added.
* fast/multicol/multicol-with-child-renderLayer-for-input.html: Added.

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

8 years ago[Chromium] Remove some dead code in PasteboardChromium
pilgrim@chromium.org [Mon, 11 Jun 2012 18:36:12 +0000 (18:36 +0000)]
[Chromium] Remove some dead code in PasteboardChromium
https://bugs.webkit.org/show_bug.cgi?id=88782

Reviewed by Adam Barth.

Part of a refactoring series. See tracking bug 82948.
Leftover detritus from bug 88038.

* platform/chromium/PasteboardChromium.cpp:
(WebCore::Pasteboard::documentFragment):

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

8 years ago[Chromium] Removing long WebDeviceOrientation constructor
commit-queue@webkit.org [Mon, 11 Jun 2012 18:35:09 +0000 (18:35 +0000)]
[Chromium] Removing long WebDeviceOrientation constructor
https://bugs.webkit.org/show_bug.cgi?id=88779

Patch by Amy Ousterhout <aousterh@chromium.org> on 2012-06-11
Reviewed by Adam Barth.

Removing the WebDeviceOrientation constructor with nine parameters.
Chromium has been changed to use the default constructor and setter
functions instead (see https://chromiumcodereview.appspot.com/10542025/).

* public/WebDeviceOrientation.h:

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

8 years agoUse testRunner instead of layoutTestController in compositing tests
rniwa@webkit.org [Mon, 11 Jun 2012 18:29:22 +0000 (18:29 +0000)]
Use testRunner instead of layoutTestController in compositing tests
https://bugs.webkit.org/show_bug.cgi?id=88766

Reviewed by Tony Chang.

* compositing/:
* compositing/animation/:
* compositing/backface-visibility/:
* compositing/backing/:
* compositing/culling/:
* compositing/geometry/:
* compositing/iframes/:
* compositing/iframes/resources/:
* compositing/images/:
* compositing/layer-creation/:
* compositing/masks/:
* compositing/overflow/:
* compositing/plugins/:
* compositing/reflections/:
* compositing/repaint/:
* compositing/resources/:
* compositing/rtl/:
* compositing/scaling/:
* compositing/tiling/:
* compositing/transitions/:
* compositing/video/:
* compositing/visibility/:
* compositing/webgl/:
* platform/chromium/compositing/:
* platform/chromium/compositing/force-compositing-mode/:
* platform/chromium/compositing/rubberbanding/:
* platform/mac/compositing/canvas/:

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

8 years agoLarge slew of Chromium windows png rebaselines. See http://crbug.com/131829 for more...
ojan@chromium.org [Mon, 11 Jun 2012 18:26:01 +0000 (18:26 +0000)]
Large slew of Chromium windows png rebaselines. See crbug.com/131829 for more information.

List of rebaselined files excluded because it's too long.

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

8 years agoUse testRunner instead of layoutTestController in css 1, css 2.1, and css3 tests
rniwa@webkit.org [Mon, 11 Jun 2012 18:23:57 +0000 (18:23 +0000)]
Use testRunner instead of layoutTestController in css 1, css 2.1, and css3 tests
https://bugs.webkit.org/show_bug.cgi?id=88769

Reviewed by Tony Chang.

* css1/units/zero-duration-without-units.html:
* css3/calc/:
* css3/filters/:
* css3/filters/custom/:
* css3/filters/resources/:
* css3/filters/script-tests/:
* css3/flexbox/:
* css3/font-feature-settings-rendering.html:
* css3/images/cross-fade-invalidation.html:
* css3/images/optimize-contrast-canvas.html:
* css3/images/optimize-contrast-image.html:
* css3/khtml-background-size-0x0-bmp.html:
* css3/parsing-css3-nthchild.html:
* css3/style-zoomed-image.html:
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-getStyle.html:
* css3/zoom-coords.xhtml:
* platform/win/css2.1/resources/run-webkit-tests-epilogue.html:
* platform/win/css2.1/resources/run-webkit-tests-prologue.html:

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

8 years ago[chromium] Provide access to the WebPlugin created by the helper plugin widget
commit-queue@webkit.org [Mon, 11 Jun 2012 18:14:15 +0000 (18:14 +0000)]
[chromium] Provide access to the WebPlugin created by the helper plugin widget
https://bugs.webkit.org/show_bug.cgi?id=88028

Patch by David Dorwin <ddorwin@chromium.org> on 2012-06-11
Reviewed by Adam Barth.

Source/WebKit/chromium:

A WebPlugin is created when the document created by createHelperPlugin() is laid out.
Expose it so the embedder can interact with the plugin instance.

* public/WebHelperPlugin.h:
(WebKit):
(WebHelperPlugin):
* public/WebMediaPlayerClient.h:
(WebKit):
* public/WebPlugin.h:
(WebKit::WebPlugin::isPlaceholder):
(WebPlugin):
* src/WebHelperPluginImpl.cpp:
(WebKit::WebHelperPluginImpl::WebHelperPluginImpl):
(WebKit):
(WebKit::WebHelperPluginImpl::getPlugin):
(WebKit::WebHelperPluginImpl::initPage):
(WebKit::WebHelperPluginImpl::close):
* src/WebHelperPluginImpl.h:
(WebKit):
(WebHelperPluginImpl):
* src/WebMediaPlayerClientImpl.cpp:
(WebKit::WebMediaPlayerClientImpl::createHelperPlugin):
* src/WebMediaPlayerClientImpl.h:
(WebMediaPlayerClientImpl):
* src/WebPagePopupImpl.cpp:

Tools:

Added isPlaceholder() to WebPlugin.

* DumpRenderTree/chromium/TestWebPlugin.h:
(TestWebPlugin::isPlaceholder):

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

8 years ago[Chromium] Theme updates for Android in menu list rendering and selection backgrounds
peter@chromium.org [Mon, 11 Jun 2012 18:13:57 +0000 (18:13 +0000)]
[Chromium] Theme updates for Android in menu list rendering and selection backgrounds
https://bugs.webkit.org/show_bug.cgi?id=88775

Reviewed by Adam Barth.

For Chrome on Android, use the width of the scrollbar down arrow instead
of the scrollbar's width for determining the arrow padding to apply for
menu list rendering, as WebKit isn't drawing a scrollbar (thus width=0).

Furthermore, change the default active selection background color to be
equal to the tap highlighting color.

These changes should be covered by existing layout tests.

* rendering/RenderThemeChromiumAndroid.cpp:
(WebCore::RenderThemeChromiumAndroid::menuListArrowPadding):
(WebCore): Retrieve the scrollbar down arrow's size via PlatformSupport.
* rendering/RenderThemeChromiumAndroid.h: Override the menuListArrowPadding
    and platformActiveSelectionBackgroundColor methods, and add a static
    static RGBA32 color for the default active selection bg color.
* rendering/RenderThemeChromiumSkia.cpp:
(WebCore::RenderThemeChromiumSkia::menuListArrowPadding): Default to
    the scrollbar thickness, not changing behavior for non-Android.
(WebCore::RenderThemeChromiumSkia::menuListInternalPadding): Instead
    of polling the scrollbar thickness, call menuListArrowPadding().
* rendering/RenderThemeChromiumSkia.h:
(RenderThemeChromiumSkia): Add the menuListArrowPadding() as a protected method.

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

8 years agorebaseline from garden-o-matic leaves N processes each time it is run
tony@chromium.org [Mon, 11 Jun 2012 17:39:41 +0000 (17:39 +0000)]
rebaseline from garden-o-matic leaves N processes each time it is run
https://bugs.webkit.org/show_bug.cgi?id=88586

Reviewed by Dirk Pranke.

This appears to only be a problem on python 2.7. Maybe a bug causing
pools to not be garbage collected?

* Scripts/webkitpy/common/system/executive.py:
(Executive.run_in_parallel): close() and join() the process pool.
* Scripts/webkitpy/common/system/executive_unittest.py:
(ExecutiveTest.test_run_in_parallel):

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