WebKit-https.git
9 years agoVersioning.
lforschler@apple.com [Mon, 15 Oct 2012 21:34:38 +0000 (21:34 +0000)]
Versioning.

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

9 years agoRegression r130057: incorrect block pref width for alternating InlineFlow and inline...
leviw@chromium.org [Mon, 15 Oct 2012 21:29:31 +0000 (21:29 +0000)]
Regression r130057: incorrect block pref width for alternating InlineFlow and inline Replaced
https://bugs.webkit.org/show_bug.cgi?id=99194

Reviewed by Eric Seidel.

Source/WebCore:

Correctly breaking lines after inline replaced elements that follow inline flows. Previously, alternating
these two types of elements would cause us to increase our preferred width forever.

Test: fast/block/block-with-inline-replaced-children-in-inline-flows.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):

LayoutTests:

* fast/block/block-with-inline-replaced-children-in-inline-flows-expected.html: Added.
* fast/block/block-with-inline-replaced-children-in-inline-flows.html: Added.

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

9 years agoRevert rounding change in RenderTable::paintObject
eae@chromium.org [Mon, 15 Oct 2012 21:27:41 +0000 (21:27 +0000)]
Revert rounding change in RenderTable::paintObject
https://bugs.webkit.org/show_bug.cgi?id=99364

Reviewed by Levi Weintraub.

Source/WebCore:

Bug 91410 changed RenderTable::paintObject to round the offset
in order to avoid table-background bleed through. The root cause
for that has since been fixed and the rounding workaround is no
longer needed. This change reverts the code change from bug
91410 while preserving the test added as a part of that change
as it now passes without the workaround.

No new tests, covered by fast/sub-pixel/table-rows-no-gaps-expected.html

* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintObject):
Remove unnecessary rounding.

LayoutTests:

Revert pixel expected results to what we had prior to r122769.

* platform/chromium/TestExpectations:
* platform/chromium-linux/css1/basic/inheritance-expected.png:
* platform/chromium-linux/fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-classes-expected.png:
* platform/chromium-linux/fast/sub-pixel/selection/selection-rect-in-sub-pixel-table-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png:
* platform/chromium-linux/tables/mozilla/bugs/bug73321-expected.png:

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

9 years ago[CSS Shaders] Add CustomFilterProgramType to CustomFilterProgramInfo
michelangelo@webkit.org [Mon, 15 Oct 2012 21:23:53 +0000 (21:23 +0000)]
[CSS Shaders] Add CustomFilterProgramType to CustomFilterProgramInfo
https://bugs.webkit.org/show_bug.cgi?id=96448

Reviewed by Kenneth Rohde Christiansen.

CustomFilterProgramInfo has been refactored to decouple the CustomFilterProgramType from
the CustomFilterProgramMixSetting: m_mixSettings.enabled was redundant in light of the fact
that m_programType encoded the very same information. Dependencies have been updated to reflect
this change.

Current tests already cover this code.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::valueForFilter): The check for mixSettings.enabled has been replaced
by an explicit check for PROGRAM_TYPE_BLENDS_ELEMENT_TEXTURE program type.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::createCustomFilterOperation): Setting the program type explicitly while creating a
new filter program.
* platform/graphics/filters/CustomFilterProgram.cpp:
(WebCore::CustomFilterProgram::CustomFilterProgram): CustomFilterProgram's constructor has been updated to
reflect the need of setting the program type explicitly.
(WebCore::CustomFilterProgram::programInfo): Updated to create new CustomFilterProgramInfo setting the program
type explicitly.
* platform/graphics/filters/CustomFilterProgram.h:
* platform/graphics/filters/CustomFilterProgramInfo.cpp:
(WebCore::CustomFilterProgramInfo::CustomFilterProgramInfo): Added m_programType and udpated the related getter.
(WebCore::CustomFilterProgramInfo::hash): ditto
(WebCore::CustomFilterProgramInfo::operator==): MixSettings' equality check is being performed only whether
the CustomFilterProgramInfo's program type is PROGRAM_TYPE_BLENDS_ELEMENT_TEXTURE.
* platform/graphics/filters/CustomFilterProgramInfo.h:
(WebCore::CustomFilterProgramMixSettings::CustomFilterProgramMixSettings): Got rid of the redundant enabled flag.
(WebCore::CustomFilterProgramMixSettings::operator==): ditto
(CustomFilterProgramInfo):
(WebCore::CustomFilterProgramInfo::programType):
* platform/graphics/filters/CustomFilterValidatedProgram.cpp: The right shader validator is now being
created according to the program type.
(WebCore::CustomFilterValidatedProgram::CustomFilterValidatedProgram):
(WebCore::CustomFilterValidatedProgram::rewriteMixVertexShader): The reference to MixSettings' enabled flag
has been replaced with a check for the program type.
(WebCore::CustomFilterValidatedProgram::rewriteMixFragmentShader): ditto
* rendering/style/StyleCustomFilterProgram.h:
(WebCore::StyleCustomFilterProgram::create): Updated to be aware of the program type.
(WebCore::StyleCustomFilterProgram::StyleCustomFilterProgram): ditto

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

9 years agoIndexedDB: Key paths should support non-ASCII identifiers
jsbell@chromium.org [Mon, 15 Oct 2012 21:22:08 +0000 (21:22 +0000)]
IndexedDB: Key paths should support non-ASCII identifiers
https://bugs.webkit.org/show_bug.cgi?id=98814

Reviewed by Kentaro Hara.

Source/WebCore:

Update the parser for key paths to use the unicode classes from
the IdentifierName production in ECMA-262.

Test: storage/indexeddb/keypath-basics.html

* Modules/indexeddb/IDBKeyPath.cpp:
(WebCore):
(WebCore::IDBKeyPathLexer::lexIdentifier):

LayoutTests:

Test representative characters from various Unicode character classes
as valid (or invalid) identifier lead and trailing characters.

* storage/indexeddb/keypath-basics-expected.txt:
* storage/indexeddb/resources/keypath-basics.js:
(testValidKeyPaths):

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

9 years ago[EFL][WK2][Texmap] Set gl context in GraphicsContext3DPrivate
commit-queue@webkit.org [Mon, 15 Oct 2012 21:20:06 +0000 (21:20 +0000)]
[EFL][WK2][Texmap] Set gl context in GraphicsContext3DPrivate
https://bugs.webkit.org/show_bug.cgi?id=99325

Patch by Yael Aharon <yael.aharon@intel.com> on 2012-10-15
Reviewed by Kenneth Rohde Christiansen.

Based on a patch from Regina Chung.
This piece of code was lost in the final patch of https://bugs.webkit.org/show_bug.cgi?id=96627.
The gl context is used as key in a hash map and cannot be NULL.

No new tests. Accelerated compositing is not yet enabled in the EFL port.

* platform/graphics/efl/GraphicsContext3DEfl.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):

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

9 years ago[WK2][CAIRO] Use cairo_format_stride_for_width() in ShareableBitmap
commit-queue@webkit.org [Mon, 15 Oct 2012 21:00:46 +0000 (21:00 +0000)]
[WK2][CAIRO] Use cairo_format_stride_for_width() in ShareableBitmap
https://bugs.webkit.org/show_bug.cgi?id=99332

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-15
Reviewed by Martin Robinson.

Cairo implementation of ShareableBitmap is calling
cairo_image_surface_create_for_data() to create an image surface for
the provided pixel data. However, it was passing "m_size.width() * 4"
for the stride argument instead of calling
cairo_format_stride_for_width().

The Cairo documentation states:
"Note that the stride may be larger than width*bytes_per_pixel to
provide proper alignment for each pixel and row. This alignment is
required to allow high-performance rendering within cairo. The correct
way to obtain a legal stride value is to call
cairo_format_stride_for_width() with the desired format and maximum
image width value, and then use the resulting stride value to allocate
the data and to create the image surface."

This patch calls cairo_format_stride_for_width() is ShareableBitmap
in order to obtain a legal stride value to make sure we provide proper
alignment for each pixel and row, and allow high-performance rendering
within cairo.

* Shared/ShareableBitmap.h:
(ShareableBitmap):
* Shared/cairo/ShareableBitmapCairo.cpp:
(WebKit):
(WebKit::ShareableBitmap::numBytesForSize):
(WebKit::createSurfaceFromData):
(WebKit::ShareableBitmap::paint):
(WebKit::ShareableBitmap::createCairoSurface):

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

9 years agoConsole messages containing long URLs should cut at some reasonable length.
mkwst@chromium.org [Mon, 15 Oct 2012 21:00:26 +0000 (21:00 +0000)]
Console messages containing long URLs should cut at some reasonable length.
https://bugs.webkit.org/show_bug.cgi?id=97980

Reviewed by Pavel Feldman.

Source/WebCore:

This patch lightly modifies the current styling of linkified URLs inside
console messages in order to cut them down to some reasonable size for
viewing. The middle of the URL is snipped out such that the whole
thing fits into 150 characters. This only effects the displayed text;
the link's href isn't changed; the link remains available via the
context menu, accessible via the title attribute, and clicking it still
takes the user directly to the resource in question.

Test: inspector/console/console-trim-long-urls.html

* inspector/front-end/ResourceUtils.js:
(WebInspector.linkifyURLAsNode):
    Trim the middle of the URL to bring the whole string down to  down
    to 150 characters, and set the link's title to the full URL.

LayoutTests:

* inspector/console/console-trim-long-urls-expected.txt: Added.
* inspector/console/console-trim-long-urls.html: Added.
* inspector/styles/inject-stylesheet-expected.txt:
* platform/chromium/inspector/styles/inject-stylesheet-expected.txt:
    Updating test expectations.

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

9 years ago[EFL][WK2] Cannot set evas engine from command line
commit-queue@webkit.org [Mon, 15 Oct 2012 20:56:11 +0000 (20:56 +0000)]
[EFL][WK2] Cannot set evas engine from command line
https://bugs.webkit.org/show_bug.cgi?id=99286

Patch by Yael Aharon <yael.aharon@intel.com> on 2012-10-15
Reviewed by Kenneth Rohde Christiansen.

If an engine name is passed on the command line, pass it along to evas.

* MiniBrowser/efl/main.c:
(elm_main):

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

9 years agoAdd computeLogicalHeight override methods to RenderView and RenderMultiColumnSet
tony@chromium.org [Mon, 15 Oct 2012 20:54:50 +0000 (20:54 +0000)]
Add computeLogicalHeight override methods to RenderView and RenderMultiColumnSet
https://bugs.webkit.org/show_bug.cgi?id=99348

Reviewed by Ojan Vafai.

Add computeLogicalHeight to the last 2 RenderBoxes that override the method.
I'm unable to remove RenderMultiColumnSet::updateLogicalHeight and make the method
non-virtual since it sets ComputedColumnHeight.  I'd like to remove this
eventually.

No new tests, this is just a code refactor.

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::updateLogicalHeight): Set computedColumnHeight.
(WebCore::RenderMultiColumnSet::computeLogicalHeight):
(WebCore):
* rendering/RenderMultiColumnSet.h:
(RenderMultiColumnSet):
* rendering/RenderView.cpp:
(WebCore::RenderView::computeLogicalHeight):
* rendering/RenderView.h:

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

9 years agoMove framework and library linking into WebKit.xcconfig
ddkilzer@apple.com [Mon, 15 Oct 2012 20:51:36 +0000 (20:51 +0000)]
Move framework and library linking into WebKit.xcconfig
<http://webkit.org/b/99284>

Reviewed by Mark Rowe.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj: Remove frameworks and
libraries from Xcode project file.

Source/WebKit/mac:

* Configurations/WebKit.xcconfig: Move frameworks and libraries
link flags to OTHER_LDFLAGS so that they work for iOS and OS X.

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

9 years ago[EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries.
commit-queue@webkit.org [Mon, 15 Oct 2012 20:36:24 +0000 (20:36 +0000)]
[EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries.
https://bugs.webkit.org/show_bug.cgi?id=97173

Patch by Eunmi Lee <eunmi15.lee@samsung.com> on 2012-10-15
Reviewed by Gyuyoung Kim.

Source/WebCore:

Remove codes to initialize and shutdown the EFL libraries from
RunLoopEfl.cpp. Initialization and shutdown will be done in the
ewk_main.cpp for ui process and WebProcessMainEfl.cpp for web
process.

No new tests. This patch doesn't change behavior.

* platform/efl/RunLoopEfl.cpp:
(WebCore::RunLoop::RunLoop):
(WebCore::RunLoop::~RunLoop):

Source/WebKit2:

Initialize and shutdown the EFL libraries in the ewk_main.cpp for ui
process and WebProcessMainEfl.cpp for web process.

* UIProcess/API/efl/ewk_main.cpp:
(ewk_init):
(ewk_shutdown):
* WebProcess/efl/WebProcessMainEfl.cpp:
(WebKit::WebProcessMainEfl):

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

9 years ago[CSSRegions]Add support for auto-height regions (without region-breaks)
mihnea@adobe.com [Mon, 15 Oct 2012 20:31:47 +0000 (20:31 +0000)]
[CSSRegions]Add support for auto-height regions (without region-breaks)
https://bugs.webkit.org/show_bug.cgi?id=97533

Reviewed by Julien Chaffraix.

Source/WebCore:

Implement the 2pass layout algorithm for computing the height of regions with auto logical height, without taking region breaks into account.
The algorithm is described in the CSSRegions spec: http://dev.w3.org/csswg/css3-regions/#regions-visual-formatting-steps

When the flow thread contains regions with auto logical height, a 2pass layout algorithm is needed to determine the height of auto logical height regions.
In each step of the layout, the regions are laid out before the flow thread is laid out.

In the first pass of layout (normal layout phase), the content of the flow thread is laid out unconstrained in the regions. The region marked as having auto logical height
displays all the corresponding content from the flow thread (taking min-height and max-height into account), and the height of the content displayed
determines the overridden logical content height. Thus, after the first pass of layout, each auto logical height region will store the logical height
value for the second pass in its overridden logical content height property.

In the second pass of layout (constrained flow threads layout phase), when the content of the flow thread is laid out constrained in the regions, the regions are laid out again and they are using
the overridden logical content height from the first pass to update their logical height. Then, the flow thread content is laid out in the associated region chain,
for which the auto logical height regions have proper logical height.

A future patch will properly take region breaks into account for the first pass of layout.

Tests: fast/regions/autoheight-abspos-region.html
       fast/regions/autoheight-floatright-region.html
       fast/regions/autoheight-horizontal-bt.html
       fast/regions/autoheight-inlineblock-normalflow-region.html
       fast/regions/autoheight-maxheight-region.html
       fast/regions/autoheight-minheight-region.html
       fast/regions/autoheight-normalflow-region.html
       fast/regions/autoheight-vertical-lr.html
       fast/regions/autoheight-vertical-rl.html

* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::resetRegionsOverrideLogicalContentHeight):
For all the auto logical height regions, resets their associated overrideLogicalContentHeight.
Those regions are marked as needing layout (along with their ancestors).
(WebCore::FlowThreadController::markAutoLogicalHeightRegionsForLayout):
Mark all the auto logical height regions and their associated flow thread as needing layout (along with their ancestors).
* rendering/FlowThreadController.h:
* rendering/RenderBox.cpp:
Add helper functions to clear out individual logical content width/height.
(WebCore::RenderBox::clearOverrideLogicalContentHeight):
(WebCore::RenderBox::clearOverrideLogicalContentWidth):
(WebCore::RenderBox::clearOverrideSize):
* rendering/RenderBox.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::computeLogicalHeight):
If the flow thread has an auto logical height region for which we did not yet compute the overrideLogicalContentHeight value,
bail out early since we cannot compute the flow thread logical height.
(WebCore::RenderFlowThread::regionAtBlockOffset):
If the offset is inside an auto logical height region for which we did not compute the overrideLogicalContentHeight, then we consider this region tall enough to accommodate all
the content and we return this region. Otherwise, for an auto logical height region, we use either the overrideLogicalContentHeight (if we are in the first layout phase) or
the logicalHeight if we are in the second layout phase (because the overriderLogicalContentHeight was already transferred into region logical height).
(WebCore::RenderFlowThread::pageLogicalHeightForOffset):
(WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset):
(WebCore::RenderFlowThread::computeOverflowStateForRegions):
(WebCore::RenderFlowThread::resetRegionsOverrideLogicalContentHeight):
(WebCore::RenderFlowThread::markAutoLogicalHeightRegionsForLayout):
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
(WebCore::RenderFlowThread::addForcedRegionBreak):
Simulate a region break at the specified offset. It will be extended to properly process the region breaks. At this moment, only one auto height region for a thread
can have its height properly computed.
* rendering/RenderFlowThread.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::boxIntersectsRegion):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::updateLogicalHeight):
If the auto logical height region has an overrideLogicalContentHeight and we are in the second pass of layout,
we use the overrideLogicalContentHeight to update the region logical height.
(WebCore::RenderRegion::needsOverrideLogicalContentHeightComputation):
* rendering/RenderRegion.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
(WebCore::RenderView::layoutContent):
Added a new function to contain the RenderView block layout and flow threads layout.
(WebCore::RenderView::checkLayoutState):
Helper function keeping the original asserts from RenderView, used in more than one place.
(WebCore::RenderView::layout):
* rendering/RenderView.h:
(WebCore::RenderView::normalLayoutPhase):
(WebCore::RenderView::constrainedFlowThreadsLayoutPhase):

