WebKit-https.git
6 years agoVersioning.
bshafiei@apple.com [Wed, 7 Jan 2015 09:27:55 +0000 (09:27 +0000)]
Versioning.

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

6 years agoASSERTION FAILED: rareData->m_flowThreadContainingBlock.value() == RenderBox::locateF...
mihnea@adobe.com [Wed, 7 Jan 2015 08:19:35 +0000 (08:19 +0000)]
ASSERTION FAILED: rareData->m_flowThreadContainingBlock.value() == RenderBox::locateFlowThreadContainingBlock() in WebCore::RenderBlock::locateFlowThreadContainingBlock
https://bugs.webkit.org/show_bug.cgi?id=139390

Reviewed by Andrei Bucur.

Source/WebCore:

When a block level element is inserted into an inline element, the inline element is split
in order to make sure that all the inline element children are properly wrapped inside
anonymous block elements. If the inline element is inside a pagination context, we have
to invalidate the cached flow thread containing block for the split inline element and its descendants.

Test: fast/multicol/newmulticol/block-split-inline-in-multicol.html

* rendering/RenderInline.cpp:
(WebCore::RenderInline::splitInlines):

LayoutTests:

* fast/multicol/newmulticol/block-split-inline-in-multicol-expected.txt: Added.
* fast/multicol/newmulticol/block-split-inline-in-multicol.html: Added.

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

6 years agoRemove the remaining uses of OwnPtr in threaded compositor.
yoon@igalia.com [Wed, 7 Jan 2015 07:18:01 +0000 (07:18 +0000)]
Remove the remaining uses of OwnPtr in threaded compositor.
https://bugs.webkit.org/show_bug.cgi?id=140172

Reviewed by Sam Weinig.

* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::runCompositingThread):
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:

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

6 years agomathml/mathml-in-dashboard.html fails on WebKit2 testers.
ap@apple.com [Wed, 7 Jan 2015 07:16:00 +0000 (07:16 +0000)]
mathml/mathml-in-dashboard.html fails on WebKit2 testers.

* platform/wk2/TestExpectations: Skip the test, setUseDashboardCompatibilityMode
is not implemented in WebKitTestRunner.

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

6 years agoMove 'content' CSS property to the new StyleBuilder
cdumez@apple.com [Wed, 7 Jan 2015 07:13:00 +0000 (07:13 +0000)]
Move 'content' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140169

Reviewed by Sam Weinig.

Move 'content' CSS property to the new StyleBuilder.

* css/CSSPropertyNames.in:
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialContent):
(WebCore::StyleBuilderCustom::applyInheritContent):
(WebCore::StyleBuilderCustom::applyValueContent):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):

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

6 years agoWeb Inspector: Do not style implicit CSS properties in the Style Rules section
commit-queue@webkit.org [Wed, 7 Jan 2015 07:03:17 +0000 (07:03 +0000)]
Web Inspector: Do not style implicit CSS properties in the Style Rules section
https://bugs.webkit.org/show_bug.cgi?id=140161

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

Previously, implicit properties being transparent in the Rules section
was confusing and not useful. Lets simplify what transparency means:

    - Rules:  transparency means a non-inheritable property in an inherited rule
    - Computed: transparency means an implicit value

* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.not-inherited):
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property:matches(.implicit, .not-inherited)): Deleted.

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

6 years agoMove 'webkit-mask-image' CSS property to the new StyleBuilder
cdumez@apple.com [Wed, 7 Jan 2015 06:35:54 +0000 (06:35 +0000)]
Move 'webkit-mask-image' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140168

Reviewed by Sam Weinig.

Move 'webkit-mask-image' CSS property to the new StyleBuilder.

* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertMaskImageOperations):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialWebkitMaskImage):
(WebCore::StyleBuilderCustom::applyInheritWebkitMaskImage):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::createMaskImageOperations): Deleted.
* css/StyleResolver.h:

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

6 years agoDrop ResourceResponseBase::connectionID and connectionReused members
cdumez@apple.com [Wed, 7 Jan 2015 03:23:54 +0000 (03:23 +0000)]
Drop ResourceResponseBase::connectionID and connectionReused members
https://bugs.webkit.org/show_bug.cgi?id=140158

Reviewed by Sam Weinig.

Drop ResourceResponseBase::connectionID and connectionReused members.
Those were needed by the Chromium port but are no longer used.

Source/JavaScriptCore:

* inspector/protocol/Network.json:

Source/WebCore:

* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForResourceResponse):
* page/PerformanceResourceTiming.cpp:
(WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
(WebCore::PerformanceResourceTiming::connectStart):
(WebCore::PerformanceResourceTiming::connectEnd):
* page/PerformanceResourceTiming.h:
* page/PerformanceTiming.cpp:
(WebCore::PerformanceTiming::connectStart):
(WebCore::PerformanceTiming::connectEnd):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::ResourceResponseBase):
(WebCore::ResourceResponseBase::connectionReused): Deleted.
(WebCore::ResourceResponseBase::setConnectionReused): Deleted.
(WebCore::ResourceResponseBase::connectionID): Deleted.
(WebCore::ResourceResponseBase::setConnectionID): Deleted.
* platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseBase::encode):
(WebCore::ResourceResponseBase::decode):

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

6 years agoWeb Inspector: Uncaught Exception when dismissing Go To Line dialog
commit-queue@webkit.org [Wed, 7 Jan 2015 02:56:49 +0000 (02:56 +0000)]
Web Inspector: Uncaught Exception when dismissing Go To Line dialog
https://bugs.webkit.org/show_bug.cgi?id=139663

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

Calling removeChild would trigger the blur event handler and do a
nested call of dismiss(), re-entering and removing while in the middle
of removing. Avoid re-entrancy to avoid the exception.

* UserInterface/Views/GoToLineDialog.js:
(WebInspector.GoToLineDialog):
(WebInspector.GoToLineDialog.prototype.dismiss):

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

6 years agoMove the 'alt' CSS property to the new StyleBuilder
cdumez@apple.com [Wed, 7 Jan 2015 02:36:48 +0000 (02:36 +0000)]
Move the 'alt' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140129

Reviewed by Darin Adler.

Move the 'alt' CSS property to the new StyleBuilder.

* css/CSSPropertyNames.in:
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueAlt):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* rendering/style/RenderStyle.h:

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

6 years agoMove '-webkit-text-size-adjust' CSS property to the new StyleBuilder
cdumez@apple.com [Wed, 7 Jan 2015 02:23:25 +0000 (02:23 +0000)]
Move '-webkit-text-size-adjust' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140157

Reviewed by Darin Adler.

Move '-webkit-text-size-adjust' CSS property to the new StyleBuilder.

* css/CSSPropertyNames.in:
* css/StyleBuilderCustom.h:
(WebCore::applyValueWebkitTextSizeAdjust):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):

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

6 years ago[CSS Masking][CSS Shapes] Large corner radii use with inset() clip-path are not prope...
bjonesbe@adobe.com [Wed, 7 Jan 2015 02:22:12 +0000 (02:22 +0000)]
[CSS Masking][CSS Shapes] Large corner radii use with inset() clip-path are not properly constrained
https://bugs.webkit.org/show_bug.cgi?id=140127

Reviewed by Darin Adler.

Source/WebCore:

Constrain large corner radii for inset() clip-path in the same way
that border-radii are constrained.

Test: fast/masking/clip-path-inset-large-radii.html

* rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeInset::path): Add radii constraint. Also reformat
    code a little to shut the style bot up.

LayoutTests:

* fast/masking/clip-path-inset-large-radii-expected.html: Added.
* fast/masking/clip-path-inset-large-radii.html: Added.

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

6 years agoOnly throttle DOM timers if they change CSS properties that cannot cause non-descenda...
cdumez@apple.com [Wed, 7 Jan 2015 02:08:23 +0000 (02:08 +0000)]
Only throttle DOM timers if they change CSS properties that cannot cause non-descendant elements to become visible
https://bugs.webkit.org/show_bug.cgi?id=140142

Reviewed by Darin Adler.

Source/WebCore:

Only throttle DOM timers if they change CSS properties that cannot cause
non-descendant elements to become visible. For example, a DOM timer may
change the height of an element that is outside the viewport. However,
changing its height may causes elements inside the viewport to move. As
such, we should NOT throttle such DOM timer.

With this patch, we only mark a repeating timer as candidate for
throttling if it is updating one of the following CSS properties:
left, right, top, bottom, webkit-transform, opacity.

Test: fast/dom/timer-height-change-no-throttling.html

* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::propertyChangeMayRepaintNonDescendants):
(WebCore::JSCSSStyleDeclaration::putDelegate):
* page/DOMTimer.cpp:
(WebCore::DOMTimer::scriptDidCauseElementRepaint):
* page/DOMTimer.h:

LayoutTests:

Add a layout test to make sure that a DOM timer changing the 'height'
property of an element outside the viewport does not get throttled.

* fast/dom/timer-height-change-no-throttling-expected.txt: Added.
* fast/dom/timer-height-change-no-throttling.html: Added.

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

6 years agoAdd utility method on FrameView that resumes animated images and unthrottles DOM...
cdumez@apple.com [Wed, 7 Jan 2015 02:06:19 +0000 (02:06 +0000)]
Add utility method on FrameView that resumes animated images and unthrottles DOM timers
https://bugs.webkit.org/show_bug.cgi?id=140151

Reviewed by Darin Adler.

Add utility method on FrameView that resumes animated images and
unthrottles DOM timers.

* dom/Document.cpp:
(WebCore::Document::recalcStyle):
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::viewportContentsChanged):
(WebCore::FrameView::scrollPositionChanged):
(WebCore::FrameView::performPostLayoutTasks):
* page/FrameView.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):

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

6 years agoDo not attempt to revalidate cached main resource on back/forward navigation
cdumez@apple.com [Wed, 7 Jan 2015 01:59:10 +0000 (01:59 +0000)]
Do not attempt to revalidate cached main resource on back/forward navigation
https://bugs.webkit.org/show_bug.cgi?id=139263

Reviewed by Darin Adler.

Source/WebCore:

Do not attempt to revalidate cached main resource on back/forward
navigation, as allowed by RFC2616 & newer RFC7234 which distinguish
history mechanisms and caches, stating:

   The freshness model (Section 4.2) does not necessarily apply to
   history mechanisms.  That is, a history mechanism can display a
   previous representation even if it has expired.

Previously, we would bypass revalidation on back/forward navigation
only for sub-resources. This patch extends this policy to the main
resource as well.

This behavior is also consistent with IE10+ and Chrome. It makes it more
likely we return cached content to the user on back/forward navigation
and avoids making network requests in this case.

Test: http/tests/cache/history-navigation-no-resource-revalidation.html

* loader/cache/CacheValidation.cpp:
(WebCore::redirectChainAllowsReuse):
* loader/cache/CacheValidation.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::redirectChainAllowsReuse):
Add a "ReuseExpiredRedirectionOrNot" flag argument because in the case
of an HistoryBuffer navigation, we don't mind reuse an expired
redirection. However, we still need to make sure that the redirection
is actually cached before reusing it.

* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::determineRevalidationPolicy):
- Do the redirectChainAllowsReuse() check *before* checking if the cache
  policy is CachePolicyHistoryBuffer. This is needed because
  redirectChainAllowsReuse() will return false if the redirection is not
  cached. Loading from the cache in this case will cause us to load the
  wrong resource (the one before the redirection). This case is covered
  by http/tests/navigation/redirect-on-reload-updates-history-item.html.
- Do not use the cached main resource if it has "cache-control: no-store",
  even if it is a history navigation (cachePolicy is
  CachePolicyHistoryBuffer). This maintains the previous behavior, and
  some layout tests rely on this. We now have to be explicit about it
  because cachePolicy() can now return CachePolicyHistoryBuffer for the
  main resource (not just sub-resources). This difference in behavior
  on history navigation for the main resource and sub-resources is not
  great. However, I chose to maintain this pre-existing behavior in this
  patch to do one behavior change at a time. We can harmonize this later.

Previously, the order was not an issue because the main resource was
always revalidated on back/forward navigation.

(WebCore::CachedResourceLoader::cachePolicy):
Return CachePolicyHistoryBuffer for the main resource in case of
history navigation, instead of CachePolicyVerify so that we don't
attempt to revalidate.

LayoutTests:

Add layout test to make sure we don't attempt to revalidate a cached
main resource on back/forward navigation.

* http/tests/cache/history-navigation-no-resource-revalidation-expected.txt: Added.
* http/tests/cache/history-navigation-no-resource-revalidation.html: Added.
* http/tests/cache/resources/history-back.html: Renamed from LayoutTests/http/tests/cache/resources/no-store-resource-forward.html.
* http/tests/cache/resources/max-age-resource-forward.html: Removed.
* http/tests/cache/resources/max-age-resource.html:
* http/tests/cache/resources/no-cache-main-resource-next.php: Added.
* http/tests/cache/resources/no-cache-main-resource.php: Copied from LayoutTests/http/tests/cache/resources/no-store-resource.html.

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

6 years agoUnreviewed, rolling out r177988.
commit-queue@webkit.org [Wed, 7 Jan 2015 01:57:00 +0000 (01:57 +0000)]
Unreviewed, rolling out r177988.
https://bugs.webkit.org/show_bug.cgi?id=140159

mysteriously broke 2 tests (Requested by kling on #webkit).

Reverted changeset:

"Pack WebCore::RuleData better."
https://bugs.webkit.org/show_bug.cgi?id=140109
http://trac.webkit.org/changeset/177988

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

6 years agoSetting '-webkit-filter' to 'brightness(calc(10% * 2))' does not work
cdumez@apple.com [Wed, 7 Jan 2015 01:54:37 +0000 (01:54 +0000)]
Setting '-webkit-filter' to 'brightness(calc(10% * 2))' does not work
https://bugs.webkit.org/show_bug.cgi?id=140149

Reviewed by Darin Adler.

Source/WebCore:

Setting '-webkit-filter' to 'brightness(calc(10% * 2))' was not working
because the CSS parser did not handle calculated values inside
brightness(). This patch addresses the issue.

Test: fast/css/webkit-filter-calc.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseBuiltinFilterArguments):

LayoutTests:

Update the -webkit-filter calculated value test to cover brightness()
function as well.

* fast/css/webkit-filter-calc-expected.txt:
* fast/css/webkit-filter-calc.html:

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

6 years agoAssertion in RenderGeometryMap::mapToContainer with LayoutUnit overflow.
zalan@apple.com [Wed, 7 Jan 2015 01:22:09 +0000 (01:22 +0000)]
Assertion in RenderGeometryMap::mapToContainer with LayoutUnit overflow.
https://bugs.webkit.org/show_bug.cgi?id=108619
rdar://problem/19391214

Use only FloatQuad in RenderGeometryMap::mapToContainer.

Due to the difference in the internal representation of FloatRect and FloatQuad,
with certain float values, converting FloatRect to FloatQuad and back
to FloatRect could produce a slightly different rect.

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/block/geometry-map-assertion-with-tall-content.html

* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::mapToContainer):

LayoutTests:

* fast/block/geometry-map-assertion-with-tall-content-expected.txt: Added.
* fast/block/geometry-map-assertion-with-tall-content.html: Added.

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

6 years agoAdd the lexicalEnvironment as an operand to op_create_arguments.
mark.lam@apple.com [Wed, 7 Jan 2015 01:03:25 +0000 (01:03 +0000)]
Add the lexicalEnvironment as an operand to op_create_arguments.
<https://webkit.org/b/140148>

Reviewed by Geoffrey Garen.

This patch only adds the operand to the bytecode.  It is not in use yet.

* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::createArgumentsIfNecessary):
- Adds the lexicalEnvironment register (if present) as an operand to
  op_create_arguments.  Else, adds a constant empty JSValue.
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:

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

6 years agoTry to fix the Mountain Lion build.
andersca@apple.com [Wed, 7 Jan 2015 00:45:14 +0000 (00:45 +0000)]
Try to fix the Mountain Lion build.

* TestWebKitAPI/Tests/WebKit2/FindMatches.mm:
(TestWebKitAPI::didGetImageForMatchResult):

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

6 years agoAllow MathML in dashboard compatibility mode
weinig@apple.com [Wed, 7 Jan 2015 00:34:17 +0000 (00:34 +0000)]
Allow MathML in dashboard compatibility mode
https://bugs.webkit.org/show_bug.cgi?id=140153

Reviewed by Alexey Proskuryakov.

Source/WebCore:

In what seems like an accident due to the way we used to disable SVG in
dashboard, MathML has been disable in dashboard compatibility mode. There
does not seem to be any reason to keep this accidental quirk.

Test: mathml/mathml-in-dashboard.html

* dom/make_names.pl:
(printFactoryCppFile):

LayoutTests:

* mathml/mathml-in-dashboard-expected.txt: Added.
* mathml/mathml-in-dashboard.html: Added.
* platform/mac/mathml/mathml-in-dashboard-expected.png: Added.

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

6 years agoDebug ASan builds frequently crash in Register::jsValue under DFG::prepareOSREntry
ap@apple.com [Wed, 7 Jan 2015 00:26:01 +0000 (00:26 +0000)]
Debug ASan builds frequently crash in Register::jsValue under DFG::prepareOSREntry
https://bugs.webkit.org/show_bug.cgi?id=140095

Reviewed by Anders Carlsson.

* asan/webkit-asan-ignore.txt: Blacklist a function that gets inlined in release
builds, but not in debug ones.

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

6 years agoFix this test to wait for the load event before dumping. Expected image
simon.fraser@apple.com [Wed, 7 Jan 2015 00:20:06 +0000 (00:20 +0000)]
Fix this test to wait for the load event before dumping. Expected image
changes.

* compositing/images/content-image-change.html:
* platform/mac/compositing/images/content-image-change-expected.png:

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

6 years agoView state change callbacks are sometimes dropped on the floor
timothy_horton@apple.com [Wed, 7 Jan 2015 00:18:40 +0000 (00:18 +0000)]
View state change callbacks are sometimes dropped on the floor
https://bugs.webkit.org/show_bug.cgi?id=140156
<rdar://problem/19255417>

Reviewed by Anders Carlsson.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::dispatchViewStateChange):
Always send SetViewState to the Web process if we have any
registered view state change callbacks. Otherwise, if nothing changed,
we can end up never calling the callback.

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

6 years agoSome composting reflections tests are broken
simon.fraser@apple.com [Wed, 7 Jan 2015 00:08:36 +0000 (00:08 +0000)]
Some composting reflections tests are broken
https://bugs.webkit.org/show_bug.cgi?id=139889

Reviewed by Tim Horton.

Source/WebCore:

When creating layer clones for reflections, we'd clobber the layer background
color via resetting the custom appearance on the clone. Fix by having
PlatformCALayerMac::updateCustomAppearance() only do work when the appearance changes.

Some other drive-by nullptr changes, and include layer IDs in debug layer names.

Covered by existing pixel tests.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setName):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::updateCustomAppearance):
(PlatformCALayerMac::tiledBacking):

LayoutTests:

New image baselines.

* platform/mac/compositing/reflections/animation-inside-reflection-expected.png:
* platform/mac/compositing/reflections/compositing-change-inside-reflection-expected.png:
* platform/mac/compositing/reflections/masked-reflection-on-composited-expected.png:
* platform/mac/compositing/reflections/reflection-opacity-expected.png:
* platform/mac/compositing/reflections/transform-inside-reflection-expected.png:

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

6 years ago[Win] Extend WinLauncher with support for Page Zoom
bfulgham@apple.com [Tue, 6 Jan 2015 23:40:04 +0000 (23:40 +0000)]
[Win] Extend WinLauncher with support for Page Zoom
https://bugs.webkit.org/show_bug.cgi?id=140152

Reviewed by Anders Carlsson.

* WinLauncher/Common.cpp:
(WndProc):
* WinLauncher/WinLauncher.cpp:
(WinLauncher::resetZoom):
(WinLauncher::zoomIn):
(WinLauncher::zoomOut):
* WinLauncher/WinLauncher.h:
* WinLauncher/WinLauncher.vcxproj/WinLauncherLib.rc:
* WinLauncher/WinLauncher.vcxproj/WinLauncherLibResource.h:
* win/DLLLauncher/DLLLauncherMain.cpp:
(wWinMain):

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

6 years agoReplace some pixel results that were generated on Linux with no alpha with images
simon.fraser@apple.com [Tue, 6 Jan 2015 23:03:31 +0000 (23:03 +0000)]
Replace some pixel results that were generated on Linux with no alpha with images
having alpha, generated on Mac, since the canonical expected image format should have alpha.

* compositing/absolute-position-changed-in-composited-layer-expected.png:
* compositing/absolute-position-changed-with-composited-parent-layer-expected.png:
* compositing/backface-visibility/backface-visibility-image-expected.png:
* compositing/backface-visibility/backface-visibility-simple-expected.png:
* compositing/backface-visibility/backface-visibility-webgl-expected.png:
* compositing/checkerboard-expected.png:
* compositing/clip-change-expected.png: Removed.
* compositing/culling/clear-fixed-iframe-expected.png:
* compositing/culling/filter-occlusion-alpha-expected.png:
* compositing/culling/filter-occlusion-alpha-large-expected.png:
* compositing/culling/scrolled-within-boxshadow-expected.png:
* compositing/culling/tile-occlusion-boundaries-expected.png:
* compositing/culling/translated-boxshadow-expected.png:
* compositing/culling/unscrolled-within-boxshadow-expected.png:
* compositing/fixed-position-changed-in-composited-layer-expected.png:
* compositing/fixed-position-changed-within-composited-parent-layer-expected.png:
* compositing/geometry/foreground-offset-change-expected.png: Removed.
* compositing/iframes/fixed-position-iframe-expected.png: Removed.
* compositing/iframes/invisible-iframe-expected.png:
* compositing/iframes/invisible-nested-iframe-expected.png:
* compositing/iframes/nested-composited-iframe-expected.png:
* compositing/iframes/scroll-grandchild-iframe-expected.png: Removed.
* compositing/layer-creation/overlap-child-layer-expected.png:
* compositing/layer-creation/overlap-transformed-layer-expected.png:
* compositing/overflow/image-load-overflow-scrollbars-expected.png:
* compositing/overflow/scrollbars-with-clipped-owner-expected.png:
* compositing/overflow/transform-in-empty-container-expected.png:
* compositing/preserve-3d-toggle-expected.png:
* compositing/repaint/page-scale-repaint-expected.png: Removed.
* compositing/repaint/shrink-layer-expected.png: Removed.
* compositing/repaint/transform-style-change-expected.png: Removed.
* compositing/rtl/rtl-absolute-expected.png:
* compositing/rtl/rtl-absolute-overflow-expected.png:
* compositing/rtl/rtl-absolute-overflow-scrolled-expected.png: Removed.
* compositing/rtl/rtl-fixed-expected.png:
* compositing/rtl/rtl-fixed-overflow-expected.png:
* compositing/rtl/rtl-fixed-overflow-scrolled-expected.png: Removed.
* compositing/rtl/rtl-iframe-absolute-expected.png:
* compositing/rtl/rtl-iframe-absolute-overflow-expected.png:
* compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.png: Removed.
* compositing/rtl/rtl-iframe-fixed-expected.png: Removed.
* compositing/rtl/rtl-iframe-fixed-overflow-expected.png: Removed.
* compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.png: Removed.
* compositing/rtl/rtl-iframe-relative-expected.png: Removed.
* compositing/rtl/rtl-overflow-invalidation-expected.png: Removed.
* compositing/rtl/rtl-overflow-scrolling-expected.png: Removed.
* compositing/rtl/rtl-relative-expected.png: Removed.
* compositing/scrollbar-painting-expected.png:
* compositing/tiling/huge-layer-img-expected.png:
* compositing/video-page-visibility-expected.png: Removed.
* compositing/video/video-reflection-expected.png:
* compositing/visibility/visibility-composited-animation-expected.png:
* compositing/webgl/webgl-repaint-expected.png:
* platform/mac/compositing/video/video-controls-layer-creation-expected.png:

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

6 years agoUpdate pixel results for some compositing tests.
simon.fraser@apple.com [Tue, 6 Jan 2015 23:03:26 +0000 (23:03 +0000)]
Update pixel results for some compositing tests.

* compositing/images/direct-pdf-image-expected.png:
* compositing/layer-creation/fixed-position-and-transform-expected.png:
* compositing/layer-creation/fixed-position-under-transform-expected.png:
* compositing/overflow/clip-content-under-overflow-controls-expected.png:
* platform/mac/compositing/animation/state-at-end-event-transform-layer-expected.png:
* platform/mac/compositing/color-matching/image-color-matching-expected.png:
* platform/mac/compositing/color-matching/pdf-image-match-expected.png:
* platform/mac/compositing/compositing-visible-descendant-expected.png:
* platform/mac/compositing/culling/filter-occlusion-blur-expected.png: Added.
* platform/mac/compositing/culling/filter-occlusion-blur-large-expected.png: Added.
* platform/mac/compositing/direct-image-compositing-expected.png:
* platform/mac/compositing/fixed-position-scroll-offset-history-restore-expected.png: Added.
* platform/mac/compositing/generated-content-expected.png:
* platform/mac/compositing/geometry/abs-position-inside-opacity-expected.png:
* platform/mac/compositing/geometry/clipping-foreground-expected.png:
* platform/mac/compositing/geometry/composited-html-size-expected.png:
* platform/mac/compositing/geometry/fixed-in-composited-expected.png:
* platform/mac/compositing/geometry/fixed-position-expected.png:
* platform/mac/compositing/geometry/foreground-layer-expected.png:
* platform/mac/compositing/geometry/layer-due-to-layer-children-deep-expected.png:
* platform/mac/compositing/geometry/layer-due-to-layer-children-expected.png:
* platform/mac/compositing/geometry/negative-text-indent-with-overflow-hidden-layer-expected.png: Added.
* platform/mac/compositing/geometry/outline-change-expected.png:
* platform/mac/compositing/geometry/partial-layout-update-expected.png:
* platform/mac/compositing/geometry/root-layer-update-expected.png:
* platform/mac/compositing/geometry/transfrom-origin-on-zero-size-layer-expected.png:
* platform/mac/compositing/geometry/video-fixed-scrolling-expected.png:
* platform/mac/compositing/geometry/video-opacity-overlay-expected.png:
* platform/mac/compositing/iframes/composited-iframe-alignment-expected.png:
* platform/mac/compositing/iframes/iframe-copy-on-scroll-expected.png:
* platform/mac/compositing/images/direct-image-background-color-expected.png:
* platform/mac/compositing/layers-inside-overflow-scroll-expected.png:
* platform/mac/compositing/masks/direct-image-mask-expected.png:
* platform/mac/compositing/masks/masked-ancestor-expected.png:
* platform/mac/compositing/masks/multiple-masks-expected.png:
* platform/mac/compositing/masks/simple-composited-mask-expected.png:
* platform/mac/compositing/overflow/ancestor-overflow-expected.png:
* platform/mac/compositing/overflow/clipping-ancestor-with-accelerated-scrolling-ancestor-expected.png: Added.
* platform/mac/compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents-expected.png: Added.
* platform/mac/compositing/overflow/fixed-position-ancestor-clip-expected.png:
* platform/mac/compositing/overflow/nested-scrolling-expected.png: Added.
* platform/mac/compositing/overflow/overflow-clip-with-accelerated-scrolling-ancestor-expected.png: Added.
* platform/mac/compositing/overflow/overflow-compositing-descendant-expected.png:
* platform/mac/compositing/overflow/overflow-positioning-expected.png:
* platform/mac/compositing/overflow/overflow-scroll-expected.png:
* platform/mac/compositing/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer-expected.png: Added.
* platform/mac/compositing/overflow/parent-overflow-expected.png:
* platform/mac/compositing/overflow/remove-overflow-crash2-expected.png: Added.
* platform/mac/compositing/overflow/scroll-ancestor-update-expected.png:
* platform/mac/compositing/overflow/scrollbar-painting-expected.png:
* platform/mac/compositing/plugins/composited-plugin-expected.png:
* platform/mac/compositing/reflections/deeply-nested-reflections-expected.png:
* platform/mac/compositing/reflections/nested-reflection-anchor-point-expected.png:
* platform/mac/compositing/reflections/nested-reflection-animated-expected.png:
* platform/mac/compositing/reflections/nested-reflection-expected.png:
* platform/mac/compositing/reflections/nested-reflection-mask-change-expected.png:
* platform/mac/compositing/reflections/nested-reflection-opacity-expected.png:
* platform/mac/compositing/reflections/nested-reflection-size-change-expected.png:
* platform/mac/compositing/reflections/nested-reflection-transformed-expected.png:
* platform/mac/compositing/reflections/nested-reflection-transformed2-expected.png:
* platform/mac/compositing/reflections/nested-reflection-transition-expected.png:
* platform/mac/compositing/reflections/reflection-in-composited-expected.png:
* platform/mac/compositing/reflections/reflection-on-composited-expected.png:
* platform/mac/compositing/reflections/reflection-ordering-expected.png:
* platform/mac/compositing/reflections/reflection-positioning-expected.png:
* platform/mac/compositing/reflections/reflection-positioning2-expected.png:
* platform/mac/compositing/reflections/simple-composited-reflections-expected.png:
* platform/mac/compositing/repaint/become-overlay-composited-layer-expected.png:
* platform/mac/compositing/repaint/composited-document-element-expected.png:
* platform/mac/compositing/repaint/layer-repaint-expected.png:
* platform/mac/compositing/repaint/layer-repaint-rects-expected.png:
* platform/mac/compositing/repaint/opacity-between-absolute-expected.png:
* platform/mac/compositing/repaint/opacity-between-absolute2-expected.png:
* platform/mac/compositing/repaint/repaint-on-layer-grouping-change-expected.png: Added.
* platform/mac/compositing/self-painting-layers-expected.png:
* platform/mac/compositing/shadows/shadow-drawing-expected.png:
* platform/mac/compositing/sibling-positioning-expected.png:
* platform/mac/compositing/text-on-large-layer-expected.png:
* platform/mac/compositing/transitions/scale-transition-no-start-expected.png:
* platform/mac/compositing/transitions/singular-scale-transition-expected.png:
* platform/mac/compositing/webgl/webgl-background-color-expected.png:
* platform/mac/compositing/webgl/webgl-no-alpha-expected.png:

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

6 years agoFix API tests that are broken under HiDPI
andersca@apple.com [Tue, 6 Jan 2015 22:47:58 +0000 (22:47 +0000)]
Fix API tests that are broken under HiDPI
https://bugs.webkit.org/show_bug.cgi?id=140146

Reviewed by Tim Horton.

* TestWebKitAPI/Tests/WebKit2/FindMatches.mm:
(TestWebKitAPI::didGetImageForMatchResult):
NSImages are measured in points, so grab the underlying bitmap image and get its size in pixels.

* TestWebKitAPI/Tests/mac/DeviceScaleFactorOnBack.mm:
(TestWebKitAPI::DeviceScaleFactorOnBack::runTest):
Don't assume that a web view not in a window has a backing scale factor of 1. Instead, always have web views start
out in a window that has a backing scale factor of 1.

* TestWebKitAPI/Tests/mac/DynamicDeviceScaleFactor.mm:
(TestWebKitAPI::DynamicDeviceScaleFactor::runTest):
Ditto.

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

6 years agoModernize the HTMLElement factory
weinig@apple.com [Tue, 6 Jan 2015 22:32:48 +0000 (22:32 +0000)]
Modernize the HTMLElement factory
https://bugs.webkit.org/show_bug.cgi?id=140063

Reviewed by Darin Adler.

Make the HTMLElement (and derived classes) create functions
and HTMLElementFactory return Refs rather than RefPtr/PassRefPtr.

* Files elided *

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

6 years agoADDRESS_SANITIZER macro is overloaded
ap@apple.com [Tue, 6 Jan 2015 22:24:15 +0000 (22:24 +0000)]
ADDRESS_SANITIZER macro is overloaded
https://bugs.webkit.org/show_bug.cgi?id=140130

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

* interpreter/JSStack.cpp: (JSC::JSStack::sanitizeStack): Use the new macro.
This code is nearly unused (only compiled in when JIT is disabled at build time),
however I've been told that it's best to keep it.

Source/WebCore:

* platform/RefCountedSupplement.h:
* platform/Supplementable.h:
Change the conditional to ENABLE(SECURITY_ASSERTIONS). These checks will be used
in debug builds, and also when one explicitly passes -DENABLE_SECURITY_ASSERTIONS.

Source/WTF:

* wtf/Compiler.h: Added an ASAN_ENABLED macro. The abbreviation should become well
known - we already use it in tools.

* wtf/Assertions.h:
* wtf/RefCounted.h:
* wtf/SizeLimits.cpp:
Change the conditional to ENABLE(SECURITY_ASSERTIONS). These checks will be used
in debug builds, and also when one explicitly passes -DENABLE_SECURITY_ASSERTIONS.

Tools:

* WebKitTestRunner/TestController.cpp: Use the new macro.

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

6 years agoFix Use details for op_create_arguments.
mark.lam@apple.com [Tue, 6 Jan 2015 21:58:12 +0000 (21:58 +0000)]
Fix Use details for op_create_arguments.
<https://webkit.org/b/140110>

Rubber stamped by Filip Pizlo.

The previous patch was wrong about op_create_arguments not using its 1st operand.
It does read from it (hence, used) to check if the Arguments object has already
been created or not.  This patch reverts the change for op_create_arguments.

* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):

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

6 years agoWeb Inspector: pass parameters to inspector agents by reference where possible
burg@cs.washington.edu [Tue, 6 Jan 2015 21:45:08 +0000 (21:45 +0000)]
Web Inspector: pass parameters to inspector agents by reference where possible
https://bugs.webkit.org/show_bug.cgi?id=140002

Reviewed by Andreas Kling.

Pass parameters by-reference from inspector instrumentation entry
points to inspector agents. If the event doesn't make sense with null
arguments, perform null checks before calling agent methods.

No new tests, no behavior changed.

* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::didCreateNamedFlow):
(WebCore::InspectorCSSAgent::willRemoveNamedFlow):
(WebCore::InspectorCSSAgent::didChangeRegionOverset):
(WebCore::InspectorCSSAgent::didRegisterNamedFlowContentElement):
(WebCore::InspectorCSSAgent::didUnregisterNamedFlowContentElement):
(WebCore::InspectorCSSAgent::forcePseudoState):
* inspector/InspectorCSSAgent.h: Reorder methods to match instrumentation.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::handleTouchEvent):
(WebCore::InspectorDOMAgent::didInsertDOMNode):
(WebCore::InspectorDOMAgent::didRemoveDOMNode):
(WebCore::InspectorDOMAgent::willModifyDOMAttr):
(WebCore::InspectorDOMAgent::didModifyDOMAttr):
(WebCore::InspectorDOMAgent::didRemoveDOMAttr):
(WebCore::InspectorDOMAgent::characterDataModified):
(WebCore::InspectorDOMAgent::didInvalidateStyleAttr):
(WebCore::InspectorDOMAgent::didPushShadowRoot):
(WebCore::InspectorDOMAgent::willPopShadowRoot):
* inspector/InspectorDOMAgent.h: Reorder methods to match instrumentation.
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
(WebCore::InspectorDOMDebuggerAgent::didInsertDOMNode):
(WebCore::InspectorDOMDebuggerAgent::didRemoveDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr):
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
(WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
(WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
(WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
(WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
(WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
(WebCore::InspectorInstrumentation::didModifyDOMAttrImpl):
(WebCore::InspectorInstrumentation::didRemoveDOMAttrImpl):
(WebCore::InspectorInstrumentation::didInvalidateStyleAttrImpl):
(WebCore::InspectorInstrumentation::didPushShadowRootImpl):
(WebCore::InspectorInstrumentation::willPopShadowRootImpl):
(WebCore::InspectorInstrumentation::didCreateNamedFlowImpl): Add null check.
(WebCore::InspectorInstrumentation::willRemoveNamedFlowImpl): Add null check.
(WebCore::InspectorInstrumentation::didChangeRegionOversetImpl):
(WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElementImpl):
(WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElementImpl):
(WebCore::InspectorInstrumentation::handleTouchEventImpl):
(WebCore::InspectorInstrumentation::forcePseudoStateImpl):
(WebCore::InspectorInstrumentation::characterDataModifiedImpl):
(WebCore::InspectorInstrumentation::willEvaluateScriptImpl):
(WebCore::InspectorInstrumentation::didEvaluateScriptImpl):
(WebCore::InspectorInstrumentation::didInvalidateLayoutImpl):
(WebCore::InspectorInstrumentation::willLayoutImpl):
(WebCore::InspectorInstrumentation::willPaintImpl):
(WebCore::InspectorInstrumentation::willScrollLayerImpl):
(WebCore::InspectorInstrumentation::didScheduleStyleRecalculationImpl):
(WebCore::InspectorInstrumentation::applyEmulatedMediaImpl):
(WebCore::InspectorInstrumentation::willSendRequestImpl): Add null check.
(WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl): Add null checks.
(WebCore::InspectorInstrumentation::willReceiveResourceResponseImpl):  Add null check.
(WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
(WebCore::InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl): Add null check.
(WebCore::InspectorInstrumentation::didFinishLoadingImpl): Add null check.
(WebCore::InspectorInstrumentation::didFailLoadingImpl): Add null check.
(WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl):
(WebCore::InspectorInstrumentation::loadEventFiredImpl): Add null check.
(WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
(WebCore::InspectorInstrumentation::didCommitLoadImpl): Add null checks.
(WebCore::InspectorInstrumentation::loaderDetachedFromFrameImpl):
(WebCore::InspectorInstrumentation::willDestroyCachedResourceImpl):
(WebCore::InspectorInstrumentation::startConsoleTimingImpl):
(WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
(WebCore::InspectorInstrumentation::consoleTimeStampImpl):
(WebCore::InspectorInstrumentation::didCreateWebSocketImpl): Add null check.
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl): Add null check.
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl): Add null check.
(WebCore::InspectorInstrumentation::didCloseWebSocketImpl): Add null check.
(WebCore::InspectorInstrumentation::renderLayerDestroyedImpl):
(WebCore::InspectorInstrumentation::pseudoElementDestroyedImpl):
(WebCore::InspectorInstrumentation::scriptsEnabledImpl): Deleted.
(WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClientImpl): Deleted.
(WebCore::InspectorInstrumentation::frameStartedLoadingImpl): Deleted.
(WebCore::InspectorInstrumentation::willWriteHTMLImpl): Deleted.
(WebCore::InspectorInstrumentation::startProfilingImpl): Deleted.
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::renderLayerDestroyed):
(WebCore::InspectorLayerTreeAgent::pseudoElementDestroyed):
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::frameDetached):
(WebCore::InspectorPageAgent::loaderDetachedFromFrame):
(WebCore::InspectorPageAgent::applyEmulatedMedia):
* inspector/InspectorPageAgent.h:
* inspector/InspectorReplayAgent.cpp:
(WebCore::InspectorReplayAgent::frameDetached):
* inspector/InspectorReplayAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willSendRequest):
(WebCore::InspectorResourceAgent::didReceiveResponse):
(WebCore::InspectorResourceAgent::didFinishLoading):
(WebCore::InspectorResourceAgent::didFailLoading):
(WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
(WebCore::InspectorResourceAgent::willDestroyCachedResource):
(WebCore::InspectorResourceAgent::didScheduleStyleRecalculation):
(WebCore::InspectorResourceAgent::mainFrameNavigated):
* inspector/InspectorResourceAgent.h: Reorder methods to match instrumentation.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::didInvalidateLayout):
(WebCore::InspectorTimelineAgent::willLayout):
(WebCore::InspectorTimelineAgent::willPaint):
(WebCore::InspectorTimelineAgent::willScroll):
(WebCore::InspectorTimelineAgent::willEvaluateScript):
(WebCore::InspectorTimelineAgent::didEvaluateScript):
(WebCore::InspectorTimelineAgent::didTimeStamp):
(WebCore::InspectorTimelineAgent::time):
(WebCore::InspectorTimelineAgent::timeEnd):
(WebCore::InspectorTimelineAgent::didMarkDOMContentEvent):
(WebCore::InspectorTimelineAgent::didMarkLoadEvent):
* inspector/InspectorTimelineAgent.h: Reorder methods to match instrumentation.
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::didCreateMainWorldContext):
(WebCore::PageRuntimeAgent::didCreateIsolatedContext): Deleted. It has no callers.
* inspector/PageRuntimeAgent.h:
* replay/ReplayController.cpp:
(WebCore::ReplayController::frameDetached):
* replay/ReplayController.h:

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

6 years agoRemove an old workaround for an old unsupported plug-in
andersca@apple.com [Tue, 6 Jan 2015 21:37:46 +0000 (21:37 +0000)]
Remove an old workaround for an old unsupported plug-in
https://bugs.webkit.org/show_bug.cgi?id=140141

Reviewed by Brent Fulgham.

The old, pre-Vista(!) plug-in is no longer available so we don't need to have this workaround in place.
(If for some bizarre reason we'd ever want to bring it back it should be a flag that the plug-in code sets on the timer,
the shared timer code shouldn't know about plug-ins at all).

* platform/win/SharedTimerWin.cpp:
(WebCore::TimerWindowWndProc):

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

6 years agoPack WebCore::RuleData better.
akling@apple.com [Tue, 6 Jan 2015 21:20:33 +0000 (21:20 +0000)]
Pack WebCore::RuleData better.
<https://webkit.org/b/140109>

Reviewed by Benjamin Poulain.

Shrink RuleData by 8 bytes per instance by reordering members so that
the CSS JIT compilation status fits into the bitfield.

* css/RuleSet.h:
(WebCore::RuleData::compilationStatus):
* cssjit/SelectorCompiler.h:
(WebCore::SelectorCompilationStatus::SelectorCompilationStatus):

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

6 years agoReimplement NPN_PluginThreadAsyncCall without using PluginMainThreadScheduler
andersca@apple.com [Tue, 6 Jan 2015 20:43:22 +0000 (20:43 +0000)]
Reimplement NPN_PluginThreadAsyncCall without using PluginMainThreadScheduler
https://bugs.webkit.org/show_bug.cgi?id=140140

Reviewed by Andreas Kling.

Just use a dispatch_async call to the main queue. This will let us move PluginMainThreadScheduler
out of WebCore since nobody else is using it.

* Plugins/WebNetscapePluginView.h:
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView _createPlugin]):
(-[WebNetscapePluginView _destroyPlugin]):
* Plugins/npapi.mm:
(NPN_PluginThreadAsyncCall):

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

6 years agoAdd a WebKit1 database provider
andersca@apple.com [Tue, 6 Jan 2015 20:09:53 +0000 (20:09 +0000)]
Add a WebKit1 database provider
https://bugs.webkit.org/show_bug.cgi?id=140126

Reviewed by Sam Weinig.

Source/WebCore:

Use a Ref instead of a RefPtr since the database provider can never be null now.

* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
(WebCore::DOMWindowIndexedDatabase::indexedDB):
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
(WebCore::Page::databaseProvider):

Source/WebKit:

Add a stubbed out database provider.

* Storage/WebDatabaseProvider.cpp: Added.
(WebDatabaseProvider::shared):
(WebDatabaseProvider::WebDatabaseProvider):
(WebDatabaseProvider::~WebDatabaseProvider):
(WebDatabaseProvider::createIDBFactoryBackend):
* Storage/WebDatabaseProvider.h: Added.
* WebKit.vcxproj/WebKit/WebKit.vcxproj:
* WebKit.vcxproj/WebKit/WebKit.vcxproj.filters:
* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

Set the database provider.

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):

Source/WebKit/win:

Set the database provider.

* WebView.cpp:
(WebView::initWithFrame):

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

6 years agoREGRESSION (r177876): 35% regression in Parser/html5-full-render
antti@apple.com [Tue, 6 Jan 2015 20:06:28 +0000 (20:06 +0000)]
REGRESSION (r177876): 35% regression in Parser/html5-full-render
https://bugs.webkit.org/show_bug.cgi?id=140123

Followup fix.

* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::systemFallbackFontDataForCharacter):

    The code failed to pass isForPlatformFont boolean.

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

6 years agoUnreviewed, rolling out r177963.
commit-queue@webkit.org [Tue, 6 Jan 2015 19:43:33 +0000 (19:43 +0000)]
Unreviewed, rolling out r177963.
https://bugs.webkit.org/show_bug.cgi?id=140136

Caused lots of crashes (Requested by smfr on #webkit).

Reverted changeset:

"Add a WebKit1 database provider"
https://bugs.webkit.org/show_bug.cgi?id=140126
http://trac.webkit.org/changeset/177963

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

6 years agoFix Use details for op_create_lexical_environment and op_create_arguments.
mark.lam@apple.com [Tue, 6 Jan 2015 19:39:05 +0000 (19:39 +0000)]
Fix Use details for op_create_lexical_environment and op_create_arguments.
<https://webkit.org/b/140110>

Reviewed by Filip Pizlo.

The current "Use" details for op_create_lexical_environment and
op_create_arguments are wrong.  op_create_argument uses nothing instead of the
1st operand (the output local).  op_create_lexical_environment uses its 2nd
operand (the scope chain) instead of the 1st (the output local).
This patch fixes them to specify the proper uses.

* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):

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

6 years agoREGRESSION (r177876): 35% regression in Parser/html5-full-render
antti@apple.com [Tue, 6 Jan 2015 19:37:42 +0000 (19:37 +0000)]
REGRESSION (r177876): 35% regression in Parser/html5-full-render
https://bugs.webkit.org/show_bug.cgi?id=140123

Reviewed by Darin Adler.

Resolving system fallbacks is extremely slow. GlyphPageTree used to cache them globally.

This patch brings back a simple global cache for system fallbacks.

* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::~SimpleFontData):
(WebCore::systemFallbackCache):
(WebCore::SimpleFontData::systemFallbackFontDataForCharacter):
(WebCore::SimpleFontData::removeFromSystemFallbackCache):
* platform/graphics/SimpleFontData.h:

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

6 years agoImplement ES6 String.prototype.repeat(count)
utatane.tea@gmail.com [Tue, 6 Jan 2015 19:33:19 +0000 (19:33 +0000)]
Implement ES6 String.prototype.repeat(count)
https://bugs.webkit.org/show_bug.cgi?id=140047

Reviewed by Darin Adler.

Source/JavaScriptCore:

Introducing ES6 String.prototype.repeat(count) function.

* runtime/JSString.h:
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):
(JSC::repeatSmallString):
(JSC::stringProtoFuncRepeat):

LayoutTests:

* js/Object-getOwnPropertyNames-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:
* js/script-tests/string-repeat.js: Added.
(stringRepeated.toString):
(count.valueOf):
* js/string-repeat-expected.txt: Added.
* js/string-repeat.html: Added.

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

6 years agoRename SimpleFontData::AdditionalFontData to SimpleFontData::SVGData
antti@apple.com [Tue, 6 Jan 2015 19:21:28 +0000 (19:21 +0000)]
Rename SimpleFontData::AdditionalFontData to SimpleFontData::SVGData
https://bugs.webkit.org/show_bug.cgi?id=140124

Reviewed by Anders Carlsson.

The current name is vague and confusing (as AdditionalFontData is not a FontData).

* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::glyphDataForCharacter):
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::SimpleFontData):
(WebCore::SimpleFontData::~SimpleFontData):
(WebCore::fillGlyphPage):
(WebCore::SimpleFontData::createScaledFontData):
* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::widthForGlyph):
* rendering/svg/SVGTextLayoutEngineSpacing.cpp:
(WebCore::SVGTextLayoutEngineSpacing::calculateSVGKerning):
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::svgFontAndFontFaceElementForFontData):
* svg/SVGFontData.h:

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

6 years agoMake explicit which TextIndicator animations are driven manually, and which run autom...
timothy_horton@apple.com [Tue, 6 Jan 2015 19:09:31 +0000 (19:09 +0000)]
Make explicit which TextIndicator animations are driven manually, and which run automatically
https://bugs.webkit.org/show_bug.cgi?id=140113
<rdar://problem/19383425>

Reviewed by Darin Adler.

* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformDictionaryLookup):
Delete an inaccurate comment.

* page/TextIndicator.cpp:
(WebCore::TextIndicator::wantsManualAnimation):
Add wantsManualAnimation(). The old transitions (Bounce and BounceAndCrossfade)
run automatically, and the new ones (FadeIn and Crossfade) are driven manually.

* page/TextIndicator.h:
Add a comment explaining which animations are manual and which are not.

* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView present]):
Make use of wantsManualAnimation(). The previous (wantsFadeIn || wantsCrossfade)
was wrong, because it was true for BounceAndCrossfade, and would cause
BounceAndCrossfade animations (which aren't driven manually) to stall at progress=0.

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

6 years agoGive empty pages a valid database provider.
andersca@apple.com [Tue, 6 Jan 2015 19:08:37 +0000 (19:08 +0000)]
Give empty pages a valid database provider.

* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients):

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

6 years agoFix iOS build after r177955 and r177952.
mmaxfield@apple.com [Tue, 6 Jan 2015 19:00:30 +0000 (19:00 +0000)]
Fix iOS build after r177955 and r177952.

Unreviewed.

* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::insertPhoneNumberLink):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):

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

6 years agoRemove now unused IndexedDB code
andersca@apple.com [Tue, 6 Jan 2015 18:46:15 +0000 (18:46 +0000)]
Remove now unused IndexedDB code
https://bugs.webkit.org/show_bug.cgi?id=140128

Reviewed by Darin Adler.

Source/WebCore:

* CMakeLists.txt:
Remove files.

* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
Don't include PageGroupIndexedDatabase.h.

* Modules/indexeddb/IDBFactoryBackendInterface.cpp: Removed.
Remove this file, it just had one function calling through to the database strategy.

* Modules/indexeddb/IDBFactoryBackendInterface.h:
Remove the create function.

* Modules/indexeddb/PageGroupIndexedDatabase.cpp: Removed.
* Modules/indexeddb/PageGroupIndexedDatabase.h: Removed.
The backend is now per page, not per page group.

