WebKit-https.git
6 years ago<https://webkit.org/b/119998> [Qt] Build fix (broken since r154257).
commit-queue@webkit.org [Mon, 19 Aug 2013 09:56:16 +0000 (09:56 +0000)]
<https://webkit.org/b/119998> [Qt] Build fix (broken since r154257).

Patch by Julien Brianceau <jbrianceau@nds.com> on 2013-08-19
Reviewed by Andreas Kling.

Element::attach() doesn't exist anymore since r154257.

* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::parseStartElement):

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

6 years ago<https://webkit.org/b/120001> Clean up StyleElement
antti@apple.com [Mon, 19 Aug 2013 08:56:27 +0000 (08:56 +0000)]
<https://webkit.org/b/120001> Clean up StyleElement

Reviewed by Andreas Kling.

- Make it non-virtual so we don't use virtual multiple inheritance
- Improve names
- Improve code clarity

* dom/StyleElement.cpp:
(WebCore::StyleElement::StyleElement):
(WebCore::StyleElement::insertedIntoDocument):
(WebCore::StyleElement::clearDocumentData):
(WebCore::StyleElement::childrenChanged):
(WebCore::StyleElement::finishParsingChildren):
(WebCore::StyleElement::createSheetFromTextContents):
(WebCore::isValidCSSContentType):
(WebCore::StyleElement::createSheet):
(WebCore::StyleElement::isLoading):
* dom/StyleElement.h:
(WebCore::StyleElement::setStyleSheetContentType):
(WebCore::StyleElement::setStyleSheetMedia):
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::parseAttribute):
* html/HTMLStyleElement.h:
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::isSupportedAttribute):
(WebCore::SVGStyleElement::parseAttribute):
* svg/SVGStyleElement.h:

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

6 years ago<https://webkit.org/b/119990> Add toSVGStopElement(Node* node) to clean-up a static_c...
gyuyoung.kim@samsung.com [Mon, 19 Aug 2013 08:44:56 +0000 (08:44 +0000)]
<https://webkit.org/b/119990> Add toSVGStopElement(Node* node) to clean-up a static_cast<SVGStopElement*>

Reviewed by Darin Adler.

Clean up remained static_cast<SVGStopElement*> using toSVGStopElement(toSVGElement()).

* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGGradientStop):

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

6 years ago<https://webkit.org/b/119996> Introduce toSVGAnimateElement(), and use it
gyuyoung.kim@samsung.com [Mon, 19 Aug 2013 08:32:44 +0000 (08:32 +0000)]
<https://webkit.org/b/119996> Introduce toSVGAnimateElement(), and use it

Reviewed by Andreas Kling.

As a step to clean-up static_cast<SVGXXX>, static_cast<SVGAnimateElement*> also can be changed
with toSVGAnimateElement().

* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::calculateAnimatedValue):
* svg/SVGAnimateElement.h:
(WebCore::toSVGAnimateElement):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::currentValuesForValuesAnimation):

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

6 years ago<https://webkit.org/b/119997> Page::progress() should return a reference.
akling@apple.com [Mon, 19 Aug 2013 08:24:08 +0000 (08:24 +0000)]
<https://webkit.org/b/119997> Page::progress() should return a reference.

Reviewed by Antti Koivisto.

Page::m_progress is never null.

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

6 years ago<https://webkit.org/b/119989> Make use of Node::ownerDocument a compile time error
darin@apple.com [Mon, 19 Aug 2013 06:40:25 +0000 (06:40 +0000)]
<https://webkit.org/b/119989> Make use of Node::ownerDocument a compile time error

Reviewed by Sam Weinig.

Source/WebCore:

* dom/Element.h: Deleted the ownerDocument function. For compilers that don't support
deleted functions, it is instead overrides the base class function with one that is
private and not defined, which accomplishes almost the same thing: An error, either
at compile time or link time.

* bindings/js/JSHTMLElementCustom.cpp:
(WebCore::JSHTMLElement::pushEventHandlerScope): Use document instead of ownerDocument.
* dom/Document.cpp:
(WebCore::Document::~Document): Added a comment about this clearly-incorrect code.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didPushShadowRoot): Use document instead of ownerDocument.
(WebCore::InspectorInstrumentation::willPopShadowRoot): Ditto.
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheetForInlineStyle::setStyleText): Ditto.
* plugins/PluginView.cpp:
(WebCore::getFrame): Removed ineffective call to ownerDocument after document when it
returns 0. It will never return anything other than 0 in that case.
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::calculateIntrinsicSize): Use document instead of ownerDocument.
Did not remove the null check at this time, although I'm pretty sure it's bogus. We can
fix that when/if we change the return type of Element::document to a reference.
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::requestImageResource): Use document instead of ownerDocument.

Source/WebKit2:

* WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
(WebKit::PDFPluginChoiceAnnotation::createAnnotationElement): Use document instead of
ownerDocument.
* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
(WebKit::PDFPluginTextAnnotation::createAnnotationElement): Ditto.

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

6 years agoUnreviewed gardening after r154135
seokju@webkit.org [Mon, 19 Aug 2013 06:37:09 +0000 (06:37 +0000)]
Unreviewed gardening after r154135

fast/js/array-sort-modifying-tostring.html was removed.

* platform/qt-mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

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

6 years ago<https://webkit.org/b/119993> Remove most remaining platform-specific code from Clipb...
darin@apple.com [Mon, 19 Aug 2013 05:25:07 +0000 (05:25 +0000)]
<https://webkit.org/b/119993> Remove most remaining platform-specific code from Clipboard class

Reviewed by Sam Weinig.

* GNUmakefile.list.am: Removed ClipboardGtk.cpp.
* PlatformEfl.cmake: Removed ClipboardEfl.cpp.
* PlatformGTK.cmake: Removed ClipboardGtk.cpp.
* PlatformWinCE.cmake: Removed ClipboardWin.cpp.
* Target.pri: Removed ClipboardQt.cpp.
* WebCore.vcxproj/WebCore.vcxproj: Removed ClipboardWin.cpp and ClipboardWin.h.
* WebCore.vcxproj/WebCore.vcxproj.filters: Removed ClipboardWin.cpp and ClipboardWin.h.

* dom/Clipboard.cpp:
(WebCore::Clipboard::createDragImage): Added. Version that works for all platforms
other than Mac, identical to the old one used in GTK and Qt, and close to the one used
on Windows.

* platform/mac/ClipboardMac.mm: Trimmed includes down, and added a FIXME about next steps.

* platform/qt/DataTransferItemListQt.h: Removed "friend class ClipboardQt", which refers
to a now-nonexistent class.

* platform/efl/ClipboardEfl.cpp: Removed.
* platform/gtk/ClipboardGtk.cpp: Removed.
* platform/qt/ClipboardQt.cpp: Removed.
* platform/win/ClipboardWin.cpp: Removed.

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

6 years agoREGRESSION(r154218): DFG::FixupPhase no longer turns GetById's child1 into CellUse
fpizlo@apple.com [Mon, 19 Aug 2013 04:46:41 +0000 (04:46 +0000)]
REGRESSION(r154218): DFG::FixupPhase no longer turns GetById's child1 into CellUse
https://bugs.webkit.org/show_bug.cgi?id=119961

Reviewed by Mark Hahnenberg.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):

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

6 years ago<https://webkit.org/b/119949> Factor Clipboard into drag and non-drag parts
darin@apple.com [Mon, 19 Aug 2013 04:18:31 +0000 (04:18 +0000)]
<https://webkit.org/b/119949> Factor Clipboard into drag and non-drag parts

Reviewed by Sam Weinig.

* dom/Clipboard.cpp:
(WebCore::Clipboard::Clipboard): Move the ClipboardType argument to go after the pasteboard.
Initialize strings more efficiently. Put drag-specific data members inside an if statement.
Replace m_clipboardType with m_forDrag.
(WebCore::Clipboard::createForCopyAndPaste): Moved function up to be close to constructor.
Removed explicit clipboard type since constructor now defaults to copy and paste style.
(WebCore::Clipboard::setAccessPolicy): Tweaked comment.
(WebCore::Clipboard::getData): Put drag-specific code inside #if ENABLE(DRAG_SUPPORT).
(WebCore::Clipboard::setData): Ditto.
(WebCore::Clipboard::files): Ditto.
(WebCore::Clipboard::dropEffect): Added trivial non-drag versions of these functions to
be used when !ENABLE(DRAG_SUPPORT).
(WebCore::Clipboard::setDropEffect): Ditto.
(WebCore::Clipboard::effectAllowed): Ditto.
(WebCore::Clipboard::setEffectAllowed): Ditto.
(WebCore::Clipboard::createForDragAndDrop): Renamed Clipboard::create that takes DragData
to this, and kep the overload that does not as well. Made the DragData argument a const&.
(WebCore::Clipboard::canSetDragImage): Moved down here since it is drag-specific.
(WebCore::Clipboard::updateDragImage): Use m_shouldUpdateDragImage directly insted of
calling a dragStarted function.
(WebCore::dragOpFromIEOp): Moved this function down here to the drag-specific section.
(WebCore::IEOpFromDragOp): Ditto.
(WebCore::Clipboard::sourceOperation): Ditto.
(WebCore::Clipboard::destinationOperation): Ditto.
(WebCore::Clipboard::setSourceOperation): Ditto.
(WebCore::Clipboard::setDestinationOperation): Ditto.

* dom/Clipboard.h: Removed unneeded include of "Node.h" and added and removed forward
class declarations as required. Removed non-helpful comment. Made ClipboardType a private
implementation detail. Moved functions that are not part of the DOM API down to a separate
section lower down in the class, and sorted the functions to match the order they appear
in the IDL file. Removed isForCopyAndPaste and isForDragAndDrop. Changed dropEffect and
effectAllowed to not be inlined. Moved the long comment before canSetDragImage into the
implementation since it's an implementation detail. Since this class is no longer polymorphic,
use only private, not protected. Make m_dragImageElement an Element, not a Node.

* dom/Clipboard.idl: Removed flags to tell bindings how to deal with null strings, since
these string properties can never return null strings anyway.

* page/DragController.cpp:
(WebCore::DragController::dragExited): Updated to call the new createForDragAndDrop function.
(WebCore::DragController::performDrag): Ditto.
(WebCore::DragController::tryDHTMLDrag): Ditto.

* platform/mac/ClipboardMac.mm: Added now-needed include of Element.h since Clipboard.h no
longer includes it.

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

6 years agoWebCore fails to build with trunk clang: error: 'register' storage class specifier...
ddkilzer@apple.com [Mon, 19 Aug 2013 03:05:22 +0000 (03:05 +0000)]
WebCore fails to build with trunk clang: error: 'register' storage class specifier is deprecated [-Werror,-Wdeprecated-register]
<http://webkit.org/b/119932>
<rdar://problem/14764085>

Reviewed by Darin Adler.

Add pragma statements to ignore -Wdeprecated-register warnings
in generated code.  Also ignore -Wunknown-pragmas so this
doesn't cause a build failure in older versions of clang.

* css/makeprop.pl:
(WebCore::findProperty): Remove register hints from parameters.
* css/makevalues.pl:
(WebCore::findValue): Ditto.
* platform/ColorData.gperf:
(WebCore::findColor): Ditto.

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

6 years agoUnreviewed gardening.
seokju@webkit.org [Sun, 18 Aug 2013 23:56:56 +0000 (23:56 +0000)]
Unreviewed gardening.

* platform/efl/TestExpectations: fast/js/array-sort-modifying-tostring.html was removed after r154135.

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

6 years ago<https://webkit.org/b/119987> Make Element::attach standalone function
antti@apple.com [Sun, 18 Aug 2013 23:26:41 +0000 (23:26 +0000)]
<https://webkit.org/b/119987> Make Element::attach standalone function

Reviewed by Andreas Kling.

This patch turns Element::attach() and the related functions into standalone functions.

* dom/ContainerNode.cpp:
(WebCore::attachChild):
(WebCore::detachChild):
* dom/ContainerNode.h:
* dom/Document.cpp:
(WebCore::Document::attach):
(WebCore::Document::detach):
* dom/Element.cpp:
(WebCore::Element::~Element):
(WebCore::Element::lazyReattach):
(WebCore::Element::removeShadowRoot):

    Shadow root should be detached by now. Remove the detach call.

(WebCore::Element::updateFocusAppearanceAfterAttachIfNeeded):
(WebCore::Element::updatePseudoElement):
(WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
(WebCore::Element::clearHoverAndActiveStatusBeforeDetachingRenderer):

    Factor some parts of former Element::attach/detach() into member functions.

* dom/Element.h:
* dom/ElementRareData.h:
(WebCore::ElementRareData::releasePseudoElement):
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::NodeRenderingContext):
* dom/NodeRenderingContext.h:
* dom/ShadowRoot.cpp:
* dom/ShadowRoot.h:
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::parseAttribute):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::parseAttribute):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::renderFallbackContent):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::willRecalcStyle):
(WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::parseAttribute):
(WebCore::HTMLSelectElement::parseMultipleAttribute):
* html/HTMLViewSourceDocument.cpp:
(WebCore::HTMLViewSourceDocument::createContainingTable):
(WebCore::HTMLViewSourceDocument::addSpanWithClassName):
(WebCore::HTMLViewSourceDocument::addLine):
(WebCore::HTMLViewSourceDocument::finishLine):
(WebCore::HTMLViewSourceDocument::addBase):
(WebCore::HTMLViewSourceDocument::addLink):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::executeTask):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::willAttachRenderers):
(WebCore::InsertionPoint::willDetachRenderers):
* loader/PlaceholderDocument.cpp:
(WebCore::PlaceholderDocument::attach):
* style/StyleResolveTree.cpp:
(WebCore::Style::createRendererIfNeeded):

    From Element::createRendererIfNeeded()

(WebCore::Style::attachShadowRoot):

    From ShadowRoot::attach()

(WebCore::Style::childAttachedAllowedWhenAttachingChildren):
(WebCore::Style::attachChildren):

    From Element::attachChildren()

