WebKit-https.git
4 years agoHTMLMediaElement::isPlayingAudio() should return false if the element is explicitly...
adachan@apple.com [Mon, 19 Jan 2015 18:50:55 +0000 (18:50 +0000)]
HTMLMediaElement::isPlayingAudio() should return false if the element is explicitly muted by script.
https://bugs.webkit.org/show_bug.cgi?id=140524

Reviewed by Andreas Kling.

Source/WebCore:

Test: media/muted-video-is-playing-audio.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setMuted):
Call Document::updateIsPlayingAudio() to recalculate the overall audio playing state.
(WebCore::HTMLMediaElement::isPlayingAudio):
HTMLMediaElement::isPlayingAudio() should return false if the media element is explicitly muted.

LayoutTests:

The test contains a looping video. It makes sure initially Page::isPlayingAudio() returns true.
It should return false after the video is muted, and true again after the video is unmuted.

* media/muted-video-is-playing-audio-expected.txt: Added.
* media/muted-video-is-playing-audio.html: Added.

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

4 years agoTry to fix build warnings with newer versions of clang.
andersca@apple.com [Mon, 19 Jan 2015 18:40:47 +0000 (18:40 +0000)]
Try to fix build warnings with newer versions of clang.

* Storage/StorageAreaImpl.h:

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

4 years ago[SVG -> OTF Converter] Flip the switch on
mmaxfield@apple.com [Mon, 19 Jan 2015 18:37:19 +0000 (18:37 +0000)]
[SVG -> OTF Converter] Flip the switch on
https://bugs.webkit.org/show_bug.cgi?id=140592

Source/JavaScriptCore:

Reviewed by Antti Koivisto.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Reviewed by Antti Koivisto.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

Reviewed by Antti Koivisto.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

Reviewed by Antti Koivisto.

* Configurations/FeatureDefines.xcconfig:

LayoutTests:

Updating test expected results.

svg/W3C-SVG-1.1/fonts-glyph-04-t.svg tests something which isn't spec'ed
and is impossible to perform with the converter, so I have deleted that
test.

svg/custom/skip-underline-missing-glyph-expected.html was testing
incorrect behavior, so I have updated the test.

The getStartPositionOfChar() calls in svg/text/kerning.svg and
svg/text/multichar-glyph.svg are currently impossible to be implemented
correctly with the converter, so I have updated the expected results to
test for the updated results of those calls.

Reviewed by Antti Koivisto.

* platform/mac/TestExpectations:
* platform/mac/svg/W3C-SVG-1.1-SE/color-prop-05-t-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/coords-units-03-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/filters-felem-01-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/interact-pointer-03-t-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/linking-uri-01-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/painting-marker-07-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/paths-dom-02-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-17-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-20-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/pservers-pattern-03-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/pservers-pattern-04-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/struct-use-14-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/styling-pres-02-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/svgdom-over-01-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/text-tref-03-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/text-tspan-02-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/types-dom-07-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/filters-light-04-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/filters-turb-02-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/fonts-elem-05-t-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/fonts-elem-06-t-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/fonts-glyph-04-t-expected.png: Removed.
* platform/mac/svg/W3C-SVG-1.1/fonts-glyph-04-t-expected.txt: Removed.
* platform/mac/svg/W3C-SVG-1.1/fonts-kern-01-t-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/masking-mask-01-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/render-elems-06-t-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/render-elems-07-t-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/render-elems-08-t-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/render-groups-01-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/render-groups-03-t-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/text-align-08-b-expected.txt:
* platform/mac/svg/custom/glyph-setting-d-attribute-expected.txt:
* platform/mac/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt:
* platform/mac/svg/custom/svg-fonts-fallback-expected.txt:
* platform/mac/svg/foreignObject/text-tref-02-b-expected.txt:
* platform/mac/svg/text/kerning-expected.txt:
* platform/mac/svg/text/multichar-glyph-expected.txt:
* platform/mac/svg/transforms/text-with-mask-with-svg-transform-expected.txt:
* svg/W3C-SVG-1.1/fonts-glyph-04-t-expected.txt: Removed.
* svg/W3C-SVG-1.1/fonts-glyph-04-t-w3c.png: Removed.
* svg/W3C-SVG-1.1/fonts-glyph-04-t.svg: Removed.
* svg/custom/skip-underline-missing-glyph-expected.html: Removed.
* svg/custom/skip-underline-missing-glyph-expected.txt: Added.
* svg/custom/skip-underline-missing-glyph.html:

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

4 years agoMark a couple slow tests as such.
ap@apple.com [Mon, 19 Jan 2015 18:32:16 +0000 (18:32 +0000)]
Mark a couple slow tests as such.

* TestExpectations:

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

4 years ago"Unknown option: sharedworkerglobalscopeconstructorsfile" when running bindings tests.
ap@apple.com [Mon, 19 Jan 2015 18:05:00 +0000 (18:05 +0000)]
"Unknown option: sharedworkerglobalscopeconstructorsfile" when running bindings tests.
https://bugs.webkit.org/show_bug.cgi?id=140606

Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/bindings/main.py:
(BindingsTests.generate_supplemental_dependency):
(BindingsTests.main):

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

4 years ago[Win] Unreviewed gardening: Remove unneeded win-specific result.
bfulgham@apple.com [Mon, 19 Jan 2015 17:43:18 +0000 (17:43 +0000)]
[Win] Unreviewed gardening: Remove unneeded win-specific result.

At one point, Windows error messages did not include line numbers and needed its own results.
This is no longer the case, and any such results should be removed

* platform/win/fast/xmlhttprequest/xmlhttprequest-no-file-access-expected.txt: Removed.

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

4 years ago[Win] Unreviewed gardening: Mark some passing tests appropriately.
bfulgham@apple.com [Mon, 19 Jan 2015 17:35:08 +0000 (17:35 +0000)]
[Win] Unreviewed gardening: Mark some passing tests appropriately.

* platform/win/TestExpectations:

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

4 years agoConsole log sometimes prefixed with line number
ap@apple.com [Mon, 19 Jan 2015 17:25:23 +0000 (17:25 +0000)]
Console log sometimes prefixed with line number
https://bugs.webkit.org/show_bug.cgi?id=105280

Reviewed by Darin Adler.

Source/WebCore:

Improve the logic for determining whether a console message should be associated
with a source code location.

* dom/ScriptableDocumentParser.h:
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::shouldAssociateConsoleMessagesWithTextPosition):
* html/parser/HTMLDocumentParser.h:
* page/PageConsoleClient.cpp:
(WebCore::getParserLocationForConsoleMessage):
(WebCore::PageConsoleClient::addMessage):
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::pauseParsing):
* xml/parser/XMLDocumentParser.h:
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::shouldAssociateConsoleMessagesWithTextPosition):

LayoutTests:

Some messages lost line numbers now. Some of these were definitely wrong, others
were roughly right. Unfortunately, it is not currently possible to figure out whether
ScriptController actually executes a script after passing control to it. So the cases
where it refuses to execute the script and logs a message are handled like those
where it does.

I think that it shouldn't be a big obstacle in practice, it is easy enough to find
a script in a page when Web Inspector tells you that scripts were not allowed.

* fast/frames/sandboxed-iframe-attribute-parsing-06-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-07-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-08-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-09-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-10-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-11-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-12-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-13-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-14-expected.txt:
* fast/frames/sandboxed-iframe-parsing-space-characters-expected.txt:
* fast/frames/sandboxed-iframe-scripting-04-expected.txt:
* http/tests/security/contentSecurityPolicy/sandbox-empty-expected.txt:
* http/tests/security/contentSecurityPolicy/sandbox-empty-subframe-expected.txt:
* http/tests/security/contentSecurityPolicy/sandbox-in-http-header-control-expected.txt:
* http/tests/security/contentSecurityPolicy/sandbox-in-http-header-expected.txt:
* http/tests/security/contentSecurityPolicy/sandbox-invalid-header-expected.txt:
* http/tests/security/isolatedWorld/sandboxed-iframe-expected.txt:
* http/tests/security/mixedContent/insecure-script-in-iframe-expected.txt:
* http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe-expected.txt:
* http/tests/security/no-javascript-refresh-expected.txt:
* http/tests/security/no-javascript-refresh-spaces-expected.txt:

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
Unmark tests that were broken by this.

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

4 years ago[SVG -> OTF Converter] Glyphs get clipped weirdly
mmaxfield@apple.com [Mon, 19 Jan 2015 16:32:26 +0000 (16:32 +0000)]
[SVG -> OTF Converter] Glyphs get clipped weirdly
https://bugs.webkit.org/show_bug.cgi?id=137095

Reviewed by Antti Koivisto.

The Adobe CFF spec doesn't actually tell you how to serialize a
"FontBBox." After trial and error, it seems to be (x, y, width,
height).

Test: svg/text/kerning.svg
      svg/W3C-SVG-1.1/fonts-kern-01-t.svg

* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::appendHEADTable):
(WebCore::SVGToOTFFontConverter::appendCFFTable):
(WebCore::SVGToOTFFontConverter::appendVHEATable):
(WebCore::CFFBuilder::CFFBuilder):
(WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
(WebCore::SVGToOTFFontConverter::processGlyphElement):

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

4 years agoREGRESSION(r178486): It broke the !ENABLE(VIDEO) build
ossy@webkit.org [Mon, 19 Jan 2015 15:27:57 +0000 (15:27 +0000)]
REGRESSION(r178486): It broke the !ENABLE(VIDEO) build
https://bugs.webkit.org/show_bug.cgi?id=140611

Reviewed by Eric Carlson.

* testing/Internals.cpp:
(WebCore::Internals::elementIsBlockingDisplaySleep):
* testing/Internals.h:

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

4 years ago[Win] REGRESSION(r177542 or r177613): svg/W3C tests are broken
ossy@webkit.org [Mon, 19 Jan 2015 14:23:43 +0000 (14:23 +0000)]
[Win] REGRESSION(r177542 or r177613): svg/W3C tests are broken
https://bugs.webkit.org/show_bug.cgi?id=139972

Unreviewed gardening, unskip now passing tests after r178139.

* platform/win/TestExpectations:

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

4 years ago[GTK] [WK2] TestWebKitWebView snapshot fails
carlosgc@webkit.org [Mon, 19 Jan 2015 13:33:58 +0000 (13:33 +0000)]
[GTK] [WK2] TestWebKitWebView snapshot fails
https://bugs.webkit.org/show_bug.cgi?id=120404

Reviewed by Žan Doberšek.

Rework the test to make sure the snapshot is always created at the
desired size.

* Scripts/run-gtk-tests:
(TestRunner): Unskip /webkit2/WebKitWebView/snapshot.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:
(testWebViewSnapshot): Use a fixed size for the document, and
disable scrollbars to make sure the visible area is always the
WebView size.
* TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp:
(WebViewTest::showInWindowAndWaitUntilMapped): Add optional width
and height parameters to create the window with a given size.
* TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.h:

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

4 years agoUnreviewed, when committing r178642 I forgot to add the
svillar@igalia.com [Mon, 19 Jan 2015 11:21:41 +0000 (11:21 +0000)]
Unreviewed, when committing r178642 I forgot to add the
TestExpectations change.

* TestExpectations: Added
fast/css-grid-layout/flex-and-minmax-content-resolution-rows.html.

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

4 years ago[CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space
svillar@igalia.com [Mon, 19 Jan 2015 09:44:22 +0000 (09:44 +0000)]
[CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space
https://bugs.webkit.org/show_bug.cgi?id=139059

Reviewed by David Hyatt.

Source/WebCore:

Test: fast/css-grid-layout/grid-grow-tracks-to-their-max.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):

LayoutTests:

The third step of the grid track sizing algorithm (method
ComputeUsedBreadthOfGridTracks in the old specs version of the
algorithm) tries to grow all grid tracks until the remaining space
is exhausted. Should the remaining space is undefined we should fill
the tracks up to their limits. This is specified in pseudocode like
this:

    For each Grid track t in GridTracks
        t.UsedBreadth = t.MaxBreadth

That's correct for most of the cases, but it becomes
wrong whenever t.UsedBreadth > t.MaxBreadth something that is not
incorrect. What we actually want to do is to grow the track to its
maximum if and only if the used breadth is smaller than the maximum.

* TestExpectations: Added a test which is correct but starts to fail
due to another bug (wkb.ug/139058).
* fast/css-grid-layout/grid-auto-columns-rows-update.html:
* fast/css-grid-layout/grid-grow-tracks-to-their-max-expected.txt: Added.
* fast/css-grid-layout/grid-grow-tracks-to-their-max.html: Added.
* fast/css-grid-layout/grid-item-removal-track-breadth-update.html:
* fast/css-grid-layout/minmax-max-content-resolution-rows.html:
* fast/css-grid-layout/minmax-min-content-column-resolution-rows.html:
* fast/css-grid-layout/percent-of-indefinite-track-size-in-auto.html:
* fast/css-grid-layout/percent-of-indefinite-track-size.html:

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

4 years agoiOS EWS queue name should be consistent
ddkilzer@apple.com [Mon, 19 Jan 2015 07:15:38 +0000 (07:15 +0000)]
iOS EWS queue name should be consistent
<http://webkit.org/b/140585>

Reviewed by Daniel Bates.

* Scripts/webkitpy/common/config/ews.json: Rename 'ios-device'
to 'ios'.
* Scripts/webkitpy/common/config/ports.py: Ditto.
(DeprecatedPort.port):
(IOSPort):
* Scripts/webkitpy/port/ios.py: Ditto.
(IOSPort):

* Scripts/webkitpy/port/factory.py:
(PortFactory): Re-order PORT_CLASSES so ios.IOSSimulatorPort
appears before ios.IOSPort.  If this is not done,
`run-webkit-tests --ios-simulator` will get the wrong Port class
(IOSPort instead of IOSSimulatorPort) due to the way that
PortFactory.get() uses prefix matching of <Port>.port_name to
find the correct class to use.

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

4 years agohttp/tests/navigation/navigation-interrupted-by-fragment.html frequently times out
ap@apple.com [Mon, 19 Jan 2015 07:07:23 +0000 (07:07 +0000)]
http/tests/navigation/navigation-interrupted-by-fragment.html frequently times out
https://bugs.webkit.org/show_bug.cgi?id=140607

* platform/mac-wk2/TestExpectations: Added an expectation.

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

4 years agoUpdate bindings generation test results after <https://trac.webkit.org/changeset...
ap@apple.com [Mon, 19 Jan 2015 06:57:00 +0000 (06:57 +0000)]
Update bindings generation test results after <https://trac.webkit.org/changeset/178633>.

* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorConstructor::constructJSTestEventConstructor):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
(WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionAddEventListener):
(WebCore::jsTestObjPrototypeFunctionRemoveEventListener):

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

4 years agoGenerate matchingShorthandsForLonghand() implementation from CSSPropertyNames.in
cdumez@apple.com [Mon, 19 Jan 2015 05:32:28 +0000 (05:32 +0000)]
Generate matchingShorthandsForLonghand() implementation from CSSPropertyNames.in
https://bugs.webkit.org/show_bug.cgi?id=140599

Reviewed by Antti Koivisto.

Generate matchingShorthandsForLonghand() implementation from
CSSPropertyNames.in. We already have all the information we need in
CSSPropertyNames.in to generate the big switch() in
matchingShorthandsForLonghand().

A few shorthands still aren't generated. I will look into getting rid
of the custom code in a follow-up patch.

* css/StylePropertyShorthand.cpp:
(WebCore::makeVector): Deleted.
(WebCore::matchingShorthandsForLonghand): Deleted.
* css/StylePropertyShorthand.h:
(WebCore::matchingCustomShorthandsForLonghand):
* css/makeprop.pl:
(constructShorthandsVector):

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

4 years agoOut of bounds write in canvas.toDataURL
dino@apple.com [Mon, 19 Jan 2015 05:14:56 +0000 (05:14 +0000)]
Out of bounds write in canvas.toDataURL
https://bugs.webkit.org/show_bug.cgi?id=140594
<rdar://problem/19449135>

Reviewed by Alexey Proskuryakov.

Source/WebCore:

In the case where we have a canvas object that does
not have premultiplied alpha (an option you can select
when using WebGL) we have to multiply out the alpha when
converting to JPEG via toDataURL.

For this we created a buffer, but were not accurately
resizing it before flattening the alpha.

Test: fast/canvas/webgl/toDataURL-unpremultipliedAlpha.html

* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageDataToDataURL): Call resize once we've
determined we have enough space.

