WebKit-https.git
8 years agoMyles C. Maxfield is a committer now
mmaxfield@apple.com [Fri, 20 Dec 2013 20:54:03 +0000 (20:54 +0000)]
Myles C. Maxfield is a committer now

Unreviewed.

* Scripts/webkitpy/common/config/contributors.json:

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

8 years agohttp/tests/misc/object-image-error.html asserts
antti@apple.com [Fri, 20 Dec 2013 20:49:23 +0000 (20:49 +0000)]
http/tests/misc/object-image-error.html asserts
https://bugs.webkit.org/show_bug.cgi?id=126074

Reviewed by Andreas Kling.

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAttachRenderers):
(WebCore::HTMLPlugInImageElement::updateWidgetCallback):
(WebCore::HTMLPlugInImageElement::startLoadingImage):
(WebCore::HTMLPlugInImageElement::startLoadingImageCallback):
* html/HTMLPlugInImageElement.h:

    Start image load from post-attach so we don't re-enter attach when image load fails synchronously.

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

8 years agoClean up DFG write barriers
mhahnenberg@apple.com [Fri, 20 Dec 2013 20:19:59 +0000 (20:19 +0000)]
Clean up DFG write barriers
https://bugs.webkit.org/show_bug.cgi?id=126047

Reviewed by Filip Pizlo.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::storeToWriteBarrierBuffer): Use the register allocator to
determine which registers need saving instead of saving every single one of them.
(JSC::DFG::SpeculativeJIT::osrWriteBarrier): We don't need to save live register state
because the write barriers during OSR execute when there are no live registers. Also we
don't need to use pushes to pad the stack pointer for pokes on x86; we can just use an add.
(JSC::DFG::SpeculativeJIT::writeBarrier):
* dfg/DFGSpeculativeJIT.h:
* jit/Repatch.cpp:
(JSC::emitPutReplaceStub):
(JSC::emitPutTransitionStub):
* runtime/VM.h: Get rid of writeBarrierRegisterBuffer since it's no longer used.

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

8 years ago[GTK] WebKitWebViewBase's ClickCounter should be reset
commit-queue@webkit.org [Fri, 20 Dec 2013 19:45:21 +0000 (19:45 +0000)]
[GTK] WebKitWebViewBase's ClickCounter should be reset
https://bugs.webkit.org/show_bug.cgi?id=122551

Patch by Enrique Ocaña González <eocanha@igalia.com> on 2013-12-20
Reviewed by Martin Robinson.

* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::didCommitLoadForMainFrame):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseResetClickCounter):
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:

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

8 years agoCrashes in AccessibilityRenderObject::computeAccessibilityIsIgnored()
antti@apple.com [Fri, 20 Dec 2013 19:05:34 +0000 (19:05 +0000)]
Crashes in AccessibilityRenderObject::computeAccessibilityIsIgnored()
https://bugs.webkit.org/show_bug.cgi?id=126073

Reviewed by Ryosuke Niwa.

Prevent the crash and try to catch in debug why it is happening.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
(WebCore::AccessibilityRenderObject::~AccessibilityRenderObject):
(WebCore::AccessibilityRenderObject::detach):
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
* accessibility/AccessibilityRenderObject.h:

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

8 years ago[Win] Unreviewed build fix after r160908.
bfulgham@apple.com [Fri, 20 Dec 2013 17:27:19 +0000 (17:27 +0000)]
[Win] Unreviewed build fix after r160908.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Add
missing export.

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

8 years agoFix asserting accesibility tests.
antti@apple.com [Fri, 20 Dec 2013 16:50:53 +0000 (16:50 +0000)]
Fix asserting accesibility tests.

* html/HTMLElement.cpp:
(WebCore::HTMLElement::supportsFocus): Accessibility code checks focus status during painting.

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

8 years ago[MIPS] Missing MacroAssemblerMIPS::branchTest8(ResultCondition, BaseIndex, TrustedImm32)
commit-queue@webkit.org [Fri, 20 Dec 2013 15:51:00 +0000 (15:51 +0000)]
[MIPS] Missing MacroAssemblerMIPS::branchTest8(ResultCondition, BaseIndex, TrustedImm32)
https://bugs.webkit.org/show_bug.cgi?id=126062

Patch by Balazs Kilvady <kilvadyb@homejinni.com> on 2013-12-20
Reviewed by Mark Hahnenberg.

* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::branchTest8):

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

8 years ago[sh4] Add missing implementation in MacroAssembler to fix build.
commit-queue@webkit.org [Fri, 20 Dec 2013 15:48:46 +0000 (15:48 +0000)]
[sh4] Add missing implementation in MacroAssembler to fix build.
https://bugs.webkit.org/show_bug.cgi?id=126063

Patch by Julien Brianceau <jbriance@cisco.com> on 2013-12-20
Reviewed by Mark Hahnenberg.

* assembler/MacroAssemblerSH4.h:
(JSC::MacroAssemblerSH4::branchTest8):

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

8 years ago[arm] Add missing implementation in MacroAssembler to fix CPU(ARM_TRADITIONAL) build.
commit-queue@webkit.org [Fri, 20 Dec 2013 15:46:34 +0000 (15:46 +0000)]
[arm] Add missing implementation in MacroAssembler to fix CPU(ARM_TRADITIONAL) build.
https://bugs.webkit.org/show_bug.cgi?id=126064

Patch by Julien Brianceau <jbriance@cisco.com> on 2013-12-20
Reviewed by Mark Hahnenberg.

* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::branchTest8):

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

8 years agoUnreviewed GTK build fix after r160909.
zandobersek@gmail.com [Fri, 20 Dec 2013 15:36:56 +0000 (15:36 +0000)]
Unreviewed GTK build fix after r160909.
Remove remaining uses of AttachLazily in code specific to the GTK port.

* html/shadow/MediaControlsGtk.cpp:
(WebCore::MediaControlsGtk::initializeControls):
(WebCore::MediaControlsGtk::createTextTrackDisplay):

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

8 years ago[GTK] The fullscreen API should be enabled by default
commit-queue@webkit.org [Fri, 20 Dec 2013 14:58:40 +0000 (14:58 +0000)]
[GTK] The fullscreen API should be enabled by default
https://bugs.webkit.org/show_bug.cgi?id=125993

Patch by Enrique Ocaña González <eocanha@igalia.com> on 2013-12-20
Reviewed by Gustavo Noronha Silva.

Set the WebSettings property to TRUE

Source/WebKit/gtk:

* webkit/webkitwebsettings.cpp:
(webkit_web_settings_class_init):

Source/WebKit2:

* UIProcess/API/gtk/WebKitSettings.cpp:
(webkit_settings_class_init):

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

8 years agoCreate render tree lazily
antti@apple.com [Fri, 20 Dec 2013 14:44:23 +0000 (14:44 +0000)]
Create render tree lazily
https://bugs.webkit.org/show_bug.cgi?id=120685

Source/WebCore:

Reviewed by Andreas Kling.

We currently recompute style and construct renderer for each DOM node immediately after they are added to
the tree. This is often inefficient as the style may change immediately afterwards and the work needs to be
redone.

With this patch we always compute style and construct render tree lazily, either on style recalc timer or
synchronously when they are needed. It also removes the 'attached' bit. If document has render tree then
all nodes are conceptually "attached" even if this happens lazily.

The patch slightly changes behavior of implicit CSS transitions. A synchronous style change during parsing
may not trigger the animation anymore as laziness means we don't see anything changing. This matches Firefox
and Chrome in our test cases.

* WebCore.exp.in:
* bindings/js/JSNodeCustom.cpp:
(WebCore::JSNode::insertBefore):
(WebCore::JSNode::replaceChild):
(WebCore::JSNode::appendChild):

    All attaching is now lazy, remove AttachLazily.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):

    SVG renderers with !isValid() have empty display property value for some reason. Keep the behavior.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::parserInsertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::appendChild):
(WebCore::ContainerNode::parserAppendChild):
(WebCore::ContainerNode::updateTreeAfterInsertion):
* dom/ContainerNode.h:
* dom/Document.cpp:
(WebCore::Document::~Document):
(WebCore::Document::updateStyleIfNeeded):
(WebCore::Document::createRenderTree):
(WebCore::Document::destroyRenderTree):

    Remove attach bit maintenance.

(WebCore::Document::webkitDidExitFullScreenForElement):

    Do lazy render tree reconstruction after returning from full screen. That is the only reliable way
    to get the render tree back to decent shape.

* dom/Element.cpp:
(WebCore::Element::isFocusable):

    Remove pointless !renderer()->needsLayout() assert.

(WebCore::Element::addShadowRoot):
(WebCore::Element::childShouldCreateRenderer):
(WebCore::Element::resetComputedStyle):

    Take care to reset computed style in all descendants. attachRenderTree no longer does this.

* dom/Element.h:
* dom/Node.cpp:
(WebCore::Node::insertBefore):
(WebCore::Node::replaceChild):
(WebCore::Node::appendChild):
(WebCore::Node::setNeedsStyleRecalc):

    Propagate ReconstructRenderTree.

(WebCore::Node::attached):

    Emulate the behavior of old attached bit for now so existing code calling this mostly stays working.

* dom/Node.h:

    Add new ReconstructRenderTree value for StyleChangeType.

* dom/Range.cpp:
(WebCore::Range::isPointInRange):
(WebCore::Range::comparePoint):
(WebCore::Range::compareNode):
(WebCore::Range::intersectsNode):
* editing/AppendNodeCommand.cpp:
(WebCore::AppendNodeCommand::doApply):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::canRebalance):
* editing/InsertNodeBeforeCommand.cpp:
(WebCore::InsertNodeBeforeCommand::doApply):
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::activeElement):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setInnerText):

    TextControlInnerTextElement always preserves newline even if it doesn't have style yet.

(WebCore::HTMLElement::supportsFocus):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::parseAttribute):
* html/HTMLFormControlElement.cpp:
(WebCore::shouldAutofocus):

    Don't autofocus until we have renderer.

* html/HTMLFormControlElementWithState.cpp:
(WebCore::HTMLFormControlElementWithState::shouldSaveAndRestoreFormControlState):
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::didNotifySubtreeInsertions):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):

    Lazy render tree construction.

(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::defaultEventHandler):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseAttribute):
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::didAddUserAgentShadowRoot):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::executeTask):

    Don't attach renderer after construction.

* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::invalidateDistribution):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::willAttachRenderers):
(WebCore::InsertionPoint::willDetachRenderers):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::createTextTrackDisplay):
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::createControls):
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::getDisplayTree):
* loader/PlaceholderDocument.cpp:
(WebCore::PlaceholderDocument::createRenderTree):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::preload):
* style/StyleResolveTree.cpp:
(WebCore::Style::attachTextRenderer):
(WebCore::Style::detachTextRenderer):

    Remove attached bit maintenance.

(WebCore::Style::attachChildren):
(WebCore::Style::attachShadowRoot):
(WebCore::Style::attachRenderTree):
(WebCore::Style::detachShadowRoot):
(WebCore::Style::detachRenderTree):
(WebCore::Style::resolveLocal):
* svg/SVGTests.cpp:
(WebCore::SVGTests::handleAttributeChange):

    Make lazy.

* testing/Internals.cpp:
(WebCore::Internals::attached):
(WebCore::Internals::elementRenderTreeAsText):
(WebCore::Internals::markerAt):
(WebCore::Internals::nodesFromRect):

LayoutTests:

Reviewed by Andreas Kling.

Most of these are non-visible render tree dump changes (they become simpler).

* editing/selection/click-on-head-margin-expected.txt:
* fast/css-generated-content/before-content-continuation-chain-expected.txt:
* fast/css/transition-color-unspecified.html:
* fast/dom/adopt-node-crash-2-expected.txt:
* fast/dom/modify-node-and-while-in-the-callback-too-crash-expected.txt:
* fast/forms/radio/radio_checked_dynamic-expected.txt:
* fast/frames/lots-of-iframes-expected.txt:
* fast/frames/sandboxed-iframe-autofocus-denied-expected.txt:
* fast/table/table-row-style-not-updated-with-after-content-expected.txt:
* fullscreen/full-screen-render-inline-expected.txt:
* fullscreen/parent-flow-inline-with-block-child-expected.txt:
* platform/mac/editing/inserting/break-blockquote-after-delete-expected.txt:
* platform/mac/fast/css-generated-content/table-row-group-to-inline-expected.txt:
* platform/mac/fast/dynamic/011-expected.txt:
* platform/mac/fast/forms/formmove3-expected.txt:
* platform/mac/fast/forms/preserveFormDuringResidualStyle-expected.txt:
* platform/mac/fast/invalid/001-expected.txt:
* platform/mac/fast/invalid/003-expected.txt:
* platform/mac/fast/invalid/004-expected.txt:
* platform/mac/fast/invalid/007-expected.txt:
* platform/mac/fast/invalid/019-expected.txt:
* platform/mac/fast/multicol/span/span-as-immediate-child-generated-content-expected.txt:
* platform/mac/fast/multicol/span/span-as-immediate-columns-child-dynamic-expected.txt:
* platform/mac/fast/multicol/span/span-as-nested-columns-child-dynamic-expected.txt:
* platform/mac/fast/ruby/ruby-base-merge-block-children-crash-expected.txt:
* platform/mac/tables/mozilla/bugs/bug113235-1-expected.txt:
* platform/mac/tables/mozilla/bugs/bug647-expected.txt:
* platform/mac/tables/mozilla/other/wa_table_tr_align-expected.txt:
* plugins/plugin-remove-readystatechange-expected.txt:
* svg/custom/system-language-crash-expected.txt:
* transitions/equivalent-background-image-no-transition.html:
* transitions/repeated-firing-background-color.html:
* transitions/transition-duration-cleared-in-transitionend-crash.html:

    Adopt a few transition test cases to new behavior.

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

