Extend `application/x-webkit-test-netscape` plugins to better support multiple frames.
https://bugs.webkit.org/show_bug.cgi?id=92478

Patch by Mike West <mkwst@chromium.org> on 2012-07-29
Reviewed by Adam Barth.

Tools:

DumpRenderTree currently understands
`<object src="data:application/x-webkit-test-netscape,alertwhenloaded">`.
It would be useful if it understood `logifloaded`, which could give
more context regarding test expectations, and can be written in such
as way as to support plugins loaded into multiple iframes in a single
test.

* DumpRenderTree/TestNetscapePlugIn/main.cpp:
(NPP_New):
    Adding support for `logifloaded`.

LayoutTests:

* http/tests/plugins/resources/mock-plugin-logger.js:
    Exciting JS "framework" for use when logging via `logifloaded`.
* http/tests/security/contentSecurityPolicy/object-src-none-allowed.html:
* http/tests/security/contentSecurityPolicy/object-src-none-allowed-expected.html:
* http/tests/security/contentSecurityPolicy/object-src-none-blocked.html:
* http/tests/security/contentSecurityPolicy/object-src-none-blocked-expected.html:
    Adjusting these tests to use the newly created `logifloaded` plugin mock.
* http/tests/security/contentSecurityPolicy/resources/echo-object-data.pl:
    Loading `mock-plugin-logger.js`, and adding a `log` attribute for `logifloaded`.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed by Martin Robinson.

Make the jhbuild wrapper scripts become the jhbuild process
instead of starting it as a child. This should make it possible to
interrupt execution of jhbuild cleanly.

* gtk/run-with-jhbuild:
* jhbuild/jhbuild-wrapper:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123979 268f45cc-cd09-0410-ab3c-d52691b4dbfc
In flipped blocks, a point on the top edge of a box is considered outside the box (and vice versa)
https://bugs.webkit.org/show_bug.cgi?id=92593

Reviewed by Simon Fraser.

Source/WebCore: 

With respect to hit testing, boxes should always behave as half-open intervals which include
the physical top and left edges and not the bottom and right edges.
RenderBlock::positionForPoint was not adhering to this, since it was comparing flipped
coordinates.

Tests: fast/writing-mode/flipped-blocks-hit-test-box-edges.html
       fast/writing-mode/flipped-blocks-hit-test-line-edges.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::positionForPointWithInlineChildren): When blocks are flipped, changed
strict inequalities of y coordinates into non-strict ones and non-strict inequalities into
strict ones.
(WebCore::RenderBlock::positionForPoint): Ditto, except for the test for being under the top
of the last candidate box, which was made non-strict in the unflipped case and remained
strict.

LayoutTests: 

* fast/writing-mode/flipped-blocks-hit-test-box-edges-expected.txt: Added.
* fast/writing-mode/flipped-blocks-hit-test-box-edges.html: Added.
* fast/writing-mode/flipped-blocks-hit-test-line-edges-expected.txt: Added.
* fast/writing-mode/flipped-blocks-hit-test-line-edges.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123980 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CMake] Add missing MediaTime files after r123878.

* wtf/CMakeLists.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WIN] Add missing export macro to friend decleration.

Since the __declspec is part of the function signature
on windows, we need it at all friend declerations too.

* wtf/MediaTime.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123982 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CMake] Use WEBKIT_CREATE_FORWARDING_HEADERS to generate WK2 forwarding headers
https://bugs.webkit.org/show_bug.cgi?id=83579

Reviewed by Daniel Bates.

Using a list of directories in combination with the WEBKIT_CREATE_FORWARDING_HEADERS
macro allows us to share the common generation of forwarding headers across ports.

* CMakeLists.txt:
* PlatformEfl.cmake:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
.: Add ENABLE_CSS_COMPOSITING flag
https://bugs.webkit.org/show_bug.cgi?id=92553

Patch by Rik Cabanier <cabanier@adobe.com> on 2012-07-29
Reviewed by Dirk Schulze.

Adds compiler flag CSS_COMPOSITING to build systems to enable CSS blending and compositing. See spec https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html

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

