WebKit-https.git
7 years ago.: Heap-use-after-free in WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewpor...
wangxianzhu@chromium.org [Wed, 13 Feb 2013 18:37:30 +0000 (18:37 +0000)]
.: Heap-use-after-free in WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects.
https://bugs.webkit.org/show_bug.cgi?id=108695

Add a manual test. Unable to write a normal layout test because
1) must waitUntilDone() to reproduce the crash but the redirected URL can't notifyDone();
2) Can't use a frame to contain the test because ScrollingCoordinator handles only the main frame.

Reviewed by Abhishek Arya.

* ManualTests/scrolling-coordinator-viewport-constrained-crash.html: Added.

Source/WebCore: Heap-use-after-free in WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects
https://bugs.webkit.org/show_bug.cgi?id=108695

See comments of RenderLayerModelObject::willBeDestroyed() below for details.

Reviewed by Abhishek Arya.

Test: ManulTests/scrolling-coordinator-viewport-constrained-crash.html
Unable to write a normal layout test because
1) must waitUntilDone() to reproduce the crash but the redirected URL can't notifyDone();
2) Can't use a frame to contain the test because ScrollingCoordinator handles only the main frame.

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::willBeDestroyed): Moved removeViewportConstrainedObject() call into RenderLayerModelObject::willBeDestroyed() because only RenderLayerModelObjects can be added as viewportConstrainedObjects.
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::willBeDestroyed): Changed this->view() (then view->frameView()) to this->frame() (then frame->view()) because when willBeDestroyed() is called, the document has set its renderView to 0 thus this->view() will return 0, causing removeViewportConstrainedObject() not called and a deleted RenderLayerModelObject in FrameView's viewportConstrainedObjects.

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

7 years ago[SVG] OOB access in SVGListProperty::replaceItemValues()
fmalita@chromium.org [Wed, 13 Feb 2013 17:49:47 +0000 (17:49 +0000)]
[SVG] OOB access in SVGListProperty::replaceItemValues()
https://bugs.webkit.org/show_bug.cgi?id=109293

Source/WebCore:

Replacing a list property item with itself should be a no-op. This patch updates the related
APIs and logic to detect the self-replace case and prevent removal of the item from the list.

To avoid scanning the list multiple times, removeItemFromList() is updated to operate on
indices and a findItem() method is added to resolve an item to an index.

Reviewed by Dirk Schulze.

No new tests: updated existing tests cover the change.

* svg/properties/SVGAnimatedListPropertyTearOff.h:
(WebCore::SVGAnimatedListPropertyTearOff::findItem):
(SVGAnimatedListPropertyTearOff):
(WebCore::SVGAnimatedListPropertyTearOff::removeItemFromList):
* svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
(WebCore::SVGAnimatedPathSegListPropertyTearOff::findItem):
(SVGAnimatedPathSegListPropertyTearOff):
(WebCore::SVGAnimatedPathSegListPropertyTearOff::removeItemFromList):
Add a findItem() delegating method, and update removeItemFromList() to use the new
index-based API.

* svg/properties/SVGListProperty.h:
(WebCore::SVGListProperty::insertItemBeforeValues):
(WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
(WebCore::SVGListProperty::replaceItemValues):
(WebCore::SVGListProperty::replaceItemValuesAndWrappers):
(SVGListProperty):
Updated to handle the no-op case for insertItemBefore() & replaceItem().

* svg/properties/SVGListPropertyTearOff.h:
(WebCore::SVGListPropertyTearOff::findItem):
(WebCore::SVGListPropertyTearOff::removeItemFromList):
Index-based API updates.

(WebCore::SVGListPropertyTearOff::processIncomingListItemValue):
(WebCore::SVGListPropertyTearOff::processIncomingListItemWrapper):
* svg/properties/SVGPathSegListPropertyTearOff.cpp:
(WebCore::SVGPathSegListPropertyTearOff::processIncomingListItemValue):
Detect the self-replace case and return without removing the item from the list.

* svg/properties/SVGPathSegListPropertyTearOff.h:
(WebCore::SVGPathSegListPropertyTearOff::findItem):
(WebCore::SVGPathSegListPropertyTearOff::removeItemFromList):
(SVGPathSegListPropertyTearOff):
(WebCore::SVGPathSegListPropertyTearOff::processIncomingListItemWrapper):
* svg/properties/SVGStaticListPropertyTearOff.h:
(WebCore::SVGStaticListPropertyTearOff::processIncomingListItemValue):
(WebCore::SVGStaticListPropertyTearOff::processIncomingListItemWrapper):
Index-based API updates.

LayoutTests:

Updated tests to cover the crash and new behavior.

Reviewed by Dirk Schulze.

* svg/dom/SVGLengthList-basics-expected.txt:
* svg/dom/SVGLengthList-basics.xhtml:
* svg/dom/SVGNumberList-basics-expected.txt:
* svg/dom/SVGNumberList-basics.xhtml:
* svg/dom/SVGPointList-basics-expected.txt:
* svg/dom/SVGPointList-basics.xhtml:
* svg/dom/SVGTransformList-basics-expected.txt:
* svg/dom/SVGTransformList-basics.xhtml:

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

7 years ago[WK2][EFL] Cleanup of graphics related code in EwkView
kenneth@webkit.org [Wed, 13 Feb 2013 17:46:32 +0000 (17:46 +0000)]
[WK2][EFL] Cleanup of graphics related code in EwkView
https://bugs.webkit.org/show_bug.cgi?id=109377

Reviewed by Anders Carlsson.

* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):

    Initialize the evasGL dependencies here and
    set m_isAccelerated to false if this fails.

    Set the coordinated graphics scene as active
    when using fixed layout.

(EwkView::setSize):

    Add a method to set the size and user-viewport
    transform from the outside. The idea is moving
    this to our pure WK C API in the future.

(EwkView::transformFromScene):
(EwkView::transformToScene):

    Update the transform methods to use the user-
    viewport transform.

(EwkView::paintToCurrentGLContext):
(EwkView::paintToCairoSurface):

    Add methods to paint to either the current GL context
    or to a given cairo_surface_t (for software fallback
    cases).

(EwkView::displayTimerFired):

    Clean up and use the two above methods.

(EwkView::scheduleUpdateDisplay):

    Use the new size() methods instead of using the
    smart-object data directly.

(EwkView::createGLSurface):

    Make this method use size() to query the surface size
    and avoid creating the context (done in ctor now).
    Also avoid using the smart-object data directly.

(EwkView::enterAcceleratedCompositingMode):
(EwkView::exitAcceleratedCompositingMode):

    Turn on/off the use of the coord. graphics scene.

(EwkView::handleEvasObjectCalculate):

    Use the new setSize and setUserViewportTransform.

(EwkView::takeSnapshot):
* UIProcess/API/efl/EwkView.h:
(WebCore):
(EwkView):
(EwkView::size):
(EwkView::setUserViewportTransform):
(EwkView::userViewportTransform):

    Add the new method definitions and rename isHardwareAccelerated
    to isAccelerated which fits better with the naming in WebCore.

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

7 years agoSource/WebCore: [Refactoring] StyleResolver::State should have methods to access...
tasak@google.com [Wed, 13 Feb 2013 17:26:41 +0000 (17:26 +0000)]
Source/WebCore: [Refactoring] StyleResolver::State should have methods to access its member variables.
https://bugs.webkit.org/show_bug.cgi?id=108563

Reviewed by Antti Koivisto.

Made all member variables private and added methods to access the
variables, because most of the member variables are read-only.
We don't need to update those read-only variables while resolving
styles.

No new tests, because just refactoring.

* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/StyleResolver.cpp:
(WebCore):
(WebCore::StyleResolver::collectMatchingRules):
(WebCore::StyleResolver::collectMatchingRulesForRegion):
(WebCore::StyleResolver::sortAndTransferMatchedRules):
(WebCore::StyleResolver::matchScopedAuthorRules):
(WebCore::StyleResolver::styleSharingCandidateMatchesHostRules):
(WebCore::StyleResolver::matchHostRules):
(WebCore::StyleResolver::matchAuthorRules):
(WebCore::StyleResolver::matchUserRules):
(WebCore::StyleResolver::matchUARules):
(WebCore::StyleResolver::collectMatchingRulesForList):
(WebCore::StyleResolver::sortMatchedRules):
(WebCore::StyleResolver::matchAllRules):
(WebCore::StyleResolver::State::initElement):
(WebCore::StyleResolver::initElement):
Modified to invoke m_state.initElement if a given element is
different from current m_state's element.
(WebCore::StyleResolver::State::initForStyleResolve):
Moved from StyleResolver.
(WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
(WebCore::StyleResolver::canShareStyleWithControl):
(WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
(WebCore::StyleResolver::canShareStyleWithElement):
(WebCore::StyleResolver::locateSharedStyle):
(WebCore::StyleResolver::styleForElement):
(WebCore::StyleResolver::styleForKeyframe):
(WebCore::StyleResolver::keyframeStylesForAnimation):
(WebCore::StyleResolver::pseudoStyleForElement):
Changed ASSERT in the first line. ASSERT(m_state.parentStyle) would be
wrong, because it depends on previous resolving. However,
initForStyleResolve will also update m_state.parentStyle. No code in
pseudoStyleForElement depends on previous resolving state.
(WebCore::StyleResolver::styleForPage):
(WebCore::StyleResolver::defaultStyleForElement):
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::updateFont):
(WebCore::StyleResolver::pseudoStyleRulesForElement):
(WebCore::StyleResolver::ruleMatches):
Added one more parameter, dynamicPseudo, because dynamicPseudo in
State class is just used for returning matched pseudo style from
this ruleMatches to collectMatchingRulesForList. No need to keep
dynamicPseudo while resolving styles.
(WebCore::StyleResolver::checkRegionSelector):
Removed m_pseudoStyle = NOPSEUDO, because this method uses just
SelectorChecker::matched. SelectorChecker doesn't see StyleResolver's
m_pseudoStyle directly. Need to use SelectorCheckerContext. So no
need to set m_pseudoStyle to be NOPSEUDO.
(WebCore::StyleResolver::applyProperties):
(WebCore::StyleResolver::applyMatchedProperties):
(WebCore::StyleResolver::isLeftPage):
(WebCore::StyleResolver::applyPropertyToStyle):
(WebCore::StyleResolver::useSVGZoomRules):
(WebCore::createGridTrackBreadth):
(WebCore::StyleResolver::resolveVariables):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::cachedOrPendingFromValue):
(WebCore::StyleResolver::generatedOrPendingFromValue):
(WebCore::StyleResolver::setOrPendingFromValue):
(WebCore::StyleResolver::cursorOrPendingFromValue):
(WebCore::StyleResolver::checkForTextSizeAdjust):
(WebCore::StyleResolver::initializeFontStyle):
(WebCore::StyleResolver::setFontSize):
(WebCore::StyleResolver::colorFromPrimitiveValue):
(WebCore::StyleResolver::loadPendingSVGDocuments):
(WebCore::StyleResolver::cachedOrPendingStyleShaderFromValue):
(WebCore::StyleResolver::loadPendingShaders):
(WebCore::StyleResolver::parseCustomFilterTransformParameter):
(WebCore::StyleResolver::createFilterOperations):
(WebCore::StyleResolver::loadPendingImage):
(WebCore::StyleResolver::loadPendingImages):
* css/StyleResolver.h:
(WebCore::StyleResolver::style):
(WebCore::StyleResolver::parentStyle):
(WebCore::StyleResolver::rootElementStyle):
(WebCore::StyleResolver::element):
(WebCore::StyleResolver::hasParentNode):
(StyleResolver):
(WebCore::StyleResolver::State::State):
(State):
(WebCore::StyleResolver::State::clear):
Modified to use clear at the end of styleForElement.
(WebCore::StyleResolver::State::document):
(WebCore::StyleResolver::State::element):
(WebCore::StyleResolver::State::styledElement):
(WebCore::StyleResolver::State::setStyle):
(WebCore::StyleResolver::State::style):
(WebCore::StyleResolver::State::takeStyle):
(WebCore::StyleResolver::State::ensureRuleList):
(WebCore::StyleResolver::State::takeRuleList):
(WebCore::StyleResolver::State::parentNode):
(WebCore::StyleResolver::State::setParentStyle):
(WebCore::StyleResolver::State::parentStyle):
(WebCore::StyleResolver::State::rootElementStyle):
(WebCore::StyleResolver::State::regionForStyling):
(WebCore::StyleResolver::State::setSameOriginOnly):
(WebCore::StyleResolver::State::isSameOriginOnly):
(WebCore::StyleResolver::State::pseudoStyle):
(WebCore::StyleResolver::State::elementLinkState):
(WebCore::StyleResolver::State::distributedToInsertionPoint):
(WebCore::StyleResolver::State::setElementAffectedByClassRules):
(WebCore::StyleResolver::State::elementAffectedByClassRules):
(WebCore::StyleResolver::State::setApplyPropertyToRegularStyle):
(WebCore::StyleResolver::State::setApplyPropertyToVisitedLinkStyle):
(WebCore::StyleResolver::State::applyPropertyToRegularStyle):
(WebCore::StyleResolver::State::applyPropertyToVisitedLinkStyle):
(WebCore::StyleResolver::State::pendingImageProperties):
(WebCore::StyleResolver::State::pendingSVGDocuments):
(WebCore::StyleResolver::State::setHasPendingShaders):
(WebCore::StyleResolver::State::hasPendingShaders):
(WebCore::StyleResolver::State::setLineHeightValue):
(WebCore::StyleResolver::State::lineHeightValue):
(WebCore::StyleResolver::State::setFontDirty):
(WebCore::StyleResolver::State::fontDirty):
(WebCore::StyleResolver::State::cacheBorderAndBackground):
(WebCore::StyleResolver::State::hasUAAppearance):
(WebCore::StyleResolver::State::borderData):
(WebCore::StyleResolver::State::backgroundData):
(WebCore::StyleResolver::State::backgroundColor):
(WebCore::StyleResolver::State::fontDescription):
(WebCore::StyleResolver::State::parentFontDescription):
(WebCore::StyleResolver::State::setFontDescription):
(WebCore::StyleResolver::State::setZoom):
(WebCore::StyleResolver::State::setEffectiveZoom):
(WebCore::StyleResolver::State::setTextSizeAdjust):
(WebCore::StyleResolver::State::setWritingMode):
(WebCore::StyleResolver::State::setTextOrientation):
fontDescription, ... and setTextOrientation were moved from
StyleResolver.
(WebCore::StyleResolver::State::matchedRules):
(WebCore::StyleResolver::State::addMatchedRule):
Moved from StyleResolver.
(WebCore::StyleResolver::applyPropertyToRegularStyle):
(WebCore::StyleResolver::applyPropertyToVisitedLinkStyle):
(WebCore::StyleResolver::fontDescription):
(WebCore::StyleResolver::parentFontDescription):
(WebCore::StyleResolver::setFontDescription):
(WebCore::StyleResolver::setZoom):
(WebCore::StyleResolver::setEffectiveZoom):
(WebCore::StyleResolver::setTextSizeAdjust):
(WebCore::StyleResolver::setWritingMode):
(WebCore::StyleResolver::setTextOrientation):
These fontDescription, ..., setTextOrientation are wrappers to
invoke State's methods. StyleBuilder still depends on StyleResolver
and invokes these methods. So we need these wrappers.