8 years ago[ATK] [WK2] platform/gtk/accessibility/roles-exposed.html is failing
mario.prada@samsung.com [Fri, 20 Dec 2013 14:12:04 +0000 (14:12 +0000)]
[ATK] [WK2] platform/gtk/accessibility/roles-exposed.html is failing
https://bugs.webkit.org/show_bug.cgi?id=125854

Reviewed by Chris Fleizach.

Tools:

Ensure we don't ever create instances of AccessibilityUIElement
wrapping invalid platform-specific accessibility objects in DRT,
both for consistency with what WKTR does (so we avoid situations
where some tests fail in WK2 and not in WK1) and also to avoid
overlooking tests that might not be checking the right thing.

* DumpRenderTree/AccessibilityUIElement.cpp:
(AccessibilityUIElement::makeJSAccessibilityUIElement): Return a
nullPtr if the platformUIElement() is not a valid one.
* DumpRenderTree/AccessibilityUIElement.h:
(AccessibilityUIElement::platformUIElement): Added const modifier.

LayoutTests:

Updated tests and expectations to keep them passing after the
change done in DRT, without changing their actual purpose.

* platform/gtk/accessibility/roles-exposed.html: Make sure we
print "AXRole: (no element)" when accessibilityElementByID() does
not return a valid object, not to confuse it with cases where the
returned string for the role is an empty string.
* platform/gtk/accessibility/roles-exposed-expected.txt: Update
test expectations to reflect the "AXRole: (no element)" string
that is now being exposed. Also, replace the (wrongly added) PASS
expectations with FAIL for rowgroups, which are currently not
being exposed for ATK either.

* accessibility/deleting-iframe-destroys-axcache.html: Just
consider the first and third sons of the accessibility object for
the body (instead of the grandsons), so the test can run both in
Mac, where sons and grandsons are exposed, and ATK, where only
sons are exposed (no StaticText objects exposed there).

* accessibility/non-data-table-cell-title-ui-element.html: Use
accessibilityElementById() to get the accessibility object for the
"skip" table header instead of navigating with childAtIndex(),
since the hierarchy is not the same for Mac and ATK based ports.

* platform/mac/accessibility/search-predicate.html: Do not rely on
shouldBe() together with the string "AXRole: " when asking for the
role of objects that should no longer be in the accessibility
tree, and use shouldBeUndefined() instead.
* platform/mac/accessibility/search-when-element-starts-in-table.html: Ditto.

* platform/mac/accessibility/search-predicate-expected.txt: Update
expectations according to the usage of shouldBeUndefined().
* platform/mac/accessibility/search-when-element-starts-in-table-expected.txt: Ditto.

* platform/mac/TestExpectations: Add loading-iframe-updates-axtree.html
here, since it seems not to be returning the expected values for
either the scrollarea and the webarea in the iframe (see bug 126066).

* platform/mac-wk2/TestExpectations: Add search-when-element-starts-in-table.html
here, since it does not return an undefined object in WebKit2 when
the search query should return no results (see bug 125996).

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

8 years agoDevirtualize RenderElement::setStyle().
akling@apple.com [Fri, 20 Dec 2013 13:47:42 +0000 (13:47 +0000)]
Devirtualize RenderElement::setStyle().
<https://webkit.org/b/126065>

setStyle() was only virtual in order to let RenderSVGBlock override
the display type in some cases. Devirtualized it and moved the fixup
logic to StyleResolver::adjustRenderStyle().

This hack had an evil twin in RenderElement::initializeStyle() that
also goes away. FIXME--!

Based on a Blink change by Elliott Sprehn.

Reviewed by Antti Koivisto.

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

8 years ago[CSS Regions] When changing flow-from/flow-into on :hover, elements overflowing the...
stavila@adobe.com [Fri, 20 Dec 2013 13:44:45 +0000 (13:44 +0000)]
[CSS Regions] When changing flow-from/flow-into on :hover, elements overflowing the region are not correctly repainted
https://bugs.webkit.org/show_bug.cgi?id=117259

Reviewed by Antti Koivisto.

Source/WebCore:

When computing the repaint rect for a region, the existing visual overflow must be taken into consideration.
For this purpose, I overridden the visualOverflowRect method in RenderNamedFlowFragment, which ends up being
called from RenderBox::clippedOverflowRectForRepaint.

Test: fast/regions/hover-single-flow-from-none-overflow.html
      fast/regions/hover-single-flow-from-none-overflow-top.html

* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::visualOverflowRect):
* rendering/RenderNamedFlowFragment.h:

LayoutTests:

Added new tests and rebased existing test.

* fast/regions/hover-single-flow-from-none-overflow-expected.html: Added.
* fast/regions/hover-single-flow-from-none-overflow.html: Added.
* fast/regions/hover-single-flow-from-none-overflow-top-expected.html: Added.
* fast/regions/hover-single-flow-from-none-overflow-top.html: Added.
* fast/regions/repaint/repaint-regions-overflow-expected.txt: Rebased.

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

8 years ago[GTK] Some unit tests using web extensions fail when run alone
carlosgc@webkit.org [Fri, 20 Dec 2013 12:11:45 +0000 (12:11 +0000)]
[GTK] Some unit tests using web extensions fail when run alone
https://bugs.webkit.org/show_bug.cgi?id=126002

Reviewed by Gustavo Noronha Silva.

The problem is that the page is created before the dbus connection
has been established, and we are connecting to web-page-created
signal once we have a valid dbus connection. We should connect to
the signal before connecting to dbus and queue any request to emit
a dbus signal until the connection is set. This also fixes the
WebExtensions tests when using the network process because a new
web process is launched for every test case.

* UIProcess/API/gtk/tests/WebExtensionTest.cpp:
(DelayedSignal::DelayedSignal): Helper struct to queue signal
emissions requested before the dbus connection has been
established.
(emitDocumentLoaded): Emit the dbus DocumentLoaded signal.
(documentLoadedCallback): Queue the signal emission if we still
don't have a connection or call emitDocumentLoaded otherwise.
(emitURIChanged): Emit the dbus URIChanged signal.
(uriChangedCallback): Queue the signal emission if we still don't
have a connection or call emitURIChanged otherwise.
(pageCreatedCallback): Pass the web extension as user data to
document-loaded and uri-changed callbacks.
(busAcquiredCallback): Set the connection as user data of the web
extension and process any delayed signal emission pending.
(webkit_web_extension_initialize): Connect to web-page-create
signal before connecting to dbus.

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

8 years agoProgrammatically-inserted children lack accessibility events
mario.prada@samsung.com [Fri, 20 Dec 2013 11:52:17 +0000 (11:52 +0000)]
Programmatically-inserted children lack accessibility events
https://bugs.webkit.org/show_bug.cgi?id=100275

Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/children-changed-sends-notification.html

Emit children-changed::add and children-changed::remove whenever
an object has been added/removed to the accessibility hierarchy,
that is, when a new AtkObject is being attached/detached.

* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::detachWrapper): Added a new parameter and
updated all the prototypes in different ports.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::~AXObjectCache): Call detachWrapper()
specifying that we do it because the cache is being destroyed.
(WebCore::AXObjectCache::remove): Call detachWrapper() specifying
that we do it because an accessible element is being destroyed.

* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::detachWrapper): Emit the children-changed
signal when needed. We rely on the cached reference to the parent
AtkObject (using the implementation of atk_object_get_parent from
the AtkObject class) to find the right object to emit the signal
from here, since the accessibility hierarchy from WebCore will no
longer be accessible at this point.
(WebCore::AXObjectCache::attachWrapper): Emit the children-change
signal from here unless we are in the middle of a layout update,
trying to provide as much information (e.g. the offset) as possible.
(WebCore::AXObjectCache::postPlatformNotification): Make sure we
update (touch) the subtree under an accessibility object whenever
we receive AXChildrenChanded from WebCore, to ensure that those
objects will also be visible rightaway to ATs, and that those get
properly notified of the event at that very same moment.

* accessibility/ios/AXObjectCacheIOS.mm:
(WebCore::AXObjectCache::detachWrapper): Updated function signature.
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::detachWrapper): Ditto.
* accessibility/win/AXObjectCacheWin.cpp:
(WebCore::AXObjectCache::detachWrapper): Ditto.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::children): Add the option ot
request the AccessibilityChildrenVector without updating it if
needed, to avoid maybe recreating the child subtree when trying to
get the offset of a newly attached element from attachWrapper.
* accessibility/AccessibilityObject.h:

Tools:

Update DRT and WebKitTestRunner to handle the children-changed
signal properly, considering the detail and optional parameters.

* DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp: Updated.
(axObjectEventListener):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp: Updated.

LayoutTests:

Add new test to chack that children-changed signals are properly
emitted when adding/removing elements in the accessibility hierarchy.

* accessibility/children-changed-sends-notification-expected.txt: Added.
* accessibility/children-changed-sends-notification.html: Added.

Update test to filter out unrelated non-loading events.
* accessibility/loading-iframe-sends-notification.html: Updated.

Skip the test on the Mac as it does not expose these kind of
notifications when children are being added or removed.
* platform/mac/TestExpectations: Skip newly added test.

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

8 years agoRemoved unused BUILDER_BASE_URL.
ossy@webkit.org [Fri, 20 Dec 2013 11:28:40 +0000 (11:28 +0000)]
Removed unused BUILDER_BASE_URL.
https://bugs.webkit.org/show_bug.cgi?id=125442

Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-12-20
Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py:
(JSONGeneratorTest._test_json_generation): Trivial test fix after r160900.

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

8 years agoMove function calls outside loop in dom
commit-queue@webkit.org [Fri, 20 Dec 2013 11:02:18 +0000 (11:02 +0000)]
Move function calls outside loop in dom
https://bugs.webkit.org/show_bug.cgi?id=125916

Patch by Laszlo Vidacs <lvidacs.u-szeged@partner.samsung.com> on 2013-12-20
Reviewed by Csaba Osztrogonác.

Do not call length() in each iteration.

* dom/Element.cpp:
(WebCore::Element::cloneAttributesFromElement):
* dom/Node.cpp:
(WebCore::Node::dumpStatistics):

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

8 years agoRemoved unused BUILDER_BASE_URL.
commit-queue@webkit.org [Fri, 20 Dec 2013 11:00:51 +0000 (11:00 +0000)]
Removed unused BUILDER_BASE_URL.
https://bugs.webkit.org/show_bug.cgi?id=125442

Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-12-20
Reviewed by Csaba Osztrogonác.

The string constant BUILDER_BASE_URL is passed around several times,
but we don't use it anywhere. It is a leftover from Chromium, cleaned it up.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._upload_json_files):
* Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:
(JSONLayoutResultsGenerator.__init__):
* Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
(JSONResultsGenerator.__init__):

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

8 years agoBuild fails in debug mode after r160834.
commit-queue@webkit.org [Fri, 20 Dec 2013 10:52:32 +0000 (10:52 +0000)]
Build fails in debug mode after r160834.
https://bugs.webkit.org/show_bug.cgi?id=126059

Patch by Tamas Gergely <tgergely.u-szeged@partner.samsung.com> on 2013-12-20
Reviewed by Csaba Osztrogonác.

Debug mode build failed due to comparing signed and unsigned in
ASSERT(). Now both values are unsigned.

* wtf/dtoa/double-conversion.cc:

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

8 years agoREGRESSION: cnn.com will continue to reveal 1 px of overhang after rubber-banding
bdakin@apple.com [Fri, 20 Dec 2013 07:20:20 +0000 (07:20 +0000)]
REGRESSION: cnn.com will continue to reveal 1 px of overhang after rubber-banding
at the top
https://bugs.webkit.org/show_bug.cgi?id=126054

Reviewed by Simon Fraser.

This regression was caused by http://trac.webkit.org/changeset/160791 It turns out
that the line of code I removed was not always a no-op. In some instances, like on
cnn.com, it would ensure that our final scroll position after a rubber-band was
not something within the overhang area. It was still wrong in its assumption that
rubber-band is always bouncing back the spot it originated from. So this patch
continues to ignore the rubber-bands origin, and instead finds the nearest point
that is not in the overhang area, and scrolls to that point instead of the origin.

* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::adjustScrollPositionToBoundsIfNecessary):
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::adjustScrollPositionToBoundsIfNecessary):
* platform/mac/ScrollElasticityController.h:
* platform/mac/ScrollElasticityController.mm:
(WebCore::ScrollElasticityController::snapRubberBandTimerFired):

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

8 years agoWeb Inspector: Frontend Error when selecting Database folder in Resources Sidebar
commit-queue@webkit.org [Fri, 20 Dec 2013 05:52:56 +0000 (05:52 +0000)]
Web Inspector: Frontend Error when selecting Database folder in Resources Sidebar
https://bugs.webkit.org/show_bug.cgi?id=126029

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-12-19
Reviewed by Timothy Hatcher.

Treat the DatabaseHostTreeElement tree element like a folder. It pretty much
is a folder, but inherits from StorageTreeElement to share some code there.

* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):

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

8 years agoREGRESSION(r160847): fast/events/overflowchanged-inside-selection-collapse-crash...
rniwa@webkit.org [Fri, 20 Dec 2013 04:01:34 +0000 (04:01 +0000)]
REGRESSION(r160847): fast/events/overflowchanged-inside-selection-collapse-crash.html fails
https://bugs.webkit.org/show_bug.cgi?id=126037