* WebCore.exp.in:
Remove an exported symbol.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Remove files.

* page/PageGroup.h:
PageGroup is no longer supplementable.

* platform/DatabaseStrategy.cpp:
(WebCore::DatabaseStrategy::createIDBFactoryBackend): Deleted.
* platform/DatabaseStrategy.h:
Remove a header.

Source/WebKit2:

Remove a function.

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createIDBFactoryBackend): Deleted.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

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

6 years agoTry to fix the Windows build.
andersca@apple.com [Tue, 6 Jan 2015 18:43:39 +0000 (18:43 +0000)]
Try to fix the Windows build.

* WebCore.vcxproj/copyForwardingHeaders.cmd:

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

6 years agoFix race in FindController code
darin@apple.com [Tue, 6 Jan 2015 18:29:56 +0000 (18:29 +0000)]
Fix race in FindController code
https://bugs.webkit.org/show_bug.cgi?id=140114

Reviewed by Anders Carlsson.

No idea how to reproduce this. Just ran into the crash in my local testing.

* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::findString): Use a RefPtr to guarantee the FindController is
not deleted while a this pointer is stored in a function.

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

6 years agoRegression(r176212): Carousel on mbusa.com is choppy
cdumez@apple.com [Tue, 6 Jan 2015 17:57:52 +0000 (17:57 +0000)]
Regression(r176212): Carousel on mbusa.com is choppy
https://bugs.webkit.org/show_bug.cgi?id=139543
<rdar://problem/19209406>

Reviewed by Antti Koivisto.

Source/WebCore:

A repeating DOM timer changing the style of an element that has
overflowing content that is visible would get throttled in the
case where the overflowing content has its own layer. This is
because the repaint rect returned by
RenderObject::absoluteClippedOverflowRect() does not take into
consideration descendants with their own self-painting layer when
accounting for the overflow.

Until I can find a relatively cheap way of computing the overflow
in this case, this patch takes the conservative approach and
assumes we may repaint inside the viewport if the element does not
have a layer or if any of its descendants has its own layer.

This patch also renames isInsideViewport() function to
mayCauseRepaintInsideViewport() for clarity.

Tests: fast/dom/repeating-timer-element-overflow-hidden-throttling.html
       fast/dom/repeating-timer-element-overflowing-child-own-layer-throttling.html

* dom/Element.cpp:
(WebCore::Element::mayCauseRepaintInsideViewport):
(WebCore::Element::isInsideViewport): Deleted.
* dom/Element.h:
* page/DOMTimer.cpp:
(WebCore::DOMTimer::scriptDidCauseElementRepaint):
(WebCore::DOMTimer::updateThrottlingStateAfterViewportChange):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::mayCauseRepaintInsideViewport):
(WebCore::RenderElement::isInsideViewport): Deleted.
* rendering/RenderElement.h:

LayoutTests:

Add a layout test to cover the case where a repeating DOM timer is
changing the style of an element which has overflowing content that
is visible and has its own layer. In such case, the DOM timer should
not be throttled. Also add a layout test to make sure we still throttle
if the element clips its overflow.

* fast/dom/repeating-timer-element-overflow-hidden-throttling-expected.txt: Added.
* fast/dom/repeating-timer-element-overflow-hidden-throttling.html: Added.
* fast/dom/repeating-timer-element-overflowing-child-own-layer-throttling-expected.txt: Added.
* fast/dom/repeating-timer-element-overflowing-child-own-layer-throttling.html: Added.
New tests.

* fast/dom/timer-unthrottle-on-layout-expected.txt:
* fast/dom/timer-unthrottle-on-layout.html:
* fast/dom/timer-unthrottle-on-scroll-expected.txt:
* fast/dom/timer-unthrottle-on-scroll.html:
Stop using <input> test elements as it appears one of the descendants
in its shadow tree has its own layer.

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

6 years agoAdd a WebKit1 database provider
andersca@apple.com [Tue, 6 Jan 2015 17:53:29 +0000 (17:53 +0000)]
Add a WebKit1 database provider
https://bugs.webkit.org/show_bug.cgi?id=140126

Reviewed by Sam Weinig.

Source/WebCore:

Use a Ref instead of a RefPtr since the database provider can never be null now.

* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
(WebCore::DOMWindowIndexedDatabase::indexedDB):
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
(WebCore::Page::databaseProvider):

Source/WebKit:

Add a stubbed out database provider.

* Storage/WebDatabaseProvider.cpp: Added.
(WebDatabaseProvider::shared):
(WebDatabaseProvider::WebDatabaseProvider):
(WebDatabaseProvider::~WebDatabaseProvider):
(WebDatabaseProvider::createIDBFactoryBackend):
* Storage/WebDatabaseProvider.h: Added.
* WebKit.vcxproj/WebKit/WebKit.vcxproj:
* WebKit.vcxproj/WebKit/WebKit.vcxproj.filters:
* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

Set the database provider.

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):

Source/WebKit/win:

Set the database provider.

* WebView.cpp:
(WebView::initWithFrame):

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

6 years ago[Win] Unreviewed build fix after r177952.
bfulgham@apple.com [Tue, 6 Jan 2015 17:18:19 +0000 (17:18 +0000)]
[Win] Unreviewed build fix after r177952.

Remove double class namespace in appendToAttributeValue.

* html/parser/HTMLToken.h:
(WebCore::HTMLToken::appendToAttributeValue): Added,
(WebCore::HTMLToken::HTMLToken::appendToAttributeValue): Deleted.

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

6 years agofast/events/before-unload-adopt-subframe-to-outside.html is flaky with ASan
ap@apple.com [Tue, 6 Jan 2015 17:13:00 +0000 (17:13 +0000)]
fast/events/before-unload-adopt-subframe-to-outside.html is flaky with ASan
https://bugs.webkit.org/show_bug.cgi?id=140061

Reviewed by Darin Adler.

Hide frames before dumping results. Something was making layout timing dependent,
hopefully this will make results consistent.

* fast/events/before-unload-adopt-subframe-to-outside-expected.txt:
* fast/events/before-unload-adopt-subframe-to-outside.html:

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

6 years agoAdd a DatabaseProvider subclass in WebKit2 and use it for IndexedDB
andersca@apple.com [Tue, 6 Jan 2015 16:54:19 +0000 (16:54 +0000)]
Add a DatabaseProvider subclass in WebKit2 and use it for IndexedDB
https://bugs.webkit.org/show_bug.cgi?id=140108

Reviewed by Darin Adler.

Source/WebCore:

* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
(WebCore::DOMWindowIndexedDatabase::indexedDB):
Get the IDBFactoryBackendInterface from the database provider.

* page/DatabaseProvider.cpp:
(WebCore::DatabaseProvider::idbFactoryBackend):
Change this to return a pointer.

* page/Page.h:
(WebCore::Page::databaseProvider):
Add a getter.

Source/WebKit2:

* CMakeLists.txt:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Databases/WebDatabaseProvider.cpp: Added.
(WebKit::databaseProviders):
(WebKit::WebDatabaseProvider::getOrCreate):
(WebKit::WebDatabaseProvider::WebDatabaseProvider):
(WebKit::WebDatabaseProvider::~WebDatabaseProvider):
(WebKit::WebDatabaseProvider::createIDBFactoryBackend):
* WebProcess/Databases/WebDatabaseProvider.h: Added.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):

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

6 years ago[Win] Another build fix attempt.
bfulgham@apple.com [Tue, 6 Jan 2015 16:52:15 +0000 (16:52 +0000)]
[Win] Another build fix attempt.

Reorder function declarations to avoid confusing compiler. Add explicit namespace for
out copied functions to avoid attempting to link against bindings version of these files.

* plugins/PluginPackage.cpp:
(WebCore::makeSource):
(WebCore::NPN_Evaluate):
(WebCore::NPN_Invoke):
(WebCore::PluginPackage::initializeBrowserFuncs):

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

6 years agoMove '-webkit-scroll-snap-*' CSS properties to the new StyleBuilder
cdumez@apple.com [Tue, 6 Jan 2015 16:49:58 +0000 (16:49 +0000)]
Move '-webkit-scroll-snap-*' CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140112

Reviewed by Darin Adler.

Move '-webkit-scroll-snap-*' CSS properties to the new StyleBuilder.

* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::parseSnapCoordinate):
(WebCore::StyleBuilderConverter::convertScrollSnapPoints):
(WebCore::StyleBuilderConverter::convertSnapCoordinatePair):
(WebCore::StyleBuilderConverter::convertScrollSnapCoordinates):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::parseSnapCoordinate): Deleted.
(WebCore::StyleResolver::parseSnapCoordinatePair): Deleted.
(WebCore::StyleResolver::parseSnapPoints): Deleted.
* css/StyleResolver.h:

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

6 years agoResolve mirroring and variant in Font instead of FontGlyphs
antti@apple.com [Tue, 6 Jan 2015 14:49:24 +0000 (14:49 +0000)]
Resolve mirroring and variant in Font instead of FontGlyphs
https://bugs.webkit.org/show_bug.cgi?id=140079

Reviewed by Darin Adler.

Make FontGlyphs more focused. It doesn't need to know about resolving variants and mirroring.

* platform/graphics/Font.cpp:
(WebCore::Font::glyphDataForCharacter):
* platform/graphics/Font.h:
(WebCore::Font::glyphDataForCharacter): Deleted.
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::glyphDataForCharacter):
* platform/graphics/FontGlyphs.h:

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

6 years agoFix Unused parameter warning in Webcore bindings.
gyuyoung.kim@samsung.com [Tue, 6 Jan 2015 11:59:47 +0000 (11:59 +0000)]
Fix Unused parameter warning in Webcore bindings.
https://bugs.webkit.org/show_bug.cgi?id=140118

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2015-01-06
Reviewed by Gyuyoung Kim.

remove the Unused parameter from createScriptInstanceForWidget() function

No new tests, no behavior changed.

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::createScriptInstanceForWidget):

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

6 years agoFont::primaryFontData() should return a reference
antti@apple.com [Tue, 6 Jan 2015 11:23:58 +0000 (11:23 +0000)]
Font::primaryFontData() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=140081

Reviewed by Darin Adler.

It is not null.

Also rename primaryFont() -> primaryFontData().

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(AXAttributeStringSetStyle):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXAttributeStringSetStyle):
* bindings/objc/DOM.mm:
(-[DOMElement _font]):
* editing/cocoa/HTMLConverter.mm:
(_font):
(WebCore::editingAttributedStringFromRange):
* editing/ios/EditorIOS.mm:
(WebCore::Editor::fontForSelection):
(WebCore::Editor::fontAttributesForSelectionStart):
* editing/mac/EditorMac.mm:
(WebCore::Editor::fontForSelection):
(WebCore::Editor::fontAttributesForSelectionStart):
* platform/graphics/Font.cpp:
(WebCore::Font::fastAverageCharWidthIfAvailable):
* platform/graphics/Font.h:
(WebCore::Font::fontMetrics):
(WebCore::Font::spaceWidth):
(WebCore::Font::tabWidth):
(WebCore::Font::primaryFontData):
(WebCore::Font::primaryFont): Deleted.
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::primaryFontHasGlyphForCharacter):
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::determinePitch):
(WebCore::FontGlyphs::glyphDataForSystemFallback):
(WebCore::FontGlyphs::glyphDataForCharacter):
* platform/graphics/FontGlyphs.h:
(WebCore::FontGlyphs::primaryFontData):
(WebCore::FontGlyphs::primarySimpleFontData):
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advanceInternal):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::advance):
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
* platform/graphics/mac/ComplexTextController.h:
(WebCore::ComplexTextController::ComplexTextRun::create):
(WebCore::ComplexTextController::ComplexTextRun::fontData):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::primaryFontDataIsSystemFont):
* platform/graphics/opentype/OpenTypeMathData.cpp:
* platform/graphics/opentype/OpenTypeMathData.h:
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::requiresIdeographicBaseline):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::constructTextRun):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::adjustLogicalLeftOffsetForLine):
(WebCore::RenderBlock::adjustLogicalRightOffsetForLine):
(WebCore::constructTextRunInternal):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
* rendering/RenderThemeIOS.mm:
(WebCore::adjustInputElementButtonStyle):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::ascentAndDescentForBox):
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::getGlyphAssemblyFallBack):
(WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator):
(WebCore::RenderMathMLOperator::findStretchyData):
(WebCore::RenderMathMLOperator::trailingSpaceError):
* rendering/mathml/RenderMathMLRadicalOperator.cpp:
(WebCore::RenderMathMLRadicalOperator::stretchTo):
(WebCore::RenderMathMLRadicalOperator::computePreferredLogicalWidths):
(WebCore::RenderMathMLRadicalOperator::computeLogicalHeight):
(WebCore::RenderMathMLRadicalOperator::paint):
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::updateStyle):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::constructTextRun):
* rendering/svg/SVGTextLayoutEngineSpacing.cpp:
(WebCore::SVGTextLayoutEngineSpacing::calculateSVGKerning):
* rendering/svg/SVGTextMetrics.cpp:
(WebCore::SVGTextMetrics::constructTextRun):
(WebCore::SVGTextMetrics::SVGTextMetrics):
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::missingGlyphForFont):
(WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):

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

6 years agoFix Unused parameter warning in Webcore bindings.
commit-queue@webkit.org [Tue, 6 Jan 2015 11:10:02 +0000 (11:10 +0000)]
Fix Unused parameter warning in Webcore bindings.
https://bugs.webkit.org/show_bug.cgi?id=140046

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2015-01-06
Reviewed by Gyuyoung Kim.

remove the Unused parameter from createScriptInstanceForWidget() function

No new tests, no behavior changed.

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::createScriptInstanceForWidget):

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

6 years agoMove '-webkit-filter' / '-webkit-backdrop-filter' to the new StyleBuilder
cdumez@apple.com [Tue, 6 Jan 2015 10:25:16 +0000 (10:25 +0000)]
Move '-webkit-filter' / '-webkit-backdrop-filter' to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140111

Reviewed by Darin Adler.

Move '-webkit-filter' / '-webkit-backdrop-filter' to the new
StyleBuilder.

* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::createFilterOperations):
* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertFilterOperations):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::createFilterOperations):
* css/StyleResolver.h:

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

6 years agoModernize and streamline HTMLToken and AtomicHTMLToken
darin@apple.com [Tue, 6 Jan 2015 08:06:09 +0000 (08:06 +0000)]
Modernize and streamline HTMLToken and AtomicHTMLToken
https://bugs.webkit.org/show_bug.cgi?id=140046

Reviewed by Andreas Kling.

Source/WebCore:

* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::appendDocumentType): Added code to properly
handle empty strings for systemId and publicId, rather than treating them
the same as missing systemId and publicId.

* html/parser/AtomicHTMLToken.h: Removed unneeded includes.
Moved function bodies out of the class so it's easier to see the contents of
the class. Renamed the isAll8BitData function to charactersIsAll8BitData
to make it clear that it is correct only for AtomicHTMLToken::characters.
Made more things private. Moved the findAttributeInVector function here
and renamed it to just findAttribute. Use unsigned instead of int and
size_t as appropriate. Changed the constructor that makes a fake one of
these to move the Vector of attributes in rather than copying it.

* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::insertDoctype): Moved the code to create
a string from here into AtomicHTMLToken.
(WebCore::HTMLConstructionSite::createElementFromSavedToken): Updated
to construct the Vector explicitly because all other call sites pass
ownership of the Vector in to the AtomicHTMLToken.

* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::pumpTokenizer): Check for an uninitialized
token without using a special function just for this purpose.
(WebCore::HTMLDocumentParser::constructTreeFromHTMLToken): Ditto.

* html/parser/HTMLParserIdioms.h: Removed the version of
stripLeadingAndTrailingHTMLSpaces that takes a character vector. Instead
the caller can make a string. Later we might want this to work with
a StringView, or a StringView/String combination.

* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::scan): Updated to not use HTMLToken::data.
(WebCore::TokenPreloadScanner::updatePredictedBaseURL): Updated to not use
HTMLToken::getAttributeItem and to not require a special overload of the
stripLeadingAndTrailingHTMLSpaces function.

* html/parser/HTMLSourceTracker.cpp:
(WebCore::HTMLSourceTracker::end): Updated to call the token-ending
function by its new name, setEndOffset.
(WebCore::HTMLSourceTracker::sourceForToken): Updated since we no
longer have a startIndex function that already returns 0. Instead just
call length. Also use unsigned instead of size_t.

* html/parser/HTMLStackItem.h:
(WebCore::HTMLStackItem::getAttributeItem): Updated for name change.

* html/parser/HTMLToken.h: Removed the many unneeded includes,
including the self-include! Turned DoctypeData into a normal struct
without m_ prefixes on its member names. Turned HTMLToken::Attribute and
HTMLToken::Attribute::Range into normal structs. Moved function
bodies out of the class so it's easier to see the contents of
the class. Removed a few now-unneeded functions.