LayoutTests:

Creates a WebGL context that does not have
premultiplied alpha, fills it with 50% transparent white,
and attempts to convert the canvas to a JPEG data URL. This
exercises the code path that was not accurately
allocating data (to flatten the alpha).

* fast/canvas/webgl/toDataURL-unpremultipliedAlpha-expected.txt: Added.
* fast/canvas/webgl/toDataURL-unpremultipliedAlpha.html: Added.

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

4 years agoAttempt to fix the iOS build after <http://trac.webkit.org/changeset/178631>
dbates@webkit.org [Mon, 19 Jan 2015 00:03:33 +0000 (00:03 +0000)]
Attempt to fix the iOS build after <trac.webkit.org/changeset/178631>
(https://bugs.webkit.org/show_bug.cgi?id=129441)

Source/WebKit/mac:

Pass lvalue reference to WebCore::Highlight instead of pointer in call to InspectorController::getHighlight().
Also substitute HighlightType::Node and HighlightType::Rects for HighlightTypeNode and HighlightTypeRects, respectively.

* WebInspector/WebNodeHighlightView.mm:
(-[WebNodeHighlightView layoutSublayers:]):

Source/WebKit2:

* UIProcess/WKInspectorHighlightView.mm:
(-[WKInspectorHighlightView update:]): Substitute HighlightType::Node and
HighlightType::Rects for HighlightTypeNode and HighlightTypeRects, respectively.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::highlight): Pass lvalue reference to WebCore::Highlight
instead of pointer in call to InspectorController::getHighlight().

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

4 years agoFix style issues and add availability macros missed in r178634
weinig@apple.com [Sun, 18 Jan 2015 22:16:35 +0000 (22:16 +0000)]
Fix style issues and add availability macros missed in r178634
https://bugs.webkit.org/show_bug.cgi?id=140597

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
Add missing availability macros.

* UIProcess/API/Cocoa/_WKUserContentFilter.h:
* UIProcess/API/Cocoa/_WKUserContentFilter.mm:
(-[_WKUserContentFilter initWithName:serializedRules:]):
(-[_WKUserContentFilter _initWithName:serializedRules:]): Deleted.
Removed unnecessary leading underscore from init method.

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

4 years agoAdd initial experimental user content filtering API
weinig@apple.com [Sun, 18 Jan 2015 21:54:12 +0000 (21:54 +0000)]
Add initial experimental user content filtering API
https://bugs.webkit.org/show_bug.cgi?id=140584

Reviewed by Benjamin Poulain.

Source/WebCore:

Change content extensions to be managed through the UserContentController.

* WebCore.exp.in:
Update exports.

* WebCore.xcodeproj/project.pbxproj:
Update for removed files.

* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::removeAllRuleLists):
(WebCore::ContentExtensions::ContentExtensionsBackend::sharedInstance): Deleted.
* contentextensions/ContentExtensionsBackend.h:
Remove concept of a shared instance and add a removeAllRuleLists() function.

* contentextensions/ContentExtensionsInterface.cpp: Removed.
* contentextensions/ContentExtensionsInterface.h: Removed.
Since there is no shared instance anymore, checking if a URL should be blocked
now has to go directly to the backend.

* contentextensions/ContentExtensionsManager.cpp:
(WebCore::ContentExtensions::ExtensionsManager::createRuleList):
(WebCore::ContentExtensions::ExtensionsManager::loadExtension): Deleted.
* contentextensions/ContentExtensionsManager.h:
Update interface to accommodate the lack of a shared instance. Now, all this
file does is take a serialized rule list and outputs the Vector of ContentExtensionRules

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
Check with the UserContentController to see if the URL should be blocked.

* page/UserContentController.cpp:
(WebCore::UserContentController::addUserContentFilter):
(WebCore::UserContentController::removeAllUserContentFilters):
(WebCore::UserContentController::contentFilterBlocksURL):
* page/UserContentController.h:
Add single point of interaction for both the WebKit level to add and remove
content filters and WebCore to check to see if URLs should be blocked.

Source/WebKit2:

Moves content filtering from being per-ProcessPool to per-UserContentController.

* Shared/API/APIObject.h:
* Shared/API/c/WKBase.h:
* UIProcess/API/APIUserContentFilter.cpp: Added.
(API::UserContentFilter::UserContentFilter):
(API::UserContentFilter::~UserContentFilter):
* UIProcess/API/APIUserContentFilter.h: Added.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKUserContentFilterRef.cpp: Added.
(WKUserContentFilterGetTypeID):
(WKUserContentFilterCreate):
* UIProcess/API/C/WKUserContentFilterRef.h: Added.
* UIProcess/API/C/WebKit2_C.h:
* UIProcess/API/Cocoa/_WKUserContentFilter.h: Added.
* UIProcess/API/Cocoa/_WKUserContentFilter.mm: Added.
(WKUserContentControllerAddUserContentFilter):
(WKUserContentControllerRemoveAllUserContentFilters):
(-[_WKUserContentFilter _initWithName:ruleList:]):
* UIProcess/API/Cocoa/_WKUserContentFilterInternal.h: Added.
Add a basic UserContentFilter type and expose it via both the Objective-C API (as _WKUserContentFilter)
and via the C SPI (as WKUserContentFilterRef).

* UIProcess/API/C/WKUserContentControllerRef.h:
* UIProcess/API/C/WKUserContentControllerRef.cpp:
Add C-SPI to set and remove WKUserContentFilterRefs.

* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _loadContentExtensionWithIdentifier:serializedRules:successCompletionHandler:errorCompletionHandler:]): Deleted.
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processDidFinishLaunching):
(WebKit::WebProcessPool::loadContentExtension): Deleted.
* UIProcess/WebProcessPool.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::loadContentExtension): Deleted.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
Remove the old SPI for loading content filters that was per-ProcessPool. Content filters now follow
the same pattern as UserScripts and UserStyleSheets as being per-UserContentController.

* UIProcess/API/Cocoa/WKUserContentController.mm:
(-[WKUserContentController _addUserContentFilter:]):
(-[WKUserContentController _removeAllUserContentFilters]):
* UIProcess/API/Cocoa/WKUserContentControllerInternal.h:
* UIProcess/API/Cocoa/WKUserContentControllerPrivate.h: Added.
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
(WebKit::WebUserContentControllerProxy::addProcess):
(WebKit::WebUserContentControllerProxy::addUserContentFilter):
(WebKit::WebUserContentControllerProxy::removeAllUserContentFilters):
* UIProcess/UserContent/WebUserContentControllerProxy.h:
* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::addUserContentFilters):
(WebKit::WebUserContentController::removeAllUserContentFilters):
* WebProcess/UserContent/WebUserContentController.h:
* WebProcess/UserContent/WebUserContentController.messages.in:
Pipe user content filters over to all the WebProcesses that the UserContentController is
connected to.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

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

4 years agoREGRESSION (r125251): wrapper lifetimes of SVGElementInstance are incorrect
darin@apple.com [Sun, 18 Jan 2015 20:57:26 +0000 (20:57 +0000)]
REGRESSION (r125251): wrapper lifetimes of SVGElementInstance are incorrect
https://bugs.webkit.org/show_bug.cgi?id=132148

Reviewed by Anders Carlsson.

Test: svg/custom/use-instanceRoot-event-listeners.xhtml

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::addEventListener): Updated for the new return type
of JSListener::create. For the event type, use JSString::toAtomicString instead of
calling JSString::value and then converting to an AtomicString.
(WebCore::JSDOMWindow::removeEventListener): Same changes as for addEventListener.

* bindings/js/JSEventListener.cpp:
(WebCore::forwardsEventListeners): Added. Helper to detect the special case needed
for SVGElementInstance. In the future, for better encapsulation, we could use virtual
functions, but for now hard coding this single class seems fine.
(WebCore::correspondingElementWrapper): Added. For use if forwardsEventListeners
returns true, to find out where event listeners will be forwarded.
(WebCore::createJSEventListenerForAttribute): Added. Replaces the old function
createJSAttributeEventListener, for SVGElementInstance attributes only.
(WebCore::createJSEventListenerForAdd): Added. Helper function to avoid repeated
generated code in the addElementListener bindings other than the DOMWindow one.

* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::create): Changed to return a Ref instead of a PassRefPtr.
(WebCore::createJSEventListenerForAttribute): Renamed from createJSAttributeEventListener,
changed to return a RefPtr instead of a PassRefPtr and to take references rather than
pointers for non-null things.
(WebCore::createJSEventListenerForRemove): Added. Small wrapper that calls
createJSEventListenerForAdd since they are currently identical.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateAttributeEventListenerCall): Removed the special case for JSSVGElementInstance
and updated to call the new createJSEventListenerForAttribute. The special case for
SVGElementInstance is now in JSEventListener.h/cpp, which is nicer since we prefer to
keep the generated code simpler if possible.
(GenerateEventListenerCall): Removed the special case for JSSVGElementInstance. This
has been dead code since the explicit definition of add/removeEventListener was removed
from SVGElementInstance.idl, and was also a problem if someone were to use the
addEventListener function from EventTarget on an SVGElementInstance object. The function
needs to be generic at runtime. Use toAtomicString as in JSDOMWindow::addEventListener above.
Call the two new functions, createJSEventListenerForAdd and createJSEventListenerForRemove.
Those new functions properly handle SVGElementInstance.
(GenerateImplementation): Don't pass the class name to GenerateAttributeEventListenerCall
or GenerateEventListenerCall any more.
(GenerateConstructorDefinition): Use JSString::toAtomicString instead of calling
JSString::value and then converting to AtomicString.

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

4 years agobuild.webkit.org/dashboard: OS X EWS is now on Mavericks
ap@apple.com [Sun, 18 Jan 2015 18:39:59 +0000 (18:39 +0000)]
build.webkit.org/dashboard: OS X EWS is now on Mavericks
https://bugs.webkit.org/show_bug.cgi?id=140595

Reviewed by Csaba Osztrogonác.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
(BubbleQueueServer):

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

4 years agoWeb Inspector: highlight data for overlay should use protocol type builders
burg@cs.washington.edu [Sun, 18 Jan 2015 17:07:05 +0000 (17:07 +0000)]
Web Inspector: highlight data for overlay should use protocol type builders
https://bugs.webkit.org/show_bug.cgi?id=129441

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

Add a new domain for overlay types.

* CMakeLists.txt:
* DerivedSources.make:
* inspector/protocol/OverlayTypes.json: Added.

Source/WebCore:

As a first step towards cleaning up the inspector overlay, convert highlight
data construction to use protocol type builders. It's now really obvious what
data is being sent to the inspector overlay page.

This change paves the way towards using inspector protocol commands and events
if we want to support more interactive functionality in the inspector overlay.

This patch makes a few style cleanups, such as standardizing variable names,
using default member initializers, passing by reference, and fixing casts.

No new tests, no behavior changed.

* WebCore.exp.in:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::getHighlight):
(WebCore::InspectorController::buildObjectForHighlightedNode):
(WebCore::InspectorController::inspect): Deleted.
* inspector/InspectorController.h:
* inspector/InspectorOverlay.cpp:
(WebCore::buildRendererHighlight):
(WebCore::buildNodeHighlight):
(WebCore::buildQuadHighlight):
(WebCore::InspectorOverlay::InspectorOverlay):
(WebCore::InspectorOverlay::getHighlight):
(WebCore::buildObjectForPoint):
(WebCore::buildObjectForRect):
(WebCore::buildArrayForQuad):
(WebCore::buildObjectForHighlight):
(WebCore::buildObjectForRegion):
(WebCore::buildObjectForFlowRegions):
(WebCore::buildObjectForSize):
(WebCore::buildQuadObjectForCSSRegionContentClip):
Simplify how the clipping area is encoded. It's now 'regionClippingArea'
stored on a FragmentHighlightData instance.

(WebCore::InspectorOverlay::updatePaintRectsTimerFired):
(WebCore::InspectorOverlay::drawPaintRects):
(WebCore::buildArrayForRendererFragments):
(WebCore::appendPathCommandAndPoints):
(WebCore::appendPathSegment):
(WebCore::buildObjectForShapeOutside):
(WebCore::buildObjectForElementData):
(WebCore::InspectorOverlay::buildObjectForHighlightedNode):
(WebCore::InspectorOverlay::drawNodeHighlight):
(WebCore::InspectorOverlay::drawQuadHighlight):
(WebCore::InspectorOverlay::reset):
(WebCore::buildObjectForRegionHighlight): Deleted.
(WebCore::buildObjectForCSSRegionsHighlight): Deleted.
(WebCore::buildObjectForCSSRegionContentClip): Deleted.
(WebCore::buildObjectForRendererFragments): Deleted.
(WebCore::buildObjectForElementInfo): Deleted.
* inspector/InspectorOverlay.h:
(WebCore::Highlight::Highlight):
* inspector/InspectorOverlayPage.js:
(_createElementTitle):
(_drawElementTitle):
(_drawFragmentHighlight):
(drawNodeHighlight):
* testing/Internals.cpp:
(WebCore::Internals::inspectorHighlightRects):
(WebCore::Internals::inspectorHighlightObject):

Source/WebKit:

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

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

4 years ago[WK2][iOS] Add Cocoa delegate for logging diagnostic messages
cdumez@apple.com [Sun, 18 Jan 2015 01:41:15 +0000 (01:41 +0000)]
[WK2][iOS] Add Cocoa delegate for logging diagnostic messages
https://bugs.webkit.org/show_bug.cgi?id=140410

Reviewed by Sam Weinig.

Add Cocoa delegate for logging diagnostic messages.

* UIProcess/API/APIDiagnosticLoggingClient.h: Copied from Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.h.
(API::DiagnosticLoggingClient::~DiagnosticLoggingClient):
(API::DiagnosticLoggingClient::logDiagnosticMessage):
(API::DiagnosticLoggingClient::logDiagnosticMessageWithResult):
(API::DiagnosticLoggingClient::logDiagnosticMessageWithValue):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageDiagnosticLoggingClient):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView _diagnosticLoggingDelegate]):
(-[WKWebView _setDiagnosticLoggingDelegate:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h: Copied from Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.h.
* UIProcess/Cocoa/DiagnosticLoggingClient.h: Copied from Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.h.
* UIProcess/Cocoa/DiagnosticLoggingClient.mm: Added.
(WebKit::DiagnosticLoggingClient::DiagnosticLoggingClient):
(WebKit::DiagnosticLoggingClient::delegate):
(WebKit::DiagnosticLoggingClient::setDelegate):
(WebKit::DiagnosticLoggingClient::logDiagnosticMessage):
(WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithResult):
(WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithValue):
* UIProcess/WebPageDiagnosticLoggingClient.cpp:
(WebKit::WebPageDiagnosticLoggingClient::WebPageDiagnosticLoggingClient):
* UIProcess/WebPageDiagnosticLoggingClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setDiagnosticLoggingClient):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::logDiagnosticMessage):
(WebKit::WebPageProxy::logDiagnosticMessageWithResult):
(WebKit::WebPageProxy::logDiagnosticMessageWithValue):
(WebKit::WebPageProxy::initializeDiagnosticLoggingClient): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::diagnosticLoggingClient):
* WebKit2.xcodeproj/project.pbxproj:

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

4 years agoCrash in JSScope::resolve() on tools.ups.com
msaboff@apple.com [Sun, 18 Jan 2015 00:20:49 +0000 (00:20 +0000)]
Crash in JSScope::resolve() on tools.ups.com
https://bugs.webkit.org/show_bug.cgi?id=140579

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

For op_resolve_scope of a global property or variable that needs to check for the var
injection check watchpoint, we need to keep the scope around with a Phantom.  The
baseline JIT slowpath for op_resolve_scope needs the scope value if the watchpoint
fired.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):