(WebCore::Style::attachRenderTree):

    From Element::attach()

(WebCore::Style::detachShadowRoot):

    From ShadowRoot::detach()

(WebCore::Style::detachChildren):

    From Element::detachChildren()

(WebCore::Style::detachRenderTree):

    From Element::deatach()

(WebCore::Style::reattachRenderTree):

     From Element::reattach()

(WebCore::Style::resolveLocal):
* style/StyleResolveTree.h:
(WebCore::Style::AttachContext::AttachContext):

    From Element::AttachContext

* svg/SVGTests.cpp:
(WebCore::SVGTests::handleAttributeChange):
* xml/XMLErrors.cpp:
(WebCore::XMLErrors::insertErrorMessageBlock):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::startElementNs):

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

6 years agoFix clean engineering builds after r154251.
mitz@apple.com [Sun, 18 Aug 2013 23:06:41 +0000 (23:06 +0000)]
Fix clean engineering builds after r154251.

* WebKit2.xcodeproj/project.pbxproj: Removed references to the OfflineStorage XPC services
from the “Copy XPC services for engineering builds” build phase.

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

6 years agoFix crashing plugin tests caused by a logic error in the previous patch.
antti@apple.com [Sun, 18 Aug 2013 23:05:35 +0000 (23:05 +0000)]
Fix crashing plugin tests caused by a logic error in the previous patch.

Not reviewed.

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::willDetachRenderers):

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

6 years ago<https://webkit.org/b/119982> Make Element::attach non-virtual
antti@apple.com [Sun, 18 Aug 2013 20:01:20 +0000 (20:01 +0000)]
<https://webkit.org/b/119982> Make Element::attach non-virtual

Reviewed by Andreas Kling.

This will give us more future refactoring options.

* dom/Element.cpp:
(WebCore::Element::attach):
(WebCore::Element::detach):

    Make non-virtual. Call element type specific custom functions as needed.

(WebCore::Element::styleForRenderer):
(WebCore::Element::willRecalcStyle):
(WebCore::Element::didRecalcStyle):
(WebCore::Element::willAttachRenderers):
(WebCore::Element::didAttachRenderers):
(WebCore::Element::willDetachRenderers):
(WebCore::Element::didDetachRenderers):

    Add virtual custom callbacks.

(WebCore::Element::customStyleForRenderer):
* dom/Element.h:
* dom/Node.h:
(WebCore::Node::pseudoId):
(WebCore::Node::hasCustomStyleResolveCallbacks):
(WebCore::Node::setHasCustomStyleResolveCallbacks):

    Use the existing bit as it largely overlaps. Rename for clarity.

(WebCore::Node::customPseudoId):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::PseudoElement):
(WebCore::PseudoElement::didAttachRenderers):
* dom/PseudoElement.h:
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::HTMLCanvasElement):
(WebCore::HTMLCanvasElement::willAttachRenderers):
* html/HTMLCanvasElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::HTMLFormControlElement):
(WebCore::HTMLFormControlElement::didAttachRenderers):
* html/HTMLFormControlElement.h:
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::HTMLFrameElement):
(WebCore::HTMLFrameElement::didAttachRenderers):
* html/HTMLFrameElement.h:
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
(WebCore::HTMLFrameElementBase::didAttachRenderers):
* html/HTMLFrameElementBase.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
(WebCore::HTMLFrameSetElement::willAttachRenderers):
* html/HTMLFrameSetElement.h:
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::HTMLIFrameElement):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::didAttachRenderers):
* html/HTMLImageElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::HTMLInputElement):
(WebCore::HTMLInputElement::willAttachRenderers):
(WebCore::HTMLInputElement::didAttachRenderers):
(WebCore::HTMLInputElement::didDetachRenderers):
* html/HTMLInputElement.h:
* html/HTMLLIElement.cpp:
(WebCore::HTMLLIElement::HTMLLIElement):
(WebCore::HTMLLIElement::didAttachRenderers):
* html/HTMLLIElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::willAttachRenderers):
(WebCore::HTMLMediaElement::didAttachRenderers):
* html/HTMLMediaElement.h:
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::HTMLOptGroupElement):
(WebCore::HTMLOptGroupElement::didAttachRenderers):
(WebCore::HTMLOptGroupElement::willDetachRenderers):
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::HTMLOptionElement):
(WebCore::HTMLOptionElement::didAttachRenderers):
(WebCore::HTMLOptionElement::willDetachRenderers):
* html/HTMLOptionElement.h:
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::HTMLPlugInElement):
(WebCore::HTMLPlugInElement::willDetachRenderers):
* html/HTMLPlugInElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
(WebCore::HTMLPlugInImageElement::didAttachRenderers):
(WebCore::HTMLPlugInImageElement::willDetachRenderers):
* html/HTMLPlugInImageElement.h:
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::HTMLProgressElement):
(WebCore::HTMLProgressElement::didAttachRenderers):
* html/HTMLProgressElement.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
(WebCore::HTMLTextAreaElement::didAttachRenderers):
* html/HTMLTextAreaElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::HTMLVideoElement):
(WebCore::HTMLVideoElement::didAttachRenderers):
* html/HTMLVideoElement.h:
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::InsertionPoint):
(WebCore::InsertionPoint::willAttachRenderers):
(WebCore::InsertionPoint::willDetachRenderers):
* html/shadow/InsertionPoint.h:
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::SliderThumbElement):
(WebCore::SliderThumbElement::willDetachRenderers):
* html/shadow/SliderThumbElement.h:
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::SpinButtonElement):
(WebCore::SpinButtonElement::willDetachRenderers):
* html/shadow/SpinButtonElement.h:
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerElement::TextControlInnerElement):
(WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
(WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
(WebCore::SearchFieldCancelButtonElement::willDetachRenderers):
(WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
(WebCore::InputFieldSpeechButtonElement::willAttachRenderers):
(WebCore::InputFieldSpeechButtonElement::willDetachRenderers):
* html/shadow/TextControlInnerElements.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree):
* svg/SVGElement.cpp:
(WebCore::SVGElement::SVGElement):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::SVGImageElement):
(WebCore::SVGImageElement::didAttachRenderers):
* svg/SVGImageElement.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::SVGUseElement):

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

6 years agohttps://bugs.webkit.org/show_bug.cgi?id=119972
barraclough@apple.com [Sun, 18 Aug 2013 19:29:15 +0000 (19:29 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=119972
Add attributes field to PropertySlot

Reviewed by Geoff Garen.

For all JSC types, this makes getOwnPropertyDescriptor redundant.
There will be a bit more hacking required in WebCore to remove GOPD whilst maintaining current behaviour.
(Current behaviour is in many ways broken, particularly in that GOPD & GOPS are inconsistent, but we should fix incrementally).

Source/JavaScriptCore:

No performance impact.

* runtime/PropertySlot.h:
(JSC::PropertySlot::setValue):
(JSC::PropertySlot::setCustom):
(JSC::PropertySlot::setCacheableCustom):
(JSC::PropertySlot::setCustomIndex):
(JSC::PropertySlot::setGetterSlot):
(JSC::PropertySlot::setCacheableGetterSlot):
    - These mathods now all require 'attributes'.
* runtime/JSObject.h:
(JSC::JSObject::getDirect):
(JSC::JSObject::getDirectOffset):
(JSC::JSObject::inlineGetOwnPropertySlot):
    - Added variants of getDirect, getDirectOffset that return the attributes.
* API/JSCallbackObjectFunctions.h:
(JSC::::getOwnPropertySlot):
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlotByIndex):
(JSC::Arguments::getOwnPropertySlot):
* runtime/JSActivation.cpp:
(JSC::JSActivation::symbolTableGet):
(JSC::JSActivation::getOwnPropertySlot):
* runtime/JSArray.cpp:
(JSC::JSArray::getOwnPropertySlot):
* runtime/JSArrayBuffer.cpp:
(JSC::JSArrayBuffer::getOwnPropertySlot):
* runtime/JSArrayBufferView.cpp:
(JSC::JSArrayBufferView::getOwnPropertySlot):
* runtime/JSDataView.cpp:
(JSC::JSDataView::getOwnPropertySlot):
* runtime/JSFunction.cpp:
(JSC::JSFunction::getOwnPropertySlot):
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::::getOwnPropertySlot):
(JSC::::getOwnPropertySlotByIndex):
* runtime/JSObject.cpp:
(JSC::JSObject::getOwnPropertySlotByIndex):
(JSC::JSObject::fillGetterPropertySlot):
* runtime/JSString.h:
(JSC::JSString::getStringPropertySlot):
* runtime/JSSymbolTableObject.h:
(JSC::symbolTableGet):
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/Lookup.h:
(JSC::getStaticPropertySlot):
(JSC::getStaticPropertyDescriptor):
(JSC::getStaticValueSlot):
(JSC::getStaticValueDescriptor):
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::getOwnPropertySlot):
* runtime/SparseArrayValueMap.cpp:
(JSC::SparseArrayEntry::get):
    - Pass attributes to PropertySlot::set* methods.

Source/WebCore:

* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::getOwnPropertySlotDelegate):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
(WebCore::JSDOMWindow::getOwnPropertyDescriptor):
* bindings/js/JSHistoryCustom.cpp:
(WebCore::JSHistory::getOwnPropertySlotDelegate):
(WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::getOwnPropertySlotDelegate):
(WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
* bindings/js/JSPluginElementFunctions.cpp:
(WebCore::runtimeObjectCustomGetOwnPropertySlot):
(WebCore::runtimeObjectCustomGetOwnPropertyDescriptor):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotBody):
(GenerateGetOwnPropertyDescriptorBody):
(GenerateImplementation):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::getOwnPropertySlot):
(JSC::RuntimeArray::getOwnPropertyDescriptor):
(JSC::RuntimeArray::getOwnPropertySlotByIndex):
* bridge/runtime_method.cpp:
(JSC::RuntimeMethod::getOwnPropertySlot):
(JSC::RuntimeMethod::getOwnPropertyDescriptor):
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::getOwnPropertySlot):
(JSC::Bindings::RuntimeObject::getOwnPropertyDescriptor):
    - Pass attributes to PropertySlot::set* methods.

Source/WebKit2:

* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::getOwnPropertySlot):
(WebKit::JSNPObject::getOwnPropertyDescriptor):
    - Pass attributes to PropertySlot::set* methods.

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

6 years ago<https://webkit.org/b/119917> Pasting multiple lines into a textarea can introduce...
rniwa@webkit.org [Sun, 18 Aug 2013 18:54:12 +0000 (18:54 +0000)]
<https://webkit.org/b/119917> Pasting multiple lines into a textarea can introduce extra new lines

Reviewed by Darin Adler.

Source/WebCore:

Inspired by https://chromium.googlesource.com/chromium/blink/+/6152a12f7ace27beea4d284ff8416631e8aa5217.

The bug was caused by createFragmentFromText's falsely assuming that the newline were not preserved
if the first node's renderer didn't exist.

Fixed the bug by obtaining the renderer of the container of the first visible position in the context.

Test: editing/pasteboard/paste-into-textarea-with-new-line.html

* editing/markup.cpp:
(WebCore::contextPreservesNewline):
(WebCore::createFragmentFromText):

LayoutTests:

Add a regression test.

* editing/pasteboard/paste-into-textarea-with-new-line-expected.txt: Added.
* editing/pasteboard/paste-into-textarea-with-new-line.html: Added.

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

6 years ago<https://webkit.org/b/119911> Remove the unused OfflineStorageProcess
weinig@apple.com [Sun, 18 Aug 2013 18:44:21 +0000 (18:44 +0000)]
<https://webkit.org/b/119911> Remove the unused OfflineStorageProcess

Reviewed by Darin Adler.

* Configurations/OfflineStorageProcess.xcconfig: Removed.
* Configurations/OfflineStorageService.Development.xcconfig: Removed.
* Configurations/OfflineStorageService.xcconfig: Removed.
* DerivedSources.make:
* OfflineStorageProcess: Removed.
* OfflineStorageProcess/EntryPoint: Removed.
* OfflineStorageProcess/EntryPoint/mac: Removed.
* OfflineStorageProcess/EntryPoint/mac/LegacyProcess: Removed.
* OfflineStorageProcess/EntryPoint/mac/LegacyProcess/Info.plist: Removed.
* OfflineStorageProcess/EntryPoint/mac/LegacyProcess/OfflineStorageProcessMain.mm: Removed.
* OfflineStorageProcess/EntryPoint/mac/XPCService: Removed.
* OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService: Removed.
* OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService.Development: Removed.
* OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService.Development/Info.plist: Removed.
* OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService/Info.plist: Removed.
* OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageServiceEntryPoint.mm: Removed.
* OfflineStorageProcess/OfflineStorageProcess.cpp: Removed.
* OfflineStorageProcess/OfflineStorageProcess.h: Removed.
* OfflineStorageProcess/OfflineStorageProcess.messages.in: Removed.
* OfflineStorageProcess/mac: Removed.
* OfflineStorageProcess/mac/OfflineStorageProcessMac.mm: Removed.
* OfflineStorageProcess/mac/com.apple.WebKit.OfflineStorage.sb: Removed.
* Scripts/webkit2/messages.py:
* Shared/OfflineStorage: Removed.
* Shared/OfflineStorage/OfflineStorageProcessCreationParameters.cpp: Removed.
* Shared/OfflineStorage/OfflineStorageProcessCreationParameters.h: Removed.
* WebKit2.xcodeproj/project.pbxproj:
Remove.

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

6 years ago<https://webkit.org/b/119983> Add two missing RefPtr::release() in HTMLLinkElement.
akling@apple.com [Sun, 18 Aug 2013 17:15:11 +0000 (17:15 +0000)]
<https://webkit.org/b/119983> Add two missing RefPtr::release() in HTMLLinkElement.

Reviewed by Antti Koivisto.

* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::setCSSStyleSheet):

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

6 years ago<https://webkit.org/b/119981> Move ElementData & co to their own files.
akling@apple.com [Sun, 18 Aug 2013 16:01:28 +0000 (16:01 +0000)]
<https://webkit.org/b/119981> Move ElementData & co to their own files.