* html/parser/HTMLTokenizer.cpp: Removed the AtomicHTMLToken function
members that used to be here. None are needed any more; they are now all
just inlined at the call site. If we need any non-inline functions, then
we sould probably create an AtomicHTMLToken.cpp file instead.
(WebCore::HTMLTokenizer::processEntity): Use the new bufferASCIICharacter
function in all the cases where we know a character is ASCII to cut down
on the amount of 8-bit checking we have to do.
(WebCore::HTMLTokenizer::nextToken): Ditto.

* html/parser/HTMLTokenizer.h: Added a new bufferASCIICharacter function
so we don't have to do 8-bit checks on so many characters as we buffer
them. Also removed the call to ensureIsCharacterToken, since appendToCharacter
now does that. Also deleted overloads of bufferCharacter so we remember to
call bufferASCIICharacter instead.

* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer):
Updated for change in AtomicHTMLToken function names.
(WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processStartTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processStartTagForInTable): Ditto.
(WebCore::hasAttribute): Added.
(WebCore::HTMLTreeBuilder::processTokenInForeignContent): Use hasAtttribute.

* html/parser/TextDocumentParser.cpp:
(WebCore::TextDocumentParser::insertFakePreElement): Move the attributes in
rather than copying them in.

* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::filterCharacterToken): Use clear so we don't have to
have an eraseCharacters function. Use a local variable to avoid overloading
ambiguity.
(WebCore::XSSAuditor::decodedSnippetForAttribute): Fixed a typo and the types
of some local variables.

LayoutTests:

* resources/dump-as-markup.js:
(Markup._get): Add code to handle null systemId and publicId,
dumping them as empty strings for now.

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

6 years agoWebCore:
darin@apple.com [Tue, 6 Jan 2015 07:46:07 +0000 (07:46 +0000)]
WebCore:

Revert mistake in yesterday's HTMLDocumentParser refactor.
https://bugs.webkit.org/show_bug.cgi?id=140041

* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::HTMLDocumentParser): Pass the parser content policy
from the parserContentPolicy function, not the raw policy that was passed in. This
restores the behavior from before r177883.

LayoutTests:

* TestExpectations: Re-enabled the test I broke yesterday,
editing/pasteboard/drag-and-drop-objectimage-contenteditable.html,
now that it's fixed.

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

6 years agoUsing calc() for -webkit-filter does not work
cdumez@apple.com [Tue, 6 Jan 2015 05:51:44 +0000 (05:51 +0000)]
Using calc() for -webkit-filter does not work
https://bugs.webkit.org/show_bug.cgi?id=140106

Reviewed by Darin Adler.

Source/WebCore:

Using calc() for -webkit-filter did not work because the CSS parser did
not handle it properly. This patch addresses the issue.

Test: fast/css/webkit-filter-calc.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseBuiltinFilterArguments):

LayoutTests:

Add a layout test to make sure using calc() for -webkit-filter CSS
property is working as intended.

* fast/css/webkit-filter-calc-expected.txt: Added.
* fast/css/webkit-filter-calc.html: Added.

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

6 years agoRemove some stale class names in check-for-inappropriate-objc-class-names
commit-queue@webkit.org [Tue, 6 Jan 2015 04:50:25 +0000 (04:50 +0000)]
Remove some stale class names in check-for-inappropriate-objc-class-names
https://bugs.webkit.org/show_bug.cgi?id=140104

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-01-05
Reviewed by Darin Adler.

* Scripts/check-for-inappropriate-objc-class-names:
These UIWK* classes no longer exist.

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

6 years agoAllow HTTPS + 'Cache-control: no-cache' pages into the page cache
cdumez@apple.com [Tue, 6 Jan 2015 04:50:06 +0000 (04:50 +0000)]
Allow HTTPS + 'Cache-control: no-cache' pages into the page cache
https://bugs.webkit.org/show_bug.cgi?id=139251

Reviewed by Darin Adler.

Source/WebCore:

Allow HTTPS + 'Cache-control: no-cache' pages into the page cache as
IE10+ and Google Chrome do, and as allowed by RFC2616 & newer RFC7234
(both RFCs distinguish history mechanisms and caches).

Pages over HTTPs using 'Cache-control: no-store' still don't go into
the page cache for now.

Test: http/tests/navigation/https-in-page-cache.html

* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::PageCache::canCachePageContainingThisFrame):
* platform/FeatureCounterKeys.h:

LayoutTests:

Update http/tests/navigation/https-in-page-cache.html layout test so that it
expects HTTPS + 'Cache-control: no-cache' pages to go into the page cache.

* http/tests/navigation/https-in-page-cache-expected.txt:
* http/tests/navigation/resources/https-in-page-cache-2.php:

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

6 years agoUsing calc() in repeat() for -webkit-grid-template-rows does not work
cdumez@apple.com [Tue, 6 Jan 2015 04:48:25 +0000 (04:48 +0000)]
Using calc() in repeat() for -webkit-grid-template-rows does not work
https://bugs.webkit.org/show_bug.cgi?id=140094

Reviewed by Darin Adler.

Source/WebCore:

Using calc() in repeat() for -webkit-grid-template-rows was not working
because the CSS parser was not handling this case properly. This patch
addresses the issue.

Test: fast/css-grid-layout/grid-repeat-calc.html

* css/CSSCalculationValue.h:
(WebCore::CSSCalcValue::isPositive):
Add isPositive() method as it is needed by
CSSParser::validateCalculationUnit().

* css/CSSParser.cpp:
(WebCore::CSSParser::validateCalculationUnit):
Add support for FPositiveInteger, similarly to what was done in
validateUnit(). This would cause us to consider calc(1 + 1) as invalid
if a FPositiveInteger was requested.

(WebCore::CSSParser::parseGridTrackRepeatFunction):
Do not access fValue directly and call parsedDouble() instead as it
correctly handles calculation values.

LayoutTests:

* fast/css-grid-layout/grid-repeat-calc-expected.txt: Added.
* fast/css-grid-layout/grid-repeat-calc.html: Added.

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

6 years agocalc() cannot be used in steps() for -webkit-animation-timing-function
cdumez@apple.com [Tue, 6 Jan 2015 04:46:51 +0000 (04:46 +0000)]
calc() cannot be used in steps() for -webkit-animation-timing-function
https://bugs.webkit.org/show_bug.cgi?id=140091

Reviewed by Darin Adler.

Source/WebCore:

calc() could not be used in steps() for -webkit-animation-timing-function
CSS property because the CSS parser did not handle this case properly.
This patch addresses the issue.

Test: fast/css/animation-steps-calculated-value.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseAnimationTimingFunction):

LayoutTests:

Add a layout test to make sure that calc() can be used in steps() for
-webkit-animation-timing-function CSS property.

* fast/css/animation-steps-calculated-value-expected.txt: Added.
* fast/css/animation-steps-calculated-value.html: Added.

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

6 years ago[Win] One more build fix for r177937.
bfulgham@apple.com [Tue, 6 Jan 2015 02:38:35 +0000 (02:38 +0000)]
[Win] One more build fix for r177937.

* plugins/PluginPackage.cpp: Provide forward declaration for local NPN_Evaluate
implementation to avoid linker error.

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

6 years agoWeb Inspector: inspector view top inset should not include height of web view banners
commit-queue@webkit.org [Tue, 6 Jan 2015 02:13:43 +0000 (02:13 +0000)]
Web Inspector: inspector view top inset should not include height of web view banners
https://bugs.webkit.org/show_bug.cgi?id=140076

Patch by Matt Baker <mattbaker@apple.com> on 2015-01-05
Reviewed by Anders Carlsson.

Added _totalHeightOfBanners property to WKView, which is used by the WebInspectorProxy
to calculate the correct vertical position of the Inspector view frame. The browser is
responsible for setting the property value whenever banners are installed or uninstalled from
the view.

* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _setTotalHeightOfBanners:]):
(-[WKView _totalHeightOfBanners]):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::inspectedViewFrameDidChange):

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

6 years ago[Win] Unreviewed build fix after r177937.
bfulgham@apple.com [Tue, 6 Jan 2015 02:01:45 +0000 (02:01 +0000)]
[Win] Unreviewed build fix after r177937.

Add the missing #include and namespace declarations to get a clean build.

* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::JSWebGLRenderingContext::getAttachedShaders):
* plugins/PluginPackage.cpp:
(WebCore::getListFromVariantArgs):
(WebCore::NPN_Invoke):
(WebCore::makeSource):
(WebCore::NPN_Evaluate):

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

6 years agoRemove PluginViewNone.cpp
andersca@apple.com [Tue, 6 Jan 2015 01:54:32 +0000 (01:54 +0000)]
Remove PluginViewNone.cpp
https://bugs.webkit.org/show_bug.cgi?id=140107

Reviewed by Andreas Kling.

* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformWin.cmake:
* WebCore.xcodeproj/project.pbxproj:
* plugins/PluginViewNone.cpp: Removed.

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

6 years agoStop including PluginView.h from cross platform WebCore code
andersca@apple.com [Tue, 6 Jan 2015 01:23:42 +0000 (01:23 +0000)]
Stop including PluginView.h from cross platform WebCore code
https://bugs.webkit.org/show_bug.cgi?id=140105

Reviewed by Andreas Kling.

Instead, include PluginViewBase.h. This will allow us to move the old plug-in implementation to WebKit.

* bindings/js/ScriptController.cpp:
* bridge/NP_jsobject.cpp:
(_NPN_Evaluate):
* inspector/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::setJavaScriptPaused):
* loader/FrameLoaderClient.h:
* page/Page.cpp:
* plugins/PluginViewBase.h:
(WebCore::PluginViewBase::setJavaScriptPaused):

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

6 years ago[Win] Unreviewed build fix after r177925.
bfulgham@apple.com [Tue, 6 Jan 2015 00:53:03 +0000 (00:53 +0000)]
[Win] Unreviewed build fix after r177925.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Correct symbol name.

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

6 years agoIntroduce a per-page database provider class
andersca@apple.com [Tue, 6 Jan 2015 00:29:36 +0000 (00:29 +0000)]
Introduce a per-page database provider class
https://bugs.webkit.org/show_bug.cgi?id=140102

Reviewed by Sam Weinig.

This class will replace DatabaseStrategy and allow for different providers per page.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* page/DatabaseProvider.cpp: Added.
(WebCore::DatabaseProvider::~DatabaseProvider):
(WebCore::DatabaseProvider::idbFactoryBackend):
* page/DatabaseProvider.h: Added.
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
* page/PageConfiguration.cpp:
* page/PageConfiguration.h:

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

6 years agoAdd copies of NPN_Evaluate and NPN_Invoke on Windows
andersca@apple.com [Tue, 6 Jan 2015 00:10:52 +0000 (00:10 +0000)]
Add copies of NPN_Evaluate and NPN_Invoke on Windows
https://bugs.webkit.org/show_bug.cgi?id=140103

Reviewed by Andreas Kling.

While this is unfortunate, it will allow us to get rid of PluginView.h and PluginViewNone.cpp
from the cross platform WebCore code and then move the plug-in code to WebKit/win (which is the only client of this plug-in implementation).

* plugins/PluginPackage.cpp:
(WebCore::NPN_Invoke):
(WebCore::NPN_Evaluate):
(WebCore::PluginPackage::initializeBrowserFuncs):

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

6 years agoFix up bmalloc's PerThread for use on Linux
ggaren@apple.com [Mon, 5 Jan 2015 23:33:54 +0000 (23:33 +0000)]
Fix up bmalloc's PerThread for use on Linux
https://bugs.webkit.org/show_bug.cgi?id=139804

Reviewed by Anders Carlsson.

The previous implementation was a bit slow.

* bmalloc/PerThread.h:
(bmalloc::PerThreadStorage<Cache>::get):
(bmalloc::PerThreadStorage::get):
(bmalloc::PerThreadStorage::init): Added a catch-all cross-platform Unix
way to do fast per-thread access without taking a lock every time. This
probably works on all the platforms we care about, and it matches other
techniques we use elsewhere in WebKit.

(bmalloc::PerThread<T>::getFastCase): Removed the conditional from
this class because PerThreadStorage now encapsulates everything that
needs to be conditional.

(bmalloc::PerThreadStorage::initSharedKeyIfNeeded): Deleted.

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

6 years agoheap-buffer-overflow on fast/loader/reload-zero-byte-plugin.html
andersca@apple.com [Mon, 5 Jan 2015 22:37:46 +0000 (22:37 +0000)]
heap-buffer-overflow on fast/loader/reload-zero-byte-plugin.html
https://bugs.webkit.org/show_bug.cgi?id=140096
rdar://problem/19368938

Reviewed by Alexey Proskuryakov.

When creating a new page, don't pass clientInfo when setting up the frame and policy clients,
since clientInfo points to a web view, not the test controller.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):

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

6 years agoPurge PassRefPtr from Page.
akling@apple.com [Mon, 5 Jan 2015 21:48:31 +0000 (21:48 +0000)]
Purge PassRefPtr from Page.
<https://webkit.org/b/140089>

Reviewed by Anders Carlsson.

Source/WebCore:

Use Ref or RefPtr instead of PassRefPtr as appropriate in WebCore::Page.

* page/Page.cpp:
(WebCore::Page::rangeOfString):
(WebCore::Page::setSessionStorage):
* page/Page.h:
* page/mac/PageMac.cpp:
(WebCore::Page::addSchedulePair):
(WebCore::Page::removeSchedulePair):

Source/WTF:

Make SchedulePair::create() return Ref since it never fails.

* wtf/SchedulePair.h:
(WTF::SchedulePair::create):

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

6 years agoImplicitly dismissed DD popovers don't clear immediate action state, prematurely...
timothy_horton@apple.com [Mon, 5 Jan 2015 21:47:14 +0000 (21:47 +0000)]
Implicitly dismissed DD popovers don't clear immediate action state, prematurely dismissing the next DD highlight
https://bugs.webkit.org/show_bug.cgi?id=140088
<rdar://problem/19298391>

Reviewed by Anders Carlsson.

* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _menuItemForDataDetectedText]):
Instead of just tearing down the TextIndicator, clear all state.

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

6 years agoRegression(r163928): Animated images are not resumed on window resizing
cdumez@apple.com [Mon, 5 Jan 2015 21:44:32 +0000 (21:44 +0000)]
Regression(r163928): Animated images are not resumed on window resizing
https://bugs.webkit.org/show_bug.cgi?id=139714
<rdar://problem/18855285>

Reviewed by Darin Adler.

Source/WebCore:

After r163928, animated images were not resumed if they became visible
after resizing the window. This patch calls resumes animated images if
necessary in FrameView::setFrameRect() to handle this case properly.

Tests: fast/images/animated-gif-window-resizing.html
       fast/images/animated-gif-zooming.html

* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):

LayoutTests:

Add a layout test to make sure animated images are correctly paused /
resumed when resizing the window.

Also add another test to make sure animated images are correctly paused
/ resumed when zooming in and out.

* fast/images/animated-gif-window-resizing-expected.txt: Added.
* fast/images/animated-gif-window-resizing.html: Added.
* fast/images/animated-gif-zooming-expected.txt: Added.
* fast/images/animated-gif-zooming.html: Added.
* fast/images/resources/animated-gif-window-resize.html: Added.
* platform/mac-wk1/TestExpectations:

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

6 years agoOne more URTBF after r177917.
ossy@webkit.org [Mon, 5 Jan 2015 21:32:35 +0000 (21:32 +0000)]
One more URTBF after r177917.

* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
* WebProcess/Battery/WebBatteryManager.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
(WebKit::CoordinatedDrawingArea::didReceiveCoordinatedLayerTreeHostMessage):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/LayerTreeHost.h:

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

6 years agoWeb Inspector: pass parameters to inspector instrumentation by reference where possible
burg@cs.washington.edu [Mon, 5 Jan 2015 21:30:33 +0000 (21:30 +0000)]
Web Inspector: pass parameters to inspector instrumentation by reference where possible
https://bugs.webkit.org/show_bug.cgi?id=139981

Reviewed by Andreas Kling.

Clean up inspector instrumentation entry points throughout WebCore. In particular, make
parameters pass-by-reference if they are not nullable. Also standardize quirky parameter
orders and do other small cleanups in InspectorInstrumentation and at callsites.

Inspector agents still take the pertinent parameters by pointer even when they could be
passed by reference. This will be addressed in a follow-up change.

No new tests, no behavior changed.