LayoutTests:

New regression test.

* js/regress-140579-expected.txt: Added.
* js/regress-140579.html: Added.
* js/script-tests/regress-140579.js: Added.
(Test.this.isString):
(Test.this.test):
(Test):

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

4 years ago[SVG -> OTF Converter] Crashes when SVG font is invalid
mmaxfield@apple.com [Sat, 17 Jan 2015 22:51:47 +0000 (22:51 +0000)]
[SVG -> OTF Converter] Crashes when SVG font is invalid
https://bugs.webkit.org/show_bug.cgi?id=140378

Reviewed by Antti Koivisto.

Because CachedSVGFonts are cached, they have to be able to be used
in subsequent documents regardless how the first document left it.

Tests: fast/css/font-face-svg-decoding-error.html
       svg/custom/svg-fonts-in-html.html
       svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures.html

* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::ensureCustomFontData):
* loader/cache/CachedFont.h:
* loader/cache/CachedSVGFont.cpp:
(WebCore::CachedSVGFont::getFontData):
(WebCore::CachedSVGFont::ensureCustomFontData):
(WebCore::CachedSVGFont::maybeInitializeExternalSVGFontElement):
* loader/cache/CachedSVGFont.h:

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

4 years agoConverting time, angle and frequency units in CSS calc() function
cdumez@apple.com [Sat, 17 Jan 2015 17:18:23 +0000 (17:18 +0000)]
Converting time, angle and frequency units in CSS calc() function
https://bugs.webkit.org/show_bug.cgi?id=138356

Reviewed by Darin Adler.

Source/WebCore:

Update CSSPrimitiveValue::primitiveType() to actually query the
primitiveType of the CSSCalcValue instead of assuming a given
type based on its category (e.g. If category is CalcTime, then
assume type is CSS_MS, even though it would be CSS_S as well).

This would like to calculation errors such as:
calc(4s + 1s) -> 5ms

Because we would assume the unit is CSS_MS without actually
checking.

This patch is inspired by the following Blink revision
by <rhodovan.u-szeged@partner.samsung.com> and initial WebKit
patch from <tmeszaros.u-szeged@partner.samsung.com>:
https://src.chromium.org/viewvc/blink?view=rev&revision=179101

Test: fast/css/calc-with-angle-time-frequency.html

* css/CSSCalculationValue.h:
(WebCore::CSSCalcValue::primitiveType):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::primitiveType):

LayoutTests:

Update fast/css/calc-with-angle-time-frequency.html to include more
test cases and actually validate the result of the calculation,
instead of merely setting the CSS property and being happy if we don't
crash.

* fast/css/calc-with-angle-time-frequency-expected.txt:
* fast/css/calc-with-angle-time-frequency.html:

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

4 years agoGenerate shorthandForProperty() implementation from CSSPropertyNames.in
cdumez@apple.com [Sat, 17 Jan 2015 16:54:33 +0000 (16:54 +0000)]
Generate shorthandForProperty() implementation from CSSPropertyNames.in
https://bugs.webkit.org/show_bug.cgi?id=140556

Reviewed by Darin Adler.

Generate shorthandForProperty() implementation from CSSPropertyNames.in.
This is just a big switch() statement calling the right
StylePropertyShorthand factory function for a given CSSPropertyID.

* css/StylePropertyShorthand.cpp:
(WebCore::shorthandForProperty): Deleted.
* css/StylePropertyShorthand.h:
* css/makeprop.pl:

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

4 years agoREGRESSION (r178618): Change to WKWebViewConfiguration broke iOS build
ddkilzer@apple.com [Sat, 17 Jan 2015 16:49:53 +0000 (16:49 +0000)]
REGRESSION (r178618): Change to WKWebViewConfiguration broke iOS build
<https://bugs.webkit.org/show_bug.cgi?id=140559>

Blind fix to address the following build failure:

    Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:79:7: error: interface type cannot be statically allocated
        T m_value;
          ^
          *
    Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:94:55: note: in instantiation of template class 'LazyInitialized<WKWebViewContentProviderRegistry>' requested here
        LazyInitialized<WKWebViewContentProviderRegistry> _contentProviderRegistry;
                                                          ^
    Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:53:21: error: assigning to 'WKWebViewContentProviderRegistry *' from incompatible type 'RetainPtr<WKWebViewContentProviderRegistry *>'
                m_value = f();
                        ^ ~~~
    Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:222:37: note: in instantiation of function template specialization 'LazyInitialized<WKWebViewContentProviderRegistry>::get<(lambda at Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:222:41)>' requested here
        return _contentProviderRegistry.get([] { return adoptNS([[WKWebViewContentProviderRegistry alloc] init]); });
                                        ^
    Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:57:24: error: property 'get' not found on object of type 'WKWebViewContentProviderRegistry *'
            return m_value.get();
                           ^
    3 errors generated.

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm: Change
_contentProviderRegistry to be a LazyInitialized<RetainPtr<>> to
match other instance variables.

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

4 years agoAttempt to fix webkitpy tests on Mountain Lion, Mavericks bots
ddkilzer@apple.com [Sat, 17 Jan 2015 10:48:58 +0000 (10:48 +0000)]
Attempt to fix webkitpy tests on Mountain Lion, Mavericks bots

* Scripts/webkitpy/port/ios.py:
(IOSPort): Add 'ios-device-7' to VERSION_FALLBACK_ORDER so that
test-webkitpy doesn't fail since iOS 7.x SDKs are installed on
the Mountain Lion and Mavericks bots.

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

4 years agoAttempt to fix webkitpy tests on GTK Linux ports
ddkilzer@apple.com [Sat, 17 Jan 2015 10:08:28 +0000 (10:08 +0000)]
Attempt to fix webkitpy tests on GTK Linux ports

* Scripts/webkitpy/port/ios.py:
(IOSPort.determine_full_port_name): Set a sensible default if
not running on a Mac platform or if no iOS SDK is installed.

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

4 years agoCreate iOS-EWS client queue
ddkilzer@apple.com [Sat, 17 Jan 2015 08:42:20 +0000 (08:42 +0000)]
Create iOS-EWS client queue
https://bugs.webkit.org/show_bug.cgi?id=140476

Patch by Jake Nielsen <jacob_nielsen@apple.com> on 2015-01-17
Reviewed by Alexey Proskuryakov.

* EWSTools/start-queue-mac.sh:
Adds call to configure-xcode-for-ios-development for iOS EWS.
* Scripts/webkitpy/common/config/ews.json:
Adds the iOS EWS config entry.
* Scripts/webkitpy/common/config/ports.py:
(DeprecatedPort.port):
Adds IOSPort to the port map.
(IOSPort):
(IOSPort.build_webkit_command):
Adds --sdk=iphoneos to the webkit build command.
* Scripts/webkitpy/port/base.py:
(Port.architecture):
Adds an accessor for the architecture member variable.
* Scripts/webkitpy/port/factory.py:
(PortFactory):
Adds IOSPort to the port class list.
* Scripts/webkitpy/port/ios.py:
Adds the IOSPort to encapsulate iOS-specific things.
(IOSPort):
(IOSPort.determine_full_port_name):
(IOSPort.__init__):
(IOSPort._build_driver_flags):
(IOSPort.operating_system):
* Scripts/webkitpy/tool/commands/download_unittest.py:
Adds the archetecture option to the mock options.
(DownloadCommandsTest._default_options):
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
Appends the archetecture option into calls to webkit-patch.
(AbstractEarlyWarningSystem.review_patch):
(AbstractEarlyWarningSystem.run_command):
(AbstractEarlyWarningSystem.load_ews_classes):
* Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
Adds logic to soothe the unittest now that --architecture is being
thrown around everywhere.
(EarlyWarningSystemTest._default_expected_logs):
* Scripts/webkitpy/tool/commands/queues.py:
Adds glue code to ferry the --architecture option around.
(AbstractQueue.__init__):
(PatchProcessingQueue.begin_work_queue):
* Scripts/webkitpy/tool/steps/abstractstep.py:
Adds the archetecture option to all AbstractSteps so that
EarlyWarningSystem doesn't start shoving --architecture into
unsuspecting commands.
(AbstractStep.options):
* Scripts/webkitpy/tool/steps/build.py:
Translates the --architecture option into an ARCHS= format to pass to
build-webkit.
(Build.build):
* Scripts/webkitpy/tool/steps/options.py:
Adds a definition for the --architecture option.
(Options):

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

4 years agobmalloc: refactored XLarge allocation for better alignment
ggaren@apple.com [Sat, 17 Jan 2015 02:53:28 +0000 (02:53 +0000)]
bmalloc: refactored XLarge allocation for better alignment
https://bugs.webkit.org/show_bug.cgi?id=140582

Reviewed by Andreas Kling.

XLarge objects used to be Large objects with an extra bit of metadata
that said "actually, I'm not large -- I'm extra large".

The metadata header in an XLarge allocation made it impossible for the
XLarge object to honor a very large alignment request.

The solution is to stop using a metadata header for XLarge objects, and
instead to store explicit metadata on the side.

This is a bit less astonishing, which is also nice.

Finding XLarge metadata is now a linear search. That's probably OK, since
it was always so in TCMalloc, and the usual number of XLarge allocations
in a process is 0.

This design makes it possible for the heap to cache XLarge allocations
with and/or without physical pages. I haven't actually done that yet
because the tradeoffs are subtle, so I don't want to do anything without
a motivating test case.

* bmalloc.xcodeproj/project.pbxproj:
* bmalloc/Allocator.cpp:
(bmalloc::Allocator::reallocate): Removed the concept of an XLargeChunk,
since an XLarge allocation is now just a naked buffer without a header.

(bmalloc::Allocator::allocateXLarge): Added an explicit qualifier for
XLarge alignment, since XLargeChunk won't give this to us implicitly
anymore.

* bmalloc/BoundaryTag.h:
(bmalloc::BoundaryTag::setRange):
(bmalloc::BoundaryTag::isXLarge): Deleted.
(bmalloc::BoundaryTag::setXLarge): Deleted.
* bmalloc/BoundaryTagInlines.h:
(bmalloc::validate):
(bmalloc::BoundaryTag::deallocate): Removed the XLarge hacks from Large allocations.

* bmalloc/Deallocator.cpp:
(bmalloc::Deallocator::deallocateXLarge):
(bmalloc::Deallocator::deallocateSlowCase):
* bmalloc/Heap.cpp:
(bmalloc::Heap::findXLarge):
(bmalloc::Heap::allocateXLarge):
(bmalloc::Heap::deallocateXLarge):
* bmalloc/Heap.h: Updated for interface changes.

* bmalloc/ObjectType.cpp:
(bmalloc::objectType):
* bmalloc/ObjectType.h:
(bmalloc::isXLarge): We can now tell if a pointer is XLarge just by
examining its bit pattern -- just like we do for other kinds of
allocations -- which is nice.

* bmalloc/Sizes.h:
* bmalloc/VMHeap.h:
(bmalloc::VMHeap::allocateXLarge):
(bmalloc::VMHeap::findXLarge):
(bmalloc::VMHeap::deallocateXLarge): Keep an explicit vector of metadata
for XLarge allocations.

* bmalloc/XLargeChunk.h: Removed.

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

4 years agoWeb Inspector: Make message selection in the console more readable
commit-queue@webkit.org [Sat, 17 Jan 2015 02:26:28 +0000 (02:26 +0000)]
Web Inspector: Make message selection in the console more readable
https://bugs.webkit.org/show_bug.cgi?id=140385

Patch by Nikita Vasilyev <nvasilyev@apple.com> on 2015-01-16
Reviewed by Timothy Hatcher.

* UserInterface/Views/LogContentView.css:
(.console-item.selected):
(.console-messages:focus .console-item.selected):
(.console-item.selected .console-message::after):
(.console-messages:focus .console-item.selected .console-message::after):
(.console-messages:focus .console-item.selected .go-to-link):
* UserInterface/Views/Main.css:
(.go-to-link):
!important statements seem to be unnecessary, remove them.

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

4 years agoUpdate some expected results for iOS
dbates@webkit.org [Sat, 17 Jan 2015 02:12:58 +0000 (02:12 +0000)]
Update some expected results for iOS

* platform/ios-simulator-wk2/css2.1/t100801-c548-ln-ht-00-c-a-expected.txt:
* platform/ios-simulator-wk2/css2.1/t1606-c562-white-sp-00-b-ag-expected.txt:
* platform/ios-simulator/TestExpectations:
[...]

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

4 years agoAdd a basic configuration object for WKView
weinig@apple.com [Sat, 17 Jan 2015 02:07:34 +0000 (02:07 +0000)]
Add a basic configuration object for WKView
https://bugs.webkit.org/show_bug.cgi?id=140559

Reviewed by Anders Carlsson.

Source/WebKit2:

- Adds WKPageConfigurationRef (backed by API::PageConfiguration). WKWebView configuration
  is not yet bridged to this, but that will happen soon. For now, it has a few basic
  configuration options.
- Adds WKUserContentControllerRef as C-SPI version of WKUserContentController.
- Adds WKUserScriptRef as C-SPI version of WKUserScript.

* Shared/API/APIObject.h:
* Shared/API/c/WKBase.h:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toWKUserScriptInjectionTime):
* UIProcess/API/APIPageConfiguration.cpp: Added.
(API::PageConfiguration::PageConfiguration):
(API::PageConfiguration::~PageConfiguration):
(API::PageConfiguration::processPool):
(API::PageConfiguration::setProcessPool):
(API::PageConfiguration::userContentController):
(API::PageConfiguration::setUserContentController):
(API::PageConfiguration::pageGroup):
(API::PageConfiguration::setPageGroup):
(API::PageConfiguration::preferences):
(API::PageConfiguration::setPreferences):
(API::PageConfiguration::relatedPage):
(API::PageConfiguration::setRelatedPage):
(API::PageConfiguration::webPageConfiguration):
* UIProcess/API/APIPageConfiguration.h: Added.
(API::PageConfiguration::create):
* UIProcess/API/APIUserScript.cpp: Added.
(API::generateIdentifier):
(API::UserScript::generateUniqueURL):
* UIProcess/API/APIUserScript.h:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKPageConfigurationRef.cpp: Added.
(WKPageConfigurationGetTypeID):
(WKPageConfigurationCreate):
(WKPageConfigurationGetContext):
(WKPageConfigurationSetContext):
(WKPageConfigurationGetPageGroup):
(WKPageConfigurationSetPageGroup):
(WKPageConfigurationGetUserContentController):
(WKPageConfigurationSetUserContentController):
(WKPageConfigurationGetPreferences):
(WKPageConfigurationSetPreferences):
(WKPageConfigurationGetRelatedPage):
(WKPageConfigurationSetRelatedPage):
* UIProcess/API/C/WKPageConfigurationRef.h: Added.
* UIProcess/API/C/WKUserContentControllerRef.cpp: Added.
(WKUserContentControllerGetTypeID):
(WKUserContentControllerCreate):
(WKUserContentControllerCopyUserScripts):
(WKUserContentControllerAddUserScript):
(WKUserContentControllerRemoveAllUserScripts):
* UIProcess/API/C/WKUserContentControllerRef.h: Added.
* UIProcess/API/C/WKUserScriptRef.cpp: Added.
(WKUserScriptGetTypeID):
(WKUserScriptCreateWithSource):
(WKUserScriptCopySource):
(WKUserScriptGetInjectionTime):
(WKUserScriptGetMainFrameOnly):
* UIProcess/API/C/WKUserScriptRef.h: Added.
* UIProcess/API/C/WebKit2_C.h:
* UIProcess/API/Cocoa/WKUserScript.mm:
(-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]):
(generateIdentifier): Deleted.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(LazyInitialized::get):
(LazyInitialized::set):
(LazyInitialized::peek):
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:configurationRef:]):
* UIProcess/UserContent/WebUserContentControllerProxy.h:
(WebKit::WebUserContentControllerProxy::create):
* WebKit2.xcodeproj/project.pbxproj:

Tools:

Add tests for WKPageConfigurationRef.