Source/JavaScriptCore: Add ENABLE_CSS_COMPOSITING flag
https://bugs.webkit.org/show_bug.cgi?id=92553

Patch by Rik Cabanier <cabanier@adobe.com> on 2012-07-29
Reviewed by Dirk Schulze.

Adds compiler flag CSS_COMPOSITING to build systems to enable CSS blending and compositing. See spec https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html

* Configurations/FeatureDefines.xcconfig:

Source/WebCore: ENABLE_CSS_COMPOSITING flag
https://bugs.webkit.org/show_bug.cgi?id=92553

Patch by Rik Cabanier <cabanier@adobe.com> on 2012-07-29
Reviewed by Dirk Schulze.

Adds compiler flag CSS_COMPOSITING to build systems to enable CSS blending and compositing. See spec https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html

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

Source/WebKit/chromium: Add ENABLE_CSS_COMPOSITING flag
https://bugs.webkit.org/show_bug.cgi?id=92553

Patch by Rik Cabanier <cabanier@adobe.com> on 2012-07-29
Reviewed by Dirk Schulze.

Adds compiler flag CSS_COMPOSITING to build systems to enable CSS blending and compositing. See spec https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html

* features.gypi:

Source/WebKit/mac: Add ENABLE_CSS_COMPOSITING flag
https://bugs.webkit.org/show_bug.cgi?id=92553

Patch by Rik Cabanier <cabanier@adobe.com> on 2012-07-29
Reviewed by Dirk Schulze.

Adds compiler flag CSS_COMPOSITING to build systems to enable CSS blending and compositing. See spec https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html

* Configurations/FeatureDefines.xcconfig:

Tools: Add ENABLE_CSS_COMPOSITING flag
https://bugs.webkit.org/show_bug.cgi?id=92553

Patch by Rik Cabanier <cabanier@adobe.com> on 2012-07-29
Reviewed by Dirk Schulze.

Adds compiler flag CSS_COMPOSITING to build systems to enable CSS blending and compositing. See spec https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html

* Scripts/webkitperl/FeatureList.pm:

WebKitLibraries: Add ENABLE_CSS_COMPOSITING flag
https://bugs.webkit.org/show_bug.cgi?id=92553

Patch by Rik Cabanier <cabanier@adobe.com> on 2012-07-29
Reviewed by Dirk Schulze.

Adds compiler flag CSS_COMPOSITING to build systems to enable CSS blending and compositing. See spec https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123984 268f45cc-cd09-0410-ab3c-d52691b4dbfc
run-perf-tests should generate a results page
https://bugs.webkit.org/show_bug.cgi?id=92575

Reviewed by Eric Seidel.

PerformanceTests: 

Add a results page template. This page includes flot and flot.fillbetween.
jQuery and the json that contains test results are injected by run-perf-tests.

* resources/results-template.html: Added.

Tools: 

Added the ability to generate a results page that summarizes performance test results from
multiple runs of run-perf-tests when --output-json-path is specified and --test-results-server
is not specified. We cannot generate a results page when --test-results-server is specified
because perf-o-matic cannot parse the new JSON format.

The new JSON format is simply an array of the old JSON output. This JSON is then merged into
results-template.html along with jQuery and copied as a HTML file of the same filename as
the output JSON file with a .html extension.

We merge all scripts and the JSON output into the results page as opposed to including them
with the src content attribute to make it standalone so that we may post it on Bugzilla or
e-mail it to someone else without breaking it.

* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner.run):
(PerfTestsRunner._generate_json): Merge "contents" with the existing JSON file when generating
a results page, and generate the results page from results-template.html merged with jQuery and
the generated JSON output.
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(_test_run_with_json_output): Extracted from test_run_with_upload_json to be shared with
several test cases.
(_test_run_with_json_output.mock_upload_json): Ditto.
(test_run_with_json_output): Refactored to use _test_run_with_json_output.
(test_run_generates_results_page): Added. Tests the new feature.
(test_run_with_json_source): Refactored to use _test_run_with_json_output.
(test_run_with_multiple_repositories): Ditto.
(test_run_with_upload_json): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][jhbuild] Make run-with-jhbuild become the jhbuild process itself.
https://bugs.webkit.org/show_bug.cgi?id=92592