LayoutTests: [Refactoring] StyleResolver::State should have methods to access its me
https://bugs.webkit.org/show_bug.cgi?id=108563

Reviewed by Antti Koivisto.

* inspector/styles/region-style-crash-expected.txt:
Rebaseline. Since inspector hasn't supported CSS region styles yet,
region-style-crash.html has no CSS region styles as its result.

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

7 years ago[GTK] Remove support for compiling with GStreamer 0.10
commit-queue@webkit.org [Wed, 13 Feb 2013 17:24:40 +0000 (17:24 +0000)]
[GTK] Remove support for compiling with GStreamer 0.10
https://bugs.webkit.org/show_bug.cgi?id=109593

Patch by Martin Robinson <mrobinson@igalia.com> on 2013-02-13
Reviewed by Philippe Normand.

Remove support for building WebKitGTK+ with GStreamer 0.10. We
can simplify things greatly because we don't have to worry any
longer about selecting one GStreamer API set.

* Source/autotools/FindDependencies.m4:
* Source/autotools/ReadCommandLineArguments.m4:
* Source/autotools/SetupAutoconfHeader.m4:
* Source/autotools/Versions.m4:

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

7 years ago[Qt] window.open passes height and width parameters even if not defined in a page
allan.jensen@digia.com [Wed, 13 Feb 2013 17:21:42 +0000 (17:21 +0000)]
[Qt] window.open passes height and width parameters even if not defined in a page
https://bugs.webkit.org/show_bug.cgi?id=107705

Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Do not override width or height of 0, as that indicates default size, and not minimum size.

Tested by tst_qwebpage.

* page/DOMWindow.cpp:
(WebCore::DOMWindow::adjustWindowRect):

Source/WebKit/efl:

Do not resize window when default size is requested.

* WebCoreSupport/ChromeClientEfl.cpp:
(WebCore::ChromeClientEfl::setWindowRect):

Source/WebKit/gtk:

Do not resize window when default size is requested.

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::setWindowRect):

Source/WebKit/qt:

Test that minimum size is applied only when the requested size is too small,
not when default is requested.

* tests/qwebpage/tst_qwebpage.cpp:
(tst_QWebPage):
(TestPage):
(TestPage::TestPage):
(TestPage::createWindow):
(TestPage::slotGeometryChangeRequested):
(tst_QWebPage::openWindowDefaultSize):

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

7 years agoThe 2D Canvas functions fillText()/strokeText() should display nothing when maxWidth...
commit-queue@webkit.org [Wed, 13 Feb 2013 17:01:31 +0000 (17:01 +0000)]
The 2D Canvas functions fillText()/strokeText() should display nothing when maxWidth is less then or equal to zero
https://bugs.webkit.org/show_bug.cgi?id=102656

Patch by Rashmi Shyamasundar <rashmi.s2@samsung.com> on 2013-02-13
Reviewed by Dirk Schulze.

The functions fillText()/strokeText() should not display anything when
maxWidth is less than or equal to zero, according to spec :
http://www.w3.org/TR/2dcontext/#text-preparation-algorithm

Source/WebCore:

Test: fast/canvas/canvas-fillText-maxWidth-zero.html

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawTextInternal):

LayoutTests:

* fast/canvas/canvas-fillText-invalid-maxWidth-expected.txt: Added.
* fast/canvas/canvas-fillText-invalid-maxWidth.html: Added.
* fast/canvas/canvas-strokeText-invalid-maxWidth-expected.txt: Added.
* fast/canvas/canvas-strokeText-invalid-maxWidth.html: Added.
* fast/canvas/script-tests/canvas-fillText-invalid-maxWidth.js: Added.
* fast/canvas/script-tests/canvas-strokeText-invalid-maxWidth.js: Added.

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

7 years agoUnreviewed GTK gardening.
sergio@webkit.org [Wed, 13 Feb 2013 16:47:11 +0000 (16:47 +0000)]
Unreviewed GTK gardening.

Provide the same custom expectations as all the other
platforms. This likely means that there is a bug in the code or
that the expected result is incorrect.

* platform/gtk/TestExpectations:
* platform/gtk/editing/pasteboard/5761530-1-expected.txt: Added.

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

7 years ago[chromium] Add acceleration ratios for the deltas to WebMouseWheelEvents.
commit-queue@webkit.org [Wed, 13 Feb 2013 16:25:05 +0000 (16:25 +0000)]
[chromium] Add acceleration ratios for the deltas to WebMouseWheelEvents.
https://bugs.webkit.org/show_bug.cgi?id=109611

The deltas in mousewheel events generated by track can be accelerated (e.g. when
scrolling repeatedly). Keep track of the ratio of the acceleration since that is
useful for some tasks (e.g. overflow navigation gesture).

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2013-02-13
Reviewed by Adam Barth.

* public/WebInputEvent.h:
(WebKit::WebMouseWheelEvent::WebMouseWheelEvent):
* src/WebInputEvent.cpp:
(SameSizeAsWebMouseWheelEvent):

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

7 years agoreplaceWithJump should not decrease the offset by 1 on ARM traditional.
zherczeg@webkit.org [Wed, 13 Feb 2013 16:23:29 +0000 (16:23 +0000)]
replaceWithJump should not decrease the offset by 1 on ARM traditional.
https://bugs.webkit.org/show_bug.cgi?id=109689

Reviewed by Zoltan Herczeg.

* assembler/ARMAssembler.h:
(JSC::ARMAssembler::replaceWithJump):

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

7 years ago[EFL][WK2] Introduce WKViewClient C API
ch.dumez@sisa.samsung.com [Wed, 13 Feb 2013 16:16:45 +0000 (16:16 +0000)]
[EFL][WK2] Introduce WKViewClient C API
https://bugs.webkit.org/show_bug.cgi?id=109559

Reviewed by Anders Carlsson.

This patch introduces the WKViewClient C API for EFL's WKView. The purpose of
this new C API is to eventually remove the interdependency between EFL's
PageClient and EwkView. When completed, PageClient should only interact with
WebView and not be aware of EwkView so that we have a clean separation between
internal WebKit2 classes and our EFL Ewk API implementation.

This patch is only a first step towards this goal as there is a lot of work
to do to achieve complete separation between EwkView and PageClient. The purpose
of this patch is to introduce the needed architecture which will later be
extended by introducing new WKViewClient callbacks.

* PlatformEfl.cmake: Add new ViewClientEfl.cpp and WebViewClient.cpp to EFL's CMake
configuration.
* UIProcess/API/C/efl/WKView.cpp:
(WKViewSetViewClient):
* UIProcess/API/C/efl/WKView.h: Introduce new WKViewClient C API.
* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView): Initialize ViewClientEfl.
* UIProcess/API/efl/EwkView.h: Add new ViewClientEfl member.
(WebKit):
(EwkView):
* UIProcess/API/efl/EwkViewCallbacks.h: Update ContentsSizeChanged smart callback to
accept a WKSize in parameter instead of an IntRect.
* UIProcess/efl/PageClientBase.cpp: Start calling WKViewClient callbacks instead of
interacting directly with EwkView to avoid violating API layering.
(WebKit::PageClientBase::view):
(WebKit::PageClientBase::setViewNeedsDisplay):
* UIProcess/efl/PageClientBase.h:
(WebKit):
(PageClientBase):
* UIProcess/efl/PageClientDefaultImpl.cpp: Start calling WKViewClient callbacks instead of
interacting directly with EwkView to avoid violating API layering.
(WebKit::PageClientDefaultImpl::didChangeContentsSize):
* UIProcess/efl/PageClientLegacyImpl.cpp: Start calling WKViewClient callbacks instead of
interacting directly with EwkView to avoid violating API layering.
(WebKit::PageClientLegacyImpl::didChangeContentsSize):
* UIProcess/efl/ViewClientEfl.cpp:
(WebKit):
(WebKit::ViewClientEfl::toEwkView):
(WebKit::ViewClientEfl::viewNeedsDisplay):
(WebKit::ViewClientEfl::didChangeContentsSize):
(WebKit::ViewClientEfl::ViewClientEfl):
(WebKit::ViewClientEfl::~ViewClientEfl):
* UIProcess/efl/ViewClientEfl.h: Introduce new ViewClientEfl which handles WKViewClient callbacks
and interacts with EwkView.
(WebKit):
(ViewClientEfl):
(WebKit::ViewClientEfl::create):
* UIProcess/efl/WebView.cpp:
(WebKit::WebView::initializeClient):
(WebKit):
(WebKit::WebView::setViewNeedsDisplay):
(WebKit::WebView::didChangeContentsSize):
* UIProcess/efl/WebView.h: Add new WebViewClient member and corresponding methods to interact
with it.
(WebView):
* UIProcess/efl/WebViewClient.cpp:
(WebKit):
(WebKit::WebViewClient::viewNeedsDisplay):
(WebKit::WebViewClient::didChangeContentsSize):
* UIProcess/efl/WebViewClient.h: Add new WebViewClient APIClient for WKViewClient.
(WebCore):
(WebKit):

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

7 years ago[GTK][AC] Implement basic transform animations with clutter ac backend
commit-queue@webkit.org [Wed, 13 Feb 2013 16:12:44 +0000 (16:12 +0000)]
[GTK][AC] Implement basic transform animations with clutter ac backend
https://bugs.webkit.org/show_bug.cgi?id=109363

Patch by ChangSeok Oh <shivamidow@gmail.com> on 2013-02-13
Reviewed by Gustavo Noronha Silva.

Implement basic transform animation with clutter ac backend.
GraphicsLayerClutter is almost same with GraphicsLayerCA. And PlatformClutterAnimation
interfaces are also similar with PlatformCAAnimation, but they are implemented
with native clutter APIs. Clutter backend AC supports a basic single transform animation
with this patch now, but additive animation combination and keyframe animation
are not supported yet.

Covered by existing animation tests.