Reviewed by Anders Carlsson.

Since overflowchanged event is now asynchronous, make the call to testRunner.notifyDone() also asynchronous.

* TestExpectations:
* fast/dynamic/paused-event-dispatch.html:

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

8 years agocheck-webkit-style mistakenly flags assigning to a dereferenced pointer
commit-queue@webkit.org [Fri, 20 Dec 2013 03:49:53 +0000 (03:49 +0000)]
check-webkit-style mistakenly flags assigning to a dereferenced pointer
https://bugs.webkit.org/show_bug.cgi?id=126041

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2013-12-19
Reviewed by Ryosuke Niwa.

When checking for lines like "Foo *bar;", check-webkit-style doesn't make
sure that there is a declaration. This patch makes sure that there is a
declaration in order to flag spacing around asterisks.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_spacing):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest.test_pointer_reference_marker_location):

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

8 years agoClarify the behavior of composited canvases
simon.fraser@apple.com [Fri, 20 Dec 2013 03:48:10 +0000 (03:48 +0000)]
Clarify the behavior of composited canvases
https://bugs.webkit.org/show_bug.cgi?id=126042

Reviewed by Tim Horton.

Different platforms composite 2D and 3D canvases in different ways.

"Accelerated 2D" canvases, and WebGL are always set as GraphicsLayer
contents.

"IOSurface" canvases (Mac and iOS-only) get a compositing layer, but
paint into it (because this is fast, and a convenient way to get
synchronization).

So make these behaviors explicit in RenderLayerBacking and RenderLayerCompositor.
No behavior changes on OS X, bug fix on iOS.

* rendering/RenderLayerBacking.cpp:
(WebCore::canvasCompositingStrategy):
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
(WebCore::RenderLayerBacking::containsPaintedContent):
(WebCore::RenderLayerBacking::contentChanged):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForCanvas):

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

8 years agoVersioning.
lforschler@apple.com [Fri, 20 Dec 2013 02:58:16 +0000 (02:58 +0000)]
Versioning.

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

8 years agoWeb Inspector: Uncaught Exception: NavigationSidebarPanel.js: TypeError: undefined...
commit-queue@webkit.org [Fri, 20 Dec 2013 02:00:15 +0000 (02:00 +0000)]
Web Inspector: Uncaught Exception: NavigationSidebarPanel.js: TypeError: undefined is not a function
https://bugs.webkit.org/show_bug.cgi?id=126018

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-12-19
Reviewed by Timothy Hatcher.

ERROR: TypeError: undefined is not a function (evaluating 'representedObject.saveIdentityToCookie(candidateObjectCookie)')

There are some TreeElements (Folders, and the special Databases Folder)
which do not have a represented object, and would throw an exception
when trying to use saveIdentityToCookie.

We should always provide a saveIdentityToCookie when possible. So just
blacklist the tree element types we know do not have representedObjects,
and where we don't want to save identity. This will continue to throw
exceptions in the future for tree elements that don't have the save
function implemented, but should.

Note that even if a TreeElement is constructed with a null represented
object, it becomes an empty object (representedObject || {}).

* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.saveStateToCookie):
(WebInspector.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject):
(WebInspector.NavigationSidebarPanel.prototype.treeElementMatchesCookie):
(WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):

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

8 years agoWeb Inspector: Add InspectorFrontendHost.debuggableType to let the frontend know...
commit-queue@webkit.org [Fri, 20 Dec 2013 01:59:19 +0000 (01:59 +0000)]
Web Inspector: Add InspectorFrontendHost.debuggableType to let the frontend know it's backend is JavaScript or Web
https://bugs.webkit.org/show_bug.cgi?id=126016

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-12-19
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/remote/RemoteInspector.mm:
(Inspector::RemoteInspector::listingForDebuggable):
* inspector/remote/RemoteInspectorConstants.h:
Include a debuggable type identifier in the debuggable listing,
so the remote frontend can know if it is debugging a Web Page
or JS Context.

Source/WebCore:

* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::debuggableType):
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
Expose the debuggableType to the frontend. In WebCore it is always a "web" type.

Source/WebInspectorUI:

* UserInterface/LoadInspectorBackendCommands.js:
If the debuggable target is "web" load both JS and Web backend commands.
Otherwise, we only load the default, js backend commands.

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

8 years ago[WK2][iOS] Enable multiprocess by default
benjamin@webkit.org [Fri, 20 Dec 2013 01:41:22 +0000 (01:41 +0000)]
[WK2][iOS] Enable multiprocess by default
https://bugs.webkit.org/show_bug.cgi?id=126030

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-12-19
Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKProcessGroup.mm:
(-[WKProcessGroup initWithInjectedBundleURL:]):

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

8 years agoAdd an utility class to simplify generating function calls
benjamin@webkit.org [Fri, 20 Dec 2013 01:39:09 +0000 (01:39 +0000)]
Add an utility class to simplify generating function calls
https://bugs.webkit.org/show_bug.cgi?id=125972

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Split branchTest32 in two functions: test32AndSetFlags and branchOnFlags.
This is done to allow code where the flags are set, multiple operation that
do not modify the flags occur, then the flags are used.

This is used for function calls to test the return value while discarding the
return register.

* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::test32AndSetFlags):
(JSC::MacroAssemblerX86Common::branchOnFlags):
(JSC::MacroAssemblerX86Common::branchTest32):

Source/WebCore:

FunctionCall is a little helper class to make function calls from the JIT
in 3 or 4 lines.

FunctionCall takes a StackAllocator, a RegisterAllocator and a function pointer.
When the call is generated, the helper saves the registers as necessary, aligns
the stack, does the call, restores the stack, and restore the registers.

* cssjit/FunctionCall.h: Added.
(WebCore::FunctionCall::FunctionCall):
(WebCore::FunctionCall::setFunctionAddress):
(WebCore::FunctionCall::setFirstArgument):
(WebCore::FunctionCall::call):

(WebCore::FunctionCall::callAndBranchOnCondition): Most test functions used
with FunctionCall return a boolean. When the boolean is the sole purpose of the function
call, this provides an easy way to branch on the boolean without worrying about registers.

The return register is tested first, then all the saved registers are restored from the stack
(which can include the return register), finally the flags are used for a jump.

(WebCore::FunctionCall::prepareAndCall):
(WebCore::FunctionCall::cleanupPostCall):
(WebCore::FunctionCall::saveAllocatedRegisters):
(WebCore::FunctionCall::restoreAllocatedRegisters):
* WebCore.xcodeproj/project.pbxproj:
* cssjit/FunctionCall.h: Added.
(WebCore::FunctionCall::FunctionCall):
(WebCore::FunctionCall::setFunctionAddress):
(WebCore::FunctionCall::setFirstArgument):
(WebCore::FunctionCall::call):
(WebCore::FunctionCall::callAndBranchOnCondition):
(WebCore::FunctionCall::prepareAndCall):
(WebCore::FunctionCall::cleanupPostCall):
(WebCore::FunctionCall::saveAllocatedRegisters):
(WebCore::FunctionCall::restoreAllocatedRegisters):

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

8 years agoBegin stubbing out the KeyedDecoder class
andersca@apple.com [Fri, 20 Dec 2013 01:18:49 +0000 (01:18 +0000)]
Begin stubbing out the KeyedDecoder class
https://bugs.webkit.org/show_bug.cgi?id=126031

Reviewed by Andreas Kling.

KeyedDecoder is going to be the new way to decode back forward trees.

* history/HistoryItem.cpp:
(WebCore::HistoryItem::decodeBackForwardTree):
* history/HistoryItem.h:
* platform/KeyedCoding.h:
(WebCore::KeyedDecoder::~KeyedDecoder):

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

8 years agoDOM bindings should use thisValue for attributes
oliver@apple.com [Fri, 20 Dec 2013 00:52:06 +0000 (00:52 +0000)]
DOM bindings should use thisValue for attributes
https://bugs.webkit.org/show_bug.cgi?id=126011

Reviewed by Antti Koivisto.

Source/WebCore:

Make all standard DOM attributes use the thisValue instead
of the slot object.  This requires using a dynamic cast in
the attribute getters. Happily for normal uses this a single
indirect load and pointer compare, and we were already doing
it for many attributes.

Alas it's too expensive to do this on the window object still
due to the proxy indirection that intercepts global variable
access.  I'll correct this in a follow on patch (bug 126013).

A number of custom getters have also been updated to use the
thisValue and full type checks.

This patch still leaves the index and generic named getters
on the slot based model as fixing these cases requires more
complicated changes.

* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::cssPropertyGetterPixelOrPosPrefixCallback):
(WebCore::cssPropertyGetterCallback):
* bindings/js/JSPluginElementFunctions.cpp:
(WebCore::pluginElementPropertyGetter):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::jsTestActiveDOMObjectExcitingAttr):
(WebCore::jsTestActiveDOMObjectConstructor):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::jsTestCustomNamedGetterConstructor):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::jsTestEventConstructorAttr1):
(WebCore::jsTestEventConstructorAttr2):
(WebCore::jsTestEventConstructorConstructor):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetConstructor):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::jsTestExceptionName):
(WebCore::jsTestExceptionConstructor):
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
(WebCore::jsTestGenerateIsReachableConstructor):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::jsTestInterfaceConstructorImplementsStaticReadOnlyAttr):
(WebCore::jsTestInterfaceConstructorImplementsStaticAttr):
(WebCore::jsTestInterfaceImplementsStr1):
(WebCore::jsTestInterfaceImplementsStr2):
(WebCore::jsTestInterfaceImplementsStr3):
(WebCore::jsTestInterfaceImplementsNode):
(WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
(WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
(WebCore::jsTestInterfaceSupplementalStr1):
(WebCore::jsTestInterfaceSupplementalStr2):
(WebCore::jsTestInterfaceSupplementalStr3):
(WebCore::jsTestInterfaceSupplementalNode):
(WebCore::jsTestInterfaceConstructor):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerConstructor):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::jsTestNamedConstructorConstructor):
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::jsTestNodeConstructor):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjReadOnlyLongAttr):
(WebCore::jsTestObjReadOnlyStringAttr):
(WebCore::jsTestObjReadOnlyTestObjAttr):
(WebCore::jsTestObjConstructorStaticReadOnlyLongAttr):
(WebCore::jsTestObjConstructorStaticStringAttr):
(WebCore::jsTestObjConstructorTestSubObj):
(WebCore::jsTestObjTestSubObjEnabledBySettingConstructor):
(WebCore::jsTestObjEnumAttr):
(WebCore::jsTestObjByteAttr):
(WebCore::jsTestObjOctetAttr):
(WebCore::jsTestObjShortAttr):
(WebCore::jsTestObjUnsignedShortAttr):
(WebCore::jsTestObjLongAttr):
(WebCore::jsTestObjLongLongAttr):
(WebCore::jsTestObjUnsignedLongLongAttr):
(WebCore::jsTestObjStringAttr):
(WebCore::jsTestObjTestObjAttr):
(WebCore::jsTestObjXMLObjAttr):
(WebCore::jsTestObjCreate):
(WebCore::jsTestObjReflectedStringAttr):
(WebCore::jsTestObjReflectedIntegralAttr):
(WebCore::jsTestObjReflectedUnsignedIntegralAttr):
(WebCore::jsTestObjReflectedBooleanAttr):
(WebCore::jsTestObjReflectedURLAttr):
(WebCore::jsTestObjReflectedCustomIntegralAttr):
(WebCore::jsTestObjReflectedCustomBooleanAttr):
(WebCore::jsTestObjReflectedCustomURLAttr):
(WebCore::jsTestObjTypedArrayAttr):
(WebCore::jsTestObjAttrWithGetterException):
(WebCore::jsTestObjAttrWithSetterException):
(WebCore::jsTestObjStringAttrWithGetterException):
(WebCore::jsTestObjStringAttrWithSetterException):
(WebCore::jsTestObjCustomAttr):
(WebCore::jsTestObjWithScriptStateAttribute):
(WebCore::jsTestObjWithScriptExecutionContextAttribute):
(WebCore::jsTestObjWithScriptStateAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
(WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
(WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
(WebCore::jsTestObjConditionalAttr1):
(WebCore::jsTestObjConditionalAttr2):
(WebCore::jsTestObjConditionalAttr3):
(WebCore::jsTestObjConditionalAttr4Constructor):
(WebCore::jsTestObjConditionalAttr5Constructor):
(WebCore::jsTestObjConditionalAttr6Constructor):
(WebCore::jsTestObjCachedAttribute1):
(WebCore::jsTestObjCachedAttribute2):
(WebCore::jsTestObjAnyAttribute):
(WebCore::jsTestObjContentDocument):
(WebCore::jsTestObjMutablePoint):
(WebCore::jsTestObjImmutablePoint):
(WebCore::jsTestObjStrawberry):
(WebCore::jsTestObjStrictFloat):
(WebCore::jsTestObjDescription):
(WebCore::jsTestObjId):
(WebCore::jsTestObjHash):
(WebCore::jsTestObjReplaceableAttribute):
(WebCore::jsTestObjNullableDoubleAttribute):
(WebCore::jsTestObjNullableLongAttribute):
(WebCore::jsTestObjNullableBooleanAttribute):
(WebCore::jsTestObjNullableStringAttribute):
(WebCore::jsTestObjNullableLongSettableAttribute):
(WebCore::jsTestObjNullableStringValue):
(WebCore::jsTestObjAttribute):
(WebCore::jsTestObjAttributeWithReservedEnumType):
(WebCore::jsTestObjConstructor):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::jsTestOverloadedConstructorsConstructor):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::jsTestSerializedScriptValueInterfaceValue):
(WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue):
(WebCore::jsTestSerializedScriptValueInterfaceCachedValue):
(WebCore::jsTestSerializedScriptValueInterfacePorts):
(WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue):
(WebCore::jsTestSerializedScriptValueInterfaceConstructor):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::jsTestTypedefsUnsignedLongLongAttr):
(WebCore::jsTestTypedefsImmutableSerializedScriptValue):
(WebCore::jsTestTypedefsConstructorTestSubObj):
(WebCore::jsTestTypedefsAttrWithGetterException):
(WebCore::jsTestTypedefsAttrWithSetterException):
(WebCore::jsTestTypedefsStringAttrWithGetterException):
(WebCore::jsTestTypedefsStringAttrWithSetterException):
(WebCore::jsTestTypedefsConstructor):
* bindings/scripts/test/JS/JSattribute.cpp:
(WebCore::jsattributeReadonly):
(WebCore::jsattributeConstructor):
* bindings/scripts/test/JS/JSreadonly.cpp:
(WebCore::jsreadonlyConstructor):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::lengthGetter):
* bridge/runtime_method.cpp:
(JSC::RuntimeMethod::lengthGetter):