Reviewed by Eric Seidel.

Adapt to the changes made to GTK+'s run-with-jhbuild in r123979
and make EFL's run-with-jhbuild call os.execve() instead of
launching a subprocess as well.

This should make it possible to interrupt execution of jhbuild
cleanly.

* efl/run-with-jhbuild:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] pass acceleratePainting info to settings
https://bugs.webkit.org/show_bug.cgi?id=92467

Patch by Lu Guanqun <guanqun.lu@intel.com> on 2012-07-29
Reviewed by Eric Seidel.

The acceleratePainting info is not passed into settings correctly so
that GPU composition would not use the code path of accelerated painting.

* src/WebLayerTreeView.cpp:
(WebKit::WebLayerTreeView::Settings::operator CCLayerTreeSettings):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123987 268f45cc-cd09-0410-ab3c-d52691b4dbfc
In flipped blocks, a point on the top edge of a text box is considered outside the box (and vice versa)
https://bugs.webkit.org/show_bug.cgi?id=92597

Reviewed by Ryosuke Niwa.

Source/WebCore: 

This is similar to <http://webkit.org/b/92593> except for RenderText. Fixing this required
fixing some code that creates a point inside a box by setting its y coordinate to the
logical top of the box. In a flipped block, this would be just outside the box.

Enhanced fast/writing-mode/flipped-blocks-hit-test-line-edges.html to cover this.

* editing/visible_units.cpp:
(WebCore::absoluteLineDirectionPointToLocalPointInBlock): Changed to use
RootInlineBox::blockDirectionPointInLine in the vertical case as well.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::positionForPointWithInlineChildren): Changed to use
RootInlineBox::blockDirectionPointInLine.
* rendering/RenderText.cpp:
(WebCore::RenderText::positionForPoint): Changed the strictness of y inequalities based on
the flippedness of the block. This fixes the bug.
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::blockDirectionPointInLine): Moved the implementation here from the
header, and made it return the bottom in the flipped block case, so that the returned point
is inside the line in that case as well.
* rendering/RootInlineBox.h:

LayoutTests: 

Added hits inside the text to this test.

* fast/writing-mode/flipped-blocks-hit-test-line-edges-expected.txt:
* fast/writing-mode/flipped-blocks-hit-test-line-edges.html:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123988 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PropertyNameArray::m_shouldCache is only assigned and never used
https://bugs.webkit.org/show_bug.cgi?id=92598

Reviewed by Dan Bernstein.

* runtime/PropertyNameArray.h:
(JSC::PropertyNameArray::PropertyNameArray):
(PropertyNameArray):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123989 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Hit testing in the gap between pages returns incorrect results in flipped blocks writing modes
https://bugs.webkit.org/show_bug.cgi?id=92600

Reviewed by Simon Fraser.

Source/WebCore: 

Test: fast/multicol/hit-test-gap-between-pages-flipped.html

* rendering/RenderBlock.h:
(WebCore::RenderBlock): Promoted offsetForContents() from private to protected, and demoted
adjustPointToColumnContents() back to private.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hitTest): Changed to flip the point passed to updateHitTestResults().
* rendering/RenderView.cpp:
(WebCore::RenderView::updateHitTestResult): Changed to call offsetForContents(), which, as
of r123977, correctly accounts for flippedness.

LayoutTests: 

* fast/multicol/hit-test-gap-between-pages-flipped-expected.txt: Added.
* fast/multicol/hit-test-gap-between-pages-flipped.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123990 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] HarfBuzzShaper can't handle segmented text run
https://bugs.webkit.org/show_bug.cgi?id=92445

Reviewed by Tony Chang.

Pass the range to be displayed to HarfBuzzShaper. The shaper calculates positions and advances of each glyph
regardless of the range, but only add glyphs which are in the range.

No new tests. platform/chromium-linux/fast/text/international/draw-complex-text-from-to.html should
work as expected once we move to use harfbuzz-ng on linux. Note that the current expectation will need to be rebaselined
because the old hb shaper (ComplexTextController) mishandles the range. |to| should be exclusive. I'll rebaseline
the expectation later.