* platform/graphics/clutter/GraphicsLayerActor.cpp:
(graphicsLayerActorSetTransform):
* platform/graphics/clutter/GraphicsLayerClutter.cpp:
(WebCore::isTransformTypeTransformationMatrix):
(WebCore):
(WebCore::isTransformTypeFloatPoint3D):
(WebCore::isTransformTypeNumber):
(WebCore::getTransformFunctionValue):
(WebCore::getValueFunctionNameForTransformOperation):
(WebCore::GraphicsLayerClutter::setTransformAnimationEndpoints):
(WebCore::GraphicsLayerClutter::appendToUncommittedAnimations):
(WebCore::GraphicsLayerClutter::createTransformAnimationsFromKeyframes):
* platform/graphics/clutter/GraphicsLayerClutter.h:
(GraphicsLayerClutter):
* platform/graphics/clutter/PlatformClutterAnimation.cpp:
(WebCore::toClutterActorPropertyString):
(WebCore):
(WebCore::PlatformClutterAnimation::supportsValueFunction):
(WebCore::PlatformClutterAnimation::duration):
(WebCore::PlatformClutterAnimation::setDuration):
(WebCore::PlatformClutterAnimation::setAdditive):
(WebCore::PlatformClutterAnimation::valueFunction):
(WebCore::PlatformClutterAnimation::setValueFunction):
(WebCore::PlatformClutterAnimation::setFromValue):
(WebCore::PlatformClutterAnimation::setToValue):
(WebCore::PlatformClutterAnimation::timeline):
(WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
(WebCore::PlatformClutterAnimation::addOpacityTransition):
(WebCore::PlatformClutterAnimation::addTransformTransition):
(WebCore::PlatformClutterAnimation::addAnimationForKey):
* platform/graphics/clutter/PlatformClutterAnimation.h:
(PlatformClutterAnimation):

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

7 years ago[WK2][EFL][WTR] Regression(r141836): WTR crashes on exit
mikhail.pozdnyakov@intel.com [Wed, 13 Feb 2013 15:57:14 +0000 (15:57 +0000)]
[WK2][EFL][WTR] Regression(r141836): WTR crashes on exit
https://bugs.webkit.org/show_bug.cgi?id=109456

Reviewed by Anders Carlsson.

Source/WebKit2:

WebView destructor now considers the situation if its WebPageProxy
instance had been closed from outside the class (explicitly
by client code).

* UIProcess/efl/WebView.cpp:
(WebKit::WebView::~WebView):

Tools:

WebView instance must not live longer than EwkView, as EwkView owns
objects that page proxy refers to, doing otherwise leads to a crash.

Test controller has own ptr containing WebView. Invoking of ewk_shutdown()
leads to evas objects deletion. So, the problem was that test controller was
deleted after ewk_shutdown() had been called in main() function causing
crashes on WTR exit.

The patch introduces a scope for test controller so that it is deleted first.

* WebKitTestRunner/efl/main.cpp:
(main):

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

7 years agoWeb Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the...
loislo@chromium.org [Wed, 13 Feb 2013 15:30:22 +0000 (15:30 +0000)]
Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
https://bugs.webkit.org/show_bug.cgi?id=109554

In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.

Drive by fix: I introduced a client interface for the HeapGraphSerializer.
It helps me to do the tests for the serializer.

Reviewed by Yury Semikhatsky.

It is covered by newly added tests in TestWebKitAPI.

Source/WebCore:

* inspector/HeapGraphSerializer.cpp:
(WebCore::HeapGraphSerializer::HeapGraphSerializer):
(WebCore::HeapGraphSerializer::pushUpdate):
(WebCore::HeapGraphSerializer::reportNode):
(WebCore::HeapGraphSerializer::toNodeId):
(WebCore::HeapGraphSerializer::addRootNode):
* inspector/HeapGraphSerializer.h:
(HeapGraphSerializer):
(Client):
(WebCore::HeapGraphSerializer::Client::~Client):
* inspector/InspectorMemoryAgent.cpp:
(WebCore):
(WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):

Tools:

* TestWebKitAPI/TestWebKitAPI.gypi:
* TestWebKitAPI/Tests/WebCore/HeapGraphSerializerTest.cpp: Added.
(TestWebKitAPI):
(HeapGraphReceiver):
(TestWebKitAPI::HeapGraphReceiver::HeapGraphReceiver):
(TestWebKitAPI::HeapGraphReceiver::printGraph):
(TestWebKitAPI::HeapGraphReceiver::dumpNodes):
(TestWebKitAPI::HeapGraphReceiver::dumpEdges):
(TestWebKitAPI::HeapGraphReceiver::dumpBaseToRealNodeId):
(TestWebKitAPI::HeapGraphReceiver::dumpStrings):
(TestWebKitAPI::HeapGraphReceiver::serializer):
(TestWebKitAPI::HeapGraphReceiver::chunkPart):
(TestWebKitAPI::HeapGraphReceiver::dumpPart):
(TestWebKitAPI::HeapGraphReceiver::stringValue):
(TestWebKitAPI::HeapGraphReceiver::intValue):
(TestWebKitAPI::HeapGraphReceiver::nodeToString):
(TestWebKitAPI::HeapGraphReceiver::edgeToString):
(TestWebKitAPI::HeapGraphReceiver::printNode):
(Helper):
(TestWebKitAPI::Helper::Helper):
(TestWebKitAPI::Helper::addNode):
(TestWebKitAPI::Helper::addEdge):
(TestWebKitAPI::Helper::done):
(Object):
(TestWebKitAPI::Helper::Object::Object):
(TestWebKitAPI::TEST):
(Owner):
(TestWebKitAPI::Owner::Owner):
(TestWebKitAPI::Owner::reportMemoryUsage):

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

7 years agoWeb Inspector: add experimental native heap graph to Timeline panel
yurys@chromium.org [Wed, 13 Feb 2013 15:27:48 +0000 (15:27 +0000)]
Web Inspector: add experimental native heap graph to Timeline panel
https://bugs.webkit.org/show_bug.cgi?id=109687

Reviewed by Alexander Pavlov.

Added experimentatl support for native heap graph on the Timeline panel.
Native memory usage data is collected after each top level task and can
be displayed instead of DOM counters graph on the Timeline panel if
corresponding experiment is enabled in the inspector settings.

* inspector/Inspector.json:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorTimelineAgent.cpp:
(TimelineAgentState):
(WebCore::InspectorTimelineAgent::setIncludeDomCounters):
(WebCore):
(WebCore::InspectorTimelineAgent::setIncludeNativeMemoryStatistics):
(WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
(WebCore::InspectorTimelineAgent::setDOMCounters):
(WebCore::InspectorTimelineAgent::setNativeHeapStatistics):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
* inspector/InspectorTimelineAgent.h:
(WebCore):
(WebCore::InspectorTimelineAgent::create):
(InspectorTimelineAgent):
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
* inspector/front-end/MemoryStatistics.js:
(WebInspector.MemoryStatistics):
* inspector/front-end/NativeMemoryGraph.js:
(WebInspector.NativeMemoryGraph):
(WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
(WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
* inspector/front-end/Settings.js:
(WebInspector.ExperimentsSettings):
* inspector/front-end/TimelinePanel.js:

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

7 years agoWeb Inspector: Fixed colorpicker editing and scrolling.
commit-queue@webkit.org [Wed, 13 Feb 2013 15:25:00 +0000 (15:25 +0000)]
Web Inspector: Fixed colorpicker editing and scrolling.
https://bugs.webkit.org/show_bug.cgi?id=109434.

Patch by Vladislav Kaznacheev <kaznacheev@chromium.org> on 2013-02-13
Reviewed by Alexander Pavlov.

The color picker scrolling logic relied on the fixed DOM structure which changed with the introduction of
SidebarPaneStack (https://bugs.webkit.org/show_bug.cgi?id=108183).
Added a special CSS class to mark the scroll target.

No new tests.

* inspector/front-end/SplitView.js:
(WebInspector.SplitView):
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylePropertyTreeElement.prototype.updateTitle.):
* inspector/front-end/TabbedPane.js:
(WebInspector.TabbedPane):

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

7 years agoUnreviewed chromium expectation changes resulting from r142719.
atwilson@chromium.org [Wed, 13 Feb 2013 14:27:57 +0000 (14:27 +0000)]
Unreviewed chromium expectation changes resulting from r142719.

* platform/chromium-linux/platform/chromium/compositing/huge-layer-rotated-expected.png:
* platform/chromium-mac/platform/chromium/compositing/huge-layer-rotated-expected.png:
* platform/chromium-win/platform/chromium/compositing/huge-layer-rotated-expected.png:

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

7 years agoWeb Inspector: fix js compilation warnings in TextPrompt
commit-queue@webkit.org [Wed, 13 Feb 2013 14:19:16 +0000 (14:19 +0000)]
Web Inspector: fix js compilation warnings in TextPrompt
https://bugs.webkit.org/show_bug.cgi?id=109685

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-02-13
Reviewed by Alexander Pavlov.

Mark last argument of _applySuggestion function as optional.

No new tests: no change in behaviour.

* inspector/front-end/TextPrompt.js:

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

7 years ago[EFL] Unreviewed gardening.
thiago.santos@intel.com [Wed, 13 Feb 2013 14:09:09 +0000 (14:09 +0000)]
[EFL] Unreviewed gardening.

* platform/efl/TestExpectations:

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

7 years agoUnreviewed chromium expectation changes.
atwilson@chromium.org [Wed, 13 Feb 2013 14:04:53 +0000 (14:04 +0000)]
Unreviewed chromium expectation changes.
Fallout from r142683.

* platform/chromium-win/http/tests/security/contentTypeOptions/nosniff-script-without-content-type-blocked-expected.txt: Added.

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

7 years agoImplement css-conditional's CSS.supports()
commit-queue@webkit.org [Wed, 13 Feb 2013 13:45:05 +0000 (13:45 +0000)]
Implement css-conditional's CSS.supports()
https://bugs.webkit.org/show_bug.cgi?id=100324

Patch by Pablo Flouret <pablof@motorola.com> on 2013-02-13
Reviewed by Antti Koivisto.

Source/WebCore:

http://dev.w3.org/csswg/css3-conditional/#the-css-interface

The supports() method provides the css @supports rule's corresponding
dom api.
The patch also adds the CSS interface on DOMWindow, which holds "useful
CSS-related functions that do not belong elsewhere". This is where
supports() lives.

Test: css3/supports-dom-api.html

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/gobject/GNUmakefile.am:
* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction):
    Add DOMWindowCSS.* to the build systems.

* bindings/scripts/CodeGenerator.pm:
(WK_lcfirst):
    Handle CSS prefixes correctly (s/cSS/css/).

* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::CSSParser):
(WebCore::CSSParser::parseSupportsCondition):
(WebCore::CSSParser::detectAtToken):
* css/CSSParser.h:
    webkit_supports_condition parses just the condition part of an
    @supports rule and evaluates it, outputting whether the condition
    is supported or not.

* css/CSSAllInOne.cpp:
* css/DOMWindowCSS.cpp: Added.
* css/DOMWindowCSS.h: Added.
* css/DOMWindowCSS.idl: Added.
    The CSS interface object.

* page/DOMWindow.cpp:
(WebCore::DOMWindow::css):
* page/DOMWindow.h:
* page/DOMWindow.idl:
    window.CSS

LayoutTests:

* css3/supports-dom-api-expected.txt: Added.
* css3/supports-dom-api.html: Added.
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
* platform/wk2/TestExpectations:

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

7 years agoWeb Inspector: Simplify SplitView to rely more on CSS
commit-queue@webkit.org [Wed, 13 Feb 2013 13:15:25 +0000 (13:15 +0000)]
Web Inspector: Simplify SplitView to rely more on CSS
https://bugs.webkit.org/show_bug.cgi?id=109426

Patch by Vladislav Kaznacheev <kaznacheev@chromium.org> on 2013-02-13
Reviewed by Vsevolod Vlasov.

Simplified Javascript code by moving large part of the layout logic into CSS rules. The patch is larger than it
should be because one of the clients (TimelinePanel) is breaking SplitView incapsulation by reparenting its
resizer.

No new tests.

* inspector/front-end/SidebarView.js:
(WebInspector.SidebarView):
* inspector/front-end/SplitView.js:
(WebInspector.SplitView):
(WebInspector.SplitView.prototype._innerSetVertical):
(WebInspector.SplitView.prototype.setSecondIsSidebar):
(WebInspector.SplitView.prototype._showOnly):
(WebInspector.SplitView.prototype._removeAllLayoutProperties):
* inspector/front-end/TimelinePanel.js:
* inspector/front-end/cssNamedFlows.css:
(.css-named-flow-collections-view .split-view-sidebar):
(.css-named-flow-collections-view .split-view-sidebar .sidebar-content):
(.css-named-flow-collections-view .split-view-sidebar .selection):
(.css-named-flow-collections-view .split-view-sidebar .named-flow-overflow::before, .css-named-flow-collections-view .region-empty:before, .css-named-flow-collections-view .region-fit::before, .css-named-flow-collections-view .region-overset::before):
(.css-named-flow-collections-view .split-view-sidebar .named-flow-overflow::before):
* inspector/front-end/splitView.css:
(.split-view-contents.maximized):
(.split-view-vertical .split-view-contents):
(.split-view-vertical .split-view-contents-first):
(.split-view-vertical .split-view-contents-first.maximized):
(.split-view-vertical .split-view-contents-second):
(.split-view-vertical .split-view-contents-second.maximized):
(.split-view-horizontal .split-view-contents):
(.split-view-horizontal .split-view-contents-first):
(.split-view-horizontal .split-view-contents-first.maximized):
(.split-view-horizontal .split-view-contents-second):
(.split-view-horizontal .split-view-contents-second.maximized):
(.split-view-vertical .split-view-sidebar.split-view-contents-first:not(.maximized)):
(.split-view-vertical .split-view-sidebar.split-view-contents-second:not(.maximized)):
(.split-view-horizontal .split-view-sidebar.split-view-contents-first:not(.maximized)):
(.split-view-horizontal .split-view-sidebar.split-view-contents-second:not(.maximized)):
(.split-view-vertical .split-view-resizer):
(.split-view-horizontal .split-view-resizer):
* inspector/front-end/timelinePanel.css:
(.timeline.split-view-vertical .split-view-resizer):
(#timeline-container .split-view-sidebar):

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

7 years agoUnreviewed, rolling out r142730.
haraken@chromium.org [Wed, 13 Feb 2013 12:57:21 +0000 (12:57 +0000)]
Unreviewed, rolling out r142730.
http://trac.webkit.org/changeset/142730
https://bugs.webkit.org/show_bug.cgi?id=109666

chromium browser tests are failing

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNormalAttrGetter):
(GenerateNormalAttrSetter):
(GenerateSingleBatchedAttribute):
(GenerateImplementation):
* bindings/scripts/test/V8/V8TestInterface.cpp:
(TestInterfaceV8Internal):
(WebCore):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore):

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

7 years ago[WK2] Remove web intents callbacks
gyuyoung.kim@samsung.com [Wed, 13 Feb 2013 11:59:49 +0000 (11:59 +0000)]
[WK2] Remove web intents callbacks
https://bugs.webkit.org/show_bug.cgi?id=109654

Reviewed by Benjamin Poulain.

Web intents was removed by r142549.

Source/WebKit2:

* Shared/APIClientTraits.cpp:
(WebKit):
* Shared/APIClientTraits.h:
* UIProcess/API/C/WKPage.h:
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(attachLoaderClientToView):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/qt/QtBuiltinBundlePage.cpp:
(WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):

Tools:

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController awakeFromNib]):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions):

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

7 years agoOpenCL implementation of Flood SVG filters.
commit-queue@webkit.org [Wed, 13 Feb 2013 11:39:32 +0000 (11:39 +0000)]
OpenCL implementation of Flood SVG filters.
https://bugs.webkit.org/show_bug.cgi?id=109580

Patch by Tamas Czene <tczene@inf.u-szeged.hu> on 2013-02-13
Reviewed by Zoltan Herczeg.

* Target.pri:
* platform/graphics/filters/FEFlood.h:
(FEFlood):
* platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:
(WebCore):
(WebCore::PROGRAM_STR):
(WebCore::FilterContextOpenCL::compileFill):
(WebCore::FilterContextOpenCL::fill):
* platform/graphics/gpu/opencl/FilterContextOpenCL.h:
(WebCore::FilterContextOpenCL::FilterContextOpenCL):
(FilterContextOpenCL):
* platform/graphics/gpu/opencl/OpenCLFEFlood.cpp: Added.
(WebCore):
(WebCore::FEFlood::platformApplyOpenCL):

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

7 years agolocation.href does not throw SECURITY_ERR when accessed across origins with JSC bindings
mkwst@chromium.org [Wed, 13 Feb 2013 11:19:08 +0000 (11:19 +0000)]
location.href does not throw SECURITY_ERR when accessed across origins with JSC bindings
https://bugs.webkit.org/show_bug.cgi?id=43891

Reviewed by Adam Barth.

Source/WebCore:

Other browsers (IE, Firefox, and Opera) throw an exception when accessing
properties of a Location object across origins, as the spec suggests[1].
WebKit is currently the outlier.

This has a few negative effects: developers are forced to hack around
access violations in two ways rather than having a single code path, and
(more annoyingly) developers are unable to avoid generating the error
message. See every ad on the internet for the effect on the console. :)

This patch adds a SECURITY_ERR exception to these access violations,
which is the first step towards getting rid of the console spam. Getting
rid of the message entirely will require a solution to
http://wkbug.com/98050.

A fairly inconclusive thread[2] on webkit-dev popped up in 2010 and
trailed off without reaching conclusion. A more recent thread reached
agreement that this patch seems like a reasonable thing to do[3].

This is the JSC half of the patch. V8 is coming in http://wkbug.com/43892

[1]: http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#security-location
[2]: https://lists.webkit.org/pipermail/webkit-dev/2010-August/013880.html
[2]: https://lists.webkit.org/pipermail/webkit-dev/2012-February/023636.html

* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::getOwnPropertySlotDelegate):

LayoutTests:

* http/tests/plugins/resources/cross-frame-object-access.html:
* http/tests/security/cross-frame-access-callback-explicit-domain-DENY-expected.txt:
* http/tests/security/cross-frame-access-location-get-expected.txt:
* http/tests/security/cross-frame-access-location-get.html:
* http/tests/security/resources/cross-frame-access.js:
(accessThrowsException):
* http/tests/security/resources/cross-frame-iframe-callback-explicit-domain-DENY.html:
* http/tests/security/resources/cross-frame-iframe-for-location-get-test.html:
    Adjusting tests to check for exceptions, and adjusting expectations to match.