LayoutTests:

Added tests for auto-height regions, with different writing modes, with min/max-height.
The bug referenced in the tests is the master bug for auto-height support, 91097.

* fast/regions/autoheight-abspos-region-expected.html: Added.
* fast/regions/autoheight-abspos-region.html: Added.
* fast/regions/autoheight-floatright-region-expected.html: Added.
* fast/regions/autoheight-floatright-region.html: Added.
* fast/regions/autoheight-horizontal-bt-expected.html: Added.
* fast/regions/autoheight-horizontal-bt.html: Added.
* fast/regions/autoheight-inlineblock-normalflow-region-expected.html: Added.
* fast/regions/autoheight-inlineblock-normalflow-region.html: Added.
* fast/regions/autoheight-maxheight-region-expected.html: Added.
* fast/regions/autoheight-maxheight-region.html: Added.
* fast/regions/autoheight-minheight-region-expected.html: Added.
* fast/regions/autoheight-minheight-region.html: Added.
* fast/regions/autoheight-normalflow-region-expected.html: Added.
* fast/regions/autoheight-normalflow-region.html: Added.
* fast/regions/autoheight-vertical-lr-expected.html: Added.
* fast/regions/autoheight-vertical-lr.html: Added.
* fast/regions/autoheight-vertical-rl-expected.html: Added.
* fast/regions/autoheight-vertical-rl.html: Added.
* fast/regions/webkit-named-flow-first-empty-region-index.html: Fix an element style (though the test was passing before).

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

9 years ago[EFL][WK2] Provide implementation for PageClientImpl::toolTipChanged()
commit-queue@webkit.org [Mon, 15 Oct 2012 20:23:51 +0000 (20:23 +0000)]
[EFL][WK2] Provide implementation for PageClientImpl::toolTipChanged()
https://bugs.webkit.org/show_bug.cgi?id=98589

Patch by Jinwoo Song <jinwoo7.song@samsung.com> on 2012-10-15
Reviewed by Kenneth Rohde Christiansen.

Implement PageClientImpl::toolTipChanged() to emit signal 'tooltip,text,set' with a tooltip text,
or 'tooltip,text,unset' if tooltip was unset.

* UIProcess/API/efl/PageClientImpl.cpp:
(WebKit::PageClientImpl::toolTipChanged):
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_tooltip_text_set):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/ewk_view_private.h:

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

9 years agoLayout Test webaudio/codec-tests/vorbis/vbr-70kbps-44khz.html is failing
danakj@chromium.org [Mon, 15 Oct 2012 20:22:03 +0000 (20:22 +0000)]
Layout Test webaudio/codec-tests/vorbis/vbr-70kbps-44khz.html is failing
https://bugs.webkit.org/show_bug.cgi?id=99357

Unreviewed gardening.

* platform/chromium/TestExpectations:

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

9 years agoLower the minimum time required to keep a test in the test results json
ojan@chromium.org [Mon, 15 Oct 2012 20:11:41 +0000 (20:11 +0000)]
Lower the minimum time required to keep a test in the test results json
https://bugs.webkit.org/show_bug.cgi?id=99346

Reviewed by Eric Seidel.

On the run-webkit-tests side, we floor the time. So, 5 seconds is too close to
the 6 second timeout. Lower the time so that we can get a better sense of tests
that are close to timing out.

* TestResultServer/model/jsonresults.py:
* TestResultServer/model/jsonresults_unittest.py:
(JsonResultsTest.test_merge_keep_test_with_all_pass_but_slow_time):

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

9 years agoWeb Inspector: Fix memory leak in TreeOutline
commit-queue@webkit.org [Mon, 15 Oct 2012 20:05:36 +0000 (20:05 +0000)]
Web Inspector: Fix memory leak in TreeOutline
https://bugs.webkit.org/show_bug.cgi?id=99307

Patch by Eugene Klyuchnikov <eustas.bug@gmail.com> on 2012-10-15
Reviewed by Alexander Pavlov.

Added cleanup of empty buckets in elements cache.

* inspector/front-end/treeoutline.js:

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

9 years agoWeb Inspector: Hide useless controls in remote-debugging mode.
commit-queue@webkit.org [Mon, 15 Oct 2012 20:03:37 +0000 (20:03 +0000)]
Web Inspector: Hide useless controls in remote-debugging mode.
https://bugs.webkit.org/show_bug.cgi?id=99300

Patch by Eugene Klyuchnikov <eustas.bug@gmail.com> on 2012-10-15
Reviewed by Vsevolod Vlasov.

"Close inspector" and "change docking mode" buttons seem to be rather
useless in remote debugging mode.

* inspector/front-end/inspector.css:
(body.remote .toolbar-item.close-left, body.remote .toolbar-item.close-right):
(body.remote .dock-status-bar-item):

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

9 years agoUnreviewed. Partial build fix for Windows after r131308.
roger_fong@apple.com [Mon, 15 Oct 2012 19:59:51 +0000 (19:59 +0000)]
Unreviewed. Partial build fix for Windows after r131308.

* WebKit2Prefix.h:
* WebProcess/WebKitMain.cpp:
(WebKitMain):

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

9 years agoUnreviewed, rolling out r131306 and r131307.
ossy@webkit.org [Mon, 15 Oct 2012 19:53:00 +0000 (19:53 +0000)]
Unreviewed, rolling out r131306 and r131307.
http://trac.webkit.org/changeset/131306
http://trac.webkit.org/changeset/131307
https://bugs.webkit.org/show_bug.cgi?id=99354

It made layout testing extremely slow again (Requested by
Ossy_night on #webkit).

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

Source/WebKit2:

* Shared/API/c/qt/WKImageQt.cpp:
(WKImageCreateQImage):
* Shared/API/c/qt/WKImageQt.h:

Tools:

* WebKitTestRunner/Target.pri:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::invoke):
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
* WebKitTestRunner/TestInvocation.h:
(TestInvocation):
* WebKitTestRunner/qt/PlatformWebViewQt.cpp:
(WTR::WrapperWindow::handleStatusChanged):
(WTR::PlatformWebView::windowSnapshotImage):
* WebKitTestRunner/qt/TestInvocationQt.cpp:
(WTR::TestInvocation::dumpPixelsAndCompareWithExpected):

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

9 years agoUnreviewed, rolling out r131327.
commit-queue@webkit.org [Mon, 15 Oct 2012 19:47:07 +0000 (19:47 +0000)]
Unreviewed, rolling out r131327.
http://trac.webkit.org/changeset/131327
https://bugs.webkit.org/show_bug.cgi?id=99353

broke the build (Requested by danakj|gardening on #webkit).

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

* DumpRenderTree/chromium/TestEventPrinter.cpp:
* DumpRenderTree/chromium/TestEventPrinter.h:
(TestEventPrinter):
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::dump):

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

9 years ago[EFL][WK2] Implement Favicons API
commit-queue@webkit.org [Mon, 15 Oct 2012 19:44:09 +0000 (19:44 +0000)]
[EFL][WK2] Implement Favicons API
https://bugs.webkit.org/show_bug.cgi?id=99087

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

Source/WebCore:

Moved ewk_util from WebKit to WebCore and rename it
to CairoUtilityEfl so that the code can be shared
between WebKit1 and WebKit2. Some related utility
code was also moved from RenderThemeEfl to
CairoUtilityEfl.

No new tests, no behavior change.

* PlatformEfl.cmake:
* platform/efl/RenderThemeEfl.cpp:
* platform/graphics/efl/CairoUtilitiesEfl.cpp: Renamed from Source/WebKit/efl/ewk/ewk_util.cpp.
(WebCore):
(WebCore::evasObjectFromCairoImageSurface):
(WebCore::createSurfaceForBackingStore):
* platform/graphics/efl/CairoUtilitiesEfl.h: Renamed from Source/WebKit/efl/ewk/ewk_util_private.h.
(WebCore):

Source/WebKit:

Remove ewk_util.cpp from PlatformEfl.cmake now that its
code has been moved to WebCore to be reused in WK2.

* PlatformEfl.cmake:

Source/WebKit/efl:

Remove ewk_util now that its code has been moved
to CairoUtilitiesEfl in WebCore.

* ewk/ewk_history.cpp:
(ewk_history_item_icon_object_add):
* ewk/ewk_settings.cpp:
(ewk_settings_icon_database_icon_object_get):

Source/WebKit2:

Add support for favicon API to EFL WK2 port via
Ewk_Favicon_Database. The API can be used to
retrieve the favicon URL and data for a given
page URL.

* PlatformEfl.cmake:
* UIProcess/API/efl/EWebKit2.h:
* UIProcess/API/efl/ewk_context.cpp:
(_Ewk_Context):
(_Ewk_Context::_Ewk_Context):
(_Ewk_Context::~_Ewk_Context):
(ewk_context_favicon_database_get): Add getter to retrieve the favicon
database instance from the context.
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_favicon_database.cpp: Added.
(IconChangeCallbackData):
(IconChangeCallbackData::IconChangeCallbackData):
(IconRequestCallbackData):
(IconRequestCallbackData::IconRequestCallbackData):
(_Ewk_Favicon_Database):
(_Ewk_Favicon_Database::_Ewk_Favicon_Database):
(didChangeIconForPageURL):
(getIconSurfaceSynchronously):
(iconDataReadyForPageURL):
(ewk_favicon_database_new):
(ewk_favicon_database_free):
(ewk_favicon_database_icon_url_get):
(AsyncIconRequestResponse):
(AsyncIconRequestResponse::AsyncIconRequestResponse):
(respond_icon_request_idle):
(ewk_favicon_database_async_icon_get):
(ewk_favicon_database_icon_change_callback_add):
(ewk_favicon_database_icon_change_callback_del):
* UIProcess/API/efl/ewk_favicon_database.h: Added.
* UIProcess/API/efl/ewk_favicon_database_private.h: Copied from Source/WebKit2/UIProcess/efl/WebContextEfl.cpp.
* UIProcess/API/efl/ewk_view.cpp:
(_Ewk_View_Private_Data):
(_Ewk_View_Private_Data::~_Ewk_View_Private_Data):
(_ewk_view_on_favicon_changed):
(_ewk_view_initialize):
(ewk_view_url_update):
(ewk_view_icon_url_get): Add a getter to the view to retrieve the icon URL for
the page that is currently shown.
(ewk_view_update_icon):
* UIProcess/API/efl/ewk_view.h: Emit a new "icon,changed" signal on the view whenever
the view's icon has changed.
* UIProcess/API/efl/ewk_view_private.h:
* UIProcess/API/efl/tests/resources/blank.ico: Added.
* UIProcess/API/efl/tests/test_ewk2_context.cpp: Add unit test for new favicon database getter.
(TEST_F):
* UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp: Added unit tests for the new Ewk_Favicon_Database API.
(serverCallback):
(onIconChanged):
(TEST_F):
(onIconDataReady):
(IconRequestData):
(requestFaviconData):
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::platformDefaultIconDatabasePath): Return a valid default path for the icon database.

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

9 years agohttps://bugs.webkit.org/show_bug.cgi?id=99350
bdakin@apple.com [Mon, 15 Oct 2012 19:39:58 +0000 (19:39 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=99350
REGRESSION (r131238): Repro crash in
       WebCore::ScrollingStateTree::removeNode(WebCore::ScrollingStateNode*)
opening pdf page
-and corresponding-
<rdar://problem/12499839>

Reviewed by Simon Fraser.

We have to null-check node here. It won't be found if
clearStateTree() was recently called.
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::detachFromStateTree):

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

9 years ago[BlackBerry] replace BlackBerry::Platform::log() with BBLOG()
commit-queue@webkit.org [Mon, 15 Oct 2012 19:35:20 +0000 (19:35 +0000)]
[BlackBerry] replace BlackBerry::Platform::log() with BBLOG()
https://bugs.webkit.org/show_bug.cgi?id=99302

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

RIM PR: 210884
The marco BBLOG() is defined as a no-op in release mode which will
save a function call in the release build.
Internally reviewed by Charles Wei.

Source/WebCore:

No new tests since there's no functional change.

* platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
* platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
(WebCore::GraphicsContext3D::logFrameBufferStatus):
* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::getTransformedHolePunchRect):
* platform/graphics/blackberry/VideoLayerWebKitThread.cpp:
(WebCore::VideoLayerWebKitThread::setHolePunchRect):
(WebCore::VideoLayerWebKitThread::boundsChanged):
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::compileShader):

Source/WebKit/blackberry:

* Api/BackingStore.cpp:
(BlackBerry::WebKit::bestDivisor):
(BlackBerry::WebKit::BackingStorePrivate::suspendScreenAndBackingStoreUpdates):
(BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):
(BlackBerry::WebKit::BackingStorePrivate::repaint):
(BlackBerry::WebKit::BackingStorePrivate::slowScroll):
(BlackBerry::WebKit::BackingStorePrivate::scroll):
(BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
(BlackBerry::WebKit::BackingStorePrivate::scrollBackingStore):
(BlackBerry::WebKit::BackingStorePrivate::render):
(BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
(BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
(BlackBerry::WebKit::BackingStorePrivate::renderContents):
(BlackBerry::WebKit::BackingStorePrivate::blitToWindow):
(BlackBerry::WebKit::BackingStorePrivate::fillWindow):
(BlackBerry::WebKit::BackingStorePrivate::invalidateWindow):
(BlackBerry::WebKit::BackingStorePrivate::clearWindow):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::setLoadState):
(BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
(BlackBerry::WebKit::WebPagePrivate::contentsSizeChanged):
(BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad):
(BlackBerry::WebKit::WebPagePrivate::scheduleRootLayerCommit):
(BlackBerry::WebKit::WebPagePrivate::commitRootLayer):
(BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
(BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::overflowExceedsContentsSize):
(WebCore::ChromeClientBlackBerry::didDiscoverFrameSet):
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::dispatchDidLayout):
* WebKitSupport/FatFingers.cpp:
(BlackBerry::WebKit::FatFingers::checkFingerIntersection):
(BlackBerry::WebKit::FatFingers::findIntersectingRegions):
(BlackBerry::WebKit::FatFingers::checkForText):
* WebKitSupport/RenderQueue.cpp:
(BlackBerry::WebKit::RenderQueue::addToRegularQueue):
(BlackBerry::WebKit::RenderQueue::addToScrollZoomQueue):
(BlackBerry::WebKit::RenderQueue::render):
(BlackBerry::WebKit::RenderQueue::renderAllCurrentRegularRenderJobs):
(BlackBerry::WebKit::RenderQueue::startRegularRenderJobBatchIfNeeded):
(BlackBerry::WebKit::RenderQueue::renderVisibleZoomJob):
(BlackBerry::WebKit::RenderQueue::renderVisibleScrollJob):
(BlackBerry::WebKit::RenderQueue::renderRegularRenderJob):
(BlackBerry::WebKit::RenderQueue::renderNonVisibleScrollJob):
* WebKitSupport/SurfacePool.cpp:
(BlackBerry::WebKit::SurfacePool::initialize):

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

9 years ago[Chromium] Unreviewed gardening. Fix bug link in TestExpectations.
jsbell@chromium.org [Mon, 15 Oct 2012 19:30:40 +0000 (19:30 +0000)]
[Chromium] Unreviewed gardening. Fix bug link in TestExpectations.

* platform/chromium/TestExpectations:

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

9 years ago[EFL] Provide logging for OnlineState detection code
commit-queue@webkit.org [Mon, 15 Oct 2012 19:21:07 +0000 (19:21 +0000)]
[EFL] Provide logging for OnlineState detection code
https://bugs.webkit.org/show_bug.cgi?id=99299

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

Add logging to NetworkStateNotifierEfl.cpp to facilitate
debugging of this functionality.

No new tests, no behavior change.

* platform/network/efl/NetworkStateNotifierEfl.cpp:
(WebCore::NetworkStateNotifier::updateState):

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

9 years agoUnreviewed. Rolled DEPS.
commit-queue@webkit.org [Mon, 15 Oct 2012 19:04:49 +0000 (19:04 +0000)]
Unreviewed.  Rolled DEPS.

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

* DEPS:

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

9 years ago[WebSocket] Update pywebsocket to 0.7.8
bashi@chromium.org [Mon, 15 Oct 2012 18:57:02 +0000 (18:57 +0000)]
[WebSocket] Update pywebsocket to 0.7.8
https://bugs.webkit.org/show_bug.cgi?id=99293

Reviewed by Yuta Kitamura.

Version 0.7.8 supports WebSocket frames and messages compression
with blocks in which BFINAL bit is set to 1.
We need this feature to add a test case of compression extension.

* Scripts/webkitpy/thirdparty/mod_pywebsocket/extensions.py:
(DeflateFrameExtensionProcessor.__init__):
(DeflateFrameExtensionProcessor.set_bfinal):
(DeflateFrameExtensionProcessor._outgoing_filter):
(DeflateMessageProcessor.__init__):
(DeflateMessageProcessor.set_bfinal):
(DeflateMessageProcessor._process_outgoing_message):
* Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py:
(_Deflater.compress_and_finish):
(_RFC1979Deflater.filter):

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

9 years ago[TestResultServer] TestExpectations should only be loaded for the flakiness dashboard
zandobersek@gmail.com [Mon, 15 Oct 2012 18:54:46 +0000 (18:54 +0000)]
[TestResultServer] TestExpectations should only be loaded for the flakiness dashboard
https://bugs.webkit.org/show_bug.cgi?id=99245

Reviewed by Ojan Vafai.

Only load the TestExpectations when using the flakiness dashboard. Other dashboards
don't need them so there's no reason to load them.

* TestResultServer/static-dashboards/dashboard_base.js:
(isFlakinessDashboard):
(appendJSONScriptElements):

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

9 years ago[EFL] Set the basepath of the File System API.
commit-queue@webkit.org [Mon, 15 Oct 2012 18:52:34 +0000 (18:52 +0000)]
[EFL] Set the basepath of the File System API.
https://bugs.webkit.org/show_bug.cgi?id=98344

Patch by Dongwoo Joshua Im <dw.im@samsung.com> on 2012-10-15
Reviewed by Gyuyoung Kim.

Set the basepath of the File System API using the internal setter function.

Source/WebKit:

* PlatformEfl.cmake: Add new include path.

Source/WebKit/efl:

* ewk/ewk_main.cpp:
(_ewk_init_body): Call the setter function with the default path.
* ewk/ewk_settings.cpp:
(ewk_settings_file_system_path_set): Set the given path as the base path of the file system.
* ewk/ewk_settings_private.h: Add ewk_settings_file_system_path_set.

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

9 years agoParallel GC should not be disabled for all platforms
mhahnenberg@apple.com [Mon, 15 Oct 2012 18:52:32 +0000 (18:52 +0000)]
Parallel GC should not be disabled for all platforms

* wtf/Platform.h: D'oh!

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

9 years ago[chromium] Provide used JSHeap size in chromium's DRT for pageloadtest memory measure...
zoltan@webkit.org [Mon, 15 Oct 2012 18:48:00 +0000 (18:48 +0000)]
[chromium] Provide used JSHeap size in chromium's DRT for pageloadtest memory measurements
https://bugs.webkit.org/show_bug.cgi?id=99288

Reviewed by Ryosuke Niwa.

Provide used JSHeap size as we did it for the Apple port.

* DumpRenderTree/chromium/TestEventPrinter.cpp:
(TestEventPrinter::handleDumpMemoryHeader): Add new function to print the JSHeap memory result.
* DumpRenderTree/chromium/TestEventPrinter.h:
(TestEventPrinter): handleDumpMemoryHeader declaration.
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::dump): Dump JSHeap value.

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

9 years ago[BlackBerry] [DRT] Skip region of interest zooming when running DRT
commit-queue@webkit.org [Mon, 15 Oct 2012 18:33:37 +0000 (18:33 +0000)]
[BlackBerry] [DRT] Skip region of interest zooming when running DRT
https://bugs.webkit.org/show_bug.cgi?id=97663

Patch by Xiaobo Wang <xbwang@torchmobile.com.cn> on 2012-10-15
Reviewed by Rob Buis.

This patch fixes test fast/forms/textarea-scrolled-endline-caret.html, and
1. Add a global function isRunningDrt to check if we're currently running DRT.
2. Use the new function in places where getenv("drtRun") is used.

* Api/BlackBerryGlobal.cpp:
(BlackBerry::WebKit::isRunningDrt):
(WebKit):
* Api/BlackBerryGlobal.h:
(WebKit):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::init):
* WebKitSupport/DumpRenderTreeSupport.cpp:
(toGeolocationClientMock):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):

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