* TestWebKitAPI/PlatformWebView.h:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/WKPageConfiguration.cpp: Added.
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::setPageLoaderClient):
* TestWebKitAPI/mac/PlatformWebViewMac.mm:
(TestWebKitAPI::PlatformWebView::initialize):
(TestWebKitAPI::PlatformWebView::PlatformWebView):

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

4 years ago[Mac] Correct infinite loop in Wheel Handler code in EventHandlerMac
bfulgham@apple.com [Sat, 17 Jan 2015 01:49:53 +0000 (01:49 +0000)]
[Mac] Correct infinite loop in Wheel Handler code in EventHandlerMac
https://bugs.webkit.org/show_bug.cgi?id=140564
<rdar://problem/19386426.

Reviewed by Dean Jackson.

* page/mac/EventHandlerMac.mm:
(WebCore::latchingIsLockedToAncestorOfThisFrame): Put missing assignment
back into the loop!

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

4 years agoWeakPtr functions crash when created with default constructor
mmaxfield@apple.com [Sat, 17 Jan 2015 00:39:57 +0000 (00:39 +0000)]
WeakPtr functions crash when created with default constructor
https://bugs.webkit.org/show_bug.cgi?id=140479

Reviewed by Andreas Kling.

Source/WTF:

This patch rearranges how WeakPtr works, and has the following ideas behind it:

1. WeakPtr should use Ref internally. This solves the crash by always having a
valid WeakReference.
2. Clients should not be able to construct WeakReferences directly. Instead,
only WeakPtrFactory (and WeakPtr's default constructor) should be able to
construct them. They are considered an implementation detail of WeakPtr.
3. Except for the default constructor, clients should not be able to construct
WeakPtrs directly. Instead, the WeakPtrFactory must construct them. This
guarantees that the WeakPtrs all reference the same WeakReference.
4. Clients can construct a WeakPtr using its default constructor, and then
use the assignment operator to make it non-null. (Or they could use
WeakPtrFactory to make it non-null at creation-time.)
5. No one was using WeakReference::bindTo(), and it doesn't seem useful, so I
removed it.

Tests: WTF_WeakPtr API tests

* wtf/Ref.h:
(WTF::Ref::Ref): Added extra ASSERT()s, and explicitly deleted copy
constructors with a comment.
(WTF::Ref::operator=): Added extra ASSERT()s, and explicitly deleted copy
assignment operators with a comment.
* wtf/WeakPtr.h:
(WTF::WeakReference::clear): Used nullptr.
(WTF::WeakReference::create): Moved to private:
(WTF::WeakPtr::WeakPtr): For the default constructor, initialized the Ref with
a new WeakReference. For the other constructor, moved it to private:. Also added
copy constructors and copy assignment operators (since Ref doesn't have them but
RefPtr does). These constructors/operators are relied upon in various places
throughout WebCore.
(WTF::WeakPtr::operator bool): Made non-explicit.
(WTF::WeakReference::createUnbound): Deleted.
(WTF::WeakReference::bindTo): Deleted.
(WTF::WeakReference::WeakReference): Deleted.
(WTF::WeakPtrFactory::WeakPtrFactory): Deleted.

Tools:

Add WeakPtr API tests.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/WeakPtr.cpp: Added.
* TestWebKitAPI/Tests/WTF/Ref.cpp: Update to not use copy constructor.

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

4 years agoREGRESSION(178591): js/slow-stress/call-spread.html & js/slow-stress/new-spread.html
msaboff@apple.com [Sat, 17 Jan 2015 00:37:08 +0000 (00:37 +0000)]
REGRESSION(178591): js/slow-stress/call-spread.html & js/slow-stress/new-spread.html
https://bugs.webkit.org/show_bug.cgi?id=140574

Rubber stamped by Oliver Hunt.

Changed the loop counts in the test to lower values to speed up the tests.

* js/slow-stress/script-tests/call-spread.js:
(test2):
(test3):
* js/slow-stress/script-tests/new-spread.js:
(test2):
(test3):

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

4 years agoWhen border-radius is present, inset/outset/groove/ridge border color changes.
zalan@apple.com [Sat, 17 Jan 2015 00:35:49 +0000 (00:35 +0000)]
When border-radius is present, inset/outset/groove/ridge border color changes.
https://bugs.webkit.org/show_bug.cgi?id=140551

Reviewed by Simon Fraser.

This patch applies the same color lighten/darken adjustment on the radius borders
that we use for non-radius border.

Source/WebCore:

Test: fast/borders/wrong-border-color-when-radius-is-present.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::drawBoxSideFromPath):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::calculateBorderStyleColor):
* rendering/RenderObject.h:

LayoutTests:

* fast/borders/wrong-border-color-when-radius-is-present-expected.html: Added.
* fast/borders/wrong-border-color-when-radius-is-present.html: Added.

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

4 years agoWeb pages fail to load using public iOS WebKit; ASSERT(!isMainThread()) in
dbates@webkit.org [Sat, 17 Jan 2015 00:12:50 +0000 (00:12 +0000)]
Web pages fail to load using public iOS WebKit; ASSERT(!isMainThread()) in
-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]
https://bugs.webkit.org/show_bug.cgi?id=140470

Patch by Pratik Solanki <psolanki@apple.com> on 2015-01-16
Reviewed by Alexey Proskuryakov.

Fixes an issue where a web page would fail to load in iOS WebKit2 built with the public iOS SDK
because NSURLConnection callbacks were always being scheduled on the main thread.

Currently we always schedule NSURLConnection callbacks to occur on the WebThread or the main
thread depending on whether the WebThread was started. In iOS WebKit2, the callbacks were
always being scheduled on the main thread regardless of whether we were using the NetworkProcess
(since the WebThread is only started when using WebKit1). This led to an assertion failure.
Instead we want to schedule callbacks to an NSOperationsQueue queue when using WebKit2 with the
NetworkProcess (i.e. ResourceHandleClient::usesAsyncCallbacks() is true), on the main thread when
using WebKit2 without the NetworkProcess and on the WebThread when using WebKit1.

* platform/network/mac/ResourceHandleMac.mm:
(WebCore::operationQueueForAsyncClients): Remove PLATFORM(IOS)-guards as we want to make use
of this code for iOS WebKit2 with the NetworkProcess.
(WebCore::ResourceHandle::start): Modified to use the existing Mac code path to conditionally
schedule NSURLConnection callbacks to an operation queue when ResourceHandleClient::usesAsyncCallbacks()
is true. Otherwise, schedule the callbacks on the run loop returned by WebThreadNSRunLoop(),
which is either the WebThread or the main thread run loop when using WebKit1 and WebKit2 without
the NetworkProcess, respectively.

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

4 years agobmalloc: added the tiniest bit of testing for aligned allocation
ggaren@apple.com [Sat, 17 Jan 2015 00:10:59 +0000 (00:10 +0000)]
bmalloc: added the tiniest bit of testing for aligned allocation
https://bugs.webkit.org/show_bug.cgi?id=140573

Reviewed by Andreas Kling.

Just good enoug to catch two bugs in a preliminary implementation.

* MallocBench/MallocBench.xcodeproj/project.pbxproj:
* MallocBench/MallocBench/Benchmark.cpp:
* MallocBench/MallocBench/mbmalloc.cpp:
* MallocBench/MallocBench/mbmalloc.h:
* MallocBench/MallocBench/memalign.cpp: Added.
(benchmark_memalign):
* MallocBench/MallocBench/memalign.h: Added.

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

4 years agoWeb Inspector: Remove unused WebInspector.LocalJSONObject
commit-queue@webkit.org [Sat, 17 Jan 2015 00:10:18 +0000 (00:10 +0000)]
Web Inspector: Remove unused WebInspector.LocalJSONObject
https://bugs.webkit.org/show_bug.cgi?id=140570

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-01-16
Reviewed by Timothy Hatcher.

* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.fromLocalObject): Deleted.
(WebInspector.LocalJSONObject): Deleted.
(WebInspector.LocalJSONObject.prototype.get description.switch.case.string_appeared_here): Deleted.
(WebInspector.LocalJSONObject.prototype.get description.switch.default): Deleted.
(WebInspector.LocalJSONObject.prototype.get description): Deleted.
(WebInspector.LocalJSONObject.prototype._concatenate): Deleted.
(WebInspector.LocalJSONObject.prototype.get type): Deleted.
(WebInspector.LocalJSONObject.prototype.get subtype): Deleted.
(WebInspector.LocalJSONObject.prototype.get hasChildren): Deleted.
(WebInspector.LocalJSONObject.prototype.getOwnProperties): Deleted.
(WebInspector.LocalJSONObject.prototype.getAllProperties): Deleted.
(WebInspector.LocalJSONObject.prototype._children.buildProperty): Deleted.
(WebInspector.LocalJSONObject.prototype._children): Deleted.
(WebInspector.LocalJSONObject.prototype.isError): Deleted.

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

4 years agobmalloc: added some infrastructure for aligned allocation
ggaren@apple.com [Sat, 17 Jan 2015 00:01:22 +0000 (00:01 +0000)]
bmalloc: added some infrastructure for aligned allocation
https://bugs.webkit.org/show_bug.cgi?id=140572

Reviewed by Andreas Kling.

* bmalloc/Algorithm.h:
(bmalloc::isPowerOfTwo):
(bmalloc::roundUpToMultipleOf):
(bmalloc::roundDownToMultipleOf): Refactored some duplicate code to use our
isPowerOfTwo helper function.

* bmalloc/Allocator.cpp:
(bmalloc::Allocator::allocate):
* bmalloc/Allocator.h: Stubbed out an implementation of aligned allocation.
Doesn't do anything yet, but does correctly forward to system malloc
when bmalloc is disabled.

* bmalloc/Cache.cpp:
(bmalloc::Cache::allocateSlowCaseNullCache):
* bmalloc/Cache.h:
(bmalloc::Cache::allocate):
* bmalloc/bmalloc.h:
(bmalloc::api::memalign):
* bmalloc/mbmalloc.cpp: Stubbed out an API for aligned allocation.

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

4 years agoPass the connection along to WebProcessLifetimeTracker
andersca@apple.com [Fri, 16 Jan 2015 23:41:39 +0000 (23:41 +0000)]
Pass the connection along to WebProcessLifetimeTracker
https://bugs.webkit.org/show_bug.cgi?id=140569

Reviewed by Andreas Kling.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::connectionWillOpen):
(WebKit::WebPageProxy::connectionDidClose):
* UIProcess/WebProcessLifetimeTracker.cpp:
(WebKit::WebProcessLifetimeTracker::connectionWillOpen):
(WebKit::WebProcessLifetimeTracker::connectionDidClose):
(WebKit::WebProcessLifetimeTracker::connectionWillClose): Deleted.
* UIProcess/WebProcessLifetimeTracker.h:

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

4 years agoRegression(r178586): Caused webkitpy.w3c.test_converter_unittest.W3CTestConverterTest...
cdumez@apple.com [Fri, 16 Jan 2015 23:32:33 +0000 (23:32 +0000)]
Regression(r178586): Caused webkitpy.w3c.test_converter_unittest.W3CTestConverterTest.test_convert_prefixed_properties to fail
https://bugs.webkit.org/show_bug.cgi?id=140568

Reviewed by Alexey Proskuryakov.

Fix the script parsing CSSPropertyNames.in to stop splitting lines
on '=' sign. The '=' sign is also used in StyleBuilder parameters:
e.g. "Longhands=background-position-x|background-position-y".
This would confuse the script and treat this as a CSS property:
"background-position-x|background-position-y".

We now split on white space and treat the first string on the line
to be the property name (this is the syntax in this file).

* Scripts/webkitpy/w3c/test_converter.py:
(_W3CTestConverter.__init__):
(_W3CTestConverter.read_webkit_prefixed_css_property_list):

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

4 years agoWeb Inspector: code generator should introduce typedefs for protocol types that are...
burg@cs.washington.edu [Fri, 16 Jan 2015 23:17:45 +0000 (23:17 +0000)]
Web Inspector: code generator should introduce typedefs for protocol types that are arrays
https://bugs.webkit.org/show_bug.cgi?id=140557

Reviewed by Joseph Pecoraro.

Currently, there is no generated type name for "array" type declarations such as Console.CallStack.
This makes it longwinded and confusing to use the type in C++ code.

This patch adds a typedef for array type declarations, so types such as Console::CallStack
can be referred to directly, rather than using Inspector::Protocol::Array<Console::CallFrame>.

Some tests were updated to cover array type declarations used as parameters and type members.

* inspector/ScriptCallStack.cpp: Use the new typedef.
(Inspector::ScriptCallStack::buildInspectorArray):
* inspector/ScriptCallStack.h:
* inspector/scripts/codegen/cpp_generator.py:
(CppGenerator.cpp_protocol_type_for_type): If an ArrayType is nominal, use the typedef'd name instead.
* inspector/scripts/codegen/generate_cpp_protocol_types_header.py:
(_generate_typedefs_for_domain): Also generate typedefs for array type declarations.
(_generate_typedefs_for_domain.Inspector):
* inspector/scripts/codegen/models.py: Save the name of an ArrayType when it is a type declaration.
(ArrayType.__init__):
(Protocol.resolve_types):
(Protocol.lookup_type_reference):
* inspector/scripts/tests/commands-with-async-attribute.json:
* inspector/scripts/tests/commands-with-optional-call-return-parameters.json:
* inspector/scripts/tests/events-with-optional-parameters.json:
* inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/expected/type-declaration-array-type.json-result:
* inspector/scripts/tests/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
* inspector/scripts/tests/type-declaration-object-type.json:

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

4 years agoMake sure early cancellation of immediate action actually does that in WK1
bdakin@apple.com [Fri, 16 Jan 2015 22:51:30 +0000 (22:51 +0000)]
Make sure early cancellation of immediate action actually does that in WK1
https://bugs.webkit.org/show_bug.cgi?id=140566
-and corresponding-
rdar://problem/19490114

Reviewed by Tim Horton.

Work around an AppKit bug by dispatching the call to _cancelImmediateAction
asynchronously.
* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController immediateActionRecognizerWillPrepare:]):

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

4 years agoMore WebPageProxy CTTE
andersca@apple.com [Fri, 16 Jan 2015 22:22:46 +0000 (22:22 +0000)]
More WebPageProxy CTTE
https://bugs.webkit.org/show_bug.cgi?id=140565

Reviewed by Andreas Kling.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::connectionWillOpen):
(WebKit::WebPageProxy::connectionDidClose):
(WebKit::WebPageProxy::connectionWillClose): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::connectionWillOpen):
(WebKit::WebProcessProxy::connectionDidClose):

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

4 years agoWeb Replay: purge remaining PassRefPtr uses and minor cleanup
burg@cs.washington.edu [Fri, 16 Jan 2015 22:13:08 +0000 (22:13 +0000)]
Web Replay: purge remaining PassRefPtr uses and minor cleanup
https://bugs.webkit.org/show_bug.cgi?id=140456

Reviewed by Andreas Kling.

Source/JavaScriptCore:

Get rid of PassRefPtr. Introduce default initializers where it makes sense.
Remove mistaken uses of AtomicString that were not removed as part of r174113.

* replay/EmptyInputCursor.h:
* replay/InputCursor.h:
(JSC::InputCursor::InputCursor):

Source/WebCore:

Get rid of PassRefPtr. Introduce default initializers where it makes sense. Change
uses of ASSERT to ASSERT_ARG when the assert is a precondition on an argument.

Remove mistaken uses of AtomicString that were not removed as part of r174113.

No new tests, no behavior changed.