LayoutTests:

* js/dom/dom-attributes-on-mismatch-type.html: Added.
* js/dom/dom-attributes-on-mismatch-type-expected.txt: Added.

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

8 years agoPut write barriers in the right places in the baseline JIT
mhahnenberg@apple.com [Fri, 20 Dec 2013 00:49:58 +0000 (00:49 +0000)]
Put write barriers in the right places in the baseline JIT
https://bugs.webkit.org/show_bug.cgi?id=125975

Reviewed by Filip Pizlo.

* jit/JIT.cpp:
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
* jit/JITInlines.h:
(JSC::JIT::callOperation):
(JSC::JIT::emitArrayProfilingSite):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_enter):
(JSC::JIT::emitSlow_op_enter):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_enter):
(JSC::JIT::emitSlow_op_enter):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emitArrayStoragePutByVal):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitPutGlobalProperty):
(JSC::JIT::emitPutGlobalVar):
(JSC::JIT::emitPutClosureVar):
(JSC::JIT::emit_op_init_global_const):
(JSC::JIT::checkMarkWord):
(JSC::JIT::emitWriteBarrier):
(JSC::JIT::privateCompilePutByVal):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emitArrayStoragePutByVal):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::emitPutGlobalProperty):
(JSC::JIT::emitPutGlobalVar):
(JSC::JIT::emitPutClosureVar):
(JSC::JIT::emit_op_init_global_const):
* jit/Repatch.cpp:
(JSC::emitPutReplaceStub):
(JSC::emitPutTransitionStub):
(JSC::repatchPutByID):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:

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

8 years agoRemove WebFilterEvaluator wrappers from WebKitSystemInterface
aestes@apple.com [Fri, 20 Dec 2013 00:48:27 +0000 (00:48 +0000)]
Remove WebFilterEvaluator wrappers from WebKitSystemInterface
https://bugs.webkit.org/show_bug.cgi?id=126028

Reviewed by Anders Carlsson.

Source/WebCore:

It's overkill to pipe access to WebFilterEvaluator through
WebKitSystemInterface. Instead, include WebFilterEvaluator.h when it
exists and re-declare WebFilterEvaluator when it doesn't.

WebKitSystemInterface used to soft-link WebContentAnalysis.framework
since OS X 10.7 didn't contain this framework. Since we no longer
support 10.7, we can now directly link against the framework.

* Configurations/WebCore.xcconfig: Add /System/Library/PrivateHeaders
to the system framework search path at both compile and link time so
that we can find WebContentAnalysis.framework.
* WebCore.exp.in: Don't export removed symbols.
* WebCore.xcodeproj/project.pbxproj: Added WebContentAnalysis.framework
to the 'Link Binary With Libraries' build phase.
* platform/mac/ContentFilterMac.mm: Included WebFilterEvaluator.h when
it exists and re-declared WebFilterEvaluator when it doesn't.
(WebCore::ContentFilter::ContentFilter): Directly called a method on
m_platformContentFilter rather than going through WKSI.
(WebCore::ContentFilter::isEnabled): Ditto.
(WebCore::ContentFilter::addData): Ditto.
(WebCore::ContentFilter::finishedAddingData): Ditto.
(WebCore::ContentFilter::needsMoreData): Ditto.
(WebCore::ContentFilter::didBlockData): Ditto.
* platform/mac/WebCoreSystemInterface.h: Removed function pointers for
calling into WKSI.
* platform/mac/WebCoreSystemInterface.mm: Ditto.

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Don't INIT() removed function pointers.

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Don't INIT() removed function pointers.

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

8 years agoImplement ArrayBuffer.isView
bfulgham@apple.com [Fri, 20 Dec 2013 00:42:47 +0000 (00:42 +0000)]
Implement ArrayBuffer.isView
https://bugs.webkit.org/show_bug.cgi?id=126004

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Test coverage in webgl/1.0.2/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html

* runtime/JSArrayBufferConstructor.cpp:
(JSC::JSArrayBufferConstructor::finishCreation): Add 'isView' to object constructor.
(JSC::arrayBufferFuncIsView): New method.

LayoutTests:

* webgl/1.0.2/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html:
Correct test for 'isView' to actually check for 'isView' function.

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

8 years agoLayout Test plugins/destroy-during-npp-new.html is flaky
ap@apple.com [Fri, 20 Dec 2013 00:39:14 +0000 (00:39 +0000)]
Layout Test plugins/destroy-during-npp-new.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=126027

* plugins/destroy-during-npp-new.html: Streamlined the test a little bit to see
what changes, if anything. There should be no effect on what is tested.

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

8 years agoRemove WKContentViewPrivate.h, WKContentView.h is private now
benjamin@webkit.org [Fri, 20 Dec 2013 00:22:50 +0000 (00:22 +0000)]
Remove WKContentViewPrivate.h, WKContentView.h is private now
https://bugs.webkit.org/show_bug.cgi?id=125981

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-12-19
Reviewed by Dan Bernstein.

There is no need for a separate header, WKContentView has become an implementation
detail of WKView.

* UIProcess/API/ios/WKContentView.h:
* UIProcess/API/ios/WKContentViewInternal.h:
* UIProcess/API/ios/WKContentViewPrivate.h: Removed.
* UIProcess/API/ios/WKView.mm:

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

8 years agoFix broken C loop LLINT build.
mark.lam@apple.com [Fri, 20 Dec 2013 00:09:35 +0000 (00:09 +0000)]
Fix broken C loop LLINT build.
https://bugs.webkit.org/show_bug.cgi?id=126024.

Reviewed by Oliver Hunt.

* runtime/VM.h:

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

8 years agoREGRESSION (r160515): Frequent assertion failures on printing/print-close-crash.html
ap@apple.com [Thu, 19 Dec 2013 23:32:50 +0000 (23:32 +0000)]
REGRESSION (r160515): Frequent assertion failures on printing/print-close-crash.html
https://bugs.webkit.org/show_bug.cgi?id=126014

Rolled out r160515 while Chris is investigating. Added FIXME comments in other
places where we use this pattern.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):
(WebKit::WebChromeClient::print):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):

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

8 years agoTest that text-decoration-skip: ink is the same as regular underlines if no descenders
commit-queue@webkit.org [Thu, 19 Dec 2013 23:24:30 +0000 (23:24 +0000)]
Test that text-decoration-skip: ink is the same as regular underlines if no descenders
https://bugs.webkit.org/show_bug.cgi?id=125985

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2013-12-19
Reviewed by Simon Fraser.

If there are no descenders in the underlined text, using the text-decoration-skip: ink
CSS property should behave as if it wasn't specified (and the underline is a normal one)

* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink-no-descenders-expected.html: Added.
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink-no-descenders.html: Added.

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

8 years agocheck-webkit-style marks rvalue references as violations
commit-queue@webkit.org [Thu, 19 Dec 2013 23:23:37 +0000 (23:23 +0000)]
check-webkit-style marks rvalue references as violations
https://bugs.webkit.org/show_bug.cgi?id=126000

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2013-12-19
Reviewed by Ryosuke Niwa.

Previously, check-webkit-style was making sure that any line with "&&" had
spaces around it. However, we can now legitimately use "&&" without a previous
space when declaring an rvalue reference. This patch relaxes this check.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_spacing):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest.test_spacing_for_binary_ops):

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

8 years agocheck-webkit-style marks auto return types for functions as violations
commit-queue@webkit.org [Thu, 19 Dec 2013 23:22:09 +0000 (23:22 +0000)]
check-webkit-style marks auto return types for functions as violations
https://bugs.webkit.org/show_bug.cgi?id=125999

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2013-12-19
Reviewed by Ryosuke Niwa.

If a function declaration ends with a "->" followed by a non whitespace
string, don't mark as an invalid "{" on its own line

* Scripts/webkitpy/style/checkers/cpp.py:
(check_braces):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest.test_brace_at_begin_of_line):

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

8 years agoAdd WebKit2 API for clearing the back-forward list
commit-queue@webkit.org [Thu, 19 Dec 2013 23:14:27 +0000 (23:14 +0000)]
Add WebKit2 API for clearing the back-forward list
https://bugs.webkit.org/show_bug.cgi?id=126005

Patch by Ricky Mondello <rmondello@apple.com> on 2013-12-19
Reviewed by Anders Carlsson.

* UIProcess/API/C/WKBackForwardListRef.cpp:
(WKBackForwardListClear): Call through to the back-forward list's `clear()`.
* UIProcess/API/C/WKBackForwardListRef.h: Declare new API.

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

8 years agoOne more URTBF to make GTK build happy after r160853.
ossy@webkit.org [Thu, 19 Dec 2013 22:41:05 +0000 (22:41 +0000)]
One more URTBF to make GTK build happy after r160853.

* UIProcess/API/gtk/WebKitDownloadClient.cpp:
* UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
(didReceiveWebViewMessageFromInjectedBundle):
* UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
(webkitResponsePolicyDecisionCreate):
* UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h:

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

8 years agoURTBF for GTK after r160853.
ossy@webkit.org [Thu, 19 Dec 2013 22:08:39 +0000 (22:08 +0000)]
URTBF for GTK after r160853.

* GNUmakefile.list.am:

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

8 years ago[WinCairo] More GStreamer preparations.
alex.christensen@flexsim.com [Thu, 19 Dec 2013 22:07:08 +0000 (22:07 +0000)]
[WinCairo] More GStreamer preparations.

Unreviewed.

* WinLauncher/WinLauncher.vcxproj/WinLauncherCFLite.props:
Include FeatureDefinesCairo and WinCairo to compile the GLib part of WinLauncher.

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

8 years agoAdd Apple Mavericks perf bot.
lforschler@apple.com [Thu, 19 Dec 2013 22:04:26 +0000 (22:04 +0000)]
Add Apple Mavericks perf bot.

Unreviewed.

* BuildSlaveSupport/build.webkit.org-config/config.json:

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

8 years agoUnreviewed EFL build fix attempt after r160853
m.pakula@samsung.com [Thu, 19 Dec 2013 21:52:15 +0000 (21:52 +0000)]
Unreviewed EFL build fix attempt after r160853

* CMakeLists.txt: Change WebURLResponse.cpp to APIURLResponse.cpp.

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

8 years agoFinal preparations for GStreamer on Windows.
commit-queue@webkit.org [Thu, 19 Dec 2013 21:38:12 +0000 (21:38 +0000)]
Final preparations for GStreamer on Windows.
https://bugs.webkit.org/show_bug.cgi?id=125958

Patch by Alex Christensen <achristensen@webkit.org> on 2013-12-19
Reviewed by Benjamin Poulain.

Source/WTF:

* WTF.vcxproj/WTFDebugWinCairo.props:
* WTF.vcxproj/WTFReleaseWinCairo.props:
Include WinCairo.props.
* wtf/Platform.h:
Use GLib and GStreamer on WinCairo with video.

WebKitLibraries:

* win/tools/vsprops/FeatureDefinesCairo.props:
Removed duplicate ENABLE_VIDEO_TRACK definition.

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

8 years ago[WK2] Rename WebURLResponse to API::URLResponse
weinig@apple.com [Thu, 19 Dec 2013 21:32:15 +0000 (21:32 +0000)]
[WK2] Rename WebURLResponse to API::URLResponse
https://bugs.webkit.org/show_bug.cgi?id=125910

Reviewed by Andreas Kling.

* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
* Shared/API/c/WKURLResponse.cpp:
(WKURLResponseGetTypeID):
* Shared/API/c/mac/WKURLResponseNS.mm:
(WKURLResponseCreateWithNSURLResponse):
* Shared/APIURLRequest.cpp:
* Shared/APIURLResponse.cpp: Copied from Source/WebKit2/Shared/WebURLResponse.cpp.
(API::URLResponse::URLResponse):
(API::URLResponse::encode):
(API::URLResponse::decode):
* Shared/APIURLResponse.h: Copied from Source/WebKit2/Shared/WebURLResponse.h.
(API::URLResponse::create):
* Shared/UserMessageCoders.h:
(WebKit::UserMessageEncoder::baseEncode):
(WebKit::UserMessageDecoder::baseDecode):
* Shared/WebURLResponse.cpp: Removed.
* Shared/WebURLResponse.h: Removed.
* UIProcess/WebDownloadClient.cpp:
(WebKit::WebDownloadClient::didReceiveResponse):
* UIProcess/WebPolicyClient.cpp:
(WebKit::WebPolicyClient::decidePolicyForResponse):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
(WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):

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