9 years ago[Regression r131167] run-webkit-tests fails
morrita@google.com [Mon, 15 Oct 2012 18:26:18 +0000 (18:26 +0000)]
[Regression r131167] run-webkit-tests fails
https://bugs.webkit.org/show_bug.cgi?id=99279

Reviewed by Kentaro Hara.

CodeGeneratorV8.pm assumed that there are only two objects which have constructor getters and
overlooked TestObj. This fix relaxes that assumption to accept it.

No new tests. Fixing an existing test.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateConstructorGetter):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::TestObjConstructorGetter):

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

9 years ago[BlackBerry] Fix WebSockets which was disabled by recent string changes
commit-queue@webkit.org [Mon, 15 Oct 2012 18:14:26 +0000 (18:14 +0000)]
[BlackBerry] Fix WebSockets which was disabled by recent string changes
https://bugs.webkit.org/show_bug.cgi?id=99248

Patch by Joe Mason <jmason@rim.com> on 2012-10-15
Reviewed by George Staikos.

PR 223681: The signature of FilterStream::notifyStatusReceived changed to take a
BlackBerry::Platform::String instead of a char *. But SocketStreamHandleBlackBerry was not
updated to the new signature, so the status message is not getting passed on because it is
not calling the correct override.

No new tests because this is fixing a regression.

* platform/network/blackberry/SocketStreamHandle.h:
(SocketStreamHandle):
* platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
(WebCore::SocketStreamHandle::notifyStatusReceived):

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

9 years ago[EFL] Share resources installed for inspector
ryuan.choi@samsung.com [Mon, 15 Oct 2012 18:09:52 +0000 (18:09 +0000)]
[EFL] Share resources installed for inspector
https://bugs.webkit.org/show_bug.cgi?id=98991

Reviewed by Gyuyoung Kim.

.:

Now, WebKit1/Efl and WebKit2/Efl install same resources to different directory
when INSPECTOR is enabled.

This patch changes to install resources one time and share it.

* Source/PlatformEfl.cmake:
Extracted build scripts which install resources from WebKit/PlatformEfl.cmake.
* Source/cmake/OptionsEfl.cmake:

Source/WebKit:

* PlatformEfl.cmake:
Extracted build scripts which install resources to WebKit/PlatformEfl.cmake.

Source/WebKit2:

* PlatformEfl.cmake: Removed build script which install resources to share.
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::inspectorPageURL): Modified not to use makeString.
(WebKit::WebInspectorProxy::inspectorBaseURL): Changed resource path.

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

9 years agoRemove RenderTextControl::isSelectableElement
rwlbuis@webkit.org [Mon, 15 Oct 2012 18:04:46 +0000 (18:04 +0000)]
Remove RenderTextControl::isSelectableElement
https://bugs.webkit.org/show_bug.cgi?id=99334

Reviewed by Andreas Kling.

It seems this method is not used anymore.

* WebCore.order:
* rendering/RenderTextControl.h:

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

9 years agoMake CopiedSpace and MarkedSpace regions independent
mhahnenberg@apple.com [Mon, 15 Oct 2012 17:47:46 +0000 (17:47 +0000)]
Make CopiedSpace and MarkedSpace regions independent
https://bugs.webkit.org/show_bug.cgi?id=99222

Reviewed by Filip Pizlo.

Right now CopiedSpace and MarkedSpace have the same block size and share the same regions,
but there's no reason that they can't have different block sizes while still sharing the
same underlying regions. We should factor the two "used" lists of regions apart so that
MarkedBlocks and CopiedBlocks can be different sizes. Regions will still be a uniform size
so that when they become empty they may be shared between the CopiedSpace and the MarkedSpace,
since benchmarks indicate that sharing is a boon for performance.

* heap/BlockAllocator.cpp:
(JSC::BlockAllocator::BlockAllocator):
* heap/BlockAllocator.h:
(JSC):
(Region):
(JSC::Region::create): We now have a fixed size for Regions so that empty regions can continue to
be shared between the MarkedSpace and CopiedSpace. Once they are used for a specific type of block,
however, they can only be used for that type of block until they become empty again.
(JSC::Region::createCustomSize):
(JSC::Region::Region):
(JSC::Region::~Region):
(JSC::Region::reset):
(BlockAllocator):
(JSC::BlockAllocator::RegionSet::RegionSet):
(RegionSet):
(JSC::BlockAllocator::tryAllocateFromRegion): We change this function so that it correctly
moves blocks between empty, partial, and full lists.
(JSC::BlockAllocator::allocate):
(JSC::BlockAllocator::allocateCustomSize):
(JSC::BlockAllocator::deallocate): Ditto.
(JSC::CopiedBlock):
(JSC::MarkedBlock):
(JSC::BlockAllocator::regionSetFor): We use this so that we can use the same allocate/deallocate
functions with different RegionSets. We specialize the function for each type of block that we
want to allocate.
* heap/CopiedBlock.h:
(CopiedBlock):
* heap/CopiedSpace.h:
(CopiedSpace):
* heap/HeapBlock.h:
(HeapBlock):
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::MarkedBlock): For oversize MarkedBlocks, if the block size gets too big we can
underflow the endAtom, which will cause us to segfault when we try to sweep a block. If we're a
custom size MarkedBlock we need to calculate endAtom so it doesn't underflow.

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

9 years agoJIT::JIT fails to initialize all of its fields
fpizlo@apple.com [Mon, 15 Oct 2012 17:39:44 +0000 (17:39 +0000)]
JIT::JIT fails to initialize all of its fields
https://bugs.webkit.org/show_bug.cgi?id=99283

Reviewed by Andreas Kling.

There were two groups of such fields, all of which are eventually initialized
prior to use inside of privateCompile(). But it's safer to make sure that they
are initialized in the constructor as well, since we may use the JIT to do a
stub compile without calling into privateCompile().

Unsigned index fields for dynamic repatching meta-data: this change
initializes them to UINT_MAX, so we should crash if we try to use those
indices without initializing them.

Boolean flags for value profiling: this change initializes them to false, so
we at worst turn off value profiling.

* jit/JIT.cpp:
(JSC::JIT::JIT):

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

9 years agoLayout Test inspector/debugger/dynamic-scripts.html is flaky
danakj@chromium.org [Mon, 15 Oct 2012 17:37:13 +0000 (17:37 +0000)]
Layout Test inspector/debugger/dynamic-scripts.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=99338

Unreviewed gardening.

* platform/chromium/TestExpectations:

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

9 years agoWe should avoid weakCompareAndSwap when parallel GC is disabled
mhahnenberg@apple.com [Mon, 15 Oct 2012 17:34:23 +0000 (17:34 +0000)]
We should avoid weakCompareAndSwap when parallel GC is disabled
https://bugs.webkit.org/show_bug.cgi?id=99331

Reviewed by Filip Pizlo.

CopiedBlock::reportLiveBytes and didEvacuateBytes uses weakCompareAndSwap, which some platforms
don't support. For platforms that don't have parallel GC enabled, we should just use a normal store.

* heap/CopiedBlock.h:
(JSC::CopiedBlock::reportLiveBytes):
(JSC::CopiedBlock::didEvacuateBytes):

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

9 years agoCSP source expressions should support paths at file-level granularity.
mkwst@chromium.org [Mon, 15 Oct 2012 17:33:12 +0000 (17:33 +0000)]
CSP source expressions should support paths at file-level granularity.
https://bugs.webkit.org/show_bug.cgi?id=99250

Reviewed by Adam Barth.

Source/WebCore:

After a bit of discussion on public-webappsec[1], path support for CSP
source expressions has been tuned to support file-level granularity. In
particular, this means that:

- 'example.com/js' matches a file named 'js'
- 'example.com/js/' matches all files under a directory named 'js'
  (note the trailing slash)
- 'example.com/js/file.js' matches only a file named 'file.js'
  inside a directory named 'js'

Though this is part of the CSP 1.1 spec, it continues to be exposed
outside the CSP_NEXT flag for back-compatibility.

Test cases have been added to the existing
http/tests/security/contentSecurityPolicy/source-list-parsing-paths-*
in order ensure that the new functionality works correctly.

* page/ContentSecurityPolicy.cpp:
(WebCore::CSPSource::pathMatches):
    If the path ends with '/', do a prefix check. If not, check for an
    exact match.
(WebCore::CSPSourceList::parsePath):
    Don't automatically append a '/' to paths.

LayoutTests:

* http/tests/security/contentSecurityPolicy/source-list-parsing-paths-01.html:
    Adjust tests by adding trailing slashes to source expressions that
    should match directories.
* http/tests/security/contentSecurityPolicy/source-list-parsing-paths-02-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-paths-02.html:
    Adjust tests to check the new behavior: matching individiual files,
    and matching directories only with a trailing '/'.

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

9 years ago[BlackBerry] Adapt to Platform API changes in string handling
staikos@webkit.org [Mon, 15 Oct 2012 17:31:38 +0000 (17:31 +0000)]
[BlackBerry] Adapt to Platform API changes in string handling
https://bugs.webkit.org/show_bug.cgi?id=99248

Reviewed by Yong Li.

Convert usage of WebString, char* and std::string to BlackBerry::Platform::String.

Source/WebCore:

* html/track/TextTrack.cpp:
(WebCore::TextTrack::TextTrack): Fix the build for BlackBerry.
* page/blackberry/SettingsBlackBerry.cpp:
(WebCore):
(WebCore::Settings::initializeDefaultFontFamilies):
* platform/blackberry/LocalizedStringsBlackBerry.cpp:
* platform/blackberry/MIMETypeRegistryBlackBerry.cpp:
(WebCore::MIMETypeRegistry::getMIMETypeForExtension):
(WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
* platform/blackberry/PasteboardBlackBerry.cpp:
(WebCore::Pasteboard::writeSelection):
(WebCore::Pasteboard::writeURL):
(WebCore::Pasteboard::writePlainText):
(WebCore::Pasteboard::plainText):
(WebCore::Pasteboard::documentFragment):
* platform/blackberry/ReadOnlyLatin1String.h: Removed.
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::getSupportedTypes):
(WebCore::MediaPlayerPrivate::supportsType):
(WebCore::MediaPlayerPrivate::setCertificatePath):
(WebCore::MediaPlayerPrivate::load):
(WebCore::generateProtectionSpaceFromMMRAuthChallenge):
(WebCore::MediaPlayerPrivate::onAuthenticationNeeded):
(WebCore::MediaPlayerPrivate::onAuthenticationAccepted):
(WebCore::MediaPlayerPrivate::lookupMediaStream):
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
(MediaPlayerPrivate):
(WebCore::MediaPlayerPrivate::engineDescription):
* platform/network/blackberry/DNSBlackBerry.cpp:
(WebCore::prefetchDNS):
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::initialize):
(WebCore::NetworkJob::notifyStatusReceived):
(WebCore::NetworkJob::notifyHeadersReceived):
(WebCore::NetworkJob::handleNotifyClose):
(WebCore::NetworkJob::sendRequestWithCredentials):
* platform/network/blackberry/NetworkJob.h:
(NetworkJob):
* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::startJob):
* platform/network/blackberry/ResourceRequestBlackBerry.cpp:
(WebCore::ResourceRequest::initializePlatformRequest):
* platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
(WebCore::SocketStreamHandle::SocketStreamHandle):
* platform/text/blackberry/StringBlackBerry.cpp:
(WTF::String::String):
(WTF::String::operator BlackBerry::Platform::String):
* platform/text/blackberry/TextBreakIteratorInternalICUBlackBerry.cpp:

Source/WebKit:

* PlatformBlackBerry.cmake:

Source/WebKit/blackberry:

* Api/BlackBerryGlobal.cpp:
(BlackBerry::WebKit::clearAppCache):
(BlackBerry::WebKit::clearDatabase):
* Api/BlackBerryGlobal.h:
(Platform):
(WebKit):
* Api/JavaScriptVariant.cpp:
(BlackBerry::WebKit::JSValueRefToBlackBerryJavaScriptVariant):
(BlackBerry::WebKit::BlackBerryJavaScriptVariantToJSValueRef):
(BlackBerry::WebKit::JavaScriptVariant::JavaScriptVariant):
(WebKit):
(BlackBerry::WebKit::JavaScriptVariant::~JavaScriptVariant):
(BlackBerry::WebKit::JavaScriptVariant::setType):
(BlackBerry::WebKit::JavaScriptVariant::setString):
(BlackBerry::WebKit::JavaScriptVariant::stringValue):
* Api/JavaScriptVariant.h:
* Api/WebAnimation.cpp:
(BlackBerry::WebKit::WebAnimation::fadeAnimation):
(BlackBerry::WebKit::WebAnimation::name):
* Api/WebAnimation.h:
* Api/WebCookieJar.cpp:
(BlackBerry::WebKit::WebCookieJar::cookies):
(BlackBerry::WebKit::WebCookieJar::setCookies):
* Api/WebCookieJar.h:
(Platform):
(BlackBerry):
(WebKit):
* Api/WebKitMIMETypeConverter.cpp:
(BlackBerry::WebKit::getExtensionForMimeType):
(BlackBerry::WebKit::getMimeTypeForExtension):
* Api/WebKitMIMETypeConverter.h:
(Platform):
(BlackBerry):
(WebKit):
* Api/WebKitTextCodec.cpp:
(BlackBerry::WebKit::base64Decode):
(BlackBerry::WebKit::base64Encode):
(BlackBerry::WebKit::unescapeURL):
(BlackBerry::WebKit::escapeURL):
* Api/WebKitTextCodec.h:
(Platform):
(BlackBerry):
* Api/WebOverlay.cpp:
(BlackBerry::WebKit::WebOverlay::removeAnimation):
* Api/WebOverlay.h:
(Platform):
(BlackBerry):
(WebKit):
* Api/WebOverlayOverride.cpp:
(BlackBerry::WebKit::WebOverlayOverride::removeAnimation):
* Api/WebOverlayOverride.h:
(Platform):
(BlackBerry):
(WebKit):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::autofillTextField):
(BlackBerry::WebKit::WebPage::renderTreeAsText):
(BlackBerry::WebKit::WebPage::WebPage):
(BlackBerry::WebKit::WebPagePrivate::init):
(BlackBerry::WebKit::WebPagePrivate::load):
(BlackBerry::WebKit::WebPage::load):
(BlackBerry::WebKit::WebPage::loadFile):
(BlackBerry::WebKit::WebPage::download):
(BlackBerry::WebKit::WebPagePrivate::loadString):
(BlackBerry::WebKit::WebPage::loadString):
(BlackBerry::WebKit::WebPagePrivate::executeJavaScript):
(BlackBerry::WebKit::WebPage::executeJavaScript):
(BlackBerry::WebKit::WebPagePrivate::executeJavaScriptInIsolatedWorld):
(BlackBerry::WebKit::WebPage::executeJavaScriptInIsolatedWorld):
(BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
(BlackBerry::WebKit::WebPagePrivate::addOriginAccessWhitelistEntry):
(BlackBerry::WebKit::WebPage::addOriginAccessWhitelistEntry):
(BlackBerry::WebKit::WebPagePrivate::removeOriginAccessWhitelistEntry):
(BlackBerry::WebKit::WebPage::removeOriginAccessWhitelistEntry):
(BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
(BlackBerry::WebKit::WebPagePrivate::syncProxyCredential):
(BlackBerry::WebKit::WebPagePrivate::notifyPopupAutofillDialog):
(BlackBerry::WebKit::WebPagePrivate::webContext):
(BlackBerry::WebKit::WebPage::setDateTimeInput):
(BlackBerry::WebKit::WebPage::setColorInput):
(BlackBerry::WebKit::WebPage::textEncoding):
(BlackBerry::WebKit::WebPage::forcedTextEncoding):
(BlackBerry::WebKit::WebPage::setForcedTextEncoding):
(BlackBerry::WebKit::WebPage::title):
(BlackBerry::WebKit::WebPage::selectedText):
(BlackBerry::WebKit::WebPage::cutSelectedText):
(BlackBerry::WebKit::WebPage::insertText):
(BlackBerry::WebKit::WebPage::getBackForwardList):
(BlackBerry::WebKit::WebPage::onCertificateStoreLocationSet):
(BlackBerry::WebKit::WebPage::dispatchInspectorMessage):
(BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
(BlackBerry::WebKit::WebPage::textHasAttribute):
(BlackBerry::WebKit::WebPage::setAllowNotification):
(BlackBerry::WebKit::WebPagePrivate::defaultUserAgent):
* Api/WebPage.h:
* Api/WebPageClient.h:
* Api/WebPage_p.h:
(WebPagePrivate):
* Api/WebSettings.cpp:
(BlackBerry::WebKit::WebSettings::standardSettings):
(BlackBerry::WebKit::WebSettings::addSupportedObjectPluginMIMEType):
(BlackBerry::WebKit::WebSettings::isSupportedObjectMIMEType):
(BlackBerry::WebKit::WebSettings::serifFontFamily):
(BlackBerry::WebKit::WebSettings::setSerifFontFamily):
(BlackBerry::WebKit::WebSettings::fixedFontFamily):
(BlackBerry::WebKit::WebSettings::setFixedFontFamily):
(BlackBerry::WebKit::WebSettings::sansSerifFontFamily):
(BlackBerry::WebKit::WebSettings::setSansSerifFontFamily):
(BlackBerry::WebKit::WebSettings::standardFontFamily):
(BlackBerry::WebKit::WebSettings::setStandardFontFamily):
(BlackBerry::WebKit::WebSettings::userAgentString):
(BlackBerry::WebKit::WebSettings::setUserAgentString):
(BlackBerry::WebKit::WebSettings::defaultTextEncodingName):
(BlackBerry::WebKit::WebSettings::setDefaultTextEncodingName):
(BlackBerry::WebKit::WebSettings::userStyleSheetString):
(BlackBerry::WebKit::WebSettings::setUserStyleSheetString):
(BlackBerry::WebKit::WebSettings::userStyleSheetLocation):
(BlackBerry::WebKit::WebSettings::setUserStyleSheetLocation):
(BlackBerry::WebKit::WebSettings::localStoragePath):
(BlackBerry::WebKit::WebSettings::setLocalStoragePath):
(BlackBerry::WebKit::WebSettings::indexedDataBasePath):
(BlackBerry::WebKit::WebSettings::setIndexedDataBasePath):
(BlackBerry::WebKit::WebSettings::databasePath):
(BlackBerry::WebKit::WebSettings::setDatabasePath):
(BlackBerry::WebKit::WebSettings::appCachePath):
(BlackBerry::WebKit::WebSettings::setAppCachePath):
(BlackBerry::WebKit::WebSettings::pageGroupName):
(BlackBerry::WebKit::WebSettings::setPageGroupName):
* Api/WebSettings.h:
* Api/WebString.cpp: Removed.
* Api/WebString.h: Removed.
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::runJavaScriptPrompt):
(WebCore::ChromeClientBlackBerry::createWindow):
(WebCore::ChromeClientBlackBerry::runOpenPanel):
(WebCore):
* WebCoreSupport/ChromeClientBlackBerry.h:
(ChromeClientBlackBerry):
* WebCoreSupport/ClientExtension.cpp:
(clientExtensionMethod):
* WebCoreSupport/ColorPickerClient.cpp:
(WebCore::ColorPickerClient::ColorPickerClient):
(WebCore::ColorPickerClient::generateHTML):
* WebCoreSupport/ColorPickerClient.h:
(Platform):
(BlackBerry):
(WebKit):
(ColorPickerClient):
* WebCoreSupport/CredentialManager.cpp:
(WebCore::CredentialManager::autofillAuthenticationChallenge):
* WebCoreSupport/CredentialManager.h:
(Platform):
(CredentialManager):
* WebCoreSupport/DatePickerClient.cpp:
(WebCore::DatePickerClient::DatePickerClient):
(WebCore::DatePickerClient::generateHTML):
* WebCoreSupport/DatePickerClient.h:
(Platform):
(BlackBerry):
(WebKit):
(DatePickerClient):
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForResponse):
(WebCore::FrameLoaderClientBlackBerry::createDocumentLoader):
(WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad):
(WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):
(WebCore::FrameLoaderClientBlackBerry::dispatchCreatePage):
(WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
(WebCore::FrameLoaderClientBlackBerry::loadIconExternally):
(WebCore::FrameLoaderClientBlackBerry::startDownload):
(WebCore::FrameLoaderClientBlackBerry::dispatchDidReceiveIcon):
* WebCoreSupport/IconDatabaseClientBlackBerry.cpp:
* WebCoreSupport/NotificationPresenterImpl.cpp:
(WebCore::NotificationPresenterImpl::show):
(WebCore::NotificationPresenterImpl::cancel):
(WebCore::NotificationPresenterImpl::requestPermission):
(WebCore::NotificationPresenterImpl::onPermission):
(WebCore::NotificationPresenterImpl::notificationClicked):
* WebCoreSupport/NotificationPresenterImpl.h:
(Platform):
(NotificationPresenterImpl):
* WebCoreSupport/SelectPopupClient.cpp:
(WebCore::SelectPopupClient::SelectPopupClient):
(WebCore::SelectPopupClient::update):
(WebCore::SelectPopupClient::generateHTML):
* WebCoreSupport/SelectPopupClient.h:
(Platform):
(BlackBerry):
(SelectPopupClient):
* WebCoreSupport/UserMediaClientImpl.cpp:
(WebCore::toMediaStreamSource):
(WebCore::toMediaStreamDescriptor):
(WebCore::UserMediaClientImpl::requestUserMedia):
(WebCore::UserMediaClientImpl::cancelUserMediaRequest):
* WebKitSupport/AboutData.cpp:
(BlackBerry::WebKit::cachePage):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::convertStringToWchar):
(BlackBerry::WebKit::convertStringToWcharVector):
(BlackBerry::WebKit::convertSpannableStringToString):
(BlackBerry::WebKit::InputHandler::learnText):
(BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
(BlackBerry::WebKit::InputHandler::openDatePopup):
(BlackBerry::WebKit::InputHandler::openSelectPopup):
(BlackBerry::WebKit::InputHandler::setText):
* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::selectedText):
* WebKitSupport/SelectionHandler.h:
(Platform):
(WebKit):
(SelectionHandler):
* WebKitSupport/SurfacePool.cpp:
(BlackBerry::WebKit::SurfacePool::sharedPixmapGroup):
* WebKitSupport/SurfacePool.h:
(SurfacePool):

Source/WTF:

* wtf/Assertions.cpp: Use proper log function.
* wtf/text/AtomicString.h: Add BlackBerry support
(AtomicString):
(WTF::AtomicString::AtomicString): Add BlackBerry Support
(WTF::AtomicString::operator BlackBerry::Platform::String):
* wtf/text/StringImpl.h: Conversion support.
* wtf/text/WTFString.h: Conversion support.
(Platform):
(String):

Tools:

* DumpRenderTree/blackberry/DumpRenderTree.cpp:
(BlackBerry::WebKit::DumpRenderTree::runTest):
* DumpRenderTree/blackberry/WorkQueueItemBlackBerry.cpp:
(LoadHTMLStringItem::invoke):
(ScriptItem::invoke):

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

9 years agoCalling WebCore::SharedBuffer::append(data, 0) on a shared buffer when
jcivelli@chromium.org [Mon, 15 Oct 2012 17:25:58 +0000 (17:25 +0000)]
Calling WebCore::SharedBuffer::append(data, 0) on a shared buffer when
its current position is at a segment boundary (4096) ends up adding an
unitialized segment (with uninitialized memory) to the SharedBuffer.
https://bugs.webkit.org/show_bug.cgi?id=99000

Reviewed by Adam Barth.

Source/WebCore:

* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::append):

LayoutTests:

* mhtml/shared_buffer_bug-expected.txt: Added.
* mhtml/shared_buffer_bug.mht: Added.

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

9 years ago[BlackBerry] Clean up BackingStoreClient (part II)
tonikitoo@webkit.org [Mon, 15 Oct 2012 17:15:34 +0000 (17:15 +0000)]
[BlackBerry] Clean up BackingStoreClient (part II)
https://bugs.webkit.org/show_bug.cgi?id=99327

Reviewed by Yong Li.
Patch by Antonio Gomes <agomes@rim.com>

Remove more unneeded BackingStoreClient <-> WebPageClient integration
methods:
- BackingStoreClient* backingStoreClientForFrame(...)
- void addBackingStoreClientForFrame(...)
- void removeBackingStoreClientForFrame(...)

Change places calling WPPriv::backingStoreClientForFrame to directly
access WPPriv::backingStoreClient instead, since only the main frame will
have a BackingStoreClient instance associated with it, and it is owned by
the WKPriv.

Remove non-mainframe only references to BackingStoreClient completely,
since it is dead code now.

* Api/InRegionScroller.cpp:
(BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::backingStoreClient):
(BlackBerry::WebKit::WebPage::destroy):
* Api/WebPage_p.h:
(WebPagePrivate):
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::invalidateContentsForSlowScroll):
(WebCore::ChromeClientBlackBerry::scroll):
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage):
(WebCore::FrameLoaderClientBlackBerry::createFrame):
(WebCore::FrameLoaderClientBlackBerry::detachedFromParent2):
* WebKitSupport/BackingStoreClient.cpp:
(BlackBerry::WebKit::BackingStoreClient::create):
(BlackBerry::WebKit::BackingStoreClient::BackingStoreClient):
(BlackBerry::WebKit::BackingStoreClient::~BackingStoreClient):
* WebKitSupport/BackingStoreClient.h:
(BackingStoreClient):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::setBatchEditingActive):

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

9 years agoMake CSS variable names case-insensitive.
macpherson@chromium.org [Mon, 15 Oct 2012 17:09:25 +0000 (17:09 +0000)]
Make CSS variable names case-insensitive.
https://bugs.webkit.org/show_bug.cgi?id=98712

Reviewed by Tony Chang.

Source/WebCore:

This patch modifies the parser to normalize all variable names to lower case,
making variable definitions consistent with other property names, which are also case insensitive.
Spec: http://dev.w3.org/csswg/css-variables/#defining-variables

Test: fast/css/variables/case-insensitive.html

* css/CSSParser.cpp:
(WebCore::CSSParser::createPrimitiveNumericValue):
(WebCore):
(WebCore::CSSParser::createPrimitiveVariableNameValue):
(WebCore::CSSParser::parseValidPrimitive):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::storeVariableDeclaration):
(WebCore::CSSParserString::lowerSubstring):
Added function to compute a lower case substring as an AtomicString from a CSSParserString.
* css/CSSParser.h:
(CSSParser):
* css/CSSParserValues.h:
(CSSParserString):
(WebCore::CSSParserString::lowerSubstring):

LayoutTests:

Add test that variable names are match correctly when different case is used.

* fast/css/variables/case-insensitive-expected.html: Added.
* fast/css/variables/case-insensitive.html: Added.

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

9 years ago[EFL][EWebLauncher] Add encoding detector option.
commit-queue@webkit.org [Mon, 15 Oct 2012 17:06:33 +0000 (17:06 +0000)]
[EFL][EWebLauncher] Add encoding detector option.
https://bugs.webkit.org/show_bug.cgi?id=98726

Patch by Kangil Han <kangil.han@samsung.com> on 2012-10-15
Reviewed by Gyuyoung Kim.

Added an option to test WebCore's encoding detector functionality on EWebLauncher.
With this patch, EWebLauncher would display text correctly even if web page wouldn't specify charset information.

* EWebLauncher/main.c:
(_User_Arguments):
(windowCreate):
(parseUserArguments):

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

9 years agoUpdate RenderText to use String instead of UChar* for text
msaboff@apple.com [Mon, 15 Oct 2012 16:56:29 +0000 (16:56 +0000)]
Update RenderText to use String instead of UChar* for text
https://bugs.webkit.org/show_bug.cgi?id=96979

Reviewed by Dan Bernstein.

Source/WebCore:

RenderText now uses a String for text.  It keeps a cached LCHar* or UChar* pointer to the
actual text data for performance.  Added a characterAt() indexed accessor to RenderText to avoid the
somewhat confusing construct for a RenderText* rt, e.g. (*re)[n] or rt->characters()[n].  This is
now written as rt->characterAt(n).
Enabled patch in the HTML parser to create 8 bit text data.  Modified TextRun to create
text runs using 8 bit string data where possible.  Added several flavors of RenderBlock::constructTextRun
to create TextRuns from RenderText objects including with an offset.  Added an LChar flavor of constructTextRun()
as well.  Eliminated the TextRunFlags argument to all but the String flavor as all other flavors used the default
parameter.
Encased the code that creates 8 bit TextRun's in #if USE(8BIT_TEXTRUN).  Enabled WTF_USE_8BIT_TEXTRUN
for PLATFORM(MAC).  Other platform can update this setting in Platform.h when their platform specific code is
updated to TextRun's with 8 bit data.
Added many 8/16 bit aware paths.  Cleanup up some int / unsigned confusion in RenderBlockLineLayout.cpp.

No function change therefore no new tests.

* html/parser/HTMLTokenizer.cpp:
(WebCore::vectorEqualsString):
(WebCore::HTMLTokenizer::nextToken):
* html/parser/HTMLTokenizer.h:
(HTMLTokenizer):
* html/track/WebVTTTokenizer.cpp:
(WebCore::vectorEqualsString):
(WebCore::WebVTTTokenizer::nextToken):
* html/track/WebVTTTokenizer.h:
(WebVTTTokenizer):
* platform/graphics/Font.h:
(WebCore::Font::glyphDataForCharacter):
* platform/graphics/FontFastPath.cpp:
(WebCore):
* platform/graphics/TextRun.h:
(WebCore::TextRun::TextRun):
(WebCore::TextRun::subRun):
(TextRun):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::TextLayout::isNeeded):
(WebCore::TextLayout::constructTextRun):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::placeBoxesInInlineDirection):
* rendering/InlineIterator.h:
(WebCore::InlineIterator::atTextParagraphSeparator):
(WebCore::InlineIterator::current):
(WebCore::InlineIterator::previousInSameNode):
* rendering/InlineTextBox.cpp:
(WebCore::adjustCharactersAndLengthForHyphen):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::constructTextRun):
* rendering/InlineTextBox.h:
(InlineTextBox):
* rendering/RenderBlock.cpp:
(WebCore::constructTextRunInternal):
(WebCore::RenderBlock::constructTextRun):
* rendering/RenderBlock.h:
(RenderBlock):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::endsWithASCIISpaces):
(WebCore::reachedEndOfTextRenderer):
(WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
(WebCore::shouldSkipWhitespaceAfterStartObject):
(WebCore::textWidth):
(WebCore::tryHyphenating):
(WebCore::RenderBlock::LineBreaker::nextLineBreak):
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::getStringToRender):
(WebCore::RenderCombineText::combineText):
* rendering/RenderCombineText.h:
(RenderCombineText):
* rendering/RenderText.cpp:
(SameSizeAsRenderText):
(WebCore::RenderText::RenderText):
(WebCore::RenderText::widthFromCache):
(WebCore::RenderText::computePreferredLogicalWidths):
(WebCore::RenderText::setTextInternal):
(WebCore::RenderText::width):
* rendering/RenderText.h:
(WebCore::RenderText::is8Bit):
(WebCore::RenderText::characters8):
(WebCore::RenderText::characters16):
(WebCore::RenderText::characterAt):
(WebCore::RenderText::operator[]):
(RenderText):
* xml/parser/MarkupTokenBase.h:
(WebCore::MarkupTokenBase::appendToCharacter):
(MarkupTokenBase):
(WebCore::MarkupTokenBase::isAll8BitData):