Reviewed by Antti Koivisto.

I like to move it move it.

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

6 years agoBUILD FIX (r153990): Add UNUSED_PARAM for heightChanged when CSS_SHAPES is disabled
ddkilzer@apple.com [Sun, 18 Aug 2013 14:39:43 +0000 (14:39 +0000)]
BUILD FIX (r153990): Add UNUSED_PARAM for heightChanged when CSS_SHAPES is disabled

Fixes the following build failure:

    WebCore/rendering/RenderBlock.cpp:1529:53: error: unused parameter 'heightChanged' [-Werror,-Wunused-parameter]
    void RenderBlock::updateShapesAfterBlockLayout(bool heightChanged)
                                                        ^
    1 error generated.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateShapesAfterBlockLayout): Add
UNUSED_PARAM(heightChanged) when CSS_SHAPES is disabled.

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

6 years ago[EFL] minor method name fix for the textTrackOffMenuItemText method
commit-queue@webkit.org [Sun, 18 Aug 2013 14:16:05 +0000 (14:16 +0000)]
[EFL] minor method name fix for the textTrackOffMenuItemText method
https://bugs.webkit.org/show_bug.cgi?id=119978

the method textTrackOffMenuItemText was renamed in
https://bugs.webkit.org/show_bug.cgi?id=113822

Patch by Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk> on 2013-08-18
Reviewed by Christophe Dumez.

* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::textTrackOffMenuItemText):

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

6 years ago<https://webkit.org/b/119963> Use TextNodeTraversal for getting sheet text in StyleEl...
antti@apple.com [Sun, 18 Aug 2013 11:06:35 +0000 (11:06 +0000)]
<https://webkit.org/b/119963> Use TextNodeTraversal for getting sheet text in StyleElement

Reviewed by Andreas Kling.

As a follow-up, mark as crashing a test that is now expected to crash in controlled manner (CRASH()).

Note that the test only ever passed because the amount of data was huge enough (>4GB) for it to take
the special do-nothing code path. With slightly less data the test would hit CRASH() in fastRealloc() like
it does now.

* TestExpectations:

    Mark fast/css/giant-stylesheet-crash.html as crashing.

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

6 years ago<https://webkit.org/b/119919> Concurrent JIT crashes in various fast/js/dfg-* tests...
mhahnenberg@apple.com [Sun, 18 Aug 2013 03:08:52 +0000 (03:08 +0000)]
<https://webkit.org/b/119919> Concurrent JIT crashes in various fast/js/dfg-* tests while the main thread is setting innerHTML

Reviewed by Filip Pizlo.

Added a new mode for DesiredWriteBarrier that allows it to track a position in a
Vector of WriteBarriers rather than the specific address. The fact that we were
arbitrarily storing into a Vector's backing store for constants at the end of
compilation after the Vector could have resized was causing crashes.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::constants):
(JSC::CodeBlock::addConstantLazily):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::addConstant):
* dfg/DFGDesiredWriteBarriers.cpp:
(JSC::DFG::DesiredWriteBarrier::DesiredWriteBarrier):
(JSC::DFG::DesiredWriteBarrier::trigger):
(JSC::DFG::initializeLazyWriteBarrierForConstant):
* dfg/DFGDesiredWriteBarriers.h:
(JSC::DFG::DesiredWriteBarriers::add):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::truncateConstantToInt32):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::constantRegisterForConstant):

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

6 years ago<https://webkit.org/b/119963> Use TextNodeTraversal for getting sheet text in StyleEl...
antti@apple.com [Sat, 17 Aug 2013 22:46:16 +0000 (22:46 +0000)]
<https://webkit.org/b/119963> Use TextNodeTraversal for getting sheet text in StyleElement

Reviewed by Andreas Kling.

* dom/StyleElement.cpp:
(WebCore::StyleElement::process):

    Use TextNodeTraversal::contentsAsString for the sheet text. The overflow check is removed as StringBuilder
    (which is used by contentsAsString) does that itself. The behavior in case of overflow changes from empty
    sheet to CRASH(). Thats what we do elsewhere in similar situations too (scripts for example). Continuing
    with > 4GB of style sheet text nodes is probably not going to go well anyway.

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

6 years ago<https://webkit.org/b/119960> Remove some optimizations made obsolete by use of Strin...
antti@apple.com [Sat, 17 Aug 2013 22:05:27 +0000 (22:05 +0000)]
<https://webkit.org/b/119960> Remove some optimizations made obsolete by use of StringBuilder

Reviewed by Andreas Kling.

* dom/ScriptElement.cpp:
(WebCore::ScriptElement::scriptContent):

    StringBuilder already optimizes for the single string case. If there is only one the original string is returned.

* dom/Text.cpp:
(WebCore::Text::wholeText):

    No need to traverse twice to compute the capacity. StringBuilder handles this efficiently.
    Also in the common case there is only one string and the optimization here is actually hurting by disabling the StringBuilder one.

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

6 years ago<https://webkit.org/b/119959> Add TextNodeTraversal
antti@apple.com [Sat, 17 Aug 2013 21:33:23 +0000 (21:33 +0000)]
<https://webkit.org/b/119959> Add TextNodeTraversal

Reviewed by Andreas Kling.

Add TextNodeTraversal for cleaner and more compact traversal of Text nodes.

Use it where appropriate.

* WebCore.xcodeproj/project.pbxproj:
* dom/Attr.cpp:
(WebCore::Attr::childrenChanged):
* dom/NodeTraversal.h:
(WebCore::NodeTraversal::next):
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::scriptContent):
* dom/Text.cpp:
(WebCore::Text::wholeText):
* dom/Text.h:
(WebCore::toText):
* dom/TextNodeTraversal.cpp: Added.
(WebCore::TextNodeTraversal::appendContents):
(WebCore::TextNodeTraversal::contentsAsString):

    Helpers for getting text content of a subtree.

* dom/TextNodeTraversal.h: Added.
(WebCore::TextNodeTraversal::firstTextChildTemplate):
(WebCore::TextNodeTraversal::firstChild):
(WebCore::TextNodeTraversal::firstTextWithinTemplate):
(WebCore::TextNodeTraversal::firstWithin):
(WebCore::TextNodeTraversal::traverseNextTextTemplate):
(WebCore::TextNodeTraversal::next):
(WebCore::TextNodeTraversal::nextSibling):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::joinChildTextNodes):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::defaultValue):
(WebCore::HTMLTextAreaElement::setDefaultValue):
* html/HTMLTitleElement.cpp:
(WebCore::HTMLTitleElement::text):
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::determineTextDirection):
* page/Frame.cpp:
(WebCore::Frame::searchForLabelsAboveCell):
* xml/XPathUtil.cpp:
(WebCore::XPath::stringValue):

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

6 years ago<https://webkit.org/b/119957> Page::contextMenuController() should return a reference.
akling@apple.com [Sat, 17 Aug 2013 19:46:45 +0000 (19:46 +0000)]
<https://webkit.org/b/119957> Page::contextMenuController() should return a reference.

Reviewed by Antti Koivisto.

Page::m_contextMenuController is never null.

* page/Page.h:
(WebCore::Page::contextMenuController):

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

6 years ago<https://webkit.org/b/119954> Page::dragCaretController() should return a reference.
akling@apple.com [Sat, 17 Aug 2013 18:05:04 +0000 (18:05 +0000)]
<https://webkit.org/b/119954> Page::dragCaretController() should return a reference.

Reviewed by Antti Koivisto.

Page::m_dragCaretController is never null.

* dom/Document.cpp:
(WebCore::Document::nodeChildrenWillBeRemoved):
(WebCore::Document::nodeWillBeRemoved):
* page/DragController.cpp:
(WebCore::DragController::cancelDrag):
(WebCore::DragController::dragEnded):
(WebCore::DragController::tryDocumentDrag):
(WebCore::DragController::dispatchTextInputEventFor):
(WebCore::DragController::concludeEditDrag):
(WebCore::DragController::placeDragCaret):
* page/Page.h:
(WebCore::Page::dragCaretController):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintCaret):

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

6 years ago<https://webkit.org/b/119952> Simplify Editor's back-pointer to the Frame.
akling@apple.com [Sat, 17 Aug 2013 17:29:37 +0000 (17:29 +0000)]
<https://webkit.org/b/119952> Simplify Editor's back-pointer to the Frame.

Reviewed by Antti Koivisto.

Remove Editor's inheritance from FrameDestructionObserver. Editor is owned by Frame and
has no interest in observing frame destruction since its own destruction will soon follow.

Editor::m_frame is now a reference instead of a pointer. Removed some null checking.

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

6 years ago<https://webkit.org/b/119944> The fast/dom/gc-10.html layout test should dump text...
zandobersek@gmail.com [Sat, 17 Aug 2013 17:23:34 +0000 (17:23 +0000)]
<https://webkit.org/b/119944> The fast/dom/gc-10.html layout test should dump text instead of render tree

Reviewed by Darin Adler.

The fast/dom/gc-10.html layout test is unnecessarily dumping the render tree and the pixel output.
Dumping the text output is sufficient enough for this test.

* fast/dom/gc-10-expected.txt: Added.
* fast/dom/gc-10.html:
* platform/efl/fast/dom/gc-10-expected.png: Removed.
* platform/efl/fast/dom/gc-10-expected.txt: Removed.
* platform/gtk/fast/dom/gc-10-expected.txt: Removed.
* platform/mac/fast/dom/gc-10-expected.png: Removed.
* platform/mac/fast/dom/gc-10-expected.txt: Removed.
* platform/qt-5.0-wk2/fast/dom/gc-10-expected.png: Removed.
* platform/qt/fast/dom/gc-10-expected.png: Removed.
* platform/qt/fast/dom/gc-10-expected.txt: Removed.

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

6 years ago<https://webkit.org/b/119950> Remove unused EditorClient::frameWillDetachPage() callback.
akling@apple.com [Sat, 17 Aug 2013 16:58:14 +0000 (16:58 +0000)]
<https://webkit.org/b/119950> Remove unused EditorClient::frameWillDetachPage() callback.

Reviewed by Antti Koivisto.

This callback was only used by the Chromium port.

* editing/Editor.h:
* editing/Editor.cpp:

    Remove override of FrameDestructionObserver::willDetachPage().

* page/EditorClient.h:

    Remove frameWillDetachPage(). This is repeated in every EditorClient subclass.

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

6 years ago[Windows] Unreviewed build fix.
akling@apple.com [Sat, 17 Aug 2013 16:36:15 +0000 (16:36 +0000)]
[Windows] Unreviewed build fix.

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

    Don't export Frame::settings() as it's an inline method now.

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

6 years agoWindows build fix after r154219.
akling@apple.com [Sat, 17 Aug 2013 16:12:33 +0000 (16:12 +0000)]
Windows build fix after r154219.

* WebFrame.cpp:
(WebFrame::dispatchDidClearWindowObjectInWorld):

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

6 years ago<https://webkit.org/b/119886> PseudoElement is abusing parent node pointer
antti@apple.com [Sat, 17 Aug 2013 15:43:24 +0000 (15:43 +0000)]
<https://webkit.org/b/119886> PseudoElement is abusing parent node pointer

Reviewed by Darin Adler.

PseudoElement sets its host node as its parent. This is confusing and wrong as it breaks
the basic tree consistency (a node is a child node of its parent node).

This patch adds an explicit host pointer PseudoElement and switches the call sites over. Memory
impact is negligible as there are not that many ::befores and ::afters.

* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeWalker::traverseParent):
* dom/EventPathWalker.cpp:
(WebCore::EventPathWalker::moveToParent):
* dom/EventRetargeter.h:
(WebCore::EventRetargeter::eventTargetRespectingTargetRules):
* dom/Node.cpp:
(WebCore::Node::~Node):

    Add consistency assertions. Remove unnecessary clearing of sibling pointers. They should be cleared already.

(WebCore::Node::markAncestorsWithChildNeedsStyleRecalc):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::PseudoElement):
(WebCore::PseudoElement::customStyleForRenderer):
* dom/PseudoElement.h:
(WebCore::toPseudoElement):

    Add casting functions.

* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::setInnerNode):
(WebCore::HitTestResult::setInnerNonSharedNode):

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

6 years ago<https://webkit.org/b/119948> Change drag-specific clipboard writing in DragControlle...
darin@apple.com [Sat, 17 Aug 2013 15:32:51 +0000 (15:32 +0000)]
<https://webkit.org/b/119948> Change drag-specific clipboard writing in DragController to go straight to Pasteboard, not forward through Clipboard

Reviewed by Andreas Kling.

* dom/Clipboard.cpp: Removed writeRange, writePlainText, and writeURL functions.
All three are just unneeded forwarding to pasteboard.
* dom/Clipboard.h: Ditto.

* page/DragController.cpp:
(WebCore::DragController::startDrag): Move the logic in here. Later we might
want to straighten this out a bit, perhaps using functions in Editor, but it's
not much code so fine to just have it here for now.

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

6 years ago<https://webkit.org/b/119947> Remove LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS
darin@apple.com [Sat, 17 Aug 2013 15:21:00 +0000 (15:21 +0000)]
<https://webkit.org/b/119947> Remove LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS

Reviewed by Andreas Kling.

* dom/Clipboard.cpp:
(WebCore::Clipboard::Clipboard):
(WebCore::Clipboard::~Clipboard):
* dom/Clipboard.h:
Remove LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS, LEGACY_VIRTUAL, and LEGACY_PURE.
Keep only the !USE(LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS) side of all conditionals.

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

6 years ago<https://webkit.org/b/119946> Move some code used only by EventHandler from Clipboard...
darin@apple.com [Sat, 17 Aug 2013 14:56:48 +0000 (14:56 +0000)]
<https://webkit.org/b/119946> Move some code used only by EventHandler from Clipboard to EventHandler

Reviewed by Andreas Kling.

Later it would be good to move this all to DragController, but there is no reason to have
these functions as member functions of the DOM-exposed Clipboard class.