* inspector/InspectorReplayAgent.cpp:
(WebCore::SerializeInputToJSONFunctor::operator()):
(WebCore::SerializeInputToJSONFunctor::returnValue):
(WebCore::InspectorReplayAgent::sessionCreated):
(WebCore::InspectorReplayAgent::sessionModified):
(WebCore::InspectorReplayAgent::sessionLoaded):
(WebCore::InspectorReplayAgent::segmentCreated):
(WebCore::InspectorReplayAgent::segmentCompleted):
(WebCore::InspectorReplayAgent::segmentLoaded):
(WebCore::InspectorReplayAgent::switchSession):
(WebCore::InspectorReplayAgent::insertSessionSegment):
(WebCore::InspectorReplayAgent::removeSessionSegment):
(WebCore::InspectorReplayAgent::findSession):
(WebCore::InspectorReplayAgent::findSegment):
* inspector/InspectorReplayAgent.h:
* replay/CapturingInputCursor.cpp:
(WebCore::CapturingInputCursor::CapturingInputCursor):
(WebCore::CapturingInputCursor::create):
(WebCore::CapturingInputCursor::loadInput):
* replay/CapturingInputCursor.h:
* replay/EventLoopInputDispatcher.cpp:
(WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
* replay/EventLoopInputDispatcher.h:
* replay/FunctorInputCursor.h:
(WebCore::FunctorInputCursor::FunctorInputCursor):
(WebCore::FunctorInputCursor::loadInput):
* replay/ReplayController.cpp:
(WebCore::ReplayController::ReplayController):
(WebCore::ReplayController::setForceDeterministicSettings):
(WebCore::ReplayController::setSessionState):
(WebCore::ReplayController::setSegmentState):
(WebCore::ReplayController::switchSession):
(WebCore::ReplayController::createSegment):
(WebCore::ReplayController::completeSegment):
(WebCore::ReplayController::loadSegmentAtIndex):
(WebCore::ReplayController::unloadSegment):
(WebCore::ReplayController::frameNavigated):
(WebCore::ReplayController::loadedSession):
(WebCore::ReplayController::loadedSegment):
(WebCore::ReplayController::activeInputCursor):
(WebCore::ReplayController::dispatcher):
* replay/ReplayController.h:
* replay/ReplaySession.cpp:
(WebCore::ReplaySession::create):
(WebCore::ReplaySession::at):
(WebCore::ReplaySession::appendSegment):
(WebCore::ReplaySession::insertSegment):
(WebCore::ReplaySession::removeSegment):
* replay/ReplaySession.h:
* replay/ReplaySessionSegment.cpp:
(WebCore::ReplaySessionSegment::create):
(WebCore::ReplaySessionSegment::ReplaySessionSegment):
* replay/ReplaySessionSegment.h:
* replay/ReplayingInputCursor.cpp:
(WebCore::ReplayingInputCursor::ReplayingInputCursor):
(WebCore::ReplayingInputCursor::create):
(WebCore::ReplayingInputCursor::loadInput):
* replay/ReplayingInputCursor.h:
* replay/SegmentedInputStorage.cpp:
(WebCore::SegmentedInputStorage::store):
(WebCore::SegmentedInputStorage::queue):
(WebCore::SegmentedInputStorage::SegmentedInputStorage): Deleted.
* replay/SegmentedInputStorage.h:

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

4 years agoRemove dead code
andersca@apple.com [Fri, 16 Jan 2015 22:05:56 +0000 (22:05 +0000)]
Remove dead code
https://bugs.webkit.org/show_bug.cgi?id=140563

Reviewed by Geoffrey Garen.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processWillOpenConnection): Deleted.
(WebKit::WebProcessPool::processWillCloseConnection): Deleted.
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::connectionWillOpen):
(WebKit::WebProcessProxy::connectionDidClose):

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

4 years agoREGRESSION (r171968): run-safari --simulator fails to launch Safari on iOS
dbates@webkit.org [Fri, 16 Jan 2015 21:58:28 +0000 (21:58 +0000)]
REGRESSION (r171968): run-safari --simulator fails to launch Safari on iOS
https://bugs.webkit.org/show_bug.cgi?id=135589

Reviewed by David Kilzer.

Derived from a patch by David Farler.

Following the removal IPhoneSimulatorNotification.pm in <http://trac.webkit.org/changeset/171968>
run-safari --simulator fails to launch Safari on iOS. We need to implement run-safari
in terms of the simctl command line utility.

* Scripts/webkitdirs.pm: Added constant SIMULATOR_DEVICE_STATE_BOOTED.
(eraseIOSSimulatorDevice): Added.
(bootedIOSSimulatorDevice): Added.
(iosSimulatorApplicationsPath): Added.
(installedMobileSafariBundle): Implemented in terms of iosSimulatorApplicationsPath().
(openIOSSimulator): Modified to launch iOS Simulator using OPEN(1).
(quitIOSSimulator): Added.
(iosSimulatorDeviceByName): Modified to find the first simulator device that matches
the specified name and currently selected iOS runtime.
(isIOSSimulatorSystemInstalledApp): Added.
(runIOSWebKitAppInSimulator): Modified to use simctl launch to launch an app in the simulator.
(deleteiOSSimulatorDevice): Deleted.
(loadIPhoneSimulatorNotificationIfNeeded): Deleted.
(installAndLaunchIOSWebKitAppInSimulator): Deleted.

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

4 years agoRemove assertion that Page::m_editorClient is non-null.
akling@apple.com [Fri, 16 Jan 2015 21:42:50 +0000 (21:42 +0000)]
Remove assertion that Page::m_editorClient is non-null.

Unreviewed debug build fix. (It's a reference, it won't be null.)

* page/Page.cpp:
(WebCore::Page::Page):

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

4 years agoWeb Inspector: code generator should fail on duplicate parameter and member names
burg@cs.washington.edu [Fri, 16 Jan 2015 21:40:23 +0000 (21:40 +0000)]
Web Inspector: code generator should fail on duplicate parameter and member names
https://bugs.webkit.org/show_bug.cgi?id=140555

Reviewed by Timothy Hatcher.

* inspector/scripts/codegen/models.py:
(find_duplicates): Add a helper function to find duplicates in a list.
(Protocol.parse_type_declaration):
(Protocol.parse_command):
(Protocol.parse_event):
* inspector/scripts/tests/expected/fail-on-duplicate-command-call-parameter-names.json-error: Added.
* inspector/scripts/tests/expected/fail-on-duplicate-command-return-parameter-names.json-error: Added.
* inspector/scripts/tests/expected/fail-on-duplicate-event-parameter-names.json-error: Added.
* inspector/scripts/tests/expected/fail-on-duplicate-type-member-names.json-error: Added.
* inspector/scripts/tests/fail-on-duplicate-command-call-parameter-names.json: Added.
* inspector/scripts/tests/fail-on-duplicate-command-return-parameter-names.json: Added.
* inspector/scripts/tests/fail-on-duplicate-event-parameter-names.json: Added.
* inspector/scripts/tests/fail-on-duplicate-type-member-names.json: Added.

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

4 years agoSprinkle some CTTE in ChildProcessProxy member functions
andersca@apple.com [Fri, 16 Jan 2015 21:37:42 +0000 (21:37 +0000)]
Sprinkle some CTTE in ChildProcessProxy member functions
https://bugs.webkit.org/show_bug.cgi?id=140562

Reviewed by Andreas Kling.

* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching):
(WebKit::ChildProcessProxy::clearConnection):
(WebKit::ChildProcessProxy::connectionWillOpen):
(WebKit::ChildProcessProxy::connectionDidClose):
(WebKit::ChildProcessProxy::connectionWillClose): Deleted.
* Shared/ChildProcessProxy.h:
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::connectionWillOpen): Deleted.
(WebKit::DatabaseProcessProxy::connectionWillClose): Deleted.
* UIProcess/Databases/DatabaseProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::connectionWillOpen):
(WebKit::NetworkProcessProxy::connectionWillClose): Deleted.
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::connectionWillOpen):
(WebKit::WebProcessProxy::connectionDidClose):
(WebKit::WebProcessProxy::connectionWillClose): Deleted.
* UIProcess/WebProcessProxy.h:
* UIProcess/mac/SecItemShimProxy.cpp:
(WebKit::SecItemShimProxy::initializeConnection):
* UIProcess/mac/SecItemShimProxy.h:

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

4 years agoPage::editorClient() should return a reference.
akling@apple.com [Fri, 16 Jan 2015 21:33:01 +0000 (21:33 +0000)]
Page::editorClient() should return a reference.
<https://webkit.org/b/140552>

Reviewed by Chris Dumez.

Page always has an EditorClient, so make editorClient() return a reference.

* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::editorClient):
(WebCore::AlternativeTextController::textChecker):
* editing/Editor.cpp:
(WebCore::Editor::client):
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::client):
* page/FocusController.cpp:
(WebCore::FocusController::setFocusedElement):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::~Page):
(WebCore::Page::clearUndoRedoOperations):
* page/Page.h:
(WebCore::Page::editorClient):
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):

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

4 years agoResurrect the WinCairo bot.
alex.christensen@flexsim.com [Fri, 16 Jan 2015 21:25:50 +0000 (21:25 +0000)]
Resurrect the WinCairo bot.
https://bugs.webkit.org/show_bug.cgi?id=139908

Patch by Alex Christensen <alex.christensen@flexsim.com> on 2015-01-16
Reviewed by Csaba Osztrogonác.

* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(appendCustomBuildFlags):
* BuildSlaveSupport/test-result-archive:
(archiveTestResults):
Add WinCairo buildbot.

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

4 years agoShould cancel immediate action sooner in WK2
bdakin@apple.com [Fri, 16 Jan 2015 21:11:33 +0000 (21:11 +0000)]
Should cancel immediate action sooner in WK2
https://bugs.webkit.org/show_bug.cgi?id=140561
-and corresponding-
rdar://problem/19490114

Reviewed by Tim Horton.

_cancelImmediateActionIfNeeded will cancel the immediate action if there is no
animation controller or if the DDActionContext doesn’t want to use its actions.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _cancelImmediateActionIfNeeded]):

Call _cancelImmediateActionIfNeeded to cancel earlier.
(-[WKImmediateActionController didPerformActionMenuHitTest:userData:]):

Re-factor this code to use the newly-added method _cancelImmediateActionIfNeeded
(-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):

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

4 years agoDon't try to send SetSession messages before the web page has been constructed in...
andersca@apple.com [Fri, 16 Jan 2015 21:04:40 +0000 (21:04 +0000)]
Don't try to send SetSession messages before the web page has been constructed in the web process
https://bugs.webkit.org/show_bug.cgi?id=140558

Reviewed by Andreas Kling.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
We already send the session ID along in the page creation parameters so just message the network process
if we need to create an ephemeral session.

(WebKit::WebPageProxy::setSessionID):
Add an isValid call for good measure.

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

4 years agoMake URL filters case-insensitive by default
benjamin@webkit.org [Fri, 16 Jan 2015 21:01:00 +0000 (21:01 +0000)]
Make URL filters case-insensitive by default
https://bugs.webkit.org/show_bug.cgi?id=140531

Reviewed by Andreas Kling.

Safari's filters were case-insensitive. Adopt that convention in the engine,
and add a flag in case someone ever need a case-sensitive filter.

* contentextensions/ContentExtensionRule.h:
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
* contentextensions/ContentExtensionsManager.cpp:
(WebCore::ContentExtensions::ExtensionsManager::loadTrigger):
* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::trivialAtomFromASCIICharacter):
(WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
(WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
(WebCore::ContentExtensions::GraphBuilder::generateTransition):
(WebCore::ContentExtensions::URLFilterParser::addPattern):
* contentextensions/URLFilterParser.h:

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

4 years agoAdd the alternative syntax for CSS Selector's descendant combinator (">>")
benjamin@webkit.org [Fri, 16 Jan 2015 20:57:04 +0000 (20:57 +0000)]
Add the alternative syntax for CSS Selector's descendant combinator (">>")
https://bugs.webkit.org/show_bug.cgi?id=140525

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-01-16
Reviewed by Antti Koivisto.

Source/WebCore:

The latest Selector spec introduces the combinator ">>" as an alias for the descendant
relation: http://dev.w3.org/csswg/selectors-4/#descendant-combinators

This patch implements that combinator as an alias of the existing one. For CSSOM's selector
serialization, I use one bit of CSSSelector to store if that alternative syntax was used.

Tests: fast/css/descendant-combinator-doubled-child-syntax-styling.html
       fast/css/parsing-css-descendant-combinator-doubled-child-syntax.html
       fast/selectors/element-closest-descendant-combinator-doubled-child-syntax.html
       fast/selectors/element-matches-descendant-combinator-doubled-child-syntax.html
       fast/selectors/querySelector-descendant-combinator-doubled-child-syntax.html

* css/CSSGrammar.y.in:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::appendTagHistory):
* css/CSSParserValues.h:
(WebCore::CSSParserSelector::setDescendantUseDoubleChildSyntax):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
(WebCore::CSSSelector::setDescendantUseDoubleChildSyntax):
(WebCore::CSSSelector::CSSSelector):

LayoutTests:

* fast/css/css-selector-text-expected.txt:
* fast/css/css-selector-text.html:
* fast/css/css-set-selector-text-expected.txt:
* fast/css/css-set-selector-text.html:
* fast/css/descendant-combinator-doubled-child-syntax-styling-expected.html: Added.
* fast/css/descendant-combinator-doubled-child-syntax-styling.html: Added.
* fast/css/parsing-css-descendant-combinator-doubled-child-syntax-expected.txt: Added.
* fast/css/parsing-css-descendant-combinator-doubled-child-syntax.html: Added.
* fast/selectors/element-closest-descendant-combinator-doubled-child-syntax-expected.txt: Added.
* fast/selectors/element-closest-descendant-combinator-doubled-child-syntax.html: Added.
* fast/selectors/element-matches-descendant-combinator-doubled-child-syntax-expected.txt: Added.
* fast/selectors/element-matches-descendant-combinator-doubled-child-syntax.html: Added.
* fast/selectors/querySelector-descendant-combinator-doubled-child-syntax-expected.txt: Added.
* fast/selectors/querySelector-descendant-combinator-doubled-child-syntax.html: Added.

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

4 years agoREGRESSION (r174226): Header on huffingtonpost.com is too large
msaboff@apple.com [Fri, 16 Jan 2015 20:40:22 +0000 (20:40 +0000)]
REGRESSION (r174226): Header on huffingtonpost.com is too large
https://bugs.webkit.org/show_bug.cgi?id=140306

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

BytecodeGenerator::willResolveToArguments() is used to check to see if we can use the
arguments register or whether we need to resolve "arguments".  If the arguments have
been captured, then they are stored in the lexical environment and the arguments
register is not used.

Changed BytecodeGenerator::willResolveToArguments() to also check to see if the arguments
register is captured.  Renamed the function to willResolveToArgumentsRegister() to
better indicate what we are checking.

Aligned 32 and 64 bit paths in ArgumentsRecoveryGenerator::generateFor() for creating
an arguments object that was optimized out of an inlined callFrame.  The 32 bit path
incorrectly calculated the location of the reified callee frame.  This alignment resulted
in the removal of operationCreateInlinedArgumentsDuringOSRExit()

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::willResolveToArgumentsRegister):
(JSC::BytecodeGenerator::uncheckedLocalArgumentsRegister):
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitConstruct):
(JSC::BytecodeGenerator::emitEnumeration):
(JSC::BytecodeGenerator::willResolveToArguments): Deleted.
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::BracketAccessorNode::emitBytecode):
(JSC::DotAccessorNode::emitBytecode):
(JSC::getArgumentByVal):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
(JSC::ArrayPatternNode::emitDirectBinding):
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::ArgumentsRecoveryGenerator::generateFor):
* dfg/DFGOperations.cpp:
(JSC::operationCreateInlinedArgumentsDuringOSRExit): Deleted.
* dfg/DFGOperations.h:
(JSC::operationCreateInlinedArgumentsDuringOSRExit): Deleted.

LayoutTests:

Updated js/arguments-iterator to test changing argument to array values.
Removed tests that changed arguments to a string and an object as they were
bogus and didn't test what the appeared to test.
for .. of works on iterable objects only.

Added new regression test, js/regress-140306.

* js/arguments-iterator-expected.txt:
* js/regress-140306-expected.txt: Added.
* js/regress-140306.html: Added.
* js/script-tests/arguments-iterator.js:
(testEmptyArrayArguments):
(testArrayArguments):
(testOverwrittenArguments): Deleted.
(testNullArguments): Deleted.
(testNonArrayLikeArguments): Deleted.
* js/script-tests/regress-140306.js: Added.
(checkArgs):
(applyToArgs):

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