Source/WTF:

Added WTF_USE_8BIT_TEXTRUN to encase code that creates 8 bit TextRun's.  Enabled WTF_USE_8BIT_TEXTRUN
for PLATFORM(MAC).  Other platform can update this setting in Platform.h when their platform specific use of
TextRun handle 8 bit data.  Added a new Vector::appendVector to allow appending the contents of a vector
containing one type to the end of vector containing another.  This is used to append a Vector<LChar> to
the end of a Vector<UChar>.

* wtf/Platform.h:
* wtf/Vector.h:
(Vector):
(WTF::Vector::appendVector):

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

9 years agoBuild fix for Mac debug build.
loislo@chromium.org [Mon, 15 Oct 2012 16:51:01 +0000 (16:51 +0000)]
Build fix for Mac debug build.

* TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:

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

9 years agoUnreviewed inspector tests fix.
vsevik@chromium.org [Mon, 15 Oct 2012 16:45:57 +0000 (16:45 +0000)]
Unreviewed inspector tests fix.

* http/tests/inspector-enabled/dynamic-scripts-expected.txt:
* http/tests/inspector-enabled/dynamic-scripts.html:
* inspector/debugger/dynamic-scripts-expected.txt:
* inspector/debugger/dynamic-scripts.html:

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

9 years ago [WK2] Add SharedWorkerProcess
ap@apple.com [Mon, 15 Oct 2012 16:29:44 +0000 (16:29 +0000)]
    [WK2] Add SharedWorkerProcess
        https://bugs.webkit.org/show_bug.cgi?id=99218

        Reviewed by Sam Weinig.

        Not yet functional, just some boilerplate code.

        * Configurations/SharedWorkerProcess.xcconfig: Added.

        * DerivedSources.make: Generate message dispatch for SharedWorkerProcess and
        SharedWorkerProcessProxy.

        * Platform/CoreIPC/MessageID.h: Added shared worker messages classes.

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

        * Shared/SharedWorkerProcessCreationParameters.cpp: Added.
        * SharedWorkerProcess/Info.plist: Added.
        * SharedWorkerProcess/SharedWorkerProcess.cpp: Added.
        * SharedWorkerProcess/SharedWorkerProcess.h: Added.
        * SharedWorkerProcess/SharedWorkerProcess.messages.in: Added.
        * SharedWorkerProcess/SharedWorkerProcessMain.h: Added.
        * SharedWorkerProcess/mac/SharedWorkerProcessMac.mm: Added.
        * SharedWorkerProcess/mac/SharedWorkerProcessMainMac.mm: Added.
        * SharedWorkerProcess/mac/com.apple.WebKit.SharedWorkerProcess.sb: Added.
        * UIProcess/SharedWorkers/SharedWorkerProcessManager.cpp: Added.
        * UIProcess/SharedWorkers/SharedWorkerProcessManager.h: Added.
        * UIProcess/SharedWorkers/SharedWorkerProcessProxy.cpp: Added.
        * UIProcess/SharedWorkers/SharedWorkerProcessProxy.h: Added.
        * UIProcess/SharedWorkers/SharedWorkerProcessProxy.messages.in: Added.
        * WebKit2.xcodeproj/project.pbxproj:
        Added SharedWorkerProcess boilerplate, modeled after PluginProcess.

        * UIProcess/WebProcessProxy.cpp:
        * UIProcess/WebProcessProxy.h:
        * UIProcess/WebProcessProxy.messages.in:
        Added getSharedWorkerProcessConnection() message.

        * WebProcess/WebKitMain.cpp: (WebKitMain):
        * UIProcess/Launcher/ProcessLauncher.cpp:
        (WebKit::ProcessLauncher::processTypeAsString):
        (WebKit::ProcessLauncher::getProcessTypeFromString):
        * UIProcess/Launcher/ProcessLauncher.h:
        * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::createProcess):
        Added branches for SharedWorkerProcess.

        * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): Added a version
        for delayed reply messages with two arguments.

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

9 years ago[Qt] Implement pixel snapshot generation in WTR
kbalazs@webkit.org [Mon, 15 Oct 2012 16:22:23 +0000 (16:22 +0000)]
[Qt] Implement pixel snapshot generation in WTR
https://bugs.webkit.org/show_bug.cgi?id=95992

Reviewed by Jocelyn Turcotte.

Switch the Qt implementation of the PlatformWebView to use
QQuickWindow::grabWindow to generate the pixel results. This way
we will go through the scenegraph and test the actual rendering backend.
We use QQuickWindowPrivate::setRenderWithoutShowing to avoid the need of
showing the window.

* WebKitTestRunner/Target.pri: Had to added a bunch
of modules to be able to use QQuickWindowPrivate.
* WebKitTestRunner/qt/PlatformWebViewQt.cpp:
(WTR::WrapperWindow::handleStatusChanged):
(WTR::PlatformWebView::windowSnapshotImage):

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

9 years ago[Qt][WTR] Do a forced repaint before generating pixel results
kbalazs@webkit.org [Mon, 15 Oct 2012 16:15:44 +0000 (16:15 +0000)]
[Qt][WTR] Do a forced repaint before generating pixel results
https://bugs.webkit.org/show_bug.cgi?id=98654

Reviewed by Jocelyn Turcotte.

Source/WebKit2:

Added API to convert a QImage to a WKImage so we can
pass it to cross-platform code.

* Shared/API/c/qt/WKImageQt.cpp:
(WKImageCreateFromQImage):
* Shared/API/c/qt/WKImageQt.h:

Tools:

Do a forced repaint before grabbing the pixel snapshot. This extra
synchronisation is necessary with the CoordinatedGraphics rendering
backend because it has a fully asynchronous nature. This patch make
us using the window snapshot for pixel results which is necessary to
capture animations and other dynamic content. The actual grabbing of
the window has not been implemented in this patch. It will come in
a follow-up.

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::invoke):
(WTR::TestInvocation::dump): Store results in member variables.
Don't close output channels yet.
(WTR::TestInvocation::dumpResults): Added. This is where we dump
the results if no error happened.
(WTR):
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
* WebKitTestRunner/TestInvocation.h:
(TestInvocation):
* WebKitTestRunner/qt/PlatformWebViewQt.cpp:
(WTR::PlatformWebView::windowSnapshotImage):
* WebKitTestRunner/qt/TestInvocationQt.cpp:
(WTR::TestInvocation::forceRepaintDoneCallback):
(WTR):
(WTR::TestInvocation::dumpPixelsAndCompareWithExpected):

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

9 years ago[BlackBerry] Clean up BackingStoreClient (part I)
tonikitoo@webkit.org [Mon, 15 Oct 2012 15:53:26 +0000 (15:53 +0000)]
[BlackBerry] Clean up BackingStoreClient (part I)
https://bugs.webkit.org/show_bug.cgi?id=99327

Reviewed by Yong Li.
Patch by Antonio Gomes <agomes@rim.com>

Now that we won't use the BackingStoreClient code path to scroll inner frames at all
(instead we use AC layers!), we can remove all "!isMainFrame" code paths.

No behavior change, since the code path being removed was not in use.

* WebKitSupport/BackingStoreClient.cpp:
(BlackBerry::WebKit::BackingStoreClient::absoluteRect):
(BlackBerry::WebKit::BackingStoreClient::transformedActualVisibleSize):
(BlackBerry::WebKit::BackingStoreClient::viewportSize):
(BlackBerry::WebKit::BackingStoreClient::transformedViewportSize):
(BlackBerry::WebKit::BackingStoreClient::visibleContentsRect):
(BlackBerry::WebKit::BackingStoreClient::transformedVisibleContentsRect):
(BlackBerry::WebKit::BackingStoreClient::checkOriginOfCurrentScrollOperation):

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

9 years agoLayout Test plugins/update-widgets-crash.html is failing
danakj@chromium.org [Mon, 15 Oct 2012 15:49:00 +0000 (15:49 +0000)]
Layout Test plugins/update-widgets-crash.html is failing
https://bugs.webkit.org/show_bug.cgi?id=99333

Unreviewed gardening.

* platform/chromium/TestExpectations:

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

9 years agoUnreviewed GTK gardening.
dominik.rottsches@intel.com [Mon, 15 Oct 2012 15:27:48 +0000 (15:27 +0000)]
Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Silencing a style-checker warning.

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

9 years agoWeb Inspector: Scripts for dynamically added script elements are not shown in sources...
vsevik@chromium.org [Mon, 15 Oct 2012 15:06:12 +0000 (15:06 +0000)]
Web Inspector: Scripts for dynamically added script elements are not shown in sources panel.
https://bugs.webkit.org/show_bug.cgi?id=99324

Reviewed by Pavel Feldman.

Source/WebCore:

NetworkUISourceCodeProvider now adds uiSourceCodes for dynamic anonymous scripts
and dynamic scripts loaded before inspector was opened.

Tests: http/tests/inspector-enabled/dynamic-scripts.html
       inspector/debugger/dynamic-scripts.html

* inspector/front-end/NetworkLog.js:
(WebInspector.NetworkLog.prototype.requestForURL):
* inspector/front-end/NetworkUISourceCodeProvider.js:
(WebInspector.NetworkUISourceCodeProvider):
(WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource):
(WebInspector.NetworkUISourceCodeProvider.prototype._projectWillReset):

LayoutTests:

* http/tests/inspector-enabled/dynamic-scripts-expected.txt: Added.
* http/tests/inspector-enabled/dynamic-scripts.html: Added.
* http/tests/inspector-enabled/resources/dynamic-script.js: Added.
(fooDynamicScript):
* inspector/debugger/dynamic-scripts-expected.txt: Added.
* inspector/debugger/dynamic-scripts.html: Added.
* inspector/debugger/resources/dynamic-script.js: Added.
(fooDynamicScript):

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

9 years agoREGRESSION(130613): Reintroduces crashes when using soup's timeout functionality
dominik.rottsches@intel.com [Mon, 15 Oct 2012 14:47:12 +0000 (14:47 +0000)]
REGRESSION(130613): Reintroduces crashes when using soup's timeout functionality
https://bugs.webkit.org/show_bug.cgi?id=99311

Reviewed by Gustavo Noronha Silva.

Removing the cleanupSoupRequestOperation call, since the cancel() call will eventually trigger the
cleanup already setting the right flag. Cleaning the handle already here will result in crashes when
using the soup timeout functionality.
The explicit cleanup call reintroduced in r130613, after it had been previously removed in r130348.

No new tests, tests that catch this will be part of bug 74802 for XHR timeout support.

* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::requestTimeoutCallback):

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

9 years ago[Qt] Separate Qt WebKit into Qt WebKit and Qt WebKit Widgets
hausmann@webkit.org [Mon, 15 Oct 2012 14:06:06 +0000 (14:06 +0000)]
[Qt] Separate Qt WebKit into Qt WebKit and Qt WebKit Widgets
https://bugs.webkit.org/show_bug.cgi?id=88162

Reviewed by Kenneth Rohde Christiansen.

Rename the QtWebKit module to QtWebKitWidgets.

.:

* Source/api.pri:
* Source/sync.profile:

Source/WebKit/qt:

* declarative/experimental/experimental.pri:
* declarative/public.pri:
* docs/webkitsnippets/simple/simple.pro:
* docs/webkitsnippets/webpage/webpage.pro:
* tests/tests.pri:

Source/WebKit2:

* PluginProcess.pro:
* UIProcess/API/qt/tests/inspectorserver/inspectorserver.pro:
* UIProcess/API/qt/tests/publicapi/publicapi.pro:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
* UIProcess/API/qt/tests/qmltests/WebView.pro:
* UIProcess/API/qt/tests/qquickwebview/qquickwebview.pro:
* UIProcess/API/qt/tests/qrawwebview/qrawwebview.pro:
* UIProcess/API/qt/tests/tests.pri:
* WebProcess.pro:

Tools:

* DumpRenderTree/qt/DumpRenderTree.pro:
* MiniBrowser/qt/MiniBrowser.pro:
* MiniBrowser/qt/raw/Target.pri:
* QtTestBrowser/QtTestBrowser.pro:
* Scripts/webkitpy/layout_tests/port/qt.py:
(QtPort._path_to_webcore_library):
* WebKitTestRunner/InjectedBundle/Target.pri:
* WebKitTestRunner/Target.pri:
* qmake/mkspecs/features/default_post.prf:
* qmake/mkspecs/features/webkit_modules.prf:
* qmake/mkspecs/features/win32/default_post.prf:

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

9 years agoWeb Inspector: convert manual size calculation of different WebKit things into Memory...
loislo@chromium.org [Mon, 15 Oct 2012 13:51:55 +0000 (13:51 +0000)]
Web Inspector: convert manual size calculation of different WebKit things into MemoryInstrumentation.
https://bugs.webkit.org/show_bug.cgi?id=99309

Reviewed by Yury Semikhatsky.

JSHeap, DOMStorage and HeapProfiler data were counted manually.
Now we count the sizes more generic way.

Source/WebCore:

* dom/WebCoreMemoryInstrumentation.cpp:
* dom/WebCoreMemoryInstrumentation.h:
(WebCoreMemoryTypes): new string identifiers were added for Inspector's data.
* inspector/InspectorBaseAgent.cpp:
(WebCore::InspectorBaseAgentInterface::InspectorBaseAgentInterface): common data members were moved from template to base class.
(WebCore::InspectorBaseAgentInterface::reportMemoryUsage): NMI instrumentation was added to the base template.
* inspector/InspectorBaseAgent.h:
(InspectorBaseAgentInterface): ditto
(WebCore::InspectorBaseAgent::InspectorBaseAgent): ditto
* inspector/InspectorController.cpp:
(WebCore::InspectorController::reportMemoryUsage): NMI instrumentation was added to the class.
* inspector/InspectorController.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::reportMemoryUsage): NMI instrumentation was added to the class.
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDOMStorageResource.cpp:
(WebCore::InspectorDOMStorageResource::reportMemoryUsage): NMI instrumentation was added to the class.
* inspector/InspectorDOMStorageResource.h:
* inspector/InspectorMemoryAgent.cpp:
(WebCore::reportJSHeapInfo): these methods now use MemoryInstrumentation for reporting the size of underlying data.
(WebCore::reportRenderTreeInfo):
(WebCore::collectDomTreeInfo):
(WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
(WebCore::InspectorMemoryAgent::reportMemoryUsage): NMI instrumentation was added to the class.
* inspector/InspectorMemoryAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::reportMemoryUsage):
* inspector/InspectorProfilerAgent.h:
(InspectorProfilerAgent): NMI instrumentation was added to the class.
* inspector/MemoryInstrumentationImpl.cpp: allocatedObjects map was converted from InspectorMemoryAgent::getProcessMemoryDistribution local variable to member variable.
(WebCore::MemoryInstrumentationClientImpl::checkCountedObject):
(WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage): NMI instrumentation was added to the class.
(WebCore::MemoryInstrumentationImpl::reportMemoryUsage): NMI instrumentation was added to the class.
* inspector/MemoryInstrumentationImpl.h:
(WebCore::MemoryInstrumentationClientImpl::MemoryInstrumentationClientImpl):
(WebCore::MemoryInstrumentationClientImpl::allocatedObjects):
(WebCore::MemoryInstrumentationClientImpl::checkInstrumentedObjects):
* inspector/front-end/NativeMemorySnapshotView.js:
(WebInspector.MemoryBlockViewProperties._initialize):
(WebInspector.NativeMemoryBarChart.prototype._updateView):
* page/Page.cpp:
(WebCore::Page::reportMemoryUsage): NMI instrumentation was added to the class.
* page/Page.h:

Source/WTF:

* wtf/MemoryInstrumentation.h: calculateContainerSize were removed.
* wtf/MemoryInstrumentationSequence.h: empty instrumentations were added for 'const char*' and 'const void*' sequences.

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