* WebCore.exp.in:
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
* css/PropertySetCSSStyleDeclaration.cpp:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::matchesFocusPseudoClass):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForElement):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::elementIsActive):
(WebCore::SelectorCompiler::elementIsActiveForStyleResolution):
(WebCore::SelectorCompiler::elementIsHovered):
(WebCore::SelectorCompiler::elementIsHoveredForStyleResolution):
* dom/CharacterData.cpp:
(WebCore::CharacterData::dispatchModifiedEvent): Remove unnecessary ENABLE guard.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::removeBetween):
(WebCore::ContainerNode::appendChild):
(WebCore::dispatchChildRemovalEvents):
* dom/ContainerNodeAlgorithms.h:
(WebCore::ChildNodeInsertionNotifier::notify): Remove unnecessary ENABLE guard.
* dom/Document.cpp:
(WebCore::Document::scheduleStyleRecalc):
(WebCore::Document::recalcStyle):
(WebCore::Document::finishedParsing): This is safe because we checked the argument.
* dom/Element.cpp:
(WebCore::Element::addShadowRoot):
(WebCore::Element::removeShadowRoot): This is safe because we checked the argument.
(WebCore::Element::willModifyAttribute): Remove unnecessary ENABLE guard.
(WebCore::Element::didAddAttribute):
(WebCore::Element::didModifyAttribute):
(WebCore::Element::didRemoveAttribute):
* dom/EventTarget.cpp:
(WebCore::EventTarget::fireEventListeners): This is safe because the type test would fail if null.
* dom/NamedFlowCollection.cpp: Pass by reference since code already assumes non-null.
(WebCore::NamedFlowCollection::ensureFlowWithName):
(WebCore::NamedFlowCollection::discardNamedFlow):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::~PseudoElement):
* dom/StyledElement.cpp:
(WebCore::StyledElement::styleAttributeChanged):
(WebCore::StyledElement::inlineStyleChanged):
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
(WebCore::InspectorInstrumentation::consoleCount):
(WebCore::InspectorInstrumentation::startConsoleTiming):
(WebCore::InspectorInstrumentation::stopConsoleTiming):
(WebCore::InspectorInstrumentation::consoleTimeStamp):
(WebCore::InspectorInstrumentation::startProfiling):
(WebCore::InspectorInstrumentation::stopProfiling):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::didClearWindowObjectInWorld):
(WebCore::InspectorController::connectFrontend):
(WebCore::InspectorController::disconnectFrontend):
* inspector/InspectorController.h: Remove instrumentationForPage() in favor of using instrumentingAgentsForPage() directly.
* inspector/InspectorDatabaseInstrumentation.h:
(WebCore::InspectorInstrumentation::didOpenDatabase):
* inspector/InspectorInstrumentation.cpp: Add missing s_ prefix for global s_instrumentingAgentSets. Pass the instrumenting
agent by reference since it was already null-checked if we reached a slow path for instrumentation.
(WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
(WebCore::InspectorInstrumentation::isDebuggerPausedImpl):
(WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
(WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
(WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
(WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
(WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
(WebCore::InspectorInstrumentation::didModifyDOMAttrImpl):
(WebCore::InspectorInstrumentation::didRemoveDOMAttrImpl):
(WebCore::InspectorInstrumentation::didInvalidateStyleAttrImpl):
(WebCore::InspectorInstrumentation::frameWindowDiscardedImpl):
(WebCore::InspectorInstrumentation::mediaQueryResultChangedImpl):
(WebCore::InspectorInstrumentation::didPushShadowRootImpl):
(WebCore::InspectorInstrumentation::willPopShadowRootImpl):
(WebCore::InspectorInstrumentation::didCreateNamedFlowImpl):
(WebCore::InspectorInstrumentation::willRemoveNamedFlowImpl):
(WebCore::InspectorInstrumentation::didChangeRegionOversetImpl):
(WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElementImpl):
(WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElementImpl):
(WebCore::InspectorInstrumentation::mouseDidMoveOverElementImpl):
(WebCore::InspectorInstrumentation::didScrollImpl):
(WebCore::InspectorInstrumentation::handleTouchEventImpl):
(WebCore::InspectorInstrumentation::handleMousePressImpl):
(WebCore::InspectorInstrumentation::forcePseudoStateImpl):
(WebCore::InspectorInstrumentation::characterDataModifiedImpl):
(WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
(WebCore::InspectorInstrumentation::didScheduleResourceRequestImpl):
(WebCore::InspectorInstrumentation::didInstallTimerImpl):
(WebCore::InspectorInstrumentation::didRemoveTimerImpl):
(WebCore::InspectorInstrumentation::willCallFunctionImpl):
(WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEventImpl):
(WebCore::InspectorInstrumentation::willDispatchEventImpl):
(WebCore::InspectorInstrumentation::willHandleEventImpl):
(WebCore::InspectorInstrumentation::didHandleEventImpl): Add proper cookie guard and pass by reference.
(WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
(WebCore::InspectorInstrumentation::willEvaluateScriptImpl):
(WebCore::InspectorInstrumentation::didEvaluateScriptImpl):
(WebCore::InspectorInstrumentation::scriptsEnabledImpl):
(WebCore::InspectorInstrumentation::didCreateIsolatedContextImpl): Removed, as there are no callers from WebCore. Possible V8 artifact.
(WebCore::InspectorInstrumentation::willFireTimerImpl):
(WebCore::InspectorInstrumentation::didFireTimerImpl): Add proper cookie guard and pass by reference.
(WebCore::InspectorInstrumentation::didInvalidateLayoutImpl):
(WebCore::InspectorInstrumentation::willLayoutImpl):
(WebCore::InspectorInstrumentation::willDispatchXHRLoadEventImpl):
(WebCore::InspectorInstrumentation::willPaintImpl):
(WebCore::InspectorInstrumentation::didPaintImpl):
(WebCore::InspectorInstrumentation::willScrollLayerImpl):
(WebCore::InspectorInstrumentation::didScrollLayerImpl):
(WebCore::InspectorInstrumentation::willRecalculateStyleImpl):
(WebCore::InspectorInstrumentation::didRecalculateStyleImpl): Add proper cookie guard and pass by reference.
(WebCore::InspectorInstrumentation::didScheduleStyleRecalculationImpl):
(WebCore::InspectorInstrumentation::applyEmulatedMediaImpl): Pass string by reference.
(WebCore::InspectorInstrumentation::willSendRequestImpl):
(WebCore::InspectorInstrumentation::continueAfterPingLoaderImpl):
(WebCore::InspectorInstrumentation::markResourceAsCachedImpl):
(WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
(WebCore::InspectorInstrumentation::willReceiveResourceDataImpl):
(WebCore::InspectorInstrumentation::willReceiveResourceResponseImpl):
(WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl): Add proper cookie guard and pass by reference.
(WebCore::InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl):
(WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDeniedImpl):
(WebCore::InspectorInstrumentation::continueWithPolicyDownloadImpl):
(WebCore::InspectorInstrumentation::continueWithPolicyIgnoreImpl):
(WebCore::InspectorInstrumentation::didReceiveDataImpl):
(WebCore::InspectorInstrumentation::didFinishLoadingImpl):
(WebCore::InspectorInstrumentation::didFailLoadingImpl):
(WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClientImpl):
(WebCore::InspectorInstrumentation::willLoadXHRImpl):
(WebCore::InspectorInstrumentation::didFailXHRLoadingImpl):
(WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
(WebCore::InspectorInstrumentation::didReceiveXHRResponseImpl):
(WebCore::InspectorInstrumentation::willLoadXHRSynchronouslyImpl):
(WebCore::InspectorInstrumentation::didLoadXHRSynchronouslyImpl):
(WebCore::InspectorInstrumentation::scriptImportedImpl):
(WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSPImpl):
(WebCore::InspectorInstrumentation::didReceiveScriptResponseImpl):
(WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl): Use Frame::isMainFrame().
(WebCore::InspectorInstrumentation::loadEventFiredImpl): Use Frame::isMainFrame().
(WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
(WebCore::InspectorInstrumentation::frameDocumentUpdatedImpl):
(WebCore::InspectorInstrumentation::loaderDetachedFromFrameImpl):
(WebCore::InspectorInstrumentation::willRunJavaScriptDialogImpl):
(WebCore::InspectorInstrumentation::willDestroyCachedResourceImpl): Use a range-based iterator.
(WebCore::InspectorInstrumentation::willWriteHTMLImpl):
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
(WebCore::InspectorInstrumentation::consoleCountImpl):
(WebCore::InspectorInstrumentation::startConsoleTimingImpl):
(WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
(WebCore::InspectorInstrumentation::consoleTimeStampImpl):
(WebCore::InspectorInstrumentation::startProfilingImpl):
(WebCore::InspectorInstrumentation::stopProfilingImpl):
(WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
(WebCore::InspectorInstrumentation::didDispatchDOMStorageEventImpl):
(WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStartImpl):
(WebCore::InspectorInstrumentation::didStartWorkerGlobalScopeImpl):
(WebCore::InspectorInstrumentation::willEvaluateWorkerScript):
(WebCore::InspectorInstrumentation::workerGlobalScopeTerminatedImpl):
(WebCore::InspectorInstrumentation::didCreateWebSocketImpl):
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl):
(WebCore::InspectorInstrumentation::didCloseWebSocketImpl):
(WebCore::InspectorInstrumentation::didReceiveWebSocketFrameImpl):
(WebCore::InspectorInstrumentation::didReceiveWebSocketFrameErrorImpl):
(WebCore::InspectorInstrumentation::didSendWebSocketFrameImpl):
(WebCore::InspectorInstrumentation::sessionCreatedImpl):
(WebCore::InspectorInstrumentation::sessionLoadedImpl):
(WebCore::InspectorInstrumentation::sessionModifiedImpl):
(WebCore::InspectorInstrumentation::segmentCreatedImpl):
(WebCore::InspectorInstrumentation::segmentCompletedImpl):
(WebCore::InspectorInstrumentation::segmentLoadedImpl):
(WebCore::InspectorInstrumentation::segmentUnloadedImpl):
(WebCore::InspectorInstrumentation::captureStartedImpl):
(WebCore::InspectorInstrumentation::captureStoppedImpl):
(WebCore::InspectorInstrumentation::playbackStartedImpl):
(WebCore::InspectorInstrumentation::playbackPausedImpl):
(WebCore::InspectorInstrumentation::playbackHitPositionImpl):
(WebCore::InspectorInstrumentation::playbackFinishedImpl):
(WebCore::InspectorInstrumentation::networkStateChangedImpl):
(WebCore::InspectorInstrumentation::updateApplicationCacheStatusImpl):
(WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
(WebCore::InspectorInstrumentation::cancelPauseOnNativeEvent):
(WebCore::InspectorInstrumentation::didRequestAnimationFrameImpl):
(WebCore::InspectorInstrumentation::didCancelAnimationFrameImpl):
(WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):
(WebCore::InspectorInstrumentation::registerInstrumentingAgents):
(WebCore::InspectorInstrumentation::unregisterInstrumentingAgents):
(WebCore::InspectorInstrumentation::retrieveTimelineAgent):
(WebCore::InspectorInstrumentation::instrumentingAgentsForPage): Add by-reference version which contains the logic from instrumentationForPage().
(WebCore::InspectorInstrumentation::instrumentingAgentsForRenderer):
(WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope):
(WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
(WebCore::InspectorInstrumentation::layerTreeDidChangeImpl):
(WebCore::InspectorInstrumentation::renderLayerDestroyedImpl):
(WebCore::InspectorInstrumentation::pseudoElementDestroyedImpl):
(WebCore::InspectorInstrumentation::didCreateIsolatedContextImpl): Deleted.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didClearWindowObjectInWorld):
(WebCore::InspectorInstrumentation::isDebuggerPaused):
(WebCore::InspectorInstrumentation::willInsertDOMNode):
(WebCore::InspectorInstrumentation::didInsertDOMNode):
(WebCore::InspectorInstrumentation::willRemoveDOMNode):
(WebCore::InspectorInstrumentation::didRemoveDOMNode):
(WebCore::InspectorInstrumentation::willModifyDOMAttr):
(WebCore::InspectorInstrumentation::didModifyDOMAttr):
(WebCore::InspectorInstrumentation::didRemoveDOMAttr):
(WebCore::InspectorInstrumentation::didInvalidateStyleAttr):
(WebCore::InspectorInstrumentation::frameWindowDiscarded):
(WebCore::InspectorInstrumentation::mediaQueryResultChanged):
(WebCore::InspectorInstrumentation::didPushShadowRoot):
(WebCore::InspectorInstrumentation::willPopShadowRoot):
(WebCore::InspectorInstrumentation::didCreateNamedFlow):
(WebCore::InspectorInstrumentation::willRemoveNamedFlow):
(WebCore::InspectorInstrumentation::didChangeRegionOverset):
(WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElement):
(WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElement):
(WebCore::InspectorInstrumentation::mouseDidMoveOverElement):
(WebCore::InspectorInstrumentation::handleTouchEvent):
(WebCore::InspectorInstrumentation::handleMousePress): Take Frame by reference instead of Page by pointer.
(WebCore::InspectorInstrumentation::forcePseudoState):
(WebCore::InspectorInstrumentation::characterDataModified):
(WebCore::InspectorInstrumentation::willSendXMLHttpRequest):
(WebCore::InspectorInstrumentation::didScheduleResourceRequest):
(WebCore::InspectorInstrumentation::didInstallTimer):
(WebCore::InspectorInstrumentation::didRemoveTimer):
(WebCore::InspectorInstrumentation::willCallFunction):
(WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent):
(WebCore::InspectorInstrumentation::willDispatchEvent):
(WebCore::InspectorInstrumentation::willHandleEvent): Pass a const event reference.
(WebCore::InspectorInstrumentation::willDispatchEventOnWindow):
(WebCore::InspectorInstrumentation::willEvaluateScript):
(WebCore::InspectorInstrumentation::didEvaluateScript):
(WebCore::InspectorInstrumentation::scriptsEnabled):
(WebCore::InspectorInstrumentation::willFireTimer):
(WebCore::InspectorInstrumentation::didInvalidateLayout):
(WebCore::InspectorInstrumentation::willLayout):
(WebCore::InspectorInstrumentation::didScroll):
(WebCore::InspectorInstrumentation::willDispatchXHRLoadEvent):
(WebCore::InspectorInstrumentation::willPaint):
(WebCore::InspectorInstrumentation::didPaint):
(WebCore::InspectorInstrumentation::willScrollLayer):
(WebCore::InspectorInstrumentation::didScrollLayer):
(WebCore::InspectorInstrumentation::willRecalculateStyle):
(WebCore::InspectorInstrumentation::didScheduleStyleRecalculation):
(WebCore::InspectorInstrumentation::applyEmulatedMedia): Pass string by reference.
(WebCore::InspectorInstrumentation::willSendRequest):
(WebCore::InspectorInstrumentation::continueAfterPingLoader):
(WebCore::InspectorInstrumentation::markResourceAsCached):
(WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache):
(WebCore::InspectorInstrumentation::willReceiveResourceData):
(WebCore::InspectorInstrumentation::willReceiveResourceResponse):
(WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDenied):
(WebCore::InspectorInstrumentation::continueWithPolicyDownload):
(WebCore::InspectorInstrumentation::continueWithPolicyIgnore):
(WebCore::InspectorInstrumentation::didReceiveData):
(WebCore::InspectorInstrumentation::didFinishLoading):
(WebCore::InspectorInstrumentation::didFailLoading):
(WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient): No need to go through
ScriptExecutionContext interface, as it's always a Document.
(WebCore::InspectorInstrumentation::willLoadXHR):
(WebCore::InspectorInstrumentation::didFailXHRLoading):
(WebCore::InspectorInstrumentation::didFinishXHRLoading):
(WebCore::InspectorInstrumentation::didReceiveXHRResponse):
(WebCore::InspectorInstrumentation::willLoadXHRSynchronously):
(WebCore::InspectorInstrumentation::didLoadXHRSynchronously):
(WebCore::InspectorInstrumentation::scriptImported):
(WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSP):
(WebCore::InspectorInstrumentation::didReceiveScriptResponse):
(WebCore::InspectorInstrumentation::domContentLoadedEventFired):
(WebCore::InspectorInstrumentation::loadEventFired):
(WebCore::InspectorInstrumentation::frameDetachedFromParent):
(WebCore::InspectorInstrumentation::didCommitLoad):
(WebCore::InspectorInstrumentation::frameDocumentUpdated):
(WebCore::InspectorInstrumentation::loaderDetachedFromFrame):
(WebCore::InspectorInstrumentation::willRunJavaScriptDialog):
(WebCore::InspectorInstrumentation::willDestroyCachedResource):
(WebCore::InspectorInstrumentation::willWriteHTML):
(WebCore::InspectorInstrumentation::didDispatchDOMStorageEvent):
(WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart):
(WebCore::InspectorInstrumentation::didStartWorkerGlobalScope):
(WebCore::InspectorInstrumentation::workerGlobalScopeTerminated):
(WebCore::InspectorInstrumentation::didCreateWebSocket):
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
(WebCore::InspectorInstrumentation::didCloseWebSocket):
(WebCore::InspectorInstrumentation::didReceiveWebSocketFrame):
(WebCore::InspectorInstrumentation::didReceiveWebSocketFrameError):
(WebCore::InspectorInstrumentation::didSendWebSocketFrame):
(WebCore::InspectorInstrumentation::sessionCreated):
(WebCore::InspectorInstrumentation::sessionLoaded):
(WebCore::InspectorInstrumentation::sessionModified):
(WebCore::InspectorInstrumentation::segmentCreated):
(WebCore::InspectorInstrumentation::segmentCompleted):
(WebCore::InspectorInstrumentation::segmentLoaded):
(WebCore::InspectorInstrumentation::segmentUnloaded):
(WebCore::InspectorInstrumentation::captureStarted):
(WebCore::InspectorInstrumentation::captureStopped):
(WebCore::InspectorInstrumentation::playbackStarted):
(WebCore::InspectorInstrumentation::playbackPaused):
(WebCore::InspectorInstrumentation::playbackFinished):
(WebCore::InspectorInstrumentation::playbackHitPosition):
(WebCore::InspectorInstrumentation::networkStateChanged):
(WebCore::InspectorInstrumentation::updateApplicationCacheStatus):
(WebCore::InspectorInstrumentation::didRequestAnimationFrame):
(WebCore::InspectorInstrumentation::didCancelAnimationFrame):
(WebCore::InspectorInstrumentation::willFireAnimationFrame):
(WebCore::InspectorInstrumentation::layerTreeDidChange):
(WebCore::InspectorInstrumentation::renderLayerDestroyed):
(WebCore::InspectorInstrumentation::pseudoElementDestroyed):
(WebCore::InspectorInstrumentation::instrumentingAgentsForFrame):
(WebCore::InspectorInstrumentation::instrumentingAgentsForDocument):
(WebCore::InspectorInstrumentation::didCreateIsolatedContext): Deleted.
* inspector/InspectorInstrumentationCookie.cpp: Take a reference, use default RefPtr constructor.
(WebCore::InspectorInstrumentationCookie::InspectorInstrumentationCookie):
* inspector/InspectorInstrumentationCookie.h: Fix misplaced ENABLE guard.
* inspector/InstrumentingAgents.cpp:
(WebCore::instrumentationForPage): Deleted.
(WebCore::instrumentationForWorkerGlobalScope): Deleted.
* inspector/InstrumentingAgents.h:
* inspector/WorkerInspectorController.h:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived):
(WebCore::DocumentLoader::continueAfterContentPolicy):
(WebCore::DocumentLoader::detachFromFrame):
* loader/DocumentThreadableLoader.cpp: Remove unnecessary ENABLE(INSPECTOR) guards, as these inlined calls
are boiled away by the compiler if !ENABLE(INSPECTOR).
(WebCore::DocumentThreadableLoader::didReceiveData):
(WebCore::DocumentThreadableLoader::didFinishLoading):
(WebCore::DocumentThreadableLoader::didFail):
(WebCore::DocumentThreadableLoader::preflightFailure):
(WebCore::DocumentThreadableLoader::loadRequest):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::detachFromParent):
(WebCore::FrameLoader::loadedResourceFromMemoryCache):
(WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
(WebCore::FrameLoader::dispatchDidCommitLoad):
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::notifyDidScheduleResourceRequest):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequest): Remove unnecessary ENABLE guard.
* loader/appcache/ApplicationCacheGroup.cpp: Remove several unnecessary ENABLE guards.
(WebCore::ApplicationCacheGroup::didReceiveResponse):
(WebCore::ApplicationCacheGroup::didReceiveData):
(WebCore::ApplicationCacheGroup::didFinishLoading):
(WebCore::ApplicationCacheGroup::didFail):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::deleteIfPossible):
* page/Chrome.cpp:
(WebCore::Chrome::scroll):
(WebCore::Chrome::runBeforeUnloadConfirmPanel):
(WebCore::Chrome::runJavaScriptAlert):
(WebCore::Chrome::runJavaScriptConfirm):
(WebCore::Chrome::runJavaScriptPrompt):
(WebCore::Chrome::mouseDidMoveOverElement):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchLoadEvent):
(WebCore::DOMWindow::dispatchEvent):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleTouchEvent): Add a guard to make it safe to pass event target by-reference.
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::mediaType):
(WebCore::FrameView::scheduleRelayout):
(WebCore::FrameView::scheduleRelayoutOfSubtree):
* page/PageConsoleClient.cpp:
(WebCore::PageConsoleClient::addMessage):
(WebCore::PageConsoleClient::messageWithTypeAndLevel):
(WebCore::PageConsoleClient::count):
(WebCore::PageConsoleClient::profile):
(WebCore::PageConsoleClient::profileEnd):
(WebCore::PageConsoleClient::time):
(WebCore::PageConsoleClient::timeEnd):
(WebCore::PageConsoleClient::timeStamp):
* page/Settings.cpp:
(WebCore::Settings::setScriptEnabled):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::layerBecameNonComposited):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
(WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
(WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEventIfNeeded):
* replay/ReplayController.cpp:
(WebCore::ReplayController::switchSession):
(WebCore::ReplayController::createSegment):
(WebCore::ReplayController::completeSegment):
(WebCore::ReplayController::loadSegmentAtIndex):
(WebCore::ReplayController::unloadSegment):
(WebCore::ReplayController::startCapturing):
(WebCore::ReplayController::stopCapturing):
(WebCore::ReplayController::startPlayback):
(WebCore::ReplayController::pausePlayback):
(WebCore::ReplayController::cancelPlayback):
(WebCore::ReplayController::willDispatchInput):
* testing/Internals.cpp:
(WebCore::Internals::consoleMessageArgumentCounts):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::callReadyStateChangeListener):

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

6 years agoGet rid of PassRefPtr from IPC::Connection
andersca@apple.com [Mon, 5 Jan 2015 21:11:44 +0000 (21:11 +0000)]
Get rid of PassRefPtr from IPC::Connection
https://bugs.webkit.org/show_bug.cgi?id=140092

Reviewed by Andreas Kling.

* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::DatabaseToWebProcessConnection):
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
* Platform/IPC/Connection.cpp:
(IPC::Connection::createServerConnection):
(IPC::Connection::createClientConnection):
(IPC::Connection::Connection):
* Platform/IPC/Connection.h:
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::WebProcessConnection):
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::initialize):
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching):
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didFinishLaunching):
* WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
(WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection):
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::NetworkProcessConnection):
* WebProcess/Plugins/PluginProcessConnection.cpp:
(WebKit::PluginProcessConnection::PluginProcessConnection):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::createInspectorPage):
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::establishConnection):

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