* dom/Clipboard.cpp: Deleted hasFileOfType, hasStringOfType, convertDropZoneOperationToDragOperation,
convertDragOperationToDropZoneOperation.
* dom/Clipboard.h: Ditto.

* page/EventHandler.cpp:
(WebCore::convertDropZoneOperationToDragOperation): Moved here.
(WebCore::convertDragOperationToDropZoneOperation): Moved here. Also changed to use ASCIILiteral.
(WebCore::hasFileOfType): Moved here and made a free function instead of a member function. Removed
canReadTypes check because Clipboard::files already takes care of that.
(WebCore::hasStringOfType): Moved here and made a free function instead of a member function.
Added a check for the null string because HashSet::contains will not work on a null string.
(WebCore::hasDropZoneType): Moved here and made a free function instead of a member function.
(WebCore::findDropZone): Call the hasDropZoneType function instead of Clipboard::hasDropZoneType.

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

6 years ago<https://webkit.org/b/119943> Clean up the Document class a bit
darin@apple.com [Sat, 17 Aug 2013 14:48:32 +0000 (14:48 +0000)]
<https://webkit.org/b/119943> Clean up the Document class a bit

Reviewed by Antti Koivisto.

* dom/Document.cpp:
(WebCore::Document::~Document): Fixed typo in comment.
(WebCore::Document::suggestedMIMEType): Use ASCIILiteral for literals.
Also name local variable just loader rather than documentLoader.
(WebCore::Document::updateTitle): Call loader rather than going indirectly
through frame to get to the loader.
(WebCore::Document::setTitleElement): Fixed formatting (add braces).
(WebCore::Document::removeTitle): Iterate elements instead of nodes.
(WebCore::Document::isPageBoxVisible): Use ensureStyleResolver to call
styleForPage to avoid the need for a simple forwarding function. Also
eliminated local variable to increase clarity.
(WebCore::Document::pageSizeAndMarginsInPixels): Use ensureStyleResolver
to call styleForPage to avoid the need for a simple forwarding function.
(WebCore::Document::setIsViewSource): Renamed a local variable.

* dom/Document.h: Removed unneeded childNeedsAndNotInStyleRecalc and
styleForPage functions.

* loader/FrameLoader.cpp: Removed unnneeded setTitle function.
* loader/FrameLoader.h: Ditto.

* page/PrintContext.cpp:
(WebCore::PrintContext::pageProperty): Use ensureStyleResolver to call
styleForPage to avoid the need for a simple forwarding function.

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

6 years ago<https://webkit.org/b/119939> Remove some unused clipboard and pasteboard code
darin@apple.com [Sat, 17 Aug 2013 14:41:40 +0000 (14:41 +0000)]
<https://webkit.org/b/119939> Remove some unused clipboard and pasteboard code

Reviewed by Andreas Kling.

* PlatformWinCE.cmake: Removed EditorWin.cpp.
* WebCore.vcxproj/WebCore.vcxproj: Removed EditorWin.cpp.
* WebCore.vcxproj/WebCore.vcxproj.filters: Removed EditorWin.cpp.
* WebCore.xcodeproj/project.pbxproj: Removed ClipboardIOS.h and
ClipboardIOS.mm, and also let Xcode edit/reorder this file.

* editing/Editor.cpp:
(WebCore::Editor::dispatchCPPEvent): Removed some LEGACY_STYLE_ABSTRACT_CLIPBOARD
class code. Will remove the rest later.

* editing/Editor.h: Removed declaration of newGeneralClipboard.

* platform/Pasteboard.h: Removed declaration of writeClipboard. Also updated a
comment to make it clearer.

* platform/blackberry/PasteboardBlackBerry.cpp: Removed Pasteboard::writeClipboard.
* platform/efl/PasteboardEfl.cpp: Ditto.
* platform/ios/PasteboardIOS.mm: Ditto.
* platform/win/PasteboardWin.cpp: Ditto.

* platform/ios/ClipboardIOS.h: Removed. Was an empty file.
* platform/ios/ClipboardIOS.mm: Removed. Was an empty file.
* platform/win/EditorWin.cpp: Removed. Had only newGeneralClipboard in the file,
a function that is never called.

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

6 years ago<https://webkit.org/b/119940> Rename Clipboard::m_dragLoc to m_dragLocation
darin@apple.com [Sat, 17 Aug 2013 14:39:44 +0000 (14:39 +0000)]
<https://webkit.org/b/119940> Rename Clipboard::m_dragLoc to m_dragLocation

Reviewed by Andreas Kling.

* dom/Clipboard.h: Removed unused dragLocation member function.
Renamed m_dragLoc to m_dragLocation.

* dom/Clipboard.cpp:
(WebCore::Clipboard::setDragImage):
* platform/gtk/ClipboardGtk.cpp:
(WebCore::Clipboard::createDragImage):
* platform/mac/ClipboardMac.mm:
(WebCore::Clipboard::createDragImage):
* platform/qt/ClipboardQt.cpp:
(WebCore::Clipboard::createDragImage):
* platform/win/ClipboardWin.cpp:
(WebCore::Clipboard::createDragImage):
Updated for new name.

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

6 years ago<https://webkit.org/b/119942> Remove unnecessary uses of Element::ownerDocument
darin@apple.com [Sat, 17 Aug 2013 14:37:25 +0000 (14:37 +0000)]
<https://webkit.org/b/119942> Remove unnecessary uses of Element::ownerDocument

Reviewed by Andreas Kling.

The Element::document is a simpler faster alternative to Element::ownerDocument.
The only behavior difference between the two is that ownerDocument returns 0 when
called on a Document.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::supportsFocus): Call document instead of ownerDocument.
(WebCore::HTMLMediaElement::mediaPlayerOwningDocument): Removed null checking of
document and call to ownerDocument, since ownerDocument will never return non-null
if document returns null.
(WebCore::HTMLMediaElement::mediaPlayerSawUnsupportedTracks): Call document instead
of ownerDocument.

* inspector/DOMEditor.cpp:
(WebCore::DOMEditor::SetOuterHTMLAction::perform): Call document instead of ownerDocument.

* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getMatchedStylesForNode): Call document instead of ownerDocument.
(WebCore::InspectorCSSAgent::forcePseudoState): Call document instead of ownerDocument.
(WebCore::InspectorCSSAgent::resetPseudoStates): Call document instead of ownerDocument.

* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setOuterHTML): Call document instead of expression that
does the same thing in a roundabout way.
(WebCore::InspectorDOMAgent::focusNode): Call document instead of ownerDocument.
(WebCore::InspectorDOMAgent::resolveNode): Call document instead of expression that
does the same thing in a roundabout way.

* page/DragController.cpp:
(WebCore::DragController::concludeEditDrag): Call document instead of ownerDocument.

* svg/SVGElementInstance.cpp:
(WebCore::SVGElementInstance::ownerDocument): Call document instead of ownerDocument.

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

6 years ago<https://webkit.org/b/119941> Make Page::dragController return a reference
darin@apple.com [Sat, 17 Aug 2013 14:27:20 +0000 (14:27 +0000)]
<https://webkit.org/b/119941> Make Page::dragController return a reference

Reviewed by Andreas Kling.

Source/WebCore:

* page/Page.h:
(WebCore::Page::dragController): Return a reference instead of a pointer.

* page/DragController.cpp:
(WebCore::DragController::concludeEditDrag):
* page/EventHandler.cpp:
(WebCore::EventHandler::eventMayStartDrag):
(WebCore::EventHandler::updateDragSourceActionsAllowed):
(WebCore::EventHandler::handleDrag):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::passSubframeEventToSubframe):
Updated call sites.

Source/WebKit/gtk:

* webkit/webkitwebview.cpp:
(dragExitedCallback):
(webkit_web_view_drag_motion):
(webkit_web_view_drag_data_received):
(webkit_web_view_drag_drop):
Updated call sites.

Source/WebKit/mac:

* WebView/WebFrameView.mm:
(-[WebFrameView _setDocumentView:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView draggingSourceOperationMaskForLocal:]):
(-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
* WebView/WebView.mm:
(-[WebView _setInitiatedDrag:]):
(-[WebView draggingEntered:]):
(-[WebView draggingUpdated:]):
(-[WebView draggingExited:]):
(-[WebView performDragOperation:]):
(-[WebView moveDragCaretToPoint:]):
(-[WebView removeDragCaret]):
Updated call sites.

Source/WebKit/qt:

* WebCoreSupport/DragClientQt.cpp:
(WebCore::DragClientQt::startDrag):
* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::dragEntered):
(QWebPageAdapter::dragLeaveEvent):
(QWebPageAdapter::dragUpdated):
(QWebPageAdapter::performDrag):
Updated call sites.

Source/WebKit/win:

* WebCoreSupport/WebDragClient.cpp:
(WebDragClient::startDrag):
* WebView.cpp:
(WebView::keyStateToDragOperation):
(WebView::DragEnter):
(WebView::DragOver):
(WebView::DragLeave):
(WebView::Drop):
Updated call sites.

Source/WebKit2:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction):
(WebKit::WebPage::dragEnded):
Updated call sites.

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

6 years agoANGLE fails to build with trunk clang: error: 'register' storage class specifier...
ddkilzer@apple.com [Sat, 17 Aug 2013 12:38:49 +0000 (12:38 +0000)]
ANGLE fails to build with trunk clang: error: 'register' storage class specifier is deprecated [-Werror,-Wdeprecated-register]
<http://webkit.org/b/119931>
<rdar://problem/14763822>

Reviewed by Darin Adler.

* src/compiler/glslang.l:
* src/compiler/glslang_lex.cpp:
* src/compiler/preprocessor/Tokenizer.cpp:
* src/compiler/preprocessor/Tokenizer.l:
Add pragma statements to ignore -Wdeprecated-register warnings
in generated code.  Also ignore -Wunknown-pragmas so this
doesn't cause a build failure in older versions of clang.

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

6 years agoWebKit2 fails to build with trunk clang: error: 'WebPluginSiteDataManagerh' is used...
ddkilzer@apple.com [Sat, 17 Aug 2013 12:37:03 +0000 (12:37 +0000)]
WebKit2 fails to build with trunk clang: error: 'WebPluginSiteDataManagerh' is used as a header guard here, followed by #define of a different macro [-Werror,-Wheader-guard]
<http://webkit.org/b/119935>
<rdar://problem/14764131>

Reviewed by Darin Adler.

* UIProcess/Plugins/WebPluginSiteDataManager.h: Fix typo
introduced in r78647.

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

6 years ago<https://webkit.org/b/119795> Propagate writing-mode from the first region to the...
commit-queue@webkit.org [Sat, 17 Aug 2013 12:31:39 +0000 (12:31 +0000)]
<https://webkit.org/b/119795> Propagate writing-mode from the first region to the flow thread

Patch by Morten Stenshorne <mstensho@opera.com> on 2013-08-17
Reviewed by Darin Adler.

Source/WebCore:

Since the flow thread is a direct child of RenderView, it doesn't inherit
proper writing-mode automatically. It should be mentioned that if the thread's
contents' writing-mode differs from that of the first region, things are
typically going to look useless (although perhaps that's how it should be),
but as long as writing-mode is only specified on a common parent of the
thread's contents and the regions, things look fine, and also, we're now
following what the spec has to say on the matter:

http://www.w3.org/TR/2013/WD-css3-regions-20130528/#the-flow-into-property

    "The first region defines the principal writing mode for the entire flow.
     The writing mode on subsequent regions is ignored."

This is a back-port of the fix for Blink bug 257965.
Reviewed by esprehn and mihnea there.
Blink review URL: https://chromiumcodereview.appspot.com/18374008

Tests: fast/regions/changing-writing-mode-2.html
       fast/regions/changing-writing-mode-3.html
       fast/regions/changing-writing-mode-4.html
       fast/regions/changing-writing-mode-5.html
       fast/regions/changing-writing-mode.html
       fast/regions/invalid-first-region-with-writing-mode-2.html
       fast/regions/invalid-first-region-with-writing-mode.html
       fast/regions/subtree-with-horiz-bt.html
       fast/regions/subtree-with-horiz-tb.html
       fast/regions/subtree-with-vert-lr.html
       fast/regions/subtree-with-vert-rl.html

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::styleDidChange):
* rendering/RenderFlowThread.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::updateWritingMode):
(WebCore::RenderNamedFlowThread::addRegionToNamedFlowThread):
(WebCore::RenderNamedFlowThread::removeRegionFromThread):
(WebCore::RenderNamedFlowThread::regionChangedWritingMode):
* rendering/RenderNamedFlowThread.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::styleDidChange):

LayoutTests:

* fast/regions/changing-writing-mode-2-expected.html: Added.
* fast/regions/changing-writing-mode-2.html: Added.
* fast/regions/changing-writing-mode-3-expected.html: Added.
* fast/regions/changing-writing-mode-3.html: Added.
* fast/regions/changing-writing-mode-4-expected.html: Added.
* fast/regions/changing-writing-mode-4.html: Added.
* fast/regions/changing-writing-mode-5-expected.html: Added.
* fast/regions/changing-writing-mode-5.html: Added.
* fast/regions/changing-writing-mode-expected.html: Added.
* fast/regions/changing-writing-mode.html: Added.
* fast/regions/invalid-first-region-with-writing-mode-2-expected.html: Added.
* fast/regions/invalid-first-region-with-writing-mode-2.html: Added.
* fast/regions/invalid-first-region-with-writing-mode-expected.html: Added.
* fast/regions/invalid-first-region-with-writing-mode.html: Added.
* fast/regions/subtree-with-horiz-bt-expected.html: Added.
* fast/regions/subtree-with-horiz-bt.html: Added.
* fast/regions/subtree-with-horiz-tb-expected.html: Added.
* fast/regions/subtree-with-horiz-tb.html: Added.
* fast/regions/subtree-with-vert-lr-expected.html: Added.
* fast/regions/subtree-with-vert-lr.html: Added.
* fast/regions/subtree-with-vert-rl-expected.html: Added.
* fast/regions/subtree-with-vert-rl.html: Added.

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