8 years agoUse CascadedProperties for page and keyframe style resolution as well.
akling@apple.com [Thu, 19 Dec 2013 21:15:12 +0000 (21:15 +0000)]
Use CascadedProperties for page and keyframe style resolution as well.
<https://webkit.org/b/125997>

Port StyleResolver's styleForKeyframe() and styleForPage() over to
the new property cascading code. Neither of them care about !important
or matched properties caches, so the code is very simple.

Removed the old applyMatchedProperties and applyProperties code with
low/high priority passes.

Reviewed by Antti Koivisto.

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

8 years agoAdd a failing test expectation to fast/dynamic/paused-event-dispatch.html
rniwa@webkit.org [Thu, 19 Dec 2013 20:42:07 +0000 (20:42 +0000)]
Add a failing test expectation to fast/dynamic/paused-event-dispatch.html
while I investigate.

* TestExpectations:

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

8 years agoUnreviewed, rolling out r160842.
commit-queue@webkit.org [Thu, 19 Dec 2013 19:49:35 +0000 (19:49 +0000)]
Unreviewed, rolling out r160842.
http://trac.webkit.org/changeset/160842
https://bugs.webkit.org/show_bug.cgi?id=126003

broke accessibility/loading-iframe-updates-axtree.html
(Requested by ap on #webkit).

Tools:

* DumpRenderTree/AccessibilityUIElement.cpp:
(AccessibilityUIElement::makeJSAccessibilityUIElement):
* DumpRenderTree/AccessibilityUIElement.h:
(AccessibilityUIElement::platformUIElement):

LayoutTests:

* accessibility/deleting-iframe-destroys-axcache.html:
* accessibility/loading-iframe-updates-axtree-expected.txt:
* accessibility/loading-iframe-updates-axtree.html:
* accessibility/non-data-table-cell-title-ui-element.html:
* platform/gtk/accessibility/roles-exposed-expected.txt:
* platform/gtk/accessibility/roles-exposed.html:
* platform/mac-wk2/TestExpectations:
* platform/mac/accessibility/search-predicate-expected.txt:
* platform/mac/accessibility/search-predicate.html:
* platform/mac/accessibility/search-when-element-starts-in-table-expected.txt:
* platform/mac/accessibility/search-when-element-starts-in-table.html:

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

8 years agotryAddEventListener uses local PassRefPtr<>
eric.carlson@apple.com [Thu, 19 Dec 2013 19:42:22 +0000 (19:42 +0000)]
tryAddEventListener uses local PassRefPtr<>
https://bugs.webkit.org/show_bug.cgi?id=126001

Reviewed by Daniel Bates.

* dom/Node.cpp:
(WebCore::tryAddEventListener): Put PassRefPtr<EventListener> parameter into a local RefPtr
    because it is sometimes used twice.

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

8 years agoget_test_baseline should get Host from test_config
commit-queue@webkit.org [Thu, 19 Dec 2013 19:32:02 +0000 (19:32 +0000)]
get_test_baseline should get Host from test_config
https://bugs.webkit.org/show_bug.cgi?id=125989

Patch by Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com> on 2013-12-19
Reviewed by Ryosuke Niwa.

* Scripts/webkitpy/tool/commands/rebaselineserver.py:
(TestConfig.__init__):
(RebaselineServer._prepare_config):
* Scripts/webkitpy/tool/servers/rebaselineserver.py:
(get_test_baselines):
* Scripts/webkitpy/tool/servers/rebaselineserver_unittest.py:
(get_test_config):

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

8 years agooverflowchanged event could cause a crash
rniwa@webkit.org [Thu, 19 Dec 2013 19:10:31 +0000 (19:10 +0000)]
overflowchanged event could cause a crash
https://bugs.webkit.org/show_bug.cgi?id=125978

Reviewed by Tim Horton.

Source/WebCore:

Made the event asynchrnous by re-using Document's event queuing ability. Also removed
the infrastructure to queue up events in FrameView.

Test: fast/events/overflowchanged-inside-selection-collapse-crash.html

* dom/Document.cpp:
(WebCore::Document::recalcStyle):
(WebCore::Document::enqueueOverflowEvent):
* dom/Document.h:
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::~FrameView):
(WebCore::FrameView::layout):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::updateOverflowStatus):
* page/FrameView.h:
* rendering/RenderBlock.cpp:
(WebCore::OverflowEventDispatcher::~OverflowEventDispatcher):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollRectToVisible):
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::start):

LayoutTests:

Add a regression test.

* fast/events/overflowchanged-inside-selection-collapse-crash-expected.txt: Added.
* fast/events/overflowchanged-inside-selection-collapse-crash.html: Added.

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

8 years agoDon't check VSINSTALLDIR when looking for Visual Studio install directory.
roger_fong@apple.com [Thu, 19 Dec 2013 19:10:01 +0000 (19:10 +0000)]
Don't check VSINSTALLDIR when looking for Visual Studio install directory.
https://bugs.webkit.org/show_bug.cgi?id=125998.

Reviewed by Alexey Proskuryakov.

* Scripts/webkitdirs.pm:
(visualStudioInstallDir):
Get rid of the VSINSTALLDIR check. We can't build on anything besides VS2013 now anyways.

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

8 years agoFix the Windows build after <http://trac.webkit.org/changeset/160841>
dbates@webkit.org [Thu, 19 Dec 2013 18:58:26 +0000 (18:58 +0000)]
Fix the Windows build after <trac.webkit.org/changeset/160841>
(https://bugs.webkit.org/show_bug.cgi?id=125879)

Add ENABLE(CACHE_PARTITIONING)-guard around call to ResourceRequest::setCachePartition()
as this function is only compiled when building with cache partitioning enabled.

* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::addImageToCache):

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

8 years ago[iOS] Upstream WebCore/accessibility changes
dbates@webkit.org [Thu, 19 Dec 2013 18:46:06 +0000 (18:46 +0000)]
[iOS] Upstream WebCore/accessibility changes
https://bugs.webkit.org/show_bug.cgi?id=125925

Reviewed by Chris Fleizach.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::visiblePositionForPoint): Opt out of code when building for iOS.

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

8 years ago[WinCairo] Compile fix for VS2013 when using ACCELERATED_COMPOSITING.
commit-queue@webkit.org [Thu, 19 Dec 2013 18:25:17 +0000 (18:25 +0000)]
[WinCairo] Compile fix for VS2013 when using ACCELERATED_COMPOSITING.
https://bugs.webkit.org/show_bug.cgi?id=124866

Patch by Alex Christensen <achristensen@webkit.org> on 2013-12-19
Reviewed by Darin Adler.

* platform/graphics/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::TiledBackingStore):
* platform/graphics/TiledBackingStore.h:
Added constructor overload to avoid compile errors
from using MSVC's make_unique as a default parameter.

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

8 years ago[ATK] [WK2] platform/gtk/accessibility/roles-exposed.html is failing
mario.prada@samsung.com [Thu, 19 Dec 2013 18:14:32 +0000 (18:14 +0000)]
[ATK] [WK2] platform/gtk/accessibility/roles-exposed.html is failing
https://bugs.webkit.org/show_bug.cgi?id=125854

Reviewed by Chris Fleizach.

Tools:

Ensure we don't ever create instances of AccessibilityUIElement
wrapping invalid platform-specific accessibility objects in DRT,
both for consistency with what WKTR does (so we avoid situations
where some tests fail in WK2 and not in WK1) and also to avoid
overlooking tests that might not be checking the right thing.

* DumpRenderTree/AccessibilityUIElement.cpp:
(AccessibilityUIElement::makeJSAccessibilityUIElement): Return a
nullPtr if the platformUIElement() is not a valid one.
* DumpRenderTree/AccessibilityUIElement.h:
(AccessibilityUIElement::platformUIElement): Added const modifier.

LayoutTests:

Updated tests and expectations to keep them passing after the
change done in DRT, without changing their actual purpose.

* platform/gtk/accessibility/roles-exposed.html: Make sure we
print "AXRole: (no element)" when accessibilityElementByID() does
not return a valid object, not to confuse it with cases where the
returned string for the role is an empty string.
* platform/gtk/accessibility/roles-exposed-expected.txt: Update
test expectations to reflect the "AXRole: (no element)" string
that is now being exposed. Also, replace the (wrongly added) PASS
expectations with FAIL for rowgroups, which are currently not
being exposed for ATK either.

* accessibility/deleting-iframe-destroys-axcache.html: Just
consider the first and third sons of the accessibility object for
the body (instead of the grandsons), so the test can run both in
Mac, where sons and grandsons are exposed, and ATK, where only
sons are exposed (no StaticText objects exposed there).

* accessibility/non-data-table-cell-title-ui-element.html: Use
accessibilityElementById() to get the accessibility object for the
"skip" table header instead of navigating with childAtIndex(),
since the hierarchy is not the same for Mac and ATK based ports.

* accessibility/loading-iframe-updates-axtree.html: Use the new
web area inside the iframe to compare against the old one, instead
of doing it the other way around, to avoid calling isEqual for an
undefined value (the old web area).
* accessibility/loading-iframe-updates-axtree-expected.txt:
Removed line comparing the old and new web areas inside the iframe.

* platform/mac/accessibility/search-predicate.html: Do not rely on
shouldBe() together with the string "AXRole: " when asking for the
role of objects that should no longer be in the accessibility
tree, and use shouldBeUndefined() instead.
* platform/mac/accessibility/search-when-element-starts-in-table.html: Ditto.

* platform/mac/accessibility/search-predicate-expected.txt: Update
expectations according to the usage of shouldBeUndefined().
* platform/mac/accessibility/search-when-element-starts-in-table-expected.txt: Ditto.

* platform/mac-wk2/TestExpectations: Add search-when-element-starts-in-table.html
here, since it does not return an undefined object in WebKit2 when
the search query should return no results (see bug 125996).

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

8 years ago[iOS] Upstream WebCore/loader changes
dbates@webkit.org [Thu, 19 Dec 2013 18:10:07 +0000 (18:10 +0000)]
[iOS] Upstream WebCore/loader changes
https://bugs.webkit.org/show_bug.cgi?id=125879

Reviewed by Darin Adler.