4 years agowebkit-patch should auto-install the keyring python module
cdumez@apple.com [Fri, 16 Jan 2015 20:06:57 +0000 (20:06 +0000)]
webkit-patch should auto-install the keyring python module
https://bugs.webkit.org/show_bug.cgi?id=140547

Reviewed by David Kilzer.

Auto-install the keyring python module. This is the module that
webkit-patch uses for cross-platform access to the keyring
service.

Without this module, if the password if not in the keychain,
webkit-patch will keep asking for your username / password and
never remember them.

* Scripts/webkitpy/common/net/credentials.py:
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook.find_module):
(AutoinstallImportHook._install_keyring):

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

4 years ago[mac] Fix test expectations after r178310.
commit-queue@webkit.org [Fri, 16 Jan 2015 20:05:36 +0000 (20:05 +0000)]
[mac] Fix test expectations after r178310.
https://bugs.webkit.org/show_bug.cgi?id=140503

Patch by Jeremy Jones <jeremyj@apple.com> on 2015-01-16
Reviewed by Alexey Proskuryakov.

Remove references to removed tests.

* platform/mac-wk2/TestExpectations:
 removed reference to storage/indexeddb/basics-shared-workers.html
 removed reference to js/dom/global-constructors-attributes-shared-worker.html
* platform/mac/TestExpectations:
 removed reference to fast/workers/shared-worker-storagequota-query-usage.html

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

4 years agoLog unhandled messages in the web process
andersca@apple.com [Fri, 16 Jan 2015 20:01:10 +0000 (20:01 +0000)]
Log unhandled messages in the web process
https://bugs.webkit.org/show_bug.cgi?id=140549

Reviewed by Andreas Kling.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveSyncMessage):
(WebKit::WebProcess::didReceiveMessage):

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

4 years agoGenerate StylePropertyShorthand.* from CSSPropertyNames.in
cdumez@apple.com [Fri, 16 Jan 2015 19:39:02 +0000 (19:39 +0000)]
Generate StylePropertyShorthand.* from CSSPropertyNames.in
https://bugs.webkit.org/show_bug.cgi?id=140501

Reviewed by Darin Adler.

Add initial support for having makeprop.pl generate most of
StylePropertyShorthand.* from CSSPropertyNames.in.

This patch replaces [Shorthand] parameter in CSSPropertyNames.in by a
more descriptive [Longhands=property1|property2|...] parameter. With
this information, makeprop.pl is now able to generate the
StylePropertyShorthand factories for all CSS shorthand properties
in a new StylePropertyShorthandFunctions.h header.

The switches in StylePropertyShorthand.cpp could also be generated
but this will be taken care of in follow-up patches to reduce patch
size.

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPropertyNames.in:
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue):
* css/StylePropertyShorthand.cpp:
(WebCore::shorthandForProperty):
(WebCore::matchingShorthandsForLonghand):
(WebCore::backgroundShorthand): Deleted.
(WebCore::backgroundPositionShorthand): Deleted.
(WebCore::backgroundRepeatShorthand): Deleted.
(WebCore::borderShorthand): Deleted.
(WebCore::borderBottomShorthand): Deleted.
(WebCore::borderColorShorthand): Deleted.
(WebCore::borderImageShorthand): Deleted.
(WebCore::borderLeftShorthand): Deleted.
(WebCore::borderRadiusShorthand): Deleted.
(WebCore::webkitBorderRadiusShorthand): Deleted.
(WebCore::borderRightShorthand): Deleted.
(WebCore::borderSpacingShorthand): Deleted.
(WebCore::borderStyleShorthand): Deleted.
(WebCore::borderTopShorthand): Deleted.
(WebCore::borderWidthShorthand): Deleted.
(WebCore::listStyleShorthand): Deleted.
(WebCore::marginShorthand): Deleted.
(WebCore::markerShorthand): Deleted.
(WebCore::outlineShorthand): Deleted.
(WebCore::overflowShorthand): Deleted.
(WebCore::paddingShorthand): Deleted.
(WebCore::transitionShorthand): Deleted.
(WebCore::animationShorthand): Deleted.
(WebCore::webkitAnimationShorthand): Deleted.
(WebCore::webkitBorderAfterShorthand): Deleted.
(WebCore::webkitBorderBeforeShorthand): Deleted.
(WebCore::webkitBorderEndShorthand): Deleted.
(WebCore::webkitBorderStartShorthand): Deleted.
(WebCore::webkitColumnsShorthand): Deleted.
(WebCore::webkitColumnRuleShorthand): Deleted.
(WebCore::flexFlowShorthand): Deleted.
(WebCore::flexShorthand): Deleted.
(WebCore::webkitMarginCollapseShorthand): Deleted.
(WebCore::webkitGridShorthand): Deleted.
(WebCore::webkitGridTemplateShorthand): Deleted.
(WebCore::webkitGridAreaShorthand): Deleted.
(WebCore::webkitGridColumnShorthand): Deleted.
(WebCore::webkitGridRowShorthand): Deleted.
(WebCore::webkitMarqueeShorthand): Deleted.
(WebCore::webkitMaskShorthand): Deleted.
(WebCore::webkitMaskPositionShorthand): Deleted.
(WebCore::webkitMaskRepeatShorthand): Deleted.
(WebCore::webkitTextDecorationShorthand): Deleted.
(WebCore::webkitTextEmphasisShorthand): Deleted.
(WebCore::webkitTextStrokeShorthand): Deleted.
(WebCore::webkitTransitionShorthand): Deleted.
(WebCore::webkitPerspectiveOriginShorthand): Deleted.
(WebCore::webkitTransformOriginShorthand): Deleted.
* css/StylePropertyShorthand.h:
* css/makeprop.pl:

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

4 years agoUnreviewed, rolling out r178532.
commit-queue@webkit.org [Fri, 16 Jan 2015 18:50:45 +0000 (18:50 +0000)]
Unreviewed, rolling out r178532.
https://bugs.webkit.org/show_bug.cgi?id=140548

Broke fast/css/parsing-css-lang.html on some bots (Requested
by ap on #webkit).

Reverted changeset:

"Canonicalization of :lang() should preserve the :lang()'s
arguments representations"
https://bugs.webkit.org/show_bug.cgi?id=139928
http://trac.webkit.org/changeset/178532

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

4 years agoUnreviewed, rolling out r178577.
commit-queue@webkit.org [Fri, 16 Jan 2015 18:36:34 +0000 (18:36 +0000)]
Unreviewed, rolling out r178577.
https://bugs.webkit.org/show_bug.cgi?id=140546

Broke fast/css-grid-layout/grid-content-sized-columns-
resolution.html (Requested by ap on #webkit).

Reverted changeset:

"[CSS Grid Layout] Tracks shrink sometimes with indefinite
remaining space"
https://bugs.webkit.org/show_bug.cgi?id=139059
http://trac.webkit.org/changeset/178577

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

4 years agostd::all_of requires complete C++ iterators in GCC 4.8
utatane.tea@gmail.com [Fri, 16 Jan 2015 18:15:41 +0000 (18:15 +0000)]
std::all_of requires complete C++ iterators in GCC 4.8
https://bugs.webkit.org/show_bug.cgi?id=140530

Reviewed by Darin Adler.

In the WebKit2/UIProcess/WebProcessLifetimeObserver.cpp, std::all_of
is used for HashIterators. However, std::all_of requires the complete
C++ iterator interface including iterator_category typedef member and
it raises compile error in GCC 4.8 (and libstdc++) environment.

This patch inherits std::iterator with appropriate type parameters.
It automatically defines required typedefs including iterator_category.

* wtf/HashIterators.h:

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

4 years agoSome improvements to RuleSet shrinking.
akling@apple.com [Fri, 16 Jan 2015 17:50:14 +0000 (17:50 +0000)]
Some improvements to RuleSet shrinking.
<https://webkit.org/b/140534>

Reviewed by Antti Koivisto.

Give an inline capacity (1) to the RuleData Vectors in RuleSet.
The vast majority of Vectors have only a single entry, and this
avoids having to allocate a separate Vector backing store for them.

Also make sure to shrink some Vectors that we weren't already,
like those in RuleFeatureSet.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRulesForList):
* css/ElementRuleCollector.h:
* css/RuleFeature.cpp:
(WebCore::RuleFeatureSet::shrinkToFit):
* css/RuleFeature.h:
* css/RuleSet.cpp:
(WebCore::RuleSet::addToRuleSet):
(WebCore::rulesCountForName):
(WebCore::shrinkMapVectorsToFit):
(WebCore::RuleSet::shrinkToFit):
* css/RuleSet.h:
(WebCore::RuleSet::idRules):
(WebCore::RuleSet::classRules):
(WebCore::RuleSet::tagRules):
(WebCore::RuleSet::shadowPseudoElementRules):
(WebCore::RuleSet::linkPseudoClassRules):
(WebCore::RuleSet::cuePseudoRules):
(WebCore::RuleSet::focusPseudoClassRules):
(WebCore::RuleSet::universalRules):

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

4 years agoFix the public iOS SDK build after <http://trac.webkit.org/changeset/178285>
dbates@webkit.org [Fri, 16 Jan 2015 17:13:03 +0000 (17:13 +0000)]
Fix the public iOS SDK build after <trac.webkit.org/changeset/178285>
(https://bugs.webkit.org/show_bug.cgi?id=140360)

Forward declare protocol NSURLDownloadDelegate as it is SPI on iOS.

* Misc/WebDownload.h:

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

4 years agoCorrect naming for FontCascade implementation files
antti@apple.com [Fri, 16 Jan 2015 16:07:46 +0000 (16:07 +0000)]
Correct naming for FontCascade implementation files
https://bugs.webkit.org/show_bug.cgi?id=140544

Reviewed by Zalan Bujtas.

Also reduce their number.

Merge FontFastPath.cpp into FontCascade.cpp
Merge FontMac.mm and FontComplexTextMac.cpp into FontCascadeCocoa.mm

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::getEmphasisMarkGlyphData):
(WebCore::FontCascade::emphasisMarkAscent):
(WebCore::FontCascade::emphasisMarkDescent):
(WebCore::FontCascade::emphasisMarkHeight):
(WebCore::FontCascade::getGlyphsAndAdvancesForSimpleText):
(WebCore::FontCascade::drawSimpleText):
(WebCore::FontCascade::drawEmphasisMarksForSimpleText):
(WebCore::FontCascade::drawGlyphBuffer):
(WebCore::offsetToMiddleOfGlyph):
(WebCore::offsetToMiddleOfGlyphAtIndex):
(WebCore::FontCascade::drawEmphasisMarks):
(WebCore::FontCascade::floatWidthForSimpleText):
(WebCore::FontCascade::adjustSelectionRectForSimpleText):
(WebCore::FontCascade::offsetForPositionForSimpleText):
* platform/graphics/FontFastPath.cpp: Removed.
* platform/graphics/cocoa/FontCascadeCocoa.mm: Copied from Source/WebCore/platform/graphics/mac/FontMac.mm.
(WebCore::FontCascade::drawGlyphs):
(WebCore::FontCascade::adjustSelectionRectForComplexText):
(WebCore::FontCascade::getGlyphsAndAdvancesForComplexText):
(WebCore::FontCascade::drawComplexText):
(WebCore::FontCascade::drawEmphasisMarksForComplexText):
(WebCore::FontCascade::floatWidthForComplexText):
(WebCore::FontCascade::offsetForPositionForComplexText):
(WebCore::FontCascade::fontDataForCombiningCharacterSequence):
* platform/graphics/mac/FontComplexTextMac.cpp: Removed.
* platform/graphics/mac/FontMac.mm: Removed.

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

4 years ago[CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space
svillar@igalia.com [Fri, 16 Jan 2015 10:22:45 +0000 (10:22 +0000)]
[CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space
https://bugs.webkit.org/show_bug.cgi?id=139059

Reviewed by David Hyatt.

Source/WebCore:

Test: fast/css-grid-layout/grid-grow-tracks-to-their-max.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):

LayoutTests:

The third step of the grid track sizing algorithm (method
ComputeUsedBreadthOfGridTracks in the old specs version of the
algorithm) tries to grow all grid tracks until the remaining space
is exhausted. Should the remaining space is undefined we should fill
the tracks up to their limits. This is specified in pseudocode like
this:

    For each Grid track t in GridTracks
        t.UsedBreadth = t.MaxBreadth

That's correct for most of the cases, but it becomes
wrong whenever t.UsedBreadth > t.MaxBreadth something that is not
incorrect. What we actually want to do is to grow the track to its
maximum if and only if the used breadth is smaller than the maximum.

* TestExpectations: Added a test which is correct but starts to fail
due to another bug (wkb.ug/139058).
* fast/css-grid-layout/grid-auto-columns-rows-update.html:
* fast/css-grid-layout/grid-content-sized-columns-resolution-expected.txt:
* fast/css-grid-layout/grid-content-sized-columns-resolution.html:
* fast/css-grid-layout/grid-grow-tracks-to-their-max-expected.txt: Added.
* fast/css-grid-layout/grid-grow-tracks-to-their-max.html: Added.
* fast/css-grid-layout/grid-item-removal-track-breadth-update.html:
* fast/css-grid-layout/minmax-max-content-resolution-rows.html:
* fast/css-grid-layout/minmax-min-content-column-resolution-rows.html:
* fast/css-grid-layout/percent-of-indefinite-track-size-in-auto.html:
* fast/css-grid-layout/percent-of-indefinite-track-size.html:

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

4 years agoFix build warning in WebKit2/UIProcess module.
commit-queue@webkit.org [Fri, 16 Jan 2015 08:12:00 +0000 (08:12 +0000)]
Fix build warning in WebKit2/UIProcess module.
https://bugs.webkit.org/show_bug.cgi?id=140538

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2015-01-16
Reviewed by Csaba Osztrogonác.

Fix build warnings by removing parameter name from functions

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::processWillOpenConnection):
(WebKit::StorageManager::processDidCloseConnection):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processWillOpenConnection):
(WebKit::WebProcessPool::processWillCloseConnection):

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

4 years agoRemove ENABLE(SQL_DATABASE) guards
ossy@webkit.org [Fri, 16 Jan 2015 08:05:12 +0000 (08:05 +0000)]
Remove ENABLE(SQL_DATABASE) guards
https://bugs.webkit.org/show_bug.cgi?id=140434

Reviewed by Darin Adler.

.:

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

Source/JavaScriptCore:

* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.make:
* inspector/protocol/Database.json:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:
* Modules/webdatabase/AbstractDatabaseServer.h:
* Modules/webdatabase/ChangeVersionData.h:
* Modules/webdatabase/ChangeVersionWrapper.cpp:
* Modules/webdatabase/ChangeVersionWrapper.h:
* Modules/webdatabase/DOMWindowWebDatabase.cpp:
* Modules/webdatabase/DOMWindowWebDatabase.h:
* Modules/webdatabase/DOMWindowWebDatabase.idl:
* Modules/webdatabase/Database.cpp:
* Modules/webdatabase/Database.h:
* Modules/webdatabase/Database.idl:
* Modules/webdatabase/DatabaseBackend.cpp:
* Modules/webdatabase/DatabaseBackend.h:
* Modules/webdatabase/DatabaseBackendBase.cpp:
* Modules/webdatabase/DatabaseBackendBase.h:
* Modules/webdatabase/DatabaseBasicTypes.h:
* Modules/webdatabase/DatabaseCallback.h:
* Modules/webdatabase/DatabaseCallback.idl:
* Modules/webdatabase/DatabaseContext.cpp:
* Modules/webdatabase/DatabaseContext.h:
* Modules/webdatabase/DatabaseDetails.h:
* Modules/webdatabase/DatabaseError.h:
* Modules/webdatabase/DatabaseManager.cpp:
* Modules/webdatabase/DatabaseManager.h:
* Modules/webdatabase/DatabaseManagerClient.h:
* Modules/webdatabase/DatabaseServer.cpp:
* Modules/webdatabase/DatabaseServer.h:
* Modules/webdatabase/DatabaseTask.cpp:
* Modules/webdatabase/DatabaseTask.h:
* Modules/webdatabase/DatabaseThread.cpp:
* Modules/webdatabase/DatabaseThread.h:
* Modules/webdatabase/DatabaseTracker.cpp:
* Modules/webdatabase/DatabaseTracker.h:
* Modules/webdatabase/OriginLock.cpp:
* Modules/webdatabase/OriginLock.h:
* Modules/webdatabase/SQLCallbackWrapper.h:
* Modules/webdatabase/SQLError.h:
* Modules/webdatabase/SQLError.idl:
* Modules/webdatabase/SQLException.cpp:
* Modules/webdatabase/SQLException.h:
* Modules/webdatabase/SQLException.idl:
* Modules/webdatabase/SQLResultSet.cpp:
* Modules/webdatabase/SQLResultSet.h:
* Modules/webdatabase/SQLResultSet.idl:
* Modules/webdatabase/SQLResultSetRowList.cpp:
* Modules/webdatabase/SQLResultSetRowList.h:
* Modules/webdatabase/SQLResultSetRowList.idl:
* Modules/webdatabase/SQLStatement.cpp:
* Modules/webdatabase/SQLStatement.h:
* Modules/webdatabase/SQLStatementBackend.cpp:
* Modules/webdatabase/SQLStatementBackend.h:
* Modules/webdatabase/SQLStatementCallback.h:
* Modules/webdatabase/SQLStatementCallback.idl:
* Modules/webdatabase/SQLStatementErrorCallback.h:
* Modules/webdatabase/SQLStatementErrorCallback.idl:
* Modules/webdatabase/SQLTransaction.cpp:
* Modules/webdatabase/SQLTransaction.h:
* Modules/webdatabase/SQLTransaction.idl:
* Modules/webdatabase/SQLTransactionBackend.cpp:
* Modules/webdatabase/SQLTransactionBackend.h:
* Modules/webdatabase/SQLTransactionCallback.h:
* Modules/webdatabase/SQLTransactionCallback.idl:
* Modules/webdatabase/SQLTransactionClient.cpp:
* Modules/webdatabase/SQLTransactionClient.h:
* Modules/webdatabase/SQLTransactionCoordinator.cpp:
* Modules/webdatabase/SQLTransactionCoordinator.h:
* Modules/webdatabase/SQLTransactionErrorCallback.h:
* Modules/webdatabase/SQLTransactionErrorCallback.idl:
* Modules/webdatabase/SQLTransactionState.h:
* Modules/webdatabase/SQLTransactionStateMachine.cpp:
* Modules/webdatabase/SQLTransactionStateMachine.h:
* bindings/js/JSCommandLineAPIHostCustom.cpp:
(WebCore::JSCommandLineAPIHost::databaseId):
* bindings/js/JSCustomSQLStatementErrorCallback.cpp:
* bindings/js/JSExceptionBase.cpp:
(WebCore::toExceptionBase):
* bindings/js/JSSQLResultSetRowListCustom.cpp:
* bindings/js/JSSQLTransactionCustom.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
(webkit_dom_test_callback_finalize):
(webkit_dom_test_callback_constructor):
(webkit_dom_test_callback_callback_with_no_param):
(webkit_dom_test_callback_callback_with_array_param):
(webkit_dom_test_callback_callback_with_serialized_script_value_param):
(webkit_dom_test_callback_callback_with_non_bool_return_type):
(webkit_dom_test_callback_callback_with_string_list):
(webkit_dom_test_callback_callback_with_boolean):
(webkit_dom_test_callback_callback_requires_this_to_pass):
* bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h:
* bindings/scripts/test/JS/JSTestCallback.cpp:
* bindings/scripts/test/JS/JSTestCallback.h:
* bindings/scripts/test/ObjC/DOMTestCallback.mm:
* bindings/scripts/test/TestCallback.idl:
* dom/DOMExceptions.in:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::setDatabaseContext):
* dom/ScriptExecutionContext.h:
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::PageCache::canCachePageContainingThisFrame):
* inspector/CommandLineAPIHost.cpp:
(WebCore::CommandLineAPIHost::CommandLineAPIHost):
(WebCore::CommandLineAPIHost::disconnect):
(WebCore::CommandLineAPIHost::databaseIdImpl):
* inspector/CommandLineAPIHost.h:
(WebCore::CommandLineAPIHost::init):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorDatabaseAgent.cpp:
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDatabaseInstrumentation.h:
(WebCore::InspectorInstrumentation::didOpenDatabase):
* inspector/InspectorDatabaseResource.cpp:
* inspector/InspectorDatabaseResource.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
(WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
* inspector/InspectorInstrumentation.h:
* inspector/InstrumentingAgents.cpp:
(WebCore::InstrumentingAgents::InstrumentingAgents):
(WebCore::InstrumentingAgents::reset):
* inspector/InstrumentingAgents.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopLoading):
* page/ChromeClient.h:
* platform/FeatureCounterKeys.h:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:
* Storage/WebDatabaseManager.mm:
(databasesDirectoryPath):
* Storage/WebDatabaseManagerClient.h:
* Storage/WebDatabaseManagerClient.mm:
* Storage/WebDatabaseManagerInternal.h:
* Storage/WebDatabaseManagerPrivate.h:
* Storage/WebDatabaseQuotaManager.mm:
(-[WebDatabaseQuotaManager usage]):
(-[WebDatabaseQuotaManager quota]):
(-[WebDatabaseQuotaManager setQuota:]):
* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
* WebCoreSupport/WebSecurityOrigin.mm:
(-[WebSecurityOrigin usage]):
(-[WebSecurityOrigin quota]):
(-[WebSecurityOrigin setQuota:]):
* WebView/WebFrame.mm:
(-[WebFrame _cacheabilityDictionary]):
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView _preferencesChanged:]):

Source/WebKit/win:

* ForEachCoClass.h:
* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::exceededDatabaseQuota):
* WebCoreSupport/WebChromeClient.h:
* WebDatabaseManager.cpp:
(WebKitInitializeWebDatabasesIfNecessary):
* WebDatabaseManager.h:
* WebSecurityOrigin.cpp:
(WebSecurityOrigin::usage):
(WebSecurityOrigin::quota):
(WebSecurityOrigin::setQuota):
* WebView.cpp:
(WebView::initWithFrame):
(WebView::notifyPreferencesChanged):

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:
* Shared/OriginAndDatabases.cpp:
* Shared/OriginAndDatabases.h:
* Shared/WebCoreArgumentCoders.cpp:
* UIProcess/API/C/WKContext.cpp:
(WKContextGetDatabaseManager):
* UIProcess/API/C/WKDatabaseManager.cpp:
(WKDatabaseManagerGetTypeID):
(WKDatabaseManagerGetOriginKey):
(WKDatabaseManagerGetOriginQuotaKey):
(WKDatabaseManagerGetOriginUsageKey):
(WKDatabaseManagerGetDatabaseDetailsKey):
(WKDatabaseManagerGetDatabaseDetailsNameKey):
(WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
(WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
(WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
(WKDatabaseManagerGetDatabaseDetailsCreationTimeKey):
(WKDatabaseManagerGetDatabaseDetailsModificationTimeKey):
(WKDatabaseManagerSetClient):
(WKDatabaseManagerGetDatabasesByOrigin):
(WKDatabaseManagerGetDatabaseOrigins):
(WKDatabaseManagerDeleteDatabasesWithNameForOrigin):
(WKDatabaseManagerDeleteDatabasesForOrigin):
(WKDatabaseManagerDeleteAllDatabases):
(WKDatabaseManagerSetQuotaForOrigin):
* UIProcess/API/efl/EwkView.cpp:
(EwkView::informDatabaseQuotaReached):
* UIProcess/WebDatabaseManagerProxy.cpp:
* UIProcess/WebDatabaseManagerProxy.h:
* UIProcess/WebDatabaseManagerProxy.messages.in:
* UIProcess/WebProcessPool.cpp:
* UIProcess/efl/PageUIClientEfl.cpp:
(WebKit::PageUIClientEfl::PageUIClientEfl):
(WebKit::PageUIClientEfl::exceededDatabaseQuota):
* UIProcess/efl/PageUIClientEfl.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::clearAllDatabases):
(WebKit::InjectedBundle::setDatabaseQuota):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::exceededDatabaseQuota):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
* WebProcess/WebCoreSupport/WebDatabaseManager.h:
* WebProcess/WebCoreSupport/WebDatabaseManager.messages.in:
* WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.cpp:
* WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* Scripts/webkitperl/FeatureList.pm:

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

4 years agoElement appears correctly but does not receive event with a large translation.
zalan@apple.com [Fri, 16 Jan 2015 06:13:45 +0000 (06:13 +0000)]
Element appears correctly but does not receive event with a large translation.
https://bugs.webkit.org/show_bug.cgi?id=139815

Reviewed by Simon Fraser.

When the hit point gets translated beyond the min/max value of LayoutRect (infiniteRect()),
we fail to find the corresponding layer.
When there's no clipping on a layer, we use min/max values to represent infiniteness.
However it does not work well across types. With IntPoint(hittest) we can address a point that's outside
of LayoutRect's boundary(clipping).
This patch addresses the immediate issue of not being able to hittest transformed layers properly.
Fixing the representation of infiniteness is tracked here: webkit.org/b/140533
Source/WebCore:

Test: transforms/hittest-translated-content-off-to-infinity-and-back.html

* rendering/ClipRect.cpp:
(WebCore::ClipRect::intersects):

LayoutTests:

* transforms/hittest-translated-content-off-to-infinity-and-back-expected.html: Added.
* transforms/hittest-translated-content-off-to-infinity-and-back.html: Added.

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

4 years agotables/mozilla/bugs/bug10633.html is flakey on Yosemite
mmaxfield@apple.com [Fri, 16 Jan 2015 05:55:05 +0000 (05:55 +0000)]
tables/mozilla/bugs/bug10633.html is flakey on Yosemite
https://bugs.webkit.org/show_bug.cgi?id=140487

Reviewed by Simon Fraser.

Source/WebCore:

The workaround in https://bugs.webkit.org/show_bug.cgi?id=140253 works
on both OSes.

* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformInit):

LayoutTests:

Mark tests as not flakey any more.

* platform/mac/TestExpectations:

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

4 years agoWeb Inspector: Uncaught exceptions, attempting to dispatch unimplemented Network...
commit-queue@webkit.org [Fri, 16 Jan 2015 04:23:31 +0000 (04:23 +0000)]
Web Inspector: Uncaught exceptions, attempting to dispatch unimplemented Network WebSocket methods
https://bugs.webkit.org/show_bug.cgi?id=140532

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-01-15
Reviewed by Timothy Hatcher.

* UserInterface/Protocol/NetworkObserver.js:
(WebInspector.NetworkObserver.prototype.webSocketFrameReceived):
(WebInspector.NetworkObserver.prototype.webSocketFrameError):
(WebInspector.NetworkObserver.prototype.webSocketFrameSent):
Add stubs to prevent an exception when trying to dispatch the event.

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

4 years agoRemoving an HTML element spends a lot of time in adjustDirectionalityIfNeededAfterChi...
rniwa@webkit.org [Fri, 16 Jan 2015 03:45:01 +0000 (03:45 +0000)]
Removing an HTML element spends a lot of time in adjustDirectionalityIfNeededAfterChildrenChanged
https://bugs.webkit.org/show_bug.cgi?id=140523
<rdar://problem/19464329>

Reviewed by Chris Dumez.

The bug was caused by adjustDirectionalityIfNeededAfterChildrenChanged always traversing children to
unset selfOrAncestorHasDirAutoAttribute flag while removing a child element.

Fixed the bug by removing this code. This code was no-op prior to being refactored in r154957 since
we only entered a for loop with the invariant "counter < childCountDelta" when "childCountDelta < 0".

See http://trac.webkit.org/changeset/154957/trunk/Source/WebCore/html/HTMLElement.cpp.

* html/HTMLElement.cpp:
(WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):

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

4 years ago[iOS] REGRESSION (r174642): DumpRenderTree.app test may dump result twice
dbates@webkit.org [Fri, 16 Jan 2015 03:29:13 +0000 (03:29 +0000)]
[iOS] REGRESSION (r174642): DumpRenderTree.app test may dump result twice
https://bugs.webkit.org/show_bug.cgi?id=139685
<rdar://problem/19281317>

Reviewed by Simon Fraser.

Fixes an issue where a test in DumpRenderTree.app may dump its result twice. In particular,
the test LayoutTests/fast/dom/gc-10.html may dump its result twice.

Following <http://trac.webkit.org/changeset/174642>, we dump the test result asynchronously
as opposed to synchronously. So, the WebThread or the main thread may perform other tasks
before DRT dumps the output of a test. In particular, the WebThread may start a new page
load (say, as a result of continued JavaScript execution), which will ultimately lead to
dumping the test result again. Instead we want DRT to dump the test result synchronously
such that we capture the state of the web page either when the page is loaded or when
window.testRunner.notifyDone() is called.

* DumpRenderTree/ios/PixelDumpSupportIOS.mm:
(createBitmapContextFromWebView): Moved logic to re-enable tile painting and update the
state of the display from here to updateDisplay(). Added call to -[CATransaction flush] to
flush CA transactions to the window.
* DumpRenderTree/mac/DumpRenderTree.mm:
(updateDisplay): Added iOS-specific code to update tiles and tell WebKit to flush
compositing changes to ensure that we have up-to-date tile content for a pixel/ref-test.
(dump): Renamed; formerly named dumpTestResults().
(displayWebView): Removed outdated FIXME comment. Added FIXME comment to investigate
enabling repaint support on iOS.
(-[DumpRenderTree _deferDumpToMainThread]): Deleted.
(-[DumpRenderTree _waitForWebThreadThenDump]): Deleted.
(dumpTestResults): Deleted.

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

4 years agoWeb Inspector: Reopening the inspector can selects a sub-frame instead of the Main...
commit-queue@webkit.org [Fri, 16 Jan 2015 02:53:06 +0000 (02:53 +0000)]
Web Inspector: Reopening the inspector can selects a sub-frame instead of the Main Frame's DOM
https://bugs.webkit.org/show_bug.cgi?id=140513

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-01-15
Reviewed by Timothy Hatcher.

* UserInterface/Models/Frame.js:
(WebInspector.Frame.prototype.saveIdentityToCookie):
Specifically identify the main frame, so that any sub-frames with the same
URL, don't get choosen over the main frame when restoring state from cookie.

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

4 years agoRenderLayerCompositor: Strange comparison of opacity (float) to boolean.
bfulgham@apple.com [Fri, 16 Jan 2015 02:18:42 +0000 (02:18 +0000)]
RenderLayerCompositor: Strange comparison of opacity (float) to boolean.
https://bugs.webkit.org/show_bug.cgi?id=140477.

Reviewed by Simon Fraser.

* rendering/RenderLayerCompositor.cpp:
(WebCore::styleChangeRequiresLayerRebuild): Add a cast to make the meaning of this
code clearer.

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

4 years agoAdd a connection parameter to StorageManager willOpen/didClose functions
andersca@apple.com [Fri, 16 Jan 2015 02:07:08 +0000 (02:07 +0000)]
Add a connection parameter to StorageManager willOpen/didClose functions
https://bugs.webkit.org/show_bug.cgi?id=140527

Reviewed by Tim Horton.

Rename processWillCloseConnection to processDidCloseConnection and pass connections
to both functions since in the near future we won't be able to get the connection from
the web process proxy in these scenarios.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::processWillOpenConnection):
(WebKit::StorageManager::processDidCloseConnection):
(WebKit::StorageManager::processWillCloseConnection): Deleted.
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::webProcessWillOpenConnection):
(WebKit::WebsiteDataStore::webProcessDidCloseConnection):

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

4 years ago[Win] Unreviewed Windows gardening.
bfulgham@apple.com [Fri, 16 Jan 2015 02:01:17 +0000 (02:01 +0000)]
[Win] Unreviewed Windows gardening.