6 years agoUnreviewed GTK gardening.
zandobersek@gmail.com [Sat, 17 Aug 2013 12:11:42 +0000 (12:11 +0000)]
Unreviewed GTK gardening.

* platform/gtk/TestExpecations: Unskip fast/dom/gc-10.html, the test seems to work now.

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

6 years ago<https://webkit.org/b/119903> Make Settings ref-counted (and let Frame keep a ref!)
akling@apple.com [Sat, 17 Aug 2013 10:58:40 +0000 (10:58 +0000)]
<https://webkit.org/b/119903> Make Settings ref-counted (and let Frame keep a ref!)

Reviewed by Geoff Garen.

Let Frame hold a RefPtr<Settings> so Frame::settings() isn't forced to go through Page.
It now also returns a reference, as it can never be null.

Removed 8.8 million lines of null-checking as a result.

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

6 years agoDFG should optimize typedArray.byteLength
fpizlo@apple.com [Sat, 17 Aug 2013 05:50:48 +0000 (05:50 +0000)]
DFG should optimize typedArray.byteLength
https://bugs.webkit.org/show_bug.cgi?id=119909

Source/JavaScriptCore:

Reviewed by Oliver Hunt.

This adds typedArray.byteLength inlining to the DFG, and does so without changing
the IR: byteLength is turned into GetArrayLength followed by BitLShift. This is
legal since the byteLength of a typed array cannot exceed
numeric_limits<int32_t>::max().

* bytecode/SpeculatedType.cpp:
(JSC::typedArrayTypeFromSpeculation):
* bytecode/SpeculatedType.h:
* dfg/DFGArrayMode.cpp:
(JSC::DFG::toArrayType):
* dfg/DFGArrayMode.h:
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::attemptToMakeGetArrayLength):
(JSC::DFG::FixupPhase::attemptToMakeGetByteLength):
(JSC::DFG::FixupPhase::convertToGetArrayLength):
(JSC::DFG::FixupPhase::prependGetArrayLength):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::constantRegisterForConstant):
(JSC::DFG::Graph::convertToConstant):
* runtime/TypedArrayType.h:
(JSC::logElementSize):
(JSC::elementSize):

LayoutTests:

Reviewed by Oliver Hunt.

Convert two of the tyepd array tests to use byteLength instead of length.
These tests show speed-ups around 2.5x-5x.

* fast/js/regress/Int16Array-bubble-sort-with-byteLength-expected.txt: Added.
* fast/js/regress/Int16Array-bubble-sort-with-byteLength.html: Added.
* fast/js/regress/Int8Array-load-with-byteLength-expected.txt: Added.
* fast/js/regress/Int8Array-load-with-byteLength.html: Added.
* fast/js/regress/script-tests/Int16Array-bubble-sort-with-byteLength.js: Added.
(bubbleSort):
(myRandom):
(validateSort):
* fast/js/regress/script-tests/Int8Array-load-with-byteLength.js: Added.
(adler32):

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

6 years agoDFG optimizes out strict mode arguments tear off
fpizlo@apple.com [Sat, 17 Aug 2013 05:36:32 +0000 (05:36 +0000)]
DFG optimizes out strict mode arguments tear off
https://bugs.webkit.org/show_bug.cgi?id=119504

Source/JavaScriptCore:

Reviewed by Mark Hahnenberg and Oliver Hunt.

Don't do the optimization for strict mode.

* dfg/DFGArgumentsSimplificationPhase.cpp:
(JSC::DFG::ArgumentsSimplificationPhase::run):
(JSC::DFG::ArgumentsSimplificationPhase::pruneObviousArgumentCreations):

LayoutTests:

Reviewed by Mark Hahnenberg and Oliver Hunt.

* fast/js/dfg-arguments-strict-mode-expected.txt: Added.
* fast/js/dfg-arguments-strict-mode.html: Added.
* fast/js/jsc-test-list:
* fast/js/script-tests/dfg-arguments-strict-mode.js: Added.
(f):

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

6 years ago[EFL] Unreviewed build fix after r154192
ljaehun.lim@samsung.com [Sat, 17 Aug 2013 02:50:48 +0000 (02:50 +0000)]
[EFL] Unreviewed build fix after r154192

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::evaluateScriptInIsolatedWorld):

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

6 years ago<https://webkit.org/b/119536> Refactor highestEditableRoot to avoid a redundant call...
rniwa@webkit.org [Sat, 17 Aug 2013 01:31:34 +0000 (01:31 +0000)]
<https://webkit.org/b/119536> Refactor highestEditableRoot to avoid a redundant call to rendererIsEditable

Reviewed by Benjamin Poulain.

Refactor highestEditableRoot to avoid an extra tree walk. We now walk up the ancestor chain up to
the first root editable element exactly once.

* dom/Node.cpp:
(WebCore::Node::rendererIsEditable): Change the order of conditions to make the evaluation faster
when we don't have to check RenderStyle's value.
* editing/htmlediting.cpp:
(WebCore::highestEditableRoot):

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

6 years agoRemove a useless #include of SelectorChecker.h
benjamin@webkit.org [Sat, 17 Aug 2013 01:20:29 +0000 (01:20 +0000)]
Remove a useless #include of SelectorChecker.h

Rubber-stamped by Ryosuke Niwa.

* dom/DocumentStyleSheetCollection.cpp:

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

6 years ago[JSC] x86: improve code generation for xxxTest32
benjamin@webkit.org [Fri, 16 Aug 2013 23:34:21 +0000 (23:34 +0000)]
[JSC] x86: improve code generation for xxxTest32
https://bugs.webkit.org/show_bug.cgi?id=119876

Reviewed by Geoffrey Garen.

Try to use testb whenever possible when testing for an immediate value.

When the input is an address and an offset, we can tweak the mask
and offset to be able to generate testb for any byte of the mask.

When the input is a register, we can use testb if we are only interested
in testing the low bits.

* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::branchTest32):
(JSC::MacroAssemblerX86Common::test32):
(JSC::MacroAssemblerX86Common::generateTest32):

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

6 years ago<https://webkit.org/b/119915> REGRESSION(r154144): ASSERTION FAILED: m_history->provi...
rniwa@webkit.org [Fri, 16 Aug 2013 21:56:36 +0000 (21:56 +0000)]
<https://webkit.org/b/119915> REGRESSION(r154144): ASSERTION FAILED: m_history->provisionalItem() == m_requestedHistoryItem.get()

Add failing test expectations.

* platform/mac-wk2/TestExpectations:

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

6 years ago[Windows] Update RenderMediaControls for new API
bfulgham@apple.com [Fri, 16 Aug 2013 21:45:20 +0000 (21:45 +0000)]
[Windows] Update RenderMediaControls for new API
https://bugs.webkit.org/show_bug.cgi?id=119910

Reviewed by Eric Carlson.

* rendering/RenderMediaControls.cpp: Update calls to WebKitSystemInterface for
the changed API.

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

6 years ago<https://bugs.webkit.org/show_bug.cgi?id=119913> Baseline JIT gives erroneous
mark.lam@apple.com [Fri, 16 Aug 2013 21:40:47 +0000 (21:40 +0000)]
<https://bugs.webkit.org/show_bug.cgi?id=119913> Baseline JIT gives erroneous
error message that an object is not a constructor though it expects a function

Reviewed by Michael Saboff.

* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):

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

6 years ago<https://webkit.org/b/119912> Fix WebKit build error when SVG is disabled(broken...
commit-queue@webkit.org [Fri, 16 Aug 2013 21:29:48 +0000 (21:29 +0000)]
<https://webkit.org/b/119912> Fix WebKit build error when SVG is disabled(broken since r154174)

Patch by Arunprasad Rajkumar <arurajku@cisco.com> on 2013-08-16
Reviewed by Simon Fraser.

No new tests required, just a build fix.

Since r154174 CSS keywords alpha and luminance used by -webkit-mask-source-type. Move those
keywords from SVGCSSValueKeywords.in to CSSValueKeywords.in.

* css/CSSValueKeywords.in:
* css/SVGCSSValueKeywords.in:

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

6 years agoPrettyPatch: Wrap pre blocks
dfarler@apple.com [Fri, 16 Aug 2013 20:04:47 +0000 (20:04 +0000)]
PrettyPatch: Wrap pre blocks
https://bugs.webkit.org/show_bug.cgi?id=119906

Reviewed by Darin Adler.

* PrettyPatch/PrettyPatch.rb:
<pre> will use the same wrap settings as the text class:
white-space: pre-wrap and word-wrap: break-word.

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

6 years ago<https://webkit.org/b/119785> Replace currentTime() with monotonicallyIncreasingTime...
commit-queue@webkit.org [Fri, 16 Aug 2013 19:33:59 +0000 (19:33 +0000)]
<https://webkit.org/b/119785> Replace currentTime() with monotonicallyIncreasingTime() in WebCore

Patch by Arunprasad Rajkumar <arurajku@cisco.com> on 2013-08-16
Reviewed by Alexey Proskuryakov.

Source/WebCore:

WTF::currentTime() is prone to DST changes and NTP adjustments, so use
WTF::monotonicallyIncreasingTime() to measure elapsed time.

* Modules/filesystem/FileWriter.cpp:
(WebCore::FileWriter::didWrite):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::elapsedTime):
(WebCore::Document::resetLastHandledUserGestureTimestamp):
* dom/Element.cpp:
(WebCore::Element::setActive):
* fileapi/FileReader.cpp:
(WebCore::FileReader::didReceiveData):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::startProgressEventTimer):
(WebCore::HTMLMediaElement::progressEventTimerFired):
(WebCore::HTMLMediaElement::refreshCachedTime):
(WebCore::HTMLMediaElement::invalidateCachedTime):
(WebCore::HTMLMediaElement::currentTime):
(WebCore::HTMLMediaElement::startPlaybackProgressTimer):
(WebCore::HTMLMediaElement::scheduleTimeupdateEvent):
* html/HTMLMediaElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::documentHadRecentUserGesture):
* html/MediaController.cpp:
(MediaController::scheduleTimeupdateEvent):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::pumpPendingSpeculations):
* html/parser/HTMLParserScheduler.h:
(WebCore::HTMLParserScheduler::checkForYieldBeforeToken):
* inspector/InspectorCSSAgent.cpp:
(WebCore::SelectorProfile::SelectorProfile):
(WebCore::SelectorProfile::totalMatchingTimeMs):
(WebCore::SelectorProfile::startSelector):
(WebCore::SelectorProfile::commitSelector):
(WebCore::SelectorProfile::commitSelectorTime):
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::willProcessTask):
(WebCore::InspectorProfilerAgent::didProcessTask):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::timestamp):
* inspector/TimelineTraceEventProcessor.cpp:
(WebCore::TimelineTraceEventProcessor::processEventOnAnyThread):
* page/FrameView.cpp:
(WebCore::FrameView::adjustedDeferredRepaintDelay):
(WebCore::FrameView::paintContents):
* platform/ClockGeneric.cpp:
(ClockGeneric::now):
* platform/ScrollAnimatorNone.cpp:
(WebCore::ScrollAnimatorNone::scroll):
(WebCore::ScrollAnimatorNone::animationTimerFired):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::ImageBuffer::flushContextIfNecessary):
(WebCore::ImageBuffer::flushContext):
(WebCore::ImageBuffer::copyNativeImage):

Source/WTF:

WTF::currentTime() is prone to DST changes and NTP adjustments, so use
WTF::monotonicallyIncreasingTime() to measure elapsed time.

* wtf/CurrentTime.h:
(WTF::monotonicallyIncreasingTimeMS): Added mille second version of monotonic time API.

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

6 years ago<https://webkit.org/b/119891> [WinCairo] Compile error.
commit-queue@webkit.org [Fri, 16 Aug 2013 19:20:36 +0000 (19:20 +0000)]
<https://webkit.org/b/119891> [WinCairo] Compile error.

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-08-16
Reviewed by Brent Fulgham.

* rendering/FlowThreadController.cpp: Need USE(ACCELERATED_COMPOSITING) guard.
* rendering/FlowThreadController.h: Need USE(ACCELERATED_COMPOSITING) guard.

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

6 years agoObject properties added using dot syntax (o.f = ...) from code that isn't in eval...
fpizlo@apple.com [Fri, 16 Aug 2013 19:15:31 +0000 (19:15 +0000)]
Object properties added using dot syntax (o.f = ...) from code that isn't in eval should be less likely to cause an object to become a dictionary
https://bugs.webkit.org/show_bug.cgi?id=119897

Source/JavaScriptCore:

Reviewed by Oliver Hunt.

6-10x speed-up on microbenchmarks that create large static objects. 40-65% speed-up
on Octane/gbemu. 3% overall speed-up on Octane. No slow-downs anywhere; our ability
to turn objects into dictionaries when you're storing using bracket syntax or using
eval is still in place.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::putByIdContext):
* dfg/DFGOperations.cpp:
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/JSObject.h:
(JSC::JSObject::putDirectInternal):
* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::PutPropertySlot):
(JSC::PutPropertySlot::context):
* runtime/Structure.cpp:
(JSC::Structure::addPropertyTransition):
* runtime/Structure.h:

LayoutTests:

Reviewed by Oliver Hunt.

* fast/js/regress/lots-of-fields-expected.txt: Added.
* fast/js/regress/lots-of-fields.html: Added.
* fast/js/regress/script-tests/lots-of-fields.js: Added.
(foo):

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

6 years ago[Windows] DRT is not using the same preferences as the Mac build.
bfulgham@apple.com [Fri, 16 Aug 2013 19:08:16 +0000 (19:08 +0000)]
[Windows] DRT is not using the same preferences as the Mac build.
https://bugs.webkit.org/show_bug.cgi?id=119822

Reviewed by Darin Adler.

* DumpRenderTree/win/DumpRenderTree.cpp:
(runTest): Process Windows message queue using CFRunLoop to allow
dispatch routines to run properly.
(dllLauncherEntryPoint): Wrap CG-specific setup code in a macro
to prevent problems on WinCairo port.

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