* platform/chromium/http/tests/security/cross-frame-access-callback-explicit-domain-DENY-expected.txt: Copied from LayoutTests/http/tests/security/cross-frame-access-callback-explicit-domain-DENY-expected.txt.
* platform/chromium/http/tests/security/cross-frame-access-location-get-expected.txt: Added.
* platform/chromium/http/tests/security/sandboxed-iframe-blocks-access-from-parent-expected.txt: Copied from LayoutTests/http/tests/security/sandboxed-iframe-blocks-access-from-parent-expected.txt.
    V8 fails at the moment: http://wkbug.com/43892

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

7 years agoUnreviewed test fix: removed redundant testRunnet.notifyDone() call that was causing...
vsevik@chromium.org [Wed, 13 Feb 2013 10:59:18 +0000 (10:59 +0000)]
Unreviewed test fix: removed redundant testRunnet.notifyDone() call that was causing other test failures.

* inspector/script-execution-state-change-notification.html:

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

7 years agoUnreviewed GTK gardening.
zandobersek@gmail.com [Wed, 13 Feb 2013 10:45:12 +0000 (10:45 +0000)]
Unreviewed GTK gardening.
Rebaselining tests after the DOM4 Events constructors and CSS image-set
support were enabled.

* platform/gtk/fast/dom/constructed-objects-prototypes-expected.txt:
* platform/gtk/fast/events/constructors: Added.
* platform/gtk/fast/events/constructors/mouse-event-constructor-expected.txt: Added.
* platform/gtk/fast/events/constructors/wheel-event-constructor-expected.txt: Added.
* platform/gtk/fast/hidpi/image-set-border-image-comparison-expected.txt:
* platform/gtk/fast/hidpi/image-set-border-image-dynamic-expected.txt:
* platform/gtk/fast/hidpi/image-set-border-image-simple-expected.txt:
* platform/gtk/fast/hidpi/image-set-in-content-dynamic-expected.txt:
* platform/gtk/fast/hidpi/image-set-out-of-order-expected.txt:
* platform/gtk/fast/hidpi/image-set-simple-expected.txt:
* platform/gtk/fast/hidpi/image-set-without-specified-width-expected.txt:

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

7 years agoUnreviewed Chromium gyp-file cleanup after glib backend removal.
atwilson@chromium.org [Wed, 13 Feb 2013 10:39:22 +0000 (10:39 +0000)]
Unreviewed Chromium gyp-file cleanup after glib backend removal.
https://bugs.webkit.org/show_bug.cgi?id=109672

Removed references to GLib unicode backend:

Source/WebCore:

* WebCore.gypi:

Source/WebKit/gtk:

* gyp/Configuration.gypi.in:
* gyp/Dependencies.gyp:
* gyp/JavaScriptCore.gyp:
* gyp/WTF.gyp:

Source/WTF:

* WTF.gyp/WTF.gyp:
* WTF.gypi:

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

7 years ago[V8] Generate wrapper methods for custom getters/setters
haraken@chromium.org [Wed, 13 Feb 2013 09:43:48 +0000 (09:43 +0000)]
[V8] Generate wrapper methods for custom getters/setters
https://bugs.webkit.org/show_bug.cgi?id=109666

Reviewed by Adam Barth.

Currently V8 directly calls back custom getters/setters written
in custom binding files. This makes it impossible for code generators
to hook custom getters/setters (e.g. Code generators cannot insert a code
for FeatureObservation into custom getters/setters). We should generate
wrapper methods for custom getters/setters.

In the future, I will insert TRACE_EVENT() macros into these wrapper methods
to profile DOM getters/setters/methods.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNormalAttrGetter):
(GenerateNormalAttrSetter):
(GenerateSingleBatchedAttribute):
(GenerateImplementation):
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
(TestInterfaceV8Internal):
(WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
(WebCore):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::customAttrAttrGetter):
(TestObjV8Internal):
(WebCore::TestObjV8Internal::customAttrAttrSetter):
(WebCore):

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

7 years ago[Qt] Unreviewed gardening. Skip failing tests.
kadam@inf.u-szeged.hu [Wed, 13 Feb 2013 09:27:14 +0000 (09:27 +0000)]
[Qt] Unreviewed gardening. Skip failing tests.

* platform/qt/TestExpectations:

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

7 years agoUnreviewed, rolling out r142611.
commit-queue@webkit.org [Wed, 13 Feb 2013 08:24:56 +0000 (08:24 +0000)]
Unreviewed, rolling out r142611.
http://trac.webkit.org/changeset/142611
https://bugs.webkit.org/show_bug.cgi?id=109668

Suggest box is not shown anymore when user types "window." in
inspector console. (Requested by vsevik on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-02-13

* inspector/front-end/TextPrompt.js:
(WebInspector.TextPrompt.prototype.complete):

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

7 years ago[V8] There is no XXXConstructor that requires a custom getter
haraken@chromium.org [Wed, 13 Feb 2013 08:10:02 +0000 (08:10 +0000)]
[V8] There is no XXXConstructor that requires a custom getter
https://bugs.webkit.org/show_bug.cgi?id=109667

Reviewed by Adam Barth.

Currently '[Custom] attribute XXXConstructor xxx' generates
XXXAttrGetter(). However, there is no XXXConstructor with [Custom].
In addition, it does make no sense to generate XXXAttrGetter() for such cases.
We can remove the logic from CodeGeneratorV8.pm.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateSingleBatchedAttribute):

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

7 years ago[Internals] setShadowDOMEnabled() shouldn't be used except a few tests.
morrita@google.com [Wed, 13 Feb 2013 07:34:47 +0000 (07:34 +0000)]
[Internals] setShadowDOMEnabled() shouldn't be used except a few tests.
https://bugs.webkit.org/show_bug.cgi?id=109642

Reviewed by Kent Tamura.

Source/WebCore:

InternalSettings.setShadowDOMEnabled() shouldn't be called after
any relevant DOM bindings are touched. However for fuzzers, it
isn't trivial to regulate its behavior.

This change whitelists the URL of running test for prevent
unintended API calls. This doesn't hurt the Internals usability
since the API is called from just a couple of tests and the number
isn't expected to grow.

Test: fast/dom/shadow/shadow-dom-enabled-flag-whitelist.html

* testing/InternalSettings.cpp:
(WebCore::urlIsWhitelisted):
(WebCore):
(WebCore::InternalSettings::setShadowDOMEnabled):

LayoutTests:

* fast/dom/shadow/shadow-dom-enabled-flag-whitelist-expected.txt: Added.
* fast/dom/shadow/shadow-dom-enabled-flag-whitelist.html: Added.

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

7 years agoWeb Inspector: Introduce version controller to migrate settings versions.
vsevik@chromium.org [Wed, 13 Feb 2013 07:24:02 +0000 (07:24 +0000)]
Web Inspector: Introduce version controller to migrate settings versions.
https://bugs.webkit.org/show_bug.cgi?id=109553

Reviewed by Yury Semikhatsky.

Source/WebCore:

This patch introduces version controller that could be used to migrate inspector settings.

Test: inspector/version-controller.html

* inspector/front-end/Settings.js:
(WebInspector.Settings):
(WebInspector.VersionController):
(WebInspector.VersionController.prototype.set _methodsToRunToUpdateVersion):
(WebInspector.VersionController.prototype._updateVersionFrom0To1):
* inspector/front-end/inspector.js:

LayoutTests:

* inspector/version-controller-expected.txt: Added.
* inspector/version-controller.html: Added.

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

7 years ago[GTK] Remove the GLib unicode backend
commit-queue@webkit.org [Wed, 13 Feb 2013 06:30:42 +0000 (06:30 +0000)]
[GTK] Remove the GLib unicode backend
https://bugs.webkit.org/show_bug.cgi?id=109627

Patch by Martin Robinson <mrobinson@igalia.com> on 2013-02-12
Reviewed by Benjamin Poulain.

.:

Remove references to the GLib unicode backend from configuration.

* Source/autotools/FindDependencies.m4:
* Source/autotools/ReadCommandLineArguments.m4:
* Source/autotools/SetupAutoconfHeader.m4:
* Source/autotools/SetupAutomake.m4:

Source/WebCore:

Remove references to the GLib unicode backend from WebCore.

* GNUmakefile.list.am: Update the source list.
* platform/text/gtk/TextBreakIteratorGtk.cpp: Removed.
* platform/text/gtk/TextCodecGtk.cpp: Removed.
* platform/text/gtk/TextCodecGtk.h: Removed.

Source/WTF:

Remove references to the GLib unicode backend from WTF.

* GNUmakefile.list.am: Remove GLib unicode files from the source list.
* wtf/unicode/glib/UnicodeGLib.cpp: Removed.
* wtf/unicode/glib/UnicodeGLib.h: Removed.

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

7 years agoEradicate fast/js/dfg-poison-fuzz.html
fpizlo@apple.com [Wed, 13 Feb 2013 06:21:06 +0000 (06:21 +0000)]
Eradicate fast/js/dfg-poison-fuzz.html
https://bugs.webkit.org/show_bug.cgi?id=109660

Unreviewed.

I haven't seen this test fail in ages.  And I've seen a lot of DFG bugs!

This is a super expensive test for one bug that used to be in the DFG but that has
since been thoroughly eradicated. Likely the plethora of other DFG tests cover that
bug. Heck, I'm not even sure if the code that this covers is even in the repository
anymore.

In the spirit of not having super expensive and mostly useless tests, I'm removing
this test.

* fast/js/dfg-poison-fuzz-expected.txt: Removed.
* fast/js/dfg-poison-fuzz.html: Removed.
* fast/js/jsc-test-list:
* fast/js/script-tests/dfg-poison-fuzz.js: Removed.
* platform/chromium/TestExpectations:
* platform/gtk/TestExpectations:
* platform/qt-4.8/TestExpectations:
* platform/qt-mac/TestExpectations:
* platform/qt/TestExpectations:

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

7 years agoVersioning.
lforschler@apple.com [Wed, 13 Feb 2013 06:16:56 +0000 (06:16 +0000)]
Versioning.

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

7 years ago AX: crash when accessing AccessibilityScrollbar after page has been unloaded
cfleizach@apple.com [Wed, 13 Feb 2013 06:15:39 +0000 (06:15 +0000)]
 AX: crash when accessing AccessibilityScrollbar after page has been unloaded
 https://bugs.webkit.org/show_bug.cgi?id=109524

 Reviewed by Ryosuke Niwa.

 AX clients can hold onto AccesibilityScrollbar references that reference parent
 AccessibilityScrollViews that have already gone away.

 AccessibilityScrollView is not calling detachFromParent after it is removed, which
 leads to a crash. The fix is to clearChildren() when an object is deallocated.

 I could not create a test because the crash only manifests over multiple page loads.

 * accessibility/AccessibilityObject.cpp:
 (WebCore::AccessibilityObject::detach):

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