6 years agoURTBF after r177917.
ossy@webkit.org [Mon, 5 Jan 2015 20:59:29 +0000 (20:59 +0000)]
URTBF after r177917.

* UIProcess/WebBatteryManagerProxy.h:
* UIProcess/WebVibrationProxy.h:

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

6 years agoClean up Connection::SyncMessageState
andersca@apple.com [Mon, 5 Jan 2015 20:39:36 +0000 (20:39 +0000)]
Clean up Connection::SyncMessageState
https://bugs.webkit.org/show_bug.cgi?id=140087

Reviewed by Andreas Kling.

* Platform/IPC/Connection.cpp:
(IPC::Connection::SyncMessageState::syncMessageStateMapMutex):
Change this to return an std::mutex and use std::call_once to initialize it properly.

(IPC::Connection::SyncMessageState::getOrCreate):
Return a Ref.

(IPC::Connection::SyncMessageState::~SyncMessageState):
Use an std::lock_guard.

(IPC::Connection::SyncMessageState::processIncomingMessage):
Replace a bind call with a lambda.

(IPC::Connection::SyncMessageState::dispatchMessages):
ConnectionAndIncomingMessage now holds a Ref<Connection>.

(IPC::Connection::SyncMessageState::dispatchMessageAndResetDidScheduleDispatchMessagesForConnection):
Change Connection to a reference.

(IPC::Connection::processIncomingMessage):
Change Connection to a reference.

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

6 years agoClean up the storage manager some more
andersca@apple.com [Mon, 5 Jan 2015 20:07:20 +0000 (20:07 +0000)]
Clean up the storage manager some more
https://bugs.webkit.org/show_bug.cgi?id=140086

Reviewed by Andreas Kling.

Use lambdas instead of WTF::bind and get rid of a couple of internal functions.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::createSessionStorageNamespace):
(WebKit::StorageManager::destroySessionStorageNamespace):
(WebKit::StorageManager::setAllowedSessionStorageNamespaceConnection):
(WebKit::StorageManager::cloneSessionStorageNamespace):
(WebKit::StorageManager::processWillCloseConnection):
(WebKit::StorageManager::createSessionStorageNamespaceInternal): Deleted.
(WebKit::StorageManager::destroySessionStorageNamespaceInternal): Deleted.
(WebKit::StorageManager::setAllowedSessionStorageNamespaceConnectionInternal): Deleted.
(WebKit::StorageManager::cloneSessionStorageNamespaceInternal): Deleted.
(WebKit::StorageManager::invalidateConnectionInternal): Deleted.
* UIProcess/Storage/StorageManager.h:

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

6 years agoChange more connection pointers to references
andersca@apple.com [Mon, 5 Jan 2015 19:00:49 +0000 (19:00 +0000)]
Change more connection pointers to references
https://bugs.webkit.org/show_bug.cgi?id=140085

Reviewed by Andreas Kling.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::StorageArea::addListener):
(WebKit::StorageManager::StorageArea::removeListener):
(WebKit::StorageManager::createLocalStorageMap):
(WebKit::StorageManager::createTransientLocalStorageMap):
(WebKit::StorageManager::createSessionStorageMap):
(WebKit::StorageManager::destroyStorageMap):
(WebKit::StorageManager::getValues):
(WebKit::StorageManager::setItem):
(WebKit::StorageManager::removeItem):
(WebKit::StorageManager::clear):
(WebKit::StorageManager::applicationWillTerminate):
(WebKit::StorageManager::invalidateConnectionInternal):
(WebKit::StorageManager::findStorageArea):
* UIProcess/Storage/StorageManager.h:

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

6 years agoAfter updating tests to use kerning, ligatures, and printer fonts, some tests fail
ap@apple.com [Mon, 5 Jan 2015 18:50:24 +0000 (18:50 +0000)]
After updating tests to use kerning, ligatures, and printer fonts, some tests fail
https://bugs.webkit.org/show_bug.cgi?id=139968

* platform/mac/TestExpectations: Adding more flaky tests.

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

6 years agojs/dom/dfg-inline-resolve.html flakily times out
ap@apple.com [Mon, 5 Jan 2015 18:45:13 +0000 (18:45 +0000)]
js/dom/dfg-inline-resolve.html flakily times out
https://bugs.webkit.org/show_bug.cgi?id=140084

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

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

6 years agoChange more of the IPC code to take connections by reference
andersca@apple.com [Mon, 5 Jan 2015 18:38:15 +0000 (18:38 +0000)]
Change more of the IPC code to take connections by reference
https://bugs.webkit.org/show_bug.cgi?id=140083

Reviewed by Andreas Kling.

* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::didReceiveMessage):
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::didReceiveMessage):
(WebKit::DatabaseToWebProcessConnection::didReceiveSyncMessage):
* DatabaseProcess/DatabaseToWebProcessConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
(WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::didReceiveMessage):
(WebKit::NetworkProcess::didReceiveSyncMessage):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkResourceLoader.h:
* Platform/IPC/Connection.cpp:
(IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
(IPC::Connection::dispatchSyncMessage):
(IPC::Connection::dispatchMessage):
* Platform/IPC/Connection.h:
(IPC::Connection::waitForAndDispatchImmediately):
* Platform/IPC/MessageReceiver.h:
(IPC::MessageReceiver::didReceiveSyncMessage):
* Platform/IPC/MessageReceiverMap.cpp:
(IPC::MessageReceiverMap::dispatchMessage):
(IPC::MessageReceiverMap::dispatchSyncMessage):
* Platform/IPC/MessageReceiverMap.h:
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::didReceiveMessage):
* PluginProcess/PluginProcess.h:
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::didReceiveMessage):
(WebKit::WebProcessConnection::didReceiveSyncMessage):
* PluginProcess/WebProcessConnection.h:
* Scripts/webkit/messages.py:
(async_message_statement):
(sync_message_statement):
(generate_message_handler):
* Shared/API/Cocoa/RemoteObjectRegistry.h:
* Shared/Authentication/AuthenticationManager.h:
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::dispatchMessage):
(WebKit::ChildProcessProxy::dispatchSyncMessage):
* Shared/ChildProcessProxy.h:
* Shared/Network/CustomProtocols/CustomProtocolManager.h:
* Shared/Plugins/NPObjectMessageReceiver.h:
* Shared/Plugins/NPRemoteObjectMap.cpp:
(WebKit::NPRemoteObjectMap::didReceiveSyncMessage):
* Shared/Plugins/NPRemoteObjectMap.h:
* Shared/WebConnection.h:
* Shared/mac/SecItemShim.h:
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::didReceiveMessage):
* UIProcess/Databases/DatabaseProcessProxy.h:
* UIProcess/Downloads/DownloadProxy.h:
* UIProcess/DrawingAreaProxy.h:
* UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didReceiveMessage):
(WebKit::NetworkProcessProxy::didReceiveSyncMessage):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Plugins/PluginProcessProxy.h:
* UIProcess/Storage/StorageManager.h:
* UIProcess/UserContent/WebUserContentControllerProxy.h:
* UIProcess/VisitedLinkProvider.h:
* UIProcess/WebApplicationCacheManagerProxy.h:
* UIProcess/WebCookieManagerProxy.h:
* UIProcess/WebDatabaseManagerProxy.h:
* UIProcess/WebFullScreenManagerProxy.h:
* UIProcess/WebGeolocationManagerProxy.h:
* UIProcess/WebIconDatabase.h:
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebMediaCacheManagerProxy.h:
* UIProcess/WebOriginDataManagerProxy.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPasteboardProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::dispatchMessage):
(WebKit::WebProcessPool::dispatchSyncMessage):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didReceiveMessage):
(WebKit::WebProcessProxy::didReceiveSyncMessage):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebResourceCacheManagerProxy.h:
* UIProcess/ios/SmartMagnificationController.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/SecItemShimProxy.h:
* UIProcess/mac/ViewGestureController.h:
* WebProcess/ApplicationCache/WebApplicationCacheManager.h:
* WebProcess/Cookies/WebCookieManager.h:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
* WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
(WebKit::WebToDatabaseProcessConnection::didReceiveMessage):
* WebProcess/Databases/WebToDatabaseProcessConnection.h:
* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::didReceiveMessage):
* WebProcess/FullScreen/WebFullScreenManager.h:
* WebProcess/Geolocation/WebGeolocationManager.h:
* WebProcess/IconDatabase/WebIconDatabaseProxy.h:
* WebProcess/MediaCache/WebMediaCacheManager.h:
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didReceiveMessage):
(WebKit::NetworkProcessConnection::didReceiveSyncMessage):
* WebProcess/Network/NetworkProcessConnection.h:
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Notifications/WebNotificationManager.h:
* WebProcess/OriginData/WebOriginDataManager.h:
* WebProcess/Plugins/PluginProcessConnection.cpp:
(WebKit::PluginProcessConnection::didReceiveMessage):
(WebKit::PluginProcessConnection::didReceiveSyncMessage):
* WebProcess/Plugins/PluginProcessConnection.h:
* WebProcess/Plugins/PluginProcessConnectionManager.h:
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/ResourceCache/WebResourceCacheManager.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.h:
* WebProcess/Storage/StorageAreaMap.h:
* WebProcess/UserContent/WebUserContentController.h:
* WebProcess/WebCoreSupport/WebDatabaseManager.h:
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/WebPage/ViewGestureGeometryCollector.h:
* WebProcess/WebPage/ViewUpdateDispatcher.h:
* WebProcess/WebPage/VisitedLinkTableController.h:
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebInspectorUI.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceiveMessage):
(WebKit::WebPage::didReceiveSyncMessage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPageGroupProxy.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveSyncMessage):
(WebKit::WebProcess::didReceiveMessage):
* WebProcess/WebProcess.h:
* WebProcess/ios/WebVideoFullscreenManager.h:

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

6 years agoTried to fix the iOS build.
mitz@apple.com [Mon, 5 Jan 2015 18:36:03 +0000 (18:36 +0000)]
Tried to fix the iOS build.

* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processCharacterBufferForInBody):

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

6 years agoGet rid of some unnecessary custom StyleBuilder code
cdumez@apple.com [Mon, 5 Jan 2015 18:29:41 +0000 (18:29 +0000)]
Get rid of some unnecessary custom StyleBuilder code
https://bugs.webkit.org/show_bug.cgi?id=140058