Remove a bunch of out-of-date entries, and try to properly mark tests so we get
proper coverage.

* platform/win-xp/TestExpectations:
* platform/win/TestExpectations:

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

4 years agoUnreviewed, rolling out r178531.
joepeck@webkit.org [Fri, 16 Jan 2015 01:59:07 +0000 (01:59 +0000)]
Unreviewed, rolling out r178531.

Caused LayoutTest ASSERTs/CRASHs on Debug Yosemite build-bot.

Reverted changeset:

"Layers need to be already updated before we call adjustViewSize."
https://bugs.webkit.org/show_bug.cgi?id=135514
http://trac.webkit.org/changeset/178531

* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::updateCompositingLayersAfterScrolling):
(WebCore::FrameView::paintContents):
(WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Deleted.
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollTo):
(WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Deleted.
* platform/ScrollView.h:
(WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Deleted.

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

4 years ago[WK2] Wire diagnostic logging messages through the UIProcess
cdumez@apple.com [Fri, 16 Jan 2015 01:07:32 +0000 (01:07 +0000)]
[WK2] Wire diagnostic logging messages through the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=140486

Reviewed by Sam Weinig.

Wire diagnostic logging messages through the UIProcess.
Eventually, the corresponding bundle API should go away.

Source/WebCore:

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Add page/DiagnosticLoggingResultType.h to Windows project.

* WebCore.xcodeproj/project.pbxproj:
Add page/DiagnosticLoggingResultType.h to XCode project.

* html/HTMLMediaElement.cpp:
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
* page/DiagnosticLoggingClient.h:
* page/DiagnosticLoggingResultType.h: Copied from Source/WebCore/page/DiagnosticLoggingClient.h.
Use new DiagnosticLoggingResultType enum instead of old
DiagnosticLoggingClient::LogType one.

Source/WebKit2:

* CMakeLists.txt:
Add UIProcess/WebPageDiagnosticLoggingClient.cpp to CMake.

* Shared/API/c/WKDiagnosticLoggingResultType.h:
Extract WKDiagnosticLoggingResultType enumeration from
WKBundlePageDiagnosticLoggingClient.h into its own header so that
it can be shared with the new WKPageDiagnosticLoggingClient.h.

* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
(WebKit::toDiagnosticLoggingResultType):
Add WebCore::DiagnosticLoggingResultType <-> WKDiagnosticLoggingResultType
casting functions.

* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageDiagnosticLoggingClient):
* UIProcess/API/C/WKPage.h:
Add WKPage API so that the application can set the DiagnosticLoggingClient.

* UIProcess/API/C/WKPageDiagnosticLoggingClient.h: Added.
New WK2 diagnostic logging client that will eventually replace the existing
WKBundlePageDiagnosticLoggingClient.h injected bundle client.

* UIProcess/WebPageDiagnosticLoggingClient.cpp: Copied from Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp.
* UIProcess/WebPageDiagnosticLoggingClient.h: Copied from Source/WebCore/page/DiagnosticLoggingClient.h.
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
Handle new IPC messages for logging diagnostic messages.

* UIProcess/WebPageProxy.messages.in:
Add 3 IPC messages for logging diagnostic messages.

* WebKit2.xcodeproj/project.pbxproj:
Add new files to XCode project.

* WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h:
Remove WKDiagnosticLoggingResultType enum as it was moved to its own
header.

* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h:
Use WebCore::DiagnosticLoggingResultType enum type instead of
WKDiagnosticLoggingResultType and call toAPI() to convert to
WKDiagnosticLoggingResultType type.

* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
Send IPC to WebPageProxy in addition to calling the injected bundle client.

* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
Use new DiagnosticLoggingResultType enum instead of the old LogType one.

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

4 years agoWeb Inspector: selecting Paint timeline records from sidebar does not trigger preview...
joepeck@webkit.org [Fri, 16 Jan 2015 01:00:23 +0000 (01:00 +0000)]
Web Inspector: selecting Paint timeline records from sidebar does not trigger preview of paint quad
https://bugs.webkit.org/show_bug.cgi?id=139151

Reviewed by Brian Burg.

* UserInterface/Views/LayoutTimelineDataGrid.js:
(WebInspector.LayoutTimelineDataGrid):
(WebInspector.LayoutTimelineDataGrid.prototype.callFramePopoverAnchorElement):
(WebInspector.LayoutTimelineDataGrid.prototype.reset): Deleted.
(WebInspector.LayoutTimelineDataGrid.prototype.hidden): Deleted.
(WebInspector.LayoutTimelineDataGrid.prototype._layoutDataGridSelectedNodeChanged): Deleted.
(WebInspector.LayoutTimelineDataGrid.prototype._hideHighlightIfNeeded): Deleted.
Move the node highlight from the datagrid to the timeline view because
we want this to happen on both the Navigation sidebar and the datagrid.

* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView.prototype.shown):
(WebInspector.LayoutTimelineView.prototype.hidden):
(WebInspector.LayoutTimelineView.prototype.filterDidChange):
(WebInspector.LayoutTimelineView.prototype.reset):
(WebInspector.LayoutTimelineView.prototype._treeElementDeselected):
(WebInspector.LayoutTimelineView.prototype._treeElementSelected):
Update the highlight for major view updates.

(WebInspector.LayoutTimelineView.prototype._updateHighlight):
(WebInspector.LayoutTimelineView.prototype._showHighlightForRecord):
(WebInspector.LayoutTimelineView.prototype._hideHighlightIfNeeded):
(WebInspector.LayoutTimelineView.prototype._hoveredOrSelectedRecord):
Show a highlight for what we are hovering, or what is selected.
Note the selected node may not be visible due to filtering.

(WebInspector.LayoutTimelineView.prototype._mouseOverDataGrid):
(WebInspector.LayoutTimelineView.prototype._mouseLeaveDataGrid):
(WebInspector.LayoutTimelineView.prototype._mouseOverTreeOutline):
(WebInspector.LayoutTimelineView.prototype._mouseLeaveTreeOutline):
Update hovered information mousing over the datagrid and tree outline.

* UserInterface/Views/TimelineContentView.js:
(WebInspector.TimelineContentView.prototype.filterDidChange):
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype.updateFilter):
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.filterDidChange):
Include a "filterDidChange" TimelineView method that gets called after
updateFilter (things like the filter bar or timeline range changes).

* UserInterface/Views/TreeOutline.js:
(TreeOutline.prototype.treeElementFromNode):
(TreeOutline.prototype.treeElementFromPoint):
Provide a helper to get a tree element from an event target.

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

4 years agoReduce LayoutRect::infiniteRect() usage.
zalan@apple.com [Fri, 16 Jan 2015 00:11:27 +0000 (00:11 +0000)]
Reduce LayoutRect::infiniteRect() usage.
https://bugs.webkit.org/show_bug.cgi?id=140511

Reviewed by Simon Fraser.

This is in preparation to get rid of LayoutRect/FloatRect::infiniteRect().

No change in functionality.

* platform/graphics/LayoutRect.h:
(WebCore::LayoutRect::isInfinite):
* rendering/ClipRect.h:
(WebCore::ClipRect::reset):
(WebCore::ClipRect::isEmpty):
(WebCore::ClipRect::isInfinite):
(WebCore::ClipRect::setRect): Deleted.
* rendering/PaintInfo.h:
(WebCore::PaintInfo::applyTransform):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
(WebCore::ClipRects::reset):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGeometry):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::clippedByAncestor):

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

4 years agoAdded availability annotations to modern Cocoa SPI.
mitz@apple.com [Fri, 16 Jan 2015 00:06:22 +0000 (00:06 +0000)]
Added availability annotations to modern Cocoa SPI.

Rubber-stamped by Anders Carlsson.

* UIProcess/API/Cocoa/WKWebViewPrivate.h:

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

4 years agoFix assertions on the Mountain Lion bots.
andersca@apple.com [Fri, 16 Jan 2015 00:01:16 +0000 (00:01 +0000)]
Fix assertions on the Mountain Lion bots.

It is allowed to call addWorkQueueMessageReceiver even if the connection is open
so remove that assertion.

* Platform/IPC/Connection.cpp:
(IPC::Connection::addWorkQueueMessageReceiver):

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

4 years agoUnreviewed build fix after r178536.
joepeck@webkit.org [Thu, 15 Jan 2015 23:58:34 +0000 (23:58 +0000)]
Unreviewed build fix after r178536.

Initialize member variables in the proper order.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):

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

4 years agoIntermittent WebCore build failures - CSSPropertyNames.gperf: No keywords in input...
cdumez@apple.com [Thu, 15 Jan 2015 23:57:34 +0000 (23:57 +0000)]
Intermittent WebCore build failures - CSSPropertyNames.gperf: No keywords in input file! calling gperf failed: 256 at WebCore/css/makeprop.pl line 901
https://bugs.webkit.org/show_bug.cgi?id=140521

Reviewed by Alexey Proskuryakov.

Close the CSSPropertyNames.gperf file before calling gperf on it
to make sure the content we wrote was flushed. This was causing
intermittent build failures.

* css/makeprop.pl:

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

4 years ago[WK2] Add support for fully editable WKWebView.
enrica@apple.com [Thu, 15 Jan 2015 23:42:11 +0000 (23:42 +0000)]
[WK2] Add support for fully editable WKWebView.
https://bugs.webkit.org/show_bug.cgi?id=140515

Reviewed by Anders Carlsson.

WKWebView has now a new property (_editable) to control
the editability of the entire content.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isEditable]):
(-[WKWebView _setEditable:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setEditable):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isEditable):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setEditable):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

4 years agoUpdate Mountain Lion results for fast/canvas/webgl/angle-instanced-arrays.html
ap@apple.com [Thu, 15 Jan 2015 23:16:18 +0000 (23:16 +0000)]
Update Mountain Lion results for fast/canvas/webgl/angle-instanced-arrays.html
after r178527.

* platform/mac-mountainlion/fast/canvas/webgl/angle-instanced-arrays-expected.txt:

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

4 years agoLayerFragment should be able to intersect with ClipRect.
zalan@apple.com [Thu, 15 Jan 2015 23:15:35 +0000 (23:15 +0000)]
LayerFragment should be able to intersect with ClipRect.
https://bugs.webkit.org/show_bug.cgi?id=140498

Reviewed by Simon Fraser.

No change in functionality.

* rendering/LayerFragment.h:
(WebCore::LayerFragment::intersect):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::collectFragments):

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

4 years agoMove ClipRects and ClipRectsCache classes to RenderLayer.cpp.
zalan@apple.com [Thu, 15 Jan 2015 23:13:38 +0000 (23:13 +0000)]
Move ClipRects and ClipRectsCache classes to RenderLayer.cpp.
https://bugs.webkit.org/show_bug.cgi?id=140461

Reviewed by Simon Fraser.

Move classes only used by RenderLayer to RenderLayer.cpp.

No change in functionality.

* rendering/RenderLayer.cpp:
(WebCore::ClipRects::create):
(WebCore::ClipRects::reset):
(WebCore::ClipRects::overflowClipRect):
(WebCore::ClipRects::setOverflowClipRect):
(WebCore::ClipRects::fixedClipRect):
(WebCore::ClipRects::setFixedClipRect):
(WebCore::ClipRects::posClipRect):
(WebCore::ClipRects::setPosClipRect):
(WebCore::ClipRects::fixed):
(WebCore::ClipRects::setFixed):
(WebCore::ClipRects::ref):
(WebCore::ClipRects::deref):
(WebCore::ClipRects::operator==):
(WebCore::ClipRects::operator=):
(WebCore::ClipRects::ClipRects):
(WebCore::ClipRectsCache::ClipRectsCache):
(WebCore::ClipRectsCache::getClipRects):
(WebCore::ClipRectsCache::setClipRects):
(WebCore::ClipRectsCache::getIndex):
(WebCore::RenderLayer::clipRects):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
(WebCore::ClipRects::create): Deleted.
(WebCore::ClipRects::ClipRects): Deleted.
(WebCore::ClipRects::reset): Deleted.
(WebCore::ClipRects::overflowClipRect): Deleted.
(WebCore::ClipRects::setOverflowClipRect): Deleted.
(WebCore::ClipRects::fixedClipRect): Deleted.
(WebCore::ClipRects::setFixedClipRect): Deleted.
(WebCore::ClipRects::posClipRect): Deleted.
(WebCore::ClipRects::setPosClipRect): Deleted.
(WebCore::ClipRects::fixed): Deleted.
(WebCore::ClipRects::setFixed): Deleted.
(WebCore::ClipRects::ref): Deleted.
(WebCore::ClipRects::deref): Deleted.
(WebCore::ClipRects::operator==): Deleted.
(WebCore::ClipRects::operator=): Deleted.
(WebCore::ClipRectsCache::ClipRectsCache): Deleted.
(WebCore::ClipRectsCache::getClipRects): Deleted.
(WebCore::ClipRectsCache::setClipRects): Deleted.
(WebCore::ClipRectsCache::getIndex): Deleted.

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

4 years agoCanonicalization of :lang() should preserve the :lang()'s arguments representations
commit-queue@webkit.org [Thu, 15 Jan 2015 22:52:30 +0000 (22:52 +0000)]
Canonicalization of :lang() should preserve the :lang()'s arguments representations
https://bugs.webkit.org/show_bug.cgi?id=139928

Patch by Dhi Aurrahman <diorahman@rockybars.com> on 2015-01-15
Reviewed by Benjamin Poulain.

Source/WebCore:

Preserve the representation of IDENT and STRING when serializing the
:lang(). For example, :lang(foo,"bar"   ,baz) should be serialized as
:lang(foo, "bar", baz) instead of :lang(foo, bar, baz).

Rename CSSParserSelector::setArgumentList, CSSSelector::setArgumentList
and CSSSelector::argumentList to CSSParserSelector::setLangArgumentList,
CSSSelector::setLangArgumentList and CSSSelector::langArgumentList
respectively, since those methods are being exclusively used in respect
with :lang().

Update the test of serializing :lang() with IDENT and STRING arguments.

* css/CSSGrammar.y.in:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::setLangArgumentList):
(WebCore::CSSParserSelector::setArgumentList): Deleted.
* css/CSSParserValues.h:
(WebCore::CSSParserString::init):
(WebCore::CSSParserString::clear):
(WebCore::CSSParserString::isParsedFromString):
(WebCore::CSSParserString::setParsedFromString):
* css/CSSSelector.cpp:
(WebCore::appendLangArgumentList):
(WebCore::CSSSelector::selectorText):
(WebCore::CSSSelector::setLangArgumentList):
(WebCore::appendArgumentList): Deleted.
(WebCore::CSSSelector::setArgumentList): Deleted.
* css/CSSSelector.h:
(WebCore::CSSSelector::langArgumentList):
(WebCore::CSSSelector::langArgumentParsedFromStringFlagList):
(WebCore::CSSSelector::argumentList): Deleted.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):

LayoutTests:

* fast/css/css-lang-selector-with-string-arguments-text-expected.txt: Updated.
* fast/css/css-lang-selector-with-string-arguments-text.html: Updated.

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

4 years agoLayers need to be already updated before we call adjustViewSize
bfulgham@apple.com [Thu, 15 Jan 2015 22:51:12 +0000 (22:51 +0000)]
Layers need to be already updated before we call adjustViewSize
https://bugs.webkit.org/show_bug.cgi?id=135514

Reviewed by Simon Fraser.

Tested by 'fast/dynamic/layer-no-longer-paginated.html'

Defer updating scrollbars until we have finished layout. This
has a couple of benefits:
(1) We do not attempt to modify render layers during layout.
(2) In WK1 we do not attempt to paint during layout.

Add a new virtual predicate to ScrollView indicating when we are in
layout so that calls to setContentsSize do not attempt
to adjust scrollbars.

Modify FrameView to set its ScrollView state to block drawing
scrollbar updates during layout. Also add a post-layout
handler to complete the scrollbar updates after layout is
finished.

* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Added.
(WebCore::ScrollView::scrollTo): If we should defer painting, cache the
the scroll delta and apply it after the layout is complete.
* platform/ScrollView.h:
(WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Added.

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