9 years ago[EFL][WK2] Encapsulate ref counting for Ewk objects in a parent class
rakuco@webkit.org [Mon, 15 Oct 2012 13:19:36 +0000 (13:19 +0000)]
[EFL][WK2] Encapsulate ref counting for Ewk objects in a parent class
https://bugs.webkit.org/show_bug.cgi?id=99174

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

Ewk objects can be inherited from RefCounted class, so that ref counting is encapsulated and RefPtr can be used.
Applied the new approach for Ewk_Navigation_Data and Ewk_Url_Request objects as an example.
The requirement of adoption can be satisfied as long as we keep dealing with smart pointers only.
In case external client provides an already referenced object as a raw pointer, relaxAdoptionRequirement() can be set
explicitly in this specific place.

* UIProcess/API/efl/ewk_context_history_client.cpp:
(didNavigateWithNavigationData):
* UIProcess/API/efl/ewk_download_job.cpp:
(_Ewk_Download_Job):
(_Ewk_Download_Job::_Ewk_Download_Job):
(_Ewk_Download_Job::~_Ewk_Download_Job):
(ewk_download_job_request_get):
* UIProcess/API/efl/ewk_navigation_data.cpp:
(ewk_navigation_data_ref):
(ewk_navigation_data_unref):
(ewk_navigation_data_original_request_get):
* UIProcess/API/efl/ewk_navigation_data_private.h:
(_Ewk_Navigation_Data):
(_Ewk_Navigation_Data::_Ewk_Navigation_Data):
* UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
(_Ewk_Navigation_Policy_Decision):
(_Ewk_Navigation_Policy_Decision::_Ewk_Navigation_Policy_Decision):
(_Ewk_Navigation_Policy_Decision::~_Ewk_Navigation_Policy_Decision):
(ewk_navigation_policy_request_get):
(ewk_navigation_policy_decision_new):
* UIProcess/API/efl/ewk_url_request.cpp:
(ewk_url_request_ref):
(ewk_url_request_unref):
* UIProcess/API/efl/ewk_url_request_private.h:
(_Ewk_Url_Request):
(_Ewk_Url_Request::_Ewk_Url_Request):
* UIProcess/API/efl/ewk_view_resource_load_client.cpp:
(didInitiateLoadForResource):
(didSendRequestForResource):

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

9 years ago[Qt] Regression(r130031) coverRect is used in wrong coordinates.
allan.jensen@digia.com [Mon, 15 Oct 2012 12:45:04 +0000 (12:45 +0000)]
[Qt] Regression(r130031) coverRect is used in wrong coordinates.
https://bugs.webkit.org/show_bug.cgi?id=97777

Reviewed by Jocelyn Turcotte.

Convert coverRect from screen coordinates to content coordinates before using it
outside tiled-backing store.

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

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

9 years ago[chromium] Removes unnecessary dependencies in DumpRenderTree.gyp
kinuko@chromium.org [Mon, 15 Oct 2012 11:37:29 +0000 (11:37 +0000)]
[chromium] Removes unnecessary dependencies in DumpRenderTree.gyp
https://bugs.webkit.org/show_bug.cgi?id=99132

Reviewed by Kent Tamura.

Removing webkit_support:blob dependency for DumpRenderTree target as it doesn't seem necessary.

* DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:

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

9 years ago[Qt] Unskip and rebase now passing tests.
ossy@webkit.org [Mon, 15 Oct 2012 11:11:48 +0000 (11:11 +0000)]
[Qt] Unskip and rebase now passing tests.
https://bugs.webkit.org/show_bug.cgi?id=98824

Patch by Tullio Lucena <tullio.lucena@openbossa.org> on 2012-10-15
Reviewed by Csaba Osztrogonác.

Updating tests results.

* platform/qt/TestExpectations:
* platform/qt/editing/selection/caret-rtl-2-expected.png: Added.
* platform/qt/editing/selection/caret-rtl-2-expected.txt:
* platform/qt/editing/selection/caret-rtl-expected.png: Added.
* platform/qt/editing/selection/caret-rtl-expected.txt:
* platform/qt/editing/selection/extend-selection-bidi-expected.png: Added.
* platform/qt/editing/selection/extend-selection-bidi-expected.txt: Added.
* platform/qt/editing/selection/move-past-trailing-space-expected.png: Added.
* platform/qt/editing/selection/move-past-trailing-space-expected.txt: Added.

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

9 years ago[Qt][WK2] Buildfix for newer Qt5.
ossy@webkit.org [Mon, 15 Oct 2012 10:37:24 +0000 (10:37 +0000)]
[Qt][WK2] Buildfix for newer Qt5.
https://bugs.webkit.org/show_bug.cgi?id=99303

Reviewed by Simon Hausmann.

* WebKitTestRunner/qt/PlatformWebViewQt.cpp:
(WTR::PlatformWebView::resizeTo):

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

9 years agoImprove code of LocaleMac.mm
tkent@chromium.org [Mon, 15 Oct 2012 10:00:43 +0000 (10:00 +0000)]
Improve code of LocaleMac.mm
https://bugs.webkit.org/show_bug.cgi?id=98383

Reviewed by Darin Adler.

- Use isNull instead of isEmpty because isNull is more efficient.
- create*Formatter should return RetainPtr to avoid to retain in each of callsites.
- Explicit String conversion is not needed.

No new tests. This doesn't change any behavior.

* platform/text/mac/LocaleMac.h:
(LocaleMac):
- Change the return types of createShortDateFormatter,
createTimeFormatter, and createShortTimeFormatter from NSDateFormatter*
to RetainPtr<NSDateFormatter>.
- Omit 'create' from their names.
- Add m_gregorianCalendar.
* platform/text/mac/LocaleMac.mm:
(WebCore::createDateTimeFormatter):
Change the return type from NSDateFormatter* to RetainPtr<NSDateFormatter>.
Add an NSCalendar argument.
(WebCore::LocaleMac::shortDateFormatter):
Renamed from createShortTimeFormatter.
Change the return type from NSDateFormatter* to RetainPtr<NSDateFormatter>.
(WebCore::LocaleMac::parseDateTime): Follow the return type change and the renaming.
(WebCore::LocaleMac::formatDateTime): Ditto. Also, remove explicit String construction.
(WebCore::LocaleMac::dateFormatText): Ditto. Also, use isNull.
(WebCore::LocaleMac::monthLabels): Follow the return type change and the renaming.
(WebCore::LocaleMac::weekDayShortLabels): Ditto.
(WebCore::LocaleMac::timeFormatter):
Change the return type from NSDateFormatter* to RetainPtr<NSDateFormatter>.
Renamed from createTimeFormatter.
(WebCore::LocaleMac::shortTimeFormatter): Ditto.
(WebCore::LocaleMac::dateFormat):
Use isNull. Remove explicit String construction. Follow the return type
change and the renaming.
(WebCore::LocaleMac::timeFormat): ditto.
(WebCore::LocaleMac::shortTimeFormat): ditto.
(WebCore::LocaleMac::timeAMPMLabels):
Remove explicit String construction. Follow the return type change.
(WebCore::LocaleMac::initializeLocalizerData):
Remove explicit String construction.

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

9 years agoUnreviewed. Fix make distcheck.
carlosgc@webkit.org [Mon, 15 Oct 2012 09:50:04 +0000 (09:50 +0000)]
Unreviewed. Fix make distcheck.

Source/JavaScriptCore:

* GNUmakefile.list.am: Add missing header file.

Source/WebKit2:

* GNUmakefile.am: Add .in files in WebKit2/Shared to EXTRA_DIST.
* GNUmakefile.list.am: Remove deleted file.

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

9 years ago[Chromium] Unreviewed gardening, TestExpectations updated.
shinyak@chromium.org [Mon, 15 Oct 2012 07:26:02 +0000 (07:26 +0000)]
[Chromium] Unreviewed gardening, TestExpectations updated.

* platform/chromium/TestExpectations:

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

9 years agoWeb Inspector: NMI remove hand made object builders with automatic builder.
loislo@chromium.org [Mon, 15 Oct 2012 06:21:29 +0000 (06:21 +0000)]
Web Inspector: NMI remove hand made object builders with automatic builder.
https://bugs.webkit.org/show_bug.cgi?id=99186

Reviewed by Yury Semikhatsky.

Old builders were replaced with single automatic builder.
It does the next things:
a) deduplicates entries in the MemoryInstrumentationClient's map and converts objectType pointers to String;
b) creates parent entries and assigns their aggregated sizes;
c) creates the hierarchy of MemoryBlocks recursively.

* dom/WebCoreMemoryInstrumentation.cpp:
(WebCore):
* dom/WebCoreMemoryInstrumentation.h:
(WebCoreMemoryTypes):
* inspector/InspectorMemoryAgent.cpp:
(WebCore):
(WebCore::jsHeapInfo):
(WebCore::renderTreeInfo):
(WebCore::addPlatformComponentsInfo):
(WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
* inspector/MemoryInstrumentationImpl.cpp:
(WebCore::MemoryInstrumentationClientImpl::sizesMap):
(WebCore):
* inspector/MemoryInstrumentationImpl.h:
(WebCore):
(MemoryInstrumentationClientImpl):

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

9 years agoDFG should handle polymorphic array modes by eagerly transforming arrays into the...
fpizlo@apple.com [Mon, 15 Oct 2012 03:17:17 +0000 (03:17 +0000)]
DFG should handle polymorphic array modes by eagerly transforming arrays into the most general applicable form
https://bugs.webkit.org/show_bug.cgi?id=99269

Reviewed by Geoffrey Garen.

This kills off a bunch of code for "polymorphic" array modes in the DFG. It should
also be a performance win for code that uses a lot of array storage arrays.

* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::execute):
* dfg/DFGArrayMode.cpp:
(JSC::DFG::fromObserved):
(JSC::DFG::modeAlreadyChecked):
(JSC::DFG::modeToString):
* dfg/DFGArrayMode.h:
(DFG):
(JSC::DFG::modeUsesButterfly):
(JSC::DFG::modeIsJSArray):
(JSC::DFG::mayStoreToTail):
(JSC::DFG::mayStoreToHole):
(JSC::DFG::canCSEStorage):
(JSC::DFG::modeSupportsLength):
(JSC::DFG::benefitsFromStructureCheck):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::checkArray):
(JSC::DFG::FixupPhase::blessArrayOperation):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::byValIsPure):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode):
(JSC::DFG::SpeculativeJIT::checkArray):
(JSC::DFG::SpeculativeJIT::arrayify):
(DFG):
(JSC::DFG::SpeculativeJIT::compileGetArrayLength):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::putByValWillNeedExtraRegister):
(SpeculativeJIT):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

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

9 years agoFix the world.
andersca@apple.com [Mon, 15 Oct 2012 02:40:48 +0000 (02:40 +0000)]
Fix the world.

Add back a forgotten !.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::postInjectedBundleMessage):

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

9 years agoREGRESSION(126886): Fat binary builds don't know how to handle architecture variants...
fpizlo@apple.com [Mon, 15 Oct 2012 02:33:01 +0000 (02:33 +0000)]
REGRESSION(126886): Fat binary builds don't know how to handle architecture variants to which the LLInt is agnostic
https://bugs.webkit.org/show_bug.cgi?id=99270

Reviewed by Geoffrey Garen.

The fix is to hash cons the offsets based on configuration index, not the offsets
themselves.

* offlineasm/offsets.rb:

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

9 years ago[Chromium] Unreviewed gardening, TestExpectations updated.
shinyak@chromium.org [Mon, 15 Oct 2012 02:01:39 +0000 (02:01 +0000)]
[Chromium] Unreviewed gardening, TestExpectations updated.

* platform/chromium/TestExpectations:

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

9 years agoStop all the crashing!
weinig@apple.com [Mon, 15 Oct 2012 01:52:10 +0000 (01:52 +0000)]
Stop all the crashing!

The WebProcessProxy is not the Connection::Client, the WebConnectionToWebProcess is.

* UIProcess/WebConnectionToWebProcess.h:
(WebKit::WebConnectionToWebProcess::webProcessProxy):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::fromConnection):

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

9 years agoRe-land of "WebContext should be a MessageReceiver"
weinig@apple.com [Mon, 15 Oct 2012 00:28:18 +0000 (00:28 +0000)]
Re-land of "WebContext should be a MessageReceiver"
https://bugs.webkit.org/show_bug.cgi?id=98958

Patch by Anders Carlsson <andersca@apple.com> on 2012-10-14
Reviewed by Sam Weinig.

Make WebContext be a MessageReceiver that lives in its own map. This allows us to get rid of the
knowsHowToHandleMessage functions on MessageReceiverMap and WebContext.

* Platform/CoreIPC/Connection.h:
(CoreIPC::Connection::client):
(Connection):
* Platform/CoreIPC/MessageReceiverMap.cpp:
(CoreIPC::MessageReceiverMap::addMessageReceiver):
(CoreIPC::MessageReceiverMap::invalidate):
(CoreIPC::MessageReceiverMap::knowsHowToHandleMessage):
(CoreIPC::MessageReceiverMap::dispatchMessage):
(CoreIPC::MessageReceiverMap::dispatchSyncMessage):
* Platform/CoreIPC/MessageReceiverMap.h:
(MessageReceiverMap):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::~WebContext):
(WebKit::WebContext::dispatchMessage):
(WebKit::WebContext::dispatchSyncMessage):
(WebKit::WebContext::didReceiveMessage):
(WebKit::WebContext::didReceiveSyncMessage):
* UIProcess/WebContext.h:
(WebContext):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::fromConnection):
(WebKit):
(WebKit::WebProcessProxy::didReceiveMessage):
(WebKit::WebProcessProxy::didReceiveSyncMessage):
* UIProcess/WebProcessProxy.h:
(WebProcessProxy):

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

9 years agoWebPage::PostInjectedBundleMessage should be a variadic message
andersca@apple.com [Mon, 15 Oct 2012 00:24:10 +0000 (00:24 +0000)]
WebPage::PostInjectedBundleMessage should be a variadic message
https://bugs.webkit.org/show_bug.cgi?id=99277

Reviewed by Sam Weinig.

Don't use a data reference for messages posted to the injected bundle; they could contain data that requires attachments
(such as shared memory).

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::postMessageToInjectedBundle):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::postInjectedBundleMessage):
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebPage/WebPage.messages.in:

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

9 years agoSimplify user content in WebKit2 by using WebCore::UserStyleSheet and WebCore::UserSc...
weinig@apple.com [Sun, 14 Oct 2012 23:55:23 +0000 (23:55 +0000)]
Simplify user content in WebKit2 by using WebCore::UserStyleSheet and WebCore::UserScript directly
https://bugs.webkit.org/show_bug.cgi?id=99276

Reviewed by Anders Carlsson.

Source/WebCore:

Add default constructors for UserScript and UserStyleSheet so they can be used in CoreIPC encoding/decoding.

* page/UserScript.h:
(WebCore::UserScript::UserScript):
(UserScript):
* page/UserStyleSheet.h:
(WebCore::UserStyleSheet::UserStyleSheet):
(UserStyleSheet):

Source/WebKit2:

- Removes UserContentContainer in favor of Vector<UserStyleSheet> and Vector<UserScript> right on WebPageGroupData.
- Adds support for UserScripts, but does not expose API for it just yet.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* Shared/UserContentContainer.cpp: Removed.
* Shared/UserContentContainer.h: Removed.
Remove UserContentContainer.h/cpp.

* Shared/API/c/WKBase.h:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toUserScriptInjectionTime):
(WebKit::toUserContentInjectedFrames):
* WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
Move UserContent enums to WKBase.h so they can be used from both processes, and move the
casts to WKSharedAPICast.

* Shared/WebCoreArgumentCoders.cpp:
* Shared/WebCoreArgumentCoders.h:
Add coders for UserStyleSheet and UserScript.

* Shared/WebPageGroupData.cpp:
(WebKit::WebPageGroupData::encode):
(WebKit::WebPageGroupData::decode):
* Shared/WebPageGroupData.h:
(WebPageGroupData):
Replace UserContentContainer with Vector<UserStyleSheet> and Vector<UserScript>. Stop using
CoreIPC::In() and CoreIPC::Out(), and instead just call encode/decode multiple times.

* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupAddUserStyleSheet):
Pass the parameters with as little conversion as possible to the C++ to avoid doing too much
work in the API layer.

* UIProcess/WebPageGroup.cpp:
(WebKit::toStringVector):
(WebKit::WebPageGroup::addUserStyleSheet):
(WebKit::WebPageGroup::addUserScript):
(WebKit::WebPageGroup::removeAllUserStyleSheets):
(WebKit::WebPageGroup::removeAllUserScripts):
(WebKit::WebPageGroup::removeAllUserContent):
* UIProcess/WebPageGroup.h:
* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::WebPageGroupProxy):
(WebKit::WebPageGroupProxy::addUserStyleSheet):
(WebKit::WebPageGroupProxy::addUserScript):
(WebKit::WebPageGroupProxy::removeAllUserScripts):
(WebKit::WebPageGroupProxy::removeAllUserContent):
* WebProcess/WebPage/WebPageGroupProxy.h:
(WebPageGroupProxy):
* WebProcess/WebPage/WebPageGroupProxy.messages.in:
Add support for user scripts and update to use UserScript and UserStyleSheet directly.

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