* WebCore.exp.in: Added symbols for MemoryCache::{addImageToCache, removeImageFromCache}().
* loader/DocumentLoader.cpp:
(WebCore::areAllLoadersPageCacheAcceptable): Added.
(WebCore::DocumentLoader::DocumentLoader): Initialize m_subresourceLoadersArePageCacheAcceptable.
(WebCore::DocumentLoader::stopLoading): Modified to conditionally call areAllLoadersPageCacheAcceptable().
(WebCore::DocumentLoader::handleSubstituteDataLoadSoon): Modified to query FrameLoader::loadsSynchronously()
whether to load substitute data immediately or to schedule a load.
(WebCore::DocumentLoader::responseReceived): Modified to create a content filer when the response protocol
is either HTTP or HTTPS, assuming content filtering is enabled.
(WebCore::DocumentLoader::dataReceived): Modified to call DocumentLoader::setContentFilterForBlockedLoad()
as appropriate.
(WebCore::DocumentLoader::clearMainResourceLoader): Added PLATFORM(IOS)-guarded code. Also added a
FIXME comment to remove the PLATFORM(IOS)-guard once we upstream the iOS changes to ResourceRequest.h.
(WebCore::DocumentLoader::setResponseMIMEType): Added; guard by PLATFORM(IOS). Also added FIXME comment.
(WebCore::DocumentLoader::startLoadingMainResource): Added PLATFORM(IOS)-guarded code. Also added a
FIXME comment to remove the PLATFORM(IOS)-guard once we upstream the iOS changes to ResourceRequest.h.
I also substituted static NeverDestroyed<> for DEFINE_STATIC_LOCAL.
(WebCore::DocumentLoader::setContentFilterForBlockedLoad): Added; guarded by USE(CONTENT_FILTERING).
(WebCore::DocumentLoader::handleContentFilterRequest): Added; guarded by USE(CONTENT_FILTERING) and PLATFORM(IOS).
Also added a FIXME comment to remove the PLATFORM(IOS) guard inside its function body once we upstream
file ContentFilterIOS.mm and implement ContentFilter::requestUnblockAndDispatchIfSuccessful() for Mac.
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::setResponse): Added; guard by PLATFORM(IOS). Also added a FIXME comment as
this method seems to violate the encapsulation of DocumentLoader.
(WebCore::DocumentLoader::subresourceLoadersArePageCacheAcceptable): Added.
(WebCore::DocumentLoader::documentURL): Added; returns the URL of the document resulting from the DocumentLoader.
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::createDocument): Added iOS-specific code to create a PDF document.
* loader/EmptyClients.cpp:
(WebCore::EmptyChromeClient::openDateTimeChooser): Opt out of compiling this code for iOS. Also substituted
nullptr for 0.
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::FrameProgressTracker::~FrameProgressTracker):
(WebCore::FrameLoader::FrameLoader): Initialize m_loadsSynchronously.
(WebCore::FrameLoader::initForSynthesizedDocument): Added; guarded by PLATFORM(IOS). Also added FIXME comment.
(WebCore::FrameLoader::checkCompleted): Added iOS-specific code with FIXME comment.
(WebCore::FrameLoader::willLoadMediaElementURL): Added iOS-specific code.
(WebCore::FrameLoader::stopForUserCancel): Added iOS-specific code and FIXME comment.
(WebCore::FrameLoader::commitProvisionalLoad): Added iOS-specific code and FIXME comment.
(WebCore::FrameLoader::transitionToCommitted): Opt out of ENABLE(TOUCH_EVENTS) logic when building for iOS.
(WebCore::FrameLoader::didFirstLayout): Added iOS-specific code.
(WebCore::FrameLoader::connectionProperties): Added; guarded by PLATFORM(IOS).
(WebCore::createWindow): Added iOS-specific code and FIXME comment.
* loader/FrameLoader.h:
(WebCore::FrameLoader::setLoadsSynchronously): Added.
(WebCore::FrameLoader::loadsSynchronously): Added.
* loader/FrameLoaderClient.h:
* loader/HistoryController.cpp:
(WebCore::HistoryController::restoreScrollPositionAndViewState): Opt out of scroll position logic when building for iOS.
(WebCore::HistoryController::replaceCurrentItem): Added.
* loader/HistoryController.h:
* loader/PlaceholderDocument.h: Changed access control of constructor from private to protected and removed the FINAL
keyword from the class so that we can subclass PlaceholderDocument on iOS.
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy): Added USE(QUICK_LOOK)- and USE(CONTENT_FILTERING)-guarded code.
* loader/ResourceBuffer.cpp:
(WebCore::ResourceBuffer::shouldUsePurgeableMemory): Added; guarded by PLATFORM(IOS).
* loader/ResourceBuffer.h:
* loader/ResourceLoadNotifier.cpp:
(WebCore::ResourceLoadNotifier::dispatchWillSendRequest): Added USE(QUICK_LOOK)-guarded code.
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::scheduleSubresourceLoad): Added iOS-specific code.
(WebCore::ResourceLoadScheduler::scheduleLoad): Ditto.
(WebCore::ResourceLoadScheduler::remove): Added iOS-specific code with FIXME comment.
(WebCore::ResourceLoadScheduler::crossOriginRedirectReceived): Added null-check for variable oldHost. Also added
iOS-specific code.
(WebCore::ResourceLoadScheduler::servePendingRequests): Added iOS-specific code.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::init): Ditto.
(WebCore::ResourceLoader::willSendRequest): Ditto.
(WebCore::ResourceLoader::connectionProperties): Added; guarded by PLATFORM(IOS).
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::startLoading): Added; guarded by PLATFORM(IOS).
(WebCore::ResourceLoader::iOSOriginalRequest): Added; iOS-specific.
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadPlugin): Added iOS-specific code.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::create): Ditto.
(WebCore::SubresourceLoader::startLoading): Added; guarded by PLATFORM(IOS).
(WebCore::SubresourceLoader::didFinishLoading): Added iOS-specific code.
(WebCore::SubresourceLoader::willCancel): Ditto.
(WebCore::SubresourceLoader::notifyDone): Ditto.
(WebCore::SubresourceLoader::releaseResources): Ditto.
* loader/SubresourceLoader.h:
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::loadCacheGroup): Added iOS-specific code.
(WebCore::ApplicationCacheStorage::loadManifestHostHashes): Ditto.
(WebCore::ApplicationCacheStorage::cacheGroupForURL): Ditto.
(WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL): Ditto.
(WebCore::ApplicationCacheStorage::calculateQuotaForOrigin): Ditto.
(WebCore::ApplicationCacheStorage::calculateUsageForOrigin): Ditto.
(WebCore::ApplicationCacheStorage::calculateRemainingSizeForOriginExcludingCache): Ditto.
(WebCore::ApplicationCacheStorage::storeUpdatedQuotaForOrigin): Ditto.
(WebCore::ApplicationCacheStorage::executeSQLCommand): Ditto.
(WebCore::ApplicationCacheStorage::verifySchemaVersion): Ditto.
(WebCore::ApplicationCacheStorage::openDatabase): Ditto.
(WebCore::ApplicationCacheStorage::executeStatement): Ditto.
(WebCore::ApplicationCacheStorage::store): Ditto.
(WebCore::ApplicationCacheStorage::storeUpdatedType): Ditto.
(WebCore::ApplicationCacheStorage::ensureOriginRecord): Ditto.
(WebCore::ApplicationCacheStorage::loadCache): Ditto.
(WebCore::ApplicationCacheStorage::remove): Ditto.
(WebCore::ApplicationCacheStorage::empty): Ditto.
(WebCore::ApplicationCacheStorage::storeCopyOfCache): Ditto.
(WebCore::ApplicationCacheStorage::manifestURLs): Ditto.
(WebCore::ApplicationCacheStorage::cacheGroupSize): Ditto.
(WebCore::ApplicationCacheStorage::deleteCacheGroup): Ditto.
(WebCore::ApplicationCacheStorage::vacuumDatabaseFile): Ditto.
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::CachedImage): Added.
(WebCore::CachedImage::imageSizeForRenderer): Added iOS-specific code.
(WebCore::CachedImageManual::CachedImageManual): Added; guarded by USE(CF). Also added FIXME comment to incorporate
the functionality of this class into CachedImage and to remove the USE(CF)-guard once we make MemoryCache::addImageToCache()
platform-independent.
(WebCore::CachedImageManual::mustRevalidateDueToCacheHeaders): Added; guarded by USE(CF).
* loader/cache/CachedImage.h: Removed FINAL keyword from class so that we can define derived class CachedImageManual.
(WebCore::CachedImage::isManual): Added; guarded by USE(CF). Also added FIXME comment.
(WebCore::CachedImageManual::addFakeClient): Added; guarded by USE(CF).
(WebCore::CachedImageManual::removeFakeClient): Added; guarded by USE(CF).
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load): Added iOS-specific code.
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::loadDone): Added argument shouldPerformPostLoadActions, defaults to true. Modified
to conditionally call performPostLoadActions() with respect to the argument shouldPerformPostLoadActions.
(WebCore::CachedResourceLoader::preload): Added iOS-specific code.
(WebCore::CachedResourceLoader::checkForPendingPreloads): Ditto.
* loader/cache/CachedResourceLoader.h:
* loader/cache/MemoryCache.cpp:
(WebCore::memoryCache):
(WebCore::MemoryCache::add): Added iOS-specific code.
(WebCore::MemoryCache::revalidationFailed): Ditto.
(WebCore::MemoryCache::resourceForRequest): Ditto.
(WebCore::MemoryCache::addImageToCache): Added; guarded by USE(CF). Also added FIXME comment.
(WebCore::MemoryCache::removeImageFromCache): Added; guarded by USE(CF). Also added FIXME comment.
(WebCore::MemoryCache::pruneLiveResources): Modified to take argument shouldDestroyDecodedDataForAllLiveResources.
(WebCore::MemoryCache::pruneLiveResourcesToSize): Modified to take argument shouldDestroyDecodedDataForAllLiveResources,
defaults to false. When this argument is true we destroy the decoded data for all live resources from the memory cache.
Such functionality is useful when the system is running low on memory.
(WebCore::MemoryCache::evict): Added iOS-specific code.
* loader/cache/MemoryCache.h:
* loader/cf/SubresourceLoaderCF.cpp:
(WebCore::SubresourceLoader::didReceiveDataArray): Actually make this code compile. In particular, there is no
method called sendDataToResource on SubresourceLoader or in its class hierarchy.
* loader/mac/DocumentLoaderMac.cpp:
(WebCore::DocumentLoader::schedule): This method has an empty implementation when building for iOS.
(WebCore::DocumentLoader::unschedule): Ditto.
* platform/graphics/BitmapImage.h: Exposed decodedSize() to access the decoded size of the bitmap image.
This functionality is used in MemoryCache::addImageToCache().

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

8 years agoplatform/mac/editing/attributed-string tests all flakily assert
ap@apple.com [Thu, 19 Dec 2013 18:03:29 +0000 (18:03 +0000)]
platform/mac/editing/attributed-string tests all flakily assert
https://bugs.webkit.org/show_bug.cgi?id=123029

* platform/mac/TestExpectations: Marked as flakily asserting.

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

8 years agoBuild fix for platforms which do not define -[AVSampleBufferAudioRenderer muted].
jer.noble@apple.com [Thu, 19 Dec 2013 17:51:04 +0000 (17:51 +0000)]
Build fix for platforms which do not define -[AVSampleBufferAudioRenderer muted].
Rubber-stamped by Eric Carlson.

To work around platforms with broken AVSampleBufferAudioRenderer headers, just
declare only those functions we need, and update isAvalable to bail out early if
those methods are not present.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

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

8 years agoWTF, JavaScriptCore fails to build with trunk clang: operators new, new[],
dbates@webkit.org [Thu, 19 Dec 2013 17:50:01 +0000 (17:50 +0000)]
WTF, JavaScriptCore fails to build with trunk clang: operators new, new[],
delete, delete[] cannot be declared inline
https://bugs.webkit.org/show_bug.cgi?id=124186
<rdar://problem/15644039>

Reviewed by Geoffrey Garen and Anders Carlsson.

Following <http://llvm.org/viewvc/llvm-project?view=revision&revision=193044>
(http://llvm.org/bugs/show_bug.cgi?id=17591>), Clang emits warnings when
operator new, delete are inlined. Such definitions cannot be inline per
replacement.functions (17.6.4.6/3) of the C++ standard. For now,
disable these warnings instead of exporting these functions.

* wtf/FastMalloc.h:

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

8 years agoImprove "bad parent" and "bad child list" assertions in line boxes
darin@apple.com [Thu, 19 Dec 2013 17:40:53 +0000 (17:40 +0000)]
Improve "bad parent" and "bad child list" assertions in line boxes
https://bugs.webkit.org/show_bug.cgi?id=125656

Reviewed by Sam Weinig.

* rendering/InlineBox.cpp:
(WebCore::InlineBox::root): Use parent() function with assertions rather than
using m_parent function, which skips the assertions.
* rendering/RenderText.cpp:
(WebCore::RenderText::removeAndDestroyTextBoxes): Call invalidateParentChildLists
if we are in the optimized document-destruction code path and destroying children
without removing them from their parents.
* rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::invalidateParentChildLists): Added.
* rendering/RenderTextLineBoxes.h: Added invalidateParentChildLists.

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

8 years ago<rdar://problem/15696824> [CFNetwork] Loading stops at server redirects
mitz@apple.com [Thu, 19 Dec 2013 17:32:49 +0000 (17:32 +0000)]
<rdar://problem/15696824> [CFNetwork] Loading stops at server redirects
https://bugs.webkit.org/show_bug.cgi?id=125984

Reviewed by Anders Carlsson.

* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::willSendRequest): If the client uses async callbacks, call its
willSendRequestAsync callback instead if willSendRequest.

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

8 years agoWTF fails to compile with gcc 4.8.2 and -Werror=array-bounds
hugo.lima@openbossa.org [Thu, 19 Dec 2013 17:11:35 +0000 (17:11 +0000)]
WTF fails to compile with gcc 4.8.2 and -Werror=array-bounds
https://bugs.webkit.org/show_bug.cgi?id=125936

Reviewed by Anders Carlsson.

* wtf/dtoa/double-conversion.cc: Use a unsigned instead of int on buffer_pos type.

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

8 years ago[CoordinatedGraphics] Regressions in WebView's contentScaleFactor/contentPosition
commit-queue@webkit.org [Thu, 19 Dec 2013 16:30:51 +0000 (16:30 +0000)]
[CoordinatedGraphics] Regressions in WebView's contentScaleFactor/contentPosition
https://bugs.webkit.org/show_bug.cgi?id=125943

Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-12-19
Reviewed by Noam Rosenthal.

When WebView::pageDidRequestScroll is called it is scaling position requested
to scroll before store it as contentPosition, that is not necessary since WebView
already stores the requested contentScaleFactor so it's able to do that internally
when needed, what simplifies the API and improves the readability of webview's code.
This patch reverts changes from https://bugs.webkit.org/show_bug.cgi?id=118548, which
was causing some regressions in contentScaleFactor/contentPosition related stuff.
Besides that WebView::pageDidRequestScroll calls viewClient callback with the wrong
position (different from the position stored in WebView).

* UIProcess/API/efl/EwkView.cpp:
(EwkView::scrollBy):
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::transformToScene):
(WebKit::WebView::updateViewportSize):
(WebKit::WebView::pageDidRequestScroll):
* UIProcess/efl/PageViewportControllerClientEfl.cpp:
(WebKit::PageViewportControllerClientEfl::setViewportPosition):

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

8 years agoDelete RVCT related code parts.
ossy@webkit.org [Thu, 19 Dec 2013 16:21:47 +0000 (16:21 +0000)]
Delete RVCT related code parts.
https://bugs.webkit.org/show_bug.cgi?id=125626

Patch by Peter Szanka <h868064@stud.u-szeged.hu> on 2013-12-19
Reviewed by Csaba Osztrogonác.

* wtf/Compiler.h: follow-up fix for r160648, remove an unnecessary comment.

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

8 years agoCascadedProperties: Deferred properties should have inline capacity.
akling@apple.com [Thu, 19 Dec 2013 15:24:10 +0000 (15:24 +0000)]
CascadedProperties: Deferred properties should have inline capacity.
<https://webkit.org/b/125994>

Give CascadedProperties::m_deferredProperties an inline capacity
of 8 to sidestep malloc churn (0.2% of HTML5-8266 profile.)

Reviewed by Antti Koivisto.

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

8 years agoTwo small refinements to matched properties cache.
akling@apple.com [Thu, 19 Dec 2013 13:59:11 +0000 (13:59 +0000)]
Two small refinements to matched properties cache.
<https://webkit.org/b/125992>