* platform/graphics/harfbuzz/FontHarfBuzz.cpp:
(WebCore::Font::drawComplexText): Call shaper.setDrawRange().
* platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::HarfBuzzShaper):
(WebCore::HarfBuzzShaper::setDrawRange): Added.
(WebCore):
(WebCore::HarfBuzzShaper::shouldDrawCharacterAt): Added.
(WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Added variables that hold pending advances.
(WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun): Add only glyphs which are in the given range to glyphBuffer.
* platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
(HarfBuzzShaper):
* platform/graphics/mac/FontComplexTextMac.cpp:
(WebCore::Font::drawComplexText): Call shaper.setDrawRange().


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123991 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused method HTMLConstructionSiteTask::take(HTMLConstructionSiteTask&)
https://bugs.webkit.org/show_bug.cgi?id=92601

Patch by Kwang Yul Seo <skyul@company100.net> on 2012-07-29
Reviewed by Adam Barth.

This method was introduced in r104000, but has never been used from the beginning.

No functional change.

* html/parser/HTMLConstructionSite.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix opacity issue of fast/forms/date/calendar-picker-appearance.html
https://bugs.webkit.org/show_bug.cgi?id=92605

Reviewed by Hajime Morita.

We need to wait for pixel dumping until CSS transition completion for
the 'main' element, which has transition from opacity:0 to opacity:1.

* fast/forms/date/calendar-picker-appearance.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123993 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r123993): fast/forms/date/calendar-picker-type-change-onclick.html fails

* fast/forms/date/calendar-picker-appearance-expected.txt:
* fast/forms/date/calendar-picker-appearance.html:
Clear webkitTransitionEnd event handler before notifyDone().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123994 268f45cc-cd09-0410-ab3c-d52691b4dbfc
forward-delete in the last cell of a table moves the caret after the table
https://bugs.webkit.org/show_bug.cgi?id=24250

Patch by Sukolsak Sakshuwong <sukolsak@google.com> on 2012-07-29
Reviewed by Ryosuke Niwa.

Source/WebCore:

The ForwardDelete command moved the cursor after the table when it's invoked
in an empty cell that is the last cell of a table. It also removed the break
element when invoked in an empty cell that is not the last cell of a table.
Make it do nothing inside an empty table cell.

Test: editing/deleting/forward-delete-empty-table-cell.html

* editing/TypingCommand.cpp:
(WebCore::TypingCommand::forwardDeleteKeyPressed):

LayoutTests:

* editing/deleting/forward-delete-empty-table-cell-expected.txt: Added.
* editing/deleting/forward-delete-empty-table-cell.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123995 268f45cc-cd09-0410-ab3c-d52691b4dbfc
getChannelData should raise exception when index is more than numberOfChannels.
https://bugs.webkit.org/show_bug.cgi?id=92223

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

Source/WebCore:

Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBuffer-section
In getChannelData function, the index value MUST be less than numberOfChannels
or an exception will be thrown.

Test: webaudio/audiobuffer.html

* Modules/webaudio/AudioBuffer.cpp:
(WebCore::AudioBuffer::getChannelData):
(WebCore):
* Modules/webaudio/AudioBuffer.h:
(WebCore):
(AudioBuffer):
* Modules/webaudio/AudioBuffer.idl: raise exception when index is not less than numberOfChannels.

LayoutTests:

Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBuffer-section
Add test to cover basic attributes of AudioBuffer.

* webaudio/audiobuffer-expected.txt: Added.
* webaudio/audiobuffer.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123996 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix removing invalid values from color input suggestions
https://bugs.webkit.org/show_bug.cgi?id=92502

Reviewed by Kent Tamura.

Make ColorInputType::typeMismatchFor() return false for invalid color
values so that they don't appear in the list of suggestions that
ColorInputType::suggestions() returns.

No new tests. Tests to be added in Bug 92075.

* html/ColorInputType.cpp:
(WebCore::ColorInputType::typeMismatchFor):
(WebCore):
* html/ColorInputType.h:
(ColorInputType):


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