7 years agoUse FocusEvent.relatedTarget in {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator.
hayato@chromium.org [Wed, 13 Feb 2013 06:09:16 +0000 (06:09 +0000)]
Use FocusEvent.relatedTarget in {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator.
https://bugs.webkit.org/show_bug.cgi?id=109650

Reviewed by Dimitri Glazkov.

Set FocusEvent.relatedTarget in its constructor so that each
EventDispatchMediator can use FocusEvent.relatedTarget rather than
its redundant m_{old,new}FocusedNode member variable.

I've also removed FIXME comments, mentioning bug 109261, since I
can not reproduce the issue.

No new tests. No change in functionality.

* dom/FocusEvent.cpp:
(WebCore::FocusEventDispatchMediator::create):
(WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
(WebCore::FocusEventDispatchMediator::dispatchEvent):
(WebCore::BlurEventDispatchMediator::create):
(WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
(WebCore::BlurEventDispatchMediator::dispatchEvent):
(WebCore::FocusInEventDispatchMediator::create):
(WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator):
(WebCore::FocusInEventDispatchMediator::dispatchEvent):
(WebCore::FocusOutEventDispatchMediator::create):
(WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator):
(WebCore::FocusOutEventDispatchMediator::dispatchEvent):
* dom/FocusEvent.h:
(FocusEventDispatchMediator):
(BlurEventDispatchMediator):
(FocusInEventDispatchMediator):
(FocusOutEventDispatchMediator):
* dom/Node.cpp:
(WebCore::Node::dispatchFocusInEvent):
(WebCore::Node::dispatchFocusOutEvent):
(WebCore::Node::dispatchFocusEvent):
(WebCore::Node::dispatchBlurEvent):

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

7 years agoRemove unnecessary and confusing includes from StreamBuffer.h.
commit-queue@webkit.org [Wed, 13 Feb 2013 05:17:18 +0000 (05:17 +0000)]
Remove unnecessary and confusing includes from StreamBuffer.h.
https://bugs.webkit.org/show_bug.cgi?id=109652

Patch by Takeshi Yoshino <tyoshino@google.com> on 2013-02-12
Reviewed by Benjamin Poulain.

StreamBuffer.h is using OwnPtr for storing Vectors into a Deque.
FixedArray.h and PassOwnPtr.h are included but not used.

VectorTraits defines how to move OwnPtr in Vector. It's done by memcpy.
So, there's no need for PassOwnPtr (Deque<PassOwnPtr<Vector<char> > >
is even slower).

* wtf/StreamBuffer.h:

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

7 years ago[Refactoring] Make SelectorChecker::mode a constructor parameter.
tasak@google.com [Wed, 13 Feb 2013 05:10:12 +0000 (05:10 +0000)]
[Refactoring] Make SelectorChecker::mode a constructor parameter.
https://bugs.webkit.org/show_bug.cgi?id=109653

Reviewed by Dimitri Glazkov.

No new tests, because just refactoring.

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::SelectorChecker):
Made mode a constructor parameter.
* css/SelectorChecker.h:
Removed setMode.
(SelectorChecker):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::ruleMatches):
(WebCore::StyleResolver::checkRegionSelector):
* dom/SelectorQuery.cpp:
(WebCore::SelectorQuery::matches):
(WebCore::SelectorQuery::queryAll):
(WebCore::SelectorQuery::queryFirst):
* html/shadow/ContentSelectorQuery.cpp:
(WebCore::ContentSelectorChecker::ContentSelectorChecker):

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

7 years ago[Chromium] Rebaseline suggestion-picker layout tests
commit-queue@webkit.org [Wed, 13 Feb 2013 04:38:10 +0000 (04:38 +0000)]
[Chromium] Rebaseline suggestion-picker layout tests
https://bugs.webkit.org/show_bug.cgi?id=109647

Unreviewed rebaseline.
Text position differences, imperceptible to human sight.
Test failures possibly caused by: http://trac.webkit.org/changeset/142659

Patch by Alan Cutter <alancutter@chromium.org> on 2013-02-12

* platform/chromium-linux/platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-linux/platform/chromium/fast/forms/suggestion-picker/month-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-linux/platform/chromium/fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-win/platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-win/platform/chromium/fast/forms/suggestion-picker/month-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-win/platform/chromium/fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar-expected.png:

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

7 years agoRemove Element::ensureAttributeData().
akling@apple.com [Wed, 13 Feb 2013 04:27:41 +0000 (04:27 +0000)]
Remove Element::ensureAttributeData().
<http://webkit.org/b/109643>

Reviewed by Anders Carlsson.

* dom/Element.h:
* dom/Element.cpp:
(WebCore::Element::classAttributeChanged):
(WebCore::Element::shouldInvalidateDistributionWhenAttributeChanged):

    Use attributeData() instead of ensureAttributeData(), it's already guaranteed to exist in
    both these functions as they are called in response to attribute changes.

* svg/SVGElement.h:
(WebCore::SVGElement::invalidateSVGAttributes):

    Use mutableAttributeData() instead of ensureAttributeData() when invalidating animated
    SVG attributes. While I can't find any bugs caused by this, an element with property animations
    shouldn't share attribute data with other elements.

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

7 years agoMake {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator type safe.
hayato@chromium.org [Wed, 13 Feb 2013 04:25:57 +0000 (04:25 +0000)]
Make {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator type safe.
https://bugs.webkit.org/show_bug.cgi?id=109561

Reviewed by Dimitri Glazkov.

Use FocusEvent rather than Event in {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator.

No new tests. No change in functionality.

* dom/FocusEvent.cpp:
(WebCore::FocusEventDispatchMediator::create):
(WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
(WebCore::BlurEventDispatchMediator::create):
(WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
(WebCore::FocusInEventDispatchMediator::create):
(WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator):
(WebCore::FocusOutEventDispatchMediator::create):
(WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator):
* dom/FocusEvent.h:
(FocusEventDispatchMediator):
(WebCore::FocusEventDispatchMediator::event):
(BlurEventDispatchMediator):
(WebCore::BlurEventDispatchMediator::event):
(FocusInEventDispatchMediator):
(WebCore::FocusInEventDispatchMediator::event):
(FocusOutEventDispatchMediator):
(WebCore::FocusOutEventDispatchMediator::event):

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

7 years agoFix HTMLToken::Attribute member naming and update callsites to use Vector-based Strin...
eric@webkit.org [Wed, 13 Feb 2013 04:24:31 +0000 (04:24 +0000)]
Fix HTMLToken::Attribute member naming and update callsites to use Vector-based String functions
https://bugs.webkit.org/show_bug.cgi?id=109638

Reviewed by Adam Barth.

Darin Adler noted in:
https://bugs.webkit.org/show_bug.cgi?id=109408#c4
that HTMLToken::Attribute (then MarkupTokenBase::Attribute)
was a struct, yet incorrectly used m_ for its public members.

This patch fixes the members to not have the m_, and since I was
touching all callers, I also updated all callers to use modern
Vector-based String creation/append functions instead of manually
calling UChar*, size_t versions.

There should be no behavior change to this patch.  Where I saw
performance/memory bugs, I noted them with FIXMEs to keep
this change simple.

* html/HTMLViewSourceDocument.cpp:
(WebCore::HTMLViewSourceDocument::processTagToken):
* html/parser/AtomicHTMLToken.h:
(WebCore::AtomicHTMLToken::publicIdentifier):
(WebCore::AtomicHTMLToken::systemIdentifier):
(WebCore::AtomicHTMLToken::AtomicHTMLToken):
(WebCore::AtomicHTMLToken::initializeAttributes):
* html/parser/CompactHTMLToken.cpp:
(WebCore::CompactHTMLToken::CompactHTMLToken):
* html/parser/HTMLMetaCharsetParser.cpp:
(WebCore::HTMLMetaCharsetParser::processMeta):
(WebCore::HTMLMetaCharsetParser::checkForMetaCharset):
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::StartTagScanner::processAttributes):
(WebCore::HTMLPreloadScanner::scan):
(WebCore::HTMLPreloadScanner::processPossibleBaseTag):
(WebCore::HTMLPreloadScanner::processToken):
* html/parser/HTMLToken.h:
(Range):
(Attribute):
(WebCore::HTMLToken::clear):
(WebCore::HTMLToken::startIndex):
(WebCore::HTMLToken::endIndex):
(WebCore::HTMLToken::end):
(WebCore::HTMLToken::nameString):
(WebCore::HTMLToken::addNewAttribute):
(WebCore::HTMLToken::beginAttributeName):
(WebCore::HTMLToken::endAttributeName):
(WebCore::HTMLToken::beginAttributeValue):
(WebCore::HTMLToken::endAttributeValue):
(WebCore::HTMLToken::appendToAttributeName):
(WebCore::HTMLToken::appendToAttributeValue):
(WebCore::HTMLToken::eraseValueOfAttribute):
* html/parser/HTMLTokenizer.cpp:
(WebCore::AtomicHTMLToken::nameForAttribute):
* html/parser/HTMLViewSourceParser.cpp:
(WebCore::HTMLViewSourceParser::updateTokenizerState):
* html/parser/XSSAuditor.cpp:
(WebCore::findAttributeWithName):
(WebCore::XSSAuditor::filterParamToken):
(WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
(WebCore::XSSAuditor::eraseAttributeIfInjected):
(WebCore::XSSAuditor::decodedSnippetForAttribute):

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

7 years agoBuild fix.
rniwa@webkit.org [Wed, 13 Feb 2013 04:08:44 +0000 (04:08 +0000)]
Build fix.

* editing/Editor.h:
(WebCore::Editor::avoidIntersectionWithDeleteButtonController):

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

7 years agoUnreviewed. Build fix for Chromium-Win.
yosin@chromium.org [Wed, 13 Feb 2013 03:59:50 +0000 (03:59 +0000)]
Unreviewed. Build fix for Chromium-Win.
Add #include <functional> for std::bind1st.

* tests/PrerenderingTest.cpp:

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

7 years agoREGRESSION: Reloading a local file doesn't pick up changes
japhet@chromium.org [Wed, 13 Feb 2013 02:42:02 +0000 (02:42 +0000)]
REGRESSION: Reloading a local file doesn't pick up changes
https://bugs.webkit.org/show_bug.cgi?id=109344

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Test: http/tests/cache/reload-main-resource.php

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::determineRevalidationPolicy):
(WebCore::CachedResourceLoader::cachePolicy): Don't use subresourceCachePolicy()
    for main resources.
* loader/cache/CachedResourceLoader.h:
(CachedResourceLoader):

LayoutTests:

* http/tests/cache/reload-main-resource-expected.txt: Added.
* http/tests/cache/reload-main-resource.php: Added.
* http/tests/cache/resources/reload-main-resource-iframe.php: Added.
* http/tests/misc/favicon-loads-with-images-disabled-expected.txt: This test
    was being loaded from memory cache in spite of being loaded via reload. We
    shouldn't do that.
* http/tests/misc/link-rel-icon-beforeload-expected.txt: This test
    was being loaded from memory cache in spite of being loaded via reload. We
    shouldn't do that.

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

7 years ago[GTK] Connect the gyp build to autoconf
mrobinson@webkit.org [Wed, 13 Feb 2013 02:40:09 +0000 (02:40 +0000)]
[GTK] Connect the gyp build to autoconf
https://bugs.webkit.org/show_bug.cgi?id=109360

Reviewed by Dirk Pranke.

Move Configuration.gypi to Configuration.gypi.in and allow autoconf to
fill in variables during a configuration phase. Also add some scripts
to support connecting autoconf up to the gyp build. This allows us
to have a very autotools-esque experience.

* gyp/Configuration.gypi: Removed.
* gyp/Configuration.gypi.in: Added. Fleshed out Configuration.gypi to include
dependency CFLAGS and LIBS directly from configure. Due to the way we are
generating the gyp build now, we also need to include an absolute path to
the build directory. Fixing bugs in gyp should allow us to avoid this in the
future.
* gyp/Dependencies.gyp: Added this file which holds external dependency targets.
We could consider auto-generating this at some point.
* gyp/JavaScriptCore.gyp: Remove references to the old Configuration.gypi.
It's now included via the command-line -I flag. Update to support the new
s/default/global/g terminology for variables.
* gyp/WTF.gyp: Remove the dependency targets as this is now handled entirely
by autoconf.
* gyp/autogen.sh: Added. Set up the build directory and kick off autoconf.
* gyp/configure.ac: Added. An autoconf build that re-uses much of our
existing autoconf setup.
* gyp/run-gyp: Added. Script for invoking gyp for out-of-tree builds.

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

7 years agoTurn avoidIntersectionWithNode into Editor member functions to encapsulate delete...
rniwa@webkit.org [Wed, 13 Feb 2013 02:39:22 +0000 (02:39 +0000)]
Turn avoidIntersectionWithNode into Editor member functions to encapsulate delete button controller
https://bugs.webkit.org/show_bug.cgi?id=109549

Reviewed by Tony Chang.

Renamed avoidIntersectionWithNode to Editor::avoidIntersectionWithDeleteButtonController and added trivial
implementations when delete button controllers are disabled (ENABLE_DELETION_UI is 0).

* editing/DeleteButtonController.cpp:
* editing/EditCommand.cpp:
(WebCore::EditCommand::EditCommand):
* editing/Editor.cpp:
(WebCore::Editor::avoidIntersectionWithDeleteButtonController): Moved from htmlediting.cpp and renamed.
The version that takes VisibleSelection has been updated to use updatePositionForNodeRemoval to share
mode code with that function.
(WebCore::Editor::rangeForPoint):
* editing/Editor.h:
(WebCore::Editor::avoidIntersectionWithDeleteButtonController): Added; trivial implementations.
* editing/htmlediting.cpp:
* editing/htmlediting.h:
* editing/markup.cpp:
(WebCore::createMarkupInternal): Extracted from createMarkup.
(WebCore::createMarkup):

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

7 years ago[WK2] Page reloading will crash UIProcess after WebProcess was killed
commit-queue@webkit.org [Wed, 13 Feb 2013 02:39:07 +0000 (02:39 +0000)]
[WK2] Page reloading will crash UIProcess after WebProcess was killed
https://bugs.webkit.org/show_bug.cgi?id=109305

Patch by Adenilson Cavalcanti <cavalcantii@gmail.com> on 2013-02-12
Reviewed by Benjamin Poulain.

Source/WebKit2:

Re-initialize the pointer to a WebInspectorProxy object before calling
initializeWebPage().

When the WebProcess crashes, WebPageProxy::processDidCrash() will
set WebInspectorProxy pointer to null, which later is accessed by
initializeWebPage(). This patch avoids a crash scenario where
calls into a null pointer would be made.

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

Tools:

Adding a new test to simulate the case of WebProcess crash followed by a trying
to load a new page.

* TestWebKitAPI/GNUmakefile.am:
* TestWebKitAPI/PlatformEfl.cmake:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/ReloadPageAfterCrash.cpp: Added.
(TestWebKitAPI):
(TestWebKitAPI::didFinishLoad):
(TestWebKitAPI::TEST):

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

7 years agoMac rebaseline for r142638.
benjamin@webkit.org [Wed, 13 Feb 2013 02:22:24 +0000 (02:22 +0000)]
Mac rebaseline for r142638.

Patch by Dima Gorbik <dgorbik@apple.com> on 2013-02-12
Reviewed by Benjamin Poulain.

* platform/mac-lion/accessibility/table-attributes-expected.txt: Removed.
* platform/mac-lion/accessibility/table-cell-spans-expected.txt: Removed.
* platform/mac-lion/accessibility/table-sections-expected.txt: Removed.
* platform/mac-wk2/accessibility/table-cell-spans-expected.txt: Removed.
* platform/mac/accessibility/table-attributes-expected.txt:
* platform/mac/accessibility/table-cell-spans-expected.txt:
* platform/mac/accessibility/table-cells-expected.txt:
* platform/mac/accessibility/table-sections-expected.txt:
* platform/mac/platform/mac-wk2/tiled-drawing/sticky/sticky-vertical-expected.txt: Added.

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

7 years ago[HTMLTemplateElement] Change template.dat serialization format
rafaelw@chromium.org [Wed, 13 Feb 2013 02:20:24 +0000 (02:20 +0000)]
[HTMLTemplateElement] Change template.dat serialization format
https://bugs.webkit.org/show_bug.cgi?id=109635

Reviewed by Eric Seidel.

The serialization format now uses 'content' instead of '#document-fragment' to
denote template contents.

* html5lib/resources/template.dat:
* resources/dump-as-markup.js:
(Markup._get):

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

7 years ago[iOS] Enable PAGE_VISIBILITY_API
commit-queue@webkit.org [Wed, 13 Feb 2013 02:13:50 +0000 (02:13 +0000)]
[iOS] Enable PAGE_VISIBILITY_API
https://bugs.webkit.org/show_bug.cgi?id=109399

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-02-12
Reviewed by David Kilzer.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

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

7 years agoUpdate a comment in NetworkProcess to be more accurate.
beidson@apple.com [Wed, 13 Feb 2013 02:10:45 +0000 (02:10 +0000)]
Update a comment in NetworkProcess to be more accurate.

Rubberstamped by Sam Weinig.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::didClose):

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

7 years agoMove ElementAttributeData into Element.cpp/h
akling@apple.com [Wed, 13 Feb 2013 01:43:54 +0000 (01:43 +0000)]
Move ElementAttributeData into Element.cpp/h
<http://webkit.org/b/109610>

Reviewed by Anders Carlsson.

Removed ElementAttributeData.cpp/h and moved the class itself into Element headquarters.
In the near future, Element should be the only client of this class, and thus it won't
be necessary for other classes to know anything about it.

* dom/ElementAttributeData.cpp: Removed.
* dom/ElementAttributeData.h: Removed.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMAllInOne.cpp:
* dom/DocumentSharedObjectPool.cpp:
* dom/Element.cpp:
* dom/Element.h:
* workers/SharedWorker.cpp:
* Modules/webdatabase/DatabaseManager.cpp: Add ExceptionCode.h since Element.h doesn't pull it in anymore.

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

7 years agoUnreviewed. Build fix for VS2010 WebKit solution.
roger_fong@apple.com [Wed, 13 Feb 2013 01:37:18 +0000 (01:37 +0000)]
Unreviewed. Build fix for VS2010 WebKit solution.

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

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

7 years agoSecItemShim should be a WorkQueueMessageReceiver
andersca@apple.com [Wed, 13 Feb 2013 01:28:03 +0000 (01:28 +0000)]
SecItemShim should be a WorkQueueMessageReceiver
https://bugs.webkit.org/show_bug.cgi?id=109636

Reviewed by Sam Weinig.

* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::dispatchWorkQueueMessageReceiverMessage):
Add a helper function for dispatching a work queue message receiver message.

(CoreIPC::Connection::processIncomingMessage):
Check if there are any work queue message receivers registered for this message.

* Shared/mac/SecItemShim.cpp:
(WebKit::SecItemShim::shared):
Use dispatch_once instead of the AtomicallyInitializedStatic macro.

(WebKit::SecItemShim::SecItemShim):
Initialize the queue.

(WebKit::SecItemShim::secItemResponse):
Remove the connection parameter.

(WebKit::SecItemShim::initializeConnection):
Register the shim object as a work queue message receiver.

* Shared/mac/SecItemShim.h:
Inherit from WorkQueueMessageReceiver.

* Shared/mac/SecItemShim.messages.in:
Remove LegacyReceiver and DispatchOnConnectionQueue.

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

7 years agoRenamed SpecObjectMask to SpecObject.
fpizlo@apple.com [Wed, 13 Feb 2013 01:25:27 +0000 (01:25 +0000)]
Renamed SpecObjectMask to SpecObject.

Rubber stamped by Mark Hahnenberg.

"SpecObjectMask" is a weird name considering that a bunch of the other speculated
types are also masks, but don't have "Mask" in the name.

* bytecode/SpeculatedType.h:
(JSC):
(JSC::isObjectSpeculation):
(JSC::isObjectOrOtherSpeculation):
* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::execute):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):

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

7 years agoRemove webintents from TestExpectations files
thakis@chromium.org [Wed, 13 Feb 2013 01:13:13 +0000 (01:13 +0000)]
Remove webintents from TestExpectations files
https://bugs.webkit.org/show_bug.cgi?id=109620

Reviewed by James Robinson.

* platform/chromium/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt-5.0-mac-wk2/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

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

7 years agoMake Plug-in XPC services "join existing sessions"
weinig@apple.com [Wed, 13 Feb 2013 01:10:23 +0000 (01:10 +0000)]
Make Plug-in XPC services "join existing sessions"
<rdar://problem/13196448>

Reviewed by Mark Rowe.

* PluginProcess/EntryPoint/mac/XPCService/PluginService.32/Info.plist:
* PluginProcess/EntryPoint/mac/XPCService/PluginService.64/Info.plist:
* PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:

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

7 years agoUpdate WebKitDirs.pm for new Windows paths
bfulgham@webkit.org [Wed, 13 Feb 2013 01:00:15 +0000 (01:00 +0000)]
Update WebKitDirs.pm for new Windows paths
https://bugs.webkit.org/show_bug.cgi?id=107714

Reviewed by Daniel Bates.

* Scripts/webkitdirs.pm: For each existing Windows environment
variable, also include creation of the 'new' variables. The
'old' variables will be removed in a future update.
(windowsSourceSourceDir): New helper routine to return the
actual 'Source' folder of the WebKit source tree.

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

7 years agoCrash when scrolling soon after page starts loading
simon.fraser@apple.com [Wed, 13 Feb 2013 00:58:38 +0000 (00:58 +0000)]
Crash when scrolling soon after page starts loading
https://bugs.webkit.org/show_bug.cgi?id=109631
<rdar://problem/13157533&13159627&13196727>

Reviewed by Anders Carlsson.

Make the scrolling tree more robust when the root state node,
and/or scrolling node are null. This can happen if we try to
handle a wheel event before we've done the first scrolling
tree commit.

* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::commit): Handle the case where
m_rootStateNode is null. We'll still commit, but the state tree
will have no state nodes.
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::handleWheelEvent): Null-check m_rootNode.
(WebCore::ScrollingTree::commitNewTreeState): Handle a null root node.
(WebCore::ScrollingTree::updateTreeFromStateNode): If the rood state node
is null, just clear the map and null out the root scrolling node.
* page/scrolling/ScrollingTree.h: m_debugInfoLayer was unused.
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::ensureRootStateNodeForFrameView): It may be possible
to get here before we've registered the root scroll layer, in which case scrollLayerID()
will be 0. Assert to see if this can ever happen.
(WebCore::ScrollingCoordinatorMac::scrollingStateTreeAsText): Handle case of rootStateNode()
being null.

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