- Avoid computing the matched properties hash if we're banned from
  using the cache anyway.

- When adding a new entry to the cache, use move semantics to avoid
  creating a transient copy of all the data.

Reviewed by Antti Koivisto.

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

8 years agoCascadedProperties should use a bitset to track property presence.
akling@apple.com [Thu, 19 Dec 2013 12:15:44 +0000 (12:15 +0000)]
CascadedProperties should use a bitset to track property presence.
<https://webkit.org/b/125991>

Avoid zeroing out a bunch of memory in the CascadedProperties ctor
by using a bitset to track whether each property is present in the
cascaded set.

Reviewed by Antti Koivisto.

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

8 years agoWeb Inspector: Fix description of parameters in Page.setGeolocationOverride
seokju@webkit.org [Thu, 19 Dec 2013 09:20:36 +0000 (09:20 +0000)]
Web Inspector: Fix description of parameters in Page.setGeolocationOverride
https://bugs.webkit.org/show_bug.cgi?id=125983

Reviewed by Joseph Pecoraro.

No new tests, no changes in behavior.

* inspector/protocol/Page.json:

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

8 years agoRebaseline the test I added in r160819.
rniwa@webkit.org [Thu, 19 Dec 2013 07:19:02 +0000 (07:19 +0000)]
Rebaseline the test I added in r160819.

* svg/text/select-text-inside-non-static-position-expected.txt:

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

8 years ago[MSE][Mac] Add AVSampleBufferRendererSynchronizer support.
jer.noble@apple.com [Thu, 19 Dec 2013 07:01:59 +0000 (07:01 +0000)]
[MSE][Mac] Add AVSampleBufferRendererSynchronizer support.
https://bugs.webkit.org/show_bug.cgi?id=125954

Reviewed by NOBODY (OOPS!).

Instead of slaving all the various renderer's CMTimebases to one master timebase,
use AVSampleBufferRenderSynchronizer, which essentially does the same thing.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::CMTimebaseEffectiveRateChangedCallback): Added; call effectiveRateChanged().
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): Set up
    the synchronizer and all the observers.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC): Tear down
    the same.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable): Require the
    AVSampleBufferRenderSynchronizer class.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal): Convert Clock -> Synchronizer.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseInternal): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paused): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setRateDouble): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::destroyLayer): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::effectiveRateChanged): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer): Ditto.

Drive-by fix; audio samples can't be subdivided, and video samples are
rarely combined, so remove the call to CMSampleBufferCallForEachSample:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::didProvideMediaDataForTrackID):

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

8 years ago[WinCairo] Unreviewed build fix after r160798.
alex.christensen@flexsim.com [Thu, 19 Dec 2013 04:47:16 +0000 (04:47 +0000)]
[WinCairo] Unreviewed build fix after r160798.

* win/tools/vsprops/FeatureDefinesCairo.props:
Removed ENABLE_MEDIA_CONTROLS_SCRIPT definition for now.

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

8 years agoDelayedReleaseScope is in the wrong place
mhahnenberg@apple.com [Thu, 19 Dec 2013 04:30:02 +0000 (04:30 +0000)]
DelayedReleaseScope is in the wrong place
https://bugs.webkit.org/show_bug.cgi?id=125876

Reviewed by Geoffrey Garen.

The DelayedReleaseScope needs to be around the free list sweeping in MarkedAllocator::tryAllocateHelper.
This location gives us a good safe point between getting ready to allocate  (i.e. identifying a non-empty
free list) and doing the actual allocation (popping the free list).

* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::tryAllocateHelper):
(JSC::MarkedAllocator::allocateSlowCase):
(JSC::MarkedAllocator::addBlock):
* runtime/JSCellInlines.h:
(JSC::allocateCell):

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

8 years agoCSS: Fall back to cache-less cascade when encountering explicitly inherited value.
akling@apple.com [Thu, 19 Dec 2013 03:13:18 +0000 (03:13 +0000)]
CSS: Fall back to cache-less cascade when encountering explicitly inherited value.
<https://webkit.org/b/125968>

When encountering an explicitly inherited value for a property that's not
"statically inherited", drop out of the matched properties cache path
immediately instead of waiting for some coincidence to trigger it later on.

Fixes 3 asserting table tests:

- fast/table/border-collapsing/cached-69296.html
- tables/mozilla/bugs/bug27038-3.html
- tables/mozilla_expected_failures/marvin/backgr_border-table-row-group.html

Reviewed by Antti Koivisto.

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

8 years agoCrash in WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches
rniwa@webkit.org [Thu, 19 Dec 2013 03:09:56 +0000 (03:09 +0000)]
Crash in WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches
https://bugs.webkit.org/show_bug.cgi?id=125970

Reviewed by Antti Koivisto.

Source/WebCore:

The bug was caused by containingBlockForAbsolutePosition returning a non-RenderBlock render object.
Fixed the bug by obtaining its containg block.

Also changed the return type of containingBlockForFixedPosition, containingBlockForAbsolutePosition,
containingBlockForObjectInFlow from RenderElement to RenderBlock as all callers of these functions
had assumed the return value to be an instance of RenderBlock.

Test: svg/text/select-text-inside-non-static-position.html

* rendering/LogicalSelectionOffsetCaches.h:
(WebCore::containingBlockForFixedPosition):
(WebCore::containingBlockForAbsolutePosition):
(WebCore::containingBlockForObjectInFlow):
(WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):

LayoutTests:

Added a regression test.

* svg/text/select-text-inside-non-static-position-expected.txt: Added.
* svg/text/select-text-inside-non-static-position.html: Added.

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

8 years agoWebKit2 View Gestures: Move WebProcess-side geometry collection into its own class
timothy_horton@apple.com [Thu, 19 Dec 2013 02:33:33 +0000 (02:33 +0000)]
WebKit2 View Gestures: Move WebProcess-side geometry collection into its own class
https://bugs.webkit.org/show_bug.cgi?id=125967

Reviewed by Anders Carlsson.

Move the messages dispatched by ViewGestureController that grab geometry
from the WebProcess out of the DrawingArea and into ViewGestureGeometryCollector.
This class will grow when smart magnification is implemented.

* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
Remove BeginTransientZoom() message.

* DerivedSources.make:
* UIProcess/DrawingAreaProxy.h:

* UIProcess/mac/ViewGestureController.cpp:
(WebKit::ViewGestureController::didCollectGeometryForMagnificationGesture):
(WebKit::ViewGestureController::handleMagnificationGesture):
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureController.messages.in:
Make use of ViewGestureGeometryCollector and rename didBeginTransientZoom to didCollectGeometryForMagnificationGesture.

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

* WebProcess/WebPage/ViewGestureGeometryCollector.cpp: Added.
(WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector):
(WebKit::ViewGestureGeometryCollector::~ViewGestureGeometryCollector):
(WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
* WebProcess/WebPage/ViewGestureGeometryCollector.h: Added.
* WebProcess/WebPage/ViewGestureGeometryCollector.messages.in: Added.
Move the code to collect the visible content rect and return it to the ViewGestureController into its own class.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
Move m_pageID to the top of WebPage's initialization list so that
it can be safely used from other members' constructors.

Add a ViewGestureGeometryCollector member and construct it.

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

8 years agoDon't waste cycles on zeroing every CascadedProperties::Property.
akling@apple.com [Thu, 19 Dec 2013 02:29:41 +0000 (02:29 +0000)]
Don't waste cycles on zeroing every CascadedProperties::Property.
<https://webkit.org/b/125966>

The CascadedProperties constructor already zeroes out the whole
property array. Move the memset() to setDeferred() which is the only
other place we create a Property.

Brought to you by Instruments.app. Profile your code today!

Reviewed by Antti Koivisto.

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

8 years agoUnreviewed cmake build fix for GTK+.
gns@gnome.org [Thu, 19 Dec 2013 02:22:32 +0000 (02:22 +0000)]
Unreviewed cmake build fix for GTK+.

Source/WebKit:

* PlatformGTK.cmake: add missing include directory.

Source/WebKit2:

* PlatformGTK.cmake: fix paths for files that were moved.

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

8 years ago[CSS Shapes] Simplify the BoxShape implementation
hmuller@adobe.com [Thu, 19 Dec 2013 01:55:46 +0000 (01:55 +0000)]
[CSS Shapes] Simplify the BoxShape implementation
https://bugs.webkit.org/show_bug.cgi?id=125548

Reviewed by Andreas Kling.

Reduce BoxShape's footprint by about 2/3rds. Instead of caching the
FloatRoundedRects which represent a BoxShape's shape-padding and shape-margin
boundaries, compute them as needed.

No new tests, this is just an internal refactoring.

* rendering/shapes/BoxShape.cpp:
(WebCore::BoxShape::shapeMarginLogicalBoundingBox): Now just computes the bounding box rect.
(WebCore::BoxShape::shapePaddingLogicalBoundingBox): Ditto.
(WebCore::BoxShape::shapeMarginBounds): Removed the caching logic.
(WebCore::BoxShape::shapePaddingBounds): Ditto.
(WebCore::BoxShape::getExcludedIntervals): Use the computed margin bounds, instead of the cached one.
(WebCore::BoxShape::getIncludedIntervals): Ditto (padding bounds).
* rendering/shapes/BoxShape.h:
(WebCore::BoxShape::BoxShape): Simplified the constructor.
* rendering/shapes/Shape.cpp:
(WebCore::createBoxShape):
(WebCore::Shape::createShape):

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

8 years agoMessageReceiverMap::addMessageReceiver should assert that destinationID is not zero
andersca@apple.com [Thu, 19 Dec 2013 01:39:03 +0000 (01:39 +0000)]
MessageReceiverMap::addMessageReceiver should assert that destinationID is not zero
https://bugs.webkit.org/show_bug.cgi?id=125965

Reviewed by Tim Horton.

* Platform/CoreIPC/MessageReceiverMap.cpp:
(CoreIPC::MessageReceiverMap::addMessageReceiver):

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

8 years ago[GTK][CMake] make libjavascriptcoregtk a public shared library again
gns@gnome.org [Thu, 19 Dec 2013 01:35:02 +0000 (01:35 +0000)]
[GTK][CMake] make libjavascriptcoregtk a public shared library again
https://bugs.webkit.org/show_bug.cgi?id=125512

Reviewed by Martin Robinson.

.:

* CMakeLists.txt: make JavaScriptCore always be a shared library for the GTK+ port.
* Source/cmake/WebKitHelpers.cmake: make -fvisibility=hidden not be applied for GTK+,
visibility of some symbols is required for threading to be initialized properly by
WebKit2 processes, and we will rely on a linker script that will be added later on,
for production builds.

Source/JavaScriptCore:

* CMakeLists.txt: use target type instead of SHARED_CORE to decide whether
JavaScriptCore is a shared library, since it's always shared for GTK+ regardless
of SHARED_CORE.

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

8 years agoDeprecate some WKMutableDictionary functions
andersca@apple.com [Thu, 19 Dec 2013 01:22:56 +0000 (01:22 +0000)]
Deprecate some WKMutableDictionary functions
https://bugs.webkit.org/show_bug.cgi?id=125962

Reviewed by Tim Horton.

Source/WebKit2:

* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKDictionaryIsMutable):
(WKDictionaryAddItem):
(WKDictionaryRemoveItem):
* Shared/API/c/WKMutableDictionary.cpp:
* Shared/API/c/WKMutableDictionary.h:

Tools:

* TestWebKitAPI/PlatformUtilities.cpp:
(TestWebKitAPI::Util::createInitializationDictionaryForInjectedBundleTest):
* TestWebKitAPI/Tests/WebKit2/DidAssociateFormControls_Bundle.cpp:
(TestWebKitAPI::didAssociateFormControls):
* TestWebKitAPI/Tests/WebKit2/WillLoad_Bundle.cpp:
(TestWebKitAPI::WillLoadTest::willLoadURLRequest):
(TestWebKitAPI::WillLoadTest::willLoadDataRequest):
* WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
(WTR::createMouseMessageBody):
(WTR::EventSendingController::mouseMoveTo):
(WTR::EventSendingController::leapForward):
(WTR::createKeyDownMessageBody):
(WTR::EventSendingController::mouseScrollBy):
(WTR::EventSendingController::continuousMouseScrollBy):
(WTR::EventSendingController::addTouchPoint):
(WTR::EventSendingController::updateTouchPoint):
(WTR::EventSendingController::setTouchModifier):
(WTR::EventSendingController::setTouchPointRadius):
(WTR::EventSendingController::touchStart):
(WTR::EventSendingController::touchMove):
(WTR::EventSendingController::touchEnd):
(WTR::EventSendingController::touchCancel):
(WTR::EventSendingController::clearTouchPoints):
(WTR::EventSendingController::releaseTouchPoint):
(WTR::EventSendingController::cancelTouchPoint):
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::done):
(WTR::InjectedBundle::setMockGeolocationPosition):
(WTR::InjectedBundle::setCustomPolicyDelegate):
(WTR::InjectedBundle::setVisibilityState):
(WTR::InjectedBundle::queueLoad):
(WTR::InjectedBundle::queueLoadHTMLString):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):
(WTR::TestController::resetStateToConsistentValues):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::updateThreadedScrollingForCurrentTest):
(WTR::updateLayoutType):
(WTR::TestInvocation::invoke):

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

8 years ago[MSE][Mac] Add AVSampleBufferAudioRenderer support.
jer.noble@apple.com [Thu, 19 Dec 2013 01:14:26 +0000 (01:14 +0000)]
[MSE][Mac] Add AVSampleBufferAudioRenderer support.
https://bugs.webkit.org/show_bug.cgi?id=125905