6 years ago<https://webkit.org/b/119887> [Soup] The testing NetworkStorageSession should have...
zandobersek@gmail.com [Fri, 16 Aug 2013 18:53:15 +0000 (18:53 +0000)]
<https://webkit.org/b/119887> [Soup] The testing NetworkStorageSession should have a proper SoupSession

Reviewed by Martin Robinson.

After r154144, a testing NetworkStorageSession is enforced when running the layout tests
through WebKitTestRunner. Ports using the Soup networking backend don't assign any SoupSession
objects to such NetworkStorageSession objects as it's usually the case. This is causing problems
as the ResourceHandleInternal uses the SoupSession that's provided by the NetworkingContext's
NetworkStorageSession, which ends up being null if the testing-specific NetworkStorageSession is used.
As a result, all the layout tests are crashing under WKTR.

* platform/network/NetworkStorageSession.h: Make the SoupSession member a GRefPtr.
(WebCore::NetworkStorageSession::soupSession): Return the GRefPtr's pointer.
* platform/network/ResourceHandle.h: Declare the new createTestingSession method.
* platform/network/soup/CookieJarSoup.cpp:
(WebCore::cookieJarForSession): Instead of returning the default SoupCookieJar when there's no SoupSession
provided by the NetworkStorageSession, assert that there now always is one, and return the session's cookie
jar. For testing NetworkStorageSession objects, their SoupSession objects will always use the default cookie jar.
* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession): Adopt the given SoupSession reference pointer.
(WebCore::NetworkStorageSession::switchToNewTestingSession): Use a newly-created, testing-specific SoupSession.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandle::createTestingSession): Define the new createTestingSession method. It creates a new
SoupSession through createSoupSession, but uses the default SoupCookieJar, as provided by WebCore::soupCookieJar.

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

6 years ago<https://webkit.org/b/118105> Web Inspector: AX: Add support for ARIA tablists/tabs...
commit-queue@webkit.org [Fri, 16 Aug 2013 18:43:14 +0000 (18:43 +0000)]
<https://webkit.org/b/118105> Web Inspector: AX: Add support for ARIA tablists/tabs to inspector tabs

Patch by James Craig <james@cookiecrook.com> on 2013-08-16
Reviewed by Joseph Pecoraro.

Updating accessibility roles and attributes for single-select toolbar item sets.

* UserInterface/ActivateButtonNavigationItem.js:
(WebInspector.ActivateButtonNavigationItem):
(WebInspector.ActivateButtonNavigationItem.prototype.set activated):
* UserInterface/ActivateButtonToolbarItem.js:
(WebInspector.ActivateButtonToolbarItem):
* UserInterface/ButtonToolbarItem.js:
(WebInspector.ButtonToolbarItem):
* UserInterface/SidebarPanel.js:
(WebInspector.SidebarPanel):
* UserInterface/Toolbar.js:
(WebInspector.Toolbar):

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

6 years ago[Mac] Unreviewed gardening. Rebaseline after r154124.
jer.noble@apple.com [Fri, 16 Aug 2013 18:42:41 +0000 (18:42 +0000)]
[Mac] Unreviewed gardening. Rebaseline after r154124.

* platform/mac-lion/fast/js/global-constructors-attributes-expected.txt:

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

6 years ago[Windows] URL printing code in DRT doesn't match WTR or Mac DRT
bfulgham@apple.com [Fri, 16 Aug 2013 18:06:08 +0000 (18:06 +0000)]
[Windows] URL printing code in DRT doesn't match WTR or Mac DRT
https://bugs.webkit.org/show_bug.cgi?id=119583

Reviewed by Alexey Proskuryakov.

* DumpRenderTree/win/DumpRenderTree.cpp:
(urlSuitableForTestResult): Revise URL output to match Mac DRT by emiting last path
component if the URL does not contain the expected base URL.

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

6 years ago[Windows] Unreviewed gardening. Correct Windows test expectations after JSC changes.
bfulgham@apple.com [Fri, 16 Aug 2013 18:02:17 +0000 (18:02 +0000)]
[Windows] Unreviewed gardening. Correct Windows test expectations after JSC changes.

* platform/win/fast/js/dom-static-property-for-in-iteration-expected.txt:
* platform/win/fast/js/global-constructors-attributes-shared-worker-expected.txt:

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

6 years ago<https://webkit.org/b/119852> Frame::scriptController() should return a reference
psolanki@apple.com [Fri, 16 Aug 2013 17:55:32 +0000 (17:55 +0000)]
<https://webkit.org/b/119852> Frame::scriptController() should return a reference

Reviewed by Andreas Kling.

m_script is never NULL so we can just return a reference. Also remove some pointless null
checks as a result of doing this.

Source/WebCore:

* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::toJS):
(WebCore::toJSDOMWindow):
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::toJS):
(WebCore::toJSDOMWindowShell):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::initializeJSFunction):
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::setJavaScriptPaused):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute):
* bindings/js/ScriptCachedFrameData.cpp:
(WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
(WebCore::ScriptCachedFrameData::restore):
* bindings/js/ScriptEventListener.cpp:
(WebCore::createAttributeEventListener):
(WebCore::eventListenerHandlerScriptState):
* bindings/js/ScriptState.cpp:
(WebCore::mainWorldScriptState):
(WebCore::scriptStateFromNode):
(WebCore::scriptStateFromPage):
* bindings/objc/DOM.mm:
(-[DOMNode JSC::Bindings::]):
* bindings/objc/DOMInternal.mm:
(-[WebScriptObject _initializeScriptDOMNodeImp]):
* dom/Document.cpp:
(WebCore::Document::disableEval):
(WebCore::Document::ensurePlugInsInjectedScript):
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::prepareScript):
(WebCore::ScriptElement::executeScript):
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createRenderer):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::rendererIsNeeded):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::controls):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::getInstance):
(WebCore::HTMLPlugInElement::getNPObject):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
* html/parser/HTMLParserOptions.cpp:
(WebCore::HTMLParserOptions::HTMLParserOptions):
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::didClearWindowObjectInWorld):
* inspector/InspectorClient.cpp:
(WebCore::InspectorClient::doDispatchMessageOnFrontendPage):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::evaluateAsBoolean):
(WebCore::InspectorFrontendClientLocal::evaluateOnLoad):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::evaluateInOverlay):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getScriptExecutionStatus):
(WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::reportExecutionContextCreation):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::begin):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::urlSelected):
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::cancelAndClear):
(WebCore::FrameLoader::clear):
(WebCore::FrameLoader::prepareForCachedPageRestore):
(WebCore::FrameLoader::dispatchDidClearWindowObjectsInAllWorlds):
(WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::requestFrame):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::canRequest):
* page/EventSource.cpp:
(WebCore::EventSource::create):
* page/Frame.cpp:
(WebCore::Frame::willDetachPage):
* page/Frame.h:
(WebCore::Frame::script):
* page/Navigator.cpp:
(WebCore::shouldHideFourDot):
* page/Page.cpp:
(WebCore::Page::setDebugger):
* platform/graphics/wince/MediaPlayerProxy.cpp:
(WebCore::WebMediaPlayerProxy::pluginInstance):
(WebCore::WebMediaPlayerProxy::invokeMethod):
* plugins/PluginView.cpp:
(WebCore::PluginView::~PluginView):
(WebCore::PluginView::performRequest):
(WebCore::PluginView::load):
(WebCore::PluginView::bindingInstance):
(WebCore::PluginView::getValue):
* plugins/efl/PluginViewEfl.cpp:
(WebCore::PluginView::platformGetValue):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::open):
* xml/XMLTreeViewer.cpp:
(WebCore::XMLTreeViewer::transformDocumentToTreeView):

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::load):
(BlackBerry::WebKit::WebPagePrivate::executeJavaScript):
(BlackBerry::WebKit::WebPagePrivate::executeJavaScriptInIsolatedWorld):
(BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
(BlackBerry::WebKit::WebPage::globalContext):
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::dispatchDidClearWindowObjectInWorld):

Source/WebKit/efl:

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::evaluateScriptInIsolatedWorld):
(DumpRenderTreeSupportEfl::globalContextRefForFrame):
* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::dispatchDidClearWindowObjectInWorld):
* ewk/ewk_frame.cpp:
(ewk_frame_script_execute):
* ewk/ewk_view.cpp:
(ewk_view_js_object_add):

Source/WebKit/gtk:

* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::dispatchDidClearWindowObjectInWorld):
* webkit/webkitwebframe.cpp:
(webkit_web_frame_get_global_context):
* webkit/webkitwebview.cpp:
(webkit_web_view_execute_script):

Source/WebKit/mac:

* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::cleanup):
(WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
(WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject):
(WebKit::NetscapePluginInstanceProxy::evaluate):
(WebKit::NetscapePluginInstanceProxy::invoke):
(WebKit::NetscapePluginInstanceProxy::invokeDefault):
(WebKit::NetscapePluginInstanceProxy::construct):
(WebKit::NetscapePluginInstanceProxy::getProperty):
(WebKit::NetscapePluginInstanceProxy::setProperty):
(WebKit::NetscapePluginInstanceProxy::removeProperty):
(WebKit::NetscapePluginInstanceProxy::hasProperty):
(WebKit::NetscapePluginInstanceProxy::hasMethod):
(WebKit::NetscapePluginInstanceProxy::enumerate):
(WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView getVariable:value:]):
(-[WebNetscapePluginView _destroyPlugin]):
* Plugins/WebPluginController.mm:
* WebCoreSupport/WebFrameLoaderClient.mm:
* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorFrontendClient::save):
(WebInspectorFrontendClient::append):
* WebView/WebFrame.mm:
(-[WebFrame _attachScriptDebugger]):
(-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
(-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
(-[WebFrame _globalContextForScriptWorld:]):
(-[WebFrame jsWrapperForNode:inScriptWorld:]):
(-[WebFrame windowObject]):
(-[WebFrame globalContext]):
(-[WebFrame javaScriptContext]):
* WebView/WebScriptDebugger.mm:
(WebScriptDebugger::initGlobalCallFrame):
(WebScriptDebugger::callEvent):
* WebView/WebView.mm:
(-[WebView windowScriptObject]):
(-[WebView aeDescByEvaluatingJavaScriptFromString:]):

Source/WebKit/qt:

* Api/qwebelement.cpp:
(setupScriptContext):
(QWebElement::evaluateJavaScript):
* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld):
* WebCoreSupport/QWebFrameAdapter.cpp:
(QWebFrameAdapter::evaluateJavaScript):
(QWebFrameAdapter::addToJavaScriptWindowObject):

Source/WebKit/win:

* WebFrame.cpp:
(WebFrame::globalContext):
(WebFrame::globalContextForScriptWorld):
(WebFrame::dispatchDidClearWindowObjectInWorld):
(WebFrame::stringByEvaluatingJavaScriptInScriptWorld):
* WebView.cpp:
(WebView::stringByEvaluatingJavaScriptFromString):

Source/WebKit2:

* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::globalObject):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::performJavaScriptURLRequest):
(WebKit::PluginView::windowScriptNPObject):
(WebKit::PluginView::pluginElementNPObject):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::jsContext):
(WebKit::WebFrame::jsContextForWorld):
(WebKit::WebFrame::jsWrapperForWorld):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::didSave):
(WebKit::WebInspector::didAppend):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::runJavaScriptInMainFrame):

Tools:

* DumpRenderTree/blackberry/DumpRenderTree.cpp:
(BlackBerry::WebKit::DumpRenderTree::resetToConsistentStateBeforeTesting):

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

6 years ago[Mac] [WK2] Some inspector tests intermittently asserts in InspectorOverlay::paint
jer.noble@apple.com [Fri, 16 Aug 2013 17:47:22 +0000 (17:47 +0000)]
[Mac] [WK2] Some inspector tests intermittently asserts in InspectorOverlay::paint
https://bugs.webkit.org/show_bug.cgi?id=105988

Unreviewed gardening. Mark tests as flakey (crashing) in WK1 expectations as well as WK2.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

6 years agoAttempt to fix the Qt/MountainLion build after r154142.
akling@apple.com [Fri, 16 Aug 2013 16:21:31 +0000 (16:21 +0000)]
Attempt to fix the Qt/MountainLion build after r154142.

* platform/graphics/qt/MediaPlayerPrivateQt.cpp:
(WebCore::MediaPlayerPrivateQt::commitLoad):

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

6 years agoWindows build juice.
akling@apple.com [Fri, 16 Aug 2013 16:13:06 +0000 (16:13 +0000)]
Windows build juice.

* WebView.cpp:
(WebView::paintIntoBackingStore):

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

6 years ago[Qt] Kerning in fast font path breaks letter-spacing
allan.jensen@digia.com [Fri, 16 Aug 2013 16:03:29 +0000 (16:03 +0000)]
[Qt] Kerning in fast font path breaks letter-spacing
https://bugs.webkit.org/show_bug.cgi?id=119838

Reviewed by Jocelyn Turcotte.

Source/WebCore:

Mark fonts with both kerning and letter-spacing as unsupported by the simple font-path.

Test: fast/text/letter-spacing-kerned.html

* platform/graphics/WidthIterator.h:
(WebCore::WidthIterator::supportsTypesettingFeatures):

LayoutTests:

Test that kerning does not break letter spacing.

* fast/text/letter-spacing-kerned-expected.html: Added.
* fast/text/letter-spacing-kerned.html: Added.

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

6 years ago[Windows] Unreviewed gardening. Turn on a now-passing test.
bfulgham@apple.com [Fri, 16 Aug 2013 15:52:52 +0000 (15:52 +0000)]
[Windows] Unreviewed gardening. Turn on a now-passing test.

* platform/win/TestExpectations: Reactivate fast/text/split-text-crash.xhtml

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

6 years ago<https://webkit.org/b/119893> FrameView::frame() should return a reference.
akling@apple.com [Fri, 16 Aug 2013 15:47:09 +0000 (15:47 +0000)]
<https://webkit.org/b/119893> FrameView::frame() should return a reference.

Reviewed by Antti Koivisto.

