Ignore visibility:hidden elements when computing compositing layer bounds
https://bugs.webkit.org/show_bug.cgi?id=92569

Reviewed by Dan Bernstein.

Source/WebCore:

When computing the bounds of compositing layers, we would take into account
layers with no visible content (visibility:hidden, and no non-hidden descendants).
This caused some huge layers in mobile Google maps.

Tests: compositing/geometry/bounds-ignores-hidden-composited-descendant.html
       compositing/geometry/bounds-ignores-hidden-dynamic.html
       compositing/geometry/bounds-ignores-hidden.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateLayerBounds): If the ExcludeHiddenDescendants flag is set, return
the empty rect for layers with no visible content or descendants, as long as the layer is not
the root of the subtree whose bounds are being computed.
calculateLayerBounds() currently (I think incorrectly) passes the default flags to the recursive calls.
It should probably just pass 'flags', but to make this change safe, OR in the ExcludeHiddenDescendants
flag.
* rendering/RenderLayer.h: Add an ExcludeHiddenDescendants flag to the CalculateLayerBoundsFlags.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::calculateCompositedBounds): Pass the ExcludeHiddenDescendants
flag.

LayoutTests:

Tests related to visibility:hidden's affect on composited layer bounds.

* compositing/geometry/bounds-ignores-hidden-composited-expected.txt: Added.
* compositing/geometry/bounds-ignores-hidden-composited-descendant.html: Added.
Test with visibility:visible descendants of a visibility:hidden element in a
compositing layer.

* compositing/geometry/bounds-ignores-hidden-dynamic-expected.txt: Added.
* compositing/geometry/bounds-ignores-hidden-dynamic.html: Added.
Test that changes visibility on descendants of a compositing layer, to test dynamic changes.

* compositing/geometry/bounds-ignores-hidden-expected.txt: Added.
* compositing/geometry/bounds-ignores-hidden.html: Added.
Test with a compositing layer having visibility:hidden descendants, which dumps
layer tree information.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123971 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Size changes on a layer with negative z-index children don't repaint correctly
https://bugs.webkit.org/show_bug.cgi?id=92583

Reviewed by Dean Jackson.

Source/WebCore:

Negative z-index descendants cause a composited layer to have a separate
layer for foreground content. If something caused that foreground layer
to change size (like toggling visibility on a descendant), we failed to
repaint the foreground layer, resulting in stretched content.

Test: compositing/geometry/bounds-ignores-hidden-dynamic-negzindex.html

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Repaint the foreground
layer if its size changes, like we do for the main layer.

LayoutTests:

Test that causes a composited layer with a foreground layer (by virtue of having
negative z-index children) to resize.

Add missing pixel result for bounds-ignores-hidden-dynamic.html too.

* compositing/geometry/bounds-ignores-hidden-dynamic-expected.png: Added.
* compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.png: Added.
* compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt: Added.
* compositing/geometry/bounds-ignores-hidden-dynamic-negzindex.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123972 268f45cc-cd09-0410-ab3c-d52691b4dbfc
In flipped lines writing modes, hit testing at the beginning of a column may return a result from the previous column
https://bugs.webkit.org/show_bug.cgi?id=92566

Reviewed by Simon Fraser.

Source/WebCore: 

Enhanced the fix for <http://webkit.org/b/92524> to work with flipped lines.

Extended fast/multicol/hit-test-end-of-column-with-line-height.html.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::positionForPointWithInlineChildren): For flipped lines, check if the
hit line is the last one before a page break, and in that case, check if the hit point was
after the break.

LayoutTests: 

* fast/multicol/hit-test-end-of-column-with-line-height-expected.txt: Updated.
* fast/multicol/hit-test-end-of-column-with-line-height.html: Extended with tests for
horizontal-bt.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123973 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][EFL] Add ewk_view_scale_{get|set} to EwkView.
https://bugs.webkit.org/show_bug.cgi?id=92446

Patch by Ryuan Choi <ryuan.choi@samsung.com> on 2012-07-28
Reviewed by Kenneth Rohde Christiansen.

Add methods to Ewk_View to get or set the scale factor of page.

* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_scale_set):
(ewk_view_scale_get):
* UIProcess/API/efl/ewk_view.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123974 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] New baselines and test expectations update.
https://bugs.webkit.org/show_bug.cgi?id=72039
https://bugs.webkit.org/show_bug.cgi?id=92569
https://bugs.webkit.org/show_bug.cgi?id=92583

Unreviewed, test expectations update.

* platform/chromium-linux-x86/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt: Added.
* platform/chromium-linux-x86/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.png: Added.
* platform/chromium-linux-x86/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt: Added.
* platform/chromium-linux/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt: Added.
* platform/chromium-linux/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.png: Added.
* platform/chromium-linux/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt: Added.
* platform/chromium-mac-snowleopard/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.png: Added.
* platform/chromium-mac/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.png: Added.
* platform/chromium-win-xp/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt: Added.
* platform/chromium-win-xp/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.png: Added.
* platform/chromium-win-xp/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt: Added.
* platform/chromium-win/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt: Added.
* platform/chromium-win/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.png: Added.
* platform/chromium-win/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt: Added.
* platform/chromium/TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123975 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop copying unnecessary files in WebKit2 build
https://bugs.webkit.org/show_bug.cgi?id=92587

Reviewed by Dan Bernstein.

* WebKit2.xcodeproj/project.pbxproj:
We were accidentally copying ColorSpaceData.h and EventDispatcher.messages.in into the
build products. Stop this.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: RenderBlock::offsetForContents() is wrong in flipped blocks writing modes
https://bugs.webkit.org/show_bug.cgi?id=92588

Reviewed by Sam Weinig.

Tests: fast/multicol/hit-test-block-axis-flipped.html
       fast/writing-mode/flipped-blocks-hit-test-overflow-scroll.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::offsetForContents): Flip the point, which puts it back in unflipped
coordinates, before adding the scroll offset and adjusting for columns, then flip it back.
(WebCore::RenderBlock::adjustPointToColumnContents): Changed the inline-axis cases to
work with an unflipped point.

LayoutTests: Hit test results are wrong in flipped blocks writing modes with block column axis
https://bugs.webkit.org/show_bug.cgi?id=92588

Reviewed by Sam Weinig.

* fast/multicol/hit-test-block-axis-flipped-expected.txt: Added.
* fast/multicol/hit-test-block-axis-flipped.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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