Reviewed by Eric Carlson.

On platforms which support AVSampleBufferAudioRenderer, add support
for playback of audio CMSampleBufferRefs generated by AVStreamDataParser.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable): Require AVSampleBufferAudioRenderer.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVolume): Pass through to every audio renderer.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setMuted): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer): Slave the renderer's
    timebase to the master clock.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC): Drive by fix; initialize
    m_enabledVideoTrackID.
(WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC): Call destroyRenderers().
(WebCore::callProcessCodedFrameForEachSample): Drive by fix; convert the bool return to an OSErr.
(WebCore::SourceBufferPrivateAVFObjC::destroyRenderers): Added; flush and destroy the audio
    renderers.
(WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource): Call destroyRenderers().
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): Enable or disable the audio
    renderer in response.
(WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): Added audio
    specific version.
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Ditto.
(WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): Ditto.
(WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples): Ditto.
(WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples): Ditto.

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

8 years ago[Cocoa] Allow the web process plug-in to intercept resource requests
mitz@apple.com [Thu, 19 Dec 2013 00:52:47 +0000 (00:52 +0000)]
[Cocoa] Allow the web process plug-in to intercept resource requests
https://bugs.webkit.org/show_bug.cgi?id=125959

Reviewed by Anders Carlsson.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Declared new
delegate method.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(willSendRequestForFrame): Implemented this WKBundlePageResourceClient callback by calling
the load delegate.
(setUpResourceLoadClient): Added. Initializes the resource load client with the above
function.
(-[WKWebProcessPlugInBrowserContextController setLoadDelegate:]): Added calls to initialize
and clear the resource load client.

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

8 years agoWeb Inspector: Remove leftover code from InspectorController after r108965
seokju@webkit.org [Thu, 19 Dec 2013 00:42:51 +0000 (00:42 +0000)]
Web Inspector: Remove leftover code from InspectorController after r108965
https://bugs.webkit.org/show_bug.cgi?id=125956

Reviewed by Joseph Pecoraro.

No new tests, no changes in behavior.

* inspector/InspectorController.h: PostWorkerNotificationToFrontendTask was removed in r108965.

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

8 years agoCSS: Add a property cascading pass to style application.
akling@apple.com [Thu, 19 Dec 2013 00:33:25 +0000 (00:33 +0000)]
CSS: Add a property cascading pass to style application.
<https://webkit.org/b/125213>

Add an intermediate pass to style application where we cascade all
style properties to figure out their final values before starting
to build RenderStyles.

This opens up various opportunities for further optimization.

Reviewed by Antti Koivisto.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::CascadedProperties::Property::Property):
(WebCore::StyleResolver::CascadedProperties::CascadedProperties):
(WebCore::StyleResolver::CascadedProperties::property):
(WebCore::StyleResolver::CascadedProperties::set):
(WebCore::StyleResolver::CascadedProperties::addStyleProperties):
(WebCore::StyleResolver::CascadedProperties::addMatches):
(WebCore::StyleResolver::CascadedProperties::Property::apply):

    Added. CascadedProperties is something of a container class
    that takes CSS property/value/linkMatchType as input and boils
    them down to the final values that will actually be used.

    Most properties are poked into an unfancy array where latest
    is greatest (unless !important, of course.) Some properties are
    queued up to be applied in parse order, more on that below.

(WebCore::StyleResolver::applyCascadedProperties):
(WebCore::StyleResolver::applyMatchedProperties):

    The brains of this patch. applyMatchedProperties() now creates
    a CascadedProperties and uses it to figure out the final values
    and uses applyCascadedProperties() to apply them. Deferred
    properties (parse order) are applied last.

    We may discover during property application that we won't be
    able to use a matched properties cache item. This happens if
    the effective zoom or font changes. If that happens, we start
    the process over, now with the cache disabled. This may need
    some optimization work.

(WebCore::extractDirectionAndWritingMode):

    Directional properties ending in e.g -before or -after depend on
    the direction and writing mode in effect, so we must begin with
    resolving those properties before doing the full cascade.

    This is done by simply walking the set of matched properties and
    manually applying '-webkit-writing-mode' and 'direction'.

    If this starts showing up in profiles, we can easily cache some
    of the information in e.g RuleData to avoid the traversal here.

(WebCore::elementTypeHasAppearanceFromUAStyle):

    To determine whether a form element is styled beyond the default
    UA style sheet, StyleResolver caches the border and background
    values from RenderStyle after applying the UA style sheet.

    Those values are then compared against after all style is applied
    and if some (platform-dependent) values differ, the element is
    considered "styled."

    This really only affects elements with -webkit-appearance values
    in the default UA style sheet, so this function determines if an
    element should take the goofy slow path for this.

(WebCore::shouldApplyPropertyInParseOrder):
(WebCore::StyleResolver::CascadedProperties::setDeferred):
(WebCore::StyleResolver::CascadedProperties::applyDeferredProperties):

    Some CSS properties will write to the same RenderStyle fields when
    applied, so in order to maintain previous behavior, we must apply
    them in the order they were parsed.

    We accomplish this by keeping an ordered queue of such properties
    to apply separately after all the other properties.

(WebCore::StyleResolver::CascadedProperties::setPropertyInternal):

    Helper for poking values into a CascadedProperties::Property.

* css/StyleResolver.h:
(WebCore::StyleResolver::state):

    Expose the StyleResolver::State so CascadedProperties can access it.

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

8 years ago[GTK] [CMake] Add support for building GtkLauncher
mrobinson@webkit.org [Thu, 19 Dec 2013 00:10:15 +0000 (00:10 +0000)]
[GTK] [CMake] Add support for building GtkLauncher
https://bugs.webkit.org/show_bug.cgi?id=125766

Reviewed by Gustavo Noronha Silva.

* CMakeLists.txt: Add the GtkLauncher subdirectory for the GTK port.
* GtkLauncher/CMakeLists.txt: Added.
* GtkLauncher/main.c: Support including the CMake config file.

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

8 years ago[GTK] [CMake] Add support for building WebKit1
mrobinson@webkit.org [Thu, 19 Dec 2013 00:04:47 +0000 (00:04 +0000)]
[GTK] [CMake] Add support for building WebKit1
https://bugs.webkit.org/show_bug.cgi?id=116377

Reviewed by Gustavo Noronha Silva.

.:

* Source/cmake/OptionsGTK.cmake: Turn off some features that do not build properly
for WebKit1 and stop using the version script which we haven't implemented yet. Turn
on WebKit1.

Source/WebCore:

* PlatformGTK.cmake: Add a missing source required by WebKit1 to
the WebCore build.

Source/WebKit:

* CMakeLists.txt: Updated WebCore include directory list for WebKitGTK+ and
added BUILDING_WEBKIT to the list of defines.
* PlatformGTK.cmake: Added.

Source/WebKit/gtk:

* GNUmakefile.am: Switch to using the templates for building the GObject enums.
* webkit/webkitenumtypes.cpp.template: Added.
* webkit/webkitenumtypes.h.template: Added.

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

8 years agohttps://bugs.webkit.org/show_bug.cgi?id=125941
commit-queue@webkit.org [Wed, 18 Dec 2013 23:50:19 +0000 (23:50 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=125941
Add Obj C API for injected bundle PageGroup class.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2013-12-18
Reviewed by Dan Bernstein.

Add Obj C API (WKWebProcessPlugInPageGroup) for injected bundle PageGroup class. And add APIs to
expose the main frame and page group from WKWebProcessPlugInBrowsingContextController.

* Shared/Cocoa/APIObject.mm:
(API::Object::newObject): Create wrapper object for InjectedPageGroup object.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.h: Added.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.mm: Added.
(-[WKWebProcessPlugInPageGroup identifier]):
(-[WKWebProcessPlugInPageGroup dealloc]):
(-[WKWebProcessPlugInPageGroup API::]):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroupInternal.h: Added.
(WebKit::wrapper):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h: Add API to expose the main frame and page group
    for WKWebPocessPlugInBrowserContextController.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController mainFrame]):
(-[WKWebProcessPlugInBrowserContextController pageGroup]):

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

8 years ago[CSS Shapes] Simplify RectangleShape implementation
hmuller@adobe.com [Wed, 18 Dec 2013 23:33:59 +0000 (23:33 +0000)]
[CSS Shapes] Simplify RectangleShape implementation
https://bugs.webkit.org/show_bug.cgi?id=125536

Reviewed by Andreas Kling.

Instead of caching an instance of a private FloatRoundedRect (ish) class for
RectangleShape's shape-margin and shape-padding bounds, we just compute
the FloatRect and radii as needed. This reduces the classes footprint a little
and it simplifies the implementation.

Removed the private RectangleShape::ShapeBounds class and made its
cornerInterceptForWidth() method a static function. Added members for
the RectangleShape constructor args, and private getters for their properties.

There are no new tests because this is just an internal refactoring.

* rendering/shapes/RectangleShape.cpp:
(WebCore::RectangleShape::shapePaddingBounds):
(WebCore::RectangleShape::shapeMarginBounds):
(WebCore::ellipseXIntercept):
(WebCore::ellipseYIntercept):
(WebCore::RectangleShape::getExcludedIntervals):
(WebCore::RectangleShape::getIncludedIntervals):
(WebCore::cornerInterceptForWidth):
(WebCore::RectangleShape::firstIncludedIntervalLogicalTop):
(WebCore::RectangleShape::buildPath):
* rendering/shapes/RectangleShape.h:
(WebCore::RectangleShape::RectangleShape):
(WebCore::RectangleShape::rx):
(WebCore::RectangleShape::ry):
(WebCore::RectangleShape::x):
(WebCore::RectangleShape::y):
(WebCore::RectangleShape::width):
(WebCore::RectangleShape::height):
* rendering/shapes/Shape.cpp:
(WebCore::createCircleShape): Renamed this internal function (it was createShapeCircle) because it was inconsistent.
(WebCore::createEllipseShape): Ditto.
(WebCore::Shape::createShape):

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

8 years agoPDFPlugin: Never make a NSEventType = 0
timothy_horton@apple.com [Wed, 18 Dec 2013 23:25:56 +0000 (23:25 +0000)]
PDFPlugin: Never make a NSEventType = 0
https://bugs.webkit.org/show_bug.cgi?id=125955

Reviewed by Dan Bernstein.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::getEventTypeFromWebEvent):
Make getEventTypeFromWebEvent return its NSEventType as an out arg, and
make the return value represent whether or not we set it.

(WebKit::PDFPlugin::nsEventForWebMouseEvent):
(WebKit::PDFPlugin::handleKeyboardEvent):
Make use of getEventTypeFromWebEvent.

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

8 years agoAdd a simple stack abstraction for x86_64
benjamin@webkit.org [Wed, 18 Dec 2013 23:23:53 +0000 (23:23 +0000)]
Add a simple stack abstraction for x86_64
https://bugs.webkit.org/show_bug.cgi?id=125908

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::addPtrNoFlags):
Add an explicit abstraction for the "lea" instruction. This is needed
by the experimental JIT to have add and substract without changing the flags.

This is useful for function calls to test the return value, restore the registers,
then branch on the flags from the return value.

Source/WebCore:

StackAllocator provides an abstraction to make it hard to make mistakes and protects from obvious
issues at runtime.

The key roles of StackAllocators are:
-Provide the necessary stack alignment for function calls (only x86_64 stack for now).
-Provide ways to save registers on the stack, restore or discard them as needed.
-Crash at runtime if an operation would obviously cause a stack inconsistency.

The way simple inconsistencies are detected is through the StackReference object
returned whenever something is added on the stack.
The object keeps a reference to the offset of what has been pushed. When the StackReference
is used to recover the register, if the offset is different, there is a missmatch between
push() and pop() after the object was pushed.

* cssjit/StackAllocator.h: Added.
(WebCore::StackAllocator::StackReference::StackReference):
(WebCore::StackAllocator::StackReference::operator unsigned):
(WebCore::StackAllocator::StackAllocator):
(WebCore::StackAllocator::~StackAllocator):
(WebCore::StackAllocator::push):
(WebCore::StackAllocator::pop):

(WebCore::StackAllocator::alignStackPreFunctionCall):
(WebCore::StackAllocator::unalignStackPostFunctionCall):
Those helpers provide a simple way to have a valid stack prior to a function call.
Since StackAllocator knows the offset and the platform rules, it can adjust the stack
if needed for x86_64.

(WebCore::StackAllocator::discard): Discard a single register or the full stack.

(WebCore::StackAllocator::combine): combining stacks is the way to solve branches
where the stack is used differently in each case.
To do that, the stack is first copied to A and B. Each branch works on its own
StackAllocator copy, then the two copies are linked together to the original stack.

The copies ensure the local consistency in each branch, linking the copies ensure global
consistencies and that both branches end in the same stack state.

(WebCore::StackAllocator::offsetToStackReference): Helper function to access the stack by address
through its StackReference.

(WebCore::StackAllocator::reset):

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

8 years ago[GTK][CMake] Use thin archives if building on Linux, only way to get non-shared-core...
gns@gnome.org [Wed, 18 Dec 2013 23:12:02 +0000 (23:12 +0000)]
[GTK][CMake] Use thin archives if building on Linux, only way to get non-shared-core debug builds
https://bugs.webkit.org/show_bug.cgi?id=125951

Reviewed by Martin Robinson.

* Source/cmake/OptionsGTK.cmake: append T for thin archives to the flags passed to ar,
also use u, which is used in the autotools build (it avoids adding a file twice).

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