FrameView::m_frame was only ever null for a brief moment during CachedFrame teardown.
Leave it alone instead, and update the assertion that depended on this behavior.
This enables us to make FrameView::frame() return a Frame&, exposing a ton of
unnecessary null checks.

* history/CachedFrame.cpp:
(WebCore::CachedFrame::destroy):

    Remove call to FrameView::clearFrame() that was the only way to get a null
    FrameView::m_frame. Immediately followed by a call to CachedFrame::clear() where
    the FrameView would get destroyed anyway.

(WebCore::CachedFrame::clear):

    Update an assertion to support the case where the Document's Frame pointer has
    been cleared out and CachedFrame is still clinging to the FrameView.

* history/CachedPage.h:

    Made CachedPage::destroy() private as it was only called by ~CachedPage().

* /:

    Frame* FrameView::frame() => Frame& FrameView::frame()

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

6 years ago(NetworkProcess) Sync XHRs should load using async ResourceHandles, not ResourceHand...
beidson@apple.com [Fri, 16 Aug 2013 15:44:06 +0000 (15:44 +0000)]
(NetworkProcess)  Sync XHRs should load using async ResourceHandles, not ResourceHandle::loadResourceSynchronously
https://bugs.webkit.org/show_bug.cgi?id=119493

Reviewed by Alexey Proskuryakov.

Source/WebCore:

No new tests (Covered by plenty of existing tests).

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:

* platform/network/SynchronousLoaderClient.h: Make platformBadResponseError public

* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::platformLoadResourceSynchronously): Add comments/FIXMEs spelling out how wrong this code is.

Source/WebKit2:

This patch does the following:
  - Consolidates SchedulableLoader and NetworkResourceLoader into one class.
  - Removes SyncNetworkResourceLoader.
  - Adds a NetworkLoaderClient interface that customizes certain behaviors of the NetworkResourceLoader.
  - Implements a SynchronousNetworkLoaderClient and AsynchronousNetworkLoaderClient for the two different types of loads.

The AsynchronousNetworkLoaderClient results in messaging back progress to the WebProcess as the load progresses.
The SynchronousNetworkLoaderClient accumulates the response, data, and error to be communicated back to the WebProcess
only when the load is complete.

Update small swaths of code to reflect that NetworkResourceLoader is the One True Loader (tm):
* NetworkProcess/HostRecord.cpp:
(WebKit::HostRecord::scheduleResourceLoader):
(WebKit::HostRecord::addLoaderInProgress):
(WebKit::removeLoaderFromQueue):
(WebKit::HostRecord::removeLoader):
(WebKit::HostRecord::servePendingRequestsForQueue):
(WebKit::HostRecord::limitsRequests):
* NetworkProcess/HostRecord.h:

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
(WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier):
* NetworkProcess/NetworkConnectionToWebProcess.h:

* NetworkProcess/NetworkProcess.cpp:
* NetworkProcess/NetworkResourceLoadScheduler.cpp:
(WebKit::NetworkResourceLoadScheduler::scheduleLoader):
(WebKit::NetworkResourceLoadScheduler::removeLoader):
(WebKit::NetworkResourceLoadScheduler::receivedRedirect):
(WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders):
(WebKit::NetworkResourceLoadScheduler::scheduleRemoveLoader):
* NetworkProcess/NetworkResourceLoadScheduler.h:

Combine ScheduleableLoader and NetworkResourceLoader into NetworkResourceLoader:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::~NetworkResourceLoader):
(WebKit::NetworkResourceLoader::isSynchronous):
(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
(WebKit::NetworkResourceLoader::didReceiveBuffer):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::didFail):
(WebKit::NetworkResourceLoader::willSendRequestAsync):
(WebKit::NetworkResourceLoader::continueWillSendRequest):
(WebKit::NetworkResourceLoader::didSendData):
(WebKit::NetworkResourceLoader::shouldUseCredentialStorage):
(WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge):
(WebKit::NetworkResourceLoader::consumeSandboxExtensions):
(WebKit::NetworkResourceLoader::invalidateSandboxExtensions):
(WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::create):
(WebKit::NetworkResourceLoader::connectionToWebProcess):
(WebKit::NetworkResourceLoader::priority):
(WebKit::NetworkResourceLoader::request):
(WebKit::NetworkResourceLoader::isLoadingMainResource):
(WebKit::NetworkResourceLoader::setHostRecord):
(WebKit::NetworkResourceLoader::hostRecord):
(WebKit::NetworkResourceLoader::sendAbortingOnFailure):

Add an abstract NetworkLoaderClient to adapt a load to be either synchronous or asynchronous:
* NetworkProcess/NetworkLoaderClient.h:
(WebKit::NetworkLoaderClient::~NetworkLoaderClient):
(WebKit::NetworkLoaderClient::isSynchronous):
(WebKit::NetworkLoaderClient::NetworkLoaderClient):

The asynchronous loader client, primarily to message progress back to the WebProcess as it happens:
* NetworkProcess/AsynchronousNetworkLoaderClient.cpp: Added.
(WebKit::AsynchronousNetworkLoaderClient::AsynchronousNetworkLoaderClient):
(WebKit::AsynchronousNetworkLoaderClient::willSendRequest):
(WebKit::AsynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace):
(WebKit::AsynchronousNetworkLoaderClient::didReceiveResponse):
(WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer):
(WebKit::AsynchronousNetworkLoaderClient::didSendData):
(WebKit::AsynchronousNetworkLoaderClient::didFinishLoading):
(WebKit::AsynchronousNetworkLoaderClient::didFail):
* NetworkProcess/AsynchronousNetworkLoaderClient.h:
(WebKit::AsynchronousNetworkLoaderClient::create):

The synchronous loader client, primarily to accumulate results of the load to send back to the WebProcess all at once:
* NetworkProcess/SynchronousNetworkLoaderClient.cpp: Added.
(WebKit::SynchronousNetworkLoaderClient::SynchronousNetworkLoaderClient):
(WebKit::SynchronousNetworkLoaderClient::~SynchronousNetworkLoaderClient):
(WebKit::SynchronousNetworkLoaderClient::willSendRequest):
(WebKit::SynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace):
(WebKit::SynchronousNetworkLoaderClient::didReceiveResponse):
(WebKit::SynchronousNetworkLoaderClient::didReceiveBuffer):
(WebKit::SynchronousNetworkLoaderClient::didFinishLoading):
(WebKit::SynchronousNetworkLoaderClient::didFail):
(WebKit::SynchronousNetworkLoaderClient::sendDelayedReply):
* NetworkProcess/SynchronousNetworkLoaderClient.h: Added.
(WebKit::SynchronousNetworkLoaderClient::create):

* NetworkProcess/SchedulableLoader.cpp: Removed.
* NetworkProcess/SchedulableLoader.h: Removed.
* NetworkProcess/SyncNetworkResourceLoader.cpp: Removed.
* NetworkProcess/SyncNetworkResourceLoader.h: Removed.

* WebKit2.xcodeproj/project.pbxproj:

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

6 years ago<https://webkit.org/b/119889> [WinCairo] Compile error.
commit-queue@webkit.org [Fri, 16 Aug 2013 15:42:17 +0000 (15:42 +0000)]
<https://webkit.org/b/119889> [WinCairo] Compile error.

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-08-16
Reviewed by Brent Fulgham.

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::certificatePath): Use correct function name.

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

6 years ago[Windows] Unreviewed build correction after r154165.
bfulgham@apple.com [Fri, 16 Aug 2013 15:33:17 +0000 (15:33 +0000)]
[Windows] Unreviewed build correction after r154165.

* WebCore.vcxproj/copyForwardingHeaders.cmd: Copy html/shadow header files
to WebKit include location.

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

6 years agoSource/WebCore: [Windows] Prevent dangling CACFLayer when switching to/from Tiled...
bfulgham@apple.com [Fri, 16 Aug 2013 15:27:35 +0000 (15:27 +0000)]
Source/WebCore: [Windows] Prevent dangling CACFLayer when switching to/from Tiled backing.
https://bugs.webkit.org/show_bug.cgi?id=119818

Reviewed by Darin Adler.

Covered by existing: compositing/tiling/empty-to-tiled.html

* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayer::~PlatformCALayer): Remove deleted layer from its
parent layer

LayoutTests: [Windows] Enable previously-failing compositing/tiling/empty-to-tiled.html
https://bugs.webkit.org/show_bug.cgi?id=119818

Reviewed by Darin Adler.

* platform/win/TestExpectations: Re-enable empty-to-tiled.html

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

6 years ago[Qt] Unreviewed gardening. Rebase js tests after r154127.
zarvai@inf.u-szeged.hu [Fri, 16 Aug 2013 14:52:47 +0000 (14:52 +0000)]
[Qt] Unreviewed gardening. Rebase js tests after r154127.

Patch by Tamas Czene <tczene@inf.u-szeged.hu> on 2013-08-16

* platform/qt/fast/js/constructor-length-expected.txt:
* platform/qt/fast/js/global-constructors-attributes-expected.txt:

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

6 years ago<https://webkit.org/b/119866> Frame::eventHandler() should return a reference.
akling@apple.com [Fri, 16 Aug 2013 13:05:04 +0000 (13:05 +0000)]
<https://webkit.org/b/119866> Frame::eventHandler() should return a reference.

Reviewed by Anders Carlsson.

Frame::m_eventHandler is never null.

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

6 years ago[EFL] fast/forms/datalist/input-list.html is failing
commit-queue@webkit.org [Fri, 16 Aug 2013 12:38:42 +0000 (12:38 +0000)]
[EFL] fast/forms/datalist/input-list.html is failing

Unreviewed EFL gardening. unskip LayoutTests/fast/forms/datalist/input-list.html test.

Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-08-16

* platform/efl/TestExpectations:
* platform/efl/fast/forms/datalist/input-list-expected.txt: Added.

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

6 years agoUnreviewed, rolling out r153749.
zandobersek@gmail.com [Fri, 16 Aug 2013 12:10:14 +0000 (12:10 +0000)]
Unreviewed, rolling out r153749.
http://trac.webkit.org/changeset/153749
https://bugs.webkit.org/show_bug.cgi?id=119892

The bison generation of the glslang* files has now been fixed. (Requested by zdobersek on #webkit).

Patch by Commit Queue <commit-queue@webkit.org> on 2013-08-16

Source/ThirdParty/ANGLE:

* GNUmakefile.am: Preserve the libANGLE.la dependency on the ANGLE's GNUmakefile.am.

Source/WebCore:

* GNUmakefile.am:

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

6 years ago[GTK] fixing localizedString method name
commit-queue@webkit.org [Fri, 16 Aug 2013 11:50:50 +0000 (11:50 +0000)]
[GTK] fixing localizedString method name
https://bugs.webkit.org/show_bug.cgi?id=119884

The method name defined in LocalizedStringsGtk.cpp doesn't not match
the one used in LocalizedStrings.h

Patch by Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk> on 2013-08-16
Reviewed by Gustavo Noronha Silva.

* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::textTrackOffMenuItemText):

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

6 years ago[CSS Masking] Add -webkit-mask-source-type property, with auto, alpha and luminance...
commit-queue@webkit.org [Fri, 16 Aug 2013 11:41:57 +0000 (11:41 +0000)]
[CSS Masking] Add -webkit-mask-source-type property, with auto, alpha and luminance values
https://bugs.webkit.org/show_bug.cgi?id=119614

Source/WebCore:

Added the -webkit-mask-source-type property, which can have a value of auto, alpha or
luminance. The default value is auto. This patch contains only the parsing of the property,
not the actual implementation of the types of masks. The parsing of mask-source-type in the
-webkit-mask property will be handled in a separate patch.

Patch by Andrei Parvu <parvu@adobe.com> on 2013-08-16
Reviewed by Dirk Schulze.

Test: fast/masking/parsing-mask-source-type.html

* css/CSSComputedStyleDeclaration.cpp: Added case for CSSPropertyWebkitMaskType.
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp: Parsed the values for CSSPropertyWebkitMaskType.
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFillProperty):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in: Added -webkit-mask-type property.
* css/CSSToStyleMap.cpp: map the provided mask type to the FillLayer class.
(WebCore::CSSToStyleMap::mapFillMaskType):
* css/CSSToStyleMap.h:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* rendering/style/FillLayer.cpp: Added the m_maskType property to the FillLayer class.
(WebCore::FillLayer::FillLayer):
(WebCore::FillLayer::operator=):
(WebCore::FillLayer::operator==):
* rendering/style/FillLayer.h: Added methods for working with m_maskType.
(WebCore::FillLayer::maskType):
(WebCore::FillLayer::isMaskTypeSet):
(WebCore::FillLayer::setMaskType):
(WebCore::FillLayer::clearMaskType):
(WebCore::FillLayer::initialMaskType):
* rendering/style/RenderStyleConstants.h: Added the EMaskSourceType enum.

LayoutTests:

Added tests for the parsing of the -webkit-mask-source-type property

Patch by Andrei Parvu <parvu@adobe.com> on 2013-08-16
Reviewed by Dirk Schulze.

* fast/masking/parsing-mask-expected.txt:
* fast/masking/parsing-mask-source-type-expected.txt: Added.
* fast/masking/parsing-mask-source-type.html: Added.
* fast/masking/parsing-mask.html:

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

6 years ago<https://webkit.org/b/119742> REGRESSION(FTL): Fix register usage in mips implementat...
commit-queue@webkit.org [Fri, 16 Aug 2013 11:02:34 +0000 (11:02 +0000)]
<https://webkit.org/b/119742> REGRESSION(FTL): Fix register usage in mips implementation of ctiVMHandleException

Patch by Balazs Kilvady <kilvadyb@homejinni.com> on 2013-08-16
Reviewed by Allan Sandfeld Jensen.

ctiVMHandleException must jump/return using register ra (r31).

* jit/JITStubsMIPS.h:

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

6 years ago<https://webkit.org/b/119885> [CMake] Always build our generated versions of ANGLE...
rakuco@webkit.org [Fri, 16 Aug 2013 10:08:26 +0000 (10:08 +0000)]
<https://webkit.org/b/119885> [CMake] Always build our generated versions of ANGLE's glslang.cpp and glslang_tab.cpp