Reviewed by Darin Adler.

Get rid of some unnecessary custom StyleBuilder code. The generator is
now able to generate this code just fine.

* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::csstoLengthConversionDataWithTextZoomFactor):
(WebCore::StyleBuilderConverter::convertWordSpacing):
(WebCore::StyleBuilderConverter::convertPerspective):
(WebCore::StyleBuilderConverter::convertMarqueeIncrement):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::convertLineHeight):
(WebCore::StyleBuilderCustom::applyValueWebkitMarqueeIncrement): Deleted.
(WebCore::StyleBuilderCustom::csstoLengthConversionDataWithTextZoomFactor): Deleted.
(WebCore::StyleBuilderCustom::applyValueWordSpacing): Deleted.
(WebCore::StyleBuilderCustom::applyValueWebkitPerspective): Deleted.

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

6 years agoPass IPC::Connection by reference to IPC message handlers
andersca@apple.com [Mon, 5 Jan 2015 18:17:11 +0000 (18:17 +0000)]
Pass IPC::Connection by reference to IPC message handlers
https://bugs.webkit.org/show_bug.cgi?id=140082

Reviewed by Darin Adler.

* Platform/IPC/HandleMessage.h:
(IPC::callMemberFunctionImpl):
(IPC::callMemberFunction):
(IPC::handleMessage):
(IPC::handleMessageDelayed):
* Scripts/webkit/messages.py:
(async_message_statement):
(sync_message_statement):
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::createLocalStorageMap):
(WebKit::StorageManager::createTransientLocalStorageMap):
(WebKit::StorageManager::createSessionStorageMap):
(WebKit::StorageManager::destroyStorageMap):
(WebKit::StorageManager::getValues):
(WebKit::StorageManager::setItem):
(WebKit::StorageManager::removeItem):
(WebKit::StorageManager::clear):
* UIProcess/Storage/StorageManager.h:
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::didPostMessage):
* UIProcess/UserContent/WebUserContentControllerProxy.h:
* UIProcess/WebGeolocationManagerProxy.cpp:
(WebKit::WebGeolocationManagerProxy::startUpdating):
(WebKit::WebGeolocationManagerProxy::stopUpdating):
(WebKit::WebGeolocationManagerProxy::setEnableHighAccuracy):
* UIProcess/WebGeolocationManagerProxy.h:
* UIProcess/WebOriginDataManagerProxy.cpp:
(WebKit::WebOriginDataManagerProxy::didGetOrigins):
(WebKit::WebOriginDataManagerProxy::didDeleteEntries):
(WebKit::WebOriginDataManagerProxy::didDeleteAllEntries):
* UIProcess/WebOriginDataManagerProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::handleMessage):
(WebKit::WebProcessPool::handleSynchronousMessage):
* UIProcess/WebProcessPool.h:
* UIProcess/mac/SecItemShimProxy.cpp:
(WebKit::SecItemShimProxy::secItemRequest):
* UIProcess/mac/SecItemShimProxy.h:

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

6 years agoediting/pasteboard/drag-and-drop-objectimage-contenteditable.html times out after...
ap@apple.com [Mon, 5 Jan 2015 18:16:07 +0000 (18:16 +0000)]
editing/pasteboard/drag-and-drop-objectimage-contenteditable.html times out after r177883.

* TestExpectations: Skip the test while Darin is working on a fix.

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

6 years ago[Mac] Cannot scroll when a non-scrollable iframe is contained inside a scrollable...
bfulgham@apple.com [Mon, 5 Jan 2015 18:11:56 +0000 (18:11 +0000)]
[Mac] Cannot scroll when a non-scrollable iframe is contained inside a scrollable iframe
https://bugs.webkit.org/show_bug.cgi?id=139914
<rdar://problem/18750910>

Reviewed by Darin Adler.

Source/WebCore:

Tests: platform/mac/fast/scrolling/scroll-nested-iframe.html

The latching logic was breaking down when a non-scrollable iframe was the closest target of
a wheel event. EventHandler would latch to the enclosing scrollable region (in this case, the
non-scrollable iframe) and would eat scroll events, preventing anything from working.

The fix is as follows:
1. Modify the logic to understand a stack of latched states, so that we can discared 'invalid'
   latched states as we discover them.
2. Revise the latching logic so that it understands the case where the 'latched' node for wheel
   events is in a parent frame of the current wheel event target. For example, when the mouse is over
   an element in an unscrollable iframe that is contained within a scrollable iframe. We should
   be latched to the scrollable iframe so events go to the right place.

* page/EventHandler.cpp:
(WebCore::EventHandler::handleWheelEvent): Update to call new 'stack' versions of latch
state methods.
(WebCore::EventHandler::clearLatchedState): Ditto.
(WebCore::EventHandler::defaultWheelEventHandler): Ditto.
* page/MainFrame.cpp: Update to store a stack of latched states. Provide methods to control
the lifetime of the stack and its elements.
(WebCore::MainFrame::MainFrame):
(WebCore::MainFrame::latchingState):
(WebCore::MainFrame::pushNewLatchingState):
(WebCore::MainFrame::resetLatchingState):
(WebCore::MainFrame::popLatchingState):
* page/MainFrame.h:
* page/mac/EventHandlerMac.mm:
(WebCore::latchingIsLockedToParentOfThisFrame): Added helper function.
(WebCore::EventHandler::platformPrepareForWheelEvents): Update to use new 'stack' style latch
methods. Also, if we are latched to a frame that contains the frame we are currently evaluating,
don't replace the current event target with the latched targets because (1) they will be processed
in the enclosing scope when we leave this routine, and (2) if we do change targets to the latched
elements we create an infinite loop.
(WebCore::EventHandler::platformCompleteWheelEvent): We want to mark the element as having started
at the scroll limit regardless of what the wheel event handler returns as its success state.
(WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Revise to handle the new
stack-based latching methods.

LayoutTests:

* platform/mac/fast/scrolling/scroll-nested-iframe-expected.txt: Added.
* platform/mac/fast/scrolling/scroll-nested-iframe.html: Added.
* platform/mac/fast/scrolling/resources/scroll_nested_iframe_test_inner.html: Added.
* platform/mac/fast/scrolling/resources/scroll_nested_iframe_test_outer.html: Added.

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

6 years agoQuick follow-up to last check-in, addressing review comments.
darin@apple.com [Mon, 5 Jan 2015 17:30:16 +0000 (17:30 +0000)]
Quick follow-up to last check-in, addressing review comments.

* html/parser/HTMLStackItem.h:
(WebCore::HTMLStackItem::HTMLStackItem): Use rvalue reference for incoming Ref.
(WebCore::HTMLStackItem::create): Ditto.

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

6 years agoModernize and streamline HTMLStackItem
darin@apple.com [Mon, 5 Jan 2015 17:11:40 +0000 (17:11 +0000)]
Modernize and streamline HTMLStackItem
https://bugs.webkit.org/show_bug.cgi?id=140056

Reviewed by Anders Carlsson.

* html/HTMLHtmlElement.cpp:
(WebCore::HTMLHtmlElement::create): Changed to return Ref.
* html/HTMLHtmlElement.h: Ditto.

* html/parser/HTMLConstructionSite.cpp:
(WebCore::hasImpliedEndTag): Update to use reference instead of pointer.
(WebCore::causesFosterParenting): Moved here from HTMLStackItem.h.
(WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML): Update
for references instead of pointers.
(WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody): Ditto.
(WebCore::HTMLConstructionSite::insertHTMLBodyStartTagInBody): Ditto.
(WebCore::HTMLConstructionSite::insertComment): Ditto.
(WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement): Ditto.
(WebCore::HTMLConstructionSite::insertHTMLHeadElement): Ditto.
(WebCore::HTMLConstructionSite::insertHTMLBodyElement): Ditto.
(WebCore::HTMLConstructionSite::insertHTMLFormElement): Ditto.
(WebCore::HTMLConstructionSite::insertHTMLElement): Ditto.
(WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement): Ditto.
(WebCore::HTMLConstructionSite::insertFormattingElement): Ditto.
(WebCore::HTMLConstructionSite::insertScriptElement): Ditto.
(WebCore::HTMLConstructionSite::insertForeignElement): Ditto.
(WebCore::HTMLConstructionSite::insertTextNode): Ditto.
(WebCore::HTMLConstructionSite::reparent): Ditto.
(WebCore::HTMLConstructionSite::insertAlreadyParsedChild): Ditto.
(WebCore::HTMLConstructionSite::takeAllChildren): Ditto.
(WebCore::HTMLConstructionSite::ownerDocumentForCurrentNode): Ditto.
(WebCore::HTMLConstructionSite::createElementFromSavedToken): Ditto.
(WebCore::HTMLConstructionSite::indexOfFirstUnopenFormattingElement): Ditto.
(WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements): Ditto.
(WebCore::HTMLConstructionSite::generateImpliedEndTagsWithExclusion): Ditto.
(WebCore::HTMLConstructionSite::findFosterSite): Ditto.
(WebCore::HTMLConstructionSite::shouldFosterParent): Removed unneeded
isElementNode check, since causesFosterParenting will return false for a
document fragment node.

* html/parser/HTMLConstructionSite.h: Updated to use references instead of
pointers. Also removed the unneeded currentElementRecord function.

* html/parser/HTMLElementStack.cpp:
(WebCore::HTMLNames::isRootNode): Updated to use references instead of pointers.
(WebCore::HTMLNames::isScopeMarker): Ditto.
(WebCore::HTMLNames::isListItemScopeMarker): Ditto.
(WebCore::HTMLNames::isTableScopeMarker): Ditto.
(WebCore::HTMLNames::isTableBodyScopeMarker): Ditto.
(WebCore::HTMLNames::isTableRowScopeMarker): Ditto.
(WebCore::HTMLNames::isForeignContentScopeMarker): Ditto.
(WebCore::HTMLNames::isButtonScopeMarker): Ditto.
(WebCore::HTMLNames::isSelectScopeMarker): Ditto.
(WebCore::HTMLElementStack::ElementRecord::replaceElement): Ditto.
(WebCore::HTMLElementStack::hasOnlyOneElement): Ditto.
(WebCore::HTMLElementStack::popHTMLHeadElement): Ditto.
(WebCore::HTMLElementStack::popHTMLBodyElement): Ditto.
(WebCore::HTMLElementStack::popAll): Ditto.
(WebCore::HTMLElementStack::pop): Ditto.
(WebCore::HTMLElementStack::popUntil): Ditto.
(WebCore::HTMLElementStack::popUntilNumberedHeaderElementPopped): Ditto.
(WebCore::HTMLElementStack::isMathMLTextIntegrationPoint): Ditto. Also removed
unneeded isElementNode check.
(WebCore::HTMLElementStack::isHTMLIntegrationPoint): Ditto.
(WebCore::HTMLElementStack::pushRootNode): Ditto.
(WebCore::HTMLElementStack::pushRootNodeCommon): Ditto.
(WebCore::HTMLElementStack::pushHTMLHeadElement): Ditto.
(WebCore::HTMLElementStack::pushHTMLBodyElement): Ditto.
(WebCore::HTMLElementStack::insertAbove): Ditto.
(WebCore::HTMLElementStack::topRecord): Ditto.
(WebCore::HTMLElementStack::oneBelowTop): Ditto.
(WebCore::HTMLElementStack::removeHTMLHeadElement): Ditto.
(WebCore::HTMLElementStack::remove): Ditto.
(WebCore::HTMLElementStack::find): Ditto.
(WebCore::HTMLElementStack::topmost): Ditto.
(WebCore::inScopeCommon): Ditto.
(WebCore::HTMLElementStack::hasNumberedHeaderElementInScope): Ditto.
(WebCore::HTMLElementStack::inScope): Ditto.
(WebCore::HTMLElementStack::htmlElement): Ditto.
(WebCore::HTMLElementStack::headElement): Ditto.
(WebCore::HTMLElementStack::bodyElement): Ditto.
(WebCore::HTMLElementStack::rootNode): Ditto.
(WebCore::HTMLElementStack::popCommon): Ditto.
(WebCore::HTMLElementStack::removeNonTopCommon): Ditto.
(WebCore::HTMLElementStack::furthestBlockForFormattingElement): Ditto.
(WebCore::HTMLElementStack::show): Ditto.

* html/parser/HTMLElementStack.h: Use reference instead of pointer.

* html/parser/HTMLFormattingElementList.cpp:
(WebCore::HTMLFormattingElementList::closestElementInScopeWithName): Update
to use references instead of pointer.
(WebCore::HTMLFormattingElementList::swapTo): Ditto.
(WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly): Ditto.
(WebCore::HTMLFormattingElementList::ensureNoahsArkCondition): Ditto.
(WebCore::HTMLFormattingElementList::show): Ditto.

* html/parser/HTMLFormattingElementList.h: Use reference instead of pointer
and a raw pointer instead of a RefPtr.

* html/parser/HTMLStackItem.h: Removed unneeded includes. Got rid of "type"
concept and simply overload the create functions and constructors for both
Element and DOcumentFragment. Renamed isElementNode and isDocumentFragmentNode
to remove the "Node" suffix. Removed unused getAttributeItem, hasLocalName, and
one of the overloads of matchesHTMLTag. Moved all the policy functions such as
causesFosterParenting out of this class into free functions or into other
source files. Got rid of m_isDocumentFragmentNode boolean. Moved function
bodies out of the class definition. Marked all data members const since they
are all initialized in the constructor and never touched again. Restructured
the isSpecialNode function to avoid the repeated checks of the namespace.

* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::isParsingTemplateContents): Use reference instead of
pointer and free functions instead of member functions.
(WebCore::HTMLTreeBuilder::HTMLTreeBuilder): Ditto.
(WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext): Ditto.
(WebCore::HTMLTreeBuilder::FragmentParsingContext::contextElement): Ditto.
(WebCore::HTMLTreeBuilder::constructTree): Ditto.
(WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope): Ditto.
(WebCore::HTMLTreeBuilder::processCloseWhenNestedTag): Ditto.
(WebCore::HTMLTreeBuilder::processStartTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processTemplateStartTag): Ditto.
(WebCore::HTMLTreeBuilder::processTemplateEndTag): Ditto.
(WebCore::HTMLTreeBuilder::processColgroupEndTagForInColumnGroup): Ditto.
(WebCore::HTMLTreeBuilder::closeTheCell): Ditto.
(WebCore::HTMLTreeBuilder::processStartTagForInTable): Ditto.
(WebCore::HTMLTreeBuilder::processStartTag): Ditto.
(WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processBodyEndTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::callTheAdoptionAgency): Ditto.
(WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately): Ditto.
(WebCore::HTMLTreeBuilder::processEndTagForInTableBody): Ditto.
(WebCore::HTMLTreeBuilder::processEndTagForInRow): Ditto.
(WebCore::HTMLTreeBuilder::processEndTagForInCell): Ditto.
(WebCore::HTMLTreeBuilder::processEndTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption): Ditto.
(WebCore::HTMLTreeBuilder::processTrEndTagForInRow): Ditto.
(WebCore::HTMLTreeBuilder::processTableEndTagForInTable): Ditto.
(WebCore::HTMLTreeBuilder::processEndTag): Ditto.
(WebCore::HTMLTreeBuilder::processCharacterBuffer): Ditto.
(WebCore::HTMLTreeBuilder::processEndOfFile): Ditto.
(WebCore::HTMLTreeBuilder::adjustedCurrentStackItem): Ditto.
(WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent): Ditto.
(WebCore::HTMLTreeBuilder::processTokenInForeignContent): Ditto.

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

6 years ago[WinCairo] Crash when font data pointer is null.
commit-queue@webkit.org [Mon, 5 Jan 2015 15:05:46 +0000 (15:05 +0000)]
[WinCairo] Crash when font data pointer is null.
https://bugs.webkit.org/show_bug.cgi?id=139969

Patch by peavo@outlook.com <peavo@outlook.com> on 2015-01-05
Reviewed by Darin Adler.

Source/WebCore:

Added null pointer check.

Test: fonts/unicode-character-font-crash.html

* platform/graphics/win/UniscribeController.cpp:
(WebCore::UniscribeController::advance):
(WebCore::UniscribeController::shape):

LayoutTests:

* fonts/unicode-character-font-crash-expected.txt: Added.
* fonts/unicode-character-font-crash.html: Added.

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

6 years ago[EFL][GTK] WKPreferencesDefaults test failed after r177506
commit-queue@webkit.org [Mon, 5 Jan 2015 13:07:59 +0000 (13:07 +0000)]
[EFL][GTK] WKPreferencesDefaults test failed after r177506
https://bugs.webkit.org/show_bug.cgi?id=140077

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-01-05
Reviewed by Csaba Osztrogon√°c.

WebKit C SPI is available on EFL,GTK.
Changed the define order to pass the API test.

* TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp:
(TestWebKitAPI::TEST):

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