9 years agoAllow notification origin permission request when no js callback is provided
jonlee@apple.com [Sun, 14 Oct 2012 23:50:30 +0000 (23:50 +0000)]
Allow notification origin permission request when no js callback is provided
https://bugs.webkit.org/show_bug.cgi?id=63615
<rdar://problem/11059590>

Reviewed by Sam Weinig.

Source/WebCore:

Instead of throwing a type error when no callback is provided, we pass a null callback.

Test: http/tests/notifications/legacy/request-no-callback.html

* bindings/js/JSDesktopNotificationsCustom.cpp:
(WebCore::JSNotificationCenter::requestPermission):

Source/WebKit/mac:

Introduce a boolean to determine whether the request was using the legacy or standard API. This way,
we do not fall through to calling the standard API's callback if the legacy API's callback is null.

* WebCoreSupport/WebNotificationClient.mm:
(WebCore):
(-[WebNotificationPolicyListener initWithVoidCallback:]):
(-[WebNotificationPolicyListener allow]):
(-[WebNotificationPolicyListener deny]):

Source/WebKit2:

Null checks already exist for both standard and legacy API callbacks, so no changes are needed here
like there are in WebKit 1. The checks existed because the callbacks are held in a hash map used to keep
track of pending requests.

Also, add a check for a null callback when short circuiting.

* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::startRequest):

Tools:

Teach DRT to look at the existing entries in the permission hash map when permission is requested.

* DumpRenderTree/mac/MockWebNotificationProvider.h: Expose policyForOrigin.
* DumpRenderTree/mac/MockWebNotificationProvider.mm:
(-[MockWebNotificationProvider setWebNotificationOrigin:permission:]):
* DumpRenderTree/mac/UIDelegate.mm:
(-[UIDelegate webView:decidePolicyForNotificationRequestFromOrigin:listener:]): Look at whether a
policy for the origin already exists. If so, accept or deny the request as appropriate. Otherwise,
accept by default.

LayoutTests:

* http/tests/notifications/legacy/request-expected.txt:
* http/tests/notifications/legacy/request-no-callback-expected.txt: Added.
* http/tests/notifications/legacy/request-no-callback.html: Calls webkitNotifications.requestPermission()
with no callback, with default and denied permission. For WebKit2, if the permission is not default, it
will short circuit instead of creating a pending request.
* http/tests/notifications/legacy/request.html: The test mistakenly uses the standard API instead of
the legacy API. The results don't change, but we make sure that we call
webkitNotifications.requestPermission() with a callback to test full coverage of the legacy API. We also
expand the test to cover both default and denied permissions.
* http/tests/notifications/request-expected.txt:
* http/tests/notifications/request.html: Expand test to cover both default and denied permissions.

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

9 years agoMove QDataStream functions into HistoryItemQt.cpp
andersca@apple.com [Sun, 14 Oct 2012 23:39:58 +0000 (23:39 +0000)]
Move QDataStream functions into HistoryItemQt.cpp
https://bugs.webkit.org/show_bug.cgi?id=99203

Reviewed by Andreas Kling.

Source/WebCore:

It seems like the QDataStream stream operators are only used from HistoryItemQt.cpp
inside WebCore, so move them there. If in the future they are required elsewhere, they should
be moved into a separate header instead of polluting headers unnecessarily.

* history/qt/HistoryItemQt.cpp:
(operator<<):
(operator>>):
* platform/FractionalLayoutUnit.h:
* platform/graphics/IntPoint.h:

Source/WebKit2:

Forward declare QTransform.

* Shared/qt/WebEventFactoryQt.h:

Source/WTF:

It seems like the QDataStream stream operators are only used from HistoryItemQt.cpp
inside WebCore, so move them there. If in the future they are required elsewhere, they should
be moved into a separate header instead of polluting headers unnecessarily.

* wtf/Vector.h:
* wtf/qt/StringQt.cpp:
* wtf/text/WTFString.h:

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

9 years agoExplicitly mark messages variadic
andersca@apple.com [Sun, 14 Oct 2012 23:21:31 +0000 (23:21 +0000)]
Explicitly mark messages variadic
https://bugs.webkit.org/show_bug.cgi?id=99229

Reviewed by Dan Bernstein.

Instead of deciding whether messages are variadic based on their type, decide it based on the existence of a 'Variadic' message attribute.

* Scripts/webkit2/messages.py:
(messages_to_kind_enum):
(decode_type):
(async_case_statement):
(sync_case_statement):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebProcess.messages.in:

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

9 years agoFix the windows build.
weinig@apple.com [Sun, 14 Oct 2012 22:11:02 +0000 (22:11 +0000)]
Fix the windows build.

* WebView.cpp:
(toStringVector):

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

9 years agoIndexingType should not have a bit for each type
fpizlo@apple.com [Sun, 14 Oct 2012 22:05:16 +0000 (22:05 +0000)]
IndexingType should not have a bit for each type
https://bugs.webkit.org/show_bug.cgi?id=98997

Reviewed by Oliver Hunt.

Somewhat incidentally, the introduction of butterflies led to each indexing
type being represented by a unique bit. This is superficially nice since it
allows you to test if a structure corresponds to a particular indexing type
by saying !!(structure->indexingType() & TheType). But the downside is that
given the 8 bits we have for the m_indexingType field, that leaves only a
small number of possible indexing types if we have one per bit.

This changeset changes the indexing type to be:

Bit #1: Tells you if you're an array.

Bits #2 - #5: 16 possible indexing types, including the blank type for
    objects that don't have indexed properties.

Bits #6-8: Auxiliary bits that we could use for other things. Currently we
    just use one of those bits, for MayHaveIndexedAccessors.

This is performance-neutral, and is primarily intended to give us more
breathing room for introducing new inferred array modes.

* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::JumpList::jumps):
* assembler/MacroAssembler.h:
(MacroAssembler):
(JSC::MacroAssembler::patchableBranch32):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::patchableBranch32):
(MacroAssemblerARMv7):
* dfg/DFGArrayMode.cpp:
(JSC::DFG::modeAlreadyChecked):
* dfg/DFGRepatch.cpp:
(JSC::DFG::tryCacheGetByID):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::speculationCheck):
(JSC::DFG::SpeculativeJIT::forwardSpeculationCheck):
(JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode):
(DFG):
(JSC::DFG::SpeculativeJIT::checkArray):
(JSC::DFG::SpeculativeJIT::arrayify):
* dfg/DFGSpeculativeJIT.h:
(SpeculativeJIT):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* jit/JITInlineMethods.h:
(JSC::JIT::emitAllocateJSArray):
(JSC::JIT::chooseArrayMode):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emitContiguousGetByVal):
(JSC::JIT::emitArrayStorageGetByVal):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emitContiguousPutByVal):
(JSC::JIT::emitArrayStoragePutByVal):
(JSC::JIT::privateCompilePatchGetArrayLength):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emitContiguousGetByVal):
(JSC::JIT::emitArrayStorageGetByVal):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emitContiguousPutByVal):
(JSC::JIT::emitArrayStoragePutByVal):
(JSC::JIT::privateCompilePatchGetArrayLength):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/IndexingType.h:
(JSC):
(JSC::hasIndexedProperties):
(JSC::hasContiguous):
(JSC::hasFastArrayStorage):
(JSC::hasArrayStorage):
(JSC::shouldUseSlowPut):
* runtime/JSGlobalObject.cpp:
(JSC):
* runtime/StructureTransitionTable.h:
(JSC::newIndexingType):

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

9 years agoMake UserScript and UserStyleSheet value objects that are copyable
weinig@apple.com [Sun, 14 Oct 2012 21:55:53 +0000 (21:55 +0000)]
Make UserScript and UserStyleSheet value objects that are copyable
https://bugs.webkit.org/show_bug.cgi?id=99275

Reviewed by Tim Horton.

Source/WebCore:

Simplify UserScript and UserStyleSheet and make them more easily usable
without sticking them in an OwnPtr.

* WebCore.exp.in:
Update exports.

* page/PageGroup.cpp:
(WebCore::PageGroup::addUserScriptToWorld):
(WebCore::PageGroup::addUserStyleSheetToWorld):
* page/PageGroup.h:
(PageGroup):
* page/UserContentURLPattern.cpp:
(WebCore::UserContentURLPattern::matchesPatterns):
* page/UserContentURLPattern.h:
(UserContentURLPattern):
Update to not assume whitelist and blacklist are in Vector<String>*.

* page/UserScript.h:
(UserScript):
(WebCore::UserScript::UserScript):
(WebCore::UserScript::whitelist):
(WebCore::UserScript::blacklist):
* page/UserStyleSheet.h:
(UserStyleSheet):
(WebCore::UserStyleSheet::UserStyleSheet):
(WebCore::UserStyleSheet::whitelist):
(WebCore::UserStyleSheet::blacklist):
Switch OwnPtr<Vector<String> > to Vector<String> and remove Noncopyable restriction.

Source/WebKit/chromium:

* src/WebViewImpl.cpp:
(WebKit::WebView::addUserScript):
(WebKit::WebView::addUserStyleSheet):
Update for new PageGroup function signatures.

Source/WebKit/efl:

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::addUserScript):
(DumpRenderTreeSupportEfl::addUserStyleSheet):
Update for new PageGroup function signatures.

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _injectMailQuirksScript]):
(-[WebView _injectOutlookQuirksScript]):
Update for new PageGroup function signatures.

Source/WebKit2:

* Shared/UserContentContainer.cpp:
(WebKit::toStringVector):
(WebKit::UserContentContainer::Item::Item):
(WebKit::UserContentContainer::Item::encode):
(WebKit::UserContentContainer::Item::decode):
* Shared/UserContentContainer.h:
(WebKit::UserContentContainer::Item::whitelist):
(WebKit::UserContentContainer::Item::blacklist):
Switch UserContentContainer::Item to store Vector<String> instead of ImmutableArray, easing
transition to new PageGroup function signatures.

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::toStringVector):
* WebProcess/WebPage/qt/WebPageQt.cpp:
(WebKit::WebPage::setUserScripts):
Update for new PageGroup function signatures.

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

9 years ago[wk2] Implement PDFPlugin
timothy_horton@apple.com [Sun, 14 Oct 2012 21:48:27 +0000 (21:48 +0000)]
[wk2] Implement PDFPlugin
https://bugs.webkit.org/show_bug.cgi?id=99206

Unreviewed build fix, export __ZN7WebCore8IntPointC1ERK7CGPoint.

* WebCore.exp.in:

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

9 years ago[wk2] Implement PDFPlugin
timothy_horton@apple.com [Sun, 14 Oct 2012 21:32:03 +0000 (21:32 +0000)]
[wk2] Implement PDFPlugin
https://bugs.webkit.org/show_bug.cgi?id=99206

Unreviewed build fix, hand ivar name to @synthesize since it doesn't match the property name.

* WebProcess/Plugins/PDF/PDFPlugin.mm:

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

9 years ago[wk2] Implement PDFPlugin
timothy_horton@apple.com [Sun, 14 Oct 2012 21:28:59 +0000 (21:28 +0000)]
[wk2] Implement PDFPlugin
https://bugs.webkit.org/show_bug.cgi?id=99206

Unreviewed, attempt to manipuate SVN to retain the history of SimplePDFPlugin.

* WebProcess/Plugins/PDF/SimplePDFPlugin.h: Replaced with Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h.
* WebProcess/Plugins/PDF/SimplePDFPlugin.mm: Replaced with Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.mm.

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

9 years ago[wk2] Implement PDFPlugin
timothy_horton@apple.com [Sun, 14 Oct 2012 21:00:53 +0000 (21:00 +0000)]
[wk2] Implement PDFPlugin
https://bugs.webkit.org/show_bug.cgi?id=99206

Reviewed by Dan Bernstein.

Add PDFPlugin, which uses PDFKit to display PDFs, instead of using PDFKit in the
UIProcess for full-page PDFs. This new plugin will also be used for inline PDFs
in place of SimplePDFPlugin (née BuiltInPDFView).

* Configurations/FeatureDefines.xcconfig: Add ENABLE_PDF_PLUGIN.

Support three new Plugin methods:
    - handleEditingCommand, which hands editing commands to the Plugin
    - isEditingCommandEnabled, which validates editing commands via the Plugin
    - handlesPageScaleFactor, which asks the plugin whether it wants to
    opt into a mode where the WebPage doesn't scale in the ordinary fashion,
    but instead proxies the Plugin's scale factor, so full-page plugins
    can handle scale factor changes however they need to.

* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::handleEditingCommand): Proxy handleEditingCommand to the Plugin.
(WebKit::PluginControllerProxy::isEditingCommandEnabled): Proxy isEditingCommandEnabled to the Plugin.
(WebKit::PluginControllerProxy::handlesPageScaleFactor): Proxy handlesPageScaleFactor to the Plugin.
* PluginProcess/PluginControllerProxy.h:
(PluginControllerProxy): Add handleEditingCommand, isEditingCommandEnabled, and handlesPageScaleFactor.
* PluginProcess/PluginControllerProxy.messages.in: Add HandleEditingCommand, IsEditingCommandEnabled, and HandlesPageScaleFactor.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::handleEditingCommand): NPAPI plugins support no editing commands by default.
(WebKit::NetscapePlugin::isEditingCommandEnabled): NPAPI plugins enable no editing commands by default.
(WebKit::NetscapePlugin::handlesPageScaleFactor): NPAPI plugins do not handle page scale factor changes themselves by default.
* WebProcess/Plugins/Netscape/NetscapePlugin.h: Add handleEditingCommand, isEditingCommandEnabled, and handlesPageScaleFactor.

Add PDFPluginEnabled preference. If it is not enabled, or the plugin is
not built, behavior will be the same as before (the UIProcess PDFView will
handle full-page PDFs, and SimplePDFPlugin will handle inline ones).

* Shared/WebPreferencesStore.h: Add PDFPluginEnabled preference.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetPDFPluginEnabled): Setter for PDFPluginEnabled preference.
(WKPreferencesGetPDFPluginEnabled): Getter for PDFPluginEnabled preference.
* UIProcess/API/C/WKPreferencesPrivate.h: Expose WKPreferences(Set|Get)PDFPluginEnabled as a private preference.

Move support for MIME types with custom representations onto WebPage instead of WebProcess.
This allows us to use preferences to control the use of custom representations (for example,
it allows us to have a preference to toggle between UIProcess's PDFView and PDFPlugin).

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode): Don't pass mimeTypesWithCustomRepresentation
into the WebProcess, as we can compute it later.
(WebKit::WebProcessCreationParameters::decode): Same, on the decode side.
* Shared/WebProcessCreationParameters.h: Remove mimeTypesWithCustomRepresentation.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess): Don't add pdfAndPostScriptMIMETypes to mimeTypesWithCustomRepresentation here, as we're now computing it on WebPage instead.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::canPluginHandleResponse): Move to WebPage from WebProcess so we can use WebPage's new notion of mimeTypesWithCustomRepresentation.
(WebKit::WebPage::shouldUseCustomRepresentationForResponse): Move to WebPage from WebProcess so we can use WebPage's new notion of mimeTypesWithCustomRepresentation.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::pdfAndPostScriptMIMETypes): Return the set of MIME types used for PDF and PostScript, which are handled with PDFView if PDFPlugin is not available or enabled.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess): Don't keep m_mimeTypesWithCustomRepresentations on WebProcess, it's owned by WebPage now.
* WebProcess/WebProcess.h: Move canPluginHandleResponse and shouldUseCustomRepresentationForResponse to WebPage.

Add PDFLayerController to the set of classes returned by PDFKitImports.

* Shared/mac/PDFKitImports.h: Add pdfLayerControllerClass.
* Shared/mac/PDFKitImports.mm:
(WebKit::pdfLayerControllerClass): Find and return the PDFLayerController class.

Add PDFPlugin, which inherits from SimplePDFPlugin, but uses PDFKit instead
of CoreGraphics, to provide additional interactive functionality.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::sendDidGetPlugins): Add PDFPlugin to the set of supported plugins.
* WebKit2.xcodeproj/project.pbxproj: Add PDFPlugin, rename BuiltInPDFView to SimplePDFPlugin.
* WebProcess/Plugins/PDF/PDFPlugin.h: Added.
* WebProcess/Plugins/PDF/PDFPlugin.mm: Added.

PDFPlugin uses layers for scrollbars.

(-[WKPDFPluginScrollbarLayer initWithPDFPlugin:WebKit::]): Initialize our CALayer subclass,
storing its parent PDFPlugin so it can delegate drawing there.
(-[WKPDFPluginScrollbarLayer actionForKey:]): Disable CoreAnimation implicit actions.
(-[WKPDFPluginScrollbarLayer drawInContext:]): Delegate scrollbar drawing to PDFPlugin.

Implement the PDFLayerController delegate, eventually forwarding calls back to PDFPlugin.