Reviewed by Gyuyoung Kim.

Now that r154109 has landed, all Bison versions (at least from 2.3 up
to the latest 3.0) should be able to generate versions of glslang* that
build correctly.

Since the idea is to remove the prebuilt files from future imports of
ANGLE, always building our own versions is a good idea, and allows us
to get rid of some very ugly CMake checks.

* CMakeLists.txt: Always build glslang.cpp and glslang_tab.cpp from
DERIVED_SOURCES_WEBCORE_DIR.

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

6 years ago[GTK] Unreviewed gardening. Rebaseline after r154127 and add new baseline after r153647.
simon.pena@samsung.com [Fri, 16 Aug 2013 09:58:42 +0000 (09:58 +0000)]
[GTK] Unreviewed gardening. Rebaseline after r154127 and add new baseline after r153647.

* platform/gtk-wk1/TestExpectations:
x-frame-options-deny-meta-tag-in-body.html fails in Release and
Debug.
* platform/gtk/TestExpectations: CSS Image filter is not enabled
in GTK bots. Also remove entry for deleted test.
* platform/gtk/fast/forms/search/search-size-with-decorations-expected.png: Added.
* platform/gtk/fast/forms/search/search-size-with-decorations-expected.txt: Added.
* platform/gtk/fast/js/constructor-length-expected.txt:
Rebaselined after r154127.
* platform/gtk/fast/js/global-constructors-attributes-dedicated-worker-expected.txt:
ditto.
* platform/gtk/fast/js/global-constructors-attributes-expected.txt:
ditto.
* platform/gtk/fast/js/global-constructors-attributes-shared-worker-expected.txt:
ditto.

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

6 years ago<https://webkit.org/b/119879> Fix sh4 build after r154156.
commit-queue@webkit.org [Fri, 16 Aug 2013 09:25:50 +0000 (09:25 +0000)]
<https://webkit.org/b/119879> Fix sh4 build after r154156.

Patch by Julien Brianceau <jbrianceau@nds.com> on 2013-08-16
Reviewed by Allan Sandfeld Jensen.

Fix typo in JITStubsSH4.h file.

* jit/JITStubsSH4.h:

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

6 years agoReskip tests that times out.
allan.jensen@digia.com [Fri, 16 Aug 2013 09:07:06 +0000 (09:07 +0000)]
Reskip tests that times out.

Unreviewed gardening.

* platform/qt/TestExpectations:

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

6 years ago<https://webkit.org/b/119880> [Qt] Build fix (broken since r154142).
commit-queue@webkit.org [Fri, 16 Aug 2013 08:52:43 +0000 (08:52 +0000)]
<https://webkit.org/b/119880> [Qt] Build fix (broken since r154142).

Patch by Julien Brianceau <jbrianceau@nds.com> on 2013-08-16
Reviewed by Gyuyoung Kim.

Since r154142, Frame::loader() is a reference (and not a pointer anymore).

* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::parseStartElement):

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

6 years ago[Qt][ARM] Unreviewed buildfix after 154127.
rgabor@webkit.org [Fri, 16 Aug 2013 08:05:35 +0000 (08:05 +0000)]
[Qt][ARM] Unreviewed buildfix after 154127.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: Add missing header.

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

6 years ago[WebGL] Vertex attribute binding validation method
commit-queue@webkit.org [Fri, 16 Aug 2013 07:17:10 +0000 (07:17 +0000)]
[WebGL] Vertex attribute binding validation method
https://bugs.webkit.org/show_bug.cgi?id=119515

This patch refactors WebGLRenderingContext code by moving the vertex
attribute binding validation to a separate method. It is now
possible to use that validation in other parts of the code. The
code is more clear now.

Patch by Przemyslaw Szymanski <p.szymanski3@samsung.com> on 2013-08-16
Reviewed by Christophe Dumez.

No new tests. Covered by existing tests. No behaviour changed.
LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/gl-drawelements.html
LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/draw-elements-out-of-bounds.html
LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/draw-arrays-out-of-bounds.html

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateVertexAttributes):
* html/canvas/WebGLVertexArrayObjectOES.h:
(WebCore::WebGLVertexArrayObjectOES::VertexAttribState::isBound):
(WebCore::WebGLVertexArrayObjectOES::VertexAttribState::validateBinding):

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

6 years ago<https://webkit.org/b/119865> Parent pointer and shadow root host pointer should...
antti@apple.com [Fri, 16 Aug 2013 06:33:51 +0000 (06:33 +0000)]
<https://webkit.org/b/119865> Parent pointer and shadow root host pointer should not be shared

Reviewed by Andreas Kling.

Node::m_parentOrShadowHostNode is currently used both as the parent pointer for regular nodes and as the host
pointer for ShadowRoots. This is confusing. It is also slow as it introduces a branch to all code paths that
want to traverse ancestors normally, without leaving the shadow trees. This is much more popular than
traversing through.

This patch makes the Node have a pure parent pointer only and adds the host element pointer as a separate
member in ShadowRoot. This eliminates the ShadowRoot test branch from Node::parentNode() as the pointer is
now always null in the root node.

ShadowRoot grows by a pointer. This is not significant as there are few ShadowRoots compared to Nodes.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::pushParentShadowRoot):
(WebCore::StyleResolver::popParentShadowRoot):
* dom/Attr.cpp:
(WebCore::Attr::createTextChild):
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::insertBeforeCommon):
(WebCore::ContainerNode::removeBetween):
* dom/ContainerNodeAlgorithms.cpp:
(WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
(WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
* dom/ContainerNodeAlgorithms.h:
(WebCore::appendChildToContainer):
(WebCore::Private::addChildNodesToDeletionQueue):
* dom/Document.h:
(WebCore::Node::Node):
* dom/Element.cpp:
(WebCore::Element::addShadowRoot):
(WebCore::Element::removeShadowRoot):
* dom/ElementRareData.h:
(WebCore::ElementRareData::releasePseudoElement):
* dom/EventPathWalker.cpp:
(WebCore::EventPathWalker::moveToParent):
* dom/EventRetargeter.cpp:
(WebCore::determineDispatchBehavior):
* dom/EventRetargeter.h:
(WebCore::EventRetargeter::eventTargetRespectingTargetRules):
* dom/Node.cpp:
(WebCore::Node::shadowHost):
(WebCore::Node::deprecatedShadowAncestorNode):
(WebCore::Node::parentOrShadowHostElement):
* dom/Node.h:
(WebCore::Node::hasTreeSharedParent):

    Shadow host elements refs the ShadowRoot. There is no reason to use TreeShared to keep it alive.

(WebCore::Node::setParentNode):
(WebCore::Node::parentNode):
(WebCore::Node::parentNodeGuaranteedHostFree):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::PseudoElement):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::ShadowRoot):
(WebCore::ShadowRoot::setInnerHTML):
(WebCore::ShadowRoot::setApplyAuthorStyles):
(WebCore::ShadowRoot::setResetStyleInheritance):
* dom/ShadowRoot.h:

    Rename host() -> hostElement() for clarity.

(WebCore::Node::parentOrShadowHostNode):
* dom/Text.cpp:
(WebCore::isSVGShadowText):
* dom/TreeScope.cpp:
(WebCore::TreeScope::focusedElement):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::ensureDistribution):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::insertedInto):
(WebCore::InsertionPoint::removedFrom):
(WebCore::InsertionPoint::parseAttribute):
* page/DragController.cpp:
(WebCore::asFileInput):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::instanceAssociatedWithShadowTreeElement):
* page/FocusController.cpp:
(WebCore::FocusNavigationScope::owner):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::hasLineIfEmpty):
* rendering/RenderLayer.cpp:
(WebCore::rendererForScrollbar):
* svg/SVGElementInstance.h:
(WebCore::SVGElementInstance::setParentNode):

    Renamed so it works with appendChildToContainer template.

* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::title):

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

6 years agoUnreviewed GTK build fix for debug configurations.
zandobersek@gmail.com [Fri, 16 Aug 2013 06:32:27 +0000 (06:32 +0000)]
Unreviewed GTK build fix for debug configurations.

* webkit/webkitwebframe.cpp:
(WebKit::kit): Remove the bogus assertion for Frame::loader() that now returns a reference.

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

6 years ago[Windows] Unreviewed gardening. Correct some test expectations that now pass.
bfulgham@apple.com [Fri, 16 Aug 2013 03:59:30 +0000 (03:59 +0000)]
[Windows] Unreviewed gardening. Correct some test expectations that now pass.

* platform/win/editing/selection/caret-ltr-right-expected.txt:
* platform/win/editing/selection/caret-rtl-2-left-expected.txt:

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

6 years ago<https://webkit.org/b/119833> Concurrent compilation thread should not trigger WriteB...
mhahnenberg@apple.com [Fri, 16 Aug 2013 03:28:39 +0000 (03:28 +0000)]
<https://webkit.org/b/119833> Concurrent compilation thread should not trigger WriteBarriers

Reviewed by Oliver Hunt.

The concurrent compilation thread should interact minimally with the Heap, including not
triggering WriteBarriers. This is a prerequisite for generational GC.

* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::addOrFindConstant):
(JSC::CodeBlock::findConstant):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::addConstantLazily):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::getJSConstantForValue):
(JSC::DFG::ByteCodeParser::constantUndefined):
(JSC::DFG::ByteCodeParser::constantNull):
(JSC::DFG::ByteCodeParser::one):
(JSC::DFG::ByteCodeParser::constantNaN):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
* dfg/DFGCommonData.cpp:
(JSC::DFG::CommonData::notifyCompilingStructureTransition):
* dfg/DFGCommonData.h:
* dfg/DFGDesiredTransitions.cpp: Added.
(JSC::DFG::DesiredTransition::DesiredTransition):
(JSC::DFG::DesiredTransition::reallyAdd):
(JSC::DFG::DesiredTransitions::DesiredTransitions):
(JSC::DFG::DesiredTransitions::~DesiredTransitions):
(JSC::DFG::DesiredTransitions::addLazily):
(JSC::DFG::DesiredTransitions::reallyAdd):
* dfg/DFGDesiredTransitions.h: Added.
* dfg/DFGDesiredWeakReferences.cpp: Added.
(JSC::DFG::DesiredWeakReferences::DesiredWeakReferences):
(JSC::DFG::DesiredWeakReferences::~DesiredWeakReferences):
(JSC::DFG::DesiredWeakReferences::addLazily):
(JSC::DFG::DesiredWeakReferences::reallyAdd):
* dfg/DFGDesiredWeakReferences.h: Added.
* dfg/DFGDesiredWriteBarriers.cpp: Added.
(JSC::DFG::DesiredWriteBarrier::DesiredWriteBarrier):
(JSC::DFG::DesiredWriteBarrier::trigger):
(JSC::DFG::DesiredWriteBarriers::DesiredWriteBarriers):
(JSC::DFG::DesiredWriteBarriers::~DesiredWriteBarriers):
(JSC::DFG::DesiredWriteBarriers::addImpl):
(JSC::DFG::DesiredWriteBarriers::trigger):
* dfg/DFGDesiredWriteBarriers.h: Added.
(JSC::DFG::DesiredWriteBarriers::add):
(JSC::DFG::initializeLazyWriteBarrier):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::truncateConstantToInt32):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::convertToConstant):
* dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::addWeakReference):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan):
(JSC::DFG::Plan::reallyAdd):
* dfg/DFGPlan.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* runtime/WriteBarrier.h:
(JSC::WriteBarrierBase::set):
(JSC::WriteBarrier::WriteBarrier):

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

6 years agoFix x86 32bits build after r154158
benjamin@webkit.org [Fri, 16 Aug 2013 03:00:21 +0000 (03:00 +0000)]
Fix x86 32bits build after r154158

* assembler/X86Assembler.h: Add missing #ifdef for the x86_64 instructions.

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

6 years ago[iOS] Get iOS port off legacy clipboard
darin@apple.com [Fri, 16 Aug 2013 02:50:01 +0000 (02:50 +0000)]
[iOS] Get iOS port off legacy clipboard
https://bugs.webkit.org/show_bug.cgi?id=116412

Reviewed by Daniel Bates.

* dom/Clipboard.h: Turn off legacy style clipboard for iOS.
Next patch will be able to remove legacy style entirely!

* editing/Editor.cpp:
(WebCore::Editor::dispatchCPPEvent): Attach the frame to the
pasteboard directly explicitly. This is a layering violation, but
is needed until we change how iOS pasteboard communicates with the
host to use platform strategies instead of the editor client.

* editing/ios/EditorIOS.mm: Removed Editor::newGeneralClipboard and
the include of ClipboardIOS.h.

* platform/Pasteboard.h: Added the setFrame function (iOS-only) and
frame and change count data members.

* platform/ios/ClipboardIOS.h: Emptied out. Later we can remove this.
* platform/ios/ClipboardIOS.mm: Ditto.

* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::Pasteboard): Initialize m_frame to zero.
(WebCore::Pasteboard::createForCopyAndPaste): Added.
(WebCore::Pasteboard::createPrivate): Added.
(WebCore::Pasteboard::writePasteboard): Added. Empty function, like
writeClipboard. Eventually need to remove or implement this.
(WebCore::Pasteboard::setFrame): Added. Sets frame and change count.
(WebCore::Pasteboard::hasData): Moved here from ClipboardIOS.
(WebCore::utiTypeFromCocoaType): Ditto.
(WebCore::cocoaTypeFromHTMLClipboardType): Ditto.
(WebCore::Pasteboard::clear): Ditto.
(WebCore::Pasteboard::readString): Ditto.
(WebCore::addHTMLClipboardTypesForCocoaType): Ditto.
(WebCore::Pasteboard::writeString): Ditto.
(WebCore::Pasteboard::types): Ditto.
(WebCore::Pasteboard::readFilenames): Ditto.

* WebCore.exp.in: Move Clipboard destructor from Mac-only section to
common section shared by Mac and iOS.

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