7 years agoAdd skeleton of the OfflineStorageProcess
weinig@apple.com [Wed, 13 Feb 2013 00:58:00 +0000 (00:58 +0000)]
Add skeleton of the OfflineStorageProcess
https://bugs.webkit.org/show_bug.cgi?id=109615

Reviewed by Anders Carlsson.

This adds the skeleton of a new process to contain Database and Local Storage
backends in (hence, offline storage). We're adding a new process, rather than
using the Network or UIProcesses, to allow us to tightly sandbox these activities
away from networking and full filesystem access.

* Configurations/OfflineStorageProcess.xcconfig: Added.
* Configurations/OfflineStorageService.Development.xcconfig: Added.
* Configurations/OfflineStorageService.xcconfig: Added.
* DerivedSources.make:
* OfflineStorageProcess: Added.
* OfflineStorageProcess/EntryPoint: Added.
* OfflineStorageProcess/EntryPoint/mac: Added.
* OfflineStorageProcess/EntryPoint/mac/LegacyProcess: Added.
* OfflineStorageProcess/EntryPoint/mac/LegacyProcess/Info.plist: Added.
* OfflineStorageProcess/EntryPoint/mac/LegacyProcess/OfflineStorageProcessMain.mm: Added.
* OfflineStorageProcess/EntryPoint/mac/LegacyProcess/OfflineStorageProcessMainBootstrapper.cpp: Added.
* OfflineStorageProcess/EntryPoint/mac/XPCService: Added.
* OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService: Added.
* OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService.Development: Added.
* OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService.Development/Info.plist: Added.
* OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService.Development/OfflineStorageServiceMain.Development.mm: Added.
* OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService/Info.plist: Added.
* OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService/OfflineStorageServiceMain.mm: Added.
* OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageServiceEntryPoint.mm: Added.
* OfflineStorageProcess/OfflineStorageProcess.cpp: Added.
* OfflineStorageProcess/OfflineStorageProcess.h: Added.
* OfflineStorageProcess/OfflineStorageProcess.messages.in: Added.
* OfflineStorageProcess/mac: Added.
* OfflineStorageProcess/mac/OfflineStorageProcessMac.mm: Added.
(WebKit::OfflineStorageProcess::initializeProcessName):
(WebKit::OfflineStorageProcess::initializeSandbox):
* OfflineStorageProcess/mac/com.apple.WebKit.OfflineStorage.sb: Added.
* Shared/OfflineStorage: Added.
* Shared/OfflineStorage/OfflineStorageProcessCreationParameters.cpp: Added.
* Shared/OfflineStorage/OfflineStorageProcessCreationParameters.h: Added.

* Scripts/webkit2/messages.py:
(struct_or_class):
Added OfflineStorageProcessCreationParameters.

* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoTeach more WTF string classes about vectors with inline capacity
eric@webkit.org [Wed, 13 Feb 2013 00:41:05 +0000 (00:41 +0000)]
Teach more WTF string classes about vectors with inline capacity
https://bugs.webkit.org/show_bug.cgi?id=109617

Reviewed by Benjamin Poulain.

The HTML and WebVTT parsers use constructions like:
AtomicString name(m_name.data(), m_name.size())
all over the place because they use inline capacity
on the parse vectors for performance.

This change just add the necessary template variants
to the related String constructors/methods in WTF so that
this parser code can just pass the vector directly instead.

I'll do the actual parser cleanups in follow-up patches to keep things simple.

* wtf/text/AtomicString.h:
(AtomicString):
(WTF::AtomicString::AtomicString):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::StringImpl::create8BitIfPossible):
* wtf/text/WTFString.h:
(String):
(WTF::String::make8BitFrom16BitSource):
(WTF):
(WTF::append):

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

7 years ago[EFL][WK2] Fix build warning after r142579
commit-queue@webkit.org [Wed, 13 Feb 2013 00:23:39 +0000 (00:23 +0000)]
[EFL][WK2] Fix build warning after r142579
https://bugs.webkit.org/show_bug.cgi?id=109547

Patch by Jinwoo Song <jinwoo7.song@samsung.com> on 2013-02-12
Reviewed by Alexey Proskuryakov.

Use UNUSED_PARAM macro to fix -Wunused-parameter build warning.

* UIProcess/efl/PageViewportControllerClientEfl.cpp:
(WebKit::PageViewportControllerClientEfl::didChangeContentsSize):

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

7 years agoSynchronize setting of panner node model and processing
rtoy@google.com [Wed, 13 Feb 2013 00:10:45 +0000 (00:10 +0000)]
Synchronize setting of panner node model and processing
https://bugs.webkit.org/show_bug.cgi?id=109599

Reviewed by Chris Rogers.

No new tests.

* Modules/webaudio/PannerNode.cpp:
(WebCore::PannerNode::process):
(WebCore::PannerNode::setPanningModel):
* Modules/webaudio/PannerNode.h:

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

7 years agoUnreviewed. Remove webintents from TestExpectations on mac - directory no longer...
dino@apple.com [Tue, 12 Feb 2013 23:53:44 +0000 (23:53 +0000)]
Unreviewed. Remove webintents from TestExpectations on mac - directory no longer exists.

* platform/mac/TestExpectations:

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

7 years agoAdd class name for snapshotted plugin based on dimensions
dino@apple.com [Tue, 12 Feb 2013 23:53:15 +0000 (23:53 +0000)]
Add class name for snapshotted plugin based on dimensions
https://bugs.webkit.org/show_bug.cgi?id=108369

Reviewed by Simon Fraser.

As the size of the plugin changes, the Shadow Root for the snapshot
might want to toggle different interfaces. Expose "tiny", "small",
"medium" and "large" classes on the Shadow. (The dimensions are
currently chosen fairly arbitrarily).

Because we only know the dimensions after layout, we set up
a post layout task to add the class. Luckily there already was
a post layout task for plugins - I just updated it to handle
both real and snapshotted plugins. This involved modifying
the list of RenderEmbeddedObjects in FrameView to take generic
RenderObjects, and decide which type they are when calling
the update method.

* html/HTMLPlugInImageElement.cpp: Some new dimensions for the various size thresholds.
(WebCore::classNameForShadowRootSize): New static function that returns a class name
    after examining the size of the object.
(WebCore::HTMLPlugInImageElement::updateSnapshotInfo): Sets the class name for
    the shadow root. This is called in the post layout task.
(WebCore::shouldPlugInShowLabelAutomatically): Use new size names.
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Ditto.
* html/HTMLPlugInImageElement.h:
(HTMLPlugInImageElement): New method updateSnapshotInfo.

* page/FrameView.cpp:
(WebCore::FrameView::addWidgetToUpdate): Change RenderEmbeddedObject* to RenderObject*.
(WebCore::FrameView::removeWidgetToUpdate): Ditto
(WebCore::FrameView::updateWidget): Branch based on EmbeddedObject vs SnapshottedPlugIn. Call
    plugin snapshot update if necessary.
(WebCore::FrameView::updateWidgets): Handle both EmbeddedObject and SnapshottedPlugIn cases.
* page/FrameView.h: Change RenderEmbeddedObject* to RenderObject* for post layout widget updates.

* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::layout): New virtual override. If size has changed, ask the
    FrameView to recalculate size after layout.
* rendering/RenderSnapshottedPlugIn.h: New layout() method.

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

7 years agoFix signedness in WebTestProxy
alecflett@chromium.org [Tue, 12 Feb 2013 23:53:00 +0000 (23:53 +0000)]
Fix signedness in WebTestProxy
https://bugs.webkit.org/show_bug.cgi?id=109623

Reviewed by Adam Barth.

Fix signedness problem, using size_t instead of int.

* DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:

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

7 years agoImplement script MIME restrictions for X-Content-Type-Options: nosniff
mkwst@chromium.org [Tue, 12 Feb 2013 23:44:51 +0000 (23:44 +0000)]
Implement script MIME restrictions for X-Content-Type-Options: nosniff
https://bugs.webkit.org/show_bug.cgi?id=71851

Reviewed by Adam Barth.

Source/WebCore:

This patch adds support for 'X-Content-Type-Options: nosniff' when
deciding whether or not to execute a given chunk of JavaScript. If the
header is present, script will only execute if it matches a predefined
set of MIME types[1] that are deemed "executable". Scripts served with
types that don't match the list will not execute.

IE introduced this feature, and Gecko is working on an implementation[2]
now. There's been some discussion on the WHATWG list about formalizing
the specification for this feature[3], but nothing significant has been
decided.

This implementation's list of acceptible MIME types differs from IE's:
it matches the list of supported JavaScript MIME types defined in
MIMETypeRegistry::initializeSupportedJavaScriptMIMETypes()[4]. In
particular, the VBScript types are not accepted, and
'text/javascript1.{1,2,3}' are accepted, along with 'text/livescript'.

This feature is locked tightly behind the ENABLE_NOSNIFF flag, which is
currently only enabled on the Chromium port.

[1]: http://msdn.microsoft.com/en-us/library/gg622941(v=vs.85).aspx
[2]: https://bugzilla.mozilla.org/show_bug.cgi?id=471020
[3]: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-November/037974.html
[4]: http://trac.webkit.org/browser/trunk/Source/WebCore/platform/MIMETypeRegistry.cpp?rev=142086#L307

Tests: http/tests/security/contentTypeOptions/invalid-content-type-options-allowed.html
       http/tests/security/contentTypeOptions/nosniff-script-allowed.html
       http/tests/security/contentTypeOptions/nosniff-script-blocked.html
       http/tests/security/contentTypeOptions/nosniff-script-without-content-type-allowed.html

* dom/ScriptElement.cpp:
(WebCore::ScriptElement::executeScript):
    Before executing script, ensure that it shouldn't be blocked due to
    its MIME type. If it is blocked, write an error message to the
    console.
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::mimeType):
    Make scripts' MIME type available outside the context of
    CachedScript in order to correctly populate error messages we write
    to the console in ScriptElement::executeScript
(WebCore):
(WebCore::CachedScript::mimeTypeAllowedByNosniff):
* loader/cache/CachedScript.h:
(CachedScript):
    A new method which checks the resource's HTTP headers to set the
    'nosniff' disposition, and compares the resource's MIME type against
    the list of allowed executable types. Returns true iff the script
    is allowed.
* platform/network/HTTPParsers.cpp:
(WebCore):
(WebCore::parseContentTypeOptionsHeader):
* platform/network/HTTPParsers.h:
    Adds a new enum which relates the sniffable status of the resource,
    and a method to parse the HTTP header.

LayoutTests:

* http/tests/security/contentTypeOptions/invalid-content-type-options-allowed-expected.txt: Added.
* http/tests/security/contentTypeOptions/invalid-content-type-options-allowed.html: Added.
* http/tests/security/contentTypeOptions/nosniff-script-allowed-expected.txt: Added.
* http/tests/security/contentTypeOptions/nosniff-script-allowed.html: Added.
* http/tests/security/contentTypeOptions/nosniff-script-blocked-expected.txt: Added.
* http/tests/security/contentTypeOptions/nosniff-script-blocked.html: Added.
* http/tests/security/contentTypeOptions/nosniff-script-without-content-type-blocked-expected.txt: Added.
* http/tests/security/contentTypeOptions/nosniff-script-without-content-type-blocked.html: Added.
* http/tests/security/contentTypeOptions/resources/script-with-header.pl: Added.
    New tests!
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
* platform/wk2/TestExpectations:
    Skip the new tests on platforms where ENABLE_NOSNIFF isn't yet
    enabled (everything other than Chromium).

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

7 years ago[BlackBerry] Assume setScrollingOrZooming() to be called on the WebKit thread.
jpetsovits@rim.com [Tue, 12 Feb 2013 23:38:00 +0000 (23:38 +0000)]
[BlackBerry] Assume setScrollingOrZooming() to be called on the WebKit thread.
https://bugs.webkit.org/show_bug.cgi?id=109614
Internal PR 294513

Reviewed by Rob Buis.
Internally reviewed by Arvid Nilsson.

With this further simplification of threading assumptions,
we can get rid of atomic integer access as well as the
backing store mutex which was otherwise unused.

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
(BlackBerry::WebKit::BackingStorePrivate::~BackingStorePrivate):
(BlackBerry::WebKit::BackingStorePrivate::suspendBackingStoreUpdates):
(BlackBerry::WebKit::BackingStorePrivate::resumeBackingStoreUpdates):
(BlackBerry::WebKit::BackingStorePrivate::isScrollingOrZooming):
(BlackBerry::WebKit::BackingStorePrivate::setScrollingOrZooming):
* Api/BackingStore_p.h:
(BackingStorePrivate):

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

7 years agoAdd alias
rtoy@google.com [Tue, 12 Feb 2013 23:35:39 +0000 (23:35 +0000)]
Add alias

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

7 years agoDFG CFA doesn't filter precisely enough for CompareStrictEq
fpizlo@apple.com [Tue, 12 Feb 2013 23:23:45 +0000 (23:23 +0000)]
DFG CFA doesn't filter precisely enough for CompareStrictEq
https://bugs.webkit.org/show_bug.cgi?id=109618

Reviewed by Mark Hahnenberg.

The backend speculates object for this case, but the CFA was filtering on
(SpecCell & ~SpecString) | SpecOther.

* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::execute):

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

7 years ago[EFL][WK2] Reenable ewk_auth_request API tests
ch.dumez@sisa.samsung.com [Tue, 12 Feb 2013 23:10:31 +0000 (23:10 +0000)]
[EFL][WK2] Reenable ewk_auth_request API tests
https://bugs.webkit.org/show_bug.cgi?id=108451

Reviewed by Benjamin Poulain.

ewk_auth_request API tests were temporarily disabled after
the C API for resource loading was removed from WebKit2.
This patches updates the tests so that they no longer rely
on the resource loading events and renables them.

This patch also corrects the naming of the static variables
in the test to follow more closely the WebKit coding style.

* PlatformEfl.cmake:
* UIProcess/API/efl/tests/test_ewk2_auth_request.cpp:
(serverCallback):
(TEST_F):
(onLoadFinished):

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

7 years ago[BlackBerry] Eliminate the direct rendering option.
jpetsovits@rim.com [Tue, 12 Feb 2013 23:09:10 +0000 (23:09 +0000)]
[BlackBerry] Eliminate the direct rendering option.
https://bugs.webkit.org/show_bug.cgi?id=109608
RIM PR 293298

Reviewed by Rob Buis.
Internally reviewed by Arvid Nilsson.

It added a lot of complexity and we're not going to use it anymore.
This patch removes direct rendering functionality from
WebKit/blackberry together with the assumption that blitting on the
WebKit thread is possible or acceptable. It now isn't anymore.

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
(BlackBerry::WebKit::BackingStorePrivate::resumeScreenUpdates):
(BlackBerry::WebKit::BackingStorePrivate::updateSuspendScreenUpdateState):
(BlackBerry::WebKit::BackingStorePrivate::slowScroll):
(BlackBerry::WebKit::BackingStorePrivate::scroll):
(BlackBerry::WebKit::BackingStorePrivate::shouldPerformRenderJobs):
(BlackBerry::WebKit::BackingStorePrivate::render):
(BlackBerry::WebKit::BackingStorePrivate::renderAndBlitImmediately):
(BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
(BlackBerry::WebKit::BackingStorePrivate::blitToWindow):
(BlackBerry::WebKit::BackingStorePrivate::fillWindow):
(BlackBerry::WebKit::BackingStorePrivate::invalidateWindow):
(BlackBerry::WebKit::BackingStorePrivate::clearWindow):
(BlackBerry::WebKit::BackingStorePrivate::setScrollingOrZooming):
(BlackBerry::WebKit::BackingStorePrivate::didRenderContent):
* Api/BackingStore.h:
* Api/BackingStore_p.h:
(BackingStorePrivate):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
(BlackBerry::WebKit::WebPagePrivate::setViewportSize):
(BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
(WebKit):
(BlackBerry::WebKit::WebPagePrivate::scheduleCompositingRun):
* Api/WebPageCompositor.cpp:
(BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameChanged):
* Api/WebPage_p.h:
(WebPagePrivate):
* Api/WebSettings.cpp:
(WebKit):
* Api/WebSettings.h:
* WebKitSupport/RenderQueue.cpp:
(BlackBerry::WebKit::RenderQueue::renderRegularRenderJobs):
(BlackBerry::WebKit::RenderQueue::renderScrollZoomJobs):
* WebKitSupport/SurfacePool.cpp:
(BlackBerry::WebKit::SurfacePool::initialize):

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

7 years agoUnreviewed chromium rebaseline for r142638, garden-o-matic screwed up the original...
eae@chromium.org [Tue, 12 Feb 2013 22:56:29 +0000 (22:56 +0000)]
Unreviewed chromium rebaseline for r142638, garden-o-matic screwed up the original rebaseline :(

* platform/chromium-mac-lion/fast/dom/Window/webkitConvertPoint-expected.txt: Added.
* platform/chromium-mac-snowleopard/fast/dom/Window/webkitConvertPoint-expected.txt: Added.
* platform/chromium-win-xp/fast/dom/Window: Added.
* platform/chromium-win-xp/fast/dom/Window/webkitConvertPoint-expected.txt: Added.

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

7 years agoThreaded HTML parser should pass the remaining fast/tokenizer tests
abarth@webkit.org [Tue, 12 Feb 2013 22:44:25 +0000 (22:44 +0000)]
Threaded HTML parser should pass the remaining fast/tokenizer tests
https://bugs.webkit.org/show_bug.cgi?id=109607

Reviewed by Eric Seidel.

This patch fixes some edge cases involving document.write. Previously,
we would drop input characters on the floor if the tokenizer wasn't
able to consume them synchronously. In this patch, we send the unparsed
characters to the background thread for consumption after rewinding the
input stream.

* html/parser/BackgroundHTMLInputStream.cpp:
(WebCore::BackgroundHTMLInputStream::rewindTo):
* html/parser/BackgroundHTMLInputStream.h:
(BackgroundHTMLInputStream):
* html/parser/BackgroundHTMLParser.cpp:
(WebCore::BackgroundHTMLParser::resumeFrom):
* html/parser/BackgroundHTMLParser.h:
(Checkpoint):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::canTakeNextToken):
(WebCore::HTMLDocumentParser::didFailSpeculation):
(WebCore::HTMLDocumentParser::pumpTokenizer):
(WebCore::HTMLDocumentParser::finish):
* html/parser/HTMLInputStream.h:
(WebCore::HTMLInputStream::closeWithoutMarkingEndOfFile):
(HTMLInputStream):

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

7 years agoIntroduce a WorkQueueMessageReceiver class as a replacement for QueueClient
andersca@apple.com [Tue, 12 Feb 2013 22:17:36 +0000 (22:17 +0000)]
Introduce a WorkQueueMessageReceiver class as a replacement for QueueClient
https://bugs.webkit.org/show_bug.cgi?id=109612

Reviewed by Andreas Kling.

* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::addWorkQueueMessageReceiver):
(CoreIPC):
(CoreIPC::Connection::removeWorkQueueMessageReceiver):
(CoreIPC::Connection::addWorkQueueMessageReceiverOnConnectionWorkQueue):
(CoreIPC::Connection::removeWorkQueueMessageReceiverOnConnectionWorkQueue):
* Platform/CoreIPC/Connection.h:
(Connection):

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

7 years ago[BlackBerry] CSS animations stop running during zoom
commit-queue@webkit.org [Tue, 12 Feb 2013 21:59:18 +0000 (21:59 +0000)]
[BlackBerry] CSS animations stop running during zoom
https://bugs.webkit.org/show_bug.cgi?id=109606

Patch by Andrew Lo <anlo@rim.com> on 2013-02-12
Reviewed by Rob Buis.
Internally reviewed by Jakob Petsovits.

Internal PR 286160.
New BackingStore API for suspending/resuming geometry updates.

This is needed because we want to allow render jobs to continue during
zoom, but we don't want to allow geometry updates during zoom.

Prevent scroll/zoom render jobs from being added to the queue if
the tile is outside the expanded content rect.

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
(BlackBerry::WebKit::BackingStorePrivate::suspendGeometryUpdates):
(WebKit):
(BlackBerry::WebKit::BackingStorePrivate::resumeGeometryUpdates):
(BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
(BlackBerry::WebKit::BackingStore::suspendGeometryUpdates):
(BlackBerry::WebKit::BackingStore::resumeGeometryUpdates):
* Api/BackingStore.h:
* Api/BackingStore_p.h:
(BackingStorePrivate):
* WebKitSupport/RenderQueue.cpp:
(BlackBerry::WebKit::RenderQueue::addToScrollZoomQueue):

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

7 years agoUnreviewed buildfix for !ENABLE(INSPECTOR) platforms after r142654.
ossy@webkit.org [Tue, 12 Feb 2013 21:36:28 +0000 (21:36 +0000)]
Unreviewed buildfix for !ENABLE(INSPECTOR) platforms after r142654.

* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::scriptsEnabled):

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

7 years agoTypo fix after r142663.
ossy@webkit.org [Tue, 12 Feb 2013 21:32:15 +0000 (21:32 +0000)]
Typo fix after r142663.

* GNUmakefile.list.am:

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

7 years agoRemove remaining traces of Web Intents
ch.dumez@sisa.samsung.com [Tue, 12 Feb 2013 21:21:32 +0000 (21:21 +0000)]
Remove remaining traces of Web Intents
https://bugs.webkit.org/show_bug.cgi?id=109586

Reviewed by Eric Seidel.

.:

Remove references to Web Intents from CMake files as the functionality
was removed in r142549.

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

Source/WebCore:

Remove remaining traces of Web Intents as the functionality was
removed in r142549.

No new tests, no behavior change for layout tests.

* GNUmakefile.features.am.in:
* html/HTMLTagNames.in:

Source/WebKit/blackberry:

Remove remaining traces of Web Intents from Blackberry port
configuration as the functionality was removed in r142549.

* WebCoreSupport/AboutDataEnableFeatures.in:

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

7 years ago[WK2] Unreviewed trivial buildfix after r142630 and r142651.
ossy@webkit.org [Tue, 12 Feb 2013 21:19:37 +0000 (21:19 +0000)]
[WK2] Unreviewed trivial buildfix after r142630 and r142651.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didFinishLaunching):
* UIProcess/Plugins/qt/PluginProcessProxyQt.cpp:
(WebKit::PluginProcessProxy::platformGetLaunchOptions):
* UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
(WebKit::PluginProcessProxy::platformGetLaunchOptions):

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

7 years agoAdding myself to watch lists.
luiz@webkit.org [Tue, 12 Feb 2013 21:17:54 +0000 (21:17 +0000)]
Adding myself to watch lists.

Unreviewed.

* Scripts/webkitpy/common/config/watchlist:

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

7 years agoREGRESSION(r136967): Combination of float and clear yields to bad layout
robert@webkit.org [Tue, 12 Feb 2013 21:06:07 +0000 (21:06 +0000)]
REGRESSION(r136967): Combination of float and clear yields to bad layout
https://bugs.webkit.org/show_bug.cgi?id=109476

Reviewed by Levi Weintraub.

Source/WebCore:

Test: fast/block/margin-collapse/self-collapsing-block-with-float-children.html

The change made at http://trac.webkit.org/changeset/136967 only needs to worry about the first floated
child of a self-collapsing block. The ones that follow are not affected by its margins.

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):

LayoutTests:

* fast/block/margin-collapse/self-collapsing-block-with-float-children-expected.txt: Added.
* fast/block/margin-collapse/self-collapsing-block-with-float-children.html: Added.

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

7 years agoUnreviewed rebaseline for r142638.
eae@chromium.org [Tue, 12 Feb 2013 21:03:17 +0000 (21:03 +0000)]
Unreviewed rebaseline for r142638.

* platform/chromium-linux-x86/fast/dom/Window: Removed.
* platform/chromium-linux-x86/fast/dom/Window/webkitConvertPoint-expected.txt: Removed.
* platform/chromium-linux/fast/dom/Window/webkitConvertPoint-expected.txt: Removed.
* platform/chromium-mac/fast/dom/Window/webkitConvertPoint-expected.txt:
* platform/chromium-win/fast/dom/Window/webkitConvertPoint-expected.txt: Added.
* platform/chromium/TestExpectations:
* platform/mac-lion/accessibility: Added.
* platform/mac-lion/accessibility/table-attributes-expected.txt: Added.
* platform/mac-lion/accessibility/table-cell-spans-expected.txt: Added.
* platform/mac-lion/accessibility/table-sections-expected.txt: Added.
* platform/mac-lion/fast/dom/Window: Added.
* platform/mac-lion/fast/dom/Window/webkitConvertPoint-expected.txt: Added.
* platform/mac-wk2/accessibility/table-cell-spans-expected.txt: Added.
* platform/mac-wk2/fast/dom/Window: Added.
* platform/mac-wk2/fast/dom/Window/webkitConvertPoint-expected.txt: Added.
* platform/mac/accessibility/image-link-expected.txt:
* platform/mac/accessibility/internal-link-anchors2-expected.txt:
* platform/mac/accessibility/table-detection-expected.txt:
* platform/mac/fast/dom/Window/webkitConvertPoint-expected.txt:

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

7 years agoASSERTION FAILED: !object || object->isBox(), UNKNOWN in WebCore::RenderListItem...
leviw@chromium.org [Tue, 12 Feb 2013 21:01:37 +0000 (21:01 +0000)]
ASSERTION FAILED: !object || object->isBox(), UNKNOWN in WebCore::RenderListItem::positionListMarker
https://bugs.webkit.org/show_bug.cgi?id=108699

Reviewed by Abhishek Arya.

Source/WebCore:

RenderListItems performs special management of its children to maintain list markers. Splitting a flow
through a list item results in assumptions made inside RenderListItem failing, so for now, avoid splitting
flows when inside one.

Test: fast/multicol/span/list-multi-column-crash.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::containingColumnsBlock):

LayoutTests:

* fast/multicol/span/list-multi-column-crash-expected.txt: Added.
* fast/multicol/span/list-multi-column-crash.html: Added.

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

7 years agoChange the queue client base class to be private everywhere
andersca@apple.com [Tue, 12 Feb 2013 20:56:57 +0000 (20:56 +0000)]
Change the queue client base class to be private everywhere
https://bugs.webkit.org/show_bug.cgi?id=109604

Reviewed by Andreas Kling.

Move connection queue client registration inside of the respective queue client classes.

Also, it's too late to add queue clients in ChildProcessProxy::didFinishLaunching, so do this in
ChildProcessProxy::connectionWillOpen instead.

Finally, assert that queue clients are only being added and removed from the client thread.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeConnection):
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::addQueueClient):
(CoreIPC::Connection::removeQueueClient):
* Shared/mac/SecItemShim.cpp:
(WebKit::SecItemShim::initializeConnection):
(WebKit):
* Shared/mac/SecItemShim.h:
(SecItemShim):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::connectionWillOpen):
(WebKit):
(WebKit::NetworkProcessProxy::connectionWillClose):
(WebKit::NetworkProcessProxy::didFinishLaunching):
* UIProcess/Network/NetworkProcessProxy.h:
(NetworkProcessProxy):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::connectionWillOpen):
(WebKit::WebProcessProxy::didFinishLaunching):
* UIProcess/mac/SecItemShimProxy.cpp:
(WebKit::SecItemShimProxy::initializeConnection):
(WebKit):
* UIProcess/mac/SecItemShimProxy.h:
(SecItemShimProxy):
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::initializeConnection):
(WebKit):
* WebProcess/Plugins/PluginProcessConnectionManager.h:
(PluginProcessConnectionManager):
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::initializeConnection):
(WebKit):
* WebProcess/WebPage/EventDispatcher.h:
(EventDispatcher):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeConnection):

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

7 years agoUnreviewed Windows build fix.
roger_fong@apple.com [Tue, 12 Feb 2013 20:56:06 +0000 (20:56 +0000)]
Unreviewed Windows build fix.

* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::Internals):

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

7 years agoWeb Inspector: JavaScript execution disabled by browser/UA should be notified to...
vivek.vg@samsung.com [Tue, 12 Feb 2013 20:45:44 +0000 (20:45 +0000)]
Web Inspector: JavaScript execution disabled by browser/UA should be notified to the front-end
https://bugs.webkit.org/show_bug.cgi?id=109402

Reviewed by Yury Semikhatsky.

Source/WebCore:

Whenever the UA/Browser changes the Script Execution state of a page, it should notify the
inspector front-end. Added the InspectorInstrumentation method didScriptExecutionStateChange
to achieve this. Also the state change triggered by the inspector should be ignored to avoid
infinite loop.

Test: inspector/script-execution-state-change-notification.html

* inspector/Inspector.json:
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::scriptsEnabledImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::scriptsEnabled):
(WebCore):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::InspectorPageAgent):
(WebCore::InspectorPageAgent::setScriptExecutionDisabled):
(WebCore::InspectorPageAgent::scriptsEnabled):
(WebCore):
* inspector/InspectorPageAgent.h:
(InspectorPageAgent):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.PageDispatcher.prototype.javascriptDialogClosed):
(WebInspector.PageDispatcher.prototype.scriptsEnabled):
* page/Settings.cpp:
(WebCore::Settings::setScriptEnabled):

LayoutTests:

Tests that whenever Script Execution state is changed outside inspector, its notified to the Inspector front-end.

* inspector/script-execution-state-change-notification-expected.txt: Added.
* inspector/script-execution-state-change-notification.html: Added.

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

7 years ago[Chromium] IndexedDB/Worker crash during shutdown
jsbell@chromium.org [Tue, 12 Feb 2013 20:23:04 +0000 (20:23 +0000)]
[Chromium] IndexedDB/Worker crash during shutdown
https://bugs.webkit.org/show_bug.cgi?id=109467

Reviewed by Tony Chang.

If the message queue has already been terminated, don't bother scheduling
a new error event that will never be delivered. Speculative fix for the
issue, which only repros in multiprocess ports and so far only on some
platforms.

* src/IDBFactoryBackendProxy.cpp:
(WebKit::IDBFactoryBackendProxy::allowIndexedDB): Early exit.

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

7 years agoCache timer heap pointer to timers
antti@apple.com [Tue, 12 Feb 2013 20:14:06 +0000 (20:14 +0000)]
Cache timer heap pointer to timers
https://bugs.webkit.org/show_bug.cgi?id=109597

Reviewed by Andreas Kling.

Accessing timer heap through thread global storage is slow (~0.1% in PLT3). We can cache the heap pointer to
each TimerBase. There are not huge numbers of timers around so memory is not an issue and many timers are heavily reused.

* platform/Timer.cpp:
(WebCore::threadGlobalTimerHeap):
(WebCore::TimerHeapReference::operator=):
(WebCore::TimerHeapIterator::checkConsistency):
(WebCore::TimerBase::TimerBase):
(WebCore::TimerBase::checkHeapIndex):
(WebCore::TimerBase::setNextFireTime):
* platform/Timer.h:
(WebCore::TimerBase::timerHeap):
(TimerBase):

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

7 years agoAdd WKContext API to retrieve basic network process statistics
beidson@apple.com [Tue, 12 Feb 2013 20:12:53 +0000 (20:12 +0000)]
Add WKContext API to retrieve basic network process statistics
https://bugs.webkit.org/show_bug.cgi?id=109329

Reviewed by Sam Weinig.

This patch adds a WKContextGetStatisticsWithOptions which allows the client to ask for
certain types of statistics.

It also expands the "get statistics" callback mechanism to allow for a statistics request
to be answered by multiple child processes.

That mechanism still has some rough edges but will eventually allow for getting statistics
from multiple web processes, as well.

* NetworkProcess/HostRecord.cpp:
(WebKit::HostRecord::pendingRequestCount):
(WebKit::HostRecord::activeLoadCount):
* NetworkProcess/HostRecord.h:

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::getNetworkProcessStatistics):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:

* NetworkProcess/NetworkResourceLoadScheduler.cpp:
(WebKit::NetworkResourceLoadScheduler::hostsPendingCount):
(WebKit::NetworkResourceLoadScheduler::loadsPendingCount):
(WebKit::NetworkResourceLoadScheduler::hostsActiveCount):
(WebKit::NetworkResourceLoadScheduler::loadsActiveCount):
* NetworkProcess/NetworkResourceLoadScheduler.h:

* Shared/Authentication/AuthenticationManager.h:
(WebKit::AuthenticationManager::outstandingAuthenticationChallengeCount):
* Shared/Downloads/DownloadManager.h:

* UIProcess/API/C/WKContext.cpp:
(WKContextGetStatistics):
(WKContextGetStatisticsWithOptions):
* UIProcess/API/C/WKContext.h:

* UIProcess/StatisticsRequest.cpp: Added.
(WebKit::StatisticsRequest::StatisticsRequest):
(WebKit::StatisticsRequest::~StatisticsRequest):
(WebKit::StatisticsRequest::addOutstandingRequest):
(WebKit::addToDictionaryFromHashMap):
(WebKit::createDictionaryFromHashMap):
(WebKit::StatisticsRequest::completedRequest):
* UIProcess/StatisticsRequest.h: Added.
(WebKit::StatisticsRequest::create):

* UIProcess/WebContext.cpp:
(WebKit::WebContext::networkingProcessConnection):
(WebKit::WebContext::getStatistics):
(WebKit::WebContext::requestWebContentStatistics):
(WebKit::WebContext::requestNetworkingStatistics):
(WebKit::WebContext::didGetStatistics):
* UIProcess/WebContext.h:
* UIProcess/WebContext.messages.in:

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::getWebCoreStatistics):

* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoFix the gyp build of JavaScriptCore.
mrobinson@webkit.org [Tue, 12 Feb 2013 19:56:08 +0000 (19:56 +0000)]
Fix the gyp build of JavaScriptCore.

* JavaScriptCore.gypi: Added some missing DFG files to the source list.

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

7 years agoUnreviewed, rolling out r142387.
commit-queue@webkit.org [Tue, 12 Feb 2013 19:46:11 +0000 (19:46 +0000)]
Unreviewed, rolling out r142387.
http://trac.webkit.org/changeset/142387
https://bugs.webkit.org/show_bug.cgi?id=109601

caused all layout and jscore tests on windows to fail
(Requested by kling on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-02-12

* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
* bytecode/UnlinkedCodeBlock.h:
(UnlinkedCodeBlock):

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

7 years agoBackgroundHTMLParser::resumeFrom should take a struct
abarth@webkit.org [Tue, 12 Feb 2013 19:39:38 +0000 (19:39 +0000)]
BackgroundHTMLParser::resumeFrom should take a struct
https://bugs.webkit.org/show_bug.cgi?id=109598

Reviewed by Eric Seidel.

This patch is purely a syntatic change that paves the way for fixing
the partial-entity document.write tests. To fix those tests, we'll need
to pass more information to resumeFrom, but we're hitting the argument
limits in Functional.h. Rather than adding yet more arguments, this
patch moves to a single argument that's a struct.

* html/parser/BackgroundHTMLParser.cpp:
(WebCore::BackgroundHTMLParser::resumeFrom):
* html/parser/BackgroundHTMLParser.h:
(Checkpoint):
(BackgroundHTMLParser):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::didFailSpeculation):

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

7 years agorootRenderer in FrameView is really RenderView
esprehn@chromium.org [Tue, 12 Feb 2013 19:35:01 +0000 (19:35 +0000)]
rootRenderer in FrameView is really RenderView
https://bugs.webkit.org/show_bug.cgi?id=109510

Reviewed by Eric Seidel.

The global function rootRenderer(FrameView*) is really just a way
to get the RenderView from the Frame so replace it with a renderView()
method and replace usage of the word "root" with renderView so it's
obvious the root we're talking about is the renderView. This is an
important distinction to make since we also have rootRenderer in the code
for the documentElement()'s renderer and we also have a "layout root" which
is entirely different.

No new tests, just refactoring.

* page/FrameView.cpp:
(WebCore::FrameView::rootRenderer): Removed.
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::adjustViewSize):
(WebCore::FrameView::updateCompositingLayersAfterStyleChange):
(WebCore::FrameView::updateCompositingLayersAfterLayout):
(WebCore::FrameView::clearBackingStores):
(WebCore::FrameView::restoreBackingStores):
(WebCore::FrameView::usesCompositedScrolling):
(WebCore::FrameView::layerForHorizontalScrollbar):
(WebCore::FrameView::layerForVerticalScrollbar):
(WebCore::FrameView::layerForScrollCorner):
(WebCore::FrameView::tiledBacking):
(WebCore::FrameView::scrollLayerID):
(WebCore::FrameView::layerForOverhangAreas):
(WebCore::FrameView::flushCompositingStateForThisFrame):
(WebCore::FrameView::hasCompositedContent):
(WebCore::FrameView::enterCompositingMode):
(WebCore::FrameView::isSoftwareRenderable):
(WebCore::FrameView::didMoveOnscreen):
(WebCore::FrameView::willMoveOffscreen):
(WebCore::FrameView::layout):
(WebCore::FrameView::embeddedContentBox):
(WebCore::FrameView::contentsInCompositedLayer):
(WebCore::FrameView::scrollContentsFastPath):
(WebCore::FrameView::scrollContentsSlowPath):
(WebCore::FrameView::maintainScrollPositionAtAnchor):
(WebCore::FrameView::scrollPositionChanged):
(WebCore::FrameView::repaintFixedElementsAfterScrolling):
(WebCore::FrameView::updateFixedElementsAfterScrolling):
(WebCore::FrameView::visibleContentsResized):
(WebCore::FrameView::scheduleRelayoutOfSubtree):
(WebCore::FrameView::needsLayout):
(WebCore::FrameView::setNeedsLayout):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::updateControlTints):
(WebCore::FrameView::paintContents):
(WebCore::FrameView::forceLayoutForPagination):
(WebCore::FrameView::adjustPageHeightDeprecated):
(WebCore::FrameView::resetTrackedRepaints):
(WebCore::FrameView::isVerticalDocument):
(WebCore::FrameView::isFlippedDocument):
* page/FrameView.h:
(WebCore::FrameView::renderView): Added.

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

7 years ago[GTK][Introspection] GObject bindings for DataTransferItemList - one add() method...
commit-queue@webkit.org [Tue, 12 Feb 2013 19:27:17 +0000 (19:27 +0000)]
[GTK][Introspection] GObject bindings for DataTransferItemList - one add() method must be removed from .idl
https://bugs.webkit.org/show_bug.cgi?id=109180

Patch by Tomas Popela <tpopela@redhat.com> on 2013-02-12
Reviewed by Xan Lopez.

When compiling WebKit with --enable-introspection and generating GObject bindings
for DataTransferItemList we must disable one add() method, because GObject is
based on C and C does not allow two functions with the same name.

No tests needed.

* bindings/scripts/CodeGeneratorGObject.pm:

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