(-[WKPDFLayerControllerDelegate initWithPDFPlugin:WebKit::]): Initialize our delegate,
storing its parent PDFPlugin so it can forward delegate calls there.
(-[WKPDFLayerControllerDelegate updateScrollPosition:]): Update PDFPlugin's notion of the
current scroll position, when PDFKit changes the scroll position itself.
(-[WKPDFLayerControllerDelegate writeItemsToPasteboard:withTypes:]): Write the given
array of NSData objects to the pasteboard with the given types.

The following PDFLayerController delegate methods will be implemented in the future.

(-[WKPDFLayerControllerDelegate showDefinitionForAttributedString:atPoint:]):
(-[WKPDFLayerControllerDelegate performWebSearch:]):
(-[WKPDFLayerControllerDelegate openWithPreview]):
(-[WKPDFLayerControllerDelegate saveToPDF]):

(WebKit::PDFPlugin::PDFPlugin): Set up the requisite layer hierarchy, and create a PDFLayerController (and its delegate proxy).
(WebKit::PDFPlugin::updateScrollbars): Update the frame of the layers hosting our scrollbars.
(WebKit::PDFPlugin::createScrollbar): Create a scrollbar and hosting layer, attaching its layer
to PDFPlugin's container layer.
(WebKit::PDFPlugin::destroyScrollbar): Destroy a scrollbar, detaching and destroying its hosting layer in the process.
(WebKit::PDFPlugin::pdfDocumentDidLoad): Called when the document finishes loading; hand
the loaded document to PDFKit, update all of our state (cached document size, scrollbars, etc.), and then execute any scripts in the document (to allow for automatic printing).
(WebKit::PDFPlugin::calculateSizes): Determine the size of the PDF and its pages.
(WebKit::PDFPlugin::destroy): Tear down the layer hierarchy.
(WebKit::PDFPlugin::paint): PDFPlugin is layer-based, so we paint nothing into the tiles.
(WebKit::PDFPlugin::paintControlForLayerInContext): Scrollbar controls are drawn into layers, but their painting is delegated here from WKPDFPluginScrollbarLayer.
(WebKit::PDFPlugin::snapshot): Perform a paint into a bitmap context.
(WebKit::PDFPlugin::pluginLayer): Return PDFPlugin's root layer.
(WebKit::PDFPlugin::geometryDidChange): The size or scale of the plugin changed; update
PDFLayerController's notion of the size and page scale, and invalidate the scrollbars.

Mouse and keyboard events are converted back into NSEvents, but with
locationInWindow actually in terms of the PDFPlugin's layer, not
the window (since there is no window).

(WebKit::modifierFlagsFromWebEvent): Construct an AppKit-style modifier bitmask from WebEvent's modifier key getters.
(WebKit::eventTypeFromWebEvent): Return the NSEventType equivalent to the given WebEvent. Only supports keyboard and mouse events, and only the left and right mouse button.
(WebKit::PDFPlugin::handleMouseEvent): Construct an NSEvent from the given WebMouseEvent and hand it to PDFLayerController. Mouse coordinates are in terms of m_contentLayer's origin.
(WebKit::PDFPlugin::handleKeyboardEvent): Construct an NSEvent from the given WebKeyboardEvent and hand it to PDFLayerController. PDFLayerController currently only handles keyDown events.

(WebKit::PDFPlugin::handleEditingCommand): Handle copy and select-all commands, and forward them to PDFLayerController.
(WebKit::PDFPlugin::isEditingCommandEnabled): The 'copy' command should be enabled if
the user has selected a part of the PDF. The 'select all' command should always be enabled.

(WebKit::PDFPlugin::setScrollOffset): Update both PDFPlugin and PDFLayerController's notion
of the current scroll position.
(WebKit::PDFPlugin::invalidateScrollbarRect): Invalidate the whole scrollbar layer.
(WebKit::PDFPlugin::invalidateScrollCornerRect): Invalidate the whole scroll corner layer.

Rename BuiltInPDFView to SimplePDFPlugin, to differentiate it from PDFPlugin
and to better denote its inheritance from Plugin.

* WebProcess/Plugins/PDF/SimplePDFPlugin.h: Renamed from WebProcess/Plugins/PDF/BuiltInPDFView.h.
(WebKit::SimplePDFPlugin): Make methods protected so PDFPlugin can override them. Rename m_pluginSize -> m_size, and m_dataBuffer->m_data.
(WebKit::SimplePDFPlugin::size): Retrieve the size of the plugin.
(WebKit::SimplePDFPlugin::setSize): Set the size of the plugin.
(WebKit::SimplePDFPlugin::pdfDocument): Retrieve the currently represented PDF document.
(WebKit::SimplePDFPlugin::setPDFDocument): Set the currently represented PDF document.
(WebKit::SimplePDFPlugin::pdfDocumentSize): Retrieve the current size of the PDF.
(WebKit::SimplePDFPlugin::setPDFDocumentSize): Set the current size of the PDF.
(WebKit::SimplePDFPlugin::data): Retrieve the accumulated document data.
* WebProcess/Plugins/PDF/SimplePDFPlugin.mm: Renamed from WebProcess/Plugins/PDF/BuiltInPDFView.mm.
(WebKit::SimplePDFPlugin::computePageBoxes): Copied out of calculateSizes() so PDFPlugin can use it too.
(WebKit::SimplePDFPlugin::runScriptsInPDFDocument): Factored out of pdfDocumentDidLoad() so PDFPlugin can use it too.
(WebKit::SimplePDFPlugin::convertFromScrollbarToContainingView): Implement the remaining scrollbar point conversion functions.
(WebKit::SimplePDFPlugin::convertFromContainingViewToScrollbar): Implement the remaining scrollbar point conversion functions.

* WebProcess/Plugins/Plugin.h:
(Plugin): Add handleEditingCommand, isEditingCommandEnabled, and handlesPageScaleFactor.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::handleEditingCommand): Proxy handleEditingCommand to the PluginProcess.
(WebKit::PluginProxy::isEditingCommandEnabled): Proxy isEditingCommandEnabled
to the PluginProcess.
(WebKit::PluginProxy::handlesPageScaleFactor): Proxy handlesPageScaleFactor
to the PluginProcess.
* WebProcess/Plugins/PluginProxy.h: Add handleEditingCommand, isEditingCommandEnabled,
and handlesPageScaleFactor.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::setPageScaleFactor): Set the plugin's current page scale factor. Also,
update WebPageProxy's notion of the current pageScaleFactor when this is called.
(WebKit::PluginView::pageScaleFactor): Return the plugin's current page scale factor.
(WebKit::PluginView::handleEditingCommand): Proxy handleEditingCommand to the plugin.
(WebKit::PluginView::isEditingCommandEnabled): Proxy isEditingCommandEnabled to the plugin.
* WebProcess/Plugins/PluginView.h:
(PluginView): Add handleEditingCommand, isEditingCommandEnabled,
setPageScaleFactor/pageScaleFactor, and handlesPageScaleFactor. Add m_pageScaleFactor.
(WebKit::PluginView::handlesPageScaleFactor): Proxy handlesPageScaleFactor to the plugin.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::restoreViewState): Don't update WebPageProxy's notion of the scale factor if it should be the default.
(WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame): Make use of shouldUseCustomRepresentationForResponse on WebPage instead of WebProcess.
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Make use of shouldUseCustomRepresentationForResponse on WebPage instead of WebProcess.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin): Create a PDFPlugin if appropriate (if it is built and the setting is enabled).
(WebKit::pluginViewForFrame): Return the PluginView for the given frame if its document is a PluginDocument.
(WebKit::WebPage::executeEditingCommand): Attempt to execute editing commands on the
currently focused (or main-frame) plugin.
(WebKit::WebPage::isEditingCommandEnabled): Validate editing commands against the
currently focused (or main-frame) plugin.
(WebKit::WebPage::scalePage): If the plugin reports that it handles page scale factor
itself, hand it the new scale instead of WebCore.
(WebKit::WebPage::pageScaleFactor): If the plugin reports that it handles page scale
factor itself, return its notion of the current scale instead of WebCore's.
(WebKit::WebPage::validateCommand): Validate editing commands against the
currently focused (or main-frame) plugin.
(WebKit::WebPage::updatePreferences): Update m_pdfPluginEnabled given the relevant WebPreference.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::pdfPluginEnabled): Return whether or not PDFPlugin should be used.
(WebKit::WebPage::setPDFPluginEnabled): Set whether or not PDFPlugin should be used.

* WebCore.exp.in:
Export a few more methods to WebKit(2).

* WebCore.xcodeproj/project.pbxproj:
Expose Pasteboard.h as a private header so PDFPlugin can use it.

* platform/ScrollableArea.h:
Make invalidateScrollbar/invalidateScrollCorner virtual.

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

9 years agoDFG structure check hoisting should attempt to ignore side effects and make transform...
fpizlo@apple.com [Sun, 14 Oct 2012 20:22:17 +0000 (20:22 +0000)]
DFG structure check hoisting should attempt to ignore side effects and make transformations that are sound even in their presence
https://bugs.webkit.org/show_bug.cgi?id=99262

Reviewed by Oliver Hunt.

This hugely simplifies the structure check hoisting phase. It will no longer be necessary
to modify it when the effectfulness of operations changes. This also enables the hoister
to hoist effectful things in the future.

The downside is that the hoister may end up adding strictly more checks than were present
in the original code, if the code truly has a lot of side-effects. I don't see evidence
of this happening. This patch does have some speed-ups and some slow-downs, but is
neutral in the average, and the slow-downs do not appear to have more structure checks
than ToT.

* dfg/DFGStructureCheckHoistingPhase.cpp:
(JSC::DFG::StructureCheckHoistingPhase::run):
(JSC::DFG::StructureCheckHoistingPhase::noticeStructureCheck):
(StructureCheckHoistingPhase):
(CheckData):
(JSC::DFG::StructureCheckHoistingPhase::CheckData::CheckData):

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

9 years agoFix the build of universal binary with ARMv7s of JavaScriptCore
fpizlo@apple.com [Sun, 14 Oct 2012 19:58:26 +0000 (19:58 +0000)]
Fix the build of universal binary with ARMv7s of JavaScriptCore

* llint/LLIntOfflineAsmConfig.h:
* llint/LowLevelInterpreter.asm:

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

9 years agoArray length array profiling is broken in the baseline JIT
fpizlo@apple.com [Sun, 14 Oct 2012 19:42:17 +0000 (19:42 +0000)]
Array length array profiling is broken in the baseline JIT
https://bugs.webkit.org/show_bug.cgi?id=99258

Reviewed by Oliver Hunt.

The code generator for array length stubs calls into
emitArrayProfilingSiteForBytecodeIndex(), which emits profiling only if
canBeOptimized() returns true. But m_canBeOptimized is only initialized during
full method compiles, so in a stub compile it may (or may not) be false, meaning
that we may, or may not, get meaningful profiling info.

This appeared to not affect too many programs since the LLInt has good array
length array profiling.

* jit/JIT.h:
(JSC::JIT::compilePatchGetArrayLength):

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

9 years agoBuild fix for WinCE after r131089.
paroga@webkit.org [Sun, 14 Oct 2012 16:22:49 +0000 (16:22 +0000)]
Build fix for WinCE after r131089.

WinCE does not support getenv().

* runtime/Options.cpp:
(JSC::overrideOptionWithHeuristic):

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

9 years agoUnreviewed, rolling out r130656.
paroga@webkit.org [Sun, 14 Oct 2012 14:58:43 +0000 (14:58 +0000)]
Unreviewed, rolling out r130656.
http://trac.webkit.org/changeset/130656
https://bugs.webkit.org/show_bug.cgi?id=97592

Broke CMake build on Windows

* CMakeLists.txt:

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

9 years agoInspectorPageAgent should expose a method to control the compositing debug settings.
timothy@apple.com [Sun, 14 Oct 2012 14:19:52 +0000 (14:19 +0000)]
InspectorPageAgent should expose a method to control the compositing debug settings.
https://bugs.webkit.org/show_bug.cgi?id=99253

Patch by Antoine Quint <graouts@apple.com> on 2012-10-14
Reviewed by Timothy Hatcher.

* inspector/Inspector.json:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::setCompositingBordersVisible):
* inspector/InspectorPageAgent.h:

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

9 years agoUse class extension rather than a void* member for new Objective-C WebProcessPlugIn SPI
weinig@apple.com [Sun, 14 Oct 2012 02:21:36 +0000 (02:21 +0000)]
Use class extension rather than a void* member for new Objective-C WebProcessPlugIn SPI
https://bugs.webkit.org/show_bug.cgi?id=99256

Reviewed by Dan Bernstein.

A bit of good old fashion cleanup.

* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
Remove the void* member.

* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
Move members from the WKWebProcessPlugInControllerData struct to a class extension.

(didCreatePage):
(willDestroyPage):
(-[WKWebProcessPlugInController _initWithPrincipalClassInstance:bundleRef:]):
Directly access the members instead of using properties, now that it is not inconvenient.

* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:
Remove the void* member.

* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
Move members from the WKWebProcessPlugInBrowserContextControllerData struct to a class extension.

(-[WKWebProcessPlugInBrowserContextController _initWithBundlePageRef:]):
(-[WKWebProcessPlugInBrowserContextController _bundlePageRef]):
Remove unnecessary casts..

* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerInternal.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
Add space before the parenthesis of a category to be consistent.

* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInInternal.h:
Remove unnecessary forward declare.

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

9 years agoAdd a private header for WKWebProcessPlugInBrowserContextController that defines...
aestes@apple.com [Sun, 14 Oct 2012 00:58:15 +0000 (00:58 +0000)]
Add a private header for WKWebProcessPlugInBrowserContextController that defines a property for getting the WKBundlePageRef
https://bugs.webkit.org/show_bug.cgi?id=99252

Reviewed by Sam Weinig.

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _bundlePageRef]):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h: Added.

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

9 years agoWebAudioBus needs support for resizing bus to a smaller size
crogers@google.com [Sat, 13 Oct 2012 18:21:50 +0000 (18:21 +0000)]
WebAudioBus needs support for resizing bus to a smaller size
https://bugs.webkit.org/show_bug.cgi?id=99215

Reviewed by Dimitri Glazkov.

Upgrade AudioBus and WebAudioBus to support resizing to a smaller size, once it has been created.
This is useful, for example, when decoding VBR formats and the actual length can't be exactly determined
until the entire file is decoded.

Source/Platform:

* chromium/public/WebAudioBus.h:
(WebAudioBus):

Source/WebCore:

* platform/audio/AudioBus.cpp:
(WebCore::AudioBus::resizeSmaller):
(WebCore):
* platform/audio/AudioBus.h:
(AudioBus):
* platform/audio/AudioChannel.cpp:
(WebCore::AudioChannel::resizeSmaller):
(WebCore):
* platform/audio/AudioChannel.h:
(AudioChannel):
* platform/chromium/support/WebAudioBus.cpp:
(WebKit::WebAudioBus::resizeSmaller):
(WebKit):

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

9 years agoAdd warning for unrenderable textures
commit-queue@webkit.org [Sat, 13 Oct 2012 17:55:36 +0000 (17:55 +0000)]
Add warning for unrenderable textures
https://bugs.webkit.org/show_bug.cgi?id=99235

Patch by Gregg Tavares <gman@google.com> on 2012-10-13
Reviewed by Kenneth Russell.

Unrenderable textures are often hard to debug. Adds a message to that
appears in the JavaScript console to help developers find the issue.

No new tests as no new functionality.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore):
(WebCore::WebGLRenderingContext::drawArrays):
(WebCore::WebGLRenderingContext::drawElements):
(WebCore::WebGLRenderingContext::handleNPOTTextures):
* html/canvas/WebGLRenderingContext.h:
(WebGLRenderingContext):

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

9 years agoNot reviewed.
ggaren@apple.com [Sat, 13 Oct 2012 17:04:00 +0000 (17:04 +0000)]
Not reviewed.

Updated bindings test results.

* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):

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

9 years ago[TestResultServer] Unit tests require an update after r131239
zandobersek@gmail.com [Sat, 13 Oct 2012 16:57:15 +0000 (16:57 +0000)]
[TestResultServer] Unit tests require an update after r131239
https://bugs.webkit.org/show_bug.cgi?id=99236

Reviewed by Ojan Vafai.

Replacing 'Webkit' with 'WebKit' in builder names througout the unit tests
after the Chromium builders have been renamed recently.

* TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:

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

9 years agoI pity da foo' who's converting numbers to strings
ggaren@apple.com [Sat, 13 Oct 2012 16:46:10 +0000 (16:46 +0000)]
I pity da foo' who's converting numbers to strings
https://bugs.webkit.org/show_bug.cgi?id=99197

Reviewed by Gavin Barraclough.

40% speedup on PerformanceTests/Dromaeo/dom-traverse.html. Probably speeds
some other things up too.

Credit to Eric Seidel for spotting this.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation): getOwnPropertySlotByIndex doesn't need to prefer
string lookup in the static table because our static tables don't contain
properties that are numbers.

I believe this is low-hanging fruit left behind by Phil's
getOwnPropertySlotByIndex optimization, but it's also possible that this was a
regression at some point. I